anarock-widgets 1.0.154 → 1.0.155

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
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),vo=require("react-dom");function D2(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=D2(k),T2=D2(vo);function Zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Eu={exports:{}},hl={};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("react"),vo=require("react-dom");function DP(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const P=DP(k),TP=DP(vo);function Zi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Eu={exports:{}},hl={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -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 Ix;function oR(){return Ix||(Ix=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,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function w(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===o||j===i||j===d||j===f||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===p||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===g||j.$$typeof===y||j.$$typeof===S||j.$$typeof===h)}function x(j){if(typeof j=="object"&&j!==null){var me=j.$$typeof;switch(me){case t:var te=j.type;switch(te){case l:case c:case r:case o:case i:case d:return te;default:var ge=te&&te.$$typeof;switch(ge){case s:case u:case m:case p:case a:return ge;default:return me}}case n:return me}}}var _=l,E=c,C=s,D=a,A=t,R=u,T=r,O=m,N=p,M=n,I=o,L=i,$=d,V=!1;function W(j){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.")),B(j)||x(j)===l}function B(j){return x(j)===c}function X(j){return x(j)===s}function q(j){return x(j)===a}function re(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function J(j){return x(j)===u}function ee(j){return x(j)===r}function ie(j){return x(j)===m}function ae(j){return x(j)===p}function ce(j){return x(j)===n}function U(j){return x(j)===o}function K(j){return x(j)===i}function Z(j){return x(j)===d}ze.AsyncMode=_,ze.ConcurrentMode=E,ze.ContextConsumer=C,ze.ContextProvider=D,ze.Element=A,ze.ForwardRef=R,ze.Fragment=T,ze.Lazy=O,ze.Memo=N,ze.Portal=M,ze.Profiler=I,ze.StrictMode=L,ze.Suspense=$,ze.isAsyncMode=W,ze.isConcurrentMode=B,ze.isContextConsumer=X,ze.isContextProvider=q,ze.isElement=re,ze.isForwardRef=J,ze.isFragment=ee,ze.isLazy=ie,ze.isMemo=ae,ze.isPortal=ce,ze.isProfiler=U,ze.isStrictMode=K,ze.isSuspense=Z,ze.isValidElementType=w,ze.typeOf=x})()),ze}var Lx;function A2(){return Lx||(Lx=1,process.env.NODE_ENV==="production"?Pu.exports=iR():Pu.exports=oR()),Pu.exports}/*
44
+ */var Ix;function oR(){return Ix||(Ix=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,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function w(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===o||j===i||j===d||j===f||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===p||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===g||j.$$typeof===y||j.$$typeof===S||j.$$typeof===h)}function x(j){if(typeof j=="object"&&j!==null){var me=j.$$typeof;switch(me){case t:var te=j.type;switch(te){case l:case c:case r:case o:case i:case d:return te;default:var ge=te&&te.$$typeof;switch(ge){case s:case u:case m:case p:case a:return ge;default:return me}}case n:return me}}}var _=l,E=c,C=s,D=a,A=t,R=u,T=r,O=m,N=p,M=n,I=o,L=i,$=d,V=!1;function W(j){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.")),B(j)||x(j)===l}function B(j){return x(j)===c}function X(j){return x(j)===s}function q(j){return x(j)===a}function re(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function J(j){return x(j)===u}function ee(j){return x(j)===r}function ie(j){return x(j)===m}function ae(j){return x(j)===p}function ce(j){return x(j)===n}function U(j){return x(j)===o}function K(j){return x(j)===i}function Z(j){return x(j)===d}ze.AsyncMode=_,ze.ConcurrentMode=E,ze.ContextConsumer=C,ze.ContextProvider=D,ze.Element=A,ze.ForwardRef=R,ze.Fragment=T,ze.Lazy=O,ze.Memo=N,ze.Portal=M,ze.Profiler=I,ze.StrictMode=L,ze.Suspense=$,ze.isAsyncMode=W,ze.isConcurrentMode=B,ze.isContextConsumer=X,ze.isContextProvider=q,ze.isElement=re,ze.isForwardRef=J,ze.isFragment=ee,ze.isLazy=ie,ze.isMemo=ae,ze.isPortal=ce,ze.isProfiler=U,ze.isStrictMode=K,ze.isSuspense=Z,ze.isValidElementType=w,ze.typeOf=x})()),ze}var Lx;function AP(){return Lx||(Lx=1,process.env.NODE_ENV==="production"?Pu.exports=iR():Pu.exports=oR()),Pu.exports}/*
45
45
  object-assign
46
46
  (c) Sindre Sorhus
47
47
  @license MIT
48
- */var Eh,Fx;function aR(){if(Fx)return Eh;Fx=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 Eh=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},Eh}var Oh,$x;function py(){if($x)return Oh;$x=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Oh=e,Oh}var Ph,Bx;function M2(){return Bx||(Bx=1,Ph=Function.call.bind(Object.prototype.hasOwnProperty)),Ph}var Ch,Wx;function sR(){if(Wx)return Ch;Wx=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=py(),n={},r=M2();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={})},Ch=i,Ch}var kh,zx;function lR(){if(zx)return kh;zx=1;var e=A2(),t=aR(),n=py(),r=M2(),i=sR(),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 kh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(B){var X=B&&(c&&B[c]||B[u]);if(typeof X=="function")return X}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:S(),arrayOf:w,element:x(),elementType:_(),instanceOf:E,node:R(),objectOf:D,oneOf:C,oneOfType:A,shape:O,exact:N};function m(B,X){return B===X?B!==0||1/B===1/X:B!==B&&X!==X}function h(B,X){this.message=B,this.data=X&&typeof X=="object"?X:{},this.stack=""}h.prototype=Error.prototype;function g(B){if(process.env.NODE_ENV!=="production")var X={},q=0;function re(ee,ie,ae,ce,U,K,Z){if(ce=ce||f,K=K||ae,Z!==n){if(l){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=ce+":"+ae;!X[me]&&q<3&&(o("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+ce+"`. 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."),X[me]=!0,q++)}}return ie[ae]==null?ee?ie[ae]===null?new h("The "+U+" `"+K+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new h("The "+U+" `"+K+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:B(ie,ae,ce,U,K)}var J=re.bind(null,!1);return J.isRequired=re.bind(null,!0),J}function y(B){function X(q,re,J,ee,ie,ae){var ce=q[re],U=L(ce);if(U!==B){var K=$(ce);return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return g(X)}function S(){return g(a)}function w(B){function X(q,re,J,ee,ie){if(typeof B!="function")return new h("Property `"+ie+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var ae=q[re];if(!Array.isArray(ae)){var ce=L(ae);return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+J+"`, expected an array."))}for(var U=0;U<ae.length;U++){var K=B(ae,U,J,ee,ie+"["+U+"]",n);if(K instanceof Error)return K}return null}return g(X)}function x(){function B(X,q,re,J,ee){var ie=X[q];if(!s(ie)){var ae=L(ie);return new h("Invalid "+J+" `"+ee+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return g(B)}function _(){function B(X,q,re,J,ee){var ie=X[q];if(!e.isValidElementType(ie)){var ae=L(ie);return new h("Invalid "+J+" `"+ee+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return g(B)}function E(B){function X(q,re,J,ee,ie){if(!(q[re]instanceof B)){var ae=B.name||f,ce=W(q[re]);return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+J+"`, expected ")+("instance of `"+ae+"`."))}return null}return g(X)}function C(B){if(!Array.isArray(B))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 X(q,re,J,ee,ie){for(var ae=q[re],ce=0;ce<B.length;ce++)if(m(ae,B[ce]))return null;var U=JSON.stringify(B,function(Z,j){var me=$(j);return me==="symbol"?String(j):j});return new h("Invalid "+ee+" `"+ie+"` of value `"+String(ae)+"` "+("supplied to `"+J+"`, expected one of "+U+"."))}return g(X)}function D(B){function X(q,re,J,ee,ie){if(typeof B!="function")return new h("Property `"+ie+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var ae=q[re],ce=L(ae);if(ce!=="object")return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+J+"`, expected an object."));for(var U in ae)if(r(ae,U)){var K=B(ae,U,J,ee,ie+"."+U,n);if(K instanceof Error)return K}return null}return g(X)}function A(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var X=0;X<B.length;X++){var q=B[X];if(typeof q!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(q)+" at index "+X+"."),a}function re(J,ee,ie,ae,ce){for(var U=[],K=0;K<B.length;K++){var Z=B[K],j=Z(J,ee,ie,ae,ce,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&U.push(j.data.expectedType)}var me=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new h("Invalid "+ae+" `"+ce+"` supplied to "+("`"+ie+"`"+me+"."))}return g(re)}function R(){function B(X,q,re,J,ee){return M(X[q])?null:new h("Invalid "+J+" `"+ee+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return g(B)}function T(B,X,q,re,J){return new h((B||"React class")+": "+X+" type `"+q+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function O(B){function X(q,re,J,ee,ie){var ae=q[re],ce=L(ae);if(ce!=="object")return new h("Invalid "+ee+" `"+ie+"` of type `"+ce+"` "+("supplied to `"+J+"`, expected `object`."));for(var U in B){var K=B[U];if(typeof K!="function")return T(J,ee,ie,U,$(K));var Z=K(ae,U,J,ee,ie+"."+U,n);if(Z)return Z}return null}return g(X)}function N(B){function X(q,re,J,ee,ie){var ae=q[re],ce=L(ae);if(ce!=="object")return new h("Invalid "+ee+" `"+ie+"` of type `"+ce+"` "+("supplied to `"+J+"`, expected `object`."));var U=t({},q[re],B);for(var K in U){var Z=B[K];if(r(B,K)&&typeof Z!="function")return T(J,ee,ie,K,$(Z));if(!Z)return new h("Invalid "+ee+" `"+ie+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(q[re],null," ")+`
49
- Valid keys: `+JSON.stringify(Object.keys(B),null," "));var j=Z(ae,K,J,ee,ie+"."+K,n);if(j)return j}return null}return g(X)}function M(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(M);if(B===null||s(B))return!0;var X=d(B);if(X){var q=X.call(B),re;if(X!==B.entries){for(;!(re=q.next()).done;)if(!M(re.value))return!1}else for(;!(re=q.next()).done;){var J=re.value;if(J&&!M(J[1]))return!1}}else return!1;return!0;default:return!1}}function I(B,X){return B==="symbol"?!0:X?X["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&X instanceof Symbol:!1}function L(B){var X=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":I(X,B)?"symbol":X}function $(B){if(typeof B>"u"||B===null)return""+B;var X=L(B);if(X==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return X}function V(B){var X=$(B);switch(X){case"array":case"object":return"an "+X;case"boolean":case"date":case"regexp":return"a "+X;default:return X}}function W(B){return!B.constructor||!B.constructor.name?f:B.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},kh}var Dh,Vx;function cR(){if(Vx)return Dh;Vx=1;var e=py();function t(){}function n(){}return n.resetWarningCache=t,Dh=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},Dh}var Hx;function uR(){if(Hx)return Ou.exports;if(Hx=1,process.env.NODE_ENV!=="production"){var e=A2(),t=!0;Ou.exports=lR()(e.isElement,t)}else Ou.exports=cR()();return Ou.exports}var dR=uR();const v=Zi(dR);function N2(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=N2(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function oe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=N2(e))&&(r&&(r+=" "),r+=t);return r}function _n(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 Cu={exports:{}},Je={};/**
48
+ */var Eh,Fx;function aR(){if(Fx)return Eh;Fx=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 Eh=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},Eh}var Oh,$x;function py(){if($x)return Oh;$x=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Oh=e,Oh}var Ph,Bx;function MP(){return Bx||(Bx=1,Ph=Function.call.bind(Object.prototype.hasOwnProperty)),Ph}var Ch,Wx;function sR(){if(Wx)return Ch;Wx=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=py(),n={},r=MP();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={})},Ch=i,Ch}var kh,zx;function lR(){if(zx)return kh;zx=1;var e=AP(),t=aR(),n=py(),r=MP(),i=sR(),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 kh=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(B){var X=B&&(c&&B[c]||B[u]);if(typeof X=="function")return X}var f="<<anonymous>>",p={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:S(),arrayOf:w,element:x(),elementType:_(),instanceOf:E,node:R(),objectOf:D,oneOf:C,oneOfType:A,shape:O,exact:N};function m(B,X){return B===X?B!==0||1/B===1/X:B!==B&&X!==X}function h(B,X){this.message=B,this.data=X&&typeof X=="object"?X:{},this.stack=""}h.prototype=Error.prototype;function g(B){if(process.env.NODE_ENV!=="production")var X={},q=0;function re(ee,ie,ae,ce,U,K,Z){if(ce=ce||f,K=K||ae,Z!==n){if(l){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var me=ce+":"+ae;!X[me]&&q<3&&(o("You are manually calling a React.PropTypes validation function for the `"+K+"` prop on `"+ce+"`. 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."),X[me]=!0,q++)}}return ie[ae]==null?ee?ie[ae]===null?new h("The "+U+" `"+K+"` is marked as required "+("in `"+ce+"`, but its value is `null`.")):new h("The "+U+" `"+K+"` is marked as required in "+("`"+ce+"`, but its value is `undefined`.")):null:B(ie,ae,ce,U,K)}var J=re.bind(null,!1);return J.isRequired=re.bind(null,!0),J}function y(B){function X(q,re,J,ee,ie,ae){var ce=q[re],U=L(ce);if(U!==B){var K=$(ce);return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+K+"` supplied to `"+J+"`, expected ")+("`"+B+"`."),{expectedType:B})}return null}return g(X)}function S(){return g(a)}function w(B){function X(q,re,J,ee,ie){if(typeof B!="function")return new h("Property `"+ie+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var ae=q[re];if(!Array.isArray(ae)){var ce=L(ae);return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+J+"`, expected an array."))}for(var U=0;U<ae.length;U++){var K=B(ae,U,J,ee,ie+"["+U+"]",n);if(K instanceof Error)return K}return null}return g(X)}function x(){function B(X,q,re,J,ee){var ie=X[q];if(!s(ie)){var ae=L(ie);return new h("Invalid "+J+" `"+ee+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return g(B)}function _(){function B(X,q,re,J,ee){var ie=X[q];if(!e.isValidElementType(ie)){var ae=L(ie);return new h("Invalid "+J+" `"+ee+"` of type "+("`"+ae+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return g(B)}function E(B){function X(q,re,J,ee,ie){if(!(q[re]instanceof B)){var ae=B.name||f,ce=W(q[re]);return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+J+"`, expected ")+("instance of `"+ae+"`."))}return null}return g(X)}function C(B){if(!Array.isArray(B))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 X(q,re,J,ee,ie){for(var ae=q[re],ce=0;ce<B.length;ce++)if(m(ae,B[ce]))return null;var U=JSON.stringify(B,function(Z,j){var me=$(j);return me==="symbol"?String(j):j});return new h("Invalid "+ee+" `"+ie+"` of value `"+String(ae)+"` "+("supplied to `"+J+"`, expected one of "+U+"."))}return g(X)}function D(B){function X(q,re,J,ee,ie){if(typeof B!="function")return new h("Property `"+ie+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var ae=q[re],ce=L(ae);if(ce!=="object")return new h("Invalid "+ee+" `"+ie+"` of type "+("`"+ce+"` supplied to `"+J+"`, expected an object."));for(var U in ae)if(r(ae,U)){var K=B(ae,U,J,ee,ie+"."+U,n);if(K instanceof Error)return K}return null}return g(X)}function A(B){if(!Array.isArray(B))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var X=0;X<B.length;X++){var q=B[X];if(typeof q!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+V(q)+" at index "+X+"."),a}function re(J,ee,ie,ae,ce){for(var U=[],K=0;K<B.length;K++){var Z=B[K],j=Z(J,ee,ie,ae,ce,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&U.push(j.data.expectedType)}var me=U.length>0?", expected one of type ["+U.join(", ")+"]":"";return new h("Invalid "+ae+" `"+ce+"` supplied to "+("`"+ie+"`"+me+"."))}return g(re)}function R(){function B(X,q,re,J,ee){return M(X[q])?null:new h("Invalid "+J+" `"+ee+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return g(B)}function T(B,X,q,re,J){return new h((B||"React class")+": "+X+" type `"+q+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function O(B){function X(q,re,J,ee,ie){var ae=q[re],ce=L(ae);if(ce!=="object")return new h("Invalid "+ee+" `"+ie+"` of type `"+ce+"` "+("supplied to `"+J+"`, expected `object`."));for(var U in B){var K=B[U];if(typeof K!="function")return T(J,ee,ie,U,$(K));var Z=K(ae,U,J,ee,ie+"."+U,n);if(Z)return Z}return null}return g(X)}function N(B){function X(q,re,J,ee,ie){var ae=q[re],ce=L(ae);if(ce!=="object")return new h("Invalid "+ee+" `"+ie+"` of type `"+ce+"` "+("supplied to `"+J+"`, expected `object`."));var U=t({},q[re],B);for(var K in U){var Z=B[K];if(r(B,K)&&typeof Z!="function")return T(J,ee,ie,K,$(Z));if(!Z)return new h("Invalid "+ee+" `"+ie+"` key `"+K+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(q[re],null," ")+`
49
+ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var j=Z(ae,K,J,ee,ie+"."+K,n);if(j)return j}return null}return g(X)}function M(B){switch(typeof B){case"number":case"string":case"undefined":return!0;case"boolean":return!B;case"object":if(Array.isArray(B))return B.every(M);if(B===null||s(B))return!0;var X=d(B);if(X){var q=X.call(B),re;if(X!==B.entries){for(;!(re=q.next()).done;)if(!M(re.value))return!1}else for(;!(re=q.next()).done;){var J=re.value;if(J&&!M(J[1]))return!1}}else return!1;return!0;default:return!1}}function I(B,X){return B==="symbol"?!0:X?X["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&X instanceof Symbol:!1}function L(B){var X=typeof B;return Array.isArray(B)?"array":B instanceof RegExp?"object":I(X,B)?"symbol":X}function $(B){if(typeof B>"u"||B===null)return""+B;var X=L(B);if(X==="object"){if(B instanceof Date)return"date";if(B instanceof RegExp)return"regexp"}return X}function V(B){var X=$(B);switch(X){case"array":case"object":return"an "+X;case"boolean":case"date":case"regexp":return"a "+X;default:return X}}function W(B){return!B.constructor||!B.constructor.name?f:B.constructor.name}return p.checkPropTypes=i,p.resetWarningCache=i.resetWarningCache,p.PropTypes=p,p},kh}var Dh,Vx;function cR(){if(Vx)return Dh;Vx=1;var e=py();function t(){}function n(){}return n.resetWarningCache=t,Dh=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},Dh}var Hx;function uR(){if(Hx)return Ou.exports;if(Hx=1,process.env.NODE_ENV!=="production"){var e=AP(),t=!0;Ou.exports=lR()(e.isElement,t)}else Ou.exports=cR()();return Ou.exports}var dR=uR();const v=Zi(dR);function NP(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=NP(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function oe(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=NP(e))&&(r&&(r+=" "),r+=t);return r}function _n(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 Cu={exports:{}},Je={};/**
50
50
  * @license React
51
51
  * react-is.production.js
52
52
  *
@@ -62,11 +62,11 @@ Valid keys: `+JSON.stringify(Object.keys(B),null," "));var j=Z(ae,K,J,ee,ie+"."
62
62
  *
63
63
  * This source code is licensed under the MIT license found in the
64
64
  * LICENSE file in the root directory of this source tree.
65
- */var Ux;function pR(){return Ux||(Ux=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(typeof h=="object"&&h!==null){var g=h.$$typeof;switch(g){case t:switch(h=h.type,h){case r:case o:case i:case c:case u:case p:return h;default:switch(h=h&&h.$$typeof,h){case s:case l:case f:case d:return h;case a:return h;default:return g}}case n:return g}}}var t=Symbol.for("react.transitional.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.consumer"),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.view_transition"),m=Symbol.for("react.client.reference");et.ContextConsumer=a,et.ContextProvider=s,et.Element=t,et.ForwardRef=l,et.Fragment=r,et.Lazy=f,et.Memo=d,et.Portal=n,et.Profiler=o,et.StrictMode=i,et.Suspense=c,et.SuspenseList=u,et.isContextConsumer=function(h){return e(h)===a},et.isContextProvider=function(h){return e(h)===s},et.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},et.isForwardRef=function(h){return e(h)===l},et.isFragment=function(h){return e(h)===r},et.isLazy=function(h){return e(h)===f},et.isMemo=function(h){return e(h)===d},et.isPortal=function(h){return e(h)===n},et.isProfiler=function(h){return e(h)===o},et.isStrictMode=function(h){return e(h)===i},et.isSuspense=function(h){return e(h)===c},et.isSuspenseList=function(h){return e(h)===u},et.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===o||h===i||h===c||h===u||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===s||h.$$typeof===a||h.$$typeof===l||h.$$typeof===m||h.getModuleId!==void 0)},et.typeOf=e})()),et}var Kx;function hR(){return Kx||(Kx=1,process.env.NODE_ENV==="production"?Cu.exports=fR():Cu.exports=pR()),Cu.exports}var Do=hR();function Ai(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function j2(e){if(P.isValidElement(e)||Do.isValidElementType(e)||!Ai(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=j2(e[n])}),t}function xn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Ai(e)&&Ai(t)&&Object.keys(t).forEach(i=>{P.isValidElement(t[i])||Do.isValidElementType(t[i])?r[i]=t[i]:Ai(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Ai(e[i])?r[i]=xn(e[i],t[i],n):n.clone?r[i]=Ai(t[i])?j2(t[i]):t[i]:r[i]=t[i]}),r}function Jl(e,t){return t?xn(e,t,{clone:!1}):e}const $o=process.env.NODE_ENV!=="production"?v.oneOfType([v.number,v.string,v.object,v.array]):{};function qx(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{const o=/min-width:\s*([0-9.]+)/;return+(r.match(o)?.[1]||0)-+(i.match(o)?.[1]||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},{...t}):t}function mR(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function gR(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
65
+ */var Ux;function pR(){return Ux||(Ux=1,process.env.NODE_ENV!=="production"&&(function(){function e(h){if(typeof h=="object"&&h!==null){var g=h.$$typeof;switch(g){case t:switch(h=h.type,h){case r:case o:case i:case c:case u:case p:return h;default:switch(h=h&&h.$$typeof,h){case s:case l:case f:case d:return h;case a:return h;default:return g}}case n:return g}}}var t=Symbol.for("react.transitional.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.consumer"),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.view_transition"),m=Symbol.for("react.client.reference");et.ContextConsumer=a,et.ContextProvider=s,et.Element=t,et.ForwardRef=l,et.Fragment=r,et.Lazy=f,et.Memo=d,et.Portal=n,et.Profiler=o,et.StrictMode=i,et.Suspense=c,et.SuspenseList=u,et.isContextConsumer=function(h){return e(h)===a},et.isContextProvider=function(h){return e(h)===s},et.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===t},et.isForwardRef=function(h){return e(h)===l},et.isFragment=function(h){return e(h)===r},et.isLazy=function(h){return e(h)===f},et.isMemo=function(h){return e(h)===d},et.isPortal=function(h){return e(h)===n},et.isProfiler=function(h){return e(h)===o},et.isStrictMode=function(h){return e(h)===i},et.isSuspense=function(h){return e(h)===c},et.isSuspenseList=function(h){return e(h)===u},et.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===r||h===o||h===i||h===c||h===u||typeof h=="object"&&h!==null&&(h.$$typeof===f||h.$$typeof===d||h.$$typeof===s||h.$$typeof===a||h.$$typeof===l||h.$$typeof===m||h.getModuleId!==void 0)},et.typeOf=e})()),et}var Kx;function hR(){return Kx||(Kx=1,process.env.NODE_ENV==="production"?Cu.exports=fR():Cu.exports=pR()),Cu.exports}var Do=hR();function Ai(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function jP(e){if(P.isValidElement(e)||Do.isValidElementType(e)||!Ai(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=jP(e[n])}),t}function xn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Ai(e)&&Ai(t)&&Object.keys(t).forEach(i=>{P.isValidElement(t[i])||Do.isValidElementType(t[i])?r[i]=t[i]:Ai(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&Ai(e[i])?r[i]=xn(e[i],t[i],n):n.clone?r[i]=Ai(t[i])?jP(t[i]):t[i]:r[i]=t[i]}),r}function Jl(e,t){return t?xn(e,t,{clone:!1}):e}const $o=process.env.NODE_ENV!=="production"?v.oneOfType([v.number,v.string,v.object,v.array]):{};function qx(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,i)=>{const o=/min-width:\s*([0-9.]+)/;return+(r.match(o)?.[1]||0)-+(i.match(o)?.[1]||0)});return n.length?n.reduce((r,i)=>{const o=t[i];return delete r[i],r[i]=o,r},{...t}):t}function mR(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function gR(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
66
66
  For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:fi(18,`(${t})`));return null}const[,r,i]=n,o=Number.isNaN(+r)?r||0:+r;return e.containerQueries(i).up(o)}function vR(e){const t=(o,a)=>o.replace("@media",a?`@container ${a}`:"@container");function n(o,a){o.up=(...s)=>t(e.breakpoints.up(...s),a),o.down=(...s)=>t(e.breakpoints.down(...s),a),o.between=(...s)=>t(e.breakpoints.between(...s),a),o.only=(...s)=>t(e.breakpoints.only(...s),a),o.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},i=o=>(n(r,o),r);return n(i),{...e,containerQueries:i}}const ip={xs:0,sm:600,md:900,lg:1200,xl:1536},Gx={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${ip[e]}px)`},yR={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:ip[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function zi(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||Gx;return t.reduce((a,s,l)=>(a[o.up(o.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const o=r.breakpoints||Gx;return Object.keys(t).reduce((a,s)=>{if(mR(o.keys,s)){const l=gR(r.containerQueries?r:yR,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(o.values||ip).includes(s)){const l=o.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function bR(e={}){return e.keys?.reduce((n,r)=>{const i=e.up(r);return n[i]={},n},{})||{}}function Xx(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function op(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function Wd(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=op(e,n)||r,t&&(i=t(i,r,e)),i}function jt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=op(l,r)||{};return zi(a,s,d=>{let f=Wd(c,i,d);return d===f&&typeof d=="string"&&(f=Wd(c,i,`${t}${d==="default"?"":on(d)}`,d)),n===!1?f:{[n]:f}})};return o.propTypes=process.env.NODE_ENV!=="production"?{[t]:$o}:{},o.filterProps=[t],o}function xR(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const wR={m:"margin",p:"padding"},_R={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Qx={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},SR=xR(e=>{if(e.length>2)if(Qx[e])e=Qx[e];else return[e];const[t,n]=e.split(""),r=wR[t],i=_R[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),ap=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],sp=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],ER=[...ap,...sp];function Hc(e,t,n,r){const i=op(e,t,!0)??n;return typeof i=="number"||typeof i=="string"?o=>typeof o=="string"?o:(process.env.NODE_ENV!=="production"&&typeof o!="number"&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${o}.`),typeof i=="string"?i.startsWith("var(")&&o===0?0:i.startsWith("var(")&&o===1?i:`calc(${o} * ${i})`:i*o):Array.isArray(i)?o=>{if(typeof o=="string")return o;const a=Math.abs(o);process.env.NODE_ENV!=="production"&&(Number.isInteger(a)?a>i.length-1&&console.error([`MUI: The value provided (${a}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${a} > ${i.length-1}, you need to add the missing values.`].join(`
67
67
  `)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
68
68
  `)));const s=i[a];return o>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
69
- `)),()=>{})}function hy(e){return Hc(e,"spacing",8,"spacing")}function Yc(e,t){return typeof t=="string"||t==null?t:e(t)}function OR(e,t){return n=>e.reduce((r,i)=>(r[i]=Yc(t,n),r),{})}function PR(e,t,n,r){if(!t.includes(n))return null;const i=SR(n),o=OR(i,r),a=e[n];return zi(e,a,o)}function R2(e,t){const n=hy(e.theme);return Object.keys(e).map(r=>PR(e,t,r,n)).reduce(Jl,{})}function _t(e){return R2(e,ap)}_t.propTypes=process.env.NODE_ENV!=="production"?ap.reduce((e,t)=>(e[t]=$o,e),{}):{};_t.filterProps=ap;function St(e){return R2(e,sp)}St.propTypes=process.env.NODE_ENV!=="production"?sp.reduce((e,t)=>(e[t]=$o,e),{}):{};St.filterProps=sp;process.env.NODE_ENV!=="production"&&ER.reduce((e,t)=>(e[t]=$o,e),{});function lp(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Jl(i,t[o](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function wr(e){return typeof e!="number"?e:`${e}px solid`}function Mr(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const CR=Mr("border",wr),kR=Mr("borderTop",wr),DR=Mr("borderRight",wr),TR=Mr("borderBottom",wr),AR=Mr("borderLeft",wr),MR=Mr("borderColor"),NR=Mr("borderTopColor"),jR=Mr("borderRightColor"),RR=Mr("borderBottomColor"),IR=Mr("borderLeftColor"),LR=Mr("outline",wr),FR=Mr("outlineColor"),cp=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Hc(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Yc(t,r)});return zi(e,e.borderRadius,n)}return null};cp.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:$o}:{};cp.filterProps=["borderRadius"];lp(CR,kR,DR,TR,AR,MR,NR,jR,RR,IR,cp,LR,FR);const up=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Hc(e.theme,"spacing",8,"gap"),n=r=>({gap:Yc(t,r)});return zi(e,e.gap,n)}return null};up.propTypes=process.env.NODE_ENV!=="production"?{gap:$o}:{};up.filterProps=["gap"];const dp=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Hc(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Yc(t,r)});return zi(e,e.columnGap,n)}return null};dp.propTypes=process.env.NODE_ENV!=="production"?{columnGap:$o}:{};dp.filterProps=["columnGap"];const fp=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Hc(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Yc(t,r)});return zi(e,e.rowGap,n)}return null};fp.propTypes=process.env.NODE_ENV!=="production"?{rowGap:$o}:{};fp.filterProps=["rowGap"];const $R=jt({prop:"gridColumn"}),BR=jt({prop:"gridRow"}),WR=jt({prop:"gridAutoFlow"}),zR=jt({prop:"gridAutoColumns"}),VR=jt({prop:"gridAutoRows"}),HR=jt({prop:"gridTemplateColumns"}),YR=jt({prop:"gridTemplateRows"}),UR=jt({prop:"gridTemplateAreas"}),KR=jt({prop:"gridArea"});lp(up,dp,fp,$R,BR,WR,zR,VR,HR,YR,UR,KR);function hs(e,t){return t==="grey"?t:e}const qR=jt({prop:"color",themeKey:"palette",transform:hs}),GR=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:hs}),XR=jt({prop:"backgroundColor",themeKey:"palette",transform:hs});lp(qR,GR,XR);function rr(e){return e<=1&&e!==0?`${e*100}%`:e}const QR=jt({prop:"width",transform:rr}),my=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||ip[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:rr(n)}};return zi(e,e.maxWidth,t)}return null};my.filterProps=["maxWidth"];const ZR=jt({prop:"minWidth",transform:rr}),JR=jt({prop:"height",transform:rr}),eI=jt({prop:"maxHeight",transform:rr}),tI=jt({prop:"minHeight",transform:rr});jt({prop:"size",cssProperty:"width",transform:rr});jt({prop:"size",cssProperty:"height",transform:rr});const nI=jt({prop:"boxSizing"});lp(QR,my,ZR,JR,eI,tI,nI);const pp={border:{themeKey:"borders",transform:wr},borderTop:{themeKey:"borders",transform:wr},borderRight:{themeKey:"borders",transform:wr},borderBottom:{themeKey:"borders",transform:wr},borderLeft:{themeKey:"borders",transform:wr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:cp},color:{themeKey:"palette",transform:hs},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:hs},backgroundColor:{themeKey:"palette",transform:hs},p:{style:St},pt:{style:St},pr:{style:St},pb:{style:St},pl:{style:St},px:{style:St},py:{style:St},padding:{style:St},paddingTop:{style:St},paddingRight:{style:St},paddingBottom:{style:St},paddingLeft:{style:St},paddingX:{style:St},paddingY:{style:St},paddingInline:{style:St},paddingInlineStart:{style:St},paddingInlineEnd:{style:St},paddingBlock:{style:St},paddingBlockStart:{style:St},paddingBlockEnd:{style:St},m:{style:_t},mt:{style:_t},mr:{style:_t},mb:{style:_t},ml:{style:_t},mx:{style:_t},my:{style:_t},margin:{style:_t},marginTop:{style:_t},marginRight:{style:_t},marginBottom:{style:_t},marginLeft:{style:_t},marginX:{style:_t},marginY:{style:_t},marginInline:{style:_t},marginInlineStart:{style:_t},marginInlineEnd:{style:_t},marginBlock:{style:_t},marginBlockStart:{style:_t},marginBlockEnd:{style:_t},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:up},rowGap:{style:fp},columnGap:{style:dp},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:rr},maxWidth:{style:my},minWidth:{transform:rr},height:{transform:rr},maxHeight:{transform:rr},minHeight:{transform:rr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function rI(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function iI(e,t){return typeof e=="function"?e(t):e}function oI(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=op(i,c)||{};return d?d(a):zi(a,r,m=>{let h=Wd(f,u,m);return m===h&&typeof m=="string"&&(h=Wd(f,u,`${n}${m==="default"?"":on(m)}`,m)),l===!1?h:{[l]:h}})}function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const a=i.unstable_sxConfig??pp;function s(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=bR(i.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const m=iI(c[p],i);if(m!=null)if(typeof m=="object")if(a[p])f=Jl(f,e(p,m,i,a));else{const h=zi({theme:i},m,g=>({[p]:g}));rI(h,m)?f[p]=t({sx:m,theme:i,nested:!0}):f=Jl(f,h)}else f=Jl(f,e(p,m,i,a))}),!o&&i.modularCssLayers?{"@layer sx":qx(i,Xx(d,f))}:qx(i,Xx(d,f))}return Array.isArray(r)?r.map(s):s(r)}return t}const _s=oI();_s.filterProps=["sx"];function Wg(){return Wg=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},Wg.apply(null,arguments)}function aI(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function sI(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var lI=(function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(sI(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=aI(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e})(),pn="-ms-",zd="-moz-",je="-webkit-",I2="comm",gy="rule",vy="decl",cI="@import",L2="@keyframes",uI="@layer",dI=Math.abs,hp=String.fromCharCode,fI=Object.assign;function pI(e,t){return rn(e,0)^45?(((t<<2^rn(e,0))<<2^rn(e,1))<<2^rn(e,2))<<2^rn(e,3):0}function F2(e){return e.trim()}function hI(e,t){return(e=t.exec(e))?e[0]:e}function Re(e,t,n){return e.replace(t,n)}function zg(e,t){return e.indexOf(t)}function rn(e,t){return e.charCodeAt(t)|0}function dc(e,t,n){return e.slice(t,n)}function Qr(e){return e.length}function yy(e){return e.length}function ku(e,t){return t.push(e),e}function mI(e,t){return e.map(t).join("")}var mp=1,Ss=1,$2=0,qn=0,Ft=0,Us="";function gp(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:mp,column:Ss,length:a,return:""}}function gl(e,t){return fI(gp("",null,null,"",null,null,0),e,{length:-e.length},t)}function gI(){return Ft}function vI(){return Ft=qn>0?rn(Us,--qn):0,Ss--,Ft===10&&(Ss=1,mp--),Ft}function ar(){return Ft=qn<$2?rn(Us,qn++):0,Ss++,Ft===10&&(Ss=1,mp++),Ft}function ai(){return rn(Us,qn)}function Cd(){return qn}function Uc(e,t){return dc(Us,e,t)}function fc(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function B2(e){return mp=Ss=1,$2=Qr(Us=e),qn=0,[]}function W2(e){return Us="",e}function kd(e){return F2(Uc(qn-1,Vg(e===91?e+2:e===40?e+1:e)))}function yI(e){for(;(Ft=ai())&&Ft<33;)ar();return fc(e)>2||fc(Ft)>3?"":" "}function bI(e,t){for(;--t&&ar()&&!(Ft<48||Ft>102||Ft>57&&Ft<65||Ft>70&&Ft<97););return Uc(e,Cd()+(t<6&&ai()==32&&ar()==32))}function Vg(e){for(;ar();)switch(Ft){case e:return qn;case 34:case 39:e!==34&&e!==39&&Vg(Ft);break;case 40:e===41&&Vg(e);break;case 92:ar();break}return qn}function xI(e,t){for(;ar()&&e+Ft!==57;)if(e+Ft===84&&ai()===47)break;return"/*"+Uc(t,qn-1)+"*"+hp(e===47?e:ar())}function wI(e){for(;!fc(ai());)ar();return Uc(e,qn)}function _I(e){return W2(Dd("",null,null,null,[""],e=B2(e),0,[0],e))}function Dd(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,h=1,g=1,y=1,S=0,w="",x=i,_=o,E=r,C=w;g;)switch(m=S,S=ar()){case 40:if(m!=108&&rn(C,d-1)==58){zg(C+=Re(kd(S),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=kd(S);break;case 9:case 10:case 13:case 32:C+=yI(m);break;case 92:C+=bI(Cd()-1,7);continue;case 47:switch(ai()){case 42:case 47:ku(SI(xI(ar(),Cd()),t,n),l);break;default:C+="/"}break;case 123*h:s[c++]=Qr(C)*y;case 125*h:case 59:case 0:switch(S){case 0:case 125:g=0;case 59+u:y==-1&&(C=Re(C,/\f/g,"")),p>0&&Qr(C)-d&&ku(p>32?Jx(C+";",r,n,d-1):Jx(Re(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(ku(E=Zx(C,t,n,c,u,i,s,w,x=[],_=[],d),o),S===123)if(u===0)Dd(C,t,E,E,x,o,d,s,_);else switch(f===99&&rn(C,3)===110?100:f){case 100:case 108:case 109:case 115:Dd(e,E,E,r&&ku(Zx(e,E,E,0,0,i,s,w,i,x=[],d),_),i,_,d,s,r?x:_);break;default:Dd(C,E,E,E,[""],_,0,s,_)}}c=u=p=0,h=y=1,w=C="",d=a;break;case 58:d=1+Qr(C),p=m;default:if(h<1){if(S==123)--h;else if(S==125&&h++==0&&vI()==125)continue}switch(C+=hp(S),S*h){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(Qr(C)-1)*y,y=1;break;case 64:ai()===45&&(C+=kd(ar())),f=ai(),u=d=Qr(w=C+=wI(Cd())),S++;break;case 45:m===45&&Qr(C)==2&&(h=0)}}return o}function Zx(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=i===0?o:[""],p=yy(f),m=0,h=0,g=0;m<r;++m)for(var y=0,S=dc(e,d+1,d=dI(h=a[m])),w=e;y<p;++y)(w=F2(h>0?f[y]+" "+S:Re(S,/&\f/g,f[y])))&&(l[g++]=w);return gp(e,t,n,i===0?gy:s,l,c,u)}function SI(e,t,n){return gp(e,t,n,I2,hp(gI()),dc(e,2,-2),0)}function Jx(e,t,n,r){return gp(e,t,n,vy,dc(e,0,r),dc(e,r+1,-1),r)}function ms(e,t){for(var n="",r=yy(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function EI(e,t,n,r){switch(e.type){case uI:if(e.children.length)break;case cI:case vy:return e.return=e.return||e.value;case I2:return"";case L2:return e.return=e.value+"{"+ms(e.children,r)+"}";case gy:e.value=e.props.join(",")}return Qr(n=ms(e.children,r))?e.return=e.value+"{"+n+"}":""}function OI(e){var t=yy(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function PI(e){return function(t){t.root||(t=t.return)&&e(t)}}function z2(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var CI=function(t,n,r){for(var i=0,o=0;i=o,o=ai(),i===38&&o===12&&(n[r]=1),!fc(o);)ar();return Uc(t,qn)},kI=function(t,n){var r=-1,i=44;do switch(fc(i)){case 0:i===38&&ai()===12&&(n[r]=1),t[r]+=CI(qn-1,n,r);break;case 2:t[r]+=kd(i);break;case 4:if(i===44){t[++r]=ai()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=hp(i)}while(i=ar());return t},DI=function(t,n){return W2(kI(B2(t),n))},e1=new WeakMap,TI=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!e1.get(r))&&!i){e1.set(t,!0);for(var o=[],a=DI(n,o),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=o[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},AI=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function V2(e,t){switch(pI(e,t)){case 5103:return je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return je+e+zd+e+pn+e+e;case 6828:case 4268:return je+e+pn+e+e;case 6165:return je+e+pn+"flex-"+e+e;case 5187:return je+e+Re(e,/(\w+).+(:[^]+)/,je+"box-$1$2"+pn+"flex-$1$2")+e;case 5443:return je+e+pn+"flex-item-"+Re(e,/flex-|-self/,"")+e;case 4675:return je+e+pn+"flex-line-pack"+Re(e,/align-content|flex-|-self/,"")+e;case 5548:return je+e+pn+Re(e,"shrink","negative")+e;case 5292:return je+e+pn+Re(e,"basis","preferred-size")+e;case 6060:return je+"box-"+Re(e,"-grow","")+je+e+pn+Re(e,"grow","positive")+e;case 4554:return je+Re(e,/([^-])(transform)/g,"$1"+je+"$2")+e;case 6187:return Re(Re(Re(e,/(zoom-|grab)/,je+"$1"),/(image-set)/,je+"$1"),e,"")+e;case 5495:case 3959:return Re(e,/(image-set\([^]*)/,je+"$1$`$1");case 4968:return Re(Re(e,/(.+:)(flex-)?(.*)/,je+"box-pack:$3"+pn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+je+e+e;case 4095:case 3583:case 4068:case 2532:return Re(e,/(.+)-inline(.+)/,je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Qr(e)-1-t>6)switch(rn(e,t+1)){case 109:if(rn(e,t+4)!==45)break;case 102:return Re(e,/(.+:)(.+)-([^]+)/,"$1"+je+"$2-$3$1"+zd+(rn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~zg(e,"stretch")?V2(Re(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(rn(e,t+1)!==115)break;case 6444:switch(rn(e,Qr(e)-3-(~zg(e,"!important")&&10))){case 107:return Re(e,":",":"+je)+e;case 101:return Re(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+je+(rn(e,14)===45?"inline-":"")+"box$3$1"+je+"$2$3$1"+pn+"$2box$3")+e}break;case 5936:switch(rn(e,t+11)){case 114:return je+e+pn+Re(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return je+e+pn+Re(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return je+e+pn+Re(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return je+e+pn+e+e}return e}var MI=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case vy:t.return=V2(t.value,t.length);break;case L2:return ms([gl(t,{value:Re(t.value,"@","@"+je)})],i);case gy:if(t.length)return mI(t.props,function(o){switch(hI(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ms([gl(t,{props:[Re(o,/:(read-\w+)/,":"+zd+"$1")]})],i);case"::placeholder":return ms([gl(t,{props:[Re(o,/:(plac\w+)/,":"+je+"input-$1")]}),gl(t,{props:[Re(o,/:(plac\w+)/,":"+zd+"$1")]}),gl(t,{props:[Re(o,/:(plac\w+)/,pn+"input-$1")]})],i)}return""})}},NI=[MI],jI=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||NI,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),y=1;y<g.length;y++)o[g[y]]=!0;s.push(h)});var l,c=[TI,AI];{var u,d=[EI,PI(function(h){u.insert(h)})],f=OI(c.concat(i,d)),p=function(g){return ms(_I(g),f)};l=function(g,y,S,w){u=S,p(g?g+"{"+y.styles+"}":y.styles),w&&(m.inserted[y.name]=!0)}}var m={key:n,sheet:new lI({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m},Du={exports:{}},Ve={};/** @license React v16.13.1
69
+ `)),()=>{})}function hy(e){return Hc(e,"spacing",8,"spacing")}function Yc(e,t){return typeof t=="string"||t==null?t:e(t)}function OR(e,t){return n=>e.reduce((r,i)=>(r[i]=Yc(t,n),r),{})}function PR(e,t,n,r){if(!t.includes(n))return null;const i=SR(n),o=OR(i,r),a=e[n];return zi(e,a,o)}function RP(e,t){const n=hy(e.theme);return Object.keys(e).map(r=>PR(e,t,r,n)).reduce(Jl,{})}function _t(e){return RP(e,ap)}_t.propTypes=process.env.NODE_ENV!=="production"?ap.reduce((e,t)=>(e[t]=$o,e),{}):{};_t.filterProps=ap;function St(e){return RP(e,sp)}St.propTypes=process.env.NODE_ENV!=="production"?sp.reduce((e,t)=>(e[t]=$o,e),{}):{};St.filterProps=sp;process.env.NODE_ENV!=="production"&&ER.reduce((e,t)=>(e[t]=$o,e),{});function lp(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Jl(i,t[o](r)):i,{});return n.propTypes=process.env.NODE_ENV!=="production"?e.reduce((r,i)=>Object.assign(r,i.propTypes),{}):{},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function wr(e){return typeof e!="number"?e:`${e}px solid`}function Mr(e,t){return jt({prop:e,themeKey:"borders",transform:t})}const CR=Mr("border",wr),kR=Mr("borderTop",wr),DR=Mr("borderRight",wr),TR=Mr("borderBottom",wr),AR=Mr("borderLeft",wr),MR=Mr("borderColor"),NR=Mr("borderTopColor"),jR=Mr("borderRightColor"),RR=Mr("borderBottomColor"),IR=Mr("borderLeftColor"),LR=Mr("outline",wr),FR=Mr("outlineColor"),cp=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Hc(e.theme,"shape.borderRadius",4,"borderRadius"),n=r=>({borderRadius:Yc(t,r)});return zi(e,e.borderRadius,n)}return null};cp.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:$o}:{};cp.filterProps=["borderRadius"];lp(CR,kR,DR,TR,AR,MR,NR,jR,RR,IR,cp,LR,FR);const up=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Hc(e.theme,"spacing",8,"gap"),n=r=>({gap:Yc(t,r)});return zi(e,e.gap,n)}return null};up.propTypes=process.env.NODE_ENV!=="production"?{gap:$o}:{};up.filterProps=["gap"];const dp=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Hc(e.theme,"spacing",8,"columnGap"),n=r=>({columnGap:Yc(t,r)});return zi(e,e.columnGap,n)}return null};dp.propTypes=process.env.NODE_ENV!=="production"?{columnGap:$o}:{};dp.filterProps=["columnGap"];const fp=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Hc(e.theme,"spacing",8,"rowGap"),n=r=>({rowGap:Yc(t,r)});return zi(e,e.rowGap,n)}return null};fp.propTypes=process.env.NODE_ENV!=="production"?{rowGap:$o}:{};fp.filterProps=["rowGap"];const $R=jt({prop:"gridColumn"}),BR=jt({prop:"gridRow"}),WR=jt({prop:"gridAutoFlow"}),zR=jt({prop:"gridAutoColumns"}),VR=jt({prop:"gridAutoRows"}),HR=jt({prop:"gridTemplateColumns"}),YR=jt({prop:"gridTemplateRows"}),UR=jt({prop:"gridTemplateAreas"}),KR=jt({prop:"gridArea"});lp(up,dp,fp,$R,BR,WR,zR,VR,HR,YR,UR,KR);function hs(e,t){return t==="grey"?t:e}const qR=jt({prop:"color",themeKey:"palette",transform:hs}),GR=jt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:hs}),XR=jt({prop:"backgroundColor",themeKey:"palette",transform:hs});lp(qR,GR,XR);function rr(e){return e<=1&&e!==0?`${e*100}%`:e}const QR=jt({prop:"width",transform:rr}),my=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||ip[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:rr(n)}};return zi(e,e.maxWidth,t)}return null};my.filterProps=["maxWidth"];const ZR=jt({prop:"minWidth",transform:rr}),JR=jt({prop:"height",transform:rr}),eI=jt({prop:"maxHeight",transform:rr}),tI=jt({prop:"minHeight",transform:rr});jt({prop:"size",cssProperty:"width",transform:rr});jt({prop:"size",cssProperty:"height",transform:rr});const nI=jt({prop:"boxSizing"});lp(QR,my,ZR,JR,eI,tI,nI);const pp={border:{themeKey:"borders",transform:wr},borderTop:{themeKey:"borders",transform:wr},borderRight:{themeKey:"borders",transform:wr},borderBottom:{themeKey:"borders",transform:wr},borderLeft:{themeKey:"borders",transform:wr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:wr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:cp},color:{themeKey:"palette",transform:hs},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:hs},backgroundColor:{themeKey:"palette",transform:hs},p:{style:St},pt:{style:St},pr:{style:St},pb:{style:St},pl:{style:St},px:{style:St},py:{style:St},padding:{style:St},paddingTop:{style:St},paddingRight:{style:St},paddingBottom:{style:St},paddingLeft:{style:St},paddingX:{style:St},paddingY:{style:St},paddingInline:{style:St},paddingInlineStart:{style:St},paddingInlineEnd:{style:St},paddingBlock:{style:St},paddingBlockStart:{style:St},paddingBlockEnd:{style:St},m:{style:_t},mt:{style:_t},mr:{style:_t},mb:{style:_t},ml:{style:_t},mx:{style:_t},my:{style:_t},margin:{style:_t},marginTop:{style:_t},marginRight:{style:_t},marginBottom:{style:_t},marginLeft:{style:_t},marginX:{style:_t},marginY:{style:_t},marginInline:{style:_t},marginInlineStart:{style:_t},marginInlineEnd:{style:_t},marginBlock:{style:_t},marginBlockStart:{style:_t},marginBlockEnd:{style:_t},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:up},rowGap:{style:fp},columnGap:{style:dp},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:rr},maxWidth:{style:my},minWidth:{transform:rr},height:{transform:rr},maxHeight:{transform:rr},minHeight:{transform:rr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function rI(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function iI(e,t){return typeof e=="function"?e(t):e}function oI(){function e(n,r,i,o){const a={[n]:r,theme:i},s=o[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=op(i,c)||{};return d?d(a):zi(a,r,m=>{let h=Wd(f,u,m);return m===h&&typeof m=="string"&&(h=Wd(f,u,`${n}${m==="default"?"":on(m)}`,m)),l===!1?h:{[l]:h}})}function t(n){const{sx:r,theme:i={},nested:o}=n||{};if(!r)return null;const a=i.unstable_sxConfig??pp;function s(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=bR(i.breakpoints),d=Object.keys(u);let f=u;return Object.keys(c).forEach(p=>{const m=iI(c[p],i);if(m!=null)if(typeof m=="object")if(a[p])f=Jl(f,e(p,m,i,a));else{const h=zi({theme:i},m,g=>({[p]:g}));rI(h,m)?f[p]=t({sx:m,theme:i,nested:!0}):f=Jl(f,h)}else f=Jl(f,e(p,m,i,a))}),!o&&i.modularCssLayers?{"@layer sx":qx(i,Xx(d,f))}:qx(i,Xx(d,f))}return Array.isArray(r)?r.map(s):s(r)}return t}const _s=oI();_s.filterProps=["sx"];function Wg(){return Wg=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},Wg.apply(null,arguments)}function aI(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function sI(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var lI=(function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(sI(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=aI(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var i;return(i=r.parentNode)==null?void 0:i.removeChild(r)}),this.tags=[],this.ctr=0},e})(),pn="-ms-",zd="-moz-",je="-webkit-",IP="comm",gy="rule",vy="decl",cI="@import",LP="@keyframes",uI="@layer",dI=Math.abs,hp=String.fromCharCode,fI=Object.assign;function pI(e,t){return rn(e,0)^45?(((t<<2^rn(e,0))<<2^rn(e,1))<<2^rn(e,2))<<2^rn(e,3):0}function FP(e){return e.trim()}function hI(e,t){return(e=t.exec(e))?e[0]:e}function Re(e,t,n){return e.replace(t,n)}function zg(e,t){return e.indexOf(t)}function rn(e,t){return e.charCodeAt(t)|0}function dc(e,t,n){return e.slice(t,n)}function Qr(e){return e.length}function yy(e){return e.length}function ku(e,t){return t.push(e),e}function mI(e,t){return e.map(t).join("")}var mp=1,Ss=1,$P=0,qn=0,Ft=0,Us="";function gp(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:mp,column:Ss,length:a,return:""}}function gl(e,t){return fI(gp("",null,null,"",null,null,0),e,{length:-e.length},t)}function gI(){return Ft}function vI(){return Ft=qn>0?rn(Us,--qn):0,Ss--,Ft===10&&(Ss=1,mp--),Ft}function ar(){return Ft=qn<$P?rn(Us,qn++):0,Ss++,Ft===10&&(Ss=1,mp++),Ft}function ai(){return rn(Us,qn)}function Cd(){return qn}function Uc(e,t){return dc(Us,e,t)}function fc(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function BP(e){return mp=Ss=1,$P=Qr(Us=e),qn=0,[]}function WP(e){return Us="",e}function kd(e){return FP(Uc(qn-1,Vg(e===91?e+2:e===40?e+1:e)))}function yI(e){for(;(Ft=ai())&&Ft<33;)ar();return fc(e)>2||fc(Ft)>3?"":" "}function bI(e,t){for(;--t&&ar()&&!(Ft<48||Ft>102||Ft>57&&Ft<65||Ft>70&&Ft<97););return Uc(e,Cd()+(t<6&&ai()==32&&ar()==32))}function Vg(e){for(;ar();)switch(Ft){case e:return qn;case 34:case 39:e!==34&&e!==39&&Vg(Ft);break;case 40:e===41&&Vg(e);break;case 92:ar();break}return qn}function xI(e,t){for(;ar()&&e+Ft!==57;)if(e+Ft===84&&ai()===47)break;return"/*"+Uc(t,qn-1)+"*"+hp(e===47?e:ar())}function wI(e){for(;!fc(ai());)ar();return Uc(e,qn)}function _I(e){return WP(Dd("",null,null,null,[""],e=BP(e),0,[0],e))}function Dd(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,h=1,g=1,y=1,S=0,w="",x=i,_=o,E=r,C=w;g;)switch(m=S,S=ar()){case 40:if(m!=108&&rn(C,d-1)==58){zg(C+=Re(kd(S),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=kd(S);break;case 9:case 10:case 13:case 32:C+=yI(m);break;case 92:C+=bI(Cd()-1,7);continue;case 47:switch(ai()){case 42:case 47:ku(SI(xI(ar(),Cd()),t,n),l);break;default:C+="/"}break;case 123*h:s[c++]=Qr(C)*y;case 125*h:case 59:case 0:switch(S){case 0:case 125:g=0;case 59+u:y==-1&&(C=Re(C,/\f/g,"")),p>0&&Qr(C)-d&&ku(p>32?Jx(C+";",r,n,d-1):Jx(Re(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(ku(E=Zx(C,t,n,c,u,i,s,w,x=[],_=[],d),o),S===123)if(u===0)Dd(C,t,E,E,x,o,d,s,_);else switch(f===99&&rn(C,3)===110?100:f){case 100:case 108:case 109:case 115:Dd(e,E,E,r&&ku(Zx(e,E,E,0,0,i,s,w,i,x=[],d),_),i,_,d,s,r?x:_);break;default:Dd(C,E,E,E,[""],_,0,s,_)}}c=u=p=0,h=y=1,w=C="",d=a;break;case 58:d=1+Qr(C),p=m;default:if(h<1){if(S==123)--h;else if(S==125&&h++==0&&vI()==125)continue}switch(C+=hp(S),S*h){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(Qr(C)-1)*y,y=1;break;case 64:ai()===45&&(C+=kd(ar())),f=ai(),u=d=Qr(w=C+=wI(Cd())),S++;break;case 45:m===45&&Qr(C)==2&&(h=0)}}return o}function Zx(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=i===0?o:[""],p=yy(f),m=0,h=0,g=0;m<r;++m)for(var y=0,S=dc(e,d+1,d=dI(h=a[m])),w=e;y<p;++y)(w=FP(h>0?f[y]+" "+S:Re(S,/&\f/g,f[y])))&&(l[g++]=w);return gp(e,t,n,i===0?gy:s,l,c,u)}function SI(e,t,n){return gp(e,t,n,IP,hp(gI()),dc(e,2,-2),0)}function Jx(e,t,n,r){return gp(e,t,n,vy,dc(e,0,r),dc(e,r+1,-1),r)}function ms(e,t){for(var n="",r=yy(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function EI(e,t,n,r){switch(e.type){case uI:if(e.children.length)break;case cI:case vy:return e.return=e.return||e.value;case IP:return"";case LP:return e.return=e.value+"{"+ms(e.children,r)+"}";case gy:e.value=e.props.join(",")}return Qr(n=ms(e.children,r))?e.return=e.value+"{"+n+"}":""}function OI(e){var t=yy(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function PI(e){return function(t){t.root||(t=t.return)&&e(t)}}function zP(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var CI=function(t,n,r){for(var i=0,o=0;i=o,o=ai(),i===38&&o===12&&(n[r]=1),!fc(o);)ar();return Uc(t,qn)},kI=function(t,n){var r=-1,i=44;do switch(fc(i)){case 0:i===38&&ai()===12&&(n[r]=1),t[r]+=CI(qn-1,n,r);break;case 2:t[r]+=kd(i);break;case 4:if(i===44){t[++r]=ai()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=hp(i)}while(i=ar());return t},DI=function(t,n){return WP(kI(BP(t),n))},e1=new WeakMap,TI=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!e1.get(r))&&!i){e1.set(t,!0);for(var o=[],a=DI(n,o),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=o[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},AI=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function VP(e,t){switch(pI(e,t)){case 5103:return je+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return je+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return je+e+zd+e+pn+e+e;case 6828:case 4268:return je+e+pn+e+e;case 6165:return je+e+pn+"flex-"+e+e;case 5187:return je+e+Re(e,/(\w+).+(:[^]+)/,je+"box-$1$2"+pn+"flex-$1$2")+e;case 5443:return je+e+pn+"flex-item-"+Re(e,/flex-|-self/,"")+e;case 4675:return je+e+pn+"flex-line-pack"+Re(e,/align-content|flex-|-self/,"")+e;case 5548:return je+e+pn+Re(e,"shrink","negative")+e;case 5292:return je+e+pn+Re(e,"basis","preferred-size")+e;case 6060:return je+"box-"+Re(e,"-grow","")+je+e+pn+Re(e,"grow","positive")+e;case 4554:return je+Re(e,/([^-])(transform)/g,"$1"+je+"$2")+e;case 6187:return Re(Re(Re(e,/(zoom-|grab)/,je+"$1"),/(image-set)/,je+"$1"),e,"")+e;case 5495:case 3959:return Re(e,/(image-set\([^]*)/,je+"$1$`$1");case 4968:return Re(Re(e,/(.+:)(flex-)?(.*)/,je+"box-pack:$3"+pn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+je+e+e;case 4095:case 3583:case 4068:case 2532:return Re(e,/(.+)-inline(.+)/,je+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Qr(e)-1-t>6)switch(rn(e,t+1)){case 109:if(rn(e,t+4)!==45)break;case 102:return Re(e,/(.+:)(.+)-([^]+)/,"$1"+je+"$2-$3$1"+zd+(rn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~zg(e,"stretch")?VP(Re(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(rn(e,t+1)!==115)break;case 6444:switch(rn(e,Qr(e)-3-(~zg(e,"!important")&&10))){case 107:return Re(e,":",":"+je)+e;case 101:return Re(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+je+(rn(e,14)===45?"inline-":"")+"box$3$1"+je+"$2$3$1"+pn+"$2box$3")+e}break;case 5936:switch(rn(e,t+11)){case 114:return je+e+pn+Re(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return je+e+pn+Re(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return je+e+pn+Re(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return je+e+pn+e+e}return e}var MI=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case vy:t.return=VP(t.value,t.length);break;case LP:return ms([gl(t,{value:Re(t.value,"@","@"+je)})],i);case gy:if(t.length)return mI(t.props,function(o){switch(hI(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ms([gl(t,{props:[Re(o,/:(read-\w+)/,":"+zd+"$1")]})],i);case"::placeholder":return ms([gl(t,{props:[Re(o,/:(plac\w+)/,":"+je+"input-$1")]}),gl(t,{props:[Re(o,/:(plac\w+)/,":"+zd+"$1")]}),gl(t,{props:[Re(o,/:(plac\w+)/,pn+"input-$1")]})],i)}return""})}},NI=[MI],jI=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var i=t.stylisPlugins||NI,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),y=1;y<g.length;y++)o[g[y]]=!0;s.push(h)});var l,c=[TI,AI];{var u,d=[EI,PI(function(h){u.insert(h)})],f=OI(c.concat(i,d)),p=function(g){return ms(_I(g),f)};l=function(g,y,S,w){u=S,p(g?g+"{"+y.styles+"}":y.styles),w&&(m.inserted[y.name]=!0)}}var m={key:n,sheet:new lI({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m},Du={exports:{}},Ve={};/** @license React v16.13.1
70
70
  * react-is.production.min.js
71
71
  *
72
72
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -80,14 +80,14 @@ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:fi(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 n1;function II(){return n1||(n1=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,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function w(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===o||j===i||j===d||j===f||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===p||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===g||j.$$typeof===y||j.$$typeof===S||j.$$typeof===h)}function x(j){if(typeof j=="object"&&j!==null){var me=j.$$typeof;switch(me){case t:var te=j.type;switch(te){case l:case c:case r:case o:case i:case d:return te;default:var ge=te&&te.$$typeof;switch(ge){case s:case u:case m:case p:case a:return ge;default:return me}}case n:return me}}}var _=l,E=c,C=s,D=a,A=t,R=u,T=r,O=m,N=p,M=n,I=o,L=i,$=d,V=!1;function W(j){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.")),B(j)||x(j)===l}function B(j){return x(j)===c}function X(j){return x(j)===s}function q(j){return x(j)===a}function re(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function J(j){return x(j)===u}function ee(j){return x(j)===r}function ie(j){return x(j)===m}function ae(j){return x(j)===p}function ce(j){return x(j)===n}function U(j){return x(j)===o}function K(j){return x(j)===i}function Z(j){return x(j)===d}He.AsyncMode=_,He.ConcurrentMode=E,He.ContextConsumer=C,He.ContextProvider=D,He.Element=A,He.ForwardRef=R,He.Fragment=T,He.Lazy=O,He.Memo=N,He.Portal=M,He.Profiler=I,He.StrictMode=L,He.Suspense=$,He.isAsyncMode=W,He.isConcurrentMode=B,He.isContextConsumer=X,He.isContextProvider=q,He.isElement=re,He.isForwardRef=J,He.isFragment=ee,He.isLazy=ie,He.isMemo=ae,He.isPortal=ce,He.isProfiler=U,He.isStrictMode=K,He.isSuspense=Z,He.isValidElementType=w,He.typeOf=x})()),He}var r1;function LI(){return r1||(r1=1,process.env.NODE_ENV==="production"?Du.exports=RI():Du.exports=II()),Du.exports}var Th,i1;function FI(){if(i1)return Th;i1=1;var e=LI(),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,h,g){if(typeof h!="string"){if(f){var y=d(h);y&&y!==f&&p(m,y,g)}var S=l(h);c&&(S=S.concat(c(h)));for(var w=a(m),x=a(h),_=0;_<S.length;++_){var E=S[_];if(!n[E]&&!(g&&g[E])&&!(x&&x[E])&&!(w&&w[E])){var C=u(h,E);try{s(m,E,C)}catch{}}}}return m}return Th=p,Th}FI();var $I=!0;function H2(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var by=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||$I===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},xy=function(t,n,r){by(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 BI(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 WI={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},zI=/[A-Z]|^ms/g,VI=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Y2=function(t){return t.charCodeAt(1)===45},o1=function(t){return t!=null&&typeof t!="boolean"},Ah=z2(function(e){return Y2(e)?e:e.replace(zI,"-$&").toLowerCase()}),a1=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(VI,function(r,i,o){return Zr={name:i,styles:o,next:Zr},i})}return WI[t]!==1&&!Y2(t)&&typeof n=="number"&&n!==0?n+"px":n};function pc(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 Zr={name:i.name,styles:i.styles,next:Zr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Zr={name:a.name,styles:a.styles,next:Zr},a=a.next;var s=o.styles+";";return s}return HI(e,t,n)}case"function":{if(e!==void 0){var l=Zr,c=n(e);return Zr=l,pc(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function HI(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=pc(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]+"}":o1(s)&&(r+=Ah(o)+":"+a1(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++)o1(a[l])&&(r+=Ah(o)+":"+a1(o,a[l])+";");else{var c=pc(e,t,a);switch(o){case"animation":case"animationName":{r+=Ah(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var s1=/label:\s*([^\s;{]+)\s*(;|$)/g,Zr;function vp(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="";Zr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=pc(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=pc(n,t,e[s]),r){var l=o;i+=l[s]}s1.lastIndex=0;for(var c="",u;(u=s1.exec(i))!==null;)c+="-"+u[1];var d=BI(i)+c;return{name:d,styles:i,next:Zr}}var YI=function(t){return t()},U2=P.useInsertionEffect?P.useInsertionEffect:!1,K2=U2||YI,l1=U2||P.useLayoutEffect,q2=P.createContext(typeof HTMLElement<"u"?jI({key:"css"}):null);q2.Provider;var wy=function(t){return k.forwardRef(function(n,r){var i=k.useContext(q2);return t(n,i,r)})},yp=P.createContext({}),_y={}.hasOwnProperty,Hg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",UI=function(t,n){var r={};for(var i in n)_y.call(n,i)&&(r[i]=n[i]);return r[Hg]=t,r},KI=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return by(n,r,i),K2(function(){return xy(n,r,i)}),null},qI=wy(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Hg],o=[r],a="";typeof e.className=="string"?a=H2(t.registered,o,e.className):e.className!=null&&(a=e.className+" ");var s=vp(o,void 0,P.useContext(yp));a+=t.key+"-"+s.name;var l={};for(var c in e)_y.call(e,c)&&c!=="css"&&c!==Hg&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),P.createElement(P.Fragment,null,P.createElement(KI,{cache:t,serialized:s,isStringTag:typeof i=="string"}),P.createElement(i,l))}),GI=qI,c1=function(t,n){var r=arguments;if(n==null||!_y.call(n,"css"))return P.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=GI,o[1]=UI(t,n);for(var a=2;a<i;a++)o[a]=r[a];return P.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(c1||(c1={}));var XI=wy(function(e,t){var n=e.styles,r=vp([n],void 0,P.useContext(yp)),i=P.useRef();return l1(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]),l1(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&xy(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}),QI=/^((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)-.*))$/,ZI=z2(function(e){return QI.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JI=ZI,eL=function(t){return t!=="theme"},u1=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JI:eL},d1=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},tL=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return by(n,r,i),K2(function(){return xy(n,r,i)}),null},nL=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=d1(t,n,r),l=s||u1(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 h=wy(function(g,y,S){var w=c&&g.as||i,x="",_=[],E=g;if(g.theme==null){E={};for(var C in g)E[C]=g[C];E.theme=P.useContext(yp)}typeof g.className=="string"?x=H2(y.registered,_,g.className):g.className!=null&&(x=g.className+" ");var D=vp(d.concat(_),y.registered,E);x+=y.key+"-"+D.name,a!==void 0&&(x+=" "+a);var A=c&&s===void 0?u1(w):l,R={};for(var T in g)c&&T==="as"||A(T)&&(R[T]=g[T]);return R.className=x,S&&(R.ref=S),P.createElement(P.Fragment,null,P.createElement(tL,{cache:y,serialized:D,isStringTag:typeof w=="string"}),P.createElement(w,R))});return h.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return"."+a}}),h.withComponent=function(g,y){var S=e(g,Wg({},n,y,{shouldForwardProp:d1(h,y,!0)}));return S.apply(void 0,d)},h}},rL=["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"],Vd=nL.bind(null);rL.forEach(function(e){Vd[e]=Vd(e)});function iL(e){return e==null||Object.keys(e).length===0}function G2(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?i=>t(iL(i)?n:i):t;return b.jsx(XI,{styles:r})}process.env.NODE_ENV!=="production"&&(G2.propTypes={defaultTheme:v.object,styles:v.oneOfType([v.array,v.string,v.object,v.func])});/**
83
+ */var n1;function II(){return n1||(n1=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,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function w(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===o||j===i||j===d||j===f||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===p||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===g||j.$$typeof===y||j.$$typeof===S||j.$$typeof===h)}function x(j){if(typeof j=="object"&&j!==null){var me=j.$$typeof;switch(me){case t:var te=j.type;switch(te){case l:case c:case r:case o:case i:case d:return te;default:var ge=te&&te.$$typeof;switch(ge){case s:case u:case m:case p:case a:return ge;default:return me}}case n:return me}}}var _=l,E=c,C=s,D=a,A=t,R=u,T=r,O=m,N=p,M=n,I=o,L=i,$=d,V=!1;function W(j){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.")),B(j)||x(j)===l}function B(j){return x(j)===c}function X(j){return x(j)===s}function q(j){return x(j)===a}function re(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function J(j){return x(j)===u}function ee(j){return x(j)===r}function ie(j){return x(j)===m}function ae(j){return x(j)===p}function ce(j){return x(j)===n}function U(j){return x(j)===o}function K(j){return x(j)===i}function Z(j){return x(j)===d}He.AsyncMode=_,He.ConcurrentMode=E,He.ContextConsumer=C,He.ContextProvider=D,He.Element=A,He.ForwardRef=R,He.Fragment=T,He.Lazy=O,He.Memo=N,He.Portal=M,He.Profiler=I,He.StrictMode=L,He.Suspense=$,He.isAsyncMode=W,He.isConcurrentMode=B,He.isContextConsumer=X,He.isContextProvider=q,He.isElement=re,He.isForwardRef=J,He.isFragment=ee,He.isLazy=ie,He.isMemo=ae,He.isPortal=ce,He.isProfiler=U,He.isStrictMode=K,He.isSuspense=Z,He.isValidElementType=w,He.typeOf=x})()),He}var r1;function LI(){return r1||(r1=1,process.env.NODE_ENV==="production"?Du.exports=RI():Du.exports=II()),Du.exports}var Th,i1;function FI(){if(i1)return Th;i1=1;var e=LI(),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,h,g){if(typeof h!="string"){if(f){var y=d(h);y&&y!==f&&p(m,y,g)}var S=l(h);c&&(S=S.concat(c(h)));for(var w=a(m),x=a(h),_=0;_<S.length;++_){var E=S[_];if(!n[E]&&!(g&&g[E])&&!(x&&x[E])&&!(w&&w[E])){var C=u(h,E);try{s(m,E,C)}catch{}}}}return m}return Th=p,Th}FI();var $I=!0;function HP(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(r+=i+" ")}),r}var by=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||$I===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},xy=function(t,n,r){by(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 BI(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 WI={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},zI=/[A-Z]|^ms/g,VI=/_EMO_([^_]+?)_([^]*?)_EMO_/g,YP=function(t){return t.charCodeAt(1)===45},o1=function(t){return t!=null&&typeof t!="boolean"},Ah=zP(function(e){return YP(e)?e:e.replace(zI,"-$&").toLowerCase()}),a1=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(VI,function(r,i,o){return Zr={name:i,styles:o,next:Zr},i})}return WI[t]!==1&&!YP(t)&&typeof n=="number"&&n!==0?n+"px":n};function pc(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 Zr={name:i.name,styles:i.styles,next:Zr},i.name;var o=n;if(o.styles!==void 0){var a=o.next;if(a!==void 0)for(;a!==void 0;)Zr={name:a.name,styles:a.styles,next:Zr},a=a.next;var s=o.styles+";";return s}return HI(e,t,n)}case"function":{if(e!==void 0){var l=Zr,c=n(e);return Zr=l,pc(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function HI(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=pc(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]+"}":o1(s)&&(r+=Ah(o)+":"+a1(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++)o1(a[l])&&(r+=Ah(o)+":"+a1(o,a[l])+";");else{var c=pc(e,t,a);switch(o){case"animation":case"animationName":{r+=Ah(o)+":"+c+";";break}default:r+=o+"{"+c+"}"}}}return r}var s1=/label:\s*([^\s;{]+)\s*(;|$)/g,Zr;function vp(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="";Zr=void 0;var o=e[0];if(o==null||o.raw===void 0)r=!1,i+=pc(n,t,o);else{var a=o;i+=a[0]}for(var s=1;s<e.length;s++)if(i+=pc(n,t,e[s]),r){var l=o;i+=l[s]}s1.lastIndex=0;for(var c="",u;(u=s1.exec(i))!==null;)c+="-"+u[1];var d=BI(i)+c;return{name:d,styles:i,next:Zr}}var YI=function(t){return t()},UP=P.useInsertionEffect?P.useInsertionEffect:!1,KP=UP||YI,l1=UP||P.useLayoutEffect,qP=P.createContext(typeof HTMLElement<"u"?jI({key:"css"}):null);qP.Provider;var wy=function(t){return k.forwardRef(function(n,r){var i=k.useContext(qP);return t(n,i,r)})},yp=P.createContext({}),_y={}.hasOwnProperty,Hg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",UI=function(t,n){var r={};for(var i in n)_y.call(n,i)&&(r[i]=n[i]);return r[Hg]=t,r},KI=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return by(n,r,i),KP(function(){return xy(n,r,i)}),null},qI=wy(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[Hg],o=[r],a="";typeof e.className=="string"?a=HP(t.registered,o,e.className):e.className!=null&&(a=e.className+" ");var s=vp(o,void 0,P.useContext(yp));a+=t.key+"-"+s.name;var l={};for(var c in e)_y.call(e,c)&&c!=="css"&&c!==Hg&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),P.createElement(P.Fragment,null,P.createElement(KI,{cache:t,serialized:s,isStringTag:typeof i=="string"}),P.createElement(i,l))}),GI=qI,c1=function(t,n){var r=arguments;if(n==null||!_y.call(n,"css"))return P.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=GI,o[1]=UI(t,n);for(var a=2;a<i;a++)o[a]=r[a];return P.createElement.apply(null,o)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(c1||(c1={}));var XI=wy(function(e,t){var n=e.styles,r=vp([n],void 0,P.useContext(yp)),i=P.useRef();return l1(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]),l1(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&xy(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}),QI=/^((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)-.*))$/,ZI=zP(function(e){return QI.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),JI=ZI,eL=function(t){return t!=="theme"},u1=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?JI:eL},d1=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},tL=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return by(n,r,i),KP(function(){return xy(n,r,i)}),null},nL=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=d1(t,n,r),l=s||u1(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 h=wy(function(g,y,S){var w=c&&g.as||i,x="",_=[],E=g;if(g.theme==null){E={};for(var C in g)E[C]=g[C];E.theme=P.useContext(yp)}typeof g.className=="string"?x=HP(y.registered,_,g.className):g.className!=null&&(x=g.className+" ");var D=vp(d.concat(_),y.registered,E);x+=y.key+"-"+D.name,a!==void 0&&(x+=" "+a);var A=c&&s===void 0?u1(w):l,R={};for(var T in g)c&&T==="as"||A(T)&&(R[T]=g[T]);return R.className=x,S&&(R.ref=S),P.createElement(P.Fragment,null,P.createElement(tL,{cache:y,serialized:D,isStringTag:typeof w=="string"}),P.createElement(w,R))});return h.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=i,h.__emotion_styles=d,h.__emotion_forwardProp=s,Object.defineProperty(h,"toString",{value:function(){return"."+a}}),h.withComponent=function(g,y){var S=e(g,Wg({},n,y,{shouldForwardProp:d1(h,y,!0)}));return S.apply(void 0,d)},h}},rL=["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"],Vd=nL.bind(null);rL.forEach(function(e){Vd[e]=Vd(e)});function iL(e){return e==null||Object.keys(e).length===0}function GP(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?i=>t(iL(i)?n:i):t;return b.jsx(XI,{styles:r})}process.env.NODE_ENV!=="production"&&(GP.propTypes={defaultTheme:v.object,styles:v.oneOfType([v.array,v.string,v.object,v.func])});/**
84
84
  * @mui/styled-engine v7.3.2
85
85
  *
86
86
  * @license MIT
87
87
  * This source code is licensed under the MIT license found in the
88
88
  * LICENSE file in the root directory of this source tree.
89
89
  */function oL(e,t){const n=Vd(e,t);return process.env.NODE_ENV!=="production"?(...r)=>{const i=typeof e=="string"?`"${e}"`:"component";return r.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
90
- `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function aL(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const f1=[];function So(e){return f1[0]=e,vp(f1)}const sL=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function lL(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=sL(t),a=Object.keys(o);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function u(f){return a.indexOf(f)+1<a.length?c(f,a[a.indexOf(f)+1]):s(f)}function d(f){const p=a.indexOf(f);return p===0?s(a[1]):p===a.length-1?l(a[p]):c(f,a[a.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:a,values:o,up:s,down:l,between:c,only:u,not:d,unit:n,...i}}const cL={borderRadius:4};function X2(e=8,t=hy({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function uL(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Sy(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...a}=e,s=lL(n),l=X2(i);let c=xn({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...cL,...o}},a);return c=vR(c),c.applyStyles=uL,c=t.reduce((u,d)=>xn(u,d),c),c.unstable_sxConfig={...pp,...a?.unstable_sxConfig},c.unstable_sx=function(d){return _s({sx:d,theme:this})},c}function dL(e){return Object.keys(e).length===0}function fL(e=null){const t=P.useContext(yp);return!t||dL(t)?e:t}const pL=Sy();function Q2(e=pL){return fL(e)}function Mh(e){const t=So(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function Z2({styles:e,themeId:t,defaultTheme:n={}}){const r=Q2(n),i=t&&r[t]||r;let o=typeof e=="function"?e(i):e;return i.modularCssLayers&&(Array.isArray(o)?o=o.map(a=>Mh(typeof a=="function"?a(i):a)):o=Mh(o)),b.jsx(G2,{styles:o})}process.env.NODE_ENV!=="production"&&(Z2.propTypes={defaultTheme:v.object,styles:v.oneOfType([v.array,v.func,v.number,v.object,v.string,v.bool]),themeId:v.string});const hL={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function sn(e,t,n="Mui"){const r=hL[t];return r?`${n}-${r}`:`${rR.generate(e)}-${t}`}function Dn(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=sn(e,i,n)}),r}function J2(e,t=""){return e.displayName||e.name||t}function p1(e,t,n){const r=J2(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function mL(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return J2(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Do.ForwardRef:return p1(e,e.render,"ForwardRef");case Do.Memo:return p1(e,e.type,"memo");default:return}}}function eC(e){const{variants:t,...n}=e,r={variants:t,style:So(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=So(i.style))}),r}const gL=Sy();function Nh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function pa(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function vL(e){return e?(t,n)=>n[e]:null}function yL(e,t,n){e.theme=_L(e.theme)?n:e.theme[t]||e.theme}function Td(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(i=>Td(e,i,n));if(Array.isArray(r?.variants)){let i;if(r.isProcessed)i=n?pa(r.style,n):r.style;else{const{variants:o,...a}=r;i=n?pa(So(a),n):a}return tC(e,r.variants,[i],n)}return r?.isProcessed?n?pa(So(r.style),n):r.style:n?pa(So(r),n):r}function tC(e,t,n=[],r=void 0){let i;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(i))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&e.ownerState?.[s]!==a.props[s])continue e;typeof a.style=="function"?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?pa(So(a.style(i)),r):a.style(i))):n.push(r?pa(So(a.style),r):a.style)}return n}function bL(e={}){const{themeId:t,defaultTheme:n=gL,rootShouldForwardProp:r=Nh,slotShouldForwardProp:i=Nh}=e;function o(s){yL(s,t,n)}return(s,l={})=>{aL(s,E=>E.filter(C=>C!==_s));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=vL(nC(u)),...m}=l,h=c&&c.startsWith("Mui")||u?"components":"custom",g=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=f||!1;let S=Nh;u==="Root"||u==="root"?S=r:u?S=i:SL(s)&&(S=void 0);const w=oL(s,{shouldForwardProp:S,label:wL(c,u),...m}),x=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(D){return Td(D,E,D.theme.modularCssLayers?h:void 0)};if(Ai(E)){const C=eC(E);return function(A){return C.variants?Td(A,C,A.theme.modularCssLayers?h:void 0):A.theme.modularCssLayers?pa(C.style,h):C.style}}return E},_=(...E)=>{const C=[],D=E.map(x),A=[];if(C.push(o),c&&p&&A.push(function(N){const I=N.theme.components?.[c]?.styleOverrides;if(!I)return null;const L={};for(const $ in I)L[$]=Td(N,I[$],N.theme.modularCssLayers?"theme":void 0);return p(N,L)}),c&&!g&&A.push(function(N){const I=N.theme?.components?.[c]?.variants;return I?tC(N,I,[],N.theme.modularCssLayers?"theme":void 0):null}),y||A.push(_s),Array.isArray(D[0])){const O=D.shift(),N=new Array(C.length).fill(""),M=new Array(A.length).fill("");let I;I=[...N,...O,...M],I.raw=[...N,...O.raw,...M],C.unshift(I)}const R=[...C,...D,...A],T=w(...R);return s.muiName&&(T.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(T.displayName=xL(c,u,s)),T};return w.withConfig&&(_.withConfig=w.withConfig),_}}function xL(e,t,n){return e?`${e}${on(t||"")}`:`Styled(${mL(n)})`}function wL(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${nC(t||"Root")}`),n}function _L(e){for(const t in e)return!1;return!0}function SL(e){return typeof e=="string"&&e.charCodeAt(0)>96}function nC(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Yg(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const a=e[o],s=t[o];if(!s)r[o]=a||{};else if(!a)r[o]=s;else{r[o]={...s};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const c=l;r[o][c]=Yg(a[c],s[c],n)}}}else o==="className"&&n&&t.className?r.className=oe(e?.className,t?.className):o==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[o]===void 0&&(r[o]=e[o])}return r}const Vi=typeof window<"u"?P.useLayoutEffect:P.useEffect;function EL(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ey(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),EL(e,t,n)}function OL(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function To(e){if(e.type)return e;if(e.charAt(0)==="#")return To(OL(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
90
+ `)):r.some(o=>o===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),n(...r)}:n}function aL(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const f1=[];function So(e){return f1[0]=e,vp(f1)}const sL=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function lL(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...i}=e,o=sL(t),a=Object.keys(o);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function u(f){return a.indexOf(f)+1<a.length?c(f,a[a.indexOf(f)+1]):s(f)}function d(f){const p=a.indexOf(f);return p===0?s(a[1]):p===a.length-1?l(a[p]):c(f,a[a.indexOf(f)+1]).replace("@media","@media not all and")}return{keys:a,values:o,up:s,down:l,between:c,only:u,not:d,unit:n,...i}}const cL={borderRadius:4};function XP(e=8,t=hy({spacing:e})){if(e.mui)return e;const n=(...r)=>(process.env.NODE_ENV!=="production"&&(r.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${r.length}`)),(r.length===0?[1]:r).map(o=>{const a=t(o);return typeof a=="number"?`${a}px`:a}).join(" "));return n.mui=!0,n}function uL(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function Sy(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={},...a}=e,s=lL(n),l=XP(i);let c=xn({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...cL,...o}},a);return c=vR(c),c.applyStyles=uL,c=t.reduce((u,d)=>xn(u,d),c),c.unstable_sxConfig={...pp,...a?.unstable_sxConfig},c.unstable_sx=function(d){return _s({sx:d,theme:this})},c}function dL(e){return Object.keys(e).length===0}function fL(e=null){const t=P.useContext(yp);return!t||dL(t)?e:t}const pL=Sy();function QP(e=pL){return fL(e)}function Mh(e){const t=So(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function ZP({styles:e,themeId:t,defaultTheme:n={}}){const r=QP(n),i=t&&r[t]||r;let o=typeof e=="function"?e(i):e;return i.modularCssLayers&&(Array.isArray(o)?o=o.map(a=>Mh(typeof a=="function"?a(i):a)):o=Mh(o)),b.jsx(GP,{styles:o})}process.env.NODE_ENV!=="production"&&(ZP.propTypes={defaultTheme:v.object,styles:v.oneOfType([v.array,v.func,v.number,v.object,v.string,v.bool]),themeId:v.string});const hL={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function sn(e,t,n="Mui"){const r=hL[t];return r?`${n}-${r}`:`${rR.generate(e)}-${t}`}function Dn(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=sn(e,i,n)}),r}function JP(e,t=""){return e.displayName||e.name||t}function p1(e,t,n){const r=JP(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function mL(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return JP(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Do.ForwardRef:return p1(e,e.render,"ForwardRef");case Do.Memo:return p1(e,e.type,"memo");default:return}}}function eC(e){const{variants:t,...n}=e,r={variants:t,style:So(n),isProcessed:!0};return r.style===n||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=So(i.style))}),r}const gL=Sy();function Nh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function pa(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function vL(e){return e?(t,n)=>n[e]:null}function yL(e,t,n){e.theme=_L(e.theme)?n:e.theme[t]||e.theme}function Td(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(i=>Td(e,i,n));if(Array.isArray(r?.variants)){let i;if(r.isProcessed)i=n?pa(r.style,n):r.style;else{const{variants:o,...a}=r;i=n?pa(So(a),n):a}return tC(e,r.variants,[i],n)}return r?.isProcessed?n?pa(So(r.style),n):r.style:n?pa(So(r),n):r}function tC(e,t,n=[],r=void 0){let i;e:for(let o=0;o<t.length;o+=1){const a=t[o];if(typeof a.props=="function"){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!a.props(i))continue}else for(const s in a.props)if(e[s]!==a.props[s]&&e.ownerState?.[s]!==a.props[s])continue e;typeof a.style=="function"?(i??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?pa(So(a.style(i)),r):a.style(i))):n.push(r?pa(So(a.style),r):a.style)}return n}function bL(e={}){const{themeId:t,defaultTheme:n=gL,rootShouldForwardProp:r=Nh,slotShouldForwardProp:i=Nh}=e;function o(s){yL(s,t,n)}return(s,l={})=>{aL(s,E=>E.filter(C=>C!==_s));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=vL(nC(u)),...m}=l,h=c&&c.startsWith("Mui")||u?"components":"custom",g=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,y=f||!1;let S=Nh;u==="Root"||u==="root"?S=r:u?S=i:SL(s)&&(S=void 0);const w=oL(s,{shouldForwardProp:S,label:wL(c,u),...m}),x=E=>{if(E.__emotion_real===E)return E;if(typeof E=="function")return function(D){return Td(D,E,D.theme.modularCssLayers?h:void 0)};if(Ai(E)){const C=eC(E);return function(A){return C.variants?Td(A,C,A.theme.modularCssLayers?h:void 0):A.theme.modularCssLayers?pa(C.style,h):C.style}}return E},_=(...E)=>{const C=[],D=E.map(x),A=[];if(C.push(o),c&&p&&A.push(function(N){const I=N.theme.components?.[c]?.styleOverrides;if(!I)return null;const L={};for(const $ in I)L[$]=Td(N,I[$],N.theme.modularCssLayers?"theme":void 0);return p(N,L)}),c&&!g&&A.push(function(N){const I=N.theme?.components?.[c]?.variants;return I?tC(N,I,[],N.theme.modularCssLayers?"theme":void 0):null}),y||A.push(_s),Array.isArray(D[0])){const O=D.shift(),N=new Array(C.length).fill(""),M=new Array(A.length).fill("");let I;I=[...N,...O,...M],I.raw=[...N,...O.raw,...M],C.unshift(I)}const R=[...C,...D,...A],T=w(...R);return s.muiName&&(T.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(T.displayName=xL(c,u,s)),T};return w.withConfig&&(_.withConfig=w.withConfig),_}}function xL(e,t,n){return e?`${e}${on(t||"")}`:`Styled(${mL(n)})`}function wL(e,t){let n;return process.env.NODE_ENV!=="production"&&e&&(n=`${e}-${nC(t||"Root")}`),n}function _L(e){for(const t in e)return!1;return!0}function SL(e){return typeof e=="string"&&e.charCodeAt(0)>96}function nC(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Yg(e,t,n=!1){const r={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const o=i;if(o==="components"||o==="slots")r[o]={...e[o],...r[o]};else if(o==="componentsProps"||o==="slotProps"){const a=e[o],s=t[o];if(!s)r[o]=a||{};else if(!a)r[o]=s;else{r[o]={...s};for(const l in a)if(Object.prototype.hasOwnProperty.call(a,l)){const c=l;r[o][c]=Yg(a[c],s[c],n)}}}else o==="className"&&n&&t.className?r.className=oe(e?.className,t?.className):o==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[o]===void 0&&(r[o]=e[o])}return r}const Vi=typeof window<"u"?P.useLayoutEffect:P.useEffect;function EL(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Ey(e,t=0,n=1){return process.env.NODE_ENV!=="production"&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),EL(e,t,n)}function OL(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function To(e){if(e.type)return e;if(e.charAt(0)==="#")return To(OL(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
91
91
  The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:fi(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
92
92
  The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:fi(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const PL=e=>{const t=To(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Wl=(e,t)=>{try{return PL(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function bp(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function rC(e){e=To(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),a=(c,u=(c+n/30)%12)=>i-o*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),bp({type:s,values:l})}function Ug(e){e=To(e);let t=e.type==="hsl"||e.type==="hsla"?To(rC(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function h1(e,t){const n=Ug(e),r=Ug(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function Hd(e,t){return e=To(e),t=Ey(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,bp(e)}function Xo(e,t,n){try{return Hd(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function xp(e,t){if(e=To(e),t=Ey(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return bp(e)}function Ke(e,t,n){try{return xp(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function wp(e,t){if(e=To(e),t=Ey(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return bp(e)}function qe(e,t,n){try{return wp(e,t)}catch{return n&&process.env.NODE_ENV!=="production"&&console.warn(n),e}}function CL(e,t=.15){return Ug(e)>.5?xp(e,t):wp(e,t)}function Tu(e,t,n){try{return CL(e,t)}catch{return e}}const kL="exact-prop: ​";function iC(e){return process.env.NODE_ENV==="production"?e:{...e,[kL]:t=>{const n=Object.keys(t).filter(r=>!e.hasOwnProperty(r));return n.length>0?new Error(`The following props are not supported: ${n.map(r=>`\`${r}\``).join(", ")}. Please remove them.`):null}}}const DL=P.createContext();process.env.NODE_ENV!=="production"&&(v.node,v.bool);const Oy=()=>P.useContext(DL)??!1,TL=P.createContext(void 0);process.env.NODE_ENV!=="production"&&(v.node,v.object);function AL(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?Yg(i.defaultProps,r,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?Yg(i,r,t.components.mergeClassNameAndStyle):r}function ML({props:e,name:t}){const n=P.useContext(TL);return AL({props:e,name:t,theme:{components:n}})}let m1=0;function NL(e){const[t,n]=P.useState(e),r=e||t;return P.useEffect(()=>{t==null&&(m1+=1,n(`mui-${m1}`))},[t]),r}const jL={...P},g1=jL.useId;function oC(e){if(g1!==void 0){const t=g1();return e??t}return NL(e)}const v1={theme:void 0};function RL(e){let t,n;return function(i){let o=t;return(o===void 0||i.theme!==n)&&(v1.theme=i.theme,o=eC(e(v1)),t=o,n=i.theme),o}}function IL(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const y1=(e,t,n,r=[])=>{let i=e;t.forEach((o,a)=>{a===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},LL=(e,t,n)=>{function r(i,o=[],a=[]){Object.entries(i).forEach(([s,l])=>{(!n||n&&!n([...o,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...o,s],Array.isArray(l)?[...a,s]:a):t([...o,s],l,a))})}r(e)},FL=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function jh(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={},a={};return LL(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,d=FL(s,l);Object.assign(i,{[u]:d}),y1(o,s,`var(${u})`,c),y1(a,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:i,vars:o,varsWithDefaults:a}}function $L(e,t={}){const{getSelector:n=y,disableCssColorScheme:r,colorSchemeSelector:i,enableContrastVars:o}=t,{colorSchemes:a={},components:s,defaultColorScheme:l="light",...c}=e,{vars:u,css:d,varsWithDefaults:f}=jh(c,t);let p=f;const m={},{[l]:h,...g}=a;if(Object.entries(g||{}).forEach(([x,_])=>{const{vars:E,css:C,varsWithDefaults:D}=jh(_,t);p=xn(p,D),m[x]={css:C,vars:E}}),h){const{css:x,vars:_,varsWithDefaults:E}=jh(h,t);p=xn(p,E),m[l]={css:x,vars:_}}function y(x,_){let E=i;if(i==="class"&&(E=".%s"),i==="data"&&(E="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(E=`[${i}="%s"]`),x){if(E==="media")return e.defaultColorScheme===x?":root":{[`@media (prefers-color-scheme: ${a[x]?.palette?.mode||x})`]:{":root":_}};if(E)return e.defaultColorScheme===x?`:root, ${E.replace("%s",String(x))}`:E.replace("%s",String(x))}return":root"}return{vars:p,generateThemeVars:()=>{let x={...u};return Object.entries(m).forEach(([,{vars:_}])=>{x=xn(x,_)}),x},generateStyleSheets:()=>{const x=[],_=e.defaultColorScheme||"light";function E(A,R){Object.keys(R).length&&x.push(typeof A=="string"?{[A]:{...R}}:A)}E(n(void 0,{...d}),d);const{[_]:C,...D}=m;if(C){const{css:A}=C,R=a[_]?.palette?.mode,T=!r&&R?{colorScheme:R,...A}:{...A};E(n(_,{...T}),T)}return Object.entries(D).forEach(([A,{css:R}])=>{const T=a[A]?.palette?.mode,O=!r&&T?{colorScheme:T,...R}:{...R};E(n(A,{...O}),O)}),o&&x.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),x}}}function BL(e){return function(n){return e==="media"?(process.env.NODE_ENV!=="production"&&n!=="light"&&n!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${n}'.`),`@media (prefers-color-scheme: ${n})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const hc={black:"#000",white:"#fff"},WL={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Qa={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Za={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},vl={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},Ja={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},es={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},ts={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function aC(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:hc.white,default:hc.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const sC=aC();function lC(){return{text:{primary:hc.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:hc.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Kg=lC();function b1(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=wp(e.main,i):t==="dark"&&(e.dark=xp(e.main,o)))}function x1(e,t,n,r,i){const o=i.light||i,a=i.dark||i*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(o*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(a*100).toFixed(0)}%)`))}function zL(e="light"){return e==="dark"?{main:Ja[200],light:Ja[50],dark:Ja[400]}:{main:Ja[700],light:Ja[400],dark:Ja[800]}}function VL(e="light"){return e==="dark"?{main:Qa[200],light:Qa[50],dark:Qa[400]}:{main:Qa[500],light:Qa[300],dark:Qa[700]}}function HL(e="light"){return e==="dark"?{main:Za[500],light:Za[300],dark:Za[700]}:{main:Za[700],light:Za[400],dark:Za[800]}}function YL(e="light"){return e==="dark"?{main:es[400],light:es[300],dark:es[700]}:{main:es[700],light:es[500],dark:es[900]}}function UL(e="light"){return e==="dark"?{main:ts[400],light:ts[300],dark:ts[700]}:{main:ts[800],light:ts[500],dark:ts[900]}}function KL(e="light"){return e==="dark"?{main:vl[400],light:vl[300],dark:vl[700]}:{main:"#ed6c02",light:vl[500],dark:vl[900]}}function qL(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function Py(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:i,...o}=e,a=e.primary||zL(t),s=e.secondary||VL(t),l=e.error||HL(t),c=e.info||YL(t),u=e.success||UL(t),d=e.warning||KL(t);function f(g){if(i)return qL(g);const y=h1(g,Kg.text.primary)>=n?Kg.text.primary:sC.text.primary;if(process.env.NODE_ENV!=="production"){const S=h1(g,y);S<3&&console.error([`MUI: The contrast ratio of ${S}:1 for ${y} on ${g}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
93
93
  `))}return y}const p=({color:g,name:y,mainShade:S=500,lightShade:w=300,darkShade:x=700})=>{if(g={...g},!g.main&&g[S]&&(g.main=g[S]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${y?` (${y})`:""} provided to augmentColor(color) is invalid.
@@ -114,9 +114,9 @@ theme.transitions = createTransitions(theme.transitions || {});
114
114
 
115
115
  export default theme;`}function E1(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const c5=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 u5(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})`:Hd(t,c5(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${E1(n)})`:wp(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${E1(n)})`:xp(t,n)}})}function qg(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.":fi(20));const d=Py({...o,colorSpace:c}),f=Sy(e);let p=xn(f,{mixins:XL(f.breakpoints,r),palette:d,shadows:n5.slice(),typography:ZL(d,s),transitions:a5(a),zIndex:{...s5}});if(p=xn(p,u),p=t.reduce((m,h)=>xn(m,h),p),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],h=(g,y)=>{let S;for(S in g){const w=g[S];if(m.includes(S)&&Object.keys(w).length>0){if(process.env.NODE_ENV!=="production"){const x=sn("",S);console.error([`MUI: The \`${y}\` component increases the CSS specificity of the \`${S}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${x}' syntax:`,JSON.stringify({root:{[`&.${x}`]:w}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
116
116
  `))}g[S]={}}}};Object.keys(p.components).forEach(g=>{const y=p.components[g].styleOverrides;y&&g.startsWith("Mui")&&h(y,g)})}return p.unstable_sxConfig={...pp,...u?.unstable_sxConfig},p.unstable_sx=function(h){return _s({sx:h,theme:this})},p.toRuntimeSource=cC,u5(p),p}function Gg(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 d5=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=Gg(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function uC(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function dC(e){return e==="dark"?d5:[]}function f5(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:i,...o}=e,a=Py({...t,colorSpace:i});return{palette:a,opacity:{...uC(a.mode),...n},overlays:r||dC(a.mode),...o}}function p5(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 h5=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],m5=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 h5(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 g5(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Y(e,t,n){!e[t]&&n&&(e[t]=n)}function zl(e){return typeof e!="string"||!e.startsWith("hsl")?e:rC(e)}function Si(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Wl(zl(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 v5(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Yr=e=>{try{return e()}catch{}},y5=(e="mui")=>IL(e);function Rh(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;const o=i==="dark"?"dark":"light";if(!r){t[i]=f5({...n,palette:{mode:o,...n?.palette},colorSpace:e});return}const{palette:a,...s}=qg({...r,palette:{mode:o,...n?.palette},colorSpace:e});return t[i]={...n,palette:a,opacity:{...uC(o),...n?.opacity},overlays:n?.overlays||dC(o)},s}function b5(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=p5,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=y5(o),{[f]:m,light:h,dark:g,...y}=n,S={...y};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.`:fi(21,f));let x;a&&(x="oklch");const _=Rh(x,S,w,u,f);h&&!S.light&&Rh(x,S,h,void 0,"light"),g&&!S.dark&&Rh(x,S,g,void 0,"dark");let E={defaultColorScheme:f,..._,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:S,font:{...GL(_.typography),..._.font},spacing:v5(u.spacing)};Object.keys(E.colorSchemes).forEach(T=>{const O=E.colorSchemes[T].palette,N=I=>{const L=I.split("-"),$=L[1],V=L[2];return p(I,O[$][V])};O.mode==="light"&&(Y(O.common,"background","#fff"),Y(O.common,"onBackground","#000")),O.mode==="dark"&&(Y(O.common,"background","#000"),Y(O.common,"onBackground","#fff"));function M(I,L,$){if(x){let V;return I===Xo&&(V=`transparent ${((1-$)*100).toFixed(0)}%`),I===Ke&&(V=`#000 ${($*100).toFixed(0)}%`),I===qe&&(V=`#fff ${($*100).toFixed(0)}%`),`color-mix(in ${x}, ${L}, ${V})`}return I(L,$)}if(g5(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){Y(O.Alert,"errorColor",M(Ke,O.error.light,.6)),Y(O.Alert,"infoColor",M(Ke,O.info.light,.6)),Y(O.Alert,"successColor",M(Ke,O.success.light,.6)),Y(O.Alert,"warningColor",M(Ke,O.warning.light,.6)),Y(O.Alert,"errorFilledBg",N("palette-error-main")),Y(O.Alert,"infoFilledBg",N("palette-info-main")),Y(O.Alert,"successFilledBg",N("palette-success-main")),Y(O.Alert,"warningFilledBg",N("palette-warning-main")),Y(O.Alert,"errorFilledColor",Yr(()=>O.getContrastText(O.error.main))),Y(O.Alert,"infoFilledColor",Yr(()=>O.getContrastText(O.info.main))),Y(O.Alert,"successFilledColor",Yr(()=>O.getContrastText(O.success.main))),Y(O.Alert,"warningFilledColor",Yr(()=>O.getContrastText(O.warning.main))),Y(O.Alert,"errorStandardBg",M(qe,O.error.light,.9)),Y(O.Alert,"infoStandardBg",M(qe,O.info.light,.9)),Y(O.Alert,"successStandardBg",M(qe,O.success.light,.9)),Y(O.Alert,"warningStandardBg",M(qe,O.warning.light,.9)),Y(O.Alert,"errorIconColor",N("palette-error-main")),Y(O.Alert,"infoIconColor",N("palette-info-main")),Y(O.Alert,"successIconColor",N("palette-success-main")),Y(O.Alert,"warningIconColor",N("palette-warning-main")),Y(O.AppBar,"defaultBg",N("palette-grey-100")),Y(O.Avatar,"defaultBg",N("palette-grey-400")),Y(O.Button,"inheritContainedBg",N("palette-grey-300")),Y(O.Button,"inheritContainedHoverBg",N("palette-grey-A100")),Y(O.Chip,"defaultBorder",N("palette-grey-400")),Y(O.Chip,"defaultAvatarColor",N("palette-grey-700")),Y(O.Chip,"defaultIconColor",N("palette-grey-700")),Y(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Y(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Y(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Y(O.LinearProgress,"primaryBg",M(qe,O.primary.main,.62)),Y(O.LinearProgress,"secondaryBg",M(qe,O.secondary.main,.62)),Y(O.LinearProgress,"errorBg",M(qe,O.error.main,.62)),Y(O.LinearProgress,"infoBg",M(qe,O.info.main,.62)),Y(O.LinearProgress,"successBg",M(qe,O.success.main,.62)),Y(O.LinearProgress,"warningBg",M(qe,O.warning.main,.62)),Y(O.Skeleton,"bg",x?M(Xo,O.text.primary,.11):`rgba(${N("palette-text-primaryChannel")} / 0.11)`),Y(O.Slider,"primaryTrack",M(qe,O.primary.main,.62)),Y(O.Slider,"secondaryTrack",M(qe,O.secondary.main,.62)),Y(O.Slider,"errorTrack",M(qe,O.error.main,.62)),Y(O.Slider,"infoTrack",M(qe,O.info.main,.62)),Y(O.Slider,"successTrack",M(qe,O.success.main,.62)),Y(O.Slider,"warningTrack",M(qe,O.warning.main,.62));const I=x?M(Ke,O.background.default,.6825):Tu(O.background.default,.8);Y(O.SnackbarContent,"bg",I),Y(O.SnackbarContent,"color",Yr(()=>x?Kg.text.primary:O.getContrastText(I))),Y(O.SpeedDialAction,"fabHoverBg",Tu(O.background.paper,.15)),Y(O.StepConnector,"border",N("palette-grey-400")),Y(O.StepContent,"border",N("palette-grey-400")),Y(O.Switch,"defaultColor",N("palette-common-white")),Y(O.Switch,"defaultDisabledColor",N("palette-grey-100")),Y(O.Switch,"primaryDisabledColor",M(qe,O.primary.main,.62)),Y(O.Switch,"secondaryDisabledColor",M(qe,O.secondary.main,.62)),Y(O.Switch,"errorDisabledColor",M(qe,O.error.main,.62)),Y(O.Switch,"infoDisabledColor",M(qe,O.info.main,.62)),Y(O.Switch,"successDisabledColor",M(qe,O.success.main,.62)),Y(O.Switch,"warningDisabledColor",M(qe,O.warning.main,.62)),Y(O.TableCell,"border",M(qe,M(Xo,O.divider,1),.88)),Y(O.Tooltip,"bg",M(Xo,O.grey[700],.92))}if(O.mode==="dark"){Y(O.Alert,"errorColor",M(qe,O.error.light,.6)),Y(O.Alert,"infoColor",M(qe,O.info.light,.6)),Y(O.Alert,"successColor",M(qe,O.success.light,.6)),Y(O.Alert,"warningColor",M(qe,O.warning.light,.6)),Y(O.Alert,"errorFilledBg",N("palette-error-dark")),Y(O.Alert,"infoFilledBg",N("palette-info-dark")),Y(O.Alert,"successFilledBg",N("palette-success-dark")),Y(O.Alert,"warningFilledBg",N("palette-warning-dark")),Y(O.Alert,"errorFilledColor",Yr(()=>O.getContrastText(O.error.dark))),Y(O.Alert,"infoFilledColor",Yr(()=>O.getContrastText(O.info.dark))),Y(O.Alert,"successFilledColor",Yr(()=>O.getContrastText(O.success.dark))),Y(O.Alert,"warningFilledColor",Yr(()=>O.getContrastText(O.warning.dark))),Y(O.Alert,"errorStandardBg",M(Ke,O.error.light,.9)),Y(O.Alert,"infoStandardBg",M(Ke,O.info.light,.9)),Y(O.Alert,"successStandardBg",M(Ke,O.success.light,.9)),Y(O.Alert,"warningStandardBg",M(Ke,O.warning.light,.9)),Y(O.Alert,"errorIconColor",N("palette-error-main")),Y(O.Alert,"infoIconColor",N("palette-info-main")),Y(O.Alert,"successIconColor",N("palette-success-main")),Y(O.Alert,"warningIconColor",N("palette-warning-main")),Y(O.AppBar,"defaultBg",N("palette-grey-900")),Y(O.AppBar,"darkBg",N("palette-background-paper")),Y(O.AppBar,"darkColor",N("palette-text-primary")),Y(O.Avatar,"defaultBg",N("palette-grey-600")),Y(O.Button,"inheritContainedBg",N("palette-grey-800")),Y(O.Button,"inheritContainedHoverBg",N("palette-grey-700")),Y(O.Chip,"defaultBorder",N("palette-grey-700")),Y(O.Chip,"defaultAvatarColor",N("palette-grey-300")),Y(O.Chip,"defaultIconColor",N("palette-grey-300")),Y(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Y(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Y(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Y(O.LinearProgress,"primaryBg",M(Ke,O.primary.main,.5)),Y(O.LinearProgress,"secondaryBg",M(Ke,O.secondary.main,.5)),Y(O.LinearProgress,"errorBg",M(Ke,O.error.main,.5)),Y(O.LinearProgress,"infoBg",M(Ke,O.info.main,.5)),Y(O.LinearProgress,"successBg",M(Ke,O.success.main,.5)),Y(O.LinearProgress,"warningBg",M(Ke,O.warning.main,.5)),Y(O.Skeleton,"bg",x?M(Xo,O.text.primary,.13):`rgba(${N("palette-text-primaryChannel")} / 0.13)`),Y(O.Slider,"primaryTrack",M(Ke,O.primary.main,.5)),Y(O.Slider,"secondaryTrack",M(Ke,O.secondary.main,.5)),Y(O.Slider,"errorTrack",M(Ke,O.error.main,.5)),Y(O.Slider,"infoTrack",M(Ke,O.info.main,.5)),Y(O.Slider,"successTrack",M(Ke,O.success.main,.5)),Y(O.Slider,"warningTrack",M(Ke,O.warning.main,.5));const I=x?M(qe,O.background.default,.985):Tu(O.background.default,.98);Y(O.SnackbarContent,"bg",I),Y(O.SnackbarContent,"color",Yr(()=>x?sC.text.primary:O.getContrastText(I))),Y(O.SpeedDialAction,"fabHoverBg",Tu(O.background.paper,.15)),Y(O.StepConnector,"border",N("palette-grey-600")),Y(O.StepContent,"border",N("palette-grey-600")),Y(O.Switch,"defaultColor",N("palette-grey-300")),Y(O.Switch,"defaultDisabledColor",N("palette-grey-600")),Y(O.Switch,"primaryDisabledColor",M(Ke,O.primary.main,.55)),Y(O.Switch,"secondaryDisabledColor",M(Ke,O.secondary.main,.55)),Y(O.Switch,"errorDisabledColor",M(Ke,O.error.main,.55)),Y(O.Switch,"infoDisabledColor",M(Ke,O.info.main,.55)),Y(O.Switch,"successDisabledColor",M(Ke,O.success.main,.55)),Y(O.Switch,"warningDisabledColor",M(Ke,O.warning.main,.55)),Y(O.TableCell,"border",M(Ke,M(Xo,O.divider,1),.68)),Y(O.Tooltip,"bg",M(Xo,O.grey[700],.92))}Si(O.background,"default"),Si(O.background,"paper"),Si(O.common,"background"),Si(O.common,"onBackground"),Si(O,"divider"),Object.keys(O).forEach(I=>{const L=O[I];I!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&Y(O[I],"mainChannel",Wl(zl(L.main))),L.light&&Y(O[I],"lightChannel",Wl(zl(L.light))),L.dark&&Y(O[I],"darkChannel",Wl(zl(L.dark))),L.contrastText&&Y(O[I],"contrastTextChannel",Wl(zl(L.contrastText))),I==="text"&&(Si(O[I],"primary"),Si(O[I],"secondary")),I==="action"&&(L.active&&Si(O[I],"active"),L.selected&&Si(O[I],"selected")))})}),E=t.reduce((T,O)=>xn(T,O),E);const C={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:m5(E),enableContrastVars:a},{vars:D,generateThemeVars:A,generateStyleSheets:R}=$L(E,C);return E.vars=D,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([T,O])=>{E[T]=O}),E.generateThemeVars=A,E.generateStyleSheets=R,E.generateSpacing=function(){return X2(u.spacing,hy(this))},E.getColorSchemeSelector=BL(l),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=s,E.unstable_sxConfig={...pp,...u?.unstable_sxConfig},E.unstable_sx=function(O){return _s({sx:O,theme:this})},E.toRuntimeSource=cC,E}function O1(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Py({...n===!0?{}:n.palette,mode:t})})}function x5(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 qg(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=qg({...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},O1(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},O1(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),b5({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Cy=x5(),ky="$$material";function _p(){const e=Q2(Cy);return process.env.NODE_ENV!=="production"&&P.useDebugValue(e),e[ky]||e}function fC(e){return b.jsx(Z2,{...e,defaultTheme:Cy,themeId:ky})}process.env.NODE_ENV!=="production"&&(fC.propTypes={styles:v.oneOfType([v.array,v.func,v.number,v.object,v.string,v.bool])});function pC(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ji=e=>pC(e)&&e!=="classes",Ce=bL({themeId:ky,defaultTheme:Cy,rootShouldForwardProp:Ji});function w5(e){return function(n){return b.jsx(fC,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}const Tn=RL;process.env.NODE_ENV!=="production"&&(v.node,v.object.isRequired);function Gn(e){return ML(e)}function _5(e){return sn("MuiSvgIcon",e)}Dn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S5=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${on(t)}`,`fontSize${on(n)}`]};return _n(i,_5,r)},E5=Ce("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${on(n.color)}`],t[`fontSize${on(n.fontSize)}`]]}})(Tn(({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}}]}))),Yd=P.forwardRef(function(t,n){const r=Gn({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=P.isValidElement(i)&&i.type==="svg",h={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},g={};u||(g.viewBox=f);const y=S5(h);return b.jsxs(E5,{as:s,className:oe(y.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...g,...p,...m&&i.props,ownerState:h,children:[m?i.props.children:i,d?b.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Yd.propTypes={children:v.node,classes:v.object,className:v.string,color:v.oneOfType([v.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),v.string]),component:v.elementType,fontSize:v.oneOfType([v.oneOf(["inherit","large","medium","small"]),v.string]),htmlColor:v.string,inheritViewBox:v.bool,shapeRendering:v.string,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),titleAccess:v.string,viewBox:v.string});Yd.muiName="SvgIcon";function Bo(e,t){function n(r,i){return b.jsx(Yd,{"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=Yd.muiName,P.memo(P.forwardRef(n))}function hC(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 lr(e){return e&&e.ownerDocument||document}function Hi(e){return lr(e).defaultView||window}function P1(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Xg(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:o}=P.useRef(t!==void 0),[a,s]=P.useState(n),l=o?t:a;if(process.env.NODE_ENV!=="production"){P.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(`
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 v5(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Yr=e=>{try{return e()}catch{}},y5=(e="mui")=>IL(e);function Rh(e,t,n,r,i){if(!n)return;n=n===!0?{}:n;const o=i==="dark"?"dark":"light";if(!r){t[i]=f5({...n,palette:{mode:o,...n?.palette},colorSpace:e});return}const{palette:a,...s}=qg({...r,palette:{mode:o,...n?.palette},colorSpace:e});return t[i]={...n,palette:a,opacity:{...uC(o),...n?.opacity},overlays:n?.overlays||dC(o)},s}function b5(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:i=!1,cssVarPrefix:o="mui",nativeColor:a=!1,shouldSkipGeneratingVar:s=p5,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=y5(o),{[f]:m,light:h,dark:g,...y}=n,S={...y};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.`:fi(21,f));let x;a&&(x="oklch");const _=Rh(x,S,w,u,f);h&&!S.light&&Rh(x,S,h,void 0,"light"),g&&!S.dark&&Rh(x,S,g,void 0,"dark");let E={defaultColorScheme:f,..._,cssVarPrefix:o,colorSchemeSelector:l,rootSelector:c,getCssVar:p,colorSchemes:S,font:{...GL(_.typography),..._.font},spacing:v5(u.spacing)};Object.keys(E.colorSchemes).forEach(T=>{const O=E.colorSchemes[T].palette,N=I=>{const L=I.split("-"),$=L[1],V=L[2];return p(I,O[$][V])};O.mode==="light"&&(Y(O.common,"background","#fff"),Y(O.common,"onBackground","#000")),O.mode==="dark"&&(Y(O.common,"background","#000"),Y(O.common,"onBackground","#fff"));function M(I,L,$){if(x){let V;return I===Xo&&(V=`transparent ${((1-$)*100).toFixed(0)}%`),I===Ke&&(V=`#000 ${($*100).toFixed(0)}%`),I===qe&&(V=`#fff ${($*100).toFixed(0)}%`),`color-mix(in ${x}, ${L}, ${V})`}return I(L,$)}if(g5(O,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),O.mode==="light"){Y(O.Alert,"errorColor",M(Ke,O.error.light,.6)),Y(O.Alert,"infoColor",M(Ke,O.info.light,.6)),Y(O.Alert,"successColor",M(Ke,O.success.light,.6)),Y(O.Alert,"warningColor",M(Ke,O.warning.light,.6)),Y(O.Alert,"errorFilledBg",N("palette-error-main")),Y(O.Alert,"infoFilledBg",N("palette-info-main")),Y(O.Alert,"successFilledBg",N("palette-success-main")),Y(O.Alert,"warningFilledBg",N("palette-warning-main")),Y(O.Alert,"errorFilledColor",Yr(()=>O.getContrastText(O.error.main))),Y(O.Alert,"infoFilledColor",Yr(()=>O.getContrastText(O.info.main))),Y(O.Alert,"successFilledColor",Yr(()=>O.getContrastText(O.success.main))),Y(O.Alert,"warningFilledColor",Yr(()=>O.getContrastText(O.warning.main))),Y(O.Alert,"errorStandardBg",M(qe,O.error.light,.9)),Y(O.Alert,"infoStandardBg",M(qe,O.info.light,.9)),Y(O.Alert,"successStandardBg",M(qe,O.success.light,.9)),Y(O.Alert,"warningStandardBg",M(qe,O.warning.light,.9)),Y(O.Alert,"errorIconColor",N("palette-error-main")),Y(O.Alert,"infoIconColor",N("palette-info-main")),Y(O.Alert,"successIconColor",N("palette-success-main")),Y(O.Alert,"warningIconColor",N("palette-warning-main")),Y(O.AppBar,"defaultBg",N("palette-grey-100")),Y(O.Avatar,"defaultBg",N("palette-grey-400")),Y(O.Button,"inheritContainedBg",N("palette-grey-300")),Y(O.Button,"inheritContainedHoverBg",N("palette-grey-A100")),Y(O.Chip,"defaultBorder",N("palette-grey-400")),Y(O.Chip,"defaultAvatarColor",N("palette-grey-700")),Y(O.Chip,"defaultIconColor",N("palette-grey-700")),Y(O.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Y(O.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Y(O.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Y(O.LinearProgress,"primaryBg",M(qe,O.primary.main,.62)),Y(O.LinearProgress,"secondaryBg",M(qe,O.secondary.main,.62)),Y(O.LinearProgress,"errorBg",M(qe,O.error.main,.62)),Y(O.LinearProgress,"infoBg",M(qe,O.info.main,.62)),Y(O.LinearProgress,"successBg",M(qe,O.success.main,.62)),Y(O.LinearProgress,"warningBg",M(qe,O.warning.main,.62)),Y(O.Skeleton,"bg",x?M(Xo,O.text.primary,.11):`rgba(${N("palette-text-primaryChannel")} / 0.11)`),Y(O.Slider,"primaryTrack",M(qe,O.primary.main,.62)),Y(O.Slider,"secondaryTrack",M(qe,O.secondary.main,.62)),Y(O.Slider,"errorTrack",M(qe,O.error.main,.62)),Y(O.Slider,"infoTrack",M(qe,O.info.main,.62)),Y(O.Slider,"successTrack",M(qe,O.success.main,.62)),Y(O.Slider,"warningTrack",M(qe,O.warning.main,.62));const I=x?M(Ke,O.background.default,.6825):Tu(O.background.default,.8);Y(O.SnackbarContent,"bg",I),Y(O.SnackbarContent,"color",Yr(()=>x?Kg.text.primary:O.getContrastText(I))),Y(O.SpeedDialAction,"fabHoverBg",Tu(O.background.paper,.15)),Y(O.StepConnector,"border",N("palette-grey-400")),Y(O.StepContent,"border",N("palette-grey-400")),Y(O.Switch,"defaultColor",N("palette-common-white")),Y(O.Switch,"defaultDisabledColor",N("palette-grey-100")),Y(O.Switch,"primaryDisabledColor",M(qe,O.primary.main,.62)),Y(O.Switch,"secondaryDisabledColor",M(qe,O.secondary.main,.62)),Y(O.Switch,"errorDisabledColor",M(qe,O.error.main,.62)),Y(O.Switch,"infoDisabledColor",M(qe,O.info.main,.62)),Y(O.Switch,"successDisabledColor",M(qe,O.success.main,.62)),Y(O.Switch,"warningDisabledColor",M(qe,O.warning.main,.62)),Y(O.TableCell,"border",M(qe,M(Xo,O.divider,1),.88)),Y(O.Tooltip,"bg",M(Xo,O.grey[700],.92))}if(O.mode==="dark"){Y(O.Alert,"errorColor",M(qe,O.error.light,.6)),Y(O.Alert,"infoColor",M(qe,O.info.light,.6)),Y(O.Alert,"successColor",M(qe,O.success.light,.6)),Y(O.Alert,"warningColor",M(qe,O.warning.light,.6)),Y(O.Alert,"errorFilledBg",N("palette-error-dark")),Y(O.Alert,"infoFilledBg",N("palette-info-dark")),Y(O.Alert,"successFilledBg",N("palette-success-dark")),Y(O.Alert,"warningFilledBg",N("palette-warning-dark")),Y(O.Alert,"errorFilledColor",Yr(()=>O.getContrastText(O.error.dark))),Y(O.Alert,"infoFilledColor",Yr(()=>O.getContrastText(O.info.dark))),Y(O.Alert,"successFilledColor",Yr(()=>O.getContrastText(O.success.dark))),Y(O.Alert,"warningFilledColor",Yr(()=>O.getContrastText(O.warning.dark))),Y(O.Alert,"errorStandardBg",M(Ke,O.error.light,.9)),Y(O.Alert,"infoStandardBg",M(Ke,O.info.light,.9)),Y(O.Alert,"successStandardBg",M(Ke,O.success.light,.9)),Y(O.Alert,"warningStandardBg",M(Ke,O.warning.light,.9)),Y(O.Alert,"errorIconColor",N("palette-error-main")),Y(O.Alert,"infoIconColor",N("palette-info-main")),Y(O.Alert,"successIconColor",N("palette-success-main")),Y(O.Alert,"warningIconColor",N("palette-warning-main")),Y(O.AppBar,"defaultBg",N("palette-grey-900")),Y(O.AppBar,"darkBg",N("palette-background-paper")),Y(O.AppBar,"darkColor",N("palette-text-primary")),Y(O.Avatar,"defaultBg",N("palette-grey-600")),Y(O.Button,"inheritContainedBg",N("palette-grey-800")),Y(O.Button,"inheritContainedHoverBg",N("palette-grey-700")),Y(O.Chip,"defaultBorder",N("palette-grey-700")),Y(O.Chip,"defaultAvatarColor",N("palette-grey-300")),Y(O.Chip,"defaultIconColor",N("palette-grey-300")),Y(O.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Y(O.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Y(O.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Y(O.LinearProgress,"primaryBg",M(Ke,O.primary.main,.5)),Y(O.LinearProgress,"secondaryBg",M(Ke,O.secondary.main,.5)),Y(O.LinearProgress,"errorBg",M(Ke,O.error.main,.5)),Y(O.LinearProgress,"infoBg",M(Ke,O.info.main,.5)),Y(O.LinearProgress,"successBg",M(Ke,O.success.main,.5)),Y(O.LinearProgress,"warningBg",M(Ke,O.warning.main,.5)),Y(O.Skeleton,"bg",x?M(Xo,O.text.primary,.13):`rgba(${N("palette-text-primaryChannel")} / 0.13)`),Y(O.Slider,"primaryTrack",M(Ke,O.primary.main,.5)),Y(O.Slider,"secondaryTrack",M(Ke,O.secondary.main,.5)),Y(O.Slider,"errorTrack",M(Ke,O.error.main,.5)),Y(O.Slider,"infoTrack",M(Ke,O.info.main,.5)),Y(O.Slider,"successTrack",M(Ke,O.success.main,.5)),Y(O.Slider,"warningTrack",M(Ke,O.warning.main,.5));const I=x?M(qe,O.background.default,.985):Tu(O.background.default,.98);Y(O.SnackbarContent,"bg",I),Y(O.SnackbarContent,"color",Yr(()=>x?sC.text.primary:O.getContrastText(I))),Y(O.SpeedDialAction,"fabHoverBg",Tu(O.background.paper,.15)),Y(O.StepConnector,"border",N("palette-grey-600")),Y(O.StepContent,"border",N("palette-grey-600")),Y(O.Switch,"defaultColor",N("palette-grey-300")),Y(O.Switch,"defaultDisabledColor",N("palette-grey-600")),Y(O.Switch,"primaryDisabledColor",M(Ke,O.primary.main,.55)),Y(O.Switch,"secondaryDisabledColor",M(Ke,O.secondary.main,.55)),Y(O.Switch,"errorDisabledColor",M(Ke,O.error.main,.55)),Y(O.Switch,"infoDisabledColor",M(Ke,O.info.main,.55)),Y(O.Switch,"successDisabledColor",M(Ke,O.success.main,.55)),Y(O.Switch,"warningDisabledColor",M(Ke,O.warning.main,.55)),Y(O.TableCell,"border",M(Ke,M(Xo,O.divider,1),.68)),Y(O.Tooltip,"bg",M(Xo,O.grey[700],.92))}Si(O.background,"default"),Si(O.background,"paper"),Si(O.common,"background"),Si(O.common,"onBackground"),Si(O,"divider"),Object.keys(O).forEach(I=>{const L=O[I];I!=="tonalOffset"&&L&&typeof L=="object"&&(L.main&&Y(O[I],"mainChannel",Wl(zl(L.main))),L.light&&Y(O[I],"lightChannel",Wl(zl(L.light))),L.dark&&Y(O[I],"darkChannel",Wl(zl(L.dark))),L.contrastText&&Y(O[I],"contrastTextChannel",Wl(zl(L.contrastText))),I==="text"&&(Si(O[I],"primary"),Si(O[I],"secondary")),I==="action"&&(L.active&&Si(O[I],"active"),L.selected&&Si(O[I],"selected")))})}),E=t.reduce((T,O)=>xn(T,O),E);const C={prefix:o,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:m5(E),enableContrastVars:a},{vars:D,generateThemeVars:A,generateStyleSheets:R}=$L(E,C);return E.vars=D,Object.entries(E.colorSchemes[E.defaultColorScheme]).forEach(([T,O])=>{E[T]=O}),E.generateThemeVars=A,E.generateStyleSheets=R,E.generateSpacing=function(){return XP(u.spacing,hy(this))},E.getColorSchemeSelector=BL(l),E.spacing=E.generateSpacing(),E.shouldSkipGeneratingVar=s,E.unstable_sxConfig={...pp,...u?.unstable_sxConfig},E.unstable_sx=function(O){return _s({sx:O,theme:this})},E.toRuntimeSource=cC,E}function O1(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:Py({...n===!0?{}:n.palette,mode:t})})}function x5(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 qg(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=qg({...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},O1(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},O1(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),b5({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}const Cy=x5(),ky="$$material";function _p(){const e=QP(Cy);return process.env.NODE_ENV!=="production"&&P.useDebugValue(e),e[ky]||e}function fC(e){return b.jsx(ZP,{...e,defaultTheme:Cy,themeId:ky})}process.env.NODE_ENV!=="production"&&(fC.propTypes={styles:v.oneOfType([v.array,v.func,v.number,v.object,v.string,v.bool])});function pC(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Ji=e=>pC(e)&&e!=="classes",Ce=bL({themeId:ky,defaultTheme:Cy,rootShouldForwardProp:Ji});function w5(e){return function(n){return b.jsx(fC,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}const Tn=RL;process.env.NODE_ENV!=="production"&&(v.node,v.object.isRequired);function Gn(e){return ML(e)}function _5(e){return sn("MuiSvgIcon",e)}Dn("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S5=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${on(t)}`,`fontSize${on(n)}`]};return _n(i,_5,r)},E5=Ce("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${on(n.color)}`],t[`fontSize${on(n.fontSize)}`]]}})(Tn(({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}}]}))),Yd=P.forwardRef(function(t,n){const r=Gn({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=P.isValidElement(i)&&i.type==="svg",h={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},g={};u||(g.viewBox=f);const y=S5(h);return b.jsxs(E5,{as:s,className:oe(y.root,o),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...g,...p,...m&&i.props,ownerState:h,children:[m?i.props.children:i,d?b.jsx("title",{children:d}):null]})});process.env.NODE_ENV!=="production"&&(Yd.propTypes={children:v.node,classes:v.object,className:v.string,color:v.oneOfType([v.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),v.string]),component:v.elementType,fontSize:v.oneOfType([v.oneOf(["inherit","large","medium","small"]),v.string]),htmlColor:v.string,inheritViewBox:v.bool,shapeRendering:v.string,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),titleAccess:v.string,viewBox:v.string});Yd.muiName="SvgIcon";function Bo(e,t){function n(r,i){return b.jsx(Yd,{"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=Yd.muiName,P.memo(P.forwardRef(n))}function hC(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 lr(e){return e&&e.ownerDocument||document}function Hi(e){return lr(e).defaultView||window}function P1(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function Xg(e){const{controlled:t,default:n,name:r,state:i="value"}=e,{current:o}=P.useRef(t!==void 0),[a,s]=P.useState(n),l=o?t:a;if(process.env.NODE_ENV!=="production"){P.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}=P.useRef(n);P.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
- `))},[JSON.stringify(n)])}const c=P.useCallback(u=>{o||s(u)},[]);return[l,c]}function mc(e){const t=P.useRef(e);return Vi(()=>{t.current=e}),P.useRef((...n)=>(0,t.current)(...n)).current}function kn(...e){const t=P.useRef(void 0),n=P.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 P.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function O5(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function P5(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(c=>{O5(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=oe(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=oe(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 C5=Bo(b.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"),Kc=Bo(b.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"),k5=Bo(b.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"),D5=Bo(b.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),An=Bo(b.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNewOutlined"),T5=Bo(b.jsx("path",{d:"M16 6v8h3v8h2V2c-2.76 0-5 2.24-5 4m-5 3H9V2H7v7H5V2H3v7c0 2.21 1.79 4 4 4v9h2v-9c2.21 0 4-1.79 4-4V2h-2z"}),"RestaurantOutlined"),A5=Bo(b.jsx("path",{fillRule:"evenodd",d:"M14 6V4h-4v2zM4 8v11h16V8zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2z"}),"WorkOutline"),mC=6048e5,M5=864e5,Sp=6e4,Ep=36e5,N5=1e3,C1=Symbol.for("constructDateFrom");function Ze(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&C1 in e?e[C1](t):e instanceof Date?new e.constructor(t):new Date(t)}function he(e,t){return Ze(t||e,e)}function Lr(e,t,n){const r=he(e,n?.in);return isNaN(t)?Ze(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function $r(e,t,n){const r=he(e,n?.in);if(isNaN(t))return Ze(e,NaN);if(!t)return r;const i=r.getDate(),o=Ze(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 gC(e,t,n){return Ze(e,+he(e)+t)}function j5(e,t,n){return gC(e,t*Ep)}let R5={};function Va(){return R5}function Yi(e,t){const n=Va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=he(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 Es(e,t){return Yi(e,{...t,weekStartsOn:1})}function vC(e,t){const n=he(e,t?.in),r=n.getFullYear(),i=Ze(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Es(i),a=Ze(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Es(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ud(e){const t=he(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 eo(e,...t){const n=Ze.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Aa(e,t){const n=he(e,t?.in);return n.setHours(0,0,0,0),n}function Os(e,t,n){const[r,i]=eo(n?.in,e,t),o=Aa(r),a=Aa(i),s=+o-Ud(o),l=+a-Ud(a);return Math.round((s-l)/M5)}function I5(e,t){const n=vC(e,t),r=Ze(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Es(r)}function gc(e,t,n){const r=he(e,n?.in);return r.setTime(r.getTime()+t*Sp),r}function Dy(e,t,n){return $r(e,t*3,n)}function L5(e,t,n){return gC(e,t*1e3)}function Kd(e,t,n){return Lr(e,t*7,n)}function Fr(e,t,n){return $r(e,t*12,n)}function k1(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Ze.bind(null,i));const o=he(i,r);(!n||n<o||isNaN(+o))&&(n=o)}),Ze(r,n||NaN)}function D1(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Ze.bind(null,i));const o=he(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),Ze(r,n||NaN)}function F5(e,t,n){const[r,i]=eo(n?.in,e,t);return+Aa(r)==+Aa(i)}function si(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ps(e){return!(!si(e)&&typeof e!="number"||isNaN(+he(e)))}function qd(e,t,n){const[r,i]=eo(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function yo(e,t){const n=he(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function Gd(e,t,n){const[r,i]=eo(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=yo(r)-yo(i);return o*4+a}function Xd(e,t,n){const[r,i]=eo(n?.in,e,t);return r.getFullYear()-i.getFullYear()}function $5(e,t,n){const[r,i]=eo(n?.in,e,t),o=T1(r,i),a=Math.abs(Os(r,i));r.setDate(r.getDate()-o*a);const s=+(T1(r,i)===-o),l=o*(a-s);return l===0?0:l}function T1(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 yC(e,t){const n=he(e,t?.in);return n.setHours(23,59,59,999),n}function bC(e,t){const n=he(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Qg(e,t){const n=he(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function xC(e,t){const n=he(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function wC(e,t){const n=he(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Op(e,t){const n=he(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function B5(e,t){const n=Va(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=he(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 W5={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"}},z5=(e,t,n)=>{let r;const i=W5[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 Ih(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const V5={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"},Y5={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U5={date:Ih({formats:V5,defaultWidth:"full"}),time:Ih({formats:H5,defaultWidth:"full"}),dateTime:Ih({formats:Y5,defaultWidth:"full"})},K5={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},q5=(e,t,n,r)=>K5[e];function yl(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 G5={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"]},Q5={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"]},Z5={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"]},J5={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"}},eF={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"}},tF=(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"},nF={ordinalNumber:tF,era:yl({values:G5,defaultWidth:"wide"}),quarter:yl({values:X5,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yl({values:Q5,defaultWidth:"wide"}),day:yl({values:Z5,defaultWidth:"wide"}),dayPeriod:yl({values:J5,defaultWidth:"wide",formattingValues:eF,defaultFormattingWidth:"wide"})};function bl(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)?iF(s,d=>d.test(a)):rF(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 rF(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function iF(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oF(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 aF=/^(\d+)(th|st|nd|rd)?/i,sF=/\d+/i,lF={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},cF={any:[/^b/i,/^(a|c)/i]},uF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},dF={any:[/1/i,/2/i,/3/i,/4/i]},fF={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},pF={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]},hF={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},mF={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]},gF={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},vF={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}},yF={ordinalNumber:oF({matchPattern:aF,parsePattern:sF,valueCallback:e=>parseInt(e,10)}),era:bl({matchPatterns:lF,defaultMatchWidth:"wide",parsePatterns:cF,defaultParseWidth:"any"}),quarter:bl({matchPatterns:uF,defaultMatchWidth:"wide",parsePatterns:dF,defaultParseWidth:"any",valueCallback:e=>e+1}),month:bl({matchPatterns:fF,defaultMatchWidth:"wide",parsePatterns:pF,defaultParseWidth:"any"}),day:bl({matchPatterns:hF,defaultMatchWidth:"wide",parsePatterns:mF,defaultParseWidth:"any"}),dayPeriod:bl({matchPatterns:gF,defaultMatchWidth:"any",parsePatterns:vF,defaultParseWidth:"any"})},_C={code:"en-US",formatDistance:z5,formatLong:U5,formatRelative:q5,localize:nF,match:yF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bF(e,t){const n=he(e,t?.in);return Os(n,Op(n))+1}function Ty(e,t){const n=he(e,t?.in),r=+Es(n)-+I5(n);return Math.round(r/mC)+1}function Ay(e,t){const n=he(e,t?.in),r=n.getFullYear(),i=Va(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Ze(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Yi(a,t),l=Ze(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Yi(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function xF(e,t){const n=Va(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Ay(e,t),o=Ze(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Yi(o,t)}function SC(e,t){const n=he(e,t?.in),r=+Yi(n,t)-+xF(n,t);return Math.round(r/mC)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ge(n+1,2)},d(e,t){return Ge(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 Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ge(i,t.length)}},ns={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},A1={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 fo.y(e,t)},Y:function(e,t,n,r){const i=Ay(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Ge(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Ge(o,t.length)},R:function(e,t){const n=vC(e);return Ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ge(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 Ge(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 Ge(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 fo.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 Ge(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=SC(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ge(i,t.length)},I:function(e,t,n){const r=Ty(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fo.d(e,t)},D:function(e,t,n){const r=bF(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ge(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 Ge(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 Ge(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 Ge(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=ns.noon:r===0?i=ns.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=ns.evening:r>=12?i=ns.afternoon:r>=4?i=ns.morning:i=ns.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 fo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fo.s(e,t)},S:function(e,t){return fo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return N1(r);case"XXXX":case"XX":return ra(r);case"XXXXX":case"XXX":default:return ra(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return N1(r);case"xxxx":case"xx":return ra(r);case"xxxxx":case"xxx":default:return ra(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+M1(r,":");case"OOOO":default:return"GMT"+ra(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+M1(r,":");case"zzzz":default:return"GMT"+ra(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,n){return Ge(+e,t.length)}};function M1(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+Ge(o,2)}function N1(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):ra(e,t)}function ra(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ge(Math.trunc(r/60),2),o=Ge(r%60,2);return n+i+t+o}const j1=(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"})}},EC=(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"})}},wF=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return j1(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}}",j1(r,t)).replace("{{time}}",EC(i,t))},Zg={p:EC,P:wF},_F=/^D+$/,SF=/^Y+$/,EF=["D","DD","YY","YYYY"];function OF(e){return _F.test(e)}function PF(e){return SF.test(e)}function CF(e,t,n){const r=kF(e,t,n);if(console.warn(r),EF.includes(e))throw new RangeError(r)}function kF(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 DF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AF=/^'([^]*?)'?$/,MF=/''/g,NF=/[a-zA-Z]/;function R1(e,t,n){const r=Va(),i=n?.locale??r.locale??_C,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=he(e,n?.in);if(!Ps(s))throw new RangeError("Invalid time value");let l=t.match(TF).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Zg[d];return f(u,i.formatLong)}return u}).join("").match(DF).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:jF(u)};if(A1[d])return{isToken:!0,value:u};if(d.match(NF))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&&PF(d)||!n?.useAdditionalDayOfYearTokens&&OF(d))&&CF(d,t,String(e));const f=A1[d[0]];return f(s,d,i.localize,c)}).join("")}function jF(e){const t=e.match(AF);return t?t[1].replace(MF,"'"):e}function I1(e,t){return he(e,t?.in).getDate()}function RF(e,t){return he(e,t?.in).getDay()}function IF(e,t){const n=he(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=Ze(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function LF(){return Object.assign({},Va())}function mn(e,t){return he(e,t?.in).getHours()}function FF(e,t){const n=he(e,t?.in).getDay();return n===0?7:n}function gn(e,t){return he(e,t?.in).getMinutes()}function Bn(e,t){return he(e,t?.in).getMonth()}function Eo(e){return he(e).getSeconds()}function Jg(e){return+he(e)}function Ee(e,t){return he(e,t?.in).getFullYear()}function Fi(e,t){return+he(e)>+he(t)}function ri(e,t){return+he(e)<+he(t)}function $F(e,t){return+he(e)==+he(t)}function BF(e,t){const n=WF(t)?new t(0):Ze(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function WF(e){return typeof e=="function"&&e.prototype?.constructor===e}const zF=10;class OC{subPriority=0;validate(t,n){return!0}}class VF extends OC{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 HF extends OC{priority=zF;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>Ze(n,r))}set(t,n){return n.timestampIsSet?t:Ze(t,BF(t,this.context))}}class Le{run(t,n,r,i){const o=this.parse(t,n,r,i);return o?{setter:new VF(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,n,r){return!0}}class YF extends Le{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 At={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}/},ti={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 Mt(e,t){return e&&{value:t(e.value),rest:e.rest}}function xt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ni(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*Ep+o*Sp+a*N5),rest:t.slice(n[0].length)}}function PC(e){return xt(At.anyDigitsSigned,e)}function Ct(e,t){switch(e){case 1:return xt(At.singleDigit,t);case 2:return xt(At.twoDigits,t);case 3:return xt(At.threeDigits,t);case 4:return xt(At.fourDigits,t);default:return xt(new RegExp("^\\d{1,"+e+"}"),t)}}function Qd(e,t){switch(e){case 1:return xt(At.singleDigitSigned,t);case 2:return xt(At.twoDigitsSigned,t);case 3:return xt(At.threeDigitsSigned,t);case 4:return xt(At.fourDigitsSigned,t);default:return xt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function My(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 CC(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 kC(e){return e%400===0||e%4===0&&e%100!==0}class UF extends Le{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 Mt(Ct(4,t),i);case"yo":return Mt(r.ordinalNumber(t,{unit:"year"}),i);default:return Mt(Ct(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=CC(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 KF extends Le{priority=130;parse(t,n,r){const i=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Mt(Ct(4,t),i);case"Yo":return Mt(r.ordinalNumber(t,{unit:"year"}),i);default:return Mt(Ct(n.length,t),i)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,i){const o=Ay(t,i);if(r.isTwoDigitYear){const s=CC(r.year,o);return t.setFullYear(s,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),Yi(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),Yi(t,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class qF extends Le{priority=130;parse(t,n){return Qd(n==="R"?4:n.length,t)}set(t,n,r){const i=Ze(t,0);return i.setFullYear(r,0,4),i.setHours(0,0,0,0),Es(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class GF extends Le{priority=130;parse(t,n){return Qd(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 XF extends Le{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Ct(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 QF extends Le{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Ct(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 ZF extends Le{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 Mt(xt(At.month,t),i);case"MM":return Mt(Ct(2,t),i);case"Mo":return Mt(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 JF extends Le{priority=110;parse(t,n,r){const i=o=>o-1;switch(n){case"L":return Mt(xt(At.month,t),i);case"LL":return Mt(Ct(2,t),i);case"Lo":return Mt(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 e4(e,t,n){const r=he(e,n?.in),i=SC(r,n)-t;return r.setDate(r.getDate()-i*7),he(r,n?.in)}class t4 extends Le{priority=100;parse(t,n,r){switch(n){case"w":return xt(At.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Ct(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,i){return Yi(e4(t,r,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function n4(e,t,n){const r=he(e,n?.in),i=Ty(r,n)-t;return r.setDate(r.getDate()-i*7),r}class r4 extends Le{priority=100;parse(t,n,r){switch(n){case"I":return xt(At.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Ct(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Es(n4(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const i4=[31,28,31,30,31,30,31,31,30,31,30,31],o4=[31,29,31,30,31,30,31,31,30,31,30,31];class a4 extends Le{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return xt(At.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Ct(n.length,t)}}validate(t,n){const r=t.getFullYear(),i=kC(r),o=t.getMonth();return i?n>=1&&n<=o4[o]:n>=1&&n<=i4[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 s4 extends Le{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return xt(At.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Ct(n.length,t)}}validate(t,n){const r=t.getFullYear();return kC(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 Ny(e,t,n){const r=Va(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=he(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 Lr(o,u,n)}class l4 extends Le{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=Ny(t,r,i),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class c4 extends Le{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 Mt(Ct(n.length,t),o);case"eo":return Mt(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=Ny(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 u4 extends Le{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 Mt(Ct(n.length,t),o);case"co":return Mt(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=Ny(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 d4(e,t,n){const r=he(e,n?.in),i=FF(r,n),o=t-i;return Lr(r,o,n)}class f4 extends Le{priority=90;parse(t,n,r){const i=o=>o===0?7:o;switch(n){case"i":case"ii":return Ct(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Mt(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 Mt(r.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Mt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Mt(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=d4(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 p4 extends Le{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(My(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class h4 extends Le{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(My(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class m4 extends Le{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(My(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class g4 extends Le{priority=70;parse(t,n,r){switch(n){case"h":return xt(At.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 v4 extends Le{priority=70;parse(t,n,r){switch(n){case"H":return xt(At.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 y4 extends Le{priority=70;parse(t,n,r){switch(n){case"K":return xt(At.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 b4 extends Le{priority=70;parse(t,n,r){switch(n){case"k":return xt(At.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 x4 extends Le{priority=60;parse(t,n,r){switch(n){case"m":return xt(At.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Ct(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 w4 extends Le{priority=50;parse(t,n,r){switch(n){case"s":return xt(At.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Ct(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 _4 extends Le{priority=30;parse(t,n){const r=i=>Math.trunc(i*Math.pow(10,-n.length+3));return Mt(Ct(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class S4 extends Le{priority=10;parse(t,n){switch(n){case"X":return ni(ti.basicOptionalMinutes,t);case"XX":return ni(ti.basic,t);case"XXXX":return ni(ti.basicOptionalSeconds,t);case"XXXXX":return ni(ti.extendedOptionalSeconds,t);case"XXX":default:return ni(ti.extended,t)}}set(t,n,r){return n.timestampIsSet?t:Ze(t,t.getTime()-Ud(t)-r)}incompatibleTokens=["t","T","x"]}class E4 extends Le{priority=10;parse(t,n){switch(n){case"x":return ni(ti.basicOptionalMinutes,t);case"xx":return ni(ti.basic,t);case"xxxx":return ni(ti.basicOptionalSeconds,t);case"xxxxx":return ni(ti.extendedOptionalSeconds,t);case"xxx":default:return ni(ti.extended,t)}}set(t,n,r){return n.timestampIsSet?t:Ze(t,t.getTime()-Ud(t)-r)}incompatibleTokens=["t","T","X"]}class O4 extends Le{priority=40;parse(t){return PC(t)}set(t,n,r){return[Ze(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class P4 extends Le{priority=20;parse(t){return PC(t)}set(t,n,r){return[Ze(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const C4={G:new YF,y:new UF,Y:new KF,R:new qF,u:new GF,Q:new XF,q:new QF,M:new ZF,L:new JF,w:new t4,I:new r4,d:new a4,D:new s4,E:new l4,e:new c4,c:new u4,i:new f4,a:new p4,b:new h4,B:new m4,h:new g4,H:new v4,K:new y4,k:new b4,m:new x4,s:new w4,S:new _4,X:new S4,x:new E4,t:new O4,T:new P4},k4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,D4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,T4=/^'([^]*?)'?$/,A4=/''/g,M4=/\S/,N4=/[a-zA-Z]/;function j4(e,t,n,r){const i=()=>Ze(r?.in||n,NaN),o=LF(),a=r?.locale??o.locale??_C,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():he(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new HF(r?.in,n)],d=t.match(D4).map(g=>{const y=g[0];if(y in Zg){const S=Zg[y];return S(g,a.formatLong)}return g}).join("").match(k4),f=[];for(let g of d){const y=g[0],S=C4[y];if(S){const{incompatibleTokens:w}=S;if(Array.isArray(w)){const _=f.find(E=>w.includes(E.token)||E.token===y);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${g}\` at the same time`)}else if(S.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);f.push({token:y,fullToken:g});const x=S.run(e,g,a.match,c);if(!x)return i();u.push(x.setter),e=x.rest}else{if(y.match(N4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(g==="''"?g="'":y==="'"&&(g=R4(g)),e.indexOf(g)===0)e=e.slice(g.length);else return i()}}if(e.length>0&&M4.test(e))return i();const p=u.map(g=>g.priority).sort((g,y)=>y-g).filter((g,y,S)=>S.indexOf(g)===y).map(g=>u.filter(y=>y.priority===g).sort((y,S)=>S.subPriority-y.subPriority)).map(g=>g[0]);let m=he(n,r?.in);if(isNaN(+m))return i();const h={};for(const g of p){if(!g.validate(m,c))return i();const y=g.set(m,h,c);Array.isArray(y)?(m=y[0],Object.assign(h,y[1])):m=y}return m}function R4(e){return e.match(T4)[1].replace(A4,"'")}function I4(e,t,n){const[r,i]=eo(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function L4(e,t,n){const[r,i]=eo(n?.in,e,t);return+Qg(r)==+Qg(i)}function F4(e,t,n){const[r,i]=eo(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function vc(e,t,n){const r=+he(e,n?.in),[i,o]=[+he(t.start,n?.in),+he(t.end,n?.in)].sort((a,s)=>a-s);return r>=i&&r<=o}function $4(e,t,n){return Lr(e,-1,n)}function B4(e,t){const n=()=>Ze(t?.in,NaN),i=H4(e);let o;if(i.date){const c=Y4(i.date,2);o=U4(c.restDateString,c.year)}if(!o||isNaN(+o))return n();const a=+o;let s=0,l;if(i.time&&(s=K4(i.time),isNaN(s)))return n();if(i.timezone){if(l=q4(i.timezone),isNaN(l))return n()}else{const c=new Date(a+s),u=he(0,t?.in);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return he(a+s+l,t?.in)}const Au={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},W4=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,z4=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,V4=/^([+-])(\d{2})(?::?(\d{2}))?$/;function H4(e){const t={},n=e.split(Au.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Au.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Au.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Au.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Y4(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 U4(e,t){if(t===null)return new Date(NaN);const n=e.match(W4);if(!n)return new Date(NaN);const r=!!n[4],i=xl(n[1]),o=xl(n[2])-1,a=xl(n[3]),s=xl(n[4]),l=xl(n[5])-1;if(r)return J4(t,s,l)?G4(t,s,l):new Date(NaN);{const c=new Date(0);return!Q4(t,o,a)||!Z4(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}}function xl(e){return e?parseInt(e):1}function K4(e){const t=e.match(z4);if(!t)return NaN;const n=Lh(t[1]),r=Lh(t[2]),i=Lh(t[3]);return e$(n,r,i)?n*Ep+r*Sp+i*1e3:NaN}function Lh(e){return e&&parseFloat(e.replace(",","."))||0}function q4(e){if(e==="Z")return 0;const t=e.match(V4);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return t$(r,i)?n*(r*Ep+i*Sp):NaN}function G4(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 X4=[31,null,31,30,31,30,31,31,30,31,30,31];function DC(e){return e%400===0||e%4===0&&e%100!==0}function Q4(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(X4[t]||(DC(e)?29:28))}function Z4(e,t){return t>=1&&t<=(DC(e)?366:365)}function J4(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function e$(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function t$(e,t){return t>=0&&t<=59}function er(e,t,n){const r=he(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=Ze(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=IF(a);return r.setMonth(t,Math.min(o,s)),r}function Ad(e,t,n){const r=he(e,n?.in);return r.setHours(t),r}function Md(e,t,n){const r=he(e,n?.in);return r.setMinutes(t),r}function us(e,t,n){const r=he(e,n?.in),i=Math.trunc(r.getMonth()/3)+1,o=t-i;return er(r,r.getMonth()+o*3)}function Nd(e,t,n){const r=he(e,n?.in);return r.setSeconds(t),r}function Xr(e,t,n){const r=he(e,n?.in);return isNaN(+r)?Ze(e,NaN):(r.setFullYear(t),r)}function _a(e,t,n){return $r(e,-t,n)}function TC(e,t,n){return Dy(e,-1,n)}function L1(e,t,n){return Kd(e,-1,n)}function Ao(e,t,n){return Fr(e,-t,n)}function Pp(){return typeof window<"u"}function Ks(e){return AC(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vi(e){var t;return(t=(AC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AC(e){return Pp()?e instanceof Node||e instanceof sr(e).Node:!1}function yn(e){return Pp()?e instanceof Element||e instanceof sr(e).Element:!1}function pi(e){return Pp()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function F1(e){return!Pp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}const n$=new Set(["inline","contents"]);function qc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!n$.has(i)}const r$=new Set(["table","td","th"]);function i$(e){return r$.has(Ks(e))}const o$=[":popover-open",":modal"];function Cp(e){return o$.some(t=>{try{return e.matches(t)}catch{return!1}})}const a$=["transform","translate","scale","rotate","perspective"],s$=["transform","translate","scale","rotate","perspective","filter"],l$=["paint","layout","strict","content"];function jy(e){const t=Ry(),n=yn(e)?Pr(e):e;return a$.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)||s$.some(r=>(n.willChange||"").includes(r))||l$.some(r=>(n.contain||"").includes(r))}function c$(e){let t=Mo(e);for(;pi(t)&&!Cs(t);){if(jy(t))return t;if(Cp(t))return null;t=Mo(t)}return null}function Ry(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const u$=new Set(["html","body","#document"]);function Cs(e){return u$.has(Ks(e))}function Pr(e){return sr(e).getComputedStyle(e)}function kp(e){return yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mo(e){if(Ks(e)==="html")return e;const t=e.assignedSlot||e.parentNode||F1(e)&&e.host||vi(e);return F1(t)?t.host:t}function MC(e){const t=Mo(e);return Cs(t)?e.ownerDocument?e.ownerDocument.body:e.body:pi(t)&&qc(t)?t:MC(t)}function yc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=MC(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=sr(i);if(o){const s=ev(a);return t.concat(a,a.visualViewport||[],qc(i)?i:[],s&&n?yc(s):[])}return t.concat(i,yc(i,[],n))}function ev(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ks=Math.min,Sa=Math.max,Zd=Math.round,Mu=Math.floor,li=e=>({x:e,y:e}),d$={left:"right",right:"left",bottom:"top",top:"bottom"},f$={start:"end",end:"start"};function p$(e,t,n){return Sa(e,ks(t,n))}function Dp(e,t){return typeof e=="function"?e(t):e}function Ds(e){return e.split("-")[0]}function Gc(e){return e.split("-")[1]}function h$(e){return e==="x"?"y":"x"}function Iy(e){return e==="y"?"height":"width"}const m$=new Set(["top","bottom"]);function ha(e){return m$.has(Ds(e))?"y":"x"}function Ly(e){return h$(ha(e))}function g$(e,t,n){n===void 0&&(n=!1);const r=Gc(e),i=Ly(e),o=Iy(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Jd(a)),[a,Jd(a)]}function v$(e){const t=Jd(e);return[tv(e),t,tv(t)]}function tv(e){return e.replace(/start|end/g,t=>f$[t])}const $1=["left","right"],B1=["right","left"],y$=["top","bottom"],b$=["bottom","top"];function x$(e,t,n){switch(e){case"top":case"bottom":return n?t?B1:$1:t?$1:B1;case"left":case"right":return t?y$:b$;default:return[]}}function w$(e,t,n,r){const i=Gc(e);let o=x$(Ds(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(tv)))),o}function Jd(e){return e.replace(/left|right|bottom|top/g,t=>d$[t])}function _$(e){return{top:0,right:0,bottom:0,left:0,...e}}function NC(e){return typeof e!="number"?_$(e):{top:e,right:e,bottom:e,left:e}}function ef(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 S$=typeof document<"u",E$=function(){},tf=S$?k.useLayoutEffect:E$;const O$={...P},P$=O$.useInsertionEffect,C$=P$||(e=>e());function k$(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return C$(()=>{t.current=e}),P.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 W1(e,t,n){let{reference:r,floating:i}=e;const o=ha(t),a=Ly(t),s=Iy(a),l=Ds(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(Gc(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const D$=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}=W1(c,r,l),f=r,p={},m=0;for(let h=0;h<s.length;h++){const{name:g,fn:y}=s[h],{x:S,y:w,data:x,reset:_}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=S??u,d=w??d,p={...p,[g]:{...p[g],...x}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:u,y:d}=W1(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function T$(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}=Dp(t,e),m=NC(p),g=s[f?d==="floating"?"reference":"floating":d],y=ef(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),S=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)),x=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},_=ef(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:S,offsetParent:w,strategy:l}):S);return{top:(y.top-_.top+m.top)/x.y,bottom:(_.bottom-y.bottom+m.bottom)/x.y,left:(y.left-_.left+m.left)/x.x,right:(_.right-y.right+m.right)/x.x}}const A$=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}=Dp(e,t)||{};if(c==null)return{};const d=NC(u),f={x:n,y:r},p=Ly(i),m=Iy(p),h=await a.getDimensions(c),g=p==="y",y=g?"top":"left",S=g?"bottom":"right",w=g?"clientHeight":"clientWidth",x=o.reference[m]+o.reference[p]-f[p]-o.floating[m],_=f[p]-o.reference[p],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=E?E[w]:0;(!C||!await(a.isElement==null?void 0:a.isElement(E)))&&(C=s.floating[w]||o.floating[m]);const D=x/2-_/2,A=C/2-h[m]/2-1,R=ks(d[y],A),T=ks(d[S],A),O=R,N=C-h[m]-T,M=C/2-h[m]/2+D,I=p$(O,M,N),L=!l.arrow&&Gc(i)!=null&&M!==I&&o.reference[m]/2-(M<O?R:T)-h[m]/2<0,$=L?M<O?M-O:M-N:0;return{[p]:f[p]+$,data:{[p]:I,centerOffset:M-I-$,...L&&{alignmentOffset:$}},reset:L}}}),M$=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:h=!0,...g}=Dp(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Ds(i),S=ha(s),w=Ds(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(w||!h?[Jd(s)]:v$(s)),E=m!=="none";!f&&E&&_.push(...w$(s,h,m,x));const C=[s,..._],D=await T$(t,g),A=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&A.push(D[y]),d){const M=g$(i,a,x);A.push(D[M[0]],D[M[1]])}if(R=[...R,{placement:i,overflows:A}],!A.every(M=>M<=0)){var T,O;const M=(((T=o.flip)==null?void 0:T.index)||0)+1,I=C[M];if(I&&(!(d==="alignment"?S!==ha(I):!1)||R.every(V=>ha(V.placement)===S?V.overflows[0]>0:!0)))return{data:{index:M,overflows:R},reset:{placement:I}};let L=(O=R.filter($=>$.overflows[0]<=0).sort(($,V)=>$.overflows[1]-V.overflows[1])[0])==null?void 0:O.placement;if(!L)switch(p){case"bestFit":{var N;const $=(N=R.filter(V=>{if(E){const W=ha(V.placement);return W===S||W==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(W=>W>0).reduce((W,B)=>W+B,0)]).sort((V,W)=>V[1]-W[1])[0])==null?void 0:N[0];$&&(L=$);break}case"initialPlacement":L=s;break}if(i!==L)return{reset:{placement:L}}}return{}}}},N$=new Set(["left","top"]);async function j$(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ds(n),s=Gc(n),l=ha(n)==="y",c=N$.has(a)?-1:1,u=o&&l?-1:1,d=Dp(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 R$=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 j$(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 jC(e){const t=Pr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=pi(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Zd(n)!==o||Zd(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Fy(e){return yn(e)?e:e.contextElement}function gs(e){const t=Fy(e);if(!pi(t))return li(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=jC(t);let a=(o?Zd(n.width):n.width)/r,s=(o?Zd(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const I$=li(0);function RC(e){const t=sr(e);return!Ry()||!t.visualViewport?I$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function L$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sr(e)?!1:t}function Ma(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Fy(e);let a=li(1);t&&(r?yn(r)&&(a=gs(r)):a=gs(e));const s=L$(o,n,r)?RC(o):li(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&&yn(r)?sr(r):r;let m=f,h=ev(m);for(;h&&r&&p!==m;){const g=gs(h),y=h.getBoundingClientRect(),S=Pr(h),w=y.left+(h.clientLeft+parseFloat(S.paddingLeft))*g.x,x=y.top+(h.clientTop+parseFloat(S.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=x,m=sr(h),h=ev(m)}}return ef({width:u,height:d,x:l,y:c})}function Tp(e,t){const n=kp(e).scrollLeft;return t?t.left+n:Ma(vi(e)).left+n}function IC(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Tp(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function F$(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=vi(r),s=t?Cp(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=li(1);const u=li(0),d=pi(r);if((d||!d&&!o)&&((Ks(r)!=="body"||qc(a))&&(l=kp(r)),pi(r))){const p=Ma(r);c=gs(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!o?IC(a,l):li(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 $$(e){return Array.from(e.getClientRects())}function B$(e){const t=vi(e),n=kp(e),r=e.ownerDocument.body,i=Sa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Sa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Tp(e);const s=-n.scrollTop;return Pr(r).direction==="rtl"&&(a+=Sa(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}const z1=25;function W$(e,t){const n=sr(e),r=vi(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=Ry();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=Tp(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<=z1&&(o-=m)}else c<=z1&&(o+=c);return{width:o,height:a,x:s,y:l}}const z$=new Set(["absolute","fixed"]);function V$(e,t){const n=Ma(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=pi(e)?gs(e):li(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 V1(e,t,n){let r;if(t==="viewport")r=W$(e,n);else if(t==="document")r=B$(vi(e));else if(yn(t))r=V$(t,n);else{const i=RC(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ef(r)}function LC(e,t){const n=Mo(e);return n===t||!yn(n)||Cs(n)?!1:Pr(n).position==="fixed"||LC(n,t)}function H$(e,t){const n=t.get(e);if(n)return n;let r=yc(e,[],!1).filter(s=>yn(s)&&Ks(s)!=="body"),i=null;const o=Pr(e).position==="fixed";let a=o?Mo(e):e;for(;yn(a)&&!Cs(a);){const s=Pr(a),l=jy(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&z$.has(i.position)||qc(a)&&!l&&LC(e,a))?r=r.filter(u=>u!==a):i=s,a=Mo(a)}return t.set(e,r),r}function Y$(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Cp(t)?[]:H$(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=V1(t,u,i);return c.top=Sa(d.top,c.top),c.right=ks(d.right,c.right),c.bottom=ks(d.bottom,c.bottom),c.left=Sa(d.left,c.left),c},V1(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function U$(e){const{width:t,height:n}=jC(e);return{width:t,height:n}}function K$(e,t,n){const r=pi(t),i=vi(t),o=n==="fixed",a=Ma(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=li(0);function c(){l.x=Tp(i)}if(r||!r&&!o)if((Ks(t)!=="body"||qc(i))&&(s=kp(t)),r){const p=Ma(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?IC(i,s):li(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 Fh(e){return Pr(e).position==="static"}function H1(e,t){if(!pi(e)||Pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vi(e)===n&&(n=n.ownerDocument.body),n}function FC(e,t){const n=sr(e);if(Cp(e))return n;if(!pi(e)){let i=Mo(e);for(;i&&!Cs(i);){if(yn(i)&&!Fh(i))return i;i=Mo(i)}return n}let r=H1(e,t);for(;r&&i$(r)&&Fh(r);)r=H1(r,t);return r&&Cs(r)&&Fh(r)&&!jy(r)?n:r||c$(e)||n}const q$=async function(e){const t=this.getOffsetParent||FC,n=this.getDimensions,r=await n(e.floating);return{reference:K$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G$(e){return Pr(e).direction==="rtl"}const X$={convertOffsetParentRelativeRectToViewportRelativeRect:F$,getDocumentElement:vi,getClippingRect:Y$,getOffsetParent:FC,getElementRects:q$,getClientRects:$$,getDimensions:U$,getScale:gs,isElement:yn,isRTL:G$};function $C(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q$(e,t){let n=null,r;const i=vi(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=Mu(d),h=Mu(i.clientWidth-(u+f)),g=Mu(i.clientHeight-(d+p)),y=Mu(u),w={rootMargin:-m+"px "+-h+"px "+-g+"px "+-y+"px",threshold:Sa(0,ks(1,l))||1};let x=!0;function _(E){const C=E[0].intersectionRatio;if(C!==l){if(!x)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!$C(c,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(_,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,w)}n.observe(e)}return a(!0),o}function Z$(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=Fy(e),u=i||o?[...c?yc(c):[],...yc(t)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&s?Q$(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[S]=y;S&&S.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,h=l?Ma(e):null;l&&g();function g(){const y=Ma(e);h&&!$C(h,y)&&n(),h=y,m=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(S=>{i&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const J$=R$,eB=M$,Y1=A$,tB=(e,t,n)=>{const r=new Map,i={platform:X$,...n},o={...i.platform,_c:r};return D$(e,t,{...i,platform:o})};var nB=typeof document<"u",rB=function(){},jd=nB?k.useLayoutEffect:rB;function nf(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(!nf(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)&&!nf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function BC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function U1(e,t){const n=BC(e);return Math.round(t*n)/n}function $h(e){const t=P.useRef(e);return jd(()=>{t.current=e}),t}function iB(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]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);nf(f,r)||p(r);const[m,h]=P.useState(null),[g,y]=P.useState(null),S=P.useCallback(V=>{V!==E.current&&(E.current=V,h(V))},[]),w=P.useCallback(V=>{V!==C.current&&(C.current=V,y(V))},[]),x=o||m,_=a||g,E=P.useRef(null),C=P.useRef(null),D=P.useRef(u),A=l!=null,R=$h(l),T=$h(i),O=$h(c),N=P.useCallback(()=>{if(!E.current||!C.current)return;const V={placement:t,strategy:n,middleware:f};T.current&&(V.platform=T.current),tB(E.current,C.current,V).then(W=>{const B={...W,isPositioned:O.current!==!1};M.current&&!nf(D.current,B)&&(D.current=B,T2.flushSync(()=>{d(B)}))})},[f,t,n,T,O]);jd(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[c]);const M=P.useRef(!1);jd(()=>(M.current=!0,()=>{M.current=!1}),[]),jd(()=>{if(x&&(E.current=x),_&&(C.current=_),x&&_){if(R.current)return R.current(x,_,N);N()}},[x,_,N,R,A]);const I=P.useMemo(()=>({reference:E,floating:C,setReference:S,setFloating:w}),[S,w]),L=P.useMemo(()=>({reference:x,floating:_}),[x,_]),$=P.useMemo(()=>{const V={position:n,left:0,top:0};if(!L.floating)return V;const W=U1(L.floating,u.x),B=U1(L.floating,u.y);return s?{...V,transform:"translate("+W+"px, "+B+"px)",...BC(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:B}},[n,s,L.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:N,refs:I,elements:L,floatingStyles:$}),[u,N,I,L,$])}const oB=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?Y1({element:r.current,padding:i}).fn(n):{}:r?Y1({element:r,padding:i}).fn(n):{}}}},aB=(e,t)=>({...J$(e),options:[e,t]}),sB=(e,t)=>({...eB(e),options:[e,t]}),lB=(e,t)=>({...oB(e),options:[e,t]}),cB={...P};let K1=!1,uB=0;const q1=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uB++;function dB(){const[e,t]=P.useState(()=>K1?q1():void 0);return tf(()=>{e==null&&t(q1())},[]),P.useEffect(()=>{K1=!0},[]),e}const fB=cB.useId,WC=fB||dB;let bc;process.env.NODE_ENV!=="production"&&(bc=new Set);function pB(){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=bc)!=null&&e.has(i))){var o;(o=bc)==null||o.add(i),console.warn(i)}}function hB(){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=bc)!=null&&e.has(i))){var o;(o=bc)==null||o.add(i),console.error(i)}}const mB=P.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,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||pB("The `ref` prop is required for `FloatingArrow`."));const y=WC(),[S,w]=P.useState(!1);if(tf(()=>{if(!i)return;Pr(i).direction==="rtl"&&w(!0)},[i]),!i)return null;const[x,_]=r.split("-"),E=x==="top"||x==="bottom";let C=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(C=null);const D=u*2,A=D/2,R=s/2*(c/-8+1),T=l/2*c/4,O=!!p,N=C&&_==="end"?"bottom":"top";let M=C&&_==="end"?"right":"left";C&&S&&(M=_==="end"?"left":"right");const I=o?.x!=null?C||o.x:"",L=o?.y!=null?C||o.y:"",$=p||"M0,0"+(" H"+s)+(" L"+(s-R)+","+(l-T))+(" Q"+s/2+","+l+" "+R+","+(l-T))+" Z",V={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[x];return b.jsxs("svg",{...g,"aria-hidden":!0,ref:n,width:O?s:s+D,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[M]:I,[N]:L,[x]:E||O?"100%":"calc(100% - "+D/2+"px)",transform:[V,m].filter(W=>!!W).join(" "),...h},children:[D>0&&b.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:D+(p?0:1),d:$}),b.jsx("path",{stroke:D&&!p?g.fill:"none",d:$}),b.jsx("clipPath",{id:y,children:b.jsx("rect",{x:-A,y:A*(O?-1:1),width:s+D,height:s})})]})});function gB(){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 vB=P.createContext(null),yB=P.createContext(null),bB=()=>{var e;return((e=P.useContext(vB))==null?void 0:e.id)||null},xB=()=>P.useContext(yB);function wB(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=WC(),o=P.useRef({}),[a]=P.useState(()=>gB()),s=bB()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!yn(p)&&hB("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]=P.useState(r.reference),u=k$((p,m,h)=>{o.current.openEvent=p?m:void 0,a.emit("openchange",{open:p,event:m,reason:h,nested:s}),n?.(p,m,h)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:o,open:t,onOpenChange:u,elements:f,events:a,floatingId:i,refs:d}),[t,u,f,a,i,d])}function _B(e){e===void 0&&(e={});const{nodeId:t}=e,n=wB({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=P.useState(null),[s,l]=P.useState(null),u=i?.domReference||o,d=P.useRef(null),f=xB();tf(()=>{u&&(d.current=u)},[u]);const p=iB({...e,elements:{...i,...s&&{reference:s}}}),m=P.useCallback(w=>{const x=yn(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(x),p.refs.setReference(x)},[p.refs]),h=P.useCallback(w=>{(yn(w)||w===null)&&(d.current=w,a(w)),(yn(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!yn(w))&&p.refs.setReference(w)},[p.refs]),g=P.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:d}),[p.refs,h,m]),y=P.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),S=P.useMemo(()=>({...p,...r,refs:g,elements:y,nodeId:t}),[p,g,y,t,r]);return tf(()=>{r.dataRef.current.floatingContext=S;const w=f?.nodesRef.current.find(x=>x.id===t);w&&(w.context=S)}),P.useMemo(()=>({...p,context:S,refs:g,elements:y}),[p,g,y,S])}/*!
119
+ `))},[JSON.stringify(n)])}const c=P.useCallback(u=>{o||s(u)},[]);return[l,c]}function mc(e){const t=P.useRef(e);return Vi(()=>{t.current=e}),P.useRef((...n)=>(0,t.current)(...n)).current}function kn(...e){const t=P.useRef(void 0),n=P.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 P.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function O5(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function P5(e,t){if(!e)return t;function n(a,s){const l={};return Object.keys(s).forEach(c=>{O5(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=oe(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=oe(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 C5=Bo(b.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"),Kc=Bo(b.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"),k5=Bo(b.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"),D5=Bo(b.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"}),"KeyboardArrowDown"),An=Bo(b.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNewOutlined"),T5=Bo(b.jsx("path",{d:"M16 6v8h3v8h2V2c-2.76 0-5 2.24-5 4m-5 3H9V2H7v7H5V2H3v7c0 2.21 1.79 4 4 4v9h2v-9c2.21 0 4-1.79 4-4V2h-2z"}),"RestaurantOutlined"),A5=Bo(b.jsx("path",{fillRule:"evenodd",d:"M14 6V4h-4v2zM4 8v11h16V8zm16-2c1.11 0 2 .89 2 2v11c0 1.11-.89 2-2 2H4c-1.11 0-2-.89-2-2l.01-11c0-1.11.88-2 1.99-2h4V4c0-1.11.89-2 2-2h4c1.11 0 2 .89 2 2v2z"}),"WorkOutline"),mC=6048e5,M5=864e5,Sp=6e4,Ep=36e5,N5=1e3,C1=Symbol.for("constructDateFrom");function Ze(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&C1 in e?e[C1](t):e instanceof Date?new e.constructor(t):new Date(t)}function he(e,t){return Ze(t||e,e)}function Lr(e,t,n){const r=he(e,n?.in);return isNaN(t)?Ze(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function $r(e,t,n){const r=he(e,n?.in);if(isNaN(t))return Ze(e,NaN);if(!t)return r;const i=r.getDate(),o=Ze(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 gC(e,t,n){return Ze(e,+he(e)+t)}function j5(e,t,n){return gC(e,t*Ep)}let R5={};function Va(){return R5}function Yi(e,t){const n=Va(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=he(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 Es(e,t){return Yi(e,{...t,weekStartsOn:1})}function vC(e,t){const n=he(e,t?.in),r=n.getFullYear(),i=Ze(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=Es(i),a=Ze(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=Es(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ud(e){const t=he(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 eo(e,...t){const n=Ze.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Aa(e,t){const n=he(e,t?.in);return n.setHours(0,0,0,0),n}function Os(e,t,n){const[r,i]=eo(n?.in,e,t),o=Aa(r),a=Aa(i),s=+o-Ud(o),l=+a-Ud(a);return Math.round((s-l)/M5)}function I5(e,t){const n=vC(e,t),r=Ze(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Es(r)}function gc(e,t,n){const r=he(e,n?.in);return r.setTime(r.getTime()+t*Sp),r}function Dy(e,t,n){return $r(e,t*3,n)}function L5(e,t,n){return gC(e,t*1e3)}function Kd(e,t,n){return Lr(e,t*7,n)}function Fr(e,t,n){return $r(e,t*12,n)}function k1(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Ze.bind(null,i));const o=he(i,r);(!n||n<o||isNaN(+o))&&(n=o)}),Ze(r,n||NaN)}function D1(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=Ze.bind(null,i));const o=he(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),Ze(r,n||NaN)}function F5(e,t,n){const[r,i]=eo(n?.in,e,t);return+Aa(r)==+Aa(i)}function si(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ps(e){return!(!si(e)&&typeof e!="number"||isNaN(+he(e)))}function qd(e,t,n){const[r,i]=eo(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function yo(e,t){const n=he(e,t?.in);return Math.trunc(n.getMonth()/3)+1}function Gd(e,t,n){const[r,i]=eo(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=yo(r)-yo(i);return o*4+a}function Xd(e,t,n){const[r,i]=eo(n?.in,e,t);return r.getFullYear()-i.getFullYear()}function $5(e,t,n){const[r,i]=eo(n?.in,e,t),o=T1(r,i),a=Math.abs(Os(r,i));r.setDate(r.getDate()-o*a);const s=+(T1(r,i)===-o),l=o*(a-s);return l===0?0:l}function T1(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 yC(e,t){const n=he(e,t?.in);return n.setHours(23,59,59,999),n}function bC(e,t){const n=he(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Qg(e,t){const n=he(e,t?.in),r=n.getMonth(),i=r-r%3;return n.setMonth(i,1),n.setHours(0,0,0,0),n}function xC(e,t){const n=he(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function wC(e,t){const n=he(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function Op(e,t){const n=he(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function B5(e,t){const n=Va(),r=n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=he(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 W5={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"}},z5=(e,t,n)=>{let r;const i=W5[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 Ih(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const V5={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"},Y5={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U5={date:Ih({formats:V5,defaultWidth:"full"}),time:Ih({formats:H5,defaultWidth:"full"}),dateTime:Ih({formats:Y5,defaultWidth:"full"})},K5={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},q5=(e,t,n,r)=>K5[e];function yl(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 G5={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"]},Q5={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"]},Z5={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"]},J5={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"}},eF={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"}},tF=(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"},nF={ordinalNumber:tF,era:yl({values:G5,defaultWidth:"wide"}),quarter:yl({values:X5,defaultWidth:"wide",argumentCallback:e=>e-1}),month:yl({values:Q5,defaultWidth:"wide"}),day:yl({values:Z5,defaultWidth:"wide"}),dayPeriod:yl({values:J5,defaultWidth:"wide",formattingValues:eF,defaultFormattingWidth:"wide"})};function bl(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)?iF(s,d=>d.test(a)):rF(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 rF(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function iF(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function oF(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 aF=/^(\d+)(th|st|nd|rd)?/i,sF=/\d+/i,lF={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},cF={any:[/^b/i,/^(a|c)/i]},uF={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},dF={any:[/1/i,/2/i,/3/i,/4/i]},fF={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},pF={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]},hF={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},mF={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]},gF={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},vF={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}},yF={ordinalNumber:oF({matchPattern:aF,parsePattern:sF,valueCallback:e=>parseInt(e,10)}),era:bl({matchPatterns:lF,defaultMatchWidth:"wide",parsePatterns:cF,defaultParseWidth:"any"}),quarter:bl({matchPatterns:uF,defaultMatchWidth:"wide",parsePatterns:dF,defaultParseWidth:"any",valueCallback:e=>e+1}),month:bl({matchPatterns:fF,defaultMatchWidth:"wide",parsePatterns:pF,defaultParseWidth:"any"}),day:bl({matchPatterns:hF,defaultMatchWidth:"wide",parsePatterns:mF,defaultParseWidth:"any"}),dayPeriod:bl({matchPatterns:gF,defaultMatchWidth:"any",parsePatterns:vF,defaultParseWidth:"any"})},_C={code:"en-US",formatDistance:z5,formatLong:U5,formatRelative:q5,localize:nF,match:yF,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bF(e,t){const n=he(e,t?.in);return Os(n,Op(n))+1}function Ty(e,t){const n=he(e,t?.in),r=+Es(n)-+I5(n);return Math.round(r/mC)+1}function Ay(e,t){const n=he(e,t?.in),r=n.getFullYear(),i=Va(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=Ze(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Yi(a,t),l=Ze(t?.in||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const c=Yi(l,t);return+n>=+s?r+1:+n>=+c?r:r-1}function xF(e,t){const n=Va(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=Ay(e,t),o=Ze(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Yi(o,t)}function SC(e,t){const n=he(e,t?.in),r=+Yi(n,t)-+xF(n,t);return Math.round(r/mC)+1}function Ge(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const fo={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Ge(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Ge(n+1,2)},d(e,t){return Ge(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 Ge(e.getHours()%12||12,t.length)},H(e,t){return Ge(e.getHours(),t.length)},m(e,t){return Ge(e.getMinutes(),t.length)},s(e,t){return Ge(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Ge(i,t.length)}},ns={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},A1={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 fo.y(e,t)},Y:function(e,t,n,r){const i=Ay(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Ge(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Ge(o,t.length)},R:function(e,t){const n=vC(e);return Ge(n,t.length)},u:function(e,t){const n=e.getFullYear();return Ge(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 Ge(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 Ge(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 fo.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 Ge(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=SC(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Ge(i,t.length)},I:function(e,t,n){const r=Ty(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Ge(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):fo.d(e,t)},D:function(e,t,n){const r=bF(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Ge(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 Ge(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 Ge(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 Ge(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=ns.noon:r===0?i=ns.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=ns.evening:r>=12?i=ns.afternoon:r>=4?i=ns.morning:i=ns.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 fo.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):fo.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Ge(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):fo.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):fo.s(e,t)},S:function(e,t){return fo.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return N1(r);case"XXXX":case"XX":return ra(r);case"XXXXX":case"XXX":default:return ra(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return N1(r);case"xxxx":case"xx":return ra(r);case"xxxxx":case"xxx":default:return ra(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+M1(r,":");case"OOOO":default:return"GMT"+ra(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+M1(r,":");case"zzzz":default:return"GMT"+ra(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Ge(r,t.length)},T:function(e,t,n){return Ge(+e,t.length)}};function M1(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+Ge(o,2)}function N1(e,t){return e%60===0?(e>0?"-":"+")+Ge(Math.abs(e)/60,2):ra(e,t)}function ra(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Ge(Math.trunc(r/60),2),o=Ge(r%60,2);return n+i+t+o}const j1=(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"})}},EC=(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"})}},wF=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return j1(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}}",j1(r,t)).replace("{{time}}",EC(i,t))},Zg={p:EC,P:wF},_F=/^D+$/,SF=/^Y+$/,EF=["D","DD","YY","YYYY"];function OF(e){return _F.test(e)}function PF(e){return SF.test(e)}function CF(e,t,n){const r=kF(e,t,n);if(console.warn(r),EF.includes(e))throw new RangeError(r)}function kF(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 DF=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,TF=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,AF=/^'([^]*?)'?$/,MF=/''/g,NF=/[a-zA-Z]/;function R1(e,t,n){const r=Va(),i=n?.locale??r.locale??_C,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=he(e,n?.in);if(!Ps(s))throw new RangeError("Invalid time value");let l=t.match(TF).map(u=>{const d=u[0];if(d==="p"||d==="P"){const f=Zg[d];return f(u,i.formatLong)}return u}).join("").match(DF).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const d=u[0];if(d==="'")return{isToken:!1,value:jF(u)};if(A1[d])return{isToken:!0,value:u};if(d.match(NF))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&&PF(d)||!n?.useAdditionalDayOfYearTokens&&OF(d))&&CF(d,t,String(e));const f=A1[d[0]];return f(s,d,i.localize,c)}).join("")}function jF(e){const t=e.match(AF);return t?t[1].replace(MF,"'"):e}function I1(e,t){return he(e,t?.in).getDate()}function RF(e,t){return he(e,t?.in).getDay()}function IF(e,t){const n=he(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=Ze(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function LF(){return Object.assign({},Va())}function mn(e,t){return he(e,t?.in).getHours()}function FF(e,t){const n=he(e,t?.in).getDay();return n===0?7:n}function gn(e,t){return he(e,t?.in).getMinutes()}function Bn(e,t){return he(e,t?.in).getMonth()}function Eo(e){return he(e).getSeconds()}function Jg(e){return+he(e)}function Ee(e,t){return he(e,t?.in).getFullYear()}function Fi(e,t){return+he(e)>+he(t)}function ri(e,t){return+he(e)<+he(t)}function $F(e,t){return+he(e)==+he(t)}function BF(e,t){const n=WF(t)?new t(0):Ze(t,0);return n.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),n.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),n}function WF(e){return typeof e=="function"&&e.prototype?.constructor===e}const zF=10;class OC{subPriority=0;validate(t,n){return!0}}class VF extends OC{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 HF extends OC{priority=zF;subPriority=-1;constructor(t,n){super(),this.context=t||(r=>Ze(n,r))}set(t,n){return n.timestampIsSet?t:Ze(t,BF(t,this.context))}}class Le{run(t,n,r,i){const o=this.parse(t,n,r,i);return o?{setter:new VF(o.value,this.validate,this.set,this.priority,this.subPriority),rest:o.rest}:null}validate(t,n,r){return!0}}class YF extends Le{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 At={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}/},ti={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 Mt(e,t){return e&&{value:t(e.value),rest:e.rest}}function xt(e,t){const n=t.match(e);return n?{value:parseInt(n[0],10),rest:t.slice(n[0].length)}:null}function ni(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*Ep+o*Sp+a*N5),rest:t.slice(n[0].length)}}function PC(e){return xt(At.anyDigitsSigned,e)}function Ct(e,t){switch(e){case 1:return xt(At.singleDigit,t);case 2:return xt(At.twoDigits,t);case 3:return xt(At.threeDigits,t);case 4:return xt(At.fourDigits,t);default:return xt(new RegExp("^\\d{1,"+e+"}"),t)}}function Qd(e,t){switch(e){case 1:return xt(At.singleDigitSigned,t);case 2:return xt(At.twoDigitsSigned,t);case 3:return xt(At.threeDigitsSigned,t);case 4:return xt(At.fourDigitsSigned,t);default:return xt(new RegExp("^-?\\d{1,"+e+"}"),t)}}function My(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 CC(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 kC(e){return e%400===0||e%4===0&&e%100!==0}class UF extends Le{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 Mt(Ct(4,t),i);case"yo":return Mt(r.ordinalNumber(t,{unit:"year"}),i);default:return Mt(Ct(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=CC(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 KF extends Le{priority=130;parse(t,n,r){const i=o=>({year:o,isTwoDigitYear:n==="YY"});switch(n){case"Y":return Mt(Ct(4,t),i);case"Yo":return Mt(r.ordinalNumber(t,{unit:"year"}),i);default:return Mt(Ct(n.length,t),i)}}validate(t,n){return n.isTwoDigitYear||n.year>0}set(t,n,r,i){const o=Ay(t,i);if(r.isTwoDigitYear){const s=CC(r.year,o);return t.setFullYear(s,0,i.firstWeekContainsDate),t.setHours(0,0,0,0),Yi(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),Yi(t,i)}incompatibleTokens=["y","R","u","Q","q","M","L","I","d","D","i","t","T"]}class qF extends Le{priority=130;parse(t,n){return Qd(n==="R"?4:n.length,t)}set(t,n,r){const i=Ze(t,0);return i.setFullYear(r,0,4),i.setHours(0,0,0,0),Es(i)}incompatibleTokens=["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]}class GF extends Le{priority=130;parse(t,n){return Qd(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 XF extends Le{priority=120;parse(t,n,r){switch(n){case"Q":case"QQ":return Ct(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 QF extends Le{priority=120;parse(t,n,r){switch(n){case"q":case"qq":return Ct(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 ZF extends Le{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 Mt(xt(At.month,t),i);case"MM":return Mt(Ct(2,t),i);case"Mo":return Mt(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 JF extends Le{priority=110;parse(t,n,r){const i=o=>o-1;switch(n){case"L":return Mt(xt(At.month,t),i);case"LL":return Mt(Ct(2,t),i);case"Lo":return Mt(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 e4(e,t,n){const r=he(e,n?.in),i=SC(r,n)-t;return r.setDate(r.getDate()-i*7),he(r,n?.in)}class t4 extends Le{priority=100;parse(t,n,r){switch(n){case"w":return xt(At.week,t);case"wo":return r.ordinalNumber(t,{unit:"week"});default:return Ct(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r,i){return Yi(e4(t,r,i),i)}incompatibleTokens=["y","R","u","q","Q","M","L","I","d","D","i","t","T"]}function n4(e,t,n){const r=he(e,n?.in),i=Ty(r,n)-t;return r.setDate(r.getDate()-i*7),r}class r4 extends Le{priority=100;parse(t,n,r){switch(n){case"I":return xt(At.week,t);case"Io":return r.ordinalNumber(t,{unit:"week"});default:return Ct(n.length,t)}}validate(t,n){return n>=1&&n<=53}set(t,n,r){return Es(n4(t,r))}incompatibleTokens=["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]}const i4=[31,28,31,30,31,30,31,31,30,31,30,31],o4=[31,29,31,30,31,30,31,31,30,31,30,31];class a4 extends Le{priority=90;subPriority=1;parse(t,n,r){switch(n){case"d":return xt(At.date,t);case"do":return r.ordinalNumber(t,{unit:"date"});default:return Ct(n.length,t)}}validate(t,n){const r=t.getFullYear(),i=kC(r),o=t.getMonth();return i?n>=1&&n<=o4[o]:n>=1&&n<=i4[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 s4 extends Le{priority=90;subpriority=1;parse(t,n,r){switch(n){case"D":case"DD":return xt(At.dayOfYear,t);case"Do":return r.ordinalNumber(t,{unit:"date"});default:return Ct(n.length,t)}}validate(t,n){const r=t.getFullYear();return kC(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 Ny(e,t,n){const r=Va(),i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=he(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 Lr(o,u,n)}class l4 extends Le{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=Ny(t,r,i),t.setHours(0,0,0,0),t}incompatibleTokens=["D","i","e","c","t","T"]}class c4 extends Le{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 Mt(Ct(n.length,t),o);case"eo":return Mt(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=Ny(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 u4 extends Le{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 Mt(Ct(n.length,t),o);case"co":return Mt(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=Ny(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 d4(e,t,n){const r=he(e,n?.in),i=FF(r,n),o=t-i;return Lr(r,o,n)}class f4 extends Le{priority=90;parse(t,n,r){const i=o=>o===0?7:o;switch(n){case"i":case"ii":return Ct(n.length,t);case"io":return r.ordinalNumber(t,{unit:"day"});case"iii":return Mt(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 Mt(r.day(t,{width:"narrow",context:"formatting"}),i);case"iiiiii":return Mt(r.day(t,{width:"short",context:"formatting"})||r.day(t,{width:"narrow",context:"formatting"}),i);case"iiii":default:return Mt(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=d4(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 p4 extends Le{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(My(r),0,0,0),t}incompatibleTokens=["b","B","H","k","t","T"]}class h4 extends Le{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(My(r),0,0,0),t}incompatibleTokens=["a","B","H","k","t","T"]}class m4 extends Le{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(My(r),0,0,0),t}incompatibleTokens=["a","b","t","T"]}class g4 extends Le{priority=70;parse(t,n,r){switch(n){case"h":return xt(At.hour12h,t);case"ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 v4 extends Le{priority=70;parse(t,n,r){switch(n){case"H":return xt(At.hour23h,t);case"Ho":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 y4 extends Le{priority=70;parse(t,n,r){switch(n){case"K":return xt(At.hour11h,t);case"Ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 b4 extends Le{priority=70;parse(t,n,r){switch(n){case"k":return xt(At.hour24h,t);case"ko":return r.ordinalNumber(t,{unit:"hour"});default:return Ct(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 x4 extends Le{priority=60;parse(t,n,r){switch(n){case"m":return xt(At.minute,t);case"mo":return r.ordinalNumber(t,{unit:"minute"});default:return Ct(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 w4 extends Le{priority=50;parse(t,n,r){switch(n){case"s":return xt(At.second,t);case"so":return r.ordinalNumber(t,{unit:"second"});default:return Ct(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 _4 extends Le{priority=30;parse(t,n){const r=i=>Math.trunc(i*Math.pow(10,-n.length+3));return Mt(Ct(n.length,t),r)}set(t,n,r){return t.setMilliseconds(r),t}incompatibleTokens=["t","T"]}class S4 extends Le{priority=10;parse(t,n){switch(n){case"X":return ni(ti.basicOptionalMinutes,t);case"XX":return ni(ti.basic,t);case"XXXX":return ni(ti.basicOptionalSeconds,t);case"XXXXX":return ni(ti.extendedOptionalSeconds,t);case"XXX":default:return ni(ti.extended,t)}}set(t,n,r){return n.timestampIsSet?t:Ze(t,t.getTime()-Ud(t)-r)}incompatibleTokens=["t","T","x"]}class E4 extends Le{priority=10;parse(t,n){switch(n){case"x":return ni(ti.basicOptionalMinutes,t);case"xx":return ni(ti.basic,t);case"xxxx":return ni(ti.basicOptionalSeconds,t);case"xxxxx":return ni(ti.extendedOptionalSeconds,t);case"xxx":default:return ni(ti.extended,t)}}set(t,n,r){return n.timestampIsSet?t:Ze(t,t.getTime()-Ud(t)-r)}incompatibleTokens=["t","T","X"]}class O4 extends Le{priority=40;parse(t){return PC(t)}set(t,n,r){return[Ze(t,r*1e3),{timestampIsSet:!0}]}incompatibleTokens="*"}class P4 extends Le{priority=20;parse(t){return PC(t)}set(t,n,r){return[Ze(t,r),{timestampIsSet:!0}]}incompatibleTokens="*"}const C4={G:new YF,y:new UF,Y:new KF,R:new qF,u:new GF,Q:new XF,q:new QF,M:new ZF,L:new JF,w:new t4,I:new r4,d:new a4,D:new s4,E:new l4,e:new c4,c:new u4,i:new f4,a:new p4,b:new h4,B:new m4,h:new g4,H:new v4,K:new y4,k:new b4,m:new x4,s:new w4,S:new _4,X:new S4,x:new E4,t:new O4,T:new P4},k4=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,D4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,T4=/^'([^]*?)'?$/,A4=/''/g,M4=/\S/,N4=/[a-zA-Z]/;function j4(e,t,n,r){const i=()=>Ze(r?.in||n,NaN),o=LF(),a=r?.locale??o.locale??_C,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():he(n,r?.in);const c={firstWeekContainsDate:s,weekStartsOn:l,locale:a},u=[new HF(r?.in,n)],d=t.match(D4).map(g=>{const y=g[0];if(y in Zg){const S=Zg[y];return S(g,a.formatLong)}return g}).join("").match(k4),f=[];for(let g of d){const y=g[0],S=C4[y];if(S){const{incompatibleTokens:w}=S;if(Array.isArray(w)){const _=f.find(E=>w.includes(E.token)||E.token===y);if(_)throw new RangeError(`The format string mustn't contain \`${_.fullToken}\` and \`${g}\` at the same time`)}else if(S.incompatibleTokens==="*"&&f.length>0)throw new RangeError(`The format string mustn't contain \`${g}\` and any other token at the same time`);f.push({token:y,fullToken:g});const x=S.run(e,g,a.match,c);if(!x)return i();u.push(x.setter),e=x.rest}else{if(y.match(N4))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");if(g==="''"?g="'":y==="'"&&(g=R4(g)),e.indexOf(g)===0)e=e.slice(g.length);else return i()}}if(e.length>0&&M4.test(e))return i();const p=u.map(g=>g.priority).sort((g,y)=>y-g).filter((g,y,S)=>S.indexOf(g)===y).map(g=>u.filter(y=>y.priority===g).sort((y,S)=>S.subPriority-y.subPriority)).map(g=>g[0]);let m=he(n,r?.in);if(isNaN(+m))return i();const h={};for(const g of p){if(!g.validate(m,c))return i();const y=g.set(m,h,c);Array.isArray(y)?(m=y[0],Object.assign(h,y[1])):m=y}return m}function R4(e){return e.match(T4)[1].replace(A4,"'")}function I4(e,t,n){const[r,i]=eo(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function L4(e,t,n){const[r,i]=eo(n?.in,e,t);return+Qg(r)==+Qg(i)}function F4(e,t,n){const[r,i]=eo(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function vc(e,t,n){const r=+he(e,n?.in),[i,o]=[+he(t.start,n?.in),+he(t.end,n?.in)].sort((a,s)=>a-s);return r>=i&&r<=o}function $4(e,t,n){return Lr(e,-1,n)}function B4(e,t){const n=()=>Ze(t?.in,NaN),i=H4(e);let o;if(i.date){const c=Y4(i.date,2);o=U4(c.restDateString,c.year)}if(!o||isNaN(+o))return n();const a=+o;let s=0,l;if(i.time&&(s=K4(i.time),isNaN(s)))return n();if(i.timezone){if(l=q4(i.timezone),isNaN(l))return n()}else{const c=new Date(a+s),u=he(0,t?.in);return u.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),u.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),u}return he(a+s+l,t?.in)}const Au={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},W4=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,z4=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,V4=/^([+-])(\d{2})(?::?(\d{2}))?$/;function H4(e){const t={},n=e.split(Au.dateTimeDelimiter);let r;if(n.length>2)return t;if(/:/.test(n[0])?r=n[0]:(t.date=n[0],r=n[1],Au.timeZoneDelimiter.test(t.date)&&(t.date=e.split(Au.timeZoneDelimiter)[0],r=e.substr(t.date.length,e.length))),r){const i=Au.timezone.exec(r);i?(t.time=r.replace(i[1],""),t.timezone=i[1]):t.time=r}return t}function Y4(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 U4(e,t){if(t===null)return new Date(NaN);const n=e.match(W4);if(!n)return new Date(NaN);const r=!!n[4],i=xl(n[1]),o=xl(n[2])-1,a=xl(n[3]),s=xl(n[4]),l=xl(n[5])-1;if(r)return J4(t,s,l)?G4(t,s,l):new Date(NaN);{const c=new Date(0);return!Q4(t,o,a)||!Z4(t,i)?new Date(NaN):(c.setUTCFullYear(t,o,Math.max(i,a)),c)}}function xl(e){return e?parseInt(e):1}function K4(e){const t=e.match(z4);if(!t)return NaN;const n=Lh(t[1]),r=Lh(t[2]),i=Lh(t[3]);return e$(n,r,i)?n*Ep+r*Sp+i*1e3:NaN}function Lh(e){return e&&parseFloat(e.replace(",","."))||0}function q4(e){if(e==="Z")return 0;const t=e.match(V4);if(!t)return 0;const n=t[1]==="+"?-1:1,r=parseInt(t[2]),i=t[3]&&parseInt(t[3])||0;return t$(r,i)?n*(r*Ep+i*Sp):NaN}function G4(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 X4=[31,null,31,30,31,30,31,31,30,31,30,31];function DC(e){return e%400===0||e%4===0&&e%100!==0}function Q4(e,t,n){return t>=0&&t<=11&&n>=1&&n<=(X4[t]||(DC(e)?29:28))}function Z4(e,t){return t>=1&&t<=(DC(e)?366:365)}function J4(e,t,n){return t>=1&&t<=53&&n>=0&&n<=6}function e$(e,t,n){return e===24?t===0&&n===0:n>=0&&n<60&&t>=0&&t<60&&e>=0&&e<25}function t$(e,t){return t>=0&&t<=59}function er(e,t,n){const r=he(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=Ze(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=IF(a);return r.setMonth(t,Math.min(o,s)),r}function Ad(e,t,n){const r=he(e,n?.in);return r.setHours(t),r}function Md(e,t,n){const r=he(e,n?.in);return r.setMinutes(t),r}function us(e,t,n){const r=he(e,n?.in),i=Math.trunc(r.getMonth()/3)+1,o=t-i;return er(r,r.getMonth()+o*3)}function Nd(e,t,n){const r=he(e,n?.in);return r.setSeconds(t),r}function Xr(e,t,n){const r=he(e,n?.in);return isNaN(+r)?Ze(e,NaN):(r.setFullYear(t),r)}function _a(e,t,n){return $r(e,-t,n)}function TC(e,t,n){return Dy(e,-1,n)}function L1(e,t,n){return Kd(e,-1,n)}function Ao(e,t,n){return Fr(e,-t,n)}function Pp(){return typeof window<"u"}function Ks(e){return AC(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vi(e){var t;return(t=(AC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AC(e){return Pp()?e instanceof Node||e instanceof sr(e).Node:!1}function yn(e){return Pp()?e instanceof Element||e instanceof sr(e).Element:!1}function pi(e){return Pp()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function F1(e){return!Pp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}const n$=new Set(["inline","contents"]);function qc(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!n$.has(i)}const r$=new Set(["table","td","th"]);function i$(e){return r$.has(Ks(e))}const o$=[":popover-open",":modal"];function Cp(e){return o$.some(t=>{try{return e.matches(t)}catch{return!1}})}const a$=["transform","translate","scale","rotate","perspective"],s$=["transform","translate","scale","rotate","perspective","filter"],l$=["paint","layout","strict","content"];function jy(e){const t=Ry(),n=yn(e)?Pr(e):e;return a$.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)||s$.some(r=>(n.willChange||"").includes(r))||l$.some(r=>(n.contain||"").includes(r))}function c$(e){let t=Mo(e);for(;pi(t)&&!Cs(t);){if(jy(t))return t;if(Cp(t))return null;t=Mo(t)}return null}function Ry(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const u$=new Set(["html","body","#document"]);function Cs(e){return u$.has(Ks(e))}function Pr(e){return sr(e).getComputedStyle(e)}function kp(e){return yn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mo(e){if(Ks(e)==="html")return e;const t=e.assignedSlot||e.parentNode||F1(e)&&e.host||vi(e);return F1(t)?t.host:t}function MC(e){const t=Mo(e);return Cs(t)?e.ownerDocument?e.ownerDocument.body:e.body:pi(t)&&qc(t)?t:MC(t)}function yc(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=MC(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=sr(i);if(o){const s=ev(a);return t.concat(a,a.visualViewport||[],qc(i)?i:[],s&&n?yc(s):[])}return t.concat(i,yc(i,[],n))}function ev(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ks=Math.min,Sa=Math.max,Zd=Math.round,Mu=Math.floor,li=e=>({x:e,y:e}),d$={left:"right",right:"left",bottom:"top",top:"bottom"},f$={start:"end",end:"start"};function p$(e,t,n){return Sa(e,ks(t,n))}function Dp(e,t){return typeof e=="function"?e(t):e}function Ds(e){return e.split("-")[0]}function Gc(e){return e.split("-")[1]}function h$(e){return e==="x"?"y":"x"}function Iy(e){return e==="y"?"height":"width"}const m$=new Set(["top","bottom"]);function ha(e){return m$.has(Ds(e))?"y":"x"}function Ly(e){return h$(ha(e))}function g$(e,t,n){n===void 0&&(n=!1);const r=Gc(e),i=Ly(e),o=Iy(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Jd(a)),[a,Jd(a)]}function v$(e){const t=Jd(e);return[tv(e),t,tv(t)]}function tv(e){return e.replace(/start|end/g,t=>f$[t])}const $1=["left","right"],B1=["right","left"],y$=["top","bottom"],b$=["bottom","top"];function x$(e,t,n){switch(e){case"top":case"bottom":return n?t?B1:$1:t?$1:B1;case"left":case"right":return t?y$:b$;default:return[]}}function w$(e,t,n,r){const i=Gc(e);let o=x$(Ds(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(tv)))),o}function Jd(e){return e.replace(/left|right|bottom|top/g,t=>d$[t])}function _$(e){return{top:0,right:0,bottom:0,left:0,...e}}function NC(e){return typeof e!="number"?_$(e):{top:e,right:e,bottom:e,left:e}}function ef(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 S$=typeof document<"u",E$=function(){},tf=S$?k.useLayoutEffect:E$;const O$={...P},P$=O$.useInsertionEffect,C$=P$||(e=>e());function k$(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return C$(()=>{t.current=e}),P.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 W1(e,t,n){let{reference:r,floating:i}=e;const o=ha(t),a=Ly(t),s=Iy(a),l=Ds(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(Gc(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1);break}return p}const D$=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}=W1(c,r,l),f=r,p={},m=0;for(let h=0;h<s.length;h++){const{name:g,fn:y}=s[h],{x:S,y:w,data:x,reset:_}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=S??u,d=w??d,p={...p,[g]:{...p[g],...x}},_&&m<=50&&(m++,typeof _=="object"&&(_.placement&&(f=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):_.rects),{x:u,y:d}=W1(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function T$(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}=Dp(t,e),m=NC(p),g=s[f?d==="floating"?"reference":"floating":d],y=ef(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),S=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)),x=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},_=ef(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:S,offsetParent:w,strategy:l}):S);return{top:(y.top-_.top+m.top)/x.y,bottom:(_.bottom-y.bottom+m.bottom)/x.y,left:(y.left-_.left+m.left)/x.x,right:(_.right-y.right+m.right)/x.x}}const A$=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}=Dp(e,t)||{};if(c==null)return{};const d=NC(u),f={x:n,y:r},p=Ly(i),m=Iy(p),h=await a.getDimensions(c),g=p==="y",y=g?"top":"left",S=g?"bottom":"right",w=g?"clientHeight":"clientWidth",x=o.reference[m]+o.reference[p]-f[p]-o.floating[m],_=f[p]-o.reference[p],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let C=E?E[w]:0;(!C||!await(a.isElement==null?void 0:a.isElement(E)))&&(C=s.floating[w]||o.floating[m]);const D=x/2-_/2,A=C/2-h[m]/2-1,R=ks(d[y],A),T=ks(d[S],A),O=R,N=C-h[m]-T,M=C/2-h[m]/2+D,I=p$(O,M,N),L=!l.arrow&&Gc(i)!=null&&M!==I&&o.reference[m]/2-(M<O?R:T)-h[m]/2<0,$=L?M<O?M-O:M-N:0;return{[p]:f[p]+$,data:{[p]:I,centerOffset:M-I-$,...L&&{alignmentOffset:$}},reset:L}}}),M$=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:h=!0,...g}=Dp(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Ds(i),S=ha(s),w=Ds(s)===s,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),_=f||(w||!h?[Jd(s)]:v$(s)),E=m!=="none";!f&&E&&_.push(...w$(s,h,m,x));const C=[s,..._],D=await T$(t,g),A=[];let R=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&A.push(D[y]),d){const M=g$(i,a,x);A.push(D[M[0]],D[M[1]])}if(R=[...R,{placement:i,overflows:A}],!A.every(M=>M<=0)){var T,O;const M=(((T=o.flip)==null?void 0:T.index)||0)+1,I=C[M];if(I&&(!(d==="alignment"?S!==ha(I):!1)||R.every(V=>ha(V.placement)===S?V.overflows[0]>0:!0)))return{data:{index:M,overflows:R},reset:{placement:I}};let L=(O=R.filter($=>$.overflows[0]<=0).sort(($,V)=>$.overflows[1]-V.overflows[1])[0])==null?void 0:O.placement;if(!L)switch(p){case"bestFit":{var N;const $=(N=R.filter(V=>{if(E){const W=ha(V.placement);return W===S||W==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(W=>W>0).reduce((W,B)=>W+B,0)]).sort((V,W)=>V[1]-W[1])[0])==null?void 0:N[0];$&&(L=$);break}case"initialPlacement":L=s;break}if(i!==L)return{reset:{placement:L}}}return{}}}},N$=new Set(["left","top"]);async function j$(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ds(n),s=Gc(n),l=ha(n)==="y",c=N$.has(a)?-1:1,u=o&&l?-1:1,d=Dp(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 R$=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 j$(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 jC(e){const t=Pr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=pi(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Zd(n)!==o||Zd(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function Fy(e){return yn(e)?e:e.contextElement}function gs(e){const t=Fy(e);if(!pi(t))return li(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=jC(t);let a=(o?Zd(n.width):n.width)/r,s=(o?Zd(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const I$=li(0);function RC(e){const t=sr(e);return!Ry()||!t.visualViewport?I$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function L$(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sr(e)?!1:t}function Ma(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=Fy(e);let a=li(1);t&&(r?yn(r)&&(a=gs(r)):a=gs(e));const s=L$(o,n,r)?RC(o):li(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&&yn(r)?sr(r):r;let m=f,h=ev(m);for(;h&&r&&p!==m;){const g=gs(h),y=h.getBoundingClientRect(),S=Pr(h),w=y.left+(h.clientLeft+parseFloat(S.paddingLeft))*g.x,x=y.top+(h.clientTop+parseFloat(S.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=w,c+=x,m=sr(h),h=ev(m)}}return ef({width:u,height:d,x:l,y:c})}function Tp(e,t){const n=kp(e).scrollLeft;return t?t.left+n:Ma(vi(e)).left+n}function IC(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Tp(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function F$(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=vi(r),s=t?Cp(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=li(1);const u=li(0),d=pi(r);if((d||!d&&!o)&&((Ks(r)!=="body"||qc(a))&&(l=kp(r)),pi(r))){const p=Ma(r);c=gs(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const f=a&&!d&&!o?IC(a,l):li(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 $$(e){return Array.from(e.getClientRects())}function B$(e){const t=vi(e),n=kp(e),r=e.ownerDocument.body,i=Sa(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Sa(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Tp(e);const s=-n.scrollTop;return Pr(r).direction==="rtl"&&(a+=Sa(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}const z1=25;function W$(e,t){const n=sr(e),r=vi(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=Ry();(!u||u&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}const c=Tp(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<=z1&&(o-=m)}else c<=z1&&(o+=c);return{width:o,height:a,x:s,y:l}}const z$=new Set(["absolute","fixed"]);function V$(e,t){const n=Ma(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=pi(e)?gs(e):li(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 V1(e,t,n){let r;if(t==="viewport")r=W$(e,n);else if(t==="document")r=B$(vi(e));else if(yn(t))r=V$(t,n);else{const i=RC(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return ef(r)}function LC(e,t){const n=Mo(e);return n===t||!yn(n)||Cs(n)?!1:Pr(n).position==="fixed"||LC(n,t)}function H$(e,t){const n=t.get(e);if(n)return n;let r=yc(e,[],!1).filter(s=>yn(s)&&Ks(s)!=="body"),i=null;const o=Pr(e).position==="fixed";let a=o?Mo(e):e;for(;yn(a)&&!Cs(a);){const s=Pr(a),l=jy(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&z$.has(i.position)||qc(a)&&!l&&LC(e,a))?r=r.filter(u=>u!==a):i=s,a=Mo(a)}return t.set(e,r),r}function Y$(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Cp(t)?[]:H$(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const d=V1(t,u,i);return c.top=Sa(d.top,c.top),c.right=ks(d.right,c.right),c.bottom=ks(d.bottom,c.bottom),c.left=Sa(d.left,c.left),c},V1(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function U$(e){const{width:t,height:n}=jC(e);return{width:t,height:n}}function K$(e,t,n){const r=pi(t),i=vi(t),o=n==="fixed",a=Ma(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=li(0);function c(){l.x=Tp(i)}if(r||!r&&!o)if((Ks(t)!=="body"||qc(i))&&(s=kp(t)),r){const p=Ma(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?IC(i,s):li(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 Fh(e){return Pr(e).position==="static"}function H1(e,t){if(!pi(e)||Pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vi(e)===n&&(n=n.ownerDocument.body),n}function FC(e,t){const n=sr(e);if(Cp(e))return n;if(!pi(e)){let i=Mo(e);for(;i&&!Cs(i);){if(yn(i)&&!Fh(i))return i;i=Mo(i)}return n}let r=H1(e,t);for(;r&&i$(r)&&Fh(r);)r=H1(r,t);return r&&Cs(r)&&Fh(r)&&!jy(r)?n:r||c$(e)||n}const q$=async function(e){const t=this.getOffsetParent||FC,n=this.getDimensions,r=await n(e.floating);return{reference:K$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G$(e){return Pr(e).direction==="rtl"}const X$={convertOffsetParentRelativeRectToViewportRelativeRect:F$,getDocumentElement:vi,getClippingRect:Y$,getOffsetParent:FC,getElementRects:q$,getClientRects:$$,getDimensions:U$,getScale:gs,isElement:yn,isRTL:G$};function $C(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Q$(e,t){let n=null,r;const i=vi(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=Mu(d),h=Mu(i.clientWidth-(u+f)),g=Mu(i.clientHeight-(d+p)),y=Mu(u),w={rootMargin:-m+"px "+-h+"px "+-g+"px "+-y+"px",threshold:Sa(0,ks(1,l))||1};let x=!0;function _(E){const C=E[0].intersectionRatio;if(C!==l){if(!x)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}C===1&&!$C(c,e.getBoundingClientRect())&&a(),x=!1}try{n=new IntersectionObserver(_,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,w)}n.observe(e)}return a(!0),o}function Z$(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=Fy(e),u=i||o?[...c?yc(c):[],...yc(t)]:[];u.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const d=c&&s?Q$(c,n):null;let f=-1,p=null;a&&(p=new ResizeObserver(y=>{let[S]=y;S&&S.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,h=l?Ma(e):null;l&&g();function g(){const y=Ma(e);h&&!$C(h,y)&&n(),h=y,m=requestAnimationFrame(g)}return n(),()=>{var y;u.forEach(S=>{i&&S.removeEventListener("scroll",n),o&&S.removeEventListener("resize",n)}),d?.(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(m)}}const J$=R$,eB=M$,Y1=A$,tB=(e,t,n)=>{const r=new Map,i={platform:X$,...n},o={...i.platform,_c:r};return D$(e,t,{...i,platform:o})};var nB=typeof document<"u",rB=function(){},jd=nB?k.useLayoutEffect:rB;function nf(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(!nf(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)&&!nf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function BC(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function U1(e,t){const n=BC(e);return Math.round(t*n)/n}function $h(e){const t=P.useRef(e);return jd(()=>{t.current=e}),t}function iB(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]=P.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=P.useState(r);nf(f,r)||p(r);const[m,h]=P.useState(null),[g,y]=P.useState(null),S=P.useCallback(V=>{V!==E.current&&(E.current=V,h(V))},[]),w=P.useCallback(V=>{V!==C.current&&(C.current=V,y(V))},[]),x=o||m,_=a||g,E=P.useRef(null),C=P.useRef(null),D=P.useRef(u),A=l!=null,R=$h(l),T=$h(i),O=$h(c),N=P.useCallback(()=>{if(!E.current||!C.current)return;const V={placement:t,strategy:n,middleware:f};T.current&&(V.platform=T.current),tB(E.current,C.current,V).then(W=>{const B={...W,isPositioned:O.current!==!1};M.current&&!nf(D.current,B)&&(D.current=B,TP.flushSync(()=>{d(B)}))})},[f,t,n,T,O]);jd(()=>{c===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[c]);const M=P.useRef(!1);jd(()=>(M.current=!0,()=>{M.current=!1}),[]),jd(()=>{if(x&&(E.current=x),_&&(C.current=_),x&&_){if(R.current)return R.current(x,_,N);N()}},[x,_,N,R,A]);const I=P.useMemo(()=>({reference:E,floating:C,setReference:S,setFloating:w}),[S,w]),L=P.useMemo(()=>({reference:x,floating:_}),[x,_]),$=P.useMemo(()=>{const V={position:n,left:0,top:0};if(!L.floating)return V;const W=U1(L.floating,u.x),B=U1(L.floating,u.y);return s?{...V,transform:"translate("+W+"px, "+B+"px)",...BC(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:B}},[n,s,L.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:N,refs:I,elements:L,floatingStyles:$}),[u,N,I,L,$])}const oB=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?Y1({element:r.current,padding:i}).fn(n):{}:r?Y1({element:r,padding:i}).fn(n):{}}}},aB=(e,t)=>({...J$(e),options:[e,t]}),sB=(e,t)=>({...eB(e),options:[e,t]}),lB=(e,t)=>({...oB(e),options:[e,t]}),cB={...P};let K1=!1,uB=0;const q1=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+uB++;function dB(){const[e,t]=P.useState(()=>K1?q1():void 0);return tf(()=>{e==null&&t(q1())},[]),P.useEffect(()=>{K1=!0},[]),e}const fB=cB.useId,WC=fB||dB;let bc;process.env.NODE_ENV!=="production"&&(bc=new Set);function pB(){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=bc)!=null&&e.has(i))){var o;(o=bc)==null||o.add(i),console.warn(i)}}function hB(){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=bc)!=null&&e.has(i))){var o;(o=bc)==null||o.add(i),console.error(i)}}const mB=P.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,...h}={},...g}=t;process.env.NODE_ENV!=="production"&&(n||pB("The `ref` prop is required for `FloatingArrow`."));const y=WC(),[S,w]=P.useState(!1);if(tf(()=>{if(!i)return;Pr(i).direction==="rtl"&&w(!0)},[i]),!i)return null;const[x,_]=r.split("-"),E=x==="top"||x==="bottom";let C=d;(E&&a!=null&&a.x||!E&&a!=null&&a.y)&&(C=null);const D=u*2,A=D/2,R=s/2*(c/-8+1),T=l/2*c/4,O=!!p,N=C&&_==="end"?"bottom":"top";let M=C&&_==="end"?"right":"left";C&&S&&(M=_==="end"?"left":"right");const I=o?.x!=null?C||o.x:"",L=o?.y!=null?C||o.y:"",$=p||"M0,0"+(" H"+s)+(" L"+(s-R)+","+(l-T))+(" Q"+s/2+","+l+" "+R+","+(l-T))+" Z",V={top:O?"rotate(180deg)":"",left:O?"rotate(90deg)":"rotate(-90deg)",bottom:O?"":"rotate(180deg)",right:O?"rotate(-90deg)":"rotate(90deg)"}[x];return b.jsxs("svg",{...g,"aria-hidden":!0,ref:n,width:O?s:s+D,height:s,viewBox:"0 0 "+s+" "+(l>s?l:s),style:{position:"absolute",pointerEvents:"none",[M]:I,[N]:L,[x]:E||O?"100%":"calc(100% - "+D/2+"px)",transform:[V,m].filter(W=>!!W).join(" "),...h},children:[D>0&&b.jsx("path",{clipPath:"url(#"+y+")",fill:"none",stroke:f,strokeWidth:D+(p?0:1),d:$}),b.jsx("path",{stroke:D&&!p?g.fill:"none",d:$}),b.jsx("clipPath",{id:y,children:b.jsx("rect",{x:-A,y:A*(O?-1:1),width:s+D,height:s})})]})});function gB(){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 vB=P.createContext(null),yB=P.createContext(null),bB=()=>{var e;return((e=P.useContext(vB))==null?void 0:e.id)||null},xB=()=>P.useContext(yB);function wB(e){const{open:t=!1,onOpenChange:n,elements:r}=e,i=WC(),o=P.useRef({}),[a]=P.useState(()=>gB()),s=bB()!=null;if(process.env.NODE_ENV!=="production"){const p=r.reference;p&&!yn(p)&&hB("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]=P.useState(r.reference),u=k$((p,m,h)=>{o.current.openEvent=p?m:void 0,a.emit("openchange",{open:p,event:m,reason:h,nested:s}),n?.(p,m,h)}),d=P.useMemo(()=>({setPositionReference:c}),[]),f=P.useMemo(()=>({reference:l||r.reference||null,floating:r.floating||null,domReference:r.reference}),[l,r.reference,r.floating]);return P.useMemo(()=>({dataRef:o,open:t,onOpenChange:u,elements:f,events:a,floatingId:i,refs:d}),[t,u,f,a,i,d])}function _B(e){e===void 0&&(e={});const{nodeId:t}=e,n=wB({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[o,a]=P.useState(null),[s,l]=P.useState(null),u=i?.domReference||o,d=P.useRef(null),f=xB();tf(()=>{u&&(d.current=u)},[u]);const p=iB({...e,elements:{...i,...s&&{reference:s}}}),m=P.useCallback(w=>{const x=yn(w)?{getBoundingClientRect:()=>w.getBoundingClientRect(),getClientRects:()=>w.getClientRects(),contextElement:w}:w;l(x),p.refs.setReference(x)},[p.refs]),h=P.useCallback(w=>{(yn(w)||w===null)&&(d.current=w,a(w)),(yn(p.refs.reference.current)||p.refs.reference.current===null||w!==null&&!yn(w))&&p.refs.setReference(w)},[p.refs]),g=P.useMemo(()=>({...p.refs,setReference:h,setPositionReference:m,domReference:d}),[p.refs,h,m]),y=P.useMemo(()=>({...p.elements,domReference:u}),[p.elements,u]),S=P.useMemo(()=>({...p,...r,refs:g,elements:y,nodeId:t}),[p,g,y,t,r]);return tf(()=>{r.dataRef.current.floatingContext=S;const w=f?.nodesRef.current.find(x=>x.id===t);w&&(w.context=S)}),P.useMemo(()=>({...p,context:S,refs:g,elements:y}),[p,g,y,S])}/*!
120
120
  react-datepicker v9.1.0
121
121
  https://github.com/Hacker0x01/react-datepicker
122
122
  Released under the MIT License.
@@ -218,7 +218,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
218
218
  * LICENSE file in the root directory of this source tree.
219
219
  */var hO;function pJ(){return hO||(hO=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;xg.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 g(_){if(!y){if(y=!0,S=_,_=d(_),f!==void 0&&m.hasValue){var E=m.value;if(f(E,_))return w=E}return w=_}if(E=w,n(S,_))return E;var C=d(_);return f!==void 0&&f(E,C)?(S=_,E):(S=_,w=C)}var y=!1,S,w,x=u===void 0?null:u;return[function(){return g(c())},x===null?void 0:function(){return g(x())}]},[c,u,d,f]);var h=r(l,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=h},[h]),s(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),xg}var mO;function hJ(){return mO||(mO=1,process.env.NODE_ENV==="production"?id.exports=fJ():id.exports=pJ()),id.exports}hJ();function mJ(e){e()}function gJ(){let e=null,t=null;return{clear(){e=null,t=null},notify(){mJ(()=>{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 gO={notify(){},get:()=>[]};function vJ(e,t){let n,r=gO,i=0,o=!1;function a(h){u();const g=r.subscribe(h);let y=!1;return()=>{y||(y=!0,g(),d())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=gJ())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=gO)}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 yJ=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bJ=yJ(),xJ=()=>typeof navigator<"u"&&navigator.product==="ReactNative",wJ=xJ(),_J=()=>bJ||wJ?P.useLayoutEffect:P.useEffect,SJ=_J(),EJ=Symbol.for("react-redux-context"),OJ=typeof globalThis<"u"?globalThis:{};function PJ(){if(!P.createContext)return{};const e=OJ[EJ]??=new Map;let t=e.get(P.createContext);return t||(t=P.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(P.createContext,t)),t}var CJ=PJ();function kJ(e){const{children:t,context:n,serverState:r,store:i}=e,o=P.useMemo(()=>{const l=vJ(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=P.useMemo(()=>i.getState(),[i]);SJ(()=>{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||CJ;return P.createElement(s.Provider,{value:o},t)}var DJ=kJ,TJ=(e,t)=>t,L0=z([TJ,De,HT,Ut,RA,ao,LU,Ht],zU),F0=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)}},NM=Cr("mouseClick"),jM=ru();jM.startListening({actionCreator:NM,effect:(e,t)=>{var n=e.payload,r=L0(t.getState(),F0(n));r?.activeIndex!=null&&t.dispatch(Y9({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Kv=Cr("mouseMove"),RM=ru();RM.startListening({actionCreator:Kv,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=s0(r,r.tooltip.settings.shared),o=L0(r,F0(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch(kA({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(CA()))}});var vO={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},IM=pr({name:"rootProps",initialState:vO,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:vO.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}}}),AJ=IM.reducer,{updateOptions:MJ}=IM.actions,LM=pr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:NJ}=LM.actions,jJ=LM.reducer,FM=Cr("keyDown"),$M=Cr("focus"),$0=ru();$0.startListening({actionCreator:FM,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(l0(i,rl(n))),s=ao(n);if(o==="Enter"){var l=jf(n,"axis","hover",String(i.index));t.dispatch(Fv({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=I9(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=jf(n,"axis","hover",String(f));t.dispatch(Fv({active:!0,activeIndex:f.toString(),activeDataKey:void 0,activeCoordinate:p}))}}}}});$0.startListening({actionCreator:$M,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=jf(n,"axis","hover",String(o));t.dispatch(Fv({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var xr=Cr("externalEvent"),BM=ru();BM.startListening({actionCreator:xr,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:CU(n),activeDataKey:$A(n),activeIndex:Ro(n),activeLabel:FA(n),activeTooltipIndex:Ro(n),isTooltipActive:kU(n)};e.payload.handler(r,e.payload.reactEvent)}}});var RJ=z([nl],e=>e.tooltipItemPayloads),IJ=z([RJ,gu,(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}}}),WM=Cr("touchMove"),zM=ru();zM.startListening({actionCreator:WM,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=s0(r,r.tooltip.settings.shared);if(i==="axis"){var o=L0(r,F0({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch(kA({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(OD),u=(a=l.getAttribute(PD))!==null&&a!==void 0?a:void 0,d=IJ(t.getState(),c,u);t.dispatch(PA({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var LJ=Kk({brush:wQ,cartesianAxis:tX,chartData:iK,errorBars:xX,graphicalItems:xG,layout:XW,legend:F7,options:JU,polarAxis:Lq,polarOptions:jJ,referenceElements:kQ,rootProps:AJ,tooltip:U9}),FJ=function(t){return wW({reducer:LJ,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([jM.middleware,RM.middleware,$0.middleware,BM.middleware,zM.middleware]),devTools:zo.devToolsEnabled})};function VM(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=Xn(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=FJ(t));var a=nb;return P.createElement(DJ,{context:a,store:o.current},n)}function HM(e){var{layout:t,width:n,height:r,margin:i}=e,o=Rt(),a=Xn();return k.useEffect(()=>{a||(o(KW(t)),o(qW({width:n,height:r})),o(UW(i)))},[o,a,t,n,r,i]),null}function YM(e){var t=Rt();return k.useEffect(()=>{t(MJ(e))},[t,e]),null}var $J=["children"];function BJ(e,t){if(e==null)return{};var n,r,i=WJ(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 WJ(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 Vf(){return Vf=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},Vf.apply(null,arguments)}var zJ={width:"100%",height:"100%"},VJ=k.forwardRef((e,t)=>{var n=kD(),r=DD(),i=ND();if(!Ns(n)||!Ns(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,P.createElement(hk,Vf({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:zJ,ref:t}),o)}),HJ=e=>{var{children:t}=e,n=pe(Yp);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return P.createElement(hk,{width:r,height:i,x:a,y:o},t)},yO=k.forwardRef((e,t)=>{var{children:n}=e,r=BJ(e,$J),i=Xn();return i?P.createElement(HJ,null,n):P.createElement(VJ,Vf({ref:t},r),n)});function YJ(){var e=Rt(),[t,n]=k.useState(null),r=pe(O7);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;dr(o)&&o!==r&&e(GW(o))}},[t,e,r]),n}function bO(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 UJ(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bO(Object(n),!0).forEach(function(r){KJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KJ(e,t,n){return(t=qJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qJ(e){var t=GJ(e,"string");return typeof t=="symbol"?t:t+""}function GJ(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 XJ=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:h,style:g,width:y}=e,S=Rt(),[w,x]=k.useState(null),[_,E]=k.useState(null);pK();var C=YJ(),D=k.useCallback(q=>{C(q),typeof t=="function"&&t(q),x(q),E(q)},[C,t,x,E]),A=k.useCallback(q=>{S(NM(q)),S(xr({handler:o,reactEvent:q}))},[S,o]),R=k.useCallback(q=>{S(Kv(q)),S(xr({handler:c,reactEvent:q}))},[S,c]),T=k.useCallback(q=>{S(CA()),S(xr({handler:u,reactEvent:q}))},[S,u]),O=k.useCallback(q=>{S(Kv(q)),S(xr({handler:d,reactEvent:q}))},[S,d]),N=k.useCallback(()=>{S($M())},[S]),M=k.useCallback(q=>{S(FM(q.key))},[S]),I=k.useCallback(q=>{S(xr({handler:a,reactEvent:q}))},[S,a]),L=k.useCallback(q=>{S(xr({handler:s,reactEvent:q}))},[S,s]),$=k.useCallback(q=>{S(xr({handler:l,reactEvent:q}))},[S,l]),V=k.useCallback(q=>{S(xr({handler:f,reactEvent:q}))},[S,f]),W=k.useCallback(q=>{S(xr({handler:h,reactEvent:q}))},[S,h]),B=k.useCallback(q=>{S(WM(q)),S(xr({handler:m,reactEvent:q}))},[S,m]),X=k.useCallback(q=>{S(xr({handler:p,reactEvent:q}))},[S,p]);return P.createElement(YA.Provider,{value:w},P.createElement(J3.Provider,{value:_},P.createElement("div",{className:oe("recharts-wrapper",r),style:UJ({position:"relative",cursor:"default",width:y,height:i},g),onClick:A,onContextMenu:I,onDoubleClick:L,onFocus:N,onKeyDown:M,onMouseDown:$,onMouseEnter:R,onMouseLeave:T,onMouseMove:O,onMouseUp:V,onTouchEnd:X,onTouchMove:B,onTouchStart:W,ref:D},n)))}),QJ=["children","className","width","height","style","compact","title","desc"];function ZJ(e,t){if(e==null)return{};var n,r,i=JJ(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 JJ(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 UM=k.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=e,u=ZJ(e,QJ),d=yi(u);return s?P.createElement(yO,{otherAttributes:d,title:l,desc:c},n):P.createElement(XJ,{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},P.createElement(yO,{otherAttributes:d,title:l,desc:c,ref:t},P.createElement(TQ,null,n)))}),eee=["width","height"];function qv(){return qv=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},qv.apply(null,arguments)}function tee(e,t){if(e==null)return{};var n,r,i=nee(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 nee(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 ree={top:5,right:5,bottom:5,left:5},iee={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:ree,reverseStackOrder:!1,syncMethod:"index"},KM=k.forwardRef(function(t,n){var r,i=cn(t.categoricalChartProps,iee),{width:o,height:a}=i,s=tee(i,eee);if(!Ns(o)||!Ns(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 P.createElement(VM,{preloadedState:{options:p},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:l},P.createElement(_M,{chartData:f.data}),P.createElement(HM,{width:o,height:a,layout:i.layout,margin:i.margin}),P.createElement(YM,{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}),P.createElement(UM,qv({},s,{width:o,height:a,ref:n})))}),oee=["axis"],B0=k.forwardRef((e,t)=>P.createElement(KM,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:oee,tooltipPayloadSearcher:g0,categoricalChartProps:e,ref:t})),aee=["axis","item"],qM=k.forwardRef((e,t)=>P.createElement(KM,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:aee,tooltipPayloadSearcher:g0,categoricalChartProps:e,ref:t}));function see(e){var t=Rt();return k.useEffect(()=>{t(NJ(e))},[t,e]),null}var lee=["width","height","layout"];function Gv(){return Gv=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},Gv.apply(null,arguments)}function cee(e,t){if(e==null)return{};var n,r,i=uee(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 uee(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 dee={top:5,right:5,bottom:5,left:5},fee={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:dee,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},pee=k.forwardRef(function(t,n){var r,i=cn(t.categoricalChartProps,fee),{width:o,height:a,layout:s}=i,l=cee(i,lee);if(!Ns(o)||!Ns(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 P.createElement(VM,{preloadedState:{options:p},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},P.createElement(_M,{chartData:i.data}),P.createElement(HM,{width:o,height:a,layout:s,margin:i.margin}),P.createElement(YM,{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}),P.createElement(see,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),P.createElement(UM,Gv({width:o,height:a},l,{ref:n})))}),hee=["item"],mee={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},bu=k.forwardRef((e,t)=>{var n=cn(e,mee);return P.createElement(pee,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:hee,tooltipPayloadSearcher:g0,categoricalChartProps:n,ref:t})});function sl(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function gee(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 Xv(e,t){return Xv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Xv(e,t)}function vee(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xv(e,t)}const xO={disabled:!1};var yee=process.env.NODE_ENV!=="production"?v.oneOfType([v.number,v.shape({enter:v.number,exit:v.number,appear:v.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&v.oneOfType([v.string,v.shape({enter:v.string,exit:v.string,active:v.string}),v.shape({enter:v.string,enterDone:v.string,enterActive:v.string,exit:v.string,exitDone:v.string,exitActive:v.string})]);const GM=k.createContext(null);var bee=function(t){return t.scrollTop},Kl="unmounted",la="exited",ca="entering",ds="entered",Qv="exiting",wi=(function(e){vee(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=la,o.appearStatus=ca):l=ds:r.unmountOnExit||r.mountOnEnter?l=Kl:l=la,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===Kl?{status:la}: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!==ca&&a!==ds&&(o=ca):(a===ca||a===ds)&&(o=Qv)}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===ca){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:vo.findDOMNode(this);a&&bee(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===la&&this.setState({status:Kl})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[vo.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!a||xO.disabled){this.safeSetState({status:ds},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:ca},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:ds},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:vo.findDOMNode(this);if(!o||xO.disabled){this.safeSetState({status:la},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Qv},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:la},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:vo.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===Kl)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=gee(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(GM.Provider,{value:null},typeof a=="function"?a(i,s):k.cloneElement(k.Children.only(a),s))},t})(k.Component);wi.contextType=GM;wi.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:v.shape({current:typeof Element>"u"?v.any:function(e,t,n,r,i,o){var a=e[t];return v.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:v.oneOfType([v.func.isRequired,v.element.isRequired]).isRequired,in:v.bool,mountOnEnter:v.bool,unmountOnExit:v.bool,appear:v.bool,enter:v.bool,exit:v.bool,timeout:function(t){var n=yee;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:v.func,onEnter:v.func,onEntering:v.func,onEntered:v.func,onExit:v.func,onExiting:v.func,onExited:v.func}:{};function os(){}wi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:os,onEntering:os,onEntered:os,onExit:os,onExiting:os,onExited:os};wi.UNMOUNTED=Kl;wi.EXITED=la;wi.ENTERING=ca;wi.ENTERED=ds;wi.EXITING=Qv;const wO={};function xee(e,t){const n=P.useRef(wO);return n.current===wO&&(n.current=e(t)),n}const wee=[];function _ee(e){P.useEffect(e,wee)}class dh{static create(){return new dh}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 ql(){const e=xee(dh.create).current;return _ee(e.disposeEffect),e}function See(e){const{prototype:t={}}=e;return!!t.isReactComponent}function Eee(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"&&!See(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 XM=sl(v.elementType,Eee),QM=e=>e.scrollTop;function Hf(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 Oee(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 ZM(e,t,n,r){const i=e[t];if(i==null||!Number.isInteger(i)){const o=Oee(i);return new RangeError(`Invalid ${r} \`${t}\` of type \`${o}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function JM(e,t,n,r){return e[t]===void 0?null:ZM(e,t,n,r)}function Zv(){return null}JM.isRequired=ZM;Zv.isRequired=Zv;const eN=process.env.NODE_ENV==="production"?Zv:JM;function Pee(e){return sn("MuiPaper",e)}Dn("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 Cee=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return _n(o,Pee,i)},kee=Ce("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}`]]}})(Tn(({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)"}}]}))),tN=P.forwardRef(function(t,n){const r=Gn({props:t,name:"MuiPaper"}),i=_p(),{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=Cee(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(`
220
220
  `)),b.jsx(kee,{as:a,ownerState:d,className:oe(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(${Hd("#fff",Gg(s))}, ${Hd("#fff",Gg(s))})`}},...u.style}})});process.env.NODE_ENV!=="production"&&(tN.propTypes={children:v.node,classes:v.object,className:v.string,component:v.elementType,elevation:sl(eN,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:v.bool,style:v.object,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),variant:v.oneOfType([v.oneOf(["elevation","outlined"]),v.string])});function Yf(e){return typeof e=="string"}function nN(e,t,n){return e===void 0||Yf(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function rN(e,t,n){return typeof e=="function"?e(t,n):e}function iN(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 _O(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 oN(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=oe(n?.className,o,i?.className,r?.className),m={...n?.style,...i?.style,...r?.style},h={...n,...i,...r};return p.length>0&&(h.className=p),Object.keys(m).length>0&&(h.style=m),{props:h,internalRef:void 0}}const a=iN({...i,...r}),s=_O(r),l=_O(i),c=t(a),u=oe(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 Hn(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=rN(d[e],i),{props:{component:h,...g},internalRef:y}=oN({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:m}),S=kn(y,m?.ref,t.ref),w=e==="root"?h||c:h,x=nN(p,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...g,...w&&!s&&{as:w},...w&&s&&{component:w},ref:S},i);return[p,x]}const so=v.oneOfType([v.func,v.object]);function SO(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(`
221
- `))}return!1}function Dee(e){return typeof e.main=="string"}function Tee(e,t=[]){if(!Dee(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function W0(e=[]){return([,t])=>t&&Tee(t,e)}function Xi(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}var Un="top",Dr="bottom",Tr="right",Kn="left",z0="auto",xu=[Un,Dr,Tr,Kn],$s="start",Ac="end",Aee="clippingParents",aN="viewport",Tl="popper",Mee="reference",EO=xu.reduce(function(e,t){return e.concat([t+"-"+$s,t+"-"+Ac])},[]),sN=[].concat(xu,[z0]).reduce(function(e,t){return e.concat([t,t+"-"+$s,t+"-"+Ac])},[]),Nee="beforeRead",jee="read",Ree="afterRead",Iee="beforeMain",Lee="main",Fee="afterMain",$ee="beforeWrite",Bee="write",Wee="afterWrite",zee=[Nee,jee,Ree,Iee,Lee,Fee,$ee,Bee,Wee];function gi(e){return e?(e.nodeName||"").toLowerCase():null}function fr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ba(e){var t=fr(e).Element;return e instanceof t||e instanceof Element}function Or(e){var t=fr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function V0(e){if(typeof ShadowRoot>"u")return!1;var t=fr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Vee(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];!Or(o)||!gi(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 Hee(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},{});!Or(i)||!gi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const lN={name:"applyStyles",enabled:!0,phase:"write",fn:Vee,effect:Hee,requires:["computeStyles"]};function ui(e){return e.split("-")[0]}var Da=Math.max,Uf=Math.min,Bs=Math.round;function Jv(){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 cN(){return!/^((?!chrome|android).)*safari/i.test(Jv())}function Ws(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Or(e)&&(i=e.offsetWidth>0&&Bs(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Bs(r.height)/e.offsetHeight||1);var a=Ba(e)?fr(e):window,s=a.visualViewport,l=!cN()&&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 H0(e){var t=Ws(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 uN(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&V0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Qi(e){return fr(e).getComputedStyle(e)}function Yee(e){return["table","td","th"].indexOf(gi(e))>=0}function Uo(e){return((Ba(e)?e.ownerDocument:e.document)||window.document).documentElement}function fh(e){return gi(e)==="html"?e:e.assignedSlot||e.parentNode||(V0(e)?e.host:null)||Uo(e)}function OO(e){return!Or(e)||Qi(e).position==="fixed"?null:e.offsetParent}function Uee(e){var t=/firefox/i.test(Jv()),n=/Trident/i.test(Jv());if(n&&Or(e)){var r=Qi(e);if(r.position==="fixed")return null}var i=fh(e);for(V0(i)&&(i=i.host);Or(i)&&["html","body"].indexOf(gi(i))<0;){var o=Qi(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 wu(e){for(var t=fr(e),n=OO(e);n&&Yee(n)&&Qi(n).position==="static";)n=OO(n);return n&&(gi(n)==="html"||gi(n)==="body"&&Qi(n).position==="static")?t:n||Uee(e)||t}function Y0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rc(e,t,n){return Da(e,Uf(t,n))}function Kee(e,t,n){var r=rc(e,t,n);return r>n?n:r}function dN(){return{top:0,right:0,bottom:0,left:0}}function fN(e){return Object.assign({},dN(),e)}function pN(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var qee=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,fN(typeof t!="number"?t:pN(t,xu))};function Gee(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ui(n.placement),l=Y0(s),c=[Kn,Tr].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=qee(i.padding,n),f=H0(o),p=l==="y"?Un:Kn,m=l==="y"?Dr:Tr,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],y=wu(o),S=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,w=h/2-g/2,x=d[p],_=S-f[u]-d[m],E=S/2-f[u]/2+w,C=rc(x,E,_),D=l;n.modifiersData[r]=(t={},t[D]=C,t.centerOffset=C-E,t)}}function Xee(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)||uN(t.elements.popper,i)&&(t.elements.arrow=i))}const Qee={name:"arrow",enabled:!0,phase:"main",fn:Gee,effect:Xee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zs(e){return e.split("-")[1]}var Zee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jee(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Bs(n*i)/i||0,y:Bs(r*i)/i||0}}function PO(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,h=m===void 0?0:m,g=typeof u=="function"?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var y=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=Kn,x=Un,_=window;if(c){var E=wu(n),C="clientHeight",D="clientWidth";if(E===fr(n)&&(E=Uo(n),Qi(E).position!=="static"&&s==="absolute"&&(C="scrollHeight",D="scrollWidth")),E=E,i===Un||(i===Kn||i===Tr)&&o===Ac){x=Dr;var A=d&&E===_&&_.visualViewport?_.visualViewport.height:E[C];h-=A-r.height,h*=l?1:-1}if(i===Kn||(i===Un||i===Dr)&&o===Ac){w=Tr;var R=d&&E===_&&_.visualViewport?_.visualViewport.width:E[D];p-=R-r.width,p*=l?1:-1}}var T=Object.assign({position:s},c&&Zee),O=u===!0?Jee({x:p,y:h},fr(n)):{x:p,y:h};if(p=O.x,h=O.y,l){var N;return Object.assign({},T,(N={},N[x]=S?"0":"",N[w]=y?"0":"",N.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",N))}return Object.assign({},T,(t={},t[x]=S?h+"px":"",t[w]=y?p+"px":"",t.transform="",t))}function ete(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:ui(t.placement),variation:zs(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,PO(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,PO(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 tte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ete,data:{}};var od={passive:!0};function nte(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=fr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,od)}),s&&l.addEventListener("resize",n.update,od),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,od)}),s&&l.removeEventListener("resize",n.update,od)}}const rte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:nte,data:{}};var ite={left:"right",right:"left",bottom:"top",top:"bottom"};function Fd(e){return e.replace(/left|right|bottom|top/g,function(t){return ite[t]})}var ote={start:"end",end:"start"};function CO(e){return e.replace(/start|end/g,function(t){return ote[t]})}function U0(e){var t=fr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function K0(e){return Ws(Uo(e)).left+U0(e).scrollLeft}function ate(e,t){var n=fr(e),r=Uo(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=cN();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+K0(e),y:l}}function ste(e){var t,n=Uo(e),r=U0(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Da(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Da(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+K0(e),l=-r.scrollTop;return Qi(i||n).direction==="rtl"&&(s+=Da(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function q0(e){var t=Qi(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function hN(e){return["html","body","#document"].indexOf(gi(e))>=0?e.ownerDocument.body:Or(e)&&q0(e)?e:hN(fh(e))}function ic(e,t){var n;t===void 0&&(t=[]);var r=hN(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=fr(r),a=i?[o].concat(o.visualViewport||[],q0(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(ic(fh(a)))}function ey(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lte(e,t){var n=Ws(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 kO(e,t,n){return t===aN?ey(ate(e,n)):Ba(t)?lte(t,n):ey(ste(Uo(e)))}function cte(e){var t=ic(fh(e)),n=["absolute","fixed"].indexOf(Qi(e).position)>=0,r=n&&Or(e)?wu(e):e;return Ba(r)?t.filter(function(i){return Ba(i)&&uN(i,r)&&gi(i)!=="body"}):[]}function ute(e,t,n,r){var i=t==="clippingParents"?cte(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=kO(e,c,r);return l.top=Da(u.top,l.top),l.right=Uf(u.right,l.right),l.bottom=Uf(u.bottom,l.bottom),l.left=Da(u.left,l.left),l},kO(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 mN(e){var t=e.reference,n=e.element,r=e.placement,i=r?ui(r):null,o=r?zs(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Un:l={x:a,y:t.y-n.height};break;case Dr:l={x:a,y:t.y+t.height};break;case Tr:l={x:t.x+t.width,y:s};break;case Kn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?Y0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case $s:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Ac:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Mc(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?Aee:s,c=n.rootBoundary,u=c===void 0?aN:c,d=n.elementContext,f=d===void 0?Tl:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,y=fN(typeof g!="number"?g:pN(g,xu)),S=f===Tl?Mee:Tl,w=e.rects.popper,x=e.elements[m?S:f],_=ute(Ba(x)?x:x.contextElement||Uo(e.elements.popper),l,u,a),E=Ws(e.elements.reference),C=mN({reference:E,element:w,placement:i}),D=ey(Object.assign({},w,C)),A=f===Tl?D:E,R={top:_.top-A.top+y.top,bottom:A.bottom-_.bottom+y.bottom,left:_.left-A.left+y.left,right:A.right-_.right+y.right},T=e.modifiersData.offset;if(f===Tl&&T){var O=T[i];Object.keys(R).forEach(function(N){var M=[Tr,Dr].indexOf(N)>=0?1:-1,I=[Un,Dr].indexOf(N)>=0?"y":"x";R[N]+=O[I]*M})}return R}function dte(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?sN:l,u=zs(r),d=u?s?EO:EO.filter(function(m){return zs(m)===u}):xu,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=Mc(e,{placement:h,boundary:i,rootBoundary:o,padding:a})[ui(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function fte(e){if(ui(e)===z0)return[];var t=Fd(e);return[CO(e),t,CO(t)]}function pte(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,h=n.allowedAutoPlacements,g=t.options.placement,y=ui(g),S=y===g,w=l||(S||!m?[Fd(g)]:fte(g)),x=[g].concat(w).reduce(function(J,ee){return J.concat(ui(ee)===z0?dte(t,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,E=t.rects.popper,C=new Map,D=!0,A=x[0],R=0;R<x.length;R++){var T=x[R],O=ui(T),N=zs(T)===$s,M=[Un,Dr].indexOf(O)>=0,I=M?"width":"height",L=Mc(t,{placement:T,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),$=M?N?Tr:Kn:N?Dr:Un;_[I]>E[I]&&($=Fd($));var V=Fd($),W=[];if(o&&W.push(L[O]<=0),s&&W.push(L[$]<=0,L[V]<=0),W.every(function(J){return J})){A=T,D=!1;break}C.set(T,W)}if(D)for(var B=m?3:1,X=function(ee){var ie=x.find(function(ae){var ce=C.get(ae);if(ce)return ce.slice(0,ee).every(function(U){return U})});if(ie)return A=ie,"break"},q=B;q>0;q--){var re=X(q);if(re==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const hte={name:"flip",enabled:!0,phase:"main",fn:pte,requiresIfExists:["offset"],data:{_skip:!1}};function DO(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 TO(e){return[Un,Tr,Dr,Kn].some(function(t){return e[t]>=0})}function mte(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Mc(t,{elementContext:"reference"}),s=Mc(t,{altBoundary:!0}),l=DO(a,r),c=DO(s,i,o),u=TO(l),d=TO(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 gte={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:mte};function vte(e,t,n){var r=ui(e),i=[Kn,Un].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,[Kn,Tr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function yte(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=sN.reduce(function(u,d){return u[d]=vte(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 bte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:yte};function xte(e){var t=e.state,n=e.name;t.modifiersData[n]=mN({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const wte={name:"popperOffsets",enabled:!0,phase:"read",fn:xte,data:{}};function _te(e){return e==="x"?"y":"x"}function Ste(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,h=m===void 0?0:m,g=Mc(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=ui(t.placement),S=zs(t.placement),w=!S,x=Y0(y),_=_te(x),E=t.modifiersData.popperOffsets,C=t.rects.reference,D=t.rects.popper,A=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,R=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(E){if(o){var N,M=x==="y"?Un:Kn,I=x==="y"?Dr:Tr,L=x==="y"?"height":"width",$=E[x],V=$+g[M],W=$-g[I],B=p?-D[L]/2:0,X=S===$s?C[L]:D[L],q=S===$s?-D[L]:-C[L],re=t.elements.arrow,J=p&&re?H0(re):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:dN(),ie=ee[M],ae=ee[I],ce=rc(0,C[L],J[L]),U=w?C[L]/2-B-ce-ie-R.mainAxis:X-ce-ie-R.mainAxis,K=w?-C[L]/2+B+ce+ae+R.mainAxis:q+ce+ae+R.mainAxis,Z=t.elements.arrow&&wu(t.elements.arrow),j=Z?x==="y"?Z.clientTop||0:Z.clientLeft||0:0,me=(N=T?.[x])!=null?N:0,te=$+U-me-j,ge=$+K-me,we=rc(p?Uf(V,te):V,$,p?Da(W,ge):W);E[x]=we,O[x]=we-$}if(s){var $e,ot=x==="x"?Un:Kn,bt=x==="x"?Dr:Tr,lt=E[_],Ue=_==="y"?"height":"width",kt=lt+g[ot],Wt=lt-g[bt],ft=[Un,Kn].indexOf(y)!==-1,un=($e=T?.[_])!=null?$e:0,en=ft?kt:lt-C[Ue]-D[Ue]-un+R.altAxis,dn=ft?lt+C[Ue]+D[Ue]-un-R.altAxis:Wt,Nn=p&&ft?Kee(en,lt,dn):rc(p?en:kt,lt,p?dn:Wt);E[_]=Nn,O[_]=Nn-lt}t.modifiersData[r]=O}}const Ete={name:"preventOverflow",enabled:!0,phase:"main",fn:Ste,requiresIfExists:["offset"]};function Ote(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Pte(e){return e===fr(e)||!Or(e)?U0(e):Ote(e)}function Cte(e){var t=e.getBoundingClientRect(),n=Bs(t.width)/e.offsetWidth||1,r=Bs(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kte(e,t,n){n===void 0&&(n=!1);var r=Or(t),i=Or(t)&&Cte(t),o=Uo(t),a=Ws(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((gi(t)!=="body"||q0(o))&&(s=Pte(t)),Or(t)?(l=Ws(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=K0(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Dte(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 Tte(e){var t=Dte(e);return zee.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ate(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Mte(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 AO={placement:"bottom",modifiers:[],strategy:"absolute"};function MO(){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 Nte(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?AO:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},AO,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(y){var S=typeof y=="function"?y(u.options):y;h(),u.options=Object.assign({},o,u.options,S),u.scrollParents={reference:Ba(s)?ic(s):s.contextElement?ic(s.contextElement):[],popper:ic(l)};var w=Tte(Mte([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(x){return x.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var y=u.elements,S=y.reference,w=y.popper;if(MO(S,w)){u.rects={reference:kte(S,wu(w),u.options.strategy==="fixed"),popper:H0(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 x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var _=u.orderedModifiers[x],E=_.fn,C=_.options,D=C===void 0?{}:C,A=_.name;typeof E=="function"&&(u=E({state:u,options:D,name:A,instance:p})||u)}}}},update:Ate(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){h(),f=!0}};if(!MO(s,l))return p;p.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var y=g.name,S=g.options,w=S===void 0?{}:S,x=g.effect;if(typeof x=="function"){var _=x({state:u,name:y,instance:p,options:w}),E=function(){};d.push(_||E)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}var jte=[rte,wte,tte,lN,bte,hte,Ete,Qee,gte],gN=Nte({defaultModifiers:jte});function vN(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:rN(n,r),{props:s,internalRef:l}=oN({...o,externalSlotProps:a}),c=kn(l,a?.ref,e.additionalProps?.ref);return nN(t,{...s,ref:c},r)}function ll(e){return parseInt(P.version,10)>=19?e?.props?.ref||null:e?.ref||null}function Rte(e){return typeof e=="function"?e():e}const Nc=P.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=P.useState(null),l=kn(P.isValidElement(r)?ll(r):null,n);if(Vi(()=>{o||s(Rte(i)||document.body)},[i,o]),Vi(()=>{if(a&&!o)return P1(n,a),()=>{P1(n,null)}},[n,a,o]),o){if(P.isValidElement(r)){const c={ref:l};return P.cloneElement(r,c)}return r}return a&&T2.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(Nc.propTypes={children:v.node,container:v.oneOfType([Xi,v.func]),disablePortal:v.bool});process.env.NODE_ENV!=="production"&&(Nc.propTypes=iC(Nc.propTypes));function Ite(e){return sn("MuiPopper",e)}Dn("MuiPopper",["root"]);function Lte(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 Kf(e){return typeof e=="function"?e():e}function ph(e){return e.nodeType!==void 0}function Fte(e){return!ph(e)}const $te=e=>{const{classes:t}=e;return _n({root:["root"]},Ite,t)},Bte={},Wte=P.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:h,...g}=t,y=P.useRef(null),S=kn(y,n),w=P.useRef(null),x=kn(w,d),_=P.useRef(x);Vi(()=>{_.current=x},[x]),P.useImperativeHandle(d,()=>w.current,[]);const E=Lte(c,o),[C,D]=P.useState(E),[A,R]=P.useState(Kf(r));P.useEffect(()=>{w.current&&w.current.forceUpdate()}),P.useEffect(()=>{r&&R(Kf(r))},[r]),Vi(()=>{if(!A||!l)return;const I=V=>{D(V.placement)};if(process.env.NODE_ENV!=="production"&&A&&ph(A)&&A.nodeType===1){const V=A.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(`
221
+ `))}return!1}function Dee(e){return typeof e.main=="string"}function Tee(e,t=[]){if(!Dee(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function W0(e=[]){return([,t])=>t&&Tee(t,e)}function Xi(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}var Un="top",Dr="bottom",Tr="right",Kn="left",z0="auto",xu=[Un,Dr,Tr,Kn],$s="start",Ac="end",Aee="clippingParents",aN="viewport",Tl="popper",Mee="reference",EO=xu.reduce(function(e,t){return e.concat([t+"-"+$s,t+"-"+Ac])},[]),sN=[].concat(xu,[z0]).reduce(function(e,t){return e.concat([t,t+"-"+$s,t+"-"+Ac])},[]),Nee="beforeRead",jee="read",Ree="afterRead",Iee="beforeMain",Lee="main",Fee="afterMain",$ee="beforeWrite",Bee="write",Wee="afterWrite",zee=[Nee,jee,Ree,Iee,Lee,Fee,$ee,Bee,Wee];function gi(e){return e?(e.nodeName||"").toLowerCase():null}function fr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ba(e){var t=fr(e).Element;return e instanceof t||e instanceof Element}function Or(e){var t=fr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function V0(e){if(typeof ShadowRoot>"u")return!1;var t=fr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Vee(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];!Or(o)||!gi(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 Hee(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},{});!Or(i)||!gi(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const lN={name:"applyStyles",enabled:!0,phase:"write",fn:Vee,effect:Hee,requires:["computeStyles"]};function ui(e){return e.split("-")[0]}var Da=Math.max,Uf=Math.min,Bs=Math.round;function Jv(){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 cN(){return!/^((?!chrome|android).)*safari/i.test(Jv())}function Ws(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Or(e)&&(i=e.offsetWidth>0&&Bs(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Bs(r.height)/e.offsetHeight||1);var a=Ba(e)?fr(e):window,s=a.visualViewport,l=!cN()&&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 H0(e){var t=Ws(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 uN(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&V0(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Qi(e){return fr(e).getComputedStyle(e)}function Yee(e){return["table","td","th"].indexOf(gi(e))>=0}function Uo(e){return((Ba(e)?e.ownerDocument:e.document)||window.document).documentElement}function fh(e){return gi(e)==="html"?e:e.assignedSlot||e.parentNode||(V0(e)?e.host:null)||Uo(e)}function OO(e){return!Or(e)||Qi(e).position==="fixed"?null:e.offsetParent}function Uee(e){var t=/firefox/i.test(Jv()),n=/Trident/i.test(Jv());if(n&&Or(e)){var r=Qi(e);if(r.position==="fixed")return null}var i=fh(e);for(V0(i)&&(i=i.host);Or(i)&&["html","body"].indexOf(gi(i))<0;){var o=Qi(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 wu(e){for(var t=fr(e),n=OO(e);n&&Yee(n)&&Qi(n).position==="static";)n=OO(n);return n&&(gi(n)==="html"||gi(n)==="body"&&Qi(n).position==="static")?t:n||Uee(e)||t}function Y0(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function rc(e,t,n){return Da(e,Uf(t,n))}function Kee(e,t,n){var r=rc(e,t,n);return r>n?n:r}function dN(){return{top:0,right:0,bottom:0,left:0}}function fN(e){return Object.assign({},dN(),e)}function pN(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var qee=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,fN(typeof t!="number"?t:pN(t,xu))};function Gee(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=ui(n.placement),l=Y0(s),c=[Kn,Tr].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=qee(i.padding,n),f=H0(o),p=l==="y"?Un:Kn,m=l==="y"?Dr:Tr,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],y=wu(o),S=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,w=h/2-g/2,x=d[p],_=S-f[u]-d[m],E=S/2-f[u]/2+w,C=rc(x,E,_),D=l;n.modifiersData[r]=(t={},t[D]=C,t.centerOffset=C-E,t)}}function Xee(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)||uN(t.elements.popper,i)&&(t.elements.arrow=i))}const Qee={name:"arrow",enabled:!0,phase:"main",fn:Gee,effect:Xee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function zs(e){return e.split("-")[1]}var Zee={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Jee(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Bs(n*i)/i||0,y:Bs(r*i)/i||0}}function PO(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,h=m===void 0?0:m,g=typeof u=="function"?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var y=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=Kn,x=Un,_=window;if(c){var E=wu(n),C="clientHeight",D="clientWidth";if(E===fr(n)&&(E=Uo(n),Qi(E).position!=="static"&&s==="absolute"&&(C="scrollHeight",D="scrollWidth")),E=E,i===Un||(i===Kn||i===Tr)&&o===Ac){x=Dr;var A=d&&E===_&&_.visualViewport?_.visualViewport.height:E[C];h-=A-r.height,h*=l?1:-1}if(i===Kn||(i===Un||i===Dr)&&o===Ac){w=Tr;var R=d&&E===_&&_.visualViewport?_.visualViewport.width:E[D];p-=R-r.width,p*=l?1:-1}}var T=Object.assign({position:s},c&&Zee),O=u===!0?Jee({x:p,y:h},fr(n)):{x:p,y:h};if(p=O.x,h=O.y,l){var N;return Object.assign({},T,(N={},N[x]=S?"0":"",N[w]=y?"0":"",N.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",N))}return Object.assign({},T,(t={},t[x]=S?h+"px":"",t[w]=y?p+"px":"",t.transform="",t))}function ete(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:ui(t.placement),variation:zs(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,PO(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,PO(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 tte={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ete,data:{}};var od={passive:!0};function nte(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=fr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,od)}),s&&l.addEventListener("resize",n.update,od),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,od)}),s&&l.removeEventListener("resize",n.update,od)}}const rte={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:nte,data:{}};var ite={left:"right",right:"left",bottom:"top",top:"bottom"};function Fd(e){return e.replace(/left|right|bottom|top/g,function(t){return ite[t]})}var ote={start:"end",end:"start"};function CO(e){return e.replace(/start|end/g,function(t){return ote[t]})}function U0(e){var t=fr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function K0(e){return Ws(Uo(e)).left+U0(e).scrollLeft}function ate(e,t){var n=fr(e),r=Uo(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=cN();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+K0(e),y:l}}function ste(e){var t,n=Uo(e),r=U0(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Da(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Da(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+K0(e),l=-r.scrollTop;return Qi(i||n).direction==="rtl"&&(s+=Da(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function q0(e){var t=Qi(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function hN(e){return["html","body","#document"].indexOf(gi(e))>=0?e.ownerDocument.body:Or(e)&&q0(e)?e:hN(fh(e))}function ic(e,t){var n;t===void 0&&(t=[]);var r=hN(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=fr(r),a=i?[o].concat(o.visualViewport||[],q0(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(ic(fh(a)))}function ey(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lte(e,t){var n=Ws(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 kO(e,t,n){return t===aN?ey(ate(e,n)):Ba(t)?lte(t,n):ey(ste(Uo(e)))}function cte(e){var t=ic(fh(e)),n=["absolute","fixed"].indexOf(Qi(e).position)>=0,r=n&&Or(e)?wu(e):e;return Ba(r)?t.filter(function(i){return Ba(i)&&uN(i,r)&&gi(i)!=="body"}):[]}function ute(e,t,n,r){var i=t==="clippingParents"?cte(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=kO(e,c,r);return l.top=Da(u.top,l.top),l.right=Uf(u.right,l.right),l.bottom=Uf(u.bottom,l.bottom),l.left=Da(u.left,l.left),l},kO(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 mN(e){var t=e.reference,n=e.element,r=e.placement,i=r?ui(r):null,o=r?zs(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Un:l={x:a,y:t.y-n.height};break;case Dr:l={x:a,y:t.y+t.height};break;case Tr:l={x:t.x+t.width,y:s};break;case Kn:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?Y0(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case $s:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Ac:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Mc(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?Aee:s,c=n.rootBoundary,u=c===void 0?aN:c,d=n.elementContext,f=d===void 0?Tl:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,y=fN(typeof g!="number"?g:pN(g,xu)),S=f===Tl?Mee:Tl,w=e.rects.popper,x=e.elements[m?S:f],_=ute(Ba(x)?x:x.contextElement||Uo(e.elements.popper),l,u,a),E=Ws(e.elements.reference),C=mN({reference:E,element:w,placement:i}),D=ey(Object.assign({},w,C)),A=f===Tl?D:E,R={top:_.top-A.top+y.top,bottom:A.bottom-_.bottom+y.bottom,left:_.left-A.left+y.left,right:A.right-_.right+y.right},T=e.modifiersData.offset;if(f===Tl&&T){var O=T[i];Object.keys(R).forEach(function(N){var M=[Tr,Dr].indexOf(N)>=0?1:-1,I=[Un,Dr].indexOf(N)>=0?"y":"x";R[N]+=O[I]*M})}return R}function dte(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?sN:l,u=zs(r),d=u?s?EO:EO.filter(function(m){return zs(m)===u}):xu,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=Mc(e,{placement:h,boundary:i,rootBoundary:o,padding:a})[ui(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function fte(e){if(ui(e)===z0)return[];var t=Fd(e);return[CO(e),t,CO(t)]}function pte(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,h=n.allowedAutoPlacements,g=t.options.placement,y=ui(g),S=y===g,w=l||(S||!m?[Fd(g)]:fte(g)),x=[g].concat(w).reduce(function(J,ee){return J.concat(ui(ee)===z0?dte(t,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,E=t.rects.popper,C=new Map,D=!0,A=x[0],R=0;R<x.length;R++){var T=x[R],O=ui(T),N=zs(T)===$s,M=[Un,Dr].indexOf(O)>=0,I=M?"width":"height",L=Mc(t,{placement:T,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),$=M?N?Tr:Kn:N?Dr:Un;_[I]>E[I]&&($=Fd($));var V=Fd($),W=[];if(o&&W.push(L[O]<=0),s&&W.push(L[$]<=0,L[V]<=0),W.every(function(J){return J})){A=T,D=!1;break}C.set(T,W)}if(D)for(var B=m?3:1,X=function(ee){var ie=x.find(function(ae){var ce=C.get(ae);if(ce)return ce.slice(0,ee).every(function(U){return U})});if(ie)return A=ie,"break"},q=B;q>0;q--){var re=X(q);if(re==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const hte={name:"flip",enabled:!0,phase:"main",fn:pte,requiresIfExists:["offset"],data:{_skip:!1}};function DO(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 TO(e){return[Un,Tr,Dr,Kn].some(function(t){return e[t]>=0})}function mte(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Mc(t,{elementContext:"reference"}),s=Mc(t,{altBoundary:!0}),l=DO(a,r),c=DO(s,i,o),u=TO(l),d=TO(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 gte={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:mte};function vte(e,t,n){var r=ui(e),i=[Kn,Un].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,[Kn,Tr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function yte(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=sN.reduce(function(u,d){return u[d]=vte(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 bte={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:yte};function xte(e){var t=e.state,n=e.name;t.modifiersData[n]=mN({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const wte={name:"popperOffsets",enabled:!0,phase:"read",fn:xte,data:{}};function _te(e){return e==="x"?"y":"x"}function Ste(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,h=m===void 0?0:m,g=Mc(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=ui(t.placement),S=zs(t.placement),w=!S,x=Y0(y),_=_te(x),E=t.modifiersData.popperOffsets,C=t.rects.reference,D=t.rects.popper,A=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,R=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(E){if(o){var N,M=x==="y"?Un:Kn,I=x==="y"?Dr:Tr,L=x==="y"?"height":"width",$=E[x],V=$+g[M],W=$-g[I],B=p?-D[L]/2:0,X=S===$s?C[L]:D[L],q=S===$s?-D[L]:-C[L],re=t.elements.arrow,J=p&&re?H0(re):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:dN(),ie=ee[M],ae=ee[I],ce=rc(0,C[L],J[L]),U=w?C[L]/2-B-ce-ie-R.mainAxis:X-ce-ie-R.mainAxis,K=w?-C[L]/2+B+ce+ae+R.mainAxis:q+ce+ae+R.mainAxis,Z=t.elements.arrow&&wu(t.elements.arrow),j=Z?x==="y"?Z.clientTop||0:Z.clientLeft||0:0,me=(N=T?.[x])!=null?N:0,te=$+U-me-j,ge=$+K-me,we=rc(p?Uf(V,te):V,$,p?Da(W,ge):W);E[x]=we,O[x]=we-$}if(s){var $e,ot=x==="x"?Un:Kn,bt=x==="x"?Dr:Tr,lt=E[_],Ue=_==="y"?"height":"width",kt=lt+g[ot],Wt=lt-g[bt],ft=[Un,Kn].indexOf(y)!==-1,un=($e=T?.[_])!=null?$e:0,en=ft?kt:lt-C[Ue]-D[Ue]-un+R.altAxis,dn=ft?lt+C[Ue]+D[Ue]-un-R.altAxis:Wt,Nn=p&&ft?Kee(en,lt,dn):rc(p?en:kt,lt,p?dn:Wt);E[_]=Nn,O[_]=Nn-lt}t.modifiersData[r]=O}}const Ete={name:"preventOverflow",enabled:!0,phase:"main",fn:Ste,requiresIfExists:["offset"]};function Ote(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Pte(e){return e===fr(e)||!Or(e)?U0(e):Ote(e)}function Cte(e){var t=e.getBoundingClientRect(),n=Bs(t.width)/e.offsetWidth||1,r=Bs(t.height)/e.offsetHeight||1;return n!==1||r!==1}function kte(e,t,n){n===void 0&&(n=!1);var r=Or(t),i=Or(t)&&Cte(t),o=Uo(t),a=Ws(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((gi(t)!=="body"||q0(o))&&(s=Pte(t)),Or(t)?(l=Ws(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=K0(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function Dte(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 Tte(e){var t=Dte(e);return zee.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function Ate(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Mte(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 AO={placement:"bottom",modifiers:[],strategy:"absolute"};function MO(){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 Nte(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?AO:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},AO,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(y){var S=typeof y=="function"?y(u.options):y;h(),u.options=Object.assign({},o,u.options,S),u.scrollParents={reference:Ba(s)?ic(s):s.contextElement?ic(s.contextElement):[],popper:ic(l)};var w=Tte(Mte([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(x){return x.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var y=u.elements,S=y.reference,w=y.popper;if(MO(S,w)){u.rects={reference:kte(S,wu(w),u.options.strategy==="fixed"),popper:H0(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 x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var _=u.orderedModifiers[x],E=_.fn,C=_.options,D=C===void 0?{}:C,A=_.name;typeof E=="function"&&(u=E({state:u,options:D,name:A,instance:p})||u)}}}},update:Ate(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){h(),f=!0}};if(!MO(s,l))return p;p.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var y=g.name,S=g.options,w=S===void 0?{}:S,x=g.effect;if(typeof x=="function"){var _=x({state:u,name:y,instance:p,options:w}),E=function(){};d.push(_||E)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}var jte=[rte,wte,tte,lN,bte,hte,Ete,Qee,gte],gN=Nte({defaultModifiers:jte});function vN(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:rN(n,r),{props:s,internalRef:l}=oN({...o,externalSlotProps:a}),c=kn(l,a?.ref,e.additionalProps?.ref);return nN(t,{...s,ref:c},r)}function ll(e){return parseInt(P.version,10)>=19?e?.props?.ref||null:e?.ref||null}function Rte(e){return typeof e=="function"?e():e}const Nc=P.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=P.useState(null),l=kn(P.isValidElement(r)?ll(r):null,n);if(Vi(()=>{o||s(Rte(i)||document.body)},[i,o]),Vi(()=>{if(a&&!o)return P1(n,a),()=>{P1(n,null)}},[n,a,o]),o){if(P.isValidElement(r)){const c={ref:l};return P.cloneElement(r,c)}return r}return a&&TP.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(Nc.propTypes={children:v.node,container:v.oneOfType([Xi,v.func]),disablePortal:v.bool});process.env.NODE_ENV!=="production"&&(Nc.propTypes=iC(Nc.propTypes));function Ite(e){return sn("MuiPopper",e)}Dn("MuiPopper",["root"]);function Lte(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 Kf(e){return typeof e=="function"?e():e}function ph(e){return e.nodeType!==void 0}function Fte(e){return!ph(e)}const $te=e=>{const{classes:t}=e;return _n({root:["root"]},Ite,t)},Bte={},Wte=P.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:h,...g}=t,y=P.useRef(null),S=kn(y,n),w=P.useRef(null),x=kn(w,d),_=P.useRef(x);Vi(()=>{_.current=x},[x]),P.useImperativeHandle(d,()=>w.current,[]);const E=Lte(c,o),[C,D]=P.useState(E),[A,R]=P.useState(Kf(r));P.useEffect(()=>{w.current&&w.current.forceUpdate()}),P.useEffect(()=>{r&&R(Kf(r))},[r]),Vi(()=>{if(!A||!l)return;const I=V=>{D(V.placement)};if(process.env.NODE_ENV!=="production"&&A&&ph(A)&&A.nodeType===1){const V=A.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(`
222
222
  `))}let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:V})=>{I(V)}}];s!=null&&(L=L.concat(s)),u&&u.modifiers!=null&&(L=L.concat(u.modifiers));const $=gN(A,y.current,{placement:E,...u,modifiers:L});return _.current($),()=>{$.destroy(),_.current(null)}},[A,a,s,l,u,E]);const T={placement:C};m!==null&&(T.TransitionProps=m);const O=$te(t),N=p.root??"div",M=vN({elementType:N,externalSlotProps:f.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:S},ownerState:t,className:O.root});return b.jsx(N,{...M,children:typeof i=="function"?i(T):i})}),yN=P.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=Bte,popperRef:p,style:m,transition:h=!1,slotProps:g={},slots:y={},...S}=t,[w,x]=P.useState(!0),_=()=>{x(!1)},E=()=>{x(!0)};if(!l&&!u&&(!h||w))return null;let C;if(o)C=o;else if(r){const R=Kf(r);C=R&&ph(R)?lr(R).body:lr(null).body}const D=!u&&l&&(!h||w)?"none":void 0,A=h?{in:u,onEnter:_,onExited:E}:void 0;return b.jsx(Nc,{disablePortal:s,container:C,children:b.jsx(Wte,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:h?!w:u,placement:d,popperOptions:f,popperRef:p,slotProps:g,slots:y,...S,style:{position:"fixed",top:0,left:0,display:D,...m},TransitionProps:A,children:i})})});process.env.NODE_ENV!=="production"&&(yN.propTypes={anchorEl:sl(v.oneOfType([Xi,v.object,v.func]),e=>{if(e.open){const t=Kf(e.anchorEl);if(t&&ph(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(`
223
223
  `))}else if(!t||typeof t.getBoundingClientRect!="function"||Fte(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(`
224
224
  `))}return null}),children:v.oneOfType([v.node,v.func]),container:v.oneOfType([Xi,v.func]),direction:v.oneOf(["ltr","rtl"]),disablePortal:v.bool,keepMounted:v.bool,modifiers:v.arrayOf(v.shape({data:v.object,effect:v.func,enabled:v.bool,fn:v.func,name:v.any,options:v.object,phase:v.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:v.arrayOf(v.string),requiresIfExists:v.arrayOf(v.string)})),open:v.bool.isRequired,placement:v.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:v.shape({modifiers:v.array,onFirstUpdate:v.func,placement:v.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:v.oneOf(["absolute","fixed"])}),popperRef:so,slotProps:v.shape({root:v.oneOfType([v.func,v.object])}),slots:v.shape({root:v.elementType}),transition:v.bool});const zte=Ce(yN,{name:"MuiPopper",slot:"Root"})({}),G0=P.forwardRef(function(t,n){const r=Oy(),i=Gn({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:h,popperRef:g,transition:y,slots:S,slotProps:w,...x}=i,_=S?.root??s?.Root,E={anchorEl:o,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:h,popperRef:g,transition:y,...x};return b.jsx(zte,{as:a,direction:r?"rtl":"ltr",slots:{root:_},slotProps:w??l,...E,ref:n})});process.env.NODE_ENV!=="production"&&(G0.propTypes={anchorEl:v.oneOfType([Xi,v.object,v.func]),children:v.oneOfType([v.node,v.func]),component:v.elementType,components:v.shape({Root:v.elementType}),componentsProps:v.shape({root:v.oneOfType([v.func,v.object])}),container:v.oneOfType([Xi,v.func]),disablePortal:v.bool,keepMounted:v.bool,modifiers:v.arrayOf(v.shape({data:v.object,effect:v.func,enabled:v.bool,fn:v.func,name:v.any,options:v.object,phase:v.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:v.arrayOf(v.string),requiresIfExists:v.arrayOf(v.string)})),open:v.bool.isRequired,placement:v.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:v.shape({modifiers:v.array,onFirstUpdate:v.func,placement:v.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:v.oneOf(["absolute","fixed"])}),popperRef:so,slotProps:v.shape({root:v.oneOfType([v.func,v.object])}),slots:v.shape({root:v.elementType}),sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),transition:v.bool});function ad(e){return parseInt(e,10)||0}const Vte={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Hte(e){for(const t in e)return!1;return!0}function NO(e){return Hte(e)||e.outerHeightStyle===0&&!e.overflowing}const bN=P.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:a,value:s,...l}=t,{current:c}=P.useRef(s!=null),u=P.useRef(null),d=kn(n,u),f=P.useRef(null),p=P.useRef(null),m=P.useCallback(()=>{const w=u.current,x=p.current;if(!w||!x)return;const E=Hi(w).getComputedStyle(w);if(E.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=E.width,x.value=w.value||t.placeholder||"x",x.value.slice(-1)===`
@@ -236,41 +236,41 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
236
236
  `))}},[en,we,S,w,W]),un&&(S?ft.length===0?kt=null:kt=ft.reduce((G,ue,fe)=>(G.push(ue),fe<ft.length-1&&G.push(", "),G),[]):kt=Wt);let Nn=ce;!a&&ae&&ee&&(Nn=j.clientWidth);let Kt;typeof M<"u"?Kt=M:Kt=d?null:0;const jn=N.id||(w?`mui-component-select-${w}`:void 0),ye={...t,variant:$,value:W,open:lt,error:p},fn=ere(ye),qt={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(ye):y.slotProps?.paper},H={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(ye):y.slotProps?.list},le=oC();return b.jsxs(P.Fragment,{children:[b.jsx(Xne,{as:"div",ref:Z,tabIndex:Kt,role:"combobox","aria-controls":lt?le:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":lt?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,jn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":O?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:bt,onMouseDown:d||R?null:te,onBlur:Ue,onFocus:C,...N,ownerState:ye,className:oe(N.className,fn.select,l),id:jn,children:Jne(kt)?YO||(YO=b.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):kt}),b.jsx(Zne,{"aria-invalid":p,value:Array.isArray(W)?W.join(","):W,name:w,ref:re,"aria-hidden":!0,onChange:$e,tabIndex:-1,disabled:d,className:fn.nativeInput,autoFocus:o,required:O,...V,ownerState:ye}),b.jsx(Qne,{as:m,className:fn.icon,ownerState:ye}),b.jsx(MN,{id:`menu-${w||""}`,anchorEl:j,open:lt,onClose:ge,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":S?"true":void 0,disableListWrap:!0,id:le,...H},paper:{...qt,style:{minWidth:Nn,...qt!=null?qt.style:null}}},children:dn})]})});process.env.NODE_ENV!=="production"&&(FN.propTypes={"aria-describedby":v.string,"aria-label":v.string,autoFocus:v.bool,autoWidth:v.bool,children:v.node,classes:v.object,className:v.string,defaultOpen:v.bool,defaultValue:v.any,disabled:v.bool,displayEmpty:v.bool,error:v.bool,IconComponent:v.elementType.isRequired,inputRef:so,labelId:v.string,MenuProps:v.object,multiple:v.bool,name:v.string,onBlur:v.func,onChange:v.func,onClose:v.func,onFocus:v.func,onOpen:v.func,open:v.bool,readOnly:v.bool,renderValue:v.func,required:v.bool,SelectDisplayProps:v.object,tabIndex:v.oneOfType([v.number,v.string]),type:v.any,value:v.any,variant:v.oneOf(["standard","outlined","filled"])});const tre=e=>{const{classes:t}=e,r=_n({root:["root"]},LN,t);return{...t,...r}},rx={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Ji(e)&&e!=="variant"},nre=Ce(ex,rx)(""),rre=Ce(nx,rx)(""),ire=Ce(J0,rx)(""),ix=P.forwardRef(function(t,n){const r=Gn({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Xte,id:d,input:f,inputProps:p,label:m,labelId:h,MenuProps:g,multiple:y=!1,native:S=!1,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:C,variant:D="outlined",...A}=r,R=S?RN:FN,T=Z0(),O=X0({props:r,muiFormControl:T,states:["variant","error"]}),N=O.variant||D,M={...r,variant:N,classes:a},I=tre(M),{root:L,...$}=I,V=f||{standard:b.jsx(nre,{ownerState:M}),outlined:b.jsx(rre,{label:m,ownerState:M}),filled:b.jsx(ire,{ownerState:M})}[N],W=kn(n,ll(V));return b.jsx(P.Fragment,{children:P.cloneElement(V,{inputComponent:R,inputProps:{children:o,error:O.error,IconComponent:u,variant:N,type:void 0,multiple:y,...S?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:h,MenuProps:g,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:{id:d,...C}},...p,classes:p?xn($,p.classes):$,...f?f.props.inputProps:{}},...(y&&S||c)&&N==="outlined"?{notched:!0}:{},ref:W,className:oe(V.props.className,s,I.root),...!f&&{variant:N},...A})})});process.env.NODE_ENV!=="production"&&(ix.propTypes={autoWidth:v.bool,children:v.node,classes:v.object,className:v.string,defaultOpen:v.bool,defaultValue:v.any,displayEmpty:v.bool,IconComponent:v.elementType,id:v.string,input:v.element,inputProps:v.object,label:v.node,labelId:v.string,MenuProps:v.object,multiple:v.bool,native:v.bool,onChange:v.func,onClose:v.func,onOpen:v.func,open:v.bool,renderValue:v.func,SelectDisplayProps:v.object,sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),value:v.oneOfType([v.oneOf([""]),v.any]),variant:v.oneOf(["filled","outlined","standard"])});ix.muiName="Select";function ore(e){return sn("MuiTooltip",e)}const Et=Dn("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function are(e){return Math.round(e*1e5)/1e5}const sre=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${on(o.split("-")[0])}`],arrow:["arrow"]};return _n(a,ore,t)},lre=Ce(G0,{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]}})(Tn(({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"] .${Et.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Et.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Et.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Et.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Et.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Et.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Et.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Et.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),cre=Ce("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${on(n.placement.split("-")[0])}`]]}})(Tn(({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,[`.${Et.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Et.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Et.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Et.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:`${are(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Et.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Et.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Et.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Et.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Et.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Et.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Et.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Et.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Et.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Et.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),ure=Ce("span",{name:"MuiTooltip",slot:"Arrow"})(Tn(({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 ld=!1;const KO=new dh;let jl={x:0,y:0};function cd(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const $N=P.forwardRef(function(t,n){const r=Gn({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:h=0,enterTouchDelay:g=700,followCursor:y=!1,id:S,leaveDelay:w=0,leaveTouchDelay:x=1500,onClose:_,onOpen:E,open:C,placement:D="bottom",PopperComponent:A,PopperProps:R={},slotProps:T={},slots:O={},title:N,TransitionComponent:M,TransitionProps:I,...L}=r,$=P.isValidElement(o)?o:b.jsx("span",{children:o}),V=_p(),W=Oy(),[B,X]=P.useState(),[q,re]=P.useState(null),J=P.useRef(!1),ee=f||y,ie=ql(),ae=ql(),ce=ql(),U=ql(),[K,Z]=Xg({controlled:C,default:!1,name:"Tooltip",state:"open"});let j=K;if(process.env.NODE_ENV!=="production"){const{current:be}=P.useRef(C!==void 0);P.useEffect(()=>{B&&B.disabled&&!be&&N!==""&&B.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(`
237
237
  `))},[N,B,be])}const me=oC(S),te=P.useRef(),ge=mc(()=>{te.current!==void 0&&(document.body.style.WebkitUserSelect=te.current,te.current=void 0),U.clear()});P.useEffect(()=>ge,[ge]);const we=be=>{KO.clear(),ld=!0,Z(!0),E&&!j&&E(be)},$e=mc(be=>{KO.start(800+w,()=>{ld=!1}),Z(!1),_&&j&&_(be),ie.start(V.transitions.duration.shortest,()=>{J.current=!1})}),ot=be=>{J.current&&be.type!=="touchstart"||(B&&B.removeAttribute("title"),ae.clear(),ce.clear(),m||ld&&h?ae.start(ld?h:m,()=>{we(be)}):we(be))},bt=be=>{ae.clear(),ce.start(w,()=>{$e(be)})},[,lt]=P.useState(!1),Ue=be=>{SO(be.target)||(lt(!1),bt(be))},kt=be=>{B||X(be.currentTarget),SO(be.target)&&(lt(!0),ot(be))},Wt=be=>{J.current=!0;const Sn=$.props;Sn.onTouchStart&&Sn.onTouchStart(be)},ft=be=>{Wt(be),ce.clear(),ie.clear(),ge(),te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(g,()=>{document.body.style.WebkitUserSelect=te.current,ot(be)})},un=be=>{$.props.onTouchEnd&&$.props.onTouchEnd(be),ge(),ce.start(x,()=>{$e(be)})};P.useEffect(()=>{if(!j)return;function be(Sn){Sn.key==="Escape"&&$e(Sn)}return document.addEventListener("keydown",be),()=>{document.removeEventListener("keydown",be)}},[$e,j]);const en=kn(ll($),X,n);!N&&N!==0&&(j=!1);const dn=P.useRef(),Nn=be=>{const Sn=$.props;Sn.onMouseMove&&Sn.onMouseMove(be),jl={x:be.clientX,y:be.clientY},dn.current&&dn.current.update()},Kt={},jn=typeof N=="string";c?(Kt.title=!j&&jn&&!d?N:null,Kt["aria-describedby"]=j?me:null):(Kt["aria-label"]=jn?N:null,Kt["aria-labelledby"]=j&&!jn?me:null);const ye={...Kt,...L,...$.props,className:oe(L.className,$.props.className),onTouchStart:Wt,ref:en,...y?{onMouseMove:Nn}:{}};process.env.NODE_ENV!=="production"&&(ye["data-mui-internal-clone-element"]=!0,P.useEffect(()=>{B&&!B.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(`
238
238
  `))},[B]));const fn={};p||(ye.onTouchStart=ft,ye.onTouchEnd=un),d||(ye.onMouseOver=cd(ot,ye.onMouseOver),ye.onMouseLeave=cd(bt,ye.onMouseLeave),ee||(fn.onMouseOver=ot,fn.onMouseLeave=bt)),u||(ye.onFocus=cd(kt,ye.onFocus),ye.onBlur=cd(Ue,ye.onBlur),ee||(fn.onFocus=kt,fn.onBlur=Ue)),process.env.NODE_ENV!=="production"&&$.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${$.props.title}\` or the Tooltip component.`].join(`
239
- `));const qt={...r,isRtl:W,arrow:i,disableInteractive:ee,placement:D,PopperComponentProp:A,touch:J.current},H=typeof T.popper=="function"?T.popper(qt):T.popper,le=P.useMemo(()=>{let be=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return R.popperOptions?.modifiers&&(be=be.concat(R.popperOptions.modifiers)),H?.popperOptions?.modifiers&&(be=be.concat(H.popperOptions.modifiers)),{...R.popperOptions,...H?.popperOptions,modifiers:be}},[q,R.popperOptions,H?.popperOptions]),G=sre(qt),ue=typeof T.transition=="function"?T.transition(qt):T.transition,fe={slots:{popper:s.Popper,transition:s.Transition??M,tooltip:s.Tooltip,arrow:s.Arrow,...O},slotProps:{arrow:T.arrow??l.arrow,popper:{...R,...H??l.popper},tooltip:T.tooltip??l.tooltip,transition:{...I,...ue??l.transition}}},[tt,pt]=Hn("popper",{elementType:lre,externalForwardedProps:fe,ownerState:qt,className:oe(G.popper,R?.className)}),[hr,uo]=Hn("transition",{elementType:jc,externalForwardedProps:fe,ownerState:qt}),[mr,qo]=Hn("tooltip",{elementType:cre,className:G.tooltip,externalForwardedProps:fe,ownerState:qt}),[_i,Hr]=Hn("arrow",{elementType:ure,className:G.arrow,externalForwardedProps:fe,ownerState:qt,ref:re});return b.jsxs(P.Fragment,{children:[P.cloneElement($,ye),b.jsx(tt,{as:A??G0,placement:D,anchorEl:y?{getBoundingClientRect:()=>({top:jl.y,left:jl.x,right:jl.x,bottom:jl.y,width:0,height:0})}:B,popperRef:dn,open:B?j:!1,id:me,transition:!0,...fn,...pt,popperOptions:le,children:({TransitionProps:be})=>b.jsx(hr,{timeout:V.transitions.duration.shorter,...be,...uo,children:b.jsxs(mr,{...qo,children:[N,i?b.jsx(_i,{...Hr}):null]})})})]})});process.env.NODE_ENV!=="production"&&($N.propTypes={arrow:v.bool,children:cl.isRequired,classes:v.object,className:v.string,components:v.shape({Arrow:v.elementType,Popper:v.elementType,Tooltip:v.elementType,Transition:v.elementType}),componentsProps:v.shape({arrow:v.object,popper:v.object,tooltip:v.object,transition:v.object}),describeChild:v.bool,disableFocusListener:v.bool,disableHoverListener:v.bool,disableInteractive:v.bool,disableTouchListener:v.bool,enterDelay:v.number,enterNextDelay:v.number,enterTouchDelay:v.number,followCursor:v.bool,id:v.string,leaveDelay:v.number,leaveTouchDelay:v.number,onClose:v.func,onOpen:v.func,open:v.bool,placement:v.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:v.elementType,PopperProps:v.object,slotProps:v.shape({arrow:v.oneOfType([v.func,v.object]),popper:v.oneOfType([v.func,v.object]),tooltip:v.oneOfType([v.func,v.object]),transition:v.oneOfType([v.func,v.object])}),slots:v.shape({arrow:v.elementType,popper:v.elementType,tooltip:v.elementType,transition:v.elementType}),sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),title:v.node,TransitionComponent:v.elementType,TransitionProps:v.object});function dre(e){return Fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function fre(e){return Fe({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 pre(e){return Fe({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)}Vd(ix)(()=>({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 ul({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=()=>{bw("widget_id",e),bw("export",!0),i()};return b.jsx("div",{className:"flex items-center gap-2",children:b.jsx($N,{title:"Export CSV for this widget",children:b.jsx("button",{onClick:u,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:b.jsx(fre,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function hre({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 b.jsx(Ha,{title:"Community",period:"This Month",icon:b.jsx(zy,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(Yy,{value:l(i,o)}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),b.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:b.jsx(xi,{width:"75%",height:"100%",children:b.jsxs(bu,{children:[b.jsxs(il,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[b.jsx(Br,{fill:a[0]}),b.jsx(Br,{fill:a[1]})]}),b.jsx(bi,{content:b.jsx(Zc,{})})]})})})]})})}function mre({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}],o=t?.widget==="commercial";return b.jsx(Ha,{title:"Engagement",period:"This Month",icon:b.jsx(rk,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} gap-[20px]`,actionButtons:!o&&b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsx("div",{className:"w-full h-[235px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(qM,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[b.jsx(ol,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),b.jsx($a,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),b.jsx(al,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),b.jsx(bi,{content:b.jsx(Zc,{}),cursor:{fill:"transparent"}}),b.jsx(nc,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>b.jsx(Br,{fill:r[s]},a.name))})]})})})})}function gre({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 b.jsxs(Ha,{title:"Facilities",period:"Today",icon:b.jsx(Mp,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),b.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),b.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),b.jsx("div",{className:"w-full h-[170px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(B0,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[b.jsx(ol,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(al,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),b.jsx($a,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),b.jsx($a,{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}),b.jsx(bi,{content:b.jsx(Zc,{})}),b.jsx(Co,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),b.jsx(Co,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function vre({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 b.jsx(Ha,{title:"Income",period:"This Month",icon:b.jsx(rv,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:b.jsx(ul,{widgetId:e?.widget_id,options:e?.communities}),children:b.jsxs("div",{children:[b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Income"}),b.jsx("div",{children:"Collection"}),b.jsx("div",{children:"Closing"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[b.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),b.jsx("div",{children:a(t.income,t?.currency_type)}),b.jsx("div",{children:a(t.collection,t?.currency_type)}),b.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),b.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex items-center gap-[12px]",children:[b.jsx(rv,{className:"!text-[24px] text-red-600"}),b.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Expenditure"}),b.jsx("div",{children:"Payment"}),b.jsx("div",{children:"Outstanding"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[b.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),b.jsx("div",{children:a(n.expenditure,n?.currency_type)}),b.jsx("div",{children:a(n.payment,n?.currency_type)}),b.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var yre="tippy-box",BN="tippy-content",bre="tippy-backdrop",WN="tippy-arrow",zN="tippy-svg-arrow",ua={passive:!0,capture:!0},VN=function(){return document.body};function xre(e,t){return{}.hasOwnProperty.call(e,t)}function Eg(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function ox(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function HN(e,t){return typeof e=="function"?e.apply(void 0,t):e}function qO(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function wre(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function _re(e){return e.split(/\s+/).filter(Boolean)}function fs(e){return[].concat(e)}function GO(e,t){e.indexOf(t)===-1&&e.push(t)}function Sre(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Ere(e){return e.split("-")[0]}function Gf(e){return[].slice.call(e)}function XO(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function ac(){return document.createElement("div")}function Rc(e){return["Element","Fragment"].some(function(t){return ox(e,t)})}function Ore(e){return ox(e,"NodeList")}function Pre(e){return ox(e,"MouseEvent")}function Cre(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function kre(e){return Rc(e)?[e]:Ore(e)?Gf(e):Array.isArray(e)?e:Gf(document.querySelectorAll(e))}function Og(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function QO(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Dre(e){var t,n=fs(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Tre(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=Ere(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,h=o.top-r+d>l,g=r-o.bottom-f>l,y=o.left-n+p>l,S=n-o.right-m>l;return h||g||y||S})}function Pg(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function ZO(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 ei={isTouch:!1},JO=0;function Are(){ei.isTouch||(ei.isTouch=!0,window.performance&&document.addEventListener("mousemove",YN))}function YN(){var e=performance.now();e-JO<20&&(ei.isTouch=!1,document.removeEventListener("mousemove",YN)),JO=e}function Mre(){var e=document.activeElement;if(Cre(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Nre(){document.addEventListener("touchstart",Are,ua),window.addEventListener("blur",Mre)}var jre=typeof window<"u"&&typeof document<"u",Rre=jre?!!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 eP(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Ire(e){return eP(`
239
+ `));const qt={...r,isRtl:W,arrow:i,disableInteractive:ee,placement:D,PopperComponentProp:A,touch:J.current},H=typeof T.popper=="function"?T.popper(qt):T.popper,le=P.useMemo(()=>{let be=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return R.popperOptions?.modifiers&&(be=be.concat(R.popperOptions.modifiers)),H?.popperOptions?.modifiers&&(be=be.concat(H.popperOptions.modifiers)),{...R.popperOptions,...H?.popperOptions,modifiers:be}},[q,R.popperOptions,H?.popperOptions]),G=sre(qt),ue=typeof T.transition=="function"?T.transition(qt):T.transition,fe={slots:{popper:s.Popper,transition:s.Transition??M,tooltip:s.Tooltip,arrow:s.Arrow,...O},slotProps:{arrow:T.arrow??l.arrow,popper:{...R,...H??l.popper},tooltip:T.tooltip??l.tooltip,transition:{...I,...ue??l.transition}}},[tt,pt]=Hn("popper",{elementType:lre,externalForwardedProps:fe,ownerState:qt,className:oe(G.popper,R?.className)}),[hr,uo]=Hn("transition",{elementType:jc,externalForwardedProps:fe,ownerState:qt}),[mr,qo]=Hn("tooltip",{elementType:cre,className:G.tooltip,externalForwardedProps:fe,ownerState:qt}),[_i,Hr]=Hn("arrow",{elementType:ure,className:G.arrow,externalForwardedProps:fe,ownerState:qt,ref:re});return b.jsxs(P.Fragment,{children:[P.cloneElement($,ye),b.jsx(tt,{as:A??G0,placement:D,anchorEl:y?{getBoundingClientRect:()=>({top:jl.y,left:jl.x,right:jl.x,bottom:jl.y,width:0,height:0})}:B,popperRef:dn,open:B?j:!1,id:me,transition:!0,...fn,...pt,popperOptions:le,children:({TransitionProps:be})=>b.jsx(hr,{timeout:V.transitions.duration.shorter,...be,...uo,children:b.jsxs(mr,{...qo,children:[N,i?b.jsx(_i,{...Hr}):null]})})})]})});process.env.NODE_ENV!=="production"&&($N.propTypes={arrow:v.bool,children:cl.isRequired,classes:v.object,className:v.string,components:v.shape({Arrow:v.elementType,Popper:v.elementType,Tooltip:v.elementType,Transition:v.elementType}),componentsProps:v.shape({arrow:v.object,popper:v.object,tooltip:v.object,transition:v.object}),describeChild:v.bool,disableFocusListener:v.bool,disableHoverListener:v.bool,disableInteractive:v.bool,disableTouchListener:v.bool,enterDelay:v.number,enterNextDelay:v.number,enterTouchDelay:v.number,followCursor:v.bool,id:v.string,leaveDelay:v.number,leaveTouchDelay:v.number,onClose:v.func,onOpen:v.func,open:v.bool,placement:v.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:v.elementType,PopperProps:v.object,slotProps:v.shape({arrow:v.oneOfType([v.func,v.object]),popper:v.oneOfType([v.func,v.object]),tooltip:v.oneOfType([v.func,v.object]),transition:v.oneOfType([v.func,v.object])}),slots:v.shape({arrow:v.elementType,popper:v.elementType,tooltip:v.elementType,transition:v.elementType}),sx:v.oneOfType([v.arrayOf(v.oneOfType([v.func,v.object,v.bool])),v.func,v.object]),title:v.node,TransitionComponent:v.elementType,TransitionProps:v.object});function dre(e){return Fe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function fre(e){return Fe({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 pre(e){return Fe({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)}Vd(ix)(()=>({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 ul({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=()=>{bw("widget_id",e),bw("export",!0),i()};return b.jsx("div",{className:"flex items-center gap-2",children:b.jsx($N,{title:"Export CSV for this widget",children:b.jsx("button",{onClick:u,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:b.jsx(fre,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function hre({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 b.jsx(Ha,{title:"Community",period:"This Month",icon:b.jsx(zy,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(Yy,{value:l(i,o)}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),b.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:b.jsx(xi,{width:"75%",height:"100%",children:b.jsxs(bu,{children:[b.jsxs(il,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[b.jsx(Br,{fill:a[0]}),b.jsx(Br,{fill:a[1]})]}),b.jsx(bi,{content:b.jsx(Zc,{})})]})})})]})})}function mre({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}],o=t?.widget==="commercial";return b.jsx(Ha,{title:"Engagement",period:"This Month",icon:b.jsx(rk,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} gap-[20px]`,actionButtons:!o&&b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsx("div",{className:"w-full h-[235px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(qM,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[b.jsx(ol,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),b.jsx($a,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),b.jsx(al,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),b.jsx(bi,{content:b.jsx(Zc,{}),cursor:{fill:"transparent"}}),b.jsx(nc,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>b.jsx(Br,{fill:r[s]},a.name))})]})})})})}function gre({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 b.jsxs(Ha,{title:"Facilities",period:"Today",icon:b.jsx(Mp,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),b.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),b.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),b.jsx("div",{className:"w-full h-[170px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(B0,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[b.jsx(ol,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(al,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),b.jsx($a,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),b.jsx($a,{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}),b.jsx(bi,{content:b.jsx(Zc,{})}),b.jsx(Co,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),b.jsx(Co,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function vre({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 b.jsx(Ha,{title:"Income",period:"This Month",icon:b.jsx(rv,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:b.jsx(ul,{widgetId:e?.widget_id,options:e?.communities}),children:b.jsxs("div",{children:[b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Income"}),b.jsx("div",{children:"Collection"}),b.jsx("div",{children:"Closing"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[b.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),b.jsx("div",{children:a(t.income,t?.currency_type)}),b.jsx("div",{children:a(t.collection,t?.currency_type)}),b.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),b.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex items-center gap-[12px]",children:[b.jsx(rv,{className:"!text-[24px] text-red-600"}),b.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Expenditure"}),b.jsx("div",{children:"Payment"}),b.jsx("div",{children:"Outstanding"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[b.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),b.jsx("div",{children:a(n.expenditure,n?.currency_type)}),b.jsx("div",{children:a(n.payment,n?.currency_type)}),b.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var yre="tippy-box",BN="tippy-content",bre="tippy-backdrop",WN="tippy-arrow",zN="tippy-svg-arrow",ua={passive:!0,capture:!0},VN=function(){return document.body};function xre(e,t){return{}.hasOwnProperty.call(e,t)}function Eg(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function ox(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function HN(e,t){return typeof e=="function"?e.apply(void 0,t):e}function qO(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function wre(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function _re(e){return e.split(/\s+/).filter(Boolean)}function fs(e){return[].concat(e)}function GO(e,t){e.indexOf(t)===-1&&e.push(t)}function Sre(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function Ere(e){return e.split("-")[0]}function Gf(e){return[].slice.call(e)}function XO(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function ac(){return document.createElement("div")}function Rc(e){return["Element","Fragment"].some(function(t){return ox(e,t)})}function Ore(e){return ox(e,"NodeList")}function Pre(e){return ox(e,"MouseEvent")}function Cre(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function kre(e){return Rc(e)?[e]:Ore(e)?Gf(e):Array.isArray(e)?e:Gf(document.querySelectorAll(e))}function Og(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function QO(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function Dre(e){var t,n=fs(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function Tre(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=Ere(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,h=o.top-r+d>l,g=r-o.bottom-f>l,y=o.left-n+p>l,S=n-o.right-m>l;return h||g||y||S})}function Pg(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function ZO(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 ei={isTouch:!1},JO=0;function Are(){ei.isTouch||(ei.isTouch=!0,window.performance&&document.addEventListener("mousemove",YN))}function YN(){var e=performance.now();e-JO<20&&(ei.isTouch=!1,document.removeEventListener("mousemove",YN)),JO=e}function Mre(){var e=document.activeElement;if(Cre(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Nre(){document.addEventListener("touchstart",Are,ua),window.addEventListener("blur",Mre)}var jre=typeof window<"u"&&typeof document<"u",Rre=jre?!!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 e2(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Ire(e){return e2(`
240
240
  %ctippy.js
241
241
 
242
- %c`+eP(e)+`
242
+ %c`+e2(e)+`
243
243
 
244
244
  %c👷‍ This is a development-only message. It will be removed in production.
245
- `)}function UN(e){return[Ire(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ic;process.env.NODE_ENV!=="production"&&Lre();function Lre(){Ic=new Set}function Di(e,t){if(e&&!Ic.has(t)){var n;Ic.add(t),(n=console).warn.apply(n,UN(t))}}function ny(e,t){if(e&&!Ic.has(t)){var n;Ic.add(t),(n=console).error.apply(n,UN(t))}}function Fre(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;ny(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),ny(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var KN={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},$re={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},or=Object.assign({appendTo:VN,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},KN,$re),Bre=Object.keys(or),Wre=function(t){process.env.NODE_ENV!=="production"&&GN(t,[]);var n=Object.keys(t);n.forEach(function(r){or[r]=t[r]})};function qN(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=or[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function zre(e,t){var n=t?Object.keys(qN(Object.assign({},or,{plugins:t}))):Bre,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 tP(e,t){var n=Object.assign({},t,{content:HN(t.content,[e])},t.ignoreAttributes?{}:zre(e,t.plugins));return n.aria=Object.assign({},or.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 GN(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=wre(or,Object.keys(KN)),o=!xre(i,r);o&&(o=t.filter(function(a){return a.name===r}).length===0),Di(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.",`
245
+ `)}function UN(e){return[Ire(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Ic;process.env.NODE_ENV!=="production"&&Lre();function Lre(){Ic=new Set}function Di(e,t){if(e&&!Ic.has(t)){var n;Ic.add(t),(n=console).warn.apply(n,UN(t))}}function ny(e,t){if(e&&!Ic.has(t)){var n;Ic.add(t),(n=console).error.apply(n,UN(t))}}function Fre(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;ny(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),ny(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var KN={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},$re={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},or=Object.assign({appendTo:VN,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},KN,$re),Bre=Object.keys(or),Wre=function(t){process.env.NODE_ENV!=="production"&&GN(t,[]);var n=Object.keys(t);n.forEach(function(r){or[r]=t[r]})};function qN(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=or[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function zre(e,t){var n=t?Object.keys(qN(Object.assign({},or,{plugins:t}))):Bre,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 t2(e,t){var n=Object.assign({},t,{content:HN(t.content,[e])},t.ignoreAttributes?{}:zre(e,t.plugins));return n.aria=Object.assign({},or.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 GN(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=wre(or,Object.keys(KN)),o=!xre(i,r);o&&(o=t.filter(function(a){return a.name===r}).length===0),Di(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.",`
246
246
 
247
247
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
248
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Vre=function(){return"innerHTML"};function ry(e,t){e[Vre()]=t}function nP(e){var t=ac();return e===!0?t.className=WN:(t.className=zN,Rc(e)?t.appendChild(e):ry(t,e)),t}function rP(e,t){Rc(t.content)?(ry(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?ry(e,t.content):e.textContent=t.content)}function iy(e){var t=e.firstElementChild,n=Gf(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(BN)}),arrow:n.find(function(r){return r.classList.contains(WN)||r.classList.contains(zN)}),backdrop:n.find(function(r){return r.classList.contains(bre)})}}function XN(e){var t=ac(),n=ac();n.className=yre,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ac();r.className=BN,r.setAttribute("data-state","hidden"),rP(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=iy(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)&&rP(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(nP(a.arrow))):l.appendChild(nP(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}XN.$$tippy=!0;var Hre=1,ud=[],Cg=[];function Yre(e,t){var n=tP(e,Object.assign({},or,qN(XO(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=qO(te,n.interactiveDebounce),h,g=Hre++,y=null,S=Sre(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:g,reference:e,popper:ac(),popperInstance:y,props:n,state:w,plugins:S,clearDelayTimeouts:en,setProps:dn,setContent:Nn,show:Kt,hide:jn,hideWithInteractivity:ye,enable:ft,disable:un,unmount:fn,destroy:qt};if(!n.render)return process.env.NODE_ENV!=="production"&&ny(!0,"render() function has not been supplied."),x;var _=n.render(x),E=_.popper,C=_.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+x.id,x.popper=E,e._tippy=x,E._tippy=x;var D=S.map(function(H){return H.fn(x)}),A=e.hasAttribute("aria-expanded");return Z(),B(),$(),V("onCreate",[x]),n.showOnCreate&&kt(),E.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",m)}),x;function R(){var H=x.props.touch;return Array.isArray(H)?H:[H,0]}function T(){return R()[0]==="hold"}function O(){var H;return!!((H=x.props.render)!=null&&H.$$tippy)}function N(){return h||e}function M(){var H=N().parentNode;return H?Dre(H):document}function I(){return iy(E)}function L(H){return x.state.isMounted&&!x.state.isVisible||ei.isTouch||u&&u.type==="focus"?0:Eg(x.props.delay,H?0:1,or.delay)}function $(H){H===void 0&&(H=!1),E.style.pointerEvents=x.props.interactive&&!H?"":"none",E.style.zIndex=""+x.props.zIndex}function V(H,le,G){if(G===void 0&&(G=!0),D.forEach(function(fe){fe[H]&&fe[H].apply(fe,le)}),G){var ue;(ue=x.props)[H].apply(ue,le)}}function W(){var H=x.props.aria;if(H.content){var le="aria-"+H.content,G=E.id,ue=fs(x.props.triggerTarget||e);ue.forEach(function(fe){var tt=fe.getAttribute(le);if(x.state.isVisible)fe.setAttribute(le,tt?tt+" "+G:G);else{var pt=tt&&tt.replace(G,"").trim();pt?fe.setAttribute(le,pt):fe.removeAttribute(le)}})}}function B(){if(!(A||!x.props.aria.expanded)){var H=fs(x.props.triggerTarget||e);H.forEach(function(le){x.props.interactive?le.setAttribute("aria-expanded",x.state.isVisible&&le===N()?"true":"false"):le.removeAttribute("aria-expanded")})}}function X(){M().removeEventListener("mousemove",m),ud=ud.filter(function(H){return H!==m})}function q(H){if(!(ei.isTouch&&(l||H.type==="mousedown"))){var le=H.composedPath&&H.composedPath()[0]||H.target;if(!(x.props.interactive&&ZO(E,le))){if(fs(x.props.triggerTarget||e).some(function(G){return ZO(G,le)})){if(ei.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[x,H]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout(function(){s=!1}),x.state.isMounted||ie())}}}function re(){l=!0}function J(){l=!1}function ee(){var H=M();H.addEventListener("mousedown",q,!0),H.addEventListener("touchend",q,ua),H.addEventListener("touchstart",J,ua),H.addEventListener("touchmove",re,ua)}function ie(){var H=M();H.removeEventListener("mousedown",q,!0),H.removeEventListener("touchend",q,ua),H.removeEventListener("touchstart",J,ua),H.removeEventListener("touchmove",re,ua)}function ae(H,le){U(H,function(){!x.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&le()})}function ce(H,le){U(H,le)}function U(H,le){var G=I().box;function ue(fe){fe.target===G&&(Pg(G,"remove",ue),le())}if(H===0)return le();Pg(G,"remove",d),Pg(G,"add",ue),d=ue}function K(H,le,G){G===void 0&&(G=!1);var ue=fs(x.props.triggerTarget||e);ue.forEach(function(fe){fe.addEventListener(H,le,G),p.push({node:fe,eventType:H,handler:le,options:G})})}function Z(){T()&&(K("touchstart",me,{passive:!0}),K("touchend",ge,{passive:!0})),_re(x.props.trigger).forEach(function(H){if(H!=="manual")switch(K(H,me),H){case"mouseenter":K("mouseleave",ge);break;case"focus":K(Rre?"focusout":"blur",we);break;case"focusin":K("focusout",we);break}})}function j(){p.forEach(function(H){var le=H.node,G=H.eventType,ue=H.handler,fe=H.options;le.removeEventListener(G,ue,fe)}),p=[]}function me(H){var le,G=!1;if(!(!x.state.isEnabled||$e(H)||s)){var ue=((le=u)==null?void 0:le.type)==="focus";u=H,h=H.currentTarget,B(),!x.state.isVisible&&Pre(H)&&ud.forEach(function(fe){return fe(H)}),H.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||a)&&x.props.hideOnClick!==!1&&x.state.isVisible?G=!0:kt(H),H.type==="click"&&(a=!G),G&&!ue&&Wt(H)}}function te(H){var le=H.target,G=N().contains(le)||E.contains(le);if(!(H.type==="mousemove"&&G)){var ue=Ue().concat(E).map(function(fe){var tt,pt=fe._tippy,hr=(tt=pt.popperInstance)==null?void 0:tt.state;return hr?{popperRect:fe.getBoundingClientRect(),popperState:hr,props:n}:null}).filter(Boolean);Tre(ue,H)&&(X(),Wt(H))}}function ge(H){var le=$e(H)||x.props.trigger.indexOf("click")>=0&&a;if(!le){if(x.props.interactive){x.hideWithInteractivity(H);return}Wt(H)}}function we(H){x.props.trigger.indexOf("focusin")<0&&H.target!==N()||x.props.interactive&&H.relatedTarget&&E.contains(H.relatedTarget)||Wt(H)}function $e(H){return ei.isTouch?T()!==H.type.indexOf("touch")>=0:!1}function ot(){bt();var H=x.props,le=H.popperOptions,G=H.placement,ue=H.offset,fe=H.getReferenceClientRect,tt=H.moveTransition,pt=O()?iy(E).arrow:null,hr=fe?{getBoundingClientRect:fe,contextElement:fe.contextElement||N()}:e,uo={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(_i){var Hr=_i.state;if(O()){var be=I(),Sn=be.box;["placement","reference-hidden","escaped"].forEach(function(Ga){Ga==="placement"?Sn.setAttribute("data-placement",Hr.placement):Hr.attributes.popper["data-popper-"+Ga]?Sn.setAttribute("data-"+Ga,""):Sn.removeAttribute("data-"+Ga)}),Hr.attributes.popper={}}}},mr=[{name:"offset",options:{offset:ue}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!tt}},uo];O()&&pt&&mr.push({name:"arrow",options:{element:pt,padding:3}}),mr.push.apply(mr,le?.modifiers||[]),x.popperInstance=gN(hr,E,Object.assign({},le,{placement:G,onFirstUpdate:f,modifiers:mr}))}function bt(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function lt(){var H=x.props.appendTo,le,G=N();x.props.interactive&&H===VN||H==="parent"?le=G.parentNode:le=HN(H,[G]),le.contains(E)||le.appendChild(E),x.state.isMounted=!0,ot(),process.env.NODE_ENV!=="production"&&Di(x.props.interactive&&H===or.appendTo&&G.nextElementSibling!==E,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
248
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Vre=function(){return"innerHTML"};function ry(e,t){e[Vre()]=t}function n2(e){var t=ac();return e===!0?t.className=WN:(t.className=zN,Rc(e)?t.appendChild(e):ry(t,e)),t}function r2(e,t){Rc(t.content)?(ry(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?ry(e,t.content):e.textContent=t.content)}function iy(e){var t=e.firstElementChild,n=Gf(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(BN)}),arrow:n.find(function(r){return r.classList.contains(WN)||r.classList.contains(zN)}),backdrop:n.find(function(r){return r.classList.contains(bre)})}}function XN(e){var t=ac(),n=ac();n.className=yre,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=ac();r.className=BN,r.setAttribute("data-state","hidden"),r2(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=iy(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)&&r2(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(n2(a.arrow))):l.appendChild(n2(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}XN.$$tippy=!0;var Hre=1,ud=[],Cg=[];function Yre(e,t){var n=t2(e,Object.assign({},or,qN(XO(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=qO(te,n.interactiveDebounce),h,g=Hre++,y=null,S=Sre(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:g,reference:e,popper:ac(),popperInstance:y,props:n,state:w,plugins:S,clearDelayTimeouts:en,setProps:dn,setContent:Nn,show:Kt,hide:jn,hideWithInteractivity:ye,enable:ft,disable:un,unmount:fn,destroy:qt};if(!n.render)return process.env.NODE_ENV!=="production"&&ny(!0,"render() function has not been supplied."),x;var _=n.render(x),E=_.popper,C=_.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+x.id,x.popper=E,e._tippy=x,E._tippy=x;var D=S.map(function(H){return H.fn(x)}),A=e.hasAttribute("aria-expanded");return Z(),B(),$(),V("onCreate",[x]),n.showOnCreate&&kt(),E.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",m)}),x;function R(){var H=x.props.touch;return Array.isArray(H)?H:[H,0]}function T(){return R()[0]==="hold"}function O(){var H;return!!((H=x.props.render)!=null&&H.$$tippy)}function N(){return h||e}function M(){var H=N().parentNode;return H?Dre(H):document}function I(){return iy(E)}function L(H){return x.state.isMounted&&!x.state.isVisible||ei.isTouch||u&&u.type==="focus"?0:Eg(x.props.delay,H?0:1,or.delay)}function $(H){H===void 0&&(H=!1),E.style.pointerEvents=x.props.interactive&&!H?"":"none",E.style.zIndex=""+x.props.zIndex}function V(H,le,G){if(G===void 0&&(G=!0),D.forEach(function(fe){fe[H]&&fe[H].apply(fe,le)}),G){var ue;(ue=x.props)[H].apply(ue,le)}}function W(){var H=x.props.aria;if(H.content){var le="aria-"+H.content,G=E.id,ue=fs(x.props.triggerTarget||e);ue.forEach(function(fe){var tt=fe.getAttribute(le);if(x.state.isVisible)fe.setAttribute(le,tt?tt+" "+G:G);else{var pt=tt&&tt.replace(G,"").trim();pt?fe.setAttribute(le,pt):fe.removeAttribute(le)}})}}function B(){if(!(A||!x.props.aria.expanded)){var H=fs(x.props.triggerTarget||e);H.forEach(function(le){x.props.interactive?le.setAttribute("aria-expanded",x.state.isVisible&&le===N()?"true":"false"):le.removeAttribute("aria-expanded")})}}function X(){M().removeEventListener("mousemove",m),ud=ud.filter(function(H){return H!==m})}function q(H){if(!(ei.isTouch&&(l||H.type==="mousedown"))){var le=H.composedPath&&H.composedPath()[0]||H.target;if(!(x.props.interactive&&ZO(E,le))){if(fs(x.props.triggerTarget||e).some(function(G){return ZO(G,le)})){if(ei.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[x,H]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout(function(){s=!1}),x.state.isMounted||ie())}}}function re(){l=!0}function J(){l=!1}function ee(){var H=M();H.addEventListener("mousedown",q,!0),H.addEventListener("touchend",q,ua),H.addEventListener("touchstart",J,ua),H.addEventListener("touchmove",re,ua)}function ie(){var H=M();H.removeEventListener("mousedown",q,!0),H.removeEventListener("touchend",q,ua),H.removeEventListener("touchstart",J,ua),H.removeEventListener("touchmove",re,ua)}function ae(H,le){U(H,function(){!x.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&le()})}function ce(H,le){U(H,le)}function U(H,le){var G=I().box;function ue(fe){fe.target===G&&(Pg(G,"remove",ue),le())}if(H===0)return le();Pg(G,"remove",d),Pg(G,"add",ue),d=ue}function K(H,le,G){G===void 0&&(G=!1);var ue=fs(x.props.triggerTarget||e);ue.forEach(function(fe){fe.addEventListener(H,le,G),p.push({node:fe,eventType:H,handler:le,options:G})})}function Z(){T()&&(K("touchstart",me,{passive:!0}),K("touchend",ge,{passive:!0})),_re(x.props.trigger).forEach(function(H){if(H!=="manual")switch(K(H,me),H){case"mouseenter":K("mouseleave",ge);break;case"focus":K(Rre?"focusout":"blur",we);break;case"focusin":K("focusout",we);break}})}function j(){p.forEach(function(H){var le=H.node,G=H.eventType,ue=H.handler,fe=H.options;le.removeEventListener(G,ue,fe)}),p=[]}function me(H){var le,G=!1;if(!(!x.state.isEnabled||$e(H)||s)){var ue=((le=u)==null?void 0:le.type)==="focus";u=H,h=H.currentTarget,B(),!x.state.isVisible&&Pre(H)&&ud.forEach(function(fe){return fe(H)}),H.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||a)&&x.props.hideOnClick!==!1&&x.state.isVisible?G=!0:kt(H),H.type==="click"&&(a=!G),G&&!ue&&Wt(H)}}function te(H){var le=H.target,G=N().contains(le)||E.contains(le);if(!(H.type==="mousemove"&&G)){var ue=Ue().concat(E).map(function(fe){var tt,pt=fe._tippy,hr=(tt=pt.popperInstance)==null?void 0:tt.state;return hr?{popperRect:fe.getBoundingClientRect(),popperState:hr,props:n}:null}).filter(Boolean);Tre(ue,H)&&(X(),Wt(H))}}function ge(H){var le=$e(H)||x.props.trigger.indexOf("click")>=0&&a;if(!le){if(x.props.interactive){x.hideWithInteractivity(H);return}Wt(H)}}function we(H){x.props.trigger.indexOf("focusin")<0&&H.target!==N()||x.props.interactive&&H.relatedTarget&&E.contains(H.relatedTarget)||Wt(H)}function $e(H){return ei.isTouch?T()!==H.type.indexOf("touch")>=0:!1}function ot(){bt();var H=x.props,le=H.popperOptions,G=H.placement,ue=H.offset,fe=H.getReferenceClientRect,tt=H.moveTransition,pt=O()?iy(E).arrow:null,hr=fe?{getBoundingClientRect:fe,contextElement:fe.contextElement||N()}:e,uo={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(_i){var Hr=_i.state;if(O()){var be=I(),Sn=be.box;["placement","reference-hidden","escaped"].forEach(function(Ga){Ga==="placement"?Sn.setAttribute("data-placement",Hr.placement):Hr.attributes.popper["data-popper-"+Ga]?Sn.setAttribute("data-"+Ga,""):Sn.removeAttribute("data-"+Ga)}),Hr.attributes.popper={}}}},mr=[{name:"offset",options:{offset:ue}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!tt}},uo];O()&&pt&&mr.push({name:"arrow",options:{element:pt,padding:3}}),mr.push.apply(mr,le?.modifiers||[]),x.popperInstance=gN(hr,E,Object.assign({},le,{placement:G,onFirstUpdate:f,modifiers:mr}))}function bt(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function lt(){var H=x.props.appendTo,le,G=N();x.props.interactive&&H===VN||H==="parent"?le=G.parentNode:le=HN(H,[G]),le.contains(E)||le.appendChild(E),x.state.isMounted=!0,ot(),process.env.NODE_ENV!=="production"&&Di(x.props.interactive&&H===or.appendTo&&G.nextElementSibling!==E,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
249
249
 
250
250
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
251
251
 
252
252
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
253
253
 
254
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ue(){return Gf(E.querySelectorAll("[data-tippy-root]"))}function kt(H){x.clearDelayTimeouts(),H&&V("onTrigger",[x,H]),ee();var le=L(!0),G=R(),ue=G[0],fe=G[1];ei.isTouch&&ue==="hold"&&fe&&(le=fe),le?r=setTimeout(function(){x.show()},le):x.show()}function Wt(H){if(x.clearDelayTimeouts(),V("onUntrigger",[x,H]),!x.state.isVisible){ie();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(H.type)>=0&&a)){var le=L(!1);le?i=setTimeout(function(){x.state.isVisible&&x.hide()},le):o=requestAnimationFrame(function(){x.hide()})}}function ft(){x.state.isEnabled=!0}function un(){x.hide(),x.state.isEnabled=!1}function en(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function dn(H){if(process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("setProps")),!x.state.isDestroyed){V("onBeforeUpdate",[x,H]),j();var le=x.props,G=tP(e,Object.assign({},le,XO(H),{ignoreAttributes:!0}));x.props=G,Z(),le.interactiveDebounce!==G.interactiveDebounce&&(X(),m=qO(te,G.interactiveDebounce)),le.triggerTarget&&!G.triggerTarget?fs(le.triggerTarget).forEach(function(ue){ue.removeAttribute("aria-expanded")}):G.triggerTarget&&e.removeAttribute("aria-expanded"),B(),$(),C&&C(le,G),x.popperInstance&&(ot(),Ue().forEach(function(ue){requestAnimationFrame(ue._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[x,H])}}function Nn(H){x.setProps({content:H})}function Kt(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("show"));var H=x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,ue=ei.isTouch&&!x.props.touch,fe=Eg(x.props.duration,0,or.duration);if(!(H||le||G||ue)&&!N().hasAttribute("disabled")&&(V("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,O()&&(E.style.visibility="visible"),$(),ee(),x.state.isMounted||(E.style.transition="none"),O()){var tt=I(),pt=tt.box,hr=tt.content;Og([pt,hr],0)}f=function(){var mr;if(!(!x.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=x.props.moveTransition,O()&&x.props.animation){var qo=I(),_i=qo.box,Hr=qo.content;Og([_i,Hr],fe),QO([_i,Hr],"visible")}W(),B(),GO(Cg,x),(mr=x.popperInstance)==null||mr.forceUpdate(),V("onMount",[x]),x.props.animation&&O()&&ce(fe,function(){x.state.isShown=!0,V("onShown",[x])})}},lt()}}function jn(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("hide"));var H=!x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,ue=Eg(x.props.duration,1,or.duration);if(!(H||le||G)&&(V("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,c=!1,a=!1,O()&&(E.style.visibility="hidden"),X(),ie(),$(!0),O()){var fe=I(),tt=fe.box,pt=fe.content;x.props.animation&&(Og([tt,pt],ue),QO([tt,pt],"hidden"))}W(),B(),x.props.animation?O()&&ae(ue,x.unmount):x.unmount()}}function ye(H){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("hideWithInteractivity")),M().addEventListener("mousemove",m),GO(ud,m),m(H)}function fn(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(bt(),Ue().forEach(function(H){H._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),Cg=Cg.filter(function(H){return H!==x}),x.state.isMounted=!1,V("onHidden",[x]))}function qt(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),j(),delete e._tippy,x.state.isDestroyed=!0,V("onDestroy",[x]))}}function _u(e,t){t===void 0&&(t={});var n=or.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Fre(e),GN(t,n)),Nre();var r=Object.assign({},t,{plugins:n}),i=kre(e);if(process.env.NODE_ENV!=="production"){var o=Rc(r.content),a=i.length>1;Di(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
254
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ue(){return Gf(E.querySelectorAll("[data-tippy-root]"))}function kt(H){x.clearDelayTimeouts(),H&&V("onTrigger",[x,H]),ee();var le=L(!0),G=R(),ue=G[0],fe=G[1];ei.isTouch&&ue==="hold"&&fe&&(le=fe),le?r=setTimeout(function(){x.show()},le):x.show()}function Wt(H){if(x.clearDelayTimeouts(),V("onUntrigger",[x,H]),!x.state.isVisible){ie();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(H.type)>=0&&a)){var le=L(!1);le?i=setTimeout(function(){x.state.isVisible&&x.hide()},le):o=requestAnimationFrame(function(){x.hide()})}}function ft(){x.state.isEnabled=!0}function un(){x.hide(),x.state.isEnabled=!1}function en(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function dn(H){if(process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("setProps")),!x.state.isDestroyed){V("onBeforeUpdate",[x,H]),j();var le=x.props,G=t2(e,Object.assign({},le,XO(H),{ignoreAttributes:!0}));x.props=G,Z(),le.interactiveDebounce!==G.interactiveDebounce&&(X(),m=qO(te,G.interactiveDebounce)),le.triggerTarget&&!G.triggerTarget?fs(le.triggerTarget).forEach(function(ue){ue.removeAttribute("aria-expanded")}):G.triggerTarget&&e.removeAttribute("aria-expanded"),B(),$(),C&&C(le,G),x.popperInstance&&(ot(),Ue().forEach(function(ue){requestAnimationFrame(ue._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[x,H])}}function Nn(H){x.setProps({content:H})}function Kt(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("show"));var H=x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,ue=ei.isTouch&&!x.props.touch,fe=Eg(x.props.duration,0,or.duration);if(!(H||le||G||ue)&&!N().hasAttribute("disabled")&&(V("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,O()&&(E.style.visibility="visible"),$(),ee(),x.state.isMounted||(E.style.transition="none"),O()){var tt=I(),pt=tt.box,hr=tt.content;Og([pt,hr],0)}f=function(){var mr;if(!(!x.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=x.props.moveTransition,O()&&x.props.animation){var qo=I(),_i=qo.box,Hr=qo.content;Og([_i,Hr],fe),QO([_i,Hr],"visible")}W(),B(),GO(Cg,x),(mr=x.popperInstance)==null||mr.forceUpdate(),V("onMount",[x]),x.props.animation&&O()&&ce(fe,function(){x.state.isShown=!0,V("onShown",[x])})}},lt()}}function jn(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("hide"));var H=!x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,ue=Eg(x.props.duration,1,or.duration);if(!(H||le||G)&&(V("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,c=!1,a=!1,O()&&(E.style.visibility="hidden"),X(),ie(),$(!0),O()){var fe=I(),tt=fe.box,pt=fe.content;x.props.animation&&(Og([tt,pt],ue),QO([tt,pt],"hidden"))}W(),B(),x.props.animation?O()&&ae(ue,x.unmount):x.unmount()}}function ye(H){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("hideWithInteractivity")),M().addEventListener("mousemove",m),GO(ud,m),m(H)}function fn(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(bt(),Ue().forEach(function(H){H._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),Cg=Cg.filter(function(H){return H!==x}),x.state.isMounted=!1,V("onHidden",[x]))}function qt(){process.env.NODE_ENV!=="production"&&Di(x.state.isDestroyed,as("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),j(),delete e._tippy,x.state.isDestroyed=!0,V("onDestroy",[x]))}}function _u(e,t){t===void 0&&(t={});var n=or.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Fre(e),GN(t,n)),Nre();var r=Object.assign({},t,{plugins:n}),i=kre(e);if(process.env.NODE_ENV!=="production"){var o=Rc(r.content),a=i.length>1;Di(o&&a,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
255
255
 
256
256
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
257
257
 
258
258
  `,`1) content: element.innerHTML
259
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&Yre(c,r);return u&&l.push(u),l},[]);return Rc(e)?s[0]:s}_u.defaultProps=or;_u.setDefaultProps=Wre;_u.currentInput=ei;Object.assign({},lN,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});_u.setDefaultProps({render:XN});function QN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ZN=typeof window<"u"&&typeof document<"u";function oy(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function iP(){return ZN&&document.createElement("div")}function Ure(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function JN(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!JN(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Kre(e){var t=[];return e.forEach(function(n){t.find(function(r){return JN(n,r)})||t.push(n)}),t}function qre(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Kre([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var kg=ZN?k.useLayoutEffect:k.useEffect;function Gre(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function oP(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Xre={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}oP(n,"add",t.props.className)}function o(){r()&&oP(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function Qre(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=QN(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,h=a!==void 0,g=k.useState(!1),y=g[0],S=g[1],w=k.useState({}),x=w[0],_=w[1],E=k.useState(),C=E[0],D=E[1],A=Gre(function(){return{container:iP(),renders:1}}),R=Object.assign({ignoreAttributes:f},p,{content:A.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){R[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),R.trigger="manual",R.hideOnClick=!1),h&&(u=!0);var T=R,O=R.plugins||[];s&&(T=Object.assign({},R,{plugins:h&&a.data!=null?[].concat(O,[{fn:function(){return{onTrigger:function(L,$){var V=a.data.children.find(function(W){var B=W.instance;return B.reference===$.currentTarget});L.state.$$activeSingletonInstance=V.instance,D(V.content)}}}}]):O,render:function(){return{popper:A.container}}}));var N=[l].concat(r?[r.type]:[]);return kg(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var I=e(M||A.ref||iP(),Object.assign({},T,{plugins:[Xre].concat(R.plugins||[])}));return A.instance=I,u&&I.disable(),o&&I.show(),h&&a.hook({instance:I,content:i,props:T,setSingletonContent:D}),S(!0),function(){I.destroy(),a?.cleanup(I)}},N),kg(function(){var M;if(A.renders===1){A.renders++;return}var I=A.instance;I.setProps(qre(I.props,T)),(M=I.popperInstance)==null||M.forceUpdate(),u?I.disable():I.enable(),m&&(o?I.show():I.hide()),h&&a.hook({instance:I,content:i,props:T,setSingletonContent:D})}),kg(function(){var M;if(s){var I=A.instance;I.setProps({popperOptions:Object.assign({},I.props.popperOptions,{modifiers:[].concat((((M=I.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(L){var $=L.name;return $!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function($){var V,W=$.state,B=(V=W.modifiersData)==null?void 0:V.hide;(x.placement!==W.placement||x.referenceHidden!==B?.isReferenceHidden||x.escaped!==B?.hasPopperEscaped)&&_({placement:W.placement,referenceHidden:B?.isReferenceHidden,escaped:B?.hasPopperEscaped}),W.attributes.popper={}}}])})})}},[x.placement,x.referenceHidden,x.escaped].concat(N)),k.createElement(k.Fragment,null,r?k.cloneElement(r,{ref:function(I){A.ref=I,oy(r.ref,I)}}):null,y&&vo.createPortal(s?s(Ure(x),C,A.instance):i,A.container))}return t}var Zre=(function(e,t){return k.forwardRef(function(r,i){var o=r.children,a=QN(r,["children"]);return k.createElement(e,Object.assign({},t,a),o?k.cloneElement(o,{ref:function(l){oy(i,l),oy(o.ref,l)}}):null)})}),ej=Zre(Qre(_u));function Jre(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function eie(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>i.hour===n)||{};return{hour:n,time:Jre(n),walkins:r.walkins??0,checkins:r.preApproved??0,staffAttendance:r.staffAttendance??0}})}const ss={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function tie({type:e,data:t,children:n}){if(!e||!t)return n;const r={activeWalkins:[["Currently Inside",t.visitor_in],["Total Visited Today",t.total_pass]],preApprovedCheckins:[["Currently Inside",t.currently_inside],["Total Visited Today",t.expected_pass_scanned],["No show",t.expected_pass_not_scanned],["Total Scheduled",t.total_expected_pass]],staffAttendance:[["Currently Inside",t.total_in_now],["Absent Today",t.absent_staff],["Total Visited Today",t.total_in_today],["Total Staff",t.total_staff]]},i={activeWalkins:"Active Walk-ins",preApprovedCheckins:"Pre-approved Check-ins",staffAttendance:"Staff Attendance"},o={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},a=b.jsx(Ha,{title:i[e],period:"Today",icon:b.jsx(Vy,{className:`${o[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:b.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:r[e].map(([s,l])=>b.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[b.jsx("div",{children:s}),b.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return b.jsx(ej,{content:a,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:n})}function nie({isStatic:e,data:t}){const n=t?.summary?.activeWalkins||{},r=t?.summary?.preApprovedCheckins||{},i=t?.summary?.staffAttendance||{},o=k.useMemo(()=>eie(t?.chart||[]),[t]),{yAxisTicks:a,yAxisMax:s}=k.useMemo(()=>{const l=Math.max(...o.flatMap(u=>[u.walkins,u.checkins,u.staffAttendance])),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[o]);return b.jsx(Ha,{title:"Gate Updates",period:"Today",icon:b.jsx(Vy,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsxs("div",{children:[b.jsx("div",{className:"grid grid-cols-3 gap-[24px] mt-[16px] mb-[16px]",children:[{key:"activeWalkins",data:n,color:ss.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:i,color:ss.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:r,color:ss.preApproved,label:"Pre-approved"}].map(l=>b.jsx(tie,{type:l.key,data:l.data,children:b.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[b.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:l.label}),b.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:l.color},children:[l.key==="activeWalkins"?l.data?.visitor_in??0:l.key==="preApprovedCheckins"?l.data?.currently_inside??0:l.data?.total_in_now??0,b.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",l.key==="activeWalkins"?l.data?.total_pass??0:l.key==="preApprovedCheckins"?l.data?.total_expected_pass??0:l.data?.total_staff??0]})]})]})},l.key))}),b.jsx("div",{className:"w-full h-[105px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(B0,{data:o,margin:{top:5,right:0,left:-40,bottom:0},children:[b.jsx(ol,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(al,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),b.jsx($a,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:a,domain:[0,s],allowDecimals:!1,axisLine:!1,tickLine:!1}),b.jsx(bi,{content:b.jsx(Zc,{})}),b.jsx(Co,{type:"monotone",dataKey:"walkins",stroke:ss.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins",isAnimationActive:!1}),b.jsx(Co,{type:"monotone",dataKey:"checkins",stroke:ss.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1}),b.jsx(Co,{type:"monotone",dataKey:"staffAttendance",stroke:ss.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance",isAnimationActive:!1})]})})})]})})}function rie({isStatic:e,data:t}){const n=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],r=[{name:"L1 Level",value:Number(t?.total_L1||0),color:n[0]},{name:"L2 Level",value:Number(t?.total_L2||0),color:n[1]},{name:"L3 Level",value:Number(t?.total_L3||0),color:n[2]},{name:"No Level",value:Number(t?.total_NoLevel||0),color:n[3]}];r.reduce((o,a)=>o+a.value,0);const i=r;return b.jsx(Ha,{title:"Helpdesk",period:"As of Today",icon:b.jsx(T3,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsxs("div",{className:"flex gap-[12px] h-fit",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.total_open_complaints??0})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(Yy,{value:t?.percent_change}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),b.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:b.jsx(xi,{width:"75%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((o,a)=>b.jsx(Br,{fill:n[a]||"#CBD5E1"},o.name))}),b.jsx(bi,{content:b.jsx(Zc,{})})]})})})]})})}/*!
259
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&Yre(c,r);return u&&l.push(u),l},[]);return Rc(e)?s[0]:s}_u.defaultProps=or;_u.setDefaultProps=Wre;_u.currentInput=ei;Object.assign({},lN,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});_u.setDefaultProps({render:XN});function QN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var ZN=typeof window<"u"&&typeof document<"u";function oy(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function i2(){return ZN&&document.createElement("div")}function Ure(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function JN(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(t.hasOwnProperty(n)){if(!JN(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Kre(e){var t=[];return e.forEach(function(n){t.find(function(r){return JN(n,r)})||t.push(n)}),t}function qre(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Kre([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var kg=ZN?k.useLayoutEffect:k.useEffect;function Gre(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function o2(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Xre={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}o2(n,"add",t.props.className)}function o(){r()&&o2(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function Qre(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=QN(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,h=a!==void 0,g=k.useState(!1),y=g[0],S=g[1],w=k.useState({}),x=w[0],_=w[1],E=k.useState(),C=E[0],D=E[1],A=Gre(function(){return{container:i2(),renders:1}}),R=Object.assign({ignoreAttributes:f},p,{content:A.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){R[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),R.trigger="manual",R.hideOnClick=!1),h&&(u=!0);var T=R,O=R.plugins||[];s&&(T=Object.assign({},R,{plugins:h&&a.data!=null?[].concat(O,[{fn:function(){return{onTrigger:function(L,$){var V=a.data.children.find(function(W){var B=W.instance;return B.reference===$.currentTarget});L.state.$$activeSingletonInstance=V.instance,D(V.content)}}}}]):O,render:function(){return{popper:A.container}}}));var N=[l].concat(r?[r.type]:[]);return kg(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var I=e(M||A.ref||i2(),Object.assign({},T,{plugins:[Xre].concat(R.plugins||[])}));return A.instance=I,u&&I.disable(),o&&I.show(),h&&a.hook({instance:I,content:i,props:T,setSingletonContent:D}),S(!0),function(){I.destroy(),a?.cleanup(I)}},N),kg(function(){var M;if(A.renders===1){A.renders++;return}var I=A.instance;I.setProps(qre(I.props,T)),(M=I.popperInstance)==null||M.forceUpdate(),u?I.disable():I.enable(),m&&(o?I.show():I.hide()),h&&a.hook({instance:I,content:i,props:T,setSingletonContent:D})}),kg(function(){var M;if(s){var I=A.instance;I.setProps({popperOptions:Object.assign({},I.props.popperOptions,{modifiers:[].concat((((M=I.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(L){var $=L.name;return $!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function($){var V,W=$.state,B=(V=W.modifiersData)==null?void 0:V.hide;(x.placement!==W.placement||x.referenceHidden!==B?.isReferenceHidden||x.escaped!==B?.hasPopperEscaped)&&_({placement:W.placement,referenceHidden:B?.isReferenceHidden,escaped:B?.hasPopperEscaped}),W.attributes.popper={}}}])})})}},[x.placement,x.referenceHidden,x.escaped].concat(N)),k.createElement(k.Fragment,null,r?k.cloneElement(r,{ref:function(I){A.ref=I,oy(r.ref,I)}}):null,y&&vo.createPortal(s?s(Ure(x),C,A.instance):i,A.container))}return t}var Zre=(function(e,t){return k.forwardRef(function(r,i){var o=r.children,a=QN(r,["children"]);return k.createElement(e,Object.assign({},t,a),o?k.cloneElement(o,{ref:function(l){oy(i,l),oy(o.ref,l)}}):null)})}),ej=Zre(Qre(_u));function Jre(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function eie(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>i.hour===n)||{};return{hour:n,time:Jre(n),walkins:r.walkins??0,checkins:r.preApproved??0,staffAttendance:r.staffAttendance??0}})}const ss={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function tie({type:e,data:t,children:n}){if(!e||!t)return n;const r={activeWalkins:[["Currently Inside",t.visitor_in],["Total Visited Today",t.total_pass]],preApprovedCheckins:[["Currently Inside",t.currently_inside],["Total Visited Today",t.expected_pass_scanned],["No show",t.expected_pass_not_scanned],["Total Scheduled",t.total_expected_pass]],staffAttendance:[["Currently Inside",t.total_in_now],["Absent Today",t.absent_staff],["Total Visited Today",t.total_in_today],["Total Staff",t.total_staff]]},i={activeWalkins:"Active Walk-ins",preApprovedCheckins:"Pre-approved Check-ins",staffAttendance:"Staff Attendance"},o={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},a=b.jsx(Ha,{title:i[e],period:"Today",icon:b.jsx(Vy,{className:`${o[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:b.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:r[e].map(([s,l])=>b.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[b.jsx("div",{children:s}),b.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return b.jsx(ej,{content:a,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:n})}function nie({isStatic:e,data:t}){const n=t?.summary?.activeWalkins||{},r=t?.summary?.preApprovedCheckins||{},i=t?.summary?.staffAttendance||{},o=k.useMemo(()=>eie(t?.chart||[]),[t]),{yAxisTicks:a,yAxisMax:s}=k.useMemo(()=>{const l=Math.max(...o.flatMap(u=>[u.walkins,u.checkins,u.staffAttendance])),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[o]);return b.jsx(Ha,{title:"Gate Updates",period:"Today",icon:b.jsx(Vy,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsxs("div",{children:[b.jsx("div",{className:"grid grid-cols-3 gap-[24px] mt-[16px] mb-[16px]",children:[{key:"activeWalkins",data:n,color:ss.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:i,color:ss.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:r,color:ss.preApproved,label:"Pre-approved"}].map(l=>b.jsx(tie,{type:l.key,data:l.data,children:b.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[b.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:l.label}),b.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:l.color},children:[l.key==="activeWalkins"?l.data?.visitor_in??0:l.key==="preApprovedCheckins"?l.data?.currently_inside??0:l.data?.total_in_now??0,b.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",l.key==="activeWalkins"?l.data?.total_pass??0:l.key==="preApprovedCheckins"?l.data?.total_expected_pass??0:l.data?.total_staff??0]})]})]})},l.key))}),b.jsx("div",{className:"w-full h-[105px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(B0,{data:o,margin:{top:5,right:0,left:-40,bottom:0},children:[b.jsx(ol,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(al,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),b.jsx($a,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:a,domain:[0,s],allowDecimals:!1,axisLine:!1,tickLine:!1}),b.jsx(bi,{content:b.jsx(Zc,{})}),b.jsx(Co,{type:"monotone",dataKey:"walkins",stroke:ss.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins",isAnimationActive:!1}),b.jsx(Co,{type:"monotone",dataKey:"checkins",stroke:ss.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1}),b.jsx(Co,{type:"monotone",dataKey:"staffAttendance",stroke:ss.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance",isAnimationActive:!1})]})})})]})})}function rie({isStatic:e,data:t}){const n=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],r=[{name:"L1 Level",value:Number(t?.total_L1||0),color:n[0]},{name:"L2 Level",value:Number(t?.total_L2||0),color:n[1]},{name:"L3 Level",value:Number(t?.total_L3||0),color:n[2]},{name:"No Level",value:Number(t?.total_NoLevel||0),color:n[3]}];r.reduce((o,a)=>o+a.value,0);const i=r;return b.jsx(Ha,{title:"Helpdesk",period:"As of Today",icon:b.jsx(T3,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:b.jsx(ul,{widgetId:t?.widget_id,options:t?.communities}),children:b.jsxs("div",{className:"flex gap-[12px] h-fit",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.total_open_complaints??0})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(Yy,{value:t?.percent_change}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),b.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:b.jsx(xi,{width:"75%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((o,a)=>b.jsx(Br,{fill:n[a]||"#CBD5E1"},o.name))}),b.jsx(bi,{content:b.jsx(Zc,{})})]})})})]})})}/*!
260
260
  * @kurkle/color v0.3.4
261
261
  * https://github.com/kurkle/color#readme
262
262
  * (c) 2024 Jukka Kurkela
263
263
  * Released under the MIT License
264
- */function Su(e){return e+.5|0}const bo=(e,t,n)=>Math.max(Math.min(e,n),t);function Xl(e){return bo(Su(e*2.55),0,255)}function ko(e){return bo(Su(e*255),0,255)}function Ti(e){return bo(Su(e/2.55)/100,0,1)}function aP(e){return bo(Su(e*100),0,100)}const br={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ay=[..."0123456789ABCDEF"],iie=e=>ay[e&15],oie=e=>ay[(e&240)>>4]+ay[e&15],dd=e=>(e&240)>>4===(e&15),aie=e=>dd(e.r)&&dd(e.g)&&dd(e.b)&&dd(e.a);function sie(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&br[e[1]]*17,g:255&br[e[2]]*17,b:255&br[e[3]]*17,a:t===5?br[e[4]]*17:255}:(t===7||t===9)&&(n={r:br[e[1]]<<4|br[e[2]],g:br[e[3]]<<4|br[e[4]],b:br[e[5]]<<4|br[e[6]],a:t===9?br[e[7]]<<4|br[e[8]]:255})),n}const lie=(e,t)=>e<255?t(e):"";function cie(e){var t=aie(e)?iie:oie;return e?"#"+t(e.r)+t(e.g)+t(e.b)+lie(e.a,t):void 0}const uie=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tj(e,t,n){const r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function die(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function fie(e,t,n){const r=tj(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function pie(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function ax(e){const n=e.r/255,r=e.g/255,i=e.b/255,o=Math.max(n,r,i),a=Math.min(n,r,i),s=(o+a)/2;let l,c,u;return o!==a&&(u=o-a,c=s>.5?u/(2-o-a):u/(o+a),l=pie(n,r,i,u,o),l=l*60+.5),[l|0,c||0,s]}function sx(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ko)}function lx(e,t,n){return sx(tj,e,t,n)}function hie(e,t,n){return sx(fie,e,t,n)}function mie(e,t,n){return sx(die,e,t,n)}function nj(e){return(e%360+360)%360}function gie(e){const t=uie.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Xl(+t[5]):ko(+t[5]));const i=nj(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?r=hie(i,o,a):t[1]==="hsv"?r=mie(i,o,a):r=lx(i,o,a),{r:r[0],g:r[1],b:r[2],a:n}}function vie(e,t){var n=ax(e);n[0]=nj(n[0]+t),n=lx(n),e.r=n[0],e.g=n[1],e.b=n[2]}function yie(e){if(!e)return;const t=ax(e),n=t[0],r=aP(t[1]),i=aP(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Ti(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const sP={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},lP={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function bie(){const e={},t=Object.keys(lP),n=Object.keys(sP);let r,i,o,a,s;for(r=0;r<t.length;r++){for(a=s=t[r],i=0;i<n.length;i++)o=n[i],s=s.replace(o,sP[o]);o=parseInt(lP[a],16),e[s]=[o>>16&255,o>>8&255,o&255]}return e}let fd;function xie(e){fd||(fd=bie(),fd.transparent=[0,0,0,0]);const t=fd[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const wie=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function _ie(e){const t=wie.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const a=+t[7];n=t[8]?Xl(a):bo(a*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Xl(r):bo(r,0,255)),i=255&(t[4]?Xl(i):bo(i,0,255)),o=255&(t[6]?Xl(o):bo(o,0,255)),{r,g:i,b:o,a:n}}}function Sie(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ti(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Dg=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ls=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Eie(e,t,n){const r=ls(Ti(e.r)),i=ls(Ti(e.g)),o=ls(Ti(e.b));return{r:ko(Dg(r+n*(ls(Ti(t.r))-r))),g:ko(Dg(i+n*(ls(Ti(t.g))-i))),b:ko(Dg(o+n*(ls(Ti(t.b))-o))),a:e.a+n*(t.a-e.a)}}function pd(e,t,n){if(e){let r=ax(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=lx(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function rj(e,t){return e&&Object.assign(t||{},e)}function cP(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ko(e[3]))):(t=rj(e,{r:0,g:0,b:0,a:1}),t.a=ko(t.a)),t}function Oie(e){return e.charAt(0)==="r"?_ie(e):gie(e)}class Lc{constructor(t){if(t instanceof Lc)return t;const n=typeof t;let r;n==="object"?r=cP(t):n==="string"&&(r=sie(t)||xie(t)||Oie(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=rj(this._rgb);return t&&(t.a=Ti(t.a)),t}set rgb(t){this._rgb=cP(t)}rgbString(){return this._valid?Sie(this._rgb):void 0}hexString(){return this._valid?cie(this._rgb):void 0}hslString(){return this._valid?yie(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const a=n===o?.5:n,s=2*a-1,l=r.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Eie(this._rgb,t._rgb,n)),this}clone(){return new Lc(this.rgb)}alpha(t){return this._rgb.a=ko(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Su(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return pd(this._rgb,2,t),this}darken(t){return pd(this._rgb,2,-t),this}saturate(t){return pd(this._rgb,1,t),this}desaturate(t){return pd(this._rgb,1,-t),this}rotate(t){return vie(this._rgb,t),this}}/*!
264
+ */function Su(e){return e+.5|0}const bo=(e,t,n)=>Math.max(Math.min(e,n),t);function Xl(e){return bo(Su(e*2.55),0,255)}function ko(e){return bo(Su(e*255),0,255)}function Ti(e){return bo(Su(e/2.55)/100,0,1)}function a2(e){return bo(Su(e*100),0,100)}const br={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ay=[..."0123456789ABCDEF"],iie=e=>ay[e&15],oie=e=>ay[(e&240)>>4]+ay[e&15],dd=e=>(e&240)>>4===(e&15),aie=e=>dd(e.r)&&dd(e.g)&&dd(e.b)&&dd(e.a);function sie(e){var t=e.length,n;return e[0]==="#"&&(t===4||t===5?n={r:255&br[e[1]]*17,g:255&br[e[2]]*17,b:255&br[e[3]]*17,a:t===5?br[e[4]]*17:255}:(t===7||t===9)&&(n={r:br[e[1]]<<4|br[e[2]],g:br[e[3]]<<4|br[e[4]],b:br[e[5]]<<4|br[e[6]],a:t===9?br[e[7]]<<4|br[e[8]]:255})),n}const lie=(e,t)=>e<255?t(e):"";function cie(e){var t=aie(e)?iie:oie;return e?"#"+t(e.r)+t(e.g)+t(e.b)+lie(e.a,t):void 0}const uie=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function tj(e,t,n){const r=t*Math.min(n,1-n),i=(o,a=(o+e/30)%12)=>n-r*Math.max(Math.min(a-3,9-a,1),-1);return[i(0),i(8),i(4)]}function die(e,t,n){const r=(i,o=(i+e/60)%6)=>n-n*t*Math.max(Math.min(o,4-o,1),0);return[r(5),r(3),r(1)]}function fie(e,t,n){const r=tj(e,1,.5);let i;for(t+n>1&&(i=1/(t+n),t*=i,n*=i),i=0;i<3;i++)r[i]*=1-t-n,r[i]+=t;return r}function pie(e,t,n,r,i){return e===i?(t-n)/r+(t<n?6:0):t===i?(n-e)/r+2:(e-t)/r+4}function ax(e){const n=e.r/255,r=e.g/255,i=e.b/255,o=Math.max(n,r,i),a=Math.min(n,r,i),s=(o+a)/2;let l,c,u;return o!==a&&(u=o-a,c=s>.5?u/(2-o-a):u/(o+a),l=pie(n,r,i,u,o),l=l*60+.5),[l|0,c||0,s]}function sx(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(ko)}function lx(e,t,n){return sx(tj,e,t,n)}function hie(e,t,n){return sx(fie,e,t,n)}function mie(e,t,n){return sx(die,e,t,n)}function nj(e){return(e%360+360)%360}function gie(e){const t=uie.exec(e);let n=255,r;if(!t)return;t[5]!==r&&(n=t[6]?Xl(+t[5]):ko(+t[5]));const i=nj(+t[2]),o=+t[3]/100,a=+t[4]/100;return t[1]==="hwb"?r=hie(i,o,a):t[1]==="hsv"?r=mie(i,o,a):r=lx(i,o,a),{r:r[0],g:r[1],b:r[2],a:n}}function vie(e,t){var n=ax(e);n[0]=nj(n[0]+t),n=lx(n),e.r=n[0],e.g=n[1],e.b=n[2]}function yie(e){if(!e)return;const t=ax(e),n=t[0],r=a2(t[1]),i=a2(t[2]);return e.a<255?`hsla(${n}, ${r}%, ${i}%, ${Ti(e.a)})`:`hsl(${n}, ${r}%, ${i}%)`}const s2={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},l2={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function bie(){const e={},t=Object.keys(l2),n=Object.keys(s2);let r,i,o,a,s;for(r=0;r<t.length;r++){for(a=s=t[r],i=0;i<n.length;i++)o=n[i],s=s.replace(o,s2[o]);o=parseInt(l2[a],16),e[s]=[o>>16&255,o>>8&255,o&255]}return e}let fd;function xie(e){fd||(fd=bie(),fd.transparent=[0,0,0,0]);const t=fd[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const wie=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function _ie(e){const t=wie.exec(e);let n=255,r,i,o;if(t){if(t[7]!==r){const a=+t[7];n=t[8]?Xl(a):bo(a*255,0,255)}return r=+t[1],i=+t[3],o=+t[5],r=255&(t[2]?Xl(r):bo(r,0,255)),i=255&(t[4]?Xl(i):bo(i,0,255)),o=255&(t[6]?Xl(o):bo(o,0,255)),{r,g:i,b:o,a:n}}}function Sie(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${Ti(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Dg=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ls=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function Eie(e,t,n){const r=ls(Ti(e.r)),i=ls(Ti(e.g)),o=ls(Ti(e.b));return{r:ko(Dg(r+n*(ls(Ti(t.r))-r))),g:ko(Dg(i+n*(ls(Ti(t.g))-i))),b:ko(Dg(o+n*(ls(Ti(t.b))-o))),a:e.a+n*(t.a-e.a)}}function pd(e,t,n){if(e){let r=ax(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,t===0?360:1)),r=lx(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function rj(e,t){return e&&Object.assign(t||{},e)}function c2(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=ko(e[3]))):(t=rj(e,{r:0,g:0,b:0,a:1}),t.a=ko(t.a)),t}function Oie(e){return e.charAt(0)==="r"?_ie(e):gie(e)}class Lc{constructor(t){if(t instanceof Lc)return t;const n=typeof t;let r;n==="object"?r=c2(t):n==="string"&&(r=sie(t)||xie(t)||Oie(t)),this._rgb=r,this._valid=!!r}get valid(){return this._valid}get rgb(){var t=rj(this._rgb);return t&&(t.a=Ti(t.a)),t}set rgb(t){this._rgb=c2(t)}rgbString(){return this._valid?Sie(this._rgb):void 0}hexString(){return this._valid?cie(this._rgb):void 0}hslString(){return this._valid?yie(this._rgb):void 0}mix(t,n){if(t){const r=this.rgb,i=t.rgb;let o;const a=n===o?.5:n,s=2*a-1,l=r.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;o=1-c,r.r=255&c*r.r+o*i.r+.5,r.g=255&c*r.g+o*i.g+.5,r.b=255&c*r.b+o*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}interpolate(t,n){return t&&(this._rgb=Eie(this._rgb,t._rgb,n)),this}clone(){return new Lc(this.rgb)}alpha(t){return this._rgb.a=ko(t),this}clearer(t){const n=this._rgb;return n.a*=1-t,this}greyscale(){const t=this._rgb,n=Su(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=n,this}opaquer(t){const n=this._rgb;return n.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return pd(this._rgb,2,t),this}darken(t){return pd(this._rgb,2,-t),this}saturate(t){return pd(this._rgb,1,t),this}desaturate(t){return pd(this._rgb,1,-t),this}rotate(t){return vie(this._rgb,t),this}}/*!
265
265
  * Chart.js v4.5.0
266
266
  * https://www.chartjs.org
267
267
  * (c) 2025 Chart.js Contributors
268
268
  * Released under the MIT License
269
- */function Pi(){}const Pie=(()=>{let e=0;return()=>e++})();function Ye(e){return e==null}function Xt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Ae(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Ar(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Kr(e,t){return Ar(e)?e:t}function Se(e,t){return typeof e>"u"?t:e}const Cie=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,ij=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function ct(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Xe(e,t,n,r){let i,o,a;if(Xt(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Ae(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function Xf(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Qf(e){if(Xt(e))return e.map(Qf);if(Ae(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Qf(e[n[i]]);return t}return e}function oj(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function kie(e,t,n,r){if(!oj(e))return;const i=t[e],o=n[e];Ae(i)&&Ae(o)?Fc(i,o,r):t[e]=Qf(o)}function Fc(e,t,n){const r=Xt(t)?t:[t],i=r.length;if(!Ae(e))return e;n=n||{};const o=n.merger||kie;let a;for(let s=0;s<i;++s){if(a=r[s],!Ae(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,n)}return e}function sc(e,t){return Fc(e,t,{merger:Die})}function Die(e,t,n){if(!oj(e))return;const r=t[e],i=n[e];Ae(r)&&Ae(i)?sc(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Qf(i))}const uP={"":e=>e,x:e=>e.x,y:e=>e.y};function Tie(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function Aie(e){const t=Tie(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Wa(e,t){return(uP[t]||(uP[t]=Aie(t)))(e)}function cx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const $c=e=>typeof e<"u",Fo=e=>typeof e=="function",dP=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Mie(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const rt=Math.PI,Pt=2*rt,Nie=Pt+rt,Zf=Number.POSITIVE_INFINITY,jie=rt/180,Vt=rt/2,ea=rt/4,fP=rt*2/3,aj=Math.log10,di=Math.sign;function lc(e,t,n){return Math.abs(e-t)<n}function pP(e){const t=Math.round(e);e=lc(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(aj(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Rie(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Iie(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Bc(e){return!Iie(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function Lie(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Fie(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Li(e){return e*(rt/180)}function $ie(e){return e*(180/rt)}function hP(e){if(!Ar(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function sj(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*rt&&(o+=Pt),{angle:o,distance:i}}function sy(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Bie(e,t){return(e-t+Nie)%Pt-rt}function Rr(e){return(e%Pt+Pt)%Pt}function Wc(e,t,n,r){const i=Rr(e),o=Rr(t),a=Rr(n),s=Rr(o-i),l=Rr(a-i),c=Rr(i-o),u=Rr(i-a);return i===o||i===a||r&&o===a||s>l&&c<u}function bn(e,t,n){return Math.max(t,Math.min(n,e))}function Wie(e){return bn(e,-32768,32767)}function xo(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function ux(e,t,n){n=n||(a=>e[a]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const wa=(e,t,n,r)=>ux(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),zie=(e,t,n)=>ux(e,n,r=>e[r][t]>=n);function Vie(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const lj=["push","pop","shift","splice","unshift"];function Hie(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),lj.forEach(n=>{const r="_onData"+cx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function mP(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(lj.forEach(o=>{delete e[o]}),delete e._chartjs)}function cj(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const uj=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function dj(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,uj.call(window,()=>{r=!1,e.apply(t,n)}))}}function Yie(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const fj=e=>e==="start"?"left":e==="end"?"right":"center",Jn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Uie=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Kie(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:d,max:f,minDefined:p,maxDefined:m}=a.getUserBounds();if(p){if(i=Math.min(wa(l,u,d).lo,n?r:wa(t,u,a.getPixelForValue(d)).lo),c){const h=l.slice(0,i+1).reverse().findIndex(g=>!Ye(g[s.axis]));i-=Math.max(0,h)}i=bn(i,0,r-1)}if(m){let h=Math.max(wa(l,a.axis,f,!0).hi+1,n?0:wa(t,u,a.getPixelForValue(f),!0).hi+1);if(c){const g=l.slice(h-1).findIndex(y=>!Ye(y[s.axis]));h+=Math.max(0,g)}o=bn(h,i,r)-i}else o=r-i}return{start:i,count:o}}function qie(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const hd=e=>e===0||e===1,gP=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Pt/n)),vP=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Pt/n)+1,cc={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Vt)+1,easeOutSine:e=>Math.sin(e*Vt),easeInOutSine:e=>-.5*(Math.cos(rt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>hd(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>hd(e)?e:gP(e,.075,.3),easeOutElastic:e=>hd(e)?e:vP(e,.075,.3),easeInOutElastic(e){return hd(e)?e:e<.5?.5*gP(e*2,.1125,.45):.5+.5*vP(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-cc.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?cc.easeInBounce(e*2)*.5:cc.easeOutBounce(e*2-1)*.5+.5};function dx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function yP(e){return dx(e)?e:new Lc(e)}function Tg(e){return dx(e)?e:new Lc(e).saturate(.5).darken(.1).hexString()}const Gie=["x","y","borderWidth","radius","tension"],Xie=["color","borderColor","backgroundColor"];function Qie(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Xie},numbers:{type:"number",properties:Gie}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Zie(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const bP=new Map;function Jie(e,t){t=t||{};const n=e+JSON.stringify(t);let r=bP.get(n);return r||(r=new Intl.NumberFormat(e,t),bP.set(n,r)),r}function fx(e,t,n){return Jie(t,n).format(e)}const eoe={values(e){return Xt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=toe(e,n)}const a=aj(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),fx(e,r,l)}};function toe(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var pj={formatters:eoe};function noe(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:pj.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const za=Object.create(null),ly=Object.create(null);function uc(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function Ag(e,t,n){return typeof t=="string"?Fc(uc(e,t),n):Fc(uc(e,""),t)}class roe{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Tg(i.backgroundColor),this.hoverBorderColor=(r,i)=>Tg(i.borderColor),this.hoverColor=(r,i)=>Tg(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Ag(this,t,n)}get(t){return uc(this,t)}describe(t,n){return Ag(ly,t,n)}override(t,n){return Ag(za,t,n)}route(t,n,r,i){const o=uc(this,t),a=uc(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return Ae(l)?Object.assign({},c,l):Se(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Nt=new roe({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Qie,Zie,noe]);function ioe(e){return!e||Ye(e.size)||Ye(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function xP(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function ta(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function wP(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function cy(e,t,n,r){hj(e,t,n,r,null)}function hj(e,t,n,r,i){let o,a,s,l,c,u,d,f;const p=t.pointStyle,m=t.rotation,h=t.radius;let g=(m||0)*jie;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,Pt):e.arc(n,r,h,0,Pt),e.closePath();break;case"triangle":u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=fP,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=fP,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case"rectRounded":c=h*.516,l=h-c,a=Math.cos(g+ea)*l,d=Math.cos(g+ea)*(i?i/2-c:l),s=Math.sin(g+ea)*l,f=Math.sin(g+ea)*(i?i/2-c:l),e.arc(n-d,r-s,c,g-rt,g-Vt),e.arc(n+f,r-a,c,g-Vt,g),e.arc(n+d,r+s,c,g,g+Vt),e.arc(n-f,r+a,c,g+Vt,g+rt),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*h,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=ea;case"rectRot":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-a),e.lineTo(n+d,r+s),e.lineTo(n-f,r+a),e.closePath();break;case"crossRot":g+=ea;case"cross":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"star":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a),g+=ea,d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"line":a=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function zc(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function px(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function hx(e){e.restore()}function ooe(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function aoe(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function soe(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ye(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function loe(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),a=t-o.actualBoundingBoxLeft,s=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function coe(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Jf(e,t,n,r,i,o={}){const a=Xt(t)?t:[t],s=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,soe(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&coe(e,o.backdrop),s&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),Ye(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),loe(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function ep(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*rt,rt,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,rt,Vt,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Vt,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Vt,!0),e.lineTo(n+a.topLeft,r)}const uoe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,doe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function foe(e,t){const n=(""+e).match(uoe);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const poe=e=>+e||0;function mx(e,t){const n={},r=Ae(t),i=r?Object.keys(t):t,o=Ae(e)?r?a=>Se(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=poe(o(a));return n}function mj(e){return mx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function xs(e){return mx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Wr(e){const t=mj(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Yn(e,t){e=e||{},t=t||Nt.font;let n=Se(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Se(e.style,t.style);r&&!(""+r).match(doe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Se(e.family,t.family),lineHeight:foe(Se(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Se(e.weight,t.weight),string:""};return i.string=ioe(i),i}function md(e,t,n,r){let i,o,a;for(i=0,o=e.length;i<o;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function hoe(e,t,n){const{min:r,max:i}=e,o=ij(t,(i-r)/2),a=(s,l)=>n&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function qa(e,t){return Object.assign(Object.create(e),t)}function gx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=bj("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>gx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return vj(s,l,()=>_oe(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return SP(s).includes(l)},ownKeys(s){return SP(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Hs(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:gj(e,r),setContext:o=>Hs(e,o,n,r),override:o=>Hs(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return vj(o,a,()=>goe(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function gj(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Fo(n)?n:()=>n,isIndexable:Fo(r)?r:()=>r}}const moe=(e,t)=>e?e+cx(t):t,vx=(e,t)=>Ae(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function vj(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function goe(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return Fo(s)&&a.isScriptable(t)&&(s=voe(t,s,e,n)),Xt(s)&&s.length&&(s=yoe(t,s,e,a.isIndexable)),vx(t,s)&&(s=Hs(s,i,o&&o[t],a)),s}function voe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),vx(e,l)&&(l=yx(i._scopes,i,e,l)),l}function yoe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Ae(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=yx(c,i,e,u);t.push(Hs(d,o,a&&a[e],s))}}return t}function yj(e,t,n){return Fo(e)?e(t,n):e}const boe=(e,t)=>e===!0?t:typeof e=="string"?Wa(t,e):void 0;function xoe(e,t,n,r,i){for(const o of t){const a=boe(n,o);if(a){e.add(a);const s=yj(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function yx(e,t,n,r){const i=t._rootScopes,o=yj(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=_P(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=_P(s,a,o,l,r),l===null)?!1:gx(Array.from(s),[""],i,o,()=>woe(t,n,r))}function _P(e,t,n,r,i){for(;n;)n=xoe(e,t,n,r,i);return n}function woe(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Xt(i)&&Ae(n)?n:i||{}}function _oe(e,t,n,r){let i;for(const o of t)if(i=bj(moe(o,e),n),typeof i<"u")return vx(e,i)?yx(n,r,e,i):i}function bj(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function SP(e){let t=e._keys;return t||(t=e._keys=Soe(e._scopes)),t}function Soe(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const Eoe=Number.EPSILON||1e-14,Ys=(e,t)=>t<e.length&&!e[t].skip&&e[t],xj=e=>e==="x"?"y":"x";function Ooe(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=sy(o,i),l=sy(a,o);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+f*(a.x-i.x),y:o.y+f*(a.y-i.y)}}}function Poe(e,t,n){const r=e.length;let i,o,a,s,l,c=Ys(e,0);for(let u=0;u<r-1;++u)if(l=c,c=Ys(e,u+1),!(!l||!c)){if(lc(t[u],0,Eoe)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(o,2),!(s<=9)&&(a=3/Math.sqrt(s),n[u]=i*a*t[u],n[u+1]=o*a*t[u])}}function Coe(e,t,n="x"){const r=xj(n),i=e.length;let o,a,s,l=Ys(e,0);for(let c=0;c<i;++c){if(a=s,s=l,l=Ys(e,c+1),!s)continue;const u=s[n],d=s[r];a&&(o=(u-a[n])/3,s[`cp1${n}`]=u-o,s[`cp1${r}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,s[`cp2${n}`]=u+o,s[`cp2${r}`]=d+o*t[c])}}function koe(e,t="x"){const n=xj(t),r=e.length,i=Array(r).fill(0),o=Array(r);let a,s,l,c=Ys(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=Ys(e,a+1),!!l){if(c){const u=c[t]-l[t];i[a]=u!==0?(c[n]-l[n])/u:0}o[a]=s?c?di(i[a-1])!==di(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}Poe(e,i,o),Coe(e,o,t)}function gd(e,t,n){return Math.max(Math.min(e,n),t)}function Doe(e,t){let n,r,i,o,a,s=zc(e[0],t);for(n=0,r=e.length;n<r;++n)a=o,o=s,s=n<r-1&&zc(e[n+1],t),o&&(i=e[n],a&&(i.cp1x=gd(i.cp1x,t.left,t.right),i.cp1y=gd(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=gd(i.cp2x,t.left,t.right),i.cp2y=gd(i.cp2y,t.top,t.bottom)))}function Toe(e,t,n,r,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")koe(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)s=e[o],l=Ooe(c,s,e[Math.min(o+1,a-(r?0:1))%a],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}t.capBezierPoints&&Doe(e,n)}function bx(){return typeof window<"u"&&typeof document<"u"}function xx(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function tp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const bh=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Aoe(e,t){return bh(e).getPropertyValue(t)}const Moe=["top","right","bottom","left"];function Ta(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=Moe[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Noe=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function joe(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(Noe(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function da(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=bh(n),o=i.boxSizing==="border-box",a=Ta(i,"padding"),s=Ta(i,"border","width"),{x:l,y:c,box:u}=joe(e,n),d=a.left+(u&&s.left),f=a.top+(u&&s.top);let{width:p,height:m}=t;return o&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((c-f)/m*n.height/r)}}function Roe(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&xx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=bh(o),l=Ta(s,"border","width"),c=Ta(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=tp(s.maxWidth,o,"clientWidth"),i=tp(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Zf,maxHeight:i||Zf}}const vd=e=>Math.round(e*10)/10;function Ioe(e,t,n,r){const i=bh(e),o=Ta(i,"margin"),a=tp(i.maxWidth,e,"clientWidth")||Zf,s=tp(i.maxHeight,e,"clientHeight")||Zf,l=Roe(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Ta(i,"border","width"),p=Ta(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=vd(Math.min(c,a,l.maxWidth)),u=vd(Math.min(u,s,l.maxHeight)),c&&!u&&(u=vd(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=vd(Math.floor(u*r))),{width:c,height:u}}function EP(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Loe=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};bx()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function OP(e,t){const n=Aoe(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function fa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Foe(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function $oe(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=fa(e,i,n),s=fa(i,o,n),l=fa(o,t,n),c=fa(a,s,n),u=fa(s,l,n);return fa(c,u,n)}const Boe=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},Woe=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ws(e,t,n){return e?Boe(t,n):Woe()}function wj(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function _j(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Sj(e){return e==="angle"?{between:Wc,compare:Bie,normalize:Rr}:{between:xo,compare:(t,n)=>t-n,normalize:t=>t}}function PP({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function zoe(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=Sj(r),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&a(s(t[c%l][r]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Voe(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,a=t.length,{compare:s,between:l,normalize:c}=Sj(r),{start:u,end:d,loop:f,style:p}=zoe(e,t,n),m=[];let h=!1,g=null,y,S,w;const x=()=>l(i,w,y)&&s(i,w)!==0,_=()=>s(o,y)===0||l(o,w,y),E=()=>h||x(),C=()=>!h||_();for(let D=u,A=u;D<=d;++D)S=t[D%a],!S.skip&&(y=c(S[r]),y!==w&&(h=l(y,i,o),g===null&&E()&&(g=s(y,i)===0?D:A),g!==null&&C()&&(m.push(PP({start:g,end:D,loop:f,count:a,style:p})),g=null),A=D,w=y));return g!==null&&m.push(PP({start:g,end:d,loop:f,count:a,style:p})),m}function Hoe(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=Voe(r[i],e.points,t);o.length&&n.push(...o)}return n}function Yoe(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function Uoe(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Koe(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Yoe(n,i,o,r);if(r===!0)return CP(e,[{start:a,end:s,loop:o}],n,t);const l=s<a?s+i:s,c=!!e._fullLoop&&a===0&&s===i-1;return CP(e,Uoe(n,a,l,c),n,t)}function CP(e,t,n,r){return!r||!r.setContext||!n?t:qoe(e,t,n,r)}function qoe(e,t,n,r){const i=e._chart.getContext(),o=kP(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function p(m,h,g,y){const S=s?-1:1;if(m!==h){for(m+=l;n[m%l].skip;)m-=S;for(;n[h%l].skip;)h+=S;m%l!==h%l&&(c.push({start:m%l,end:h%l,loop:g,style:y}),u=y,d=h%l)}}for(const m of t){d=s?d:m.start;let h=n[d%l],g;for(f=d+1;f<=m.end;f++){const y=n[f%l];g=kP(r.setContext(qa(i,{type:"segment",p0:h,p1:y,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:a}))),Goe(g,u)&&p(d,f-1,m.loop,u),h=y,u=g}d<f-1&&p(d,f-1,m.loop,u)}return c}function kP(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Goe(e,t){if(!t)return!1;const n=[],r=function(i,o){return dx(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function yd(e,t,n){return e.options.clip?e[n]:t[n]}function Xoe(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:yd(n,t,"left"),right:yd(n,t,"right"),top:yd(r,t,"top"),bottom:yd(r,t,"bottom")}:t}function Qoe(e,t){const n=t._clip;if(n.disabled)return!1;const r=Xoe(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
269
+ */function Pi(){}const Pie=(()=>{let e=0;return()=>e++})();function Ye(e){return e==null}function Xt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function Ae(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Ar(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Kr(e,t){return Ar(e)?e:t}function Se(e,t){return typeof e>"u"?t:e}const Cie=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,ij=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function ct(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Xe(e,t,n,r){let i,o,a;if(Xt(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Ae(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function Xf(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function Qf(e){if(Xt(e))return e.map(Qf);if(Ae(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=Qf(e[n[i]]);return t}return e}function oj(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function kie(e,t,n,r){if(!oj(e))return;const i=t[e],o=n[e];Ae(i)&&Ae(o)?Fc(i,o,r):t[e]=Qf(o)}function Fc(e,t,n){const r=Xt(t)?t:[t],i=r.length;if(!Ae(e))return e;n=n||{};const o=n.merger||kie;let a;for(let s=0;s<i;++s){if(a=r[s],!Ae(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,n)}return e}function sc(e,t){return Fc(e,t,{merger:Die})}function Die(e,t,n){if(!oj(e))return;const r=t[e],i=n[e];Ae(r)&&Ae(i)?sc(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Qf(i))}const u2={"":e=>e,x:e=>e.x,y:e=>e.y};function Tie(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function Aie(e){const t=Tie(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function Wa(e,t){return(u2[t]||(u2[t]=Aie(t)))(e)}function cx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const $c=e=>typeof e<"u",Fo=e=>typeof e=="function",d2=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function Mie(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const rt=Math.PI,Pt=2*rt,Nie=Pt+rt,Zf=Number.POSITIVE_INFINITY,jie=rt/180,Vt=rt/2,ea=rt/4,f2=rt*2/3,aj=Math.log10,di=Math.sign;function lc(e,t,n){return Math.abs(e-t)<n}function p2(e){const t=Math.round(e);e=lc(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(aj(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Rie(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Iie(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Bc(e){return!Iie(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function Lie(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Fie(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Li(e){return e*(rt/180)}function $ie(e){return e*(180/rt)}function h2(e){if(!Ar(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function sj(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*rt&&(o+=Pt),{angle:o,distance:i}}function sy(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Bie(e,t){return(e-t+Nie)%Pt-rt}function Rr(e){return(e%Pt+Pt)%Pt}function Wc(e,t,n,r){const i=Rr(e),o=Rr(t),a=Rr(n),s=Rr(o-i),l=Rr(a-i),c=Rr(i-o),u=Rr(i-a);return i===o||i===a||r&&o===a||s>l&&c<u}function bn(e,t,n){return Math.max(t,Math.min(n,e))}function Wie(e){return bn(e,-32768,32767)}function xo(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function ux(e,t,n){n=n||(a=>e[a]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const wa=(e,t,n,r)=>ux(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),zie=(e,t,n)=>ux(e,n,r=>e[r][t]>=n);function Vie(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const lj=["push","pop","shift","splice","unshift"];function Hie(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),lj.forEach(n=>{const r="_onData"+cx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function m2(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(lj.forEach(o=>{delete e[o]}),delete e._chartjs)}function cj(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const uj=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function dj(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,uj.call(window,()=>{r=!1,e.apply(t,n)}))}}function Yie(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const fj=e=>e==="start"?"left":e==="end"?"right":"center",Jn=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Uie=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Kie(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:d,max:f,minDefined:p,maxDefined:m}=a.getUserBounds();if(p){if(i=Math.min(wa(l,u,d).lo,n?r:wa(t,u,a.getPixelForValue(d)).lo),c){const h=l.slice(0,i+1).reverse().findIndex(g=>!Ye(g[s.axis]));i-=Math.max(0,h)}i=bn(i,0,r-1)}if(m){let h=Math.max(wa(l,a.axis,f,!0).hi+1,n?0:wa(t,u,a.getPixelForValue(f),!0).hi+1);if(c){const g=l.slice(h-1).findIndex(y=>!Ye(y[s.axis]));h+=Math.max(0,g)}o=bn(h,i,r)-i}else o=r-i}return{start:i,count:o}}function qie(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const hd=e=>e===0||e===1,g2=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Pt/n)),v2=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Pt/n)+1,cc={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*Vt)+1,easeOutSine:e=>Math.sin(e*Vt),easeInOutSine:e=>-.5*(Math.cos(rt*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>hd(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>hd(e)?e:g2(e,.075,.3),easeOutElastic:e=>hd(e)?e:v2(e,.075,.3),easeInOutElastic(e){return hd(e)?e:e<.5?.5*g2(e*2,.1125,.45):.5+.5*v2(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-cc.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?cc.easeInBounce(e*2)*.5:cc.easeOutBounce(e*2-1)*.5+.5};function dx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function y2(e){return dx(e)?e:new Lc(e)}function Tg(e){return dx(e)?e:new Lc(e).saturate(.5).darken(.1).hexString()}const Gie=["x","y","borderWidth","radius","tension"],Xie=["color","borderColor","backgroundColor"];function Qie(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:Xie},numbers:{type:"number",properties:Gie}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function Zie(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const b2=new Map;function Jie(e,t){t=t||{};const n=e+JSON.stringify(t);let r=b2.get(n);return r||(r=new Intl.NumberFormat(e,t),b2.set(n,r)),r}function fx(e,t,n){return Jie(t,n).format(e)}const eoe={values(e){return Xt(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=toe(e,n)}const a=aj(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),fx(e,r,l)}};function toe(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var pj={formatters:eoe};function noe(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,n)=>n.lineWidth,tickColor:(t,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:pj.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const za=Object.create(null),ly=Object.create(null);function uc(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function Ag(e,t,n){return typeof t=="string"?Fc(uc(e,t),n):Fc(uc(e,""),t)}class roe{constructor(t,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Tg(i.backgroundColor),this.hoverBorderColor=(r,i)=>Tg(i.borderColor),this.hoverColor=(r,i)=>Tg(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}set(t,n){return Ag(this,t,n)}get(t){return uc(this,t)}describe(t,n){return Ag(ly,t,n)}override(t,n){return Ag(za,t,n)}route(t,n,r,i){const o=uc(this,t),a=uc(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return Ae(l)?Object.assign({},c,l):Se(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Nt=new roe({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Qie,Zie,noe]);function ioe(e){return!e||Ye(e.size)||Ye(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function x2(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function ta(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function w2(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function cy(e,t,n,r){hj(e,t,n,r,null)}function hj(e,t,n,r,i){let o,a,s,l,c,u,d,f;const p=t.pointStyle,m=t.rotation,h=t.radius;let g=(m||0)*jie;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,Pt):e.arc(n,r,h,0,Pt),e.closePath();break;case"triangle":u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=f2,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=f2,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case"rectRounded":c=h*.516,l=h-c,a=Math.cos(g+ea)*l,d=Math.cos(g+ea)*(i?i/2-c:l),s=Math.sin(g+ea)*l,f=Math.sin(g+ea)*(i?i/2-c:l),e.arc(n-d,r-s,c,g-rt,g-Vt),e.arc(n+f,r-a,c,g-Vt,g),e.arc(n+d,r+s,c,g,g+Vt),e.arc(n-f,r+a,c,g+Vt,g+rt),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*h,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=ea;case"rectRot":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-a),e.lineTo(n+d,r+s),e.lineTo(n-f,r+a),e.closePath();break;case"crossRot":g+=ea;case"cross":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"star":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a),g+=ea,d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"line":a=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function zc(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function px(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function hx(e){e.restore()}function ooe(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function aoe(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function soe(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ye(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function loe(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),a=t-o.actualBoundingBoxLeft,s=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function coe(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Jf(e,t,n,r,i,o={}){const a=Xt(t)?t:[t],s=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,soe(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&coe(e,o.backdrop),s&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),Ye(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),loe(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function ep(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*rt,rt,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,rt,Vt,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Vt,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Vt,!0),e.lineTo(n+a.topLeft,r)}const uoe=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,doe=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function foe(e,t){const n=(""+e).match(uoe);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const poe=e=>+e||0;function mx(e,t){const n={},r=Ae(t),i=r?Object.keys(t):t,o=Ae(e)?r?a=>Se(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=poe(o(a));return n}function mj(e){return mx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function xs(e){return mx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Wr(e){const t=mj(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Yn(e,t){e=e||{},t=t||Nt.font;let n=Se(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Se(e.style,t.style);r&&!(""+r).match(doe)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Se(e.family,t.family),lineHeight:foe(Se(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Se(e.weight,t.weight),string:""};return i.string=ioe(i),i}function md(e,t,n,r){let i,o,a;for(i=0,o=e.length;i<o;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function hoe(e,t,n){const{min:r,max:i}=e,o=ij(t,(i-r)/2),a=(s,l)=>n&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function qa(e,t){return Object.assign(Object.create(e),t)}function gx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=bj("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>gx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return vj(s,l,()=>_oe(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return S2(s).includes(l)},ownKeys(s){return S2(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Hs(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:gj(e,r),setContext:o=>Hs(e,o,n,r),override:o=>Hs(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return vj(o,a,()=>goe(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function gj(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Fo(n)?n:()=>n,isIndexable:Fo(r)?r:()=>r}}const moe=(e,t)=>e?e+cx(t):t,vx=(e,t)=>Ae(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function vj(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function goe(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return Fo(s)&&a.isScriptable(t)&&(s=voe(t,s,e,n)),Xt(s)&&s.length&&(s=yoe(t,s,e,a.isIndexable)),vx(t,s)&&(s=Hs(s,i,o&&o[t],a)),s}function voe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),vx(e,l)&&(l=yx(i._scopes,i,e,l)),l}function yoe(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Ae(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=yx(c,i,e,u);t.push(Hs(d,o,a&&a[e],s))}}return t}function yj(e,t,n){return Fo(e)?e(t,n):e}const boe=(e,t)=>e===!0?t:typeof e=="string"?Wa(t,e):void 0;function xoe(e,t,n,r,i){for(const o of t){const a=boe(n,o);if(a){e.add(a);const s=yj(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function yx(e,t,n,r){const i=t._rootScopes,o=yj(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=_2(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=_2(s,a,o,l,r),l===null)?!1:gx(Array.from(s),[""],i,o,()=>woe(t,n,r))}function _2(e,t,n,r,i){for(;n;)n=xoe(e,t,n,r,i);return n}function woe(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return Xt(i)&&Ae(n)?n:i||{}}function _oe(e,t,n,r){let i;for(const o of t)if(i=bj(moe(o,e),n),typeof i<"u")return vx(e,i)?yx(n,r,e,i):i}function bj(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function S2(e){let t=e._keys;return t||(t=e._keys=Soe(e._scopes)),t}function Soe(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const Eoe=Number.EPSILON||1e-14,Ys=(e,t)=>t<e.length&&!e[t].skip&&e[t],xj=e=>e==="x"?"y":"x";function Ooe(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=sy(o,i),l=sy(a,o);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+f*(a.x-i.x),y:o.y+f*(a.y-i.y)}}}function Poe(e,t,n){const r=e.length;let i,o,a,s,l,c=Ys(e,0);for(let u=0;u<r-1;++u)if(l=c,c=Ys(e,u+1),!(!l||!c)){if(lc(t[u],0,Eoe)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(o,2),!(s<=9)&&(a=3/Math.sqrt(s),n[u]=i*a*t[u],n[u+1]=o*a*t[u])}}function Coe(e,t,n="x"){const r=xj(n),i=e.length;let o,a,s,l=Ys(e,0);for(let c=0;c<i;++c){if(a=s,s=l,l=Ys(e,c+1),!s)continue;const u=s[n],d=s[r];a&&(o=(u-a[n])/3,s[`cp1${n}`]=u-o,s[`cp1${r}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,s[`cp2${n}`]=u+o,s[`cp2${r}`]=d+o*t[c])}}function koe(e,t="x"){const n=xj(t),r=e.length,i=Array(r).fill(0),o=Array(r);let a,s,l,c=Ys(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=Ys(e,a+1),!!l){if(c){const u=c[t]-l[t];i[a]=u!==0?(c[n]-l[n])/u:0}o[a]=s?c?di(i[a-1])!==di(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}Poe(e,i,o),Coe(e,o,t)}function gd(e,t,n){return Math.max(Math.min(e,n),t)}function Doe(e,t){let n,r,i,o,a,s=zc(e[0],t);for(n=0,r=e.length;n<r;++n)a=o,o=s,s=n<r-1&&zc(e[n+1],t),o&&(i=e[n],a&&(i.cp1x=gd(i.cp1x,t.left,t.right),i.cp1y=gd(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=gd(i.cp2x,t.left,t.right),i.cp2y=gd(i.cp2y,t.top,t.bottom)))}function Toe(e,t,n,r,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")koe(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)s=e[o],l=Ooe(c,s,e[Math.min(o+1,a-(r?0:1))%a],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}t.capBezierPoints&&Doe(e,n)}function bx(){return typeof window<"u"&&typeof document<"u"}function xx(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function tp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const bh=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function Aoe(e,t){return bh(e).getPropertyValue(t)}const Moe=["top","right","bottom","left"];function Ta(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=Moe[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Noe=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function joe(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(Noe(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function da(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=bh(n),o=i.boxSizing==="border-box",a=Ta(i,"padding"),s=Ta(i,"border","width"),{x:l,y:c,box:u}=joe(e,n),d=a.left+(u&&s.left),f=a.top+(u&&s.top);let{width:p,height:m}=t;return o&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((c-f)/m*n.height/r)}}function Roe(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&xx(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=bh(o),l=Ta(s,"border","width"),c=Ta(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=tp(s.maxWidth,o,"clientWidth"),i=tp(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||Zf,maxHeight:i||Zf}}const vd=e=>Math.round(e*10)/10;function Ioe(e,t,n,r){const i=bh(e),o=Ta(i,"margin"),a=tp(i.maxWidth,e,"clientWidth")||Zf,s=tp(i.maxHeight,e,"clientHeight")||Zf,l=Roe(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Ta(i,"border","width"),p=Ta(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=vd(Math.min(c,a,l.maxWidth)),u=vd(Math.min(u,s,l.maxHeight)),c&&!u&&(u=vd(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=vd(Math.floor(u*r))),{width:c,height:u}}function E2(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const Loe=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};bx()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function O2(e,t){const n=Aoe(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function fa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Foe(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function $oe(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=fa(e,i,n),s=fa(i,o,n),l=fa(o,t,n),c=fa(a,s,n),u=fa(s,l,n);return fa(c,u,n)}const Boe=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},Woe=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ws(e,t,n){return e?Boe(t,n):Woe()}function wj(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function _j(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Sj(e){return e==="angle"?{between:Wc,compare:Bie,normalize:Rr}:{between:xo,compare:(t,n)=>t-n,normalize:t=>t}}function P2({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function zoe(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=Sj(r),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&a(s(t[c%l][r]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Voe(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,a=t.length,{compare:s,between:l,normalize:c}=Sj(r),{start:u,end:d,loop:f,style:p}=zoe(e,t,n),m=[];let h=!1,g=null,y,S,w;const x=()=>l(i,w,y)&&s(i,w)!==0,_=()=>s(o,y)===0||l(o,w,y),E=()=>h||x(),C=()=>!h||_();for(let D=u,A=u;D<=d;++D)S=t[D%a],!S.skip&&(y=c(S[r]),y!==w&&(h=l(y,i,o),g===null&&E()&&(g=s(y,i)===0?D:A),g!==null&&C()&&(m.push(P2({start:g,end:D,loop:f,count:a,style:p})),g=null),A=D,w=y));return g!==null&&m.push(P2({start:g,end:d,loop:f,count:a,style:p})),m}function Hoe(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=Voe(r[i],e.points,t);o.length&&n.push(...o)}return n}function Yoe(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function Uoe(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Koe(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Yoe(n,i,o,r);if(r===!0)return C2(e,[{start:a,end:s,loop:o}],n,t);const l=s<a?s+i:s,c=!!e._fullLoop&&a===0&&s===i-1;return C2(e,Uoe(n,a,l,c),n,t)}function C2(e,t,n,r){return!r||!r.setContext||!n?t:qoe(e,t,n,r)}function qoe(e,t,n,r){const i=e._chart.getContext(),o=k2(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function p(m,h,g,y){const S=s?-1:1;if(m!==h){for(m+=l;n[m%l].skip;)m-=S;for(;n[h%l].skip;)h+=S;m%l!==h%l&&(c.push({start:m%l,end:h%l,loop:g,style:y}),u=y,d=h%l)}}for(const m of t){d=s?d:m.start;let h=n[d%l],g;for(f=d+1;f<=m.end;f++){const y=n[f%l];g=k2(r.setContext(qa(i,{type:"segment",p0:h,p1:y,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:a}))),Goe(g,u)&&p(d,f-1,m.loop,u),h=y,u=g}d<f-1&&p(d,f-1,m.loop,u)}return c}function k2(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function Goe(e,t){if(!t)return!1;const n=[],r=function(i,o){return dx(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function yd(e,t,n){return e.options.clip?e[n]:t[n]}function Xoe(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:yd(n,t,"left"),right:yd(n,t,"right"),top:yd(r,t,"top"),bottom:yd(r,t,"bottom")}:t}function Qoe(e,t){const n=t._clip;if(n.disabled)return!1;const r=Xoe(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
270
270
  * Chart.js v4.5.0
271
271
  * https://www.chartjs.org
272
272
  * (c) 2025 Chart.js Contributors
273
273
  * Released under the MIT License
274
- */class Zoe{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=uj.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 Ci=new Zoe;const DP="transparent",Joe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=yP(e||DP),i=r.valid&&yP(t||DP);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class eae{constructor(t,n,r,i){const o=n[r];i=md([t.to,i,o,t.from]);const a=md([t.from,o,i]);this._active=!0,this._fn=t.fn||Joe[t.type||typeof a],this._easing=cc[t.easing]||cc.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=md([t.to,n,i,t.from]),this._from=md([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 Ej{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ae(t))return;const n=Object.keys(Nt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Ae(o))return;const a={};for(const s of n)a[s]=o[s];(Xt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=nae(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&tae(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 eae(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 Ci.add(this._chart,r),!0}}function tae(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 nae(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 TP(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 rae(e,t,n){if(n===!1)return!1;const r=TP(e,n),i=TP(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function iae(e){let t,n,r,i;return Ae(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 Oj(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 AP(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],Ar(c)&&(o||t===0||di(t)===di(c))&&(t+=c)}return!u&&!r.all?0:t}function oae(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 Mg(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function aae(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function sae(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 lae(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function MP(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 NP(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=aae(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:h,[c]:g}=m,y=m._stacks||(m._stacks={});f=y[c]=lae(i,u,h),f[s]=g,f._top=MP(f,a,!0,r.type),f._bottom=MP(f,a,!1,r.type);const S=f._visualValues||(f._visualValues={});S[s]=g}}function Ng(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function cae(e,t){return qa(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function uae(e,t,n){return qa(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Rl(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 jg=e=>e==="reset"||e==="none",jP=(e,t)=>t?e:Object.assign({},e),dae=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Oj(n,!0),values:null};class xh{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=Mg(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&&Rl(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,Ng(t,"x")),a=n.yAxisID=Se(r.yAxisID,Ng(t,"y")),s=n.rAxisID=Se(r.rAxisID,Ng(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&&mP(this._data,this),t._stacked&&Rl(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ae(n)){const i=this._cachedMeta;this._data=oae(n,i)}else if(r!==n){if(r){mP(r,this);const i=this._cachedMeta;Rl(i),i._parsed=[]}n&&Object.isExtensible(n)&&Hie(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=Mg(n.vScale,n),n.stack!==r.stack&&(i=!0,Rl(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(NP(this,n._parsed),n._stacked=Mg(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{Xt(i[t])?f=this.parseArrayData(r,i,t,n):Ae(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&&NP(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(Wa(p,s),f),y:a.parse(Wa(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:Oj(i,!0),values:n._stacks[t.axis]._visualValues};return AP(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=AP(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=dae(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=sae(s);let f,p;function m(){p=i[f];const h=p[s.axis];return!Ar(p[t.axis])||u>h||d<h}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],Ar(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=iae(Se(this.options.clip,rae(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=uae(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=cae(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&&$c(r);if(s)return jP(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(Nt.elements[t]),m=()=>this.getContext(r,i,n),h=c.resolveNamedOptions(f,p,m,d);return h.$shared&&(h.$shared=l,o[a]=Object.freeze(jP(h,l))),h}_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 Ej(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||jg(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){jg(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!jg(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&&Rl(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 fae(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=cj(r.sort((i,o)=>i-o))}return e._cache.$bar}function pae(e){const t=e.iScale,n=fae(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||($c(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 hae(e,t,n,r){const i=n.barThickness;let o,a;return Ye(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 mae(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 gae(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 Pj(e,t,n,r){return Xt(e)?gae(e,t,n,r):t[n.axis]=n.parse(e,r),t}function RP(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(Pj(f,d,o,c));return l}function Rg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function vae(e,t,n){return e!==0?di(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function yae(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 bae(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}=yae(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[IP(u,a,s,l)]=!0,i=c)),o[IP(i,a,s,l)]=!0,e.borderSkipped=o}function IP(e,t,n,r){return r?(e=xae(e,t,n),e=LP(e,n,t)):e=LP(e,t,n),e}function xae(e,t,n){return e===t?n:e===n?t:e}function LP(e,t,n){return e==="start"?t:e==="end"?n:e}function wae(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class _ae extends xh{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 RP(t,n,r,i)}parseArrayData(t,n,r,i){return RP(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,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[o.axis]=o.parse(Wa(h,c),f),d.push(Pj(Wa(h,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=Rg(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),h=o||Ye(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),y=(m._stacks||{})[s.axis],S={horizontal:c,base:h.base,enableBorderRadius:!y||Rg(m._custom)||a===y._top||a===y._bottom,x:c?h.head:g.center,y:c?g.center:h.head,height:c?g.size:Math.abs(h.size),width:c?Math.abs(h.size):g.size};f&&(S.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=S.options||t[p].options;bae(S,w,y,a),wae(S,w,u.ratio),this.updateElement(t[p],p,S,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(Ye(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||pae(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=Rg(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&di(d)!==di(c.barEnd)&&(f=0),f+=d);const g=!Ye(o)&&!u?o:f;let y=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=y,h=m-y,Math.abs(h)<a){h=vae(h,n,s)*a,d===s&&(y-=h/2);const S=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),x=Math.min(S,w),_=Math.max(S,w);y=Math.max(Math.min(y,_),x),m=y+h,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(y))}if(y===n.getPixelForValue(s)){const S=di(h)*n.getLineWidthForValue(s)/2;y+=S,h-=S}return{size:h,base:y,head:m,center:m+h/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"?mae(t,n,i,u*c):hae(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 Sae(e,t,n){let r=1,i=1,o=0,a=0;if(t<Pt){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,x,_)=>Wc(w,s,l,!0)?1:Math.max(x,x*n,_,_*n),m=(w,x,_)=>Wc(w,s,l,!0)?-1:Math.min(x,x*n,_,_*n),h=p(0,c,d),g=p(Vt,u,f),y=m(rt,c,d),S=m(rt+Vt,u,f);r=(h-y)/2,i=(g-S)/2,o=-(h+y)/2,a=-(g+S)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class Eae extends xh{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(Ae(r[t])){const{key:l="value"}=this._parsing;o=c=>+Wa(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return Li(this.options.rotation-90)}_getCircumference(){return Li(this.options.circumference)}_getRotationExtents(){let t=Pt,n=-Pt;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(Cie(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:h}=Sae(d,u,l),g=(r.width-a)/f,y=(r.height-a)/p,S=Math.max(Math.min(g,y)/2,0),w=ij(this.options.radius,S),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=h*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*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/Pt)}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:h,includeOptions:g}=this._getSharedOptions(n,i);let y=this._getRotation(),S;for(S=0;S<n;++S)y+=this._circumference(S,o);for(S=n;S<n+r;++S){const w=this._circumference(S,o),x=t[S],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+w,circumference:w,outerRadius:m,innerRadius:p};g&&(_.options=h||this.resolveDataElementOptions(S,x.active?"active":i)),y+=w,this.updateElement(x,S,_,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)?Pt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=fx(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 Oae extends xh{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}=Kie(n,i,a);this._drawStart=s,this._drawCount=l,qie(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:h}=this.options,g=Bc(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||i==="none",S=n+r,w=t.length;let x=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const E=t[_],C=y?E:{};if(_<n||_>=S){C.skip=!0;continue}const D=this.getParsed(_),A=Ye(D[p]),R=C[f]=a.getPixelForValue(D[f],_),T=C[p]=o||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],_);C.skip=isNaN(R)||isNaN(T)||A,C.stop=_>0&&Math.abs(D[f]-x[f])>g,h&&(C.parsed=D,C.raw=c.data[_]),d&&(C.options=u||this.resolveDataElementOptions(_,E.active?"active":i)),y||this.updateElement(E,_,C,i),x=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 na(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class wx{static override(t){Object.assign(wx.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return na()}parse(){return na()}format(){return na()}add(){return na()}diff(){return na()}startOf(){return na()}endOf(){return na()}}var Pae={_date:wx};function Cae(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?zie:wa;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(h=>!Ye(h[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(h=>!Ye(h[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function wh(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}=Cae(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function kae(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 Ig(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||wh(e,n,t,function(s,l,c){!i&&!zc(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function Dae(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=sj(a,{x:t.x,y:t.y});Wc(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return wh(e,n,t,o),i}function Tae(e,t,n,r,i,o){let a=[];const s=kae(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 g=s(t,m);g<l?(a=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&a.push({element:u,datasetIndex:d,index:f})}return wh(e,n,t,c),a}function Lg(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?Dae(e,t,n,i):Tae(e,t,n,r,i,o)}function FP(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return wh(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 Aae={modes:{index(e,t,n,r){const i=da(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?Ig(e,i,o,r,a):Lg(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=da(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?Ig(e,i,o,r,a):Lg(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=da(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Ig(e,i,o,r,a)},nearest(e,t,n,r){const i=da(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Lg(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=da(t,e);return FP(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=da(t,e);return FP(e,i,"y",n.intersect,r)}}};const Cj=["left","top","right","bottom"];function Il(e,t){return e.filter(n=>n.pos===t)}function $P(e,t){return e.filter(n=>Cj.indexOf(n.pos)===-1&&n.box.axis===t)}function Ll(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 Mae(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 Nae(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!Cj.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 jae(e,t){const n=Nae(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 Rae(e){const t=Mae(e),n=Ll(t.filter(c=>c.box.fullSize),!0),r=Ll(Il(t,"left"),!0),i=Ll(Il(t,"right")),o=Ll(Il(t,"top"),!0),a=Ll(Il(t,"bottom")),s=$P(t,"x"),l=$P(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Il(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function BP(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function kj(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 Iae(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Ae(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&&kj(a,o.getPadding());const s=Math.max(0,t.outerWidth-BP(a,e,"left","right")),l=Math.max(0,t.outerHeight-BP(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 Lae(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 Fae(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 Ql(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,Fae(s.horizontal,t));const{same:d,other:f}=Iae(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&Ql(i,t,n,r)||u}function bd(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 WP(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;$c(c.start)&&(a=c.start),l.fullSize?bd(l,i.left,a,n.outerWidth-i.right-i.left,f):bd(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;$c(c.start)&&(o=c.start),l.fullSize?bd(l,o,i.top,f,n.outerHeight-i.bottom-i.top):bd(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var wo={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=Wr(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=Rae(e.boxes),l=s.vertical,c=s.horizontal;Xe(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,g)=>g.box.options&&g.box.options.display===!1?h:h+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);kj(f,Wr(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=jae(l.concat(c),d);Ql(s.fullSize,p,d,m),Ql(l,p,d,m),Ql(c,p,d,m)&&Ql(l,p,d,m),Lae(p),WP(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,WP(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},Xe(s.chartArea,h=>{const g=h.box;Object.assign(g,e.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Dj{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 $ae extends Dj{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const $d="$chartjs",Bae={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},zP=e=>e===null||e==="";function Wae(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[$d]={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",zP(i)){const o=OP(e,"width");o!==void 0&&(e.width=o)}if(zP(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=OP(e,"height");o!==void 0&&(e.height=o)}return e}const Tj=Loe?{passive:!0}:!1;function zae(e,t,n){e&&e.addEventListener(t,n,Tj)}function Vae(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Tj)}function Hae(e,t){const n=Bae[e.type]||e.type,{x:r,y:i}=da(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function np(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Yae(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||np(s.addedNodes,r),a=a&&!np(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Uae(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||np(s.removedNodes,r),a=a&&!np(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Vc=new Map;let VP=0;function Aj(){const e=window.devicePixelRatio;e!==VP&&(VP=e,Vc.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Kae(e,t){Vc.size||window.addEventListener("resize",Aj),Vc.set(e,t)}function qae(e){Vc.delete(e),Vc.size||window.removeEventListener("resize",Aj)}function Gae(e,t,n){const r=e.canvas,i=r&&xx(r);if(!i)return;const o=dj((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),Kae(e,o),a}function Fg(e,t,n){n&&n.disconnect(),t==="resize"&&qae(e)}function Xae(e,t,n){const r=e.canvas,i=dj(o=>{e.ctx!==null&&n(Hae(o,e))},e);return zae(r,t,i),i}class Qae extends Dj{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Wae(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[$d])return!1;const r=n[$d].initial;["height","width"].forEach(o=>{const a=r[o];Ye(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[$d],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:Yae,detach:Uae,resize:Gae}[n]||Xae;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Fg,detach:Fg,resize:Fg}[n]||Vae)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Ioe(t,n,r,i)}isAttached(t){const n=t&&xx(t);return!!(n&&n.isConnected)}}function Zae(e){return!bx()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?$ae:Qae}let Ko=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 Bc(this.x)&&Bc(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 Jae(e,t){const n=e.options.ticks,r=ese(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?nse(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return rse(t,c,o,a/i),c;const u=tse(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(xd(t,c,u,Ye(p)?0:s-p,s),d=0,f=a-1;d<f;d++)xd(t,c,u,o[d],o[d+1]);return xd(t,c,u,l,Ye(p)?t.length:l+p),c}return xd(t,c,u),c}function ese(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 tse(e,t,n){const r=ise(e),i=t.length/n;if(!r)return Math.max(i,1);const o=Rie(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 nse(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function rse(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 xd(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 ise(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 ose=e=>e==="left"?"right":e==="right"?"left":e,HP=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,YP=(e,t)=>Math.min(t||e,e);function UP(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 ase(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 sse(e,t){Xe(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 Fl(e){return e.drawTicks?e.tickLength:0}function KP(e,t){if(!e.display)return 0;const n=Yn(e.font,t),r=Wr(e.padding);return(Xt(e.text)?e.text.length:1)*n.lineHeight+r.height}function lse(e,t){return qa(e,{scale:t,type:"scale"})}function cse(e,t,n){return qa(e,{tick:n,index:t,type:"tick"})}function use(e,t,n){let r=fj(e);return(n&&t!=="right"||!n&&t==="right")&&(r=ose(r)),r}function dse(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 h=a-i,g=s-o;if(e.isHorizontal()){if(p=Jn(r,o,s),Ae(n)){const y=Object.keys(n)[0],S=n[y];m=u[y].getPixelForValue(S)+h-t}else n==="center"?m=(c.bottom+c.top)/2+h-t:m=HP(e,n,t);f=s-o}else{if(Ae(n)){const y=Object.keys(n)[0],S=n[y];p=u[y].getPixelForValue(S)-g+t}else n==="center"?p=(c.left+c.right)/2-g+t:p=HP(e,n,t);m=Jn(r,a,i),d=n==="left"?-Vt:Vt}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class dl extends Ko{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=Kr(t,Number.POSITIVE_INFINITY),n=Kr(n,Number.NEGATIVE_INFINITY),r=Kr(r,Number.POSITIVE_INFINITY),i=Kr(i,Number.NEGATIVE_INFINITY),{min:Kr(t,r),max:Kr(n,i),minDefined:Ar(t),maxDefined:Ar(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:Kr(n,Kr(r,n)),max:Kr(r,Kr(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(){ct(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=hoe(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?UP(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Jae(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(){ct(this.options.afterUpdate,[this])}beforeSetDimensions(){ct(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(){ct(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ct(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ct(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=ct(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ct(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ct(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=YP(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=bn(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-Fl(t.grid)-n.padding-KP(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=$ie(Math.min(Math.asin(bn((u.highest.height+6)/s,-1,1)),Math.asin(bn(l/c,-1,1))-Math.asin(bn(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){ct(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ct(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=KP(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Fl(o)+l):(t.height=this.maxHeight,t.width=Fl(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=Li(this.labelRotation),h=Math.cos(m),g=Math.sin(m);if(s){const y=r.mirror?0:g*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+y+p)}else{const y=r.mirror?0:h*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+y+p)}this._calculatePadding(c,u,g,h)}}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(){ct(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++)Ye(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=UP(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/YP(n,r));let c=0,u=0,d,f,p,m,h,g,y,S,w,x,_;for(d=0;d<n;d+=l){if(m=t[d].label,h=this._resolveTickFontOptions(d),i.font=g=h.string,y=o[g]=o[g]||{data:{},gc:[]},S=h.lineHeight,w=x=0,!Ye(m)&&!Xt(m))w=xP(i,y.data,y.gc,w,m),x=S;else if(Xt(m))for(f=0,p=m.length;f<p;++f)_=m[f],!Ye(_)&&!Xt(_)&&(w=xP(i,y.data,y.gc,w,_),x+=S);a.push(w),s.push(x),c=Math.max(w,c),u=Math.max(x,u)}sse(o,n);const E=a.indexOf(c),C=s.indexOf(u),D=A=>({width:a[A]||0,height:s[A]||0});return{first:D(0),last:D(n-1),widest:D(E),highest:D(C),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 Wie(this._alignToPixels?ta(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=cse(this.getContext(),t,r))}return this.$context||(this.$context=lse(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Li(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=Fl(o),p=[],m=s.setContext(this.getContext()),h=m.display?m.width:0,g=h/2,y=function(L){return ta(r,L,h)};let S,w,x,_,E,C,D,A,R,T,O,N;if(a==="top")S=y(this.bottom),C=this.bottom-f,A=S-g,T=y(t.top)+g,N=t.bottom;else if(a==="bottom")S=y(this.top),T=t.top,N=y(t.bottom)-g,C=S+g,A=this.top+f;else if(a==="left")S=y(this.right),E=this.right-f,D=S-g,R=y(t.left)+g,O=t.right;else if(a==="right")S=y(this.left),R=t.left,O=y(t.right)-g,E=S+g,D=this.left+f;else if(n==="x"){if(a==="center")S=y((t.top+t.bottom)/2+.5);else if(Ae(a)){const L=Object.keys(a)[0],$=a[L];S=y(this.chart.scales[L].getPixelForValue($))}T=t.top,N=t.bottom,C=S+g,A=C+f}else if(n==="y"){if(a==="center")S=y((t.left+t.right)/2);else if(Ae(a)){const L=Object.keys(a)[0],$=a[L];S=y(this.chart.scales[L].getPixelForValue($))}E=S-g,D=E-f,R=t.left,O=t.right}const M=Se(i.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/M));for(w=0;w<d;w+=I){const L=this.getContext(w),$=o.setContext(L),V=s.setContext(L),W=$.lineWidth,B=$.color,X=V.dash||[],q=V.dashOffset,re=$.tickWidth,J=$.tickColor,ee=$.tickBorderDash||[],ie=$.tickBorderDashOffset;x=ase(this,w,l),x!==void 0&&(_=ta(r,x,W),c?E=D=R=O=_:C=A=T=N=_,p.push({tx1:E,ty1:C,tx2:D,ty2:A,x1:R,y1:T,x2:O,y2:N,width:W,color:B,borderDash:X,borderDashOffset:q,tickWidth:re,tickColor:J,tickBorderDash:ee,tickBorderDashOffset:ie}))}return this._ticksLength=d,this._borderValue=S,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=Fl(r.grid),p=f+u,m=d?-u:p,h=-Li(this.labelRotation),g=[];let y,S,w,x,_,E,C,D,A,R,T,O,N="middle";if(i==="top")E=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(i==="right"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+p;else if(Ae(i)){const I=Object.keys(i)[0],L=i[I];E=this.chart.scales[I].getPixelForValue(L)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-p;else if(Ae(i)){const I=Object.keys(i)[0],L=i[I];_=this.chart.scales[I].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const M=this._getLabelSizes();for(y=0,S=s.length;y<S;++y){w=s[y],x=w.label;const I=o.setContext(this.getContext(y));D=this.getPixelForTick(y)+o.labelOffset,A=this._resolveTickFontOptions(y),R=A.lineHeight,T=Xt(x)?x.length:1;const L=T/2,$=I.color,V=I.textStrokeColor,W=I.textStrokeWidth;let B=C;a?(_=D,C==="inner"&&(y===S-1?B=this.options.reverse?"left":"right":y===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||h!==0?O=-T*R+R/2:c==="center"?O=-M.highest.height/2-L*R+R:O=-M.highest.height+R/2:c==="near"||h!==0?O=R/2:c==="center"?O=M.highest.height/2-L*R:O=M.highest.height-T*R,d&&(O*=-1),h!==0&&!I.showLabelBackdrop&&(_+=R/2*Math.sin(h))):(E=D,O=(1-T)*R/2);let X;if(I.showLabelBackdrop){const q=Wr(I.backdropPadding),re=M.heights[y],J=M.widths[y];let ee=O-q.top,ie=0-q.left;switch(N){case"middle":ee-=re/2;break;case"bottom":ee-=re;break}switch(C){case"center":ie-=J/2;break;case"right":ie-=J;break;case"inner":y===S-1?ie-=J:y>0&&(ie-=J/2);break}X={left:ie,top:ee,width:J+q.width,height:re+q.height,color:I.backdropColor}}g.push({label:x,font:A,textOffset:O,options:{rotation:h,color:$,strokeColor:V,strokeWidth:W,textAlign:B,textBaseline:N,translation:[_,E],backdrop:X}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Li(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=ta(t,this.left,a)-a/2,u=ta(t,this.right,s)+s/2,d=f=l):(d=ta(t,this.top,a)-a/2,f=ta(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&&px(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;Jf(r,c,0,u,l,s)}i&&hx(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Yn(r.font),a=Wr(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Ae(n)?(l+=a.bottom,Xt(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=dse(this,l,n,s);Jf(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:use(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!==dl.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 Yn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class wd{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;hse(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,fse(t,a,r),this.override&&Nt.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 Nt[i]&&(delete Nt[i][r],this.override&&delete za[r])}}function fse(e,t,n){const r=Fc(Object.create(null),[n?Nt.get(n):{},Nt.get(t),e.defaults]);Nt.set(t,r),e.defaultRoutes&&pse(t,e.defaultRoutes),e.descriptors&&Nt.describe(t,e.descriptors)}function pse(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(".");Nt.route(o,i,l,s)})}function hse(e){return"id"in e&&"defaults"in e}class mse{constructor(){this.controllers=new wd(xh,"datasets",!0),this.elements=new wd(Ko,"elements"),this.plugins=new wd(Object,"plugins"),this.scales=new wd(dl,"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):Xe(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=cx(t);ct(r["before"+i],[],r),n[t](r),ct(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 Gr=new mse;class gse{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(ct(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Ye(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=vse(r);return i===!1&&!n?[]:bse(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 vse(e){const t={},n=[],r=Object.keys(Gr.plugins.items);for(let o=0;o<r.length;o++)n.push(Gr.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 yse(e,t){return!t&&e===!1?null:e===!0?{}:e}function bse(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=yse(r[l],i);c!==null&&o.push({plugin:s,options:xse(e.config,{plugin:s,local:n[l]},c,a)})}return o}function xse(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 uy(e,t){const n=Nt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function wse(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function _se(e,t){return e===t?"_index_":"_value_"}function qP(e){if(e==="x"||e==="y"||e==="r")return e}function Sse(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function dy(e,...t){if(qP(e))return e;for(const n of t){const r=n.axis||Sse(n.position)||e.length>1&&qP(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function GP(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Ese(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 GP(e,"x",n[0])||GP(e,"y",n[0])}return{}}function Ose(e,t){const n=za[e.type]||{scales:{}},r=t.scales||{},i=uy(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Ae(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=dy(a,s,Ese(a,e),Nt.scales[s.type]),c=_se(l,i),u=n.scales||{};o[a]=sc(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||uy(s,t),u=(za[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=wse(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),sc(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];sc(s,[Nt.scales[s.type],Nt.scale])}),o}function Mj(e){const t=e.options||(e.options={});t.plugins=Se(t.plugins,{}),t.scales=Ose(e,t)}function Nj(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Pse(e){return e=e||{},e.data=Nj(e.data),Mj(e),e}const XP=new Map,jj=new Set;function _d(e,t){let n=XP.get(e);return n||(n=t(),XP.set(e,n),jj.add(n)),n}const $l=(e,t,n)=>{const r=Wa(t,n);r!==void 0&&e.add(r)};class Cse{constructor(t){this._config=Pse(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=Nj(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(),Mj(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return _d(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return _d(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return _d(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return _d(`${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=>$l(l,t,d))),u.forEach(d=>$l(l,i,d)),u.forEach(d=>$l(l,za[o]||{},d)),u.forEach(d=>$l(l,Nt,d)),u.forEach(d=>$l(l,ly,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),jj.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,za[n]||{},Nt.datasets[n]||{},{type:n},Nt,ly]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=QP(this._resolverCache,t,i);let l=a;if(Dse(a,n)){o.$shared=!1,r=Fo(r)?r():r;const c=this.createResolver(t,r,s);l=Hs(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=QP(this._resolverCache,t,r);return Ae(n)?Hs(o,n,void 0,i):o}}function QP(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:gx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const kse=e=>Ae(e)&&Object.getOwnPropertyNames(e).some(t=>Fo(e[t]));function Dse(e,t){const{isScriptable:n,isIndexable:r}=gj(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Fo(s)||kse(s))||a&&Xt(s))return!0}return!1}var Tse="4.5.0";const Ase=["top","bottom","left","right","chartArea"];function ZP(e,t){return e==="top"||e==="bottom"||Ase.indexOf(e)===-1&&t==="x"}function JP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function e2(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ct(n&&n.onComplete,[e],t)}function Mse(e){const t=e.chart,n=t.options.animation;ct(n&&n.onProgress,[e],t)}function Rj(e){return bx()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Bd={},t2=e=>{const t=Rj(e);return Object.values(Bd).filter(n=>n.canvas===t).pop()};function Nse(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 jse(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let Mn=class{static defaults=Nt;static instances=Bd;static overrides=za;static registry=Gr;static version=Tse;static getChart=t2;static register(...t){Gr.add(...t),n2()}static unregister(...t){Gr.remove(...t),n2()}constructor(t,n){const r=this.config=new Cse(n),i=Rj(t),o=t2(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||Zae(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=Pie(),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 gse,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yie(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Bd[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ci.listen(this,"complete",e2),Ci.listen(this,"progress",Mse),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Ye(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 Gr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():EP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return wP(this.canvas,this.ctx),this}stop(){return Ci.stop(this),this}resize(t,n){Ci.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,EP(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ct(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Xe(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=dy(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Xe(o,a=>{const s=a.options,l=s.id,c=dy(l,s),u=Se(s.type,a.dtype);(s.position===void 0||ZP(s.position,c)!==ZP(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=Gr.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Xe(i,(a,s)=>{a||delete r[s]}),Xe(r,a=>{wo.configure(this,a,a.options),wo.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(JP("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||uy(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=Gr.getController(s),{datasetElementType:c,dataElementType:u}=Nt.datasets[s];Object.assign(l,{dataElementType:Gr.getElement(u),datasetElementType:c&&Gr.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Xe(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||Xe(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(JP("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Xe(this.scales,t=>{wo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!dP(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;Nse(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(!dP(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;wo.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Xe(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,Fo(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&&(Ci.has(this)?this.attached&&!Ci.running(this)&&Ci.start(this):(this.draw(),e2({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=Qoe(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&px(n,i),t.controller.draw(),i&&hx(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return zc(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=Aae.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=qa(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);$c(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(),Ci.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(),wP(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Bd[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)};Xe(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(){Xe(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Xe(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}});!Xf(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=Mie(t),c=jse(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ct(o.onHover,[t,s,this],this),l&&ct(o.onClick,[t,s,this],this));const u=!Xf(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 n2(){return Xe(Mn.instances,e=>e._plugins.invalidate())}function Rse(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,Rr(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,Rr(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*Rr(r-n));if(u==="round")e.arc(i,o,f,n-rt/2,r+rt/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+rt/2)+i,h=-p*Math.sin(n+rt/2)+o,g=p*Math.cos(r+rt/2)+i,y=p*Math.sin(r+rt/2)+o;e.lineTo(m,h),e.lineTo(g,y)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Ise(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+Vt,r-Vt),e.closePath(),e.clip()}function Lse(e){return mx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Fse(e,t,n,r){const i=Lse(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 bn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:bn(i.innerStart,0,a),innerEnd:bn(i.innerEnd,0,a)}}function cs(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function rp(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 I=u>0?u-r:0,L=d>0?d-r:0,$=(I+L)/2,V=$!==0?m*$/($+r):m;p=(m-V)/2}const h=Math.max(.001,m*d-n/rt)/d,g=(m-h)/2,y=l+g+p,S=i-g-p,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:E}=Fse(t,f,d,S-y),C=d-w,D=d-x,A=y+w/C,R=S-x/D,T=f+_,O=f+E,N=y+_/T,M=S-E/O;if(e.beginPath(),o){const I=(A+R)/2;if(e.arc(a,s,d,A,I),e.arc(a,s,d,I,R),x>0){const W=cs(D,R,a,s);e.arc(W.x,W.y,x,R,S+Vt)}const L=cs(O,S,a,s);if(e.lineTo(L.x,L.y),E>0){const W=cs(O,M,a,s);e.arc(W.x,W.y,E,S+Vt,M+Math.PI)}const $=(S-E/f+(y+_/f))/2;if(e.arc(a,s,f,S-E/f,$,!0),e.arc(a,s,f,$,y+_/f,!0),_>0){const W=cs(T,N,a,s);e.arc(W.x,W.y,_,N+Math.PI,y-Vt)}const V=cs(C,y,a,s);if(e.lineTo(V.x,V.y),w>0){const W=cs(C,A,a,s);e.arc(W.x,W.y,w,y-Vt,A)}}else{e.moveTo(a,s);const I=Math.cos(A)*d+a,L=Math.sin(A)*d+s;e.lineTo(I,L);const $=Math.cos(R)*d+a,V=Math.sin(R)*d+s;e.lineTo($,V)}e.closePath()}function $se(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){rp(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%Pt||Pt))}return rp(e,t,n,r,l,i),e.fill(),l}function Bse(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 h=t.endAngle;if(o){rp(e,t,n,r,h,i);for(let g=0;g<o;++g)e.stroke();isNaN(s)||(h=a+(s%Pt||Pt))}m&&Ise(e,t,h),l.selfJoin&&h-a>=rt&&p===0&&u!=="miter"&&Rse(e,t,h),o||(rp(e,t,n,r,h,i),e.stroke())}class _x extends Ko{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}=sj(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=Wc(o,s,l)&&s!==l,h=p>=Pt||m,g=xo(a,c+f,u+f);return h&&g}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>Pt?Math.floor(r/Pt):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(rt,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,$se(t,this,c,o,a),Bse(t,this,c,o,a),t.restore()}}function Ij(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 Wse(e,t,n){e.lineTo(n.x,n.y)}function zse(e){return e.stepped?ooe:e.tension||e.cubicInterpolationMode==="monotone"?aoe:Wse}function Lj(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 Vse(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=Lj(i,n,r),u=zse(o);let{move:d=!0,reverse:f}=r||{},p,m,h;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,h,m,f,o.stepped),h=m);return l&&(m=i[(s+(f?c:0))%a],u(e,h,m,f,o.stepped)),!!l}function Hse(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=Lj(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,h,g,y;const S=x=>(a+(c?s-x:x))%o,w=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,y))};for(l&&(p=i[S(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[S(f)],p.skip)continue;const x=p.x,_=p.y,E=x|0;E===m?(_<h?h=_:_>g&&(g=_),u=(d*u+x)/++d):(w(),e.lineTo(x,_),m=E,d=0,h=g=_),y=_}w()}function fy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Hse:Vse}function Yse(e){return e.stepped?Foe:e.tension||e.cubicInterpolationMode==="monotone"?$oe:fa}function Use(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Ij(e,t.options),e.stroke(i)}function Kse(e,t,n,r){const{segments:i,options:o}=t,a=fy(t);for(const s of i)Ij(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const qse=typeof Path2D=="function";function Gse(e,t,n,r){qse&&!t.options.segment?Use(e,t,n,r):Kse(e,t,n,r)}class Sx extends Ko{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;Toe(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=Koe(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=Hoe(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Yse(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 h=Math.abs((i-p[n])/(m[n]-p[n])),g=l(p,m,h,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return fy(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=fy(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(),Gse(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function r2(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class Ex extends Ko{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 r2(this,t,"x",n)}inYRange(t,n){return r2(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||!zc(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,cy(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Fj(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 _o(e,t,n,r){return e?0:bn(t,n,r)}function Xse(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=mj(r);return{t:_o(i.top,o.top,0,n),r:_o(i.right,o.right,0,t),b:_o(i.bottom,o.bottom,0,n),l:_o(i.left,o.left,0,t)}}function Qse(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=xs(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Ae(i);return{topLeft:_o(!l||s.top||s.left,o.topLeft,0,a),topRight:_o(!l||s.top||s.right,o.topRight,0,a),bottomLeft:_o(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:_o(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Zse(e){const t=Fj(e),n=t.right-t.left,r=t.bottom-t.top,i=Xse(e,n/2,r/2),o=Qse(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 $g(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&Fj(e,r);return s&&(i||xo(t,s.left,s.right))&&(o||xo(n,s.top,s.bottom))}function Jse(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function ele(e,t){e.rect(t.x,t.y,t.w,t.h)}function Bg(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 fl extends Ko{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}=Zse(this),s=Jse(a.radius)?ep:ele;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,Bg(a,n,o)),t.clip(),s(t,Bg(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,Bg(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return $g(this,t,n,r)}inXRange(t,n){return $g(this,t,null,n)}inYRange(t,n){return $g(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 i2=(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)}},tle=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class o2 extends Ko{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=ct(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=Yn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=i2(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,h)=>{const g=r+n/2+o.measureText(m.text).width;(h===0||c[c.length-1]+g+2*s>a)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+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,h=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:S,itemHeight:w}=nle(r,n,o,g,i);y>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,h++,f=p=0),l[y]={left:m,top:p,col:h,width:S,height:w},f=Math.max(f,S),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=ws(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=Jn(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=Jn(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=Jn(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=Jn(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;px(t,this),this._draw(),hx(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Nt.color,l=ws(t.rtl,this.left,this.width),c=Yn(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:h,itemHeight:g}=i2(a,d),y=function(E,C,D){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();const A=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=A,i.strokeStyle=Se(D.strokeStyle,s),i.setLineDash(Se(D.lineDash,[])),a.usePointStyle){const R={radius:h*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:A},T=l.xPlus(E,m/2),O=C+f;hj(i,R,T,O,a.pointStyleWidth&&m)}else{const R=C+Math.max((d-h)/2,0),T=l.leftForLtr(E,m),O=xs(D.borderRadius);i.beginPath(),Object.values(O).some(N=>N!==0)?ep(i,{x:T,y:R,w:m,h,radius:O}):i.rect(T,R,m,h),i.fill(),A!==0&&i.stroke()}i.restore()},S=function(E,C,D){Jf(i,D.text,E,C+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:Jn(o,this.left+u,this.right-r[0]),y:this.top+u+x,line:0}:p={x:this.left+u,y:Jn(o,this.top+x+u,this.bottom-n[0].height),line:0},wj(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const D=i.measureText(E.text).width,A=l.textAlign(E.textAlign||(E.textAlign=a.textAlign)),R=m+f+D;let T=p.x,O=p.y;l.setWidth(this.width),w?C>0&&T+R+u>this.right&&(O=p.y+=_,p.line++,T=p.x=Jn(o,this.left+u,this.right-r[p.line])):C>0&&O+_>this.bottom&&(T=p.x=T+n[p.line].width+u,p.line++,O=p.y=Jn(o,this.top+x+u,this.bottom-n[p.line].height));const N=l.x(T);if(y(N,O,E),T=Uie(A,T+m+f,w?T+R:this.right,t.rtl),S(l.x(T),O,E),w)p.x+=R+u;else if(typeof E.text!="string"){const M=c.lineHeight;p.y+=$j(E,M)+u}else p.y+=_}),_j(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Yn(n.font),i=Wr(n.padding);if(!n.display)return;const o=ws(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=Jn(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((h,g)=>Math.max(h,g.height),0);u=c+Jn(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=Jn(s,d,d+f);a.textAlign=o.textAlign(fj(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Jf(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=Yn(t.font),r=Wr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(xo(t,this.left,this.right)&&xo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],xo(t,i.left,i.left+i.width)&&xo(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!ole(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=tle(i,r);i&&!o&&ct(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ct(n.onHover,[t,r,this],this)}else r&&ct(n.onClick,[t,r,this],this)}}function nle(e,t,n,r,i){const o=rle(r,e,t,n),a=ile(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function rle(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 ile(e,t,n){let r=e;return typeof t.text!="string"&&(r=$j(t,n)),r}function $j(e,t){const n=e.text?e.text.length:0;return t*n}function ole(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Vr={id:"legend",_element:o2,start(e,t,n){const r=e.legend=new o2({ctx:e.ctx,options:n,chart:e});wo.configure(e,r,n),wo.addBox(e,r)},stop(e){wo.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;wo.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=Wr(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 Zl={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=sy(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 qr(e,t){return t&&(Xt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ki(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
274
+ */class Zoe{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=uj.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 Ci=new Zoe;const D2="transparent",Joe={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=y2(e||D2),i=r.valid&&y2(t||D2);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class eae{constructor(t,n,r,i){const o=n[r];i=md([t.to,i,o,t.from]);const a=md([t.from,o,i]);this._active=!0,this._fn=t.fn||Joe[t.type||typeof a],this._easing=cc[t.easing]||cc.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=md([t.to,n,i,t.from]),this._from=md([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 Ej{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Ae(t))return;const n=Object.keys(Nt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Ae(o))return;const a={};for(const s of n)a[s]=o[s];(Xt(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=nae(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&tae(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 eae(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 Ci.add(this._chart,r),!0}}function tae(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 nae(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 T2(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 rae(e,t,n){if(n===!1)return!1;const r=T2(e,n),i=T2(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function iae(e){let t,n,r,i;return Ae(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 Oj(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 A2(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],Ar(c)&&(o||t===0||di(t)===di(c))&&(t+=c)}return!u&&!r.all?0:t}function oae(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 Mg(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function aae(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function sae(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 lae(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function M2(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 N2(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=aae(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:h,[c]:g}=m,y=m._stacks||(m._stacks={});f=y[c]=lae(i,u,h),f[s]=g,f._top=M2(f,a,!0,r.type),f._bottom=M2(f,a,!1,r.type);const S=f._visualValues||(f._visualValues={});S[s]=g}}function Ng(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function cae(e,t){return qa(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function uae(e,t,n){return qa(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Rl(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 jg=e=>e==="reset"||e==="none",j2=(e,t)=>t?e:Object.assign({},e),dae=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:Oj(n,!0),values:null};class xh{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=Mg(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&&Rl(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,Ng(t,"x")),a=n.yAxisID=Se(r.yAxisID,Ng(t,"y")),s=n.rAxisID=Se(r.rAxisID,Ng(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&&m2(this._data,this),t._stacked&&Rl(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Ae(n)){const i=this._cachedMeta;this._data=oae(n,i)}else if(r!==n){if(r){m2(r,this);const i=this._cachedMeta;Rl(i),i._parsed=[]}n&&Object.isExtensible(n)&&Hie(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=Mg(n.vScale,n),n.stack!==r.stack&&(i=!0,Rl(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(N2(this,n._parsed),n._stacked=Mg(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{Xt(i[t])?f=this.parseArrayData(r,i,t,n):Ae(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&&N2(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(Wa(p,s),f),y:a.parse(Wa(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:Oj(i,!0),values:n._stacks[t.axis]._visualValues};return A2(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=A2(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=dae(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=sae(s);let f,p;function m(){p=i[f];const h=p[s.axis];return!Ar(p[t.axis])||u>h||d<h}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],Ar(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=iae(Se(this.options.clip,rae(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=uae(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=cae(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&&$c(r);if(s)return j2(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(Nt.elements[t]),m=()=>this.getContext(r,i,n),h=c.resolveNamedOptions(f,p,m,d);return h.$shared&&(h.$shared=l,o[a]=Object.freeze(j2(h,l))),h}_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 Ej(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||jg(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){jg(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!jg(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&&Rl(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 fae(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=cj(r.sort((i,o)=>i-o))}return e._cache.$bar}function pae(e){const t=e.iScale,n=fae(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||($c(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 hae(e,t,n,r){const i=n.barThickness;let o,a;return Ye(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 mae(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 gae(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 Pj(e,t,n,r){return Xt(e)?gae(e,t,n,r):t[n.axis]=n.parse(e,r),t}function R2(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(Pj(f,d,o,c));return l}function Rg(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function vae(e,t,n){return e!==0?di(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function yae(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 bae(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}=yae(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[I2(u,a,s,l)]=!0,i=c)),o[I2(i,a,s,l)]=!0,e.borderSkipped=o}function I2(e,t,n,r){return r?(e=xae(e,t,n),e=L2(e,n,t)):e=L2(e,t,n),e}function xae(e,t,n){return e===t?n:e===n?t:e}function L2(e,t,n){return e==="start"?t:e==="end"?n:e}function wae(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class _ae extends xh{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 R2(t,n,r,i)}parseArrayData(t,n,r,i){return R2(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,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[o.axis]=o.parse(Wa(h,c),f),d.push(Pj(Wa(h,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=Rg(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),h=o||Ye(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),y=(m._stacks||{})[s.axis],S={horizontal:c,base:h.base,enableBorderRadius:!y||Rg(m._custom)||a===y._top||a===y._bottom,x:c?h.head:g.center,y:c?g.center:h.head,height:c?g.size:Math.abs(h.size),width:c?Math.abs(h.size):g.size};f&&(S.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=S.options||t[p].options;bae(S,w,y,a),wae(S,w,u.ratio),this.updateElement(t[p],p,S,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(Ye(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||pae(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=Rg(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&di(d)!==di(c.barEnd)&&(f=0),f+=d);const g=!Ye(o)&&!u?o:f;let y=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=y,h=m-y,Math.abs(h)<a){h=vae(h,n,s)*a,d===s&&(y-=h/2);const S=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),x=Math.min(S,w),_=Math.max(S,w);y=Math.max(Math.min(y,_),x),m=y+h,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(y))}if(y===n.getPixelForValue(s)){const S=di(h)*n.getLineWidthForValue(s)/2;y+=S,h-=S}return{size:h,base:y,head:m,center:m+h/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"?mae(t,n,i,u*c):hae(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 Sae(e,t,n){let r=1,i=1,o=0,a=0;if(t<Pt){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,x,_)=>Wc(w,s,l,!0)?1:Math.max(x,x*n,_,_*n),m=(w,x,_)=>Wc(w,s,l,!0)?-1:Math.min(x,x*n,_,_*n),h=p(0,c,d),g=p(Vt,u,f),y=m(rt,c,d),S=m(rt+Vt,u,f);r=(h-y)/2,i=(g-S)/2,o=-(h+y)/2,a=-(g+S)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class Eae extends xh{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(Ae(r[t])){const{key:l="value"}=this._parsing;o=c=>+Wa(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return Li(this.options.rotation-90)}_getCircumference(){return Li(this.options.circumference)}_getRotationExtents(){let t=Pt,n=-Pt;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(Cie(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:h}=Sae(d,u,l),g=(r.width-a)/f,y=(r.height-a)/p,S=Math.max(Math.min(g,y)/2,0),w=ij(this.options.radius,S),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=h*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*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/Pt)}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:h,includeOptions:g}=this._getSharedOptions(n,i);let y=this._getRotation(),S;for(S=0;S<n;++S)y+=this._circumference(S,o);for(S=n;S<n+r;++S){const w=this._circumference(S,o),x=t[S],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:y,endAngle:y+w,circumference:w,outerRadius:m,innerRadius:p};g&&(_.options=h||this.resolveDataElementOptions(S,x.active?"active":i)),y+=w,this.updateElement(x,S,_,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)?Pt*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=fx(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 Oae extends xh{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}=Kie(n,i,a);this._drawStart=s,this._drawCount=l,qie(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:h}=this.options,g=Bc(m)?m:Number.POSITIVE_INFINITY,y=this.chart._animationsDisabled||o||i==="none",S=n+r,w=t.length;let x=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const E=t[_],C=y?E:{};if(_<n||_>=S){C.skip=!0;continue}const D=this.getParsed(_),A=Ye(D[p]),R=C[f]=a.getPixelForValue(D[f],_),T=C[p]=o||A?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],_);C.skip=isNaN(R)||isNaN(T)||A,C.stop=_>0&&Math.abs(D[f]-x[f])>g,h&&(C.parsed=D,C.raw=c.data[_]),d&&(C.options=u||this.resolveDataElementOptions(_,E.active?"active":i)),y||this.updateElement(E,_,C,i),x=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 na(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class wx{static override(t){Object.assign(wx.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return na()}parse(){return na()}format(){return na()}add(){return na()}diff(){return na()}startOf(){return na()}endOf(){return na()}}var Pae={_date:wx};function Cae(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?zie:wa;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(h=>!Ye(h[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(h=>!Ye(h[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function wh(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}=Cae(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function kae(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 Ig(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||wh(e,n,t,function(s,l,c){!i&&!zc(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function Dae(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=sj(a,{x:t.x,y:t.y});Wc(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return wh(e,n,t,o),i}function Tae(e,t,n,r,i,o){let a=[];const s=kae(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 g=s(t,m);g<l?(a=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&a.push({element:u,datasetIndex:d,index:f})}return wh(e,n,t,c),a}function Lg(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?Dae(e,t,n,i):Tae(e,t,n,r,i,o)}function F2(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return wh(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 Aae={modes:{index(e,t,n,r){const i=da(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?Ig(e,i,o,r,a):Lg(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=da(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?Ig(e,i,o,r,a):Lg(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=da(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Ig(e,i,o,r,a)},nearest(e,t,n,r){const i=da(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return Lg(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=da(t,e);return F2(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=da(t,e);return F2(e,i,"y",n.intersect,r)}}};const Cj=["left","top","right","bottom"];function Il(e,t){return e.filter(n=>n.pos===t)}function $2(e,t){return e.filter(n=>Cj.indexOf(n.pos)===-1&&n.box.axis===t)}function Ll(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 Mae(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 Nae(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!Cj.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 jae(e,t){const n=Nae(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 Rae(e){const t=Mae(e),n=Ll(t.filter(c=>c.box.fullSize),!0),r=Ll(Il(t,"left"),!0),i=Ll(Il(t,"right")),o=Ll(Il(t,"top"),!0),a=Ll(Il(t,"bottom")),s=$2(t,"x"),l=$2(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Il(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function B2(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function kj(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 Iae(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Ae(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&&kj(a,o.getPadding());const s=Math.max(0,t.outerWidth-B2(a,e,"left","right")),l=Math.max(0,t.outerHeight-B2(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 Lae(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 Fae(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 Ql(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,Fae(s.horizontal,t));const{same:d,other:f}=Iae(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&Ql(i,t,n,r)||u}function bd(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 W2(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;$c(c.start)&&(a=c.start),l.fullSize?bd(l,i.left,a,n.outerWidth-i.right-i.left,f):bd(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;$c(c.start)&&(o=c.start),l.fullSize?bd(l,o,i.top,f,n.outerHeight-i.bottom-i.top):bd(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var wo={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=Wr(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=Rae(e.boxes),l=s.vertical,c=s.horizontal;Xe(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,g)=>g.box.options&&g.box.options.display===!1?h:h+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);kj(f,Wr(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=jae(l.concat(c),d);Ql(s.fullSize,p,d,m),Ql(l,p,d,m),Ql(c,p,d,m)&&Ql(l,p,d,m),Lae(p),W2(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,W2(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},Xe(s.chartArea,h=>{const g=h.box;Object.assign(g,e.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class Dj{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 $ae extends Dj{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const $d="$chartjs",Bae={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},z2=e=>e===null||e==="";function Wae(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[$d]={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",z2(i)){const o=O2(e,"width");o!==void 0&&(e.width=o)}if(z2(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=O2(e,"height");o!==void 0&&(e.height=o)}return e}const Tj=Loe?{passive:!0}:!1;function zae(e,t,n){e&&e.addEventListener(t,n,Tj)}function Vae(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,Tj)}function Hae(e,t){const n=Bae[e.type]||e.type,{x:r,y:i}=da(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function np(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Yae(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||np(s.addedNodes,r),a=a&&!np(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Uae(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||np(s.removedNodes,r),a=a&&!np(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const Vc=new Map;let V2=0;function Aj(){const e=window.devicePixelRatio;e!==V2&&(V2=e,Vc.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Kae(e,t){Vc.size||window.addEventListener("resize",Aj),Vc.set(e,t)}function qae(e){Vc.delete(e),Vc.size||window.removeEventListener("resize",Aj)}function Gae(e,t,n){const r=e.canvas,i=r&&xx(r);if(!i)return;const o=dj((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),Kae(e,o),a}function Fg(e,t,n){n&&n.disconnect(),t==="resize"&&qae(e)}function Xae(e,t,n){const r=e.canvas,i=dj(o=>{e.ctx!==null&&n(Hae(o,e))},e);return zae(r,t,i),i}class Qae extends Dj{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Wae(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[$d])return!1;const r=n[$d].initial;["height","width"].forEach(o=>{const a=r[o];Ye(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[$d],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:Yae,detach:Uae,resize:Gae}[n]||Xae;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:Fg,detach:Fg,resize:Fg}[n]||Vae)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Ioe(t,n,r,i)}isAttached(t){const n=t&&xx(t);return!!(n&&n.isConnected)}}function Zae(e){return!bx()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?$ae:Qae}let Ko=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 Bc(this.x)&&Bc(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 Jae(e,t){const n=e.options.ticks,r=ese(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?nse(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return rse(t,c,o,a/i),c;const u=tse(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(xd(t,c,u,Ye(p)?0:s-p,s),d=0,f=a-1;d<f;d++)xd(t,c,u,o[d],o[d+1]);return xd(t,c,u,l,Ye(p)?t.length:l+p),c}return xd(t,c,u),c}function ese(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 tse(e,t,n){const r=ise(e),i=t.length/n;if(!r)return Math.max(i,1);const o=Rie(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 nse(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function rse(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 xd(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 ise(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 ose=e=>e==="left"?"right":e==="right"?"left":e,H2=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,Y2=(e,t)=>Math.min(t||e,e);function U2(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 ase(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 sse(e,t){Xe(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 Fl(e){return e.drawTicks?e.tickLength:0}function K2(e,t){if(!e.display)return 0;const n=Yn(e.font,t),r=Wr(e.padding);return(Xt(e.text)?e.text.length:1)*n.lineHeight+r.height}function lse(e,t){return qa(e,{scale:t,type:"scale"})}function cse(e,t,n){return qa(e,{tick:n,index:t,type:"tick"})}function use(e,t,n){let r=fj(e);return(n&&t!=="right"||!n&&t==="right")&&(r=ose(r)),r}function dse(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 h=a-i,g=s-o;if(e.isHorizontal()){if(p=Jn(r,o,s),Ae(n)){const y=Object.keys(n)[0],S=n[y];m=u[y].getPixelForValue(S)+h-t}else n==="center"?m=(c.bottom+c.top)/2+h-t:m=H2(e,n,t);f=s-o}else{if(Ae(n)){const y=Object.keys(n)[0],S=n[y];p=u[y].getPixelForValue(S)-g+t}else n==="center"?p=(c.left+c.right)/2-g+t:p=H2(e,n,t);m=Jn(r,a,i),d=n==="left"?-Vt:Vt}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class dl extends Ko{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=Kr(t,Number.POSITIVE_INFINITY),n=Kr(n,Number.NEGATIVE_INFINITY),r=Kr(r,Number.POSITIVE_INFINITY),i=Kr(i,Number.NEGATIVE_INFINITY),{min:Kr(t,r),max:Kr(n,i),minDefined:Ar(t),maxDefined:Ar(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:Kr(n,Kr(r,n)),max:Kr(r,Kr(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(){ct(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=hoe(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?U2(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Jae(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(){ct(this.options.afterUpdate,[this])}beforeSetDimensions(){ct(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(){ct(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ct(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ct(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=ct(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){ct(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ct(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=Y2(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=bn(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-Fl(t.grid)-n.padding-K2(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=$ie(Math.min(Math.asin(bn((u.highest.height+6)/s,-1,1)),Math.asin(bn(l/c,-1,1))-Math.asin(bn(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){ct(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ct(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=K2(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Fl(o)+l):(t.height=this.maxHeight,t.width=Fl(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=Li(this.labelRotation),h=Math.cos(m),g=Math.sin(m);if(s){const y=r.mirror?0:g*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+y+p)}else{const y=r.mirror?0:h*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+y+p)}this._calculatePadding(c,u,g,h)}}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(){ct(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++)Ye(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=U2(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/Y2(n,r));let c=0,u=0,d,f,p,m,h,g,y,S,w,x,_;for(d=0;d<n;d+=l){if(m=t[d].label,h=this._resolveTickFontOptions(d),i.font=g=h.string,y=o[g]=o[g]||{data:{},gc:[]},S=h.lineHeight,w=x=0,!Ye(m)&&!Xt(m))w=x2(i,y.data,y.gc,w,m),x=S;else if(Xt(m))for(f=0,p=m.length;f<p;++f)_=m[f],!Ye(_)&&!Xt(_)&&(w=x2(i,y.data,y.gc,w,_),x+=S);a.push(w),s.push(x),c=Math.max(w,c),u=Math.max(x,u)}sse(o,n);const E=a.indexOf(c),C=s.indexOf(u),D=A=>({width:a[A]||0,height:s[A]||0});return{first:D(0),last:D(n-1),widest:D(E),highest:D(C),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 Wie(this._alignToPixels?ta(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=cse(this.getContext(),t,r))}return this.$context||(this.$context=lse(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Li(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=Fl(o),p=[],m=s.setContext(this.getContext()),h=m.display?m.width:0,g=h/2,y=function(L){return ta(r,L,h)};let S,w,x,_,E,C,D,A,R,T,O,N;if(a==="top")S=y(this.bottom),C=this.bottom-f,A=S-g,T=y(t.top)+g,N=t.bottom;else if(a==="bottom")S=y(this.top),T=t.top,N=y(t.bottom)-g,C=S+g,A=this.top+f;else if(a==="left")S=y(this.right),E=this.right-f,D=S-g,R=y(t.left)+g,O=t.right;else if(a==="right")S=y(this.left),R=t.left,O=y(t.right)-g,E=S+g,D=this.left+f;else if(n==="x"){if(a==="center")S=y((t.top+t.bottom)/2+.5);else if(Ae(a)){const L=Object.keys(a)[0],$=a[L];S=y(this.chart.scales[L].getPixelForValue($))}T=t.top,N=t.bottom,C=S+g,A=C+f}else if(n==="y"){if(a==="center")S=y((t.left+t.right)/2);else if(Ae(a)){const L=Object.keys(a)[0],$=a[L];S=y(this.chart.scales[L].getPixelForValue($))}E=S-g,D=E-f,R=t.left,O=t.right}const M=Se(i.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/M));for(w=0;w<d;w+=I){const L=this.getContext(w),$=o.setContext(L),V=s.setContext(L),W=$.lineWidth,B=$.color,X=V.dash||[],q=V.dashOffset,re=$.tickWidth,J=$.tickColor,ee=$.tickBorderDash||[],ie=$.tickBorderDashOffset;x=ase(this,w,l),x!==void 0&&(_=ta(r,x,W),c?E=D=R=O=_:C=A=T=N=_,p.push({tx1:E,ty1:C,tx2:D,ty2:A,x1:R,y1:T,x2:O,y2:N,width:W,color:B,borderDash:X,borderDashOffset:q,tickWidth:re,tickColor:J,tickBorderDash:ee,tickBorderDashOffset:ie}))}return this._ticksLength=d,this._borderValue=S,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=Fl(r.grid),p=f+u,m=d?-u:p,h=-Li(this.labelRotation),g=[];let y,S,w,x,_,E,C,D,A,R,T,O,N="middle";if(i==="top")E=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(i==="right"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+p;else if(Ae(i)){const I=Object.keys(i)[0],L=i[I];E=this.chart.scales[I].getPixelForValue(L)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-p;else if(Ae(i)){const I=Object.keys(i)[0],L=i[I];_=this.chart.scales[I].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const M=this._getLabelSizes();for(y=0,S=s.length;y<S;++y){w=s[y],x=w.label;const I=o.setContext(this.getContext(y));D=this.getPixelForTick(y)+o.labelOffset,A=this._resolveTickFontOptions(y),R=A.lineHeight,T=Xt(x)?x.length:1;const L=T/2,$=I.color,V=I.textStrokeColor,W=I.textStrokeWidth;let B=C;a?(_=D,C==="inner"&&(y===S-1?B=this.options.reverse?"left":"right":y===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||h!==0?O=-T*R+R/2:c==="center"?O=-M.highest.height/2-L*R+R:O=-M.highest.height+R/2:c==="near"||h!==0?O=R/2:c==="center"?O=M.highest.height/2-L*R:O=M.highest.height-T*R,d&&(O*=-1),h!==0&&!I.showLabelBackdrop&&(_+=R/2*Math.sin(h))):(E=D,O=(1-T)*R/2);let X;if(I.showLabelBackdrop){const q=Wr(I.backdropPadding),re=M.heights[y],J=M.widths[y];let ee=O-q.top,ie=0-q.left;switch(N){case"middle":ee-=re/2;break;case"bottom":ee-=re;break}switch(C){case"center":ie-=J/2;break;case"right":ie-=J;break;case"inner":y===S-1?ie-=J:y>0&&(ie-=J/2);break}X={left:ie,top:ee,width:J+q.width,height:re+q.height,color:I.backdropColor}}g.push({label:x,font:A,textOffset:O,options:{rotation:h,color:$,strokeColor:V,strokeWidth:W,textAlign:B,textBaseline:N,translation:[_,E],backdrop:X}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Li(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=ta(t,this.left,a)-a/2,u=ta(t,this.right,s)+s/2,d=f=l):(d=ta(t,this.top,a)-a/2,f=ta(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&&px(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;Jf(r,c,0,u,l,s)}i&&hx(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Yn(r.font),a=Wr(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Ae(n)?(l+=a.bottom,Xt(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=dse(this,l,n,s);Jf(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:use(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!==dl.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 Yn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class wd{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;hse(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,fse(t,a,r),this.override&&Nt.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 Nt[i]&&(delete Nt[i][r],this.override&&delete za[r])}}function fse(e,t,n){const r=Fc(Object.create(null),[n?Nt.get(n):{},Nt.get(t),e.defaults]);Nt.set(t,r),e.defaultRoutes&&pse(t,e.defaultRoutes),e.descriptors&&Nt.describe(t,e.descriptors)}function pse(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(".");Nt.route(o,i,l,s)})}function hse(e){return"id"in e&&"defaults"in e}class mse{constructor(){this.controllers=new wd(xh,"datasets",!0),this.elements=new wd(Ko,"elements"),this.plugins=new wd(Object,"plugins"),this.scales=new wd(dl,"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):Xe(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=cx(t);ct(r["before"+i],[],r),n[t](r),ct(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 Gr=new mse;class gse{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(ct(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){Ye(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=vse(r);return i===!1&&!n?[]:bse(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 vse(e){const t={},n=[],r=Object.keys(Gr.plugins.items);for(let o=0;o<r.length;o++)n.push(Gr.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 yse(e,t){return!t&&e===!1?null:e===!0?{}:e}function bse(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=yse(r[l],i);c!==null&&o.push({plugin:s,options:xse(e.config,{plugin:s,local:n[l]},c,a)})}return o}function xse(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 uy(e,t){const n=Nt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function wse(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function _se(e,t){return e===t?"_index_":"_value_"}function q2(e){if(e==="x"||e==="y"||e==="r")return e}function Sse(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function dy(e,...t){if(q2(e))return e;for(const n of t){const r=n.axis||Sse(n.position)||e.length>1&&q2(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function G2(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function Ese(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 G2(e,"x",n[0])||G2(e,"y",n[0])}return{}}function Ose(e,t){const n=za[e.type]||{scales:{}},r=t.scales||{},i=uy(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Ae(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=dy(a,s,Ese(a,e),Nt.scales[s.type]),c=_se(l,i),u=n.scales||{};o[a]=sc(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||uy(s,t),u=(za[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=wse(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),sc(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];sc(s,[Nt.scales[s.type],Nt.scale])}),o}function Mj(e){const t=e.options||(e.options={});t.plugins=Se(t.plugins,{}),t.scales=Ose(e,t)}function Nj(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function Pse(e){return e=e||{},e.data=Nj(e.data),Mj(e),e}const X2=new Map,jj=new Set;function _d(e,t){let n=X2.get(e);return n||(n=t(),X2.set(e,n),jj.add(n)),n}const $l=(e,t,n)=>{const r=Wa(t,n);r!==void 0&&e.add(r)};class Cse{constructor(t){this._config=Pse(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=Nj(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(),Mj(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return _d(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return _d(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return _d(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return _d(`${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=>$l(l,t,d))),u.forEach(d=>$l(l,i,d)),u.forEach(d=>$l(l,za[o]||{},d)),u.forEach(d=>$l(l,Nt,d)),u.forEach(d=>$l(l,ly,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),jj.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,za[n]||{},Nt.datasets[n]||{},{type:n},Nt,ly]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=Q2(this._resolverCache,t,i);let l=a;if(Dse(a,n)){o.$shared=!1,r=Fo(r)?r():r;const c=this.createResolver(t,r,s);l=Hs(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=Q2(this._resolverCache,t,r);return Ae(n)?Hs(o,n,void 0,i):o}}function Q2(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:gx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const kse=e=>Ae(e)&&Object.getOwnPropertyNames(e).some(t=>Fo(e[t]));function Dse(e,t){const{isScriptable:n,isIndexable:r}=gj(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Fo(s)||kse(s))||a&&Xt(s))return!0}return!1}var Tse="4.5.0";const Ase=["top","bottom","left","right","chartArea"];function Z2(e,t){return e==="top"||e==="bottom"||Ase.indexOf(e)===-1&&t==="x"}function J2(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function eP(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),ct(n&&n.onComplete,[e],t)}function Mse(e){const t=e.chart,n=t.options.animation;ct(n&&n.onProgress,[e],t)}function Rj(e){return bx()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Bd={},tP=e=>{const t=Rj(e);return Object.values(Bd).filter(n=>n.canvas===t).pop()};function Nse(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 jse(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let Mn=class{static defaults=Nt;static instances=Bd;static overrides=za;static registry=Gr;static version=Tse;static getChart=tP;static register(...t){Gr.add(...t),nP()}static unregister(...t){Gr.remove(...t),nP()}constructor(t,n){const r=this.config=new Cse(n),i=Rj(t),o=tP(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||Zae(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=Pie(),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 gse,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Yie(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],Bd[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Ci.listen(this,"complete",eP),Ci.listen(this,"progress",Mse),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return Ye(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 Gr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():E2(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return w2(this.canvas,this.ctx),this}stop(){return Ci.stop(this),this}resize(t,n){Ci.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,E2(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),ct(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Xe(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=dy(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Xe(o,a=>{const s=a.options,l=s.id,c=dy(l,s),u=Se(s.type,a.dtype);(s.position===void 0||Z2(s.position,c)!==Z2(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=Gr.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Xe(i,(a,s)=>{a||delete r[s]}),Xe(r,a=>{wo.configure(this,a,a.options),wo.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(J2("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||uy(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=Gr.getController(s),{datasetElementType:c,dataElementType:u}=Nt.datasets[s];Object.assign(l,{dataElementType:Gr.getElement(u),datasetElementType:c&&Gr.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Xe(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||Xe(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(J2("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Xe(this.scales,t=>{wo.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!d2(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;Nse(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(!d2(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;wo.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Xe(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,Fo(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&&(Ci.has(this)?this.attached&&!Ci.running(this)&&Ci.start(this):(this.draw(),eP({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=Qoe(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&px(n,i),t.controller.draw(),i&&hx(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return zc(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=Aae.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=qa(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);$c(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(),Ci.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(),w2(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Bd[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)};Xe(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(){Xe(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Xe(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}});!Xf(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=Mie(t),c=jse(t,this._lastEvent,r,l);r&&(this._lastEvent=null,ct(o.onHover,[t,s,this],this),l&&ct(o.onClick,[t,s,this],this));const u=!Xf(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 nP(){return Xe(Mn.instances,e=>e._plugins.invalidate())}function Rse(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,Rr(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,Rr(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*Rr(r-n));if(u==="round")e.arc(i,o,f,n-rt/2,r+rt/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+rt/2)+i,h=-p*Math.sin(n+rt/2)+o,g=p*Math.cos(r+rt/2)+i,y=p*Math.sin(r+rt/2)+o;e.lineTo(m,h),e.lineTo(g,y)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Ise(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+Vt,r-Vt),e.closePath(),e.clip()}function Lse(e){return mx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Fse(e,t,n,r){const i=Lse(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 bn(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:bn(i.innerStart,0,a),innerEnd:bn(i.innerEnd,0,a)}}function cs(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function rp(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 I=u>0?u-r:0,L=d>0?d-r:0,$=(I+L)/2,V=$!==0?m*$/($+r):m;p=(m-V)/2}const h=Math.max(.001,m*d-n/rt)/d,g=(m-h)/2,y=l+g+p,S=i-g-p,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:E}=Fse(t,f,d,S-y),C=d-w,D=d-x,A=y+w/C,R=S-x/D,T=f+_,O=f+E,N=y+_/T,M=S-E/O;if(e.beginPath(),o){const I=(A+R)/2;if(e.arc(a,s,d,A,I),e.arc(a,s,d,I,R),x>0){const W=cs(D,R,a,s);e.arc(W.x,W.y,x,R,S+Vt)}const L=cs(O,S,a,s);if(e.lineTo(L.x,L.y),E>0){const W=cs(O,M,a,s);e.arc(W.x,W.y,E,S+Vt,M+Math.PI)}const $=(S-E/f+(y+_/f))/2;if(e.arc(a,s,f,S-E/f,$,!0),e.arc(a,s,f,$,y+_/f,!0),_>0){const W=cs(T,N,a,s);e.arc(W.x,W.y,_,N+Math.PI,y-Vt)}const V=cs(C,y,a,s);if(e.lineTo(V.x,V.y),w>0){const W=cs(C,A,a,s);e.arc(W.x,W.y,w,y-Vt,A)}}else{e.moveTo(a,s);const I=Math.cos(A)*d+a,L=Math.sin(A)*d+s;e.lineTo(I,L);const $=Math.cos(R)*d+a,V=Math.sin(R)*d+s;e.lineTo($,V)}e.closePath()}function $se(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){rp(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%Pt||Pt))}return rp(e,t,n,r,l,i),e.fill(),l}function Bse(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 h=t.endAngle;if(o){rp(e,t,n,r,h,i);for(let g=0;g<o;++g)e.stroke();isNaN(s)||(h=a+(s%Pt||Pt))}m&&Ise(e,t,h),l.selfJoin&&h-a>=rt&&p===0&&u!=="miter"&&Rse(e,t,h),o||(rp(e,t,n,r,h,i),e.stroke())}class _x extends Ko{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}=sj(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=Wc(o,s,l)&&s!==l,h=p>=Pt||m,g=xo(a,c+f,u+f);return h&&g}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>Pt?Math.floor(r/Pt):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(rt,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,$se(t,this,c,o,a),Bse(t,this,c,o,a),t.restore()}}function Ij(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 Wse(e,t,n){e.lineTo(n.x,n.y)}function zse(e){return e.stepped?ooe:e.tension||e.cubicInterpolationMode==="monotone"?aoe:Wse}function Lj(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 Vse(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=Lj(i,n,r),u=zse(o);let{move:d=!0,reverse:f}=r||{},p,m,h;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,h,m,f,o.stepped),h=m);return l&&(m=i[(s+(f?c:0))%a],u(e,h,m,f,o.stepped)),!!l}function Hse(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=Lj(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,h,g,y;const S=x=>(a+(c?s-x:x))%o,w=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,y))};for(l&&(p=i[S(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[S(f)],p.skip)continue;const x=p.x,_=p.y,E=x|0;E===m?(_<h?h=_:_>g&&(g=_),u=(d*u+x)/++d):(w(),e.lineTo(x,_),m=E,d=0,h=g=_),y=_}w()}function fy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?Hse:Vse}function Yse(e){return e.stepped?Foe:e.tension||e.cubicInterpolationMode==="monotone"?$oe:fa}function Use(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),Ij(e,t.options),e.stroke(i)}function Kse(e,t,n,r){const{segments:i,options:o}=t,a=fy(t);for(const s of i)Ij(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const qse=typeof Path2D=="function";function Gse(e,t,n,r){qse&&!t.options.segment?Use(e,t,n,r):Kse(e,t,n,r)}class Sx extends Ko{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;Toe(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=Koe(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=Hoe(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Yse(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 h=Math.abs((i-p[n])/(m[n]-p[n])),g=l(p,m,h,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return fy(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=fy(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(),Gse(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function rP(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class Ex extends Ko{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 rP(this,t,"x",n)}inYRange(t,n){return rP(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||!zc(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,cy(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Fj(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 _o(e,t,n,r){return e?0:bn(t,n,r)}function Xse(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=mj(r);return{t:_o(i.top,o.top,0,n),r:_o(i.right,o.right,0,t),b:_o(i.bottom,o.bottom,0,n),l:_o(i.left,o.left,0,t)}}function Qse(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=xs(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Ae(i);return{topLeft:_o(!l||s.top||s.left,o.topLeft,0,a),topRight:_o(!l||s.top||s.right,o.topRight,0,a),bottomLeft:_o(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:_o(!l||s.bottom||s.right,o.bottomRight,0,a)}}function Zse(e){const t=Fj(e),n=t.right-t.left,r=t.bottom-t.top,i=Xse(e,n/2,r/2),o=Qse(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 $g(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&Fj(e,r);return s&&(i||xo(t,s.left,s.right))&&(o||xo(n,s.top,s.bottom))}function Jse(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function ele(e,t){e.rect(t.x,t.y,t.w,t.h)}function Bg(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 fl extends Ko{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}=Zse(this),s=Jse(a.radius)?ep:ele;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,Bg(a,n,o)),t.clip(),s(t,Bg(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,Bg(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return $g(this,t,n,r)}inXRange(t,n){return $g(this,t,null,n)}inYRange(t,n){return $g(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 iP=(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)}},tle=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class oP extends Ko{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=ct(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=Yn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=iP(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,h)=>{const g=r+n/2+o.measureText(m.text).width;(h===0||c[c.length-1]+g+2*s>a)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+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,h=0;return this.legendItems.forEach((g,y)=>{const{itemWidth:S,itemHeight:w}=nle(r,n,o,g,i);y>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,h++,f=p=0),l[y]={left:m,top:p,col:h,width:S,height:w},f=Math.max(f,S),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=ws(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=Jn(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=Jn(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=Jn(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=Jn(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;px(t,this),this._draw(),hx(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Nt.color,l=ws(t.rtl,this.left,this.width),c=Yn(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:h,itemHeight:g}=iP(a,d),y=function(E,C,D){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();const A=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=A,i.strokeStyle=Se(D.strokeStyle,s),i.setLineDash(Se(D.lineDash,[])),a.usePointStyle){const R={radius:h*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:A},T=l.xPlus(E,m/2),O=C+f;hj(i,R,T,O,a.pointStyleWidth&&m)}else{const R=C+Math.max((d-h)/2,0),T=l.leftForLtr(E,m),O=xs(D.borderRadius);i.beginPath(),Object.values(O).some(N=>N!==0)?ep(i,{x:T,y:R,w:m,h,radius:O}):i.rect(T,R,m,h),i.fill(),A!==0&&i.stroke()}i.restore()},S=function(E,C,D){Jf(i,D.text,E,C+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:Jn(o,this.left+u,this.right-r[0]),y:this.top+u+x,line:0}:p={x:this.left+u,y:Jn(o,this.top+x+u,this.bottom-n[0].height),line:0},wj(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const D=i.measureText(E.text).width,A=l.textAlign(E.textAlign||(E.textAlign=a.textAlign)),R=m+f+D;let T=p.x,O=p.y;l.setWidth(this.width),w?C>0&&T+R+u>this.right&&(O=p.y+=_,p.line++,T=p.x=Jn(o,this.left+u,this.right-r[p.line])):C>0&&O+_>this.bottom&&(T=p.x=T+n[p.line].width+u,p.line++,O=p.y=Jn(o,this.top+x+u,this.bottom-n[p.line].height));const N=l.x(T);if(y(N,O,E),T=Uie(A,T+m+f,w?T+R:this.right,t.rtl),S(l.x(T),O,E),w)p.x+=R+u;else if(typeof E.text!="string"){const M=c.lineHeight;p.y+=$j(E,M)+u}else p.y+=_}),_j(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Yn(n.font),i=Wr(n.padding);if(!n.display)return;const o=ws(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=Jn(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((h,g)=>Math.max(h,g.height),0);u=c+Jn(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=Jn(s,d,d+f);a.textAlign=o.textAlign(fj(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,Jf(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=Yn(t.font),r=Wr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(xo(t,this.left,this.right)&&xo(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],xo(t,i.left,i.left+i.width)&&xo(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!ole(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=tle(i,r);i&&!o&&ct(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&ct(n.onHover,[t,r,this],this)}else r&&ct(n.onClick,[t,r,this],this)}}function nle(e,t,n,r,i){const o=rle(r,e,t,n),a=ile(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function rle(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 ile(e,t,n){let r=e;return typeof t.text!="string"&&(r=$j(t,n)),r}function $j(e,t){const n=e.text?e.text.length:0;return t*n}function ole(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Vr={id:"legend",_element:oP,start(e,t,n){const r=e.legend=new oP({ctx:e.ctx,options:n,chart:e});wo.configure(e,r,n),wo.addBox(e,r)},stop(e){wo.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;wo.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=Wr(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 Zl={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=sy(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 qr(e,t){return t&&(Xt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function ki(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
275
275
  `)>-1?e.split(`
276
- `):e}function ale(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 a2(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Yn(t.bodyFont),c=Yn(t.titleFont),u=Yn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Wr(t.padding);let h=m.height,g=0,y=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(y-p)*l.lineHeight+(y-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){g=Math.max(g,n.measureText(x).width+S)};return n.save(),n.font=c.string,Xe(e.title,w),n.font=l.string,Xe(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Xe(r,x=>{Xe(x.before,w),Xe(x.lines,w),Xe(x.after,w)}),S=0,n.font=u.string,Xe(e.footer,w),n.restore(),g+=m.width,{width:g,height:h}}function sle(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function lle(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 cle(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"),lle(c,e,t,n)&&(c="center"),c}function s2(e,t,n){const r=n.yAlign||t.yAlign||sle(e,n);return{xAlign:n.xAlign||t.xAlign||cle(e,t,n,r),yAlign:r}}function ule(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function dle(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function l2(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}=xs(a);let m=ule(t,s);const h=dle(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:bn(m,0,r.width-t.width),y:bn(h,0,r.height-t.height)}}function Sd(e,t,n){const r=Wr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function c2(e){return qr([],ki(e))}function fle(e,t,n){return qa(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function u2(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Bj={beforeTitle:Pi,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:Pi,beforeBody:Pi,beforeLabel:Pi,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 Ye(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:Pi,afterBody:Pi,beforeFooter:Pi,footer:Pi,afterFooter:Pi};function In(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?Bj[t].call(n,r):i}class d2 extends Ko{static positioners=Zl;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 Ej(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=fle(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=In(r,"beforeTitle",this,t),o=In(r,"title",this,t),a=In(r,"afterTitle",this,t);let s=[];return s=qr(s,ki(i)),s=qr(s,ki(o)),s=qr(s,ki(a)),s}getBeforeBody(t,n){return c2(In(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Xe(t,o=>{const a={before:[],lines:[],after:[]},s=u2(r,o);qr(a.before,ki(In(s,"beforeLabel",this,o))),qr(a.lines,In(s,"label",this,o)),qr(a.after,ki(In(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return c2(In(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=In(r,"beforeFooter",this,t),o=In(r,"footer",this,t),a=In(r,"afterFooter",this,t);let s=[];return s=qr(s,ki(i)),s=qr(s,ki(o)),s=qr(s,ki(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(ale(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))),Xe(s,u=>{const d=u2(t.callbacks,u);i.push(In(d,"labelColor",this,u)),o.push(In(d,"labelPointStyle",this,u)),a.push(In(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=Zl[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=a2(this,r),c=Object.assign({},s,l),u=s2(this.chart,r,c),d=l2(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}=xs(s),{x:f,y:p}=t,{width:m,height:h}=n;let g,y,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(g=f,y=g-a,w=x+a,_=x-a):(g=f+m,y=g+a,w=x-a,_=x+a),S=g):(i==="left"?y=f+Math.max(l,u)+a:i==="right"?y=f+m-Math.max(c,d)-a:y=this.caretX,o==="top"?(w=p,x=w-a,g=y-a,S=y+a):(w=p+h,x=w+a,g=y+a,S=y-a),_=w),{x1:g,x2:y,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=ws(r.rtl,this.x,this.width);for(t.x=Sd(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Yn(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=Yn(o.bodyFont),d=Sd(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,y=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,cy(t,h,g,y),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,cy(t,h,g,y)}else{t.lineWidth=Ae(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 h=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),y=xs(a.borderRadius);Object.values(y).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ep(t,{x:h,y:m,w:c,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ep(t,{x:g,y:m+1,w:c-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(g,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=Yn(r.bodyFont);let f=d.lineHeight,p=0;const m=ws(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},g=m.textAlign(a);let y,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=Sd(this,g,r),n.fillStyle=r.bodyColor,Xe(this.beforeBody,h),p=s&&g!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(y=i[x],S=this.labelTextColors[x],n.fillStyle=S,Xe(y.before,h),w=y.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Xe(y.after,h)}p=0,f=d.lineHeight,Xe(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=ws(r.rtl,this.x,this.width);for(t.x=Sd(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Yn(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}=xs(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=Zl[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=a2(this,t),l=Object.assign({},a,this._size),c=s2(n,t,l),u=l2(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=Wr(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),wj(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),_j(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=!Xf(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||!Xf(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=Zl[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var jr={id:"tooltip",_element:d2,positioners:Zl,afterInit(e,t,n){n&&(e.tooltip=new d2({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:Bj},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 ple=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function hle(e,t,n,r){const i=e.indexOf(t);if(i===-1)return ple(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const mle=(e,t)=>e===null?null:bn(Math.round(e),0,t);function f2(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class lo extends dl{static id="category";static defaults={ticks:{callback:f2}};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(Ye(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:hle(r,t,Se(n,t),this._addedLabels),mle(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 f2.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 gle(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:h,max:g}=t,y=!Ye(a),S=!Ye(s),w=!Ye(c),x=(g-h)/(d+1);let _=pP((g-h)/m/p)*p,E,C,D,A;if(_<1e-14&&!y&&!S)return[{value:h},{value:g}];A=Math.ceil(g/_)-Math.floor(h/_),A>m&&(_=pP(A*_/m/p)*p),Ye(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(g/_)*_):(C=h,D=g),y&&S&&o&&Lie((s-a)/o,_/1e3)?(A=Math.round(Math.min((s-a)/_,u)),_=(s-a)/A,C=a,D=s):w?(C=y?a:C,D=S?s:D,A=c-1,_=(D-C)/A):(A=(D-C)/_,lc(A,Math.round(A),_/1e3)?A=Math.round(A):A=Math.ceil(A));const R=Math.max(hP(_),hP(C));E=Math.pow(10,Ye(l)?R:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let T=0;for(y&&(f&&C!==a?(n.push({value:a}),C<a&&T++,lc(Math.round((C+T*_)*E)/E,a,p2(a,x,e))&&T++):C<a&&T++);T<A;++T){const O=Math.round((C+T*_)*E)/E;if(S&&O>s)break;n.push({value:O})}return S&&f&&D!==s?n.length&&lc(n[n.length-1].value,s,p2(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function p2(e,t,{horizontal:n,minRotation:r}){const i=Li(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class vle extends dl{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 Ye(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=di(i),c=di(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=gle(i,o);return t.bounds==="ticks"&&Fie(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 fx(t,this.chart.options.locale,this.options.ticks.format)}}class co extends vle{static id="linear";static defaults={ticks:{callback:pj.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ar(t)?t:0,this.max=Ar(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Li(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 _h={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}},zn=Object.keys(_h);function h2(e,t){return e-t}function m2(e,t){if(Ye(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)),Ar(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Bc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function g2(e,t,n,r){const i=zn.length;for(let o=zn.indexOf(e);o<i-1;++o){const a=_h[zn[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return zn[o]}return zn[i-1]}function yle(e,t,n,r,i){for(let o=zn.length-1;o>=zn.indexOf(n);o--){const a=zn[o];if(_h[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return zn[n?zn.indexOf(n):0]}function ble(e){for(let t=zn.indexOf(e)+1,n=zn.length;t<n;++t)if(_h[zn[t]].common)return zn[t]}function v2(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=ux(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function xle(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 y2(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:xle(e,r,i,n)}class b2 extends dl{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 Pae._date(t.adapters.date);i.init(n),sc(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:m2(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=Ar(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Ar(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=Vie(i,o,a);return this._unit=n.unit||(r.autoSkip?g2(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):yle(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:ble(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),y2(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=bn(n,0,a),r=bn(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||g2(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Bc(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++)v2(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&v2(u,f,m),Object.keys(u).sort(h2).map(h=>+h)}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 ct(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=Li(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,y2(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(m2(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return cj(t.sort(h2))}}function Ed(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}=wa(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}=wa(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 Qce extends b2{static id="timeseries";static defaults=b2.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=Ed(n,this.min),this._tableRange=Ed(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(Ed(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ed(this._table,r*this._tableRange+this._minPos,!0)}}const Wj="label";function x2(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wle(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function zj(e,t){e.labels=t}function Vj(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wj;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 _le(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Wj;const n={labels:[],datasets:[]};return zj(n,e.labels),Vj(n,e.datasets,t),n}function Sle(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),h=()=>{p.current&&(m.current=new Mn(p.current,{type:a,data:_le(s,o),options:l&&{...l},plugins:c}),x2(t,m.current))},g=()=>{x2(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&wle(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&zj(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&Vj(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(g(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>g()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const Ele=k.forwardRef(Sle);function Ox(e,t){return Mn.register(t),k.forwardRef((n,r)=>k.createElement(Ele,{...n,ref:r,type:e}))}const Px=Ox("line",Oae),pl=Ox("bar",_ae),Cx=Ox("doughnut",Eae);Mn.register(_x,jr,Vr);const Ole={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=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=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-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},Ple=({sold:e=847,unsold:t=73,growthPct:n="+9.1%"})=>{const r=e+t,i={labels:["Sold","Unsold"],datasets:[{data:[e,t],backgroundColor:["#12B981","#EF4444"],borderWidth:2,hoverOffset:4}]},o={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:a=>`${a.label}: ${a.parsed}`},displayColors:!1},centerText:{top:`${r}`,bottom:"Total Units",topSize:20,bottomSize:10}}};return b.jsx(Ne,{title:"Unit Status",period:"This Month",icon:b.jsx(zy,{className:"h-6 w-6 text-green-600"}),className:"h-[238px]",children:b.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5 space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Sold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#1FA05B]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Unsold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#EF4444]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-[8px] items-center ",children:[n," ",b.jsx("div",{className:"text-[#64748B] text-[10px]",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[158px] w-[158px] ml-auto mr-2",children:b.jsx(Cx,{data:i,options:o,plugins:[Ole]})})})]})})},w2=({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 b.jsxs("div",{className:"flex flex-col items-start",children:[b.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:b.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),b.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),b.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},_2=({title:e,value:t,suffix:n,valueClass:r=""})=>b.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),b.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&b.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),Cle=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return b.jsxs("div",{children:[b.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[b.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[b.jsx(Hy,{className:"h-6 w-6 text-[#329DFF]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),b.jsxs("div",{className:"flex items-center justify-between gap-",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),b.jsxs("div",{className:"flex items-end",children:[b.jsx(w2,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),b.jsx(w2,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),b.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[b.jsx(_2,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),b.jsx(_2,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Mn.register(_x,jr,Vr);const kle={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=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=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-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},Dle=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return b.jsx(Ne,{title:"Resident Overview",icon:b.jsx(ok,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:b.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",b.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:b.jsx(Cx,{data:a,options:s,plugins:[kle]})})})]})})};Mn.register(lo,co,fl,jr,Vr);const Tle=({blocks:e=[{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 t=e.map(s=>s.name),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},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 b.jsx(Ne,{title:"Block-wise Occupancy",period:b.jsx(An,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:b.jsx(pl,{data:o,options:a})})};Mn.register(lo,co,Ex,Sx,jr,Vr);const Ale=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}`},Mle=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:n,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>Ale(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},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 b.jsx(Ne,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:b.jsx(An,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:b.jsx(Px,{data:r,options:i})})};Mn.register(lo,co,Ex,Sx,jr,Vr);const Nle=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}`},Hj=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:n,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>Nle(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},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 b.jsx(Px,{data:r,options:i})};function S2({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return b.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[b.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),b.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[b.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),b.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function jle(){return b.jsxs(Ne,{title:"Accounting",className:"w-full h-[523px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(S2,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),b.jsx(S2,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),b.jsx("div",{className:"h-[254px] mt-[35.5px]",children:b.jsx(Hj,{})})]})}Mn.register(lo,co,fl,jr,Vr);const Rle=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return b.jsx(Ne,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(pl,{data:r,options:i})})},Ile=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return b.jsxs(Ne,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[b.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),b.jsx("div",{className:"flex flex-col items-end",children:b.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),b.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),b.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};Mn.register(lo,co,fl,jr,Vr);const Lle=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return b.jsxs(Ne,{title:"Dues Ageing",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>b.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:b.jsxs("div",{className:"flex justify-between items-start",children:[b.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),b.jsxs("div",{className:"text-right",children:[b.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),b.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),b.jsx("div",{className:"h-[192px]",children:b.jsx(pl,{data:r,options:i})})]})};Mn.register(_x,jr,Vr);const Fle=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return b.jsxs(Ne,{title:"Expense Categories",className:"w-full h-[523px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[b.jsx(Cx,{data:n,options:i}),b.jsxs("div",{className:"absolute text-center",children:[b.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),b.jsx("div",{className:"space-y-2",children:e.map((o,a)=>b.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[b.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[b.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),b.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},Bl=[{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 $le(){const e=Bl.reduce((t,n)=>t+n.value,0);return b.jsx(Ne,{title:"Asset Value Breakdown",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:Bl,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Bl.map((t,n)=>b.jsx(Br,{fill:t.color},`cell-${n}`))}),b.jsx(bi,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),b.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[b.jsx("div",{className:"flex flex-col gap-[8px]",children:Bl.slice(0,3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),b.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:Bl.slice(3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}Mn.register(lo,co,fl,jr,Vr);const Ble=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return b.jsx(Ne,{title:"Revenue by Category",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(pl,{data:r,options:i})})};function Wle(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function zle(e){return Fe({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)}function Vle({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(Ne,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-slate-500",children:r})]})]})}function Hle(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:ik,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:zle,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Wle,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:ak,iconColor:"text-[#DBB467]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>b.jsx(Vle,{...t},n))})}const Od=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function Yle(){const t=Od.find(n=>n.name==="Completed")?.value||0;return b.jsx(Ne,{title:"Guard Patrols",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:Od,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Od.map((n,r)=>b.jsx(Br,{fill:n.color},`cell-${r}`))}),b.jsx(bi,{formatter:n=>n.toLocaleString()})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),b.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),b.jsx("div",{className:"flex flex-col gap-[8px] mt-3 w-full px-6 text-[14px]",children:Od.map(n=>b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.color}}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}Mn.register(lo,co,Ex,Sx,jr,Vr);const Ule=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},n={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:r=>r[0].label,label:r=>`${r.dataset.label} ${r.parsed.y}`}}},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 b.jsx(Ne,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:b.jsx(An,{className:"text-[20px] text-[#884EA7]"}),children:b.jsx(Px,{data:t,options:n})})};function Kle(){return b.jsx(Ne,{title:"Incident Reports",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[b.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),b.jsxs("div",{className:"mt-4 ",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:b.jsx("div",{className:"text-white !text-[12px] font-bold",children:"!"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000] bg-red-50",children:[b.jsx("div",{children:"4 - Danger"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:b.jsx(vw,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] bg-yellow-50",children:[b.jsx("div",{children:"3 - High"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:b.jsx(vw,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] bg-green-50",children:[b.jsx("div",{children:"1 - Low"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function qle(){return b.jsx(Ne,{title:"Staff Attendance",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center h-[76px] gap-[16px] mb-2",children:[b.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),b.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),b.jsxs("div",{className:"mt-[24px] ",children:[b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Security guards"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"12/12 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Housekeeping"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"7/8 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Maintenance"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"4/4 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Gardening"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"2/2 Present"})]})]})]})})}function Gle(e){return Fe({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 Xle({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(Ne,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-slate-500",children:r})]})]})}function Qle(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Hy,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:pre,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Gle,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:k3,iconColor:"text-[#36AB6C]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>b.jsx(Xle,{...t},n))})}const Zle=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],Jle=(e="")=>e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/<[^>]*>/g,"").trim();function ece({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:Jle(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):Zle;return b.jsx(Ne,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),b.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const tce=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},nce=[{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}],rce=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return b.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[b.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=tce(a);return b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[b.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),b.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),b.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},ice=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return b.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[b.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),b.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},oce=({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:nce).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 b.jsxs(Ne,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[b.jsx(xi,{width:"100%",height:"85%",children:b.jsxs(qM,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[b.jsx(ol,{strokeDasharray:"0",vertical:!1}),b.jsx(al,{dataKey:"level"}),b.jsx($a,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),b.jsx(bi,{content:b.jsx(rce,{}),cursor:!1}),b.jsx(nc,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),b.jsx(nc,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),b.jsx(nc,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),b.jsx(ice,{})]})},ace=[{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 sce({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})):ace;return b.jsx(Ne,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),b.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function lce(e){return Fe({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 cce=["open_complaints","pending_requests","avg_response_time","resolution_rate"],uce={open_complaints:{title:"Open Complaints",Icon:ik,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:lce,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:L3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:N3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},dce=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>b.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),fce={primary:{size:28,lineHeight:32,weight:500}},pce={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 hce({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?b.jsx(E2,{id:e,data:t}):b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:cce.map(n=>b.jsx(E2,{id:n},n))})}function E2({id:e,data:t}){const n=uce[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=Kc,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:pce[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,b.jsx("div",{className:"h-[132px]",children:b.jsxs(Ne,{title:i,titleColor:a,icon:b.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:b.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[b.jsx(dce,{...fce.primary,children:c}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[b.jsx(Yy,{value:u}),b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function O2({title:e,date:t,rsvp:n,utilisation:r,status:i}){return b.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),b.jsx("div",{className:`!text-[12px] font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),b.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),b.jsxs("div",{className:"flex justify-between items-center mt-2",children:[b.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),b.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),b.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:b.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function mce(){return b.jsx(Ne,{title:"Events Utilisation",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{children:[b.jsx(O2,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),b.jsx(O2,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Pd({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return b.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[b.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),b.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function gce(){return b.jsx(Ne,{title:"Notice Board Status",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(Pd,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),b.jsx(Pd,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),b.jsx(Pd,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),b.jsx(Pd,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function Yj(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function vce({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(Ne,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function yce({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Yj,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return b.jsx("div",{className:"h-full",children:t.map((n,r)=>b.jsx(vce,{...n},r))})}function bce(e){return Fe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function xce({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(Ne,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function wce(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Yj,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:D3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:dre,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:bce,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>b.jsx(xce,{...t},n))})}const P2=({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 b.jsxs("div",{className:"flex flex-col items-start",children:[b.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:b.jsx("div",{className:`h-[11px] rounded-full ${n}`,style:{width:n==="bg-[#12B981]"?`${i+45}%`:`${i}%`}})}),b.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r})]})},_ce=({occupiedUnits:e=9e3,EmployeesCount:t=8910,AdminsCount:n=90})=>{const r=t+n;return b.jsx("div",{children:b.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[b.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[b.jsx(Hy,{className:"!text-[20px] text-[#329DFF]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview (Static Data)"})]}),b.jsxs("div",{className:"flex items-start justify-between",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),b.jsx("div",{className:"flex items-center gap-1",children:b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:e})})]}),b.jsxs("div",{className:"flex items-end",children:[b.jsx(P2,{value:t,total:r,colorClass:"bg-[#8B5CF6]",label:"Employees"}),b.jsx(P2,{value:n,total:r,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};Mn.register(lo,co,fl,jr);const Sce=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,max:2e3,ticks:{stepSize:500,color:"#64748B"},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return b.jsxs(Ne,{className:"w-full h-[238px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(A5,{className:"!text-[20px] text-[#8B5CF6]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Employee Footfall (Static Data)"})]}),period:b.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:[b.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),b.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),b.jsx("div",{className:"h-[97px]",children:b.jsx(pl,{data:t,options:n})})]})};function Ece(){return b.jsx(Ne,{className:"h-[324px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(T5,{className:"!text-[20px] text-[#FA7E28]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Food & Beverages (Static Data)"})]}),period:b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),b.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),b.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[b.jsx(nk,{}),8,"%",b.jsx("span",{children:"from last month"})]})]})]}),b.jsxs("div",{className:"space-y-5",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[b.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),b.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:"h-3 bg-blue-500 rounded-full",style:{width:"70%"}})})]}),b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[b.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),b.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:"h-3 bg-red-500 rounded-full",style:{width:"50%"}})})]}),b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[b.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),b.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:"h-3 bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Oce({data:e}){const t=e?.amenitySummary||{},r=(Array.isArray(e?.chartData)?e.chartData:[]).map(d=>({...d,isPaid:d?.isPaid==1})),i=r.length>0&&r.every(d=>d?.isPaid===!1),o=t?.totalBookings||0,a=r.reduce((d,f)=>{const p=f?.isPaid?f?.paid_bookings||f?.total_bookings||0:f?.unpaid_bookings||f?.total_bookings||0;return d+p},0),s=r.map(d=>{const f=d?.isPaid?d?.paid_bookings||d?.total_bookings||0:d?.unpaid_bookings||d?.total_bookings||0,p=d?.isPaid?`₹${d?.paid_revenue||"0.00"}`:"",m=a>0?Math.round(f/a*100):0;return{name:d?.facility_name||"Unknown",bookings:f,revenue:p,percentage:m,color:d?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:d?.isPaid}}),l=t?.growth_percentage;let c=null;if(typeof l=="number")c=l;else if(typeof l=="string"){const d=l.replace("%","").trim(),f=Number(d);c=isNaN(f)?null:f}const u=c!==null?c>=0:!0;return b.jsx(Ne,{className:"h-[324px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(C3,{className:"!text-[20px] text-[#884EA7]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Amenities"})]}),period:b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:o})]}),!i&&b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),b.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹",t?.todayPaidRevenue??"0.00"]}),c!==null&&b.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${u?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[u?b.jsx(nk,{}):b.jsx(O3,{}),c,"%",b.jsx("span",{children:"from last month"})]})]})]}),b.jsx("div",{className:"space-y-5",children:s.length>0?s.map((d,f)=>b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:d?.name}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[b.jsxs("div",{className:"text-[#64748B] inline",children:[d?.bookings," ",d?.bookings<=1?"booking":"bookings"]}),d?.isPaid&&b.jsx("div",{className:"mx-2 text-[#121212] inline",children:d?.revenue})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:`h-3 rounded-full ${d?.color}`,style:{width:`${d?.percentage}%`}})})]},f)):b.jsx("div",{className:"flex items-center justify-center h-[120px]",children:b.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}Mn.register(lo,co,fl,jr,Vr);function Pce({data:e=[]}){const t=[{level:"L1",open_count:55,in_progress_count:22,on_hold:15,closed_count:6},{level:"L2",open_count:45,in_progress_count:25,on_hold:18,closed_count:5},{level:"L3",open_count:58,in_progress_count:23,on_hold:14,closed_count: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_count)),o.push(Number(n[u].in_progress_count)),a.push(Number(n[u].on_hold)),s.push(Number(n[u].closed_count));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:"Closed",data:s,backgroundColor:"#10B981",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,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 b.jsx(Ne,{className:"h-[267px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(j3,{className:"!text-[20px] text-[#3C81F6]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Ticket Escalation Levels"})]}),period:b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsx("div",{className:"h-full",children:b.jsx(pl,{data:l,options:c})})})}const Cce=({active:e,payload:t})=>!e||!t||!t.length?null:b.jsxs("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:[b.jsx("div",{className:"font-medium",children:t[0].name}),b.jsx("div",{children:t[0].value})]});function kce({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 b.jsx(Ne,{className:"h-[267px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(rv,{className:"!text-[20px] text-[#EF4444]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Ticket Status"})]}),period:b.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsxs("div",{className:"flex h-full items-center gap-4",children:[b.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>b.jsx(Br,{fill:a.color},s))}),b.jsx(bi,{content:b.jsx(Cce,{}),wrapperStyle:{zIndex:1e3}})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[b.jsx("div",{children:r(n.completed)}),b.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),b.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),b.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>b.jsxs("div",{className:"flex items-center justify-between text-sm",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const C2={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}},chartData:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function k2({title:e,color:t,rows:n=[],children:r}){const i=b.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[b.jsx(Mp,{className:`text-[20px] ${t}`}),b.jsx("div",{children:e??""})]}),b.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>b.jsxs("div",{className:"flex justify-between text-[14px]",children:[b.jsx("div",{children:o??""}),b.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return b.jsx(ej,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function Dce({data:e}){const t=e&&Object.keys(e).length?e:C2,n=t?.visitorSummary??{},r={walkins:{currently_inside:Number(t?.walkinsPopupData?.walkinsInside??0),total_visited_today:Number(t?.walkinsPopupData?.totalWalkins??0)},preApproved:{completed_visits:Number(t?.preApprovedPopupData?.preApprovedCheckIns??0),total_expected_today:Number(t?.preApprovedPopupData?.totalPreApprovedCheckIns??0)}},i=k.useMemo(()=>{const a=t?.chartData??[];if(!a.length)return C2.chartData;const s=[];for(let l=0;l<a.length;l++)s.push({time:a[l]?.hour??"-",walkins:a[l]?.walkins??0,approved:a[l]?.preApproved??0});return s},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return b.jsx(Ne,{className:"h-[377px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Mp,{className:"!text-[20px] text-[#8B5CF6]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Visitor Updates"})]}),period:b.jsx("div",{className:"flex items-center gap-1 text-[12px] text-[#64748B]",children:b.jsxs("div",{children:["Today at ",o]})}),children:b.jsxs("div",{className:"flex flex-col mt-2",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),b.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),b.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),b.jsxs("div",{className:"mt-2",children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),b.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[b.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),b.jsx(k2,{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:b.jsxs("div",{className:"text-gray-400 cursor-pointer ml-1 leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),b.jsxs("div",{className:"mt-2",children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),b.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[b.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),b.jsx(k2,{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:b.jsxs("div",{className:"text-gray-400 cursor-pointer ml-1 leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),b.jsx("div",{className:"w-full h-[179px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(B0,{data:i??[],children:[b.jsx(ol,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),b.jsx(al,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),b.jsx($a,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),b.jsx(bi,{}),b.jsx(Co,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),b.jsx(Co,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}exports.Accounting=jle;exports.Amenities=Oce;exports.AssetValueBreakdown=$le;exports.BlockWiseOccupancy=Tle;exports.Budgets=Rle;exports.Card=Ne;exports.CashBankBalance=Ile;exports.CommercialOccupancy=_ce;exports.Community=hre;exports.Complaints=ece;exports.ComplaintsByLevel=oce;exports.DuesAgeing=Lle;exports.EmployeeFootfall=Sce;exports.Engagement=mre;exports.EngagementStatsGrid=wce;exports.EventsUtilisation=mce;exports.ExpenseCategories=Fle;exports.Facilities=gre;exports.FinanceSummary=vre;exports.FoodBeverages=Ece;exports.GateAndSecurityStatsGrid=Qle;exports.GateUpdates=nie;exports.GuardPatrols=Yle;exports.Header=v3;exports.Helpdesk=rie;exports.HelpdeskStatsGrid=hce;exports.HourlyTrafficFlow=Ule;exports.IncidentReports=Kle;exports.IncomeExpenditure=Hj;exports.MainHeader=M3;exports.MoveInOutTrends=Mle;exports.NoticeBoardStatus=gce;exports.OccupancyOverview=Cle;exports.RequestBox=sce;exports.ResidentOverview=Dle;exports.RevenuebyCategory=Ble;exports.SingleStats=yce;exports.StaffAttendance=qle;exports.StatsGrid=Hle;exports.TicketEscalation=Pce;exports.TicketStatus=kce;exports.UnitStatus=Ple;exports.VisitorUpdates=Dce;
276
+ `):e}function ale(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 aP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Yn(t.bodyFont),c=Yn(t.titleFont),u=Yn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Wr(t.padding);let h=m.height,g=0,y=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(y+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),y){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(y-p)*l.lineHeight+(y-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){g=Math.max(g,n.measureText(x).width+S)};return n.save(),n.font=c.string,Xe(e.title,w),n.font=l.string,Xe(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Xe(r,x=>{Xe(x.before,w),Xe(x.lines,w),Xe(x.after,w)}),S=0,n.font=u.string,Xe(e.footer,w),n.restore(),g+=m.width,{width:g,height:h}}function sle(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function lle(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 cle(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"),lle(c,e,t,n)&&(c="center"),c}function sP(e,t,n){const r=n.yAlign||t.yAlign||sle(e,n);return{xAlign:n.xAlign||t.xAlign||cle(e,t,n,r),yAlign:r}}function ule(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function dle(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function lP(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}=xs(a);let m=ule(t,s);const h=dle(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:bn(m,0,r.width-t.width),y:bn(h,0,r.height-t.height)}}function Sd(e,t,n){const r=Wr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function cP(e){return qr([],ki(e))}function fle(e,t,n){return qa(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function uP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const Bj={beforeTitle:Pi,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:Pi,beforeBody:Pi,beforeLabel:Pi,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 Ye(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:Pi,afterBody:Pi,beforeFooter:Pi,footer:Pi,afterFooter:Pi};function In(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?Bj[t].call(n,r):i}class dP extends Ko{static positioners=Zl;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 Ej(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=fle(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=In(r,"beforeTitle",this,t),o=In(r,"title",this,t),a=In(r,"afterTitle",this,t);let s=[];return s=qr(s,ki(i)),s=qr(s,ki(o)),s=qr(s,ki(a)),s}getBeforeBody(t,n){return cP(In(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Xe(t,o=>{const a={before:[],lines:[],after:[]},s=uP(r,o);qr(a.before,ki(In(s,"beforeLabel",this,o))),qr(a.lines,In(s,"label",this,o)),qr(a.after,ki(In(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return cP(In(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=In(r,"beforeFooter",this,t),o=In(r,"footer",this,t),a=In(r,"afterFooter",this,t);let s=[];return s=qr(s,ki(i)),s=qr(s,ki(o)),s=qr(s,ki(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(ale(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))),Xe(s,u=>{const d=uP(t.callbacks,u);i.push(In(d,"labelColor",this,u)),o.push(In(d,"labelPointStyle",this,u)),a.push(In(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=Zl[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=aP(this,r),c=Object.assign({},s,l),u=sP(this.chart,r,c),d=lP(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}=xs(s),{x:f,y:p}=t,{width:m,height:h}=n;let g,y,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(g=f,y=g-a,w=x+a,_=x-a):(g=f+m,y=g+a,w=x-a,_=x+a),S=g):(i==="left"?y=f+Math.max(l,u)+a:i==="right"?y=f+m-Math.max(c,d)-a:y=this.caretX,o==="top"?(w=p,x=w-a,g=y-a,S=y+a):(w=p+h,x=w+a,g=y+a,S=y-a),_=w),{x1:g,x2:y,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=ws(r.rtl,this.x,this.width);for(t.x=Sd(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Yn(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=Yn(o.bodyFont),d=Sd(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,y=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,cy(t,h,g,y),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,cy(t,h,g,y)}else{t.lineWidth=Ae(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 h=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),y=xs(a.borderRadius);Object.values(y).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ep(t,{x:h,y:m,w:c,h:l,radius:y}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),ep(t,{x:g,y:m+1,w:c-2,h:l-2,radius:y}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(g,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=Yn(r.bodyFont);let f=d.lineHeight,p=0;const m=ws(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},g=m.textAlign(a);let y,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=Sd(this,g,r),n.fillStyle=r.bodyColor,Xe(this.beforeBody,h),p=s&&g!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(y=i[x],S=this.labelTextColors[x],n.fillStyle=S,Xe(y.before,h),w=y.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Xe(y.after,h)}p=0,f=d.lineHeight,Xe(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=ws(r.rtl,this.x,this.width);for(t.x=Sd(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Yn(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}=xs(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=Zl[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=aP(this,t),l=Object.assign({},a,this._size),c=sP(n,t,l),u=lP(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=Wr(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),wj(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),_j(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=!Xf(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||!Xf(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=Zl[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var jr={id:"tooltip",_element:dP,positioners:Zl,afterInit(e,t,n){n&&(e.tooltip=new dP({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:Bj},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 ple=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function hle(e,t,n,r){const i=e.indexOf(t);if(i===-1)return ple(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const mle=(e,t)=>e===null?null:bn(Math.round(e),0,t);function fP(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class lo extends dl{static id="category";static defaults={ticks:{callback:fP}};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(Ye(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:hle(r,t,Se(n,t),this._addedLabels),mle(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 fP.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 gle(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:h,max:g}=t,y=!Ye(a),S=!Ye(s),w=!Ye(c),x=(g-h)/(d+1);let _=p2((g-h)/m/p)*p,E,C,D,A;if(_<1e-14&&!y&&!S)return[{value:h},{value:g}];A=Math.ceil(g/_)-Math.floor(h/_),A>m&&(_=p2(A*_/m/p)*p),Ye(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(g/_)*_):(C=h,D=g),y&&S&&o&&Lie((s-a)/o,_/1e3)?(A=Math.round(Math.min((s-a)/_,u)),_=(s-a)/A,C=a,D=s):w?(C=y?a:C,D=S?s:D,A=c-1,_=(D-C)/A):(A=(D-C)/_,lc(A,Math.round(A),_/1e3)?A=Math.round(A):A=Math.ceil(A));const R=Math.max(h2(_),h2(C));E=Math.pow(10,Ye(l)?R:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let T=0;for(y&&(f&&C!==a?(n.push({value:a}),C<a&&T++,lc(Math.round((C+T*_)*E)/E,a,pP(a,x,e))&&T++):C<a&&T++);T<A;++T){const O=Math.round((C+T*_)*E)/E;if(S&&O>s)break;n.push({value:O})}return S&&f&&D!==s?n.length&&lc(n[n.length-1].value,s,pP(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function pP(e,t,{horizontal:n,minRotation:r}){const i=Li(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class vle extends dl{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 Ye(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=di(i),c=di(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=gle(i,o);return t.bounds==="ticks"&&Fie(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 fx(t,this.chart.options.locale,this.options.ticks.format)}}class co extends vle{static id="linear";static defaults={ticks:{callback:pj.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=Ar(t)?t:0,this.max=Ar(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Li(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 _h={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}},zn=Object.keys(_h);function hP(e,t){return e-t}function mP(e,t){if(Ye(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)),Ar(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Bc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function gP(e,t,n,r){const i=zn.length;for(let o=zn.indexOf(e);o<i-1;++o){const a=_h[zn[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return zn[o]}return zn[i-1]}function yle(e,t,n,r,i){for(let o=zn.length-1;o>=zn.indexOf(n);o--){const a=zn[o];if(_h[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return zn[n?zn.indexOf(n):0]}function ble(e){for(let t=zn.indexOf(e)+1,n=zn.length;t<n;++t)if(_h[zn[t]].common)return zn[t]}function vP(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=ux(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function xle(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 yP(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:xle(e,r,i,n)}class bP extends dl{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 Pae._date(t.adapters.date);i.init(n),sc(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:mP(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=Ar(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=Ar(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=Vie(i,o,a);return this._unit=n.unit||(r.autoSkip?gP(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):yle(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:ble(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),yP(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=bn(n,0,a),r=bn(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||gP(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Bc(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++)vP(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&vP(u,f,m),Object.keys(u).sort(hP).map(h=>+h)}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 ct(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=Li(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,yP(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(mP(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return cj(t.sort(hP))}}function Ed(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}=wa(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}=wa(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 Qce extends bP{static id="timeseries";static defaults=bP.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=Ed(n,this.min),this._tableRange=Ed(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(Ed(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Ed(this._table,r*this._tableRange+this._minPos,!0)}}const Wj="label";function xP(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function wle(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function zj(e,t){e.labels=t}function Vj(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Wj;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 _le(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Wj;const n={labels:[],datasets:[]};return zj(n,e.labels),Vj(n,e.datasets,t),n}function Sle(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),h=()=>{p.current&&(m.current=new Mn(p.current,{type:a,data:_le(s,o),options:l&&{...l},plugins:c}),xP(t,m.current))},g=()=>{xP(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&wle(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&zj(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&Vj(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(g(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>g()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const Ele=k.forwardRef(Sle);function Ox(e,t){return Mn.register(t),k.forwardRef((n,r)=>k.createElement(Ele,{...n,ref:r,type:e}))}const Px=Ox("line",Oae),pl=Ox("bar",_ae),Cx=Ox("doughnut",Eae);Mn.register(_x,jr,Vr);const Ole={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=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=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-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},Ple=({sold:e=847,unsold:t=73,growthPct:n="+9.1%"})=>{const r=e+t,i={labels:["Sold","Unsold"],datasets:[{data:[e,t],backgroundColor:["#12B981","#EF4444"],borderWidth:2,hoverOffset:4}]},o={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:a=>`${a.label}: ${a.parsed}`},displayColors:!1},centerText:{top:`${r}`,bottom:"Total Units",topSize:20,bottomSize:10}}};return b.jsx(Ne,{title:"Unit Status",period:"This Month",icon:b.jsx(zy,{className:"h-6 w-6 text-green-600"}),className:"h-[238px]",children:b.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5 space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Sold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#1FA05B]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Unsold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#EF4444]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-[8px] items-center ",children:[n," ",b.jsx("div",{className:"text-[#64748B] text-[10px]",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[158px] w-[158px] ml-auto mr-2",children:b.jsx(Cx,{data:i,options:o,plugins:[Ole]})})})]})})},wP=({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 b.jsxs("div",{className:"flex flex-col items-start",children:[b.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:b.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),b.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),b.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},_P=({title:e,value:t,suffix:n,valueClass:r=""})=>b.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),b.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&b.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),Cle=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return b.jsxs("div",{children:[b.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[b.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[b.jsx(Hy,{className:"h-6 w-6 text-[#329DFF]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),b.jsxs("div",{className:"flex items-center justify-between gap-",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),b.jsxs("div",{className:"flex items-end",children:[b.jsx(wP,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),b.jsx(wP,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),b.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[b.jsx(_P,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),b.jsx(_P,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Mn.register(_x,jr,Vr);const kle={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=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=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-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},Dle=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return b.jsx(Ne,{title:"Resident Overview",icon:b.jsx(ok,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:b.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",b.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:b.jsx(Cx,{data:a,options:s,plugins:[kle]})})})]})})};Mn.register(lo,co,fl,jr,Vr);const Tle=({blocks:e=[{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 t=e.map(s=>s.name),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},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 b.jsx(Ne,{title:"Block-wise Occupancy",period:b.jsx(An,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:b.jsx(pl,{data:o,options:a})})};Mn.register(lo,co,Ex,Sx,jr,Vr);const Ale=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}`},Mle=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:n,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>Ale(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},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 b.jsx(Ne,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:b.jsx(An,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:b.jsx(Px,{data:r,options:i})})};Mn.register(lo,co,Ex,Sx,jr,Vr);const Nle=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}`},Hj=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:n,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:o=>Nle(o[0].label),label:o=>`${o.dataset.label}: ${o.parsed.y}`}}},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 b.jsx(Px,{data:r,options:i})};function SP({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return b.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[b.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),b.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[b.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),b.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function jle(){return b.jsxs(Ne,{title:"Accounting",className:"w-full h-[523px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(SP,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),b.jsx(SP,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),b.jsx("div",{className:"h-[254px] mt-[35.5px]",children:b.jsx(Hj,{})})]})}Mn.register(lo,co,fl,jr,Vr);const Rle=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return b.jsx(Ne,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(pl,{data:r,options:i})})},Ile=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return b.jsxs(Ne,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[b.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),b.jsx("div",{className:"flex flex-col items-end",children:b.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),b.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),b.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};Mn.register(lo,co,fl,jr,Vr);const Lle=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return b.jsxs(Ne,{title:"Dues Ageing",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>b.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:b.jsxs("div",{className:"flex justify-between items-start",children:[b.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),b.jsxs("div",{className:"text-right",children:[b.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),b.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),b.jsx("div",{className:"h-[192px]",children:b.jsx(pl,{data:r,options:i})})]})};Mn.register(_x,jr,Vr);const Fle=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return b.jsxs(Ne,{title:"Expense Categories",className:"w-full h-[523px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[b.jsx(Cx,{data:n,options:i}),b.jsxs("div",{className:"absolute text-center",children:[b.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),b.jsx("div",{className:"space-y-2",children:e.map((o,a)=>b.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[b.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[b.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),b.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},Bl=[{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 $le(){const e=Bl.reduce((t,n)=>t+n.value,0);return b.jsx(Ne,{title:"Asset Value Breakdown",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:Bl,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Bl.map((t,n)=>b.jsx(Br,{fill:t.color},`cell-${n}`))}),b.jsx(bi,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),b.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[b.jsx("div",{className:"flex flex-col gap-[8px]",children:Bl.slice(0,3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),b.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:Bl.slice(3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}Mn.register(lo,co,fl,jr,Vr);const Ble=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return b.jsx(Ne,{title:"Revenue by Category",className:"w-full h-[362px]",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(pl,{data:r,options:i})})};function Wle(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function zle(e){return Fe({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)}function Vle({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(Ne,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-slate-500",children:r})]})]})}function Hle(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:ik,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:zle,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Wle,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:ak,iconColor:"text-[#DBB467]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>b.jsx(Vle,{...t},n))})}const Od=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function Yle(){const t=Od.find(n=>n.name==="Completed")?.value||0;return b.jsx(Ne,{title:"Guard Patrols",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:Od,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Od.map((n,r)=>b.jsx(Br,{fill:n.color},`cell-${r}`))}),b.jsx(bi,{formatter:n=>n.toLocaleString()})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),b.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),b.jsx("div",{className:"flex flex-col gap-[8px] mt-3 w-full px-6 text-[14px]",children:Od.map(n=>b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.color}}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.name})]}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:n.value})]},n.name))})]})})}Mn.register(lo,co,Ex,Sx,jr,Vr);const Ule=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},n={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:r=>r[0].label,label:r=>`${r.dataset.label} ${r.parsed.y}`}}},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 b.jsx(Ne,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:b.jsx(An,{className:"text-[20px] text-[#884EA7]"}),children:b.jsx(Px,{data:t,options:n})})};function Kle(){return b.jsx(Ne,{title:"Incident Reports",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[b.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),b.jsxs("div",{className:"mt-4 ",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:b.jsx("div",{className:"text-white !text-[12px] font-bold",children:"!"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000] bg-red-50",children:[b.jsx("div",{children:"4 - Danger"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:b.jsx(vw,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] bg-yellow-50",children:[b.jsx("div",{children:"3 - High"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:b.jsx(vw,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] bg-green-50",children:[b.jsx("div",{children:"1 - Low"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function qle(){return b.jsx(Ne,{title:"Staff Attendance",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center h-[76px] gap-[16px] mb-2",children:[b.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),b.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),b.jsxs("div",{className:"mt-[24px] ",children:[b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Security guards"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"12/12 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Housekeeping"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"7/8 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Maintenance"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"4/4 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Gardening"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"2/2 Present"})]})]})]})})}function Gle(e){return Fe({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 Xle({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(Ne,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-slate-500",children:r})]})]})}function Qle(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Hy,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:pre,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Gle,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:k3,iconColor:"text-[#36AB6C]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>b.jsx(Xle,{...t},n))})}const Zle=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],Jle=(e="")=>e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/<[^>]*>/g,"").trim();function ece({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:Jle(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):Zle;return b.jsx(Ne,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),b.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const tce=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},nce=[{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}],rce=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return b.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[b.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=tce(a);return b.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[b.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),b.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),b.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},ice=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return b.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[b.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),b.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},oce=({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:nce).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 b.jsxs(Ne,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[b.jsx(xi,{width:"100%",height:"85%",children:b.jsxs(qM,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[b.jsx(ol,{strokeDasharray:"0",vertical:!1}),b.jsx(al,{dataKey:"level"}),b.jsx($a,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),b.jsx(bi,{content:b.jsx(rce,{}),cursor:!1}),b.jsx(nc,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),b.jsx(nc,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),b.jsx(nc,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),b.jsx(ice,{})]})},ace=[{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 sce({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})):ace;return b.jsx(Ne,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),b.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function lce(e){return Fe({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 cce=["open_complaints","pending_requests","avg_response_time","resolution_rate"],uce={open_complaints:{title:"Open Complaints",Icon:ik,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:lce,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:L3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:N3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},dce=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>b.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),fce={primary:{size:28,lineHeight:32,weight:500}},pce={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 hce({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?b.jsx(EP,{id:e,data:t}):b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:cce.map(n=>b.jsx(EP,{id:n},n))})}function EP({id:e,data:t}){const n=uce[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=Kc,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:pce[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,b.jsx("div",{className:"h-[132px]",children:b.jsxs(Ne,{title:i,titleColor:a,icon:b.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:b.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[b.jsx(dce,{...fce.primary,children:c}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[b.jsx(Yy,{value:u}),b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function OP({title:e,date:t,rsvp:n,utilisation:r,status:i}){return b.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),b.jsx("div",{className:`!text-[12px] font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),b.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),b.jsxs("div",{className:"flex justify-between items-center mt-2",children:[b.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),b.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),b.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:b.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function mce(){return b.jsx(Ne,{title:"Events Utilisation",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{children:[b.jsx(OP,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),b.jsx(OP,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Pd({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return b.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[b.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),b.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function gce(){return b.jsx(Ne,{title:"Notice Board Status",period:b.jsx(An,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(Pd,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),b.jsx(Pd,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),b.jsx(Pd,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),b.jsx(Pd,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function Yj(e){return Fe({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function vce({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(Ne,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function yce({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Yj,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return b.jsx("div",{className:"h-full",children:t.map((n,r)=>b.jsx(vce,{...n},r))})}function bce(e){return Fe({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function xce({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=Kc,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(Ne,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),b.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function wce(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Yj,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:D3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:dre,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:bce,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>b.jsx(xce,{...t},n))})}const PP=({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 b.jsxs("div",{className:"flex flex-col items-start",children:[b.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:b.jsx("div",{className:`h-[11px] rounded-full ${n}`,style:{width:n==="bg-[#12B981]"?`${i+45}%`:`${i}%`}})}),b.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r})]})},_ce=({occupiedUnits:e=9e3,EmployeesCount:t=8910,AdminsCount:n=90})=>{const r=t+n;return b.jsx("div",{children:b.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[b.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[b.jsx(Hy,{className:"!text-[20px] text-[#329DFF]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview (Static Data)"})]}),b.jsxs("div",{className:"flex items-start justify-between",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),b.jsx("div",{className:"flex items-center gap-1",children:b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:e})})]}),b.jsxs("div",{className:"flex items-end",children:[b.jsx(PP,{value:t,total:r,colorClass:"bg-[#8B5CF6]",label:"Employees"}),b.jsx(PP,{value:n,total:r,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};Mn.register(lo,co,fl,jr);const Sce=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,max:2e3,ticks:{stepSize:500,color:"#64748B"},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return b.jsxs(Ne,{className:"w-full h-[238px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(A5,{className:"!text-[20px] text-[#8B5CF6]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Employee Footfall (Static Data)"})]}),period:b.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:[b.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),b.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),b.jsx("div",{className:"h-[97px]",children:b.jsx(pl,{data:t,options:n})})]})};function Ece(){return b.jsx(Ne,{className:"h-[324px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(T5,{className:"!text-[20px] text-[#FA7E28]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Food & Beverages (Static Data)"})]}),period:b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),b.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),b.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[b.jsx(nk,{}),8,"%",b.jsx("span",{children:"from last month"})]})]})]}),b.jsxs("div",{className:"space-y-5",children:[b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[b.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),b.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:"h-3 bg-blue-500 rounded-full",style:{width:"70%"}})})]}),b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[b.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),b.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:"h-3 bg-red-500 rounded-full",style:{width:"50%"}})})]}),b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[b.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),b.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:"h-3 bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Oce({data:e}){const t=e?.amenitySummary||{},r=(Array.isArray(e?.chartData)?e.chartData:[]).map(d=>({...d,isPaid:d?.isPaid==1})),i=r.length>0&&r.every(d=>d?.isPaid===!1),o=t?.totalBookings||0,a=r.reduce((d,f)=>{const p=f?.isPaid?f?.paid_bookings||f?.total_bookings||0:f?.unpaid_bookings||f?.total_bookings||0;return d+p},0),s=r.map(d=>{const f=d?.isPaid?d?.paid_bookings||d?.total_bookings||0:d?.unpaid_bookings||d?.total_bookings||0,p=d?.isPaid?`₹${d?.paid_revenue||"0.00"}`:"",m=a>0?Math.round(f/a*100):0;return{name:d?.facility_name||"Unknown",bookings:f,revenue:p,percentage:m,color:d?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:d?.isPaid}}),l=t?.growth_percentage;let c=null;if(typeof l=="number")c=l;else if(typeof l=="string"){const d=l.replace("%","").trim(),f=Number(d);c=isNaN(f)?null:f}const u=c!==null?c>=0:!0;return b.jsx(Ne,{className:"h-[324px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(C3,{className:"!text-[20px] text-[#884EA7]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Amenities"})]}),period:b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:o})]}),!i&&b.jsxs("div",{children:[b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),b.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹",t?.todayPaidRevenue??"0.00"]}),c!==null&&b.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${u?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[u?b.jsx(nk,{}):b.jsx(O3,{}),c,"%",b.jsx("span",{children:"from last month"})]})]})]}),b.jsx("div",{className:"space-y-5",children:s.length>0?s.map((d,f)=>b.jsxs("div",{children:[b.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[b.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:d?.name}),b.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[b.jsxs("div",{className:"text-[#64748B] inline",children:[d?.bookings," ",d?.bookings<=1?"booking":"bookings"]}),d?.isPaid&&b.jsx("div",{className:"mx-2 text-[#121212] inline",children:d?.revenue})]})]}),b.jsx("div",{className:"h-3 bg-gray-100 rounded-full",children:b.jsx("div",{className:`h-3 rounded-full ${d?.color}`,style:{width:`${d?.percentage}%`}})})]},f)):b.jsx("div",{className:"flex items-center justify-center h-[120px]",children:b.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}Mn.register(lo,co,fl,jr,Vr);function Pce({data:e=[]}){const t=[{level:"L1",open_count:55,in_progress_count:22,on_hold:15,closed_count:6},{level:"L2",open_count:45,in_progress_count:25,on_hold:18,closed_count:5},{level:"L3",open_count:58,in_progress_count:23,on_hold:14,closed_count:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[],l=[];for(let d=0;d<n.length;d++)r.push(n[d].level),i.push(Number(n[d].open_count)),o.push(Number(n[d].in_progress_count)),a.push(Number(n[d].on_hold)),s.push(Number(n[d].closed_count)),l.push(Number(n[d].cancelled));const c={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:"Closed",data:s,backgroundColor:"#10B981",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:l,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},u={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,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:d=>Math.round(d)}}}};return b.jsx(Ne,{className:"h-[267px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(j3,{className:"!text-[20px] text-[#3C81F6]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Ticket Escalation Levels"})]}),period:b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsx("div",{className:"h-full",children:b.jsx(pl,{data:c,options:u})})})}const Cce=({active:e,payload:t})=>!e||!t||!t.length?null:b.jsxs("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:[b.jsx("div",{className:"font-medium",children:t[0].name}),b.jsx("div",{children:t[0].value})]});function kce({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 b.jsx(Ne,{className:"h-[267px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(rv,{className:"!text-[20px] text-[#EF4444]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Ticket Status"})]}),period:b.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Today"}),children:b.jsxs("div",{className:"flex h-full items-center gap-4",children:[b.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(bu,{children:[b.jsx(il,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>b.jsx(Br,{fill:a.color},s))}),b.jsx(bi,{content:b.jsx(Cce,{}),wrapperStyle:{zIndex:1e3}})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[b.jsx("div",{children:r(n.completed)}),b.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),b.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),b.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>b.jsxs("div",{className:"flex items-center justify-between text-sm",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),b.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),b.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}},chartData:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function kP({title:e,color:t,rows:n=[],children:r}){const i=b.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[b.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[b.jsx(Mp,{className:`text-[20px] ${t}`}),b.jsx("div",{children:e??""})]}),b.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>b.jsxs("div",{className:"flex justify-between text-[14px]",children:[b.jsx("div",{children:o??""}),b.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return b.jsx(ej,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function Dce({data:e}){const t=e&&Object.keys(e).length?e:CP,n=t?.visitorSummary??{},r={walkins:{currently_inside:Number(t?.walkinsPopupData?.walkinsInside??0),total_visited_today:Number(t?.walkinsPopupData?.totalWalkins??0)},preApproved:{completed_visits:Number(t?.preApprovedPopupData?.preApprovedCheckIns??0),total_expected_today:Number(t?.preApprovedPopupData?.totalPreApprovedCheckIns??0)}},i=k.useMemo(()=>{const a=t?.chartData??[];if(!a.length)return CP.chartData;const s=[];for(let l=0;l<a.length;l++)s.push({time:a[l]?.hour??"-",walkins:a[l]?.walkins??0,approved:a[l]?.preApproved??0});return s},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return b.jsx(Ne,{className:"h-[377px]",title:b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(Mp,{className:"!text-[20px] text-[#8B5CF6]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Visitor Updates"})]}),period:b.jsx("div",{className:"flex items-center gap-1 text-[12px] text-[#64748B]",children:b.jsxs("div",{children:["Today at ",o]})}),children:b.jsxs("div",{className:"flex flex-col mt-2",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),b.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),b.jsxs("div",{children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),b.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),b.jsxs("div",{className:"mt-2",children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),b.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[b.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),b.jsx(kP,{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:b.jsxs("div",{className:"text-gray-400 cursor-pointer ml-1 leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),b.jsxs("div",{className:"mt-2",children:[b.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),b.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[b.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),b.jsx(kP,{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:b.jsxs("div",{className:"text-gray-400 cursor-pointer ml-1 leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),b.jsx("div",{className:"w-full h-[179px]",children:b.jsx(xi,{width:"100%",height:"100%",children:b.jsxs(B0,{data:i??[],children:[b.jsx(ol,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),b.jsx(al,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),b.jsx($a,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),b.jsx(bi,{}),b.jsx(Co,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),b.jsx(Co,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}exports.Accounting=jle;exports.Amenities=Oce;exports.AssetValueBreakdown=$le;exports.BlockWiseOccupancy=Tle;exports.Budgets=Rle;exports.Card=Ne;exports.CashBankBalance=Ile;exports.CommercialOccupancy=_ce;exports.Community=hre;exports.Complaints=ece;exports.ComplaintsByLevel=oce;exports.DuesAgeing=Lle;exports.EmployeeFootfall=Sce;exports.Engagement=mre;exports.EngagementStatsGrid=wce;exports.EventsUtilisation=mce;exports.ExpenseCategories=Fle;exports.Facilities=gre;exports.FinanceSummary=vre;exports.FoodBeverages=Ece;exports.GateAndSecurityStatsGrid=Qle;exports.GateUpdates=nie;exports.GuardPatrols=Yle;exports.Header=v3;exports.Helpdesk=rie;exports.HelpdeskStatsGrid=hce;exports.HourlyTrafficFlow=Ule;exports.IncidentReports=Kle;exports.IncomeExpenditure=Hj;exports.MainHeader=M3;exports.MoveInOutTrends=Mle;exports.NoticeBoardStatus=gce;exports.OccupancyOverview=Cle;exports.RequestBox=sce;exports.ResidentOverview=Dle;exports.RevenuebyCategory=Ble;exports.SingleStats=yce;exports.StaffAttendance=qle;exports.StatsGrid=Hle;exports.TicketEscalation=Pce;exports.TicketStatus=kce;exports.UnitStatus=Ple;exports.VisitorUpdates=Dce;