. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AnonSec Shell
AnonSec Shell
Server IP : 87.98.249.37  /  Your IP : 216.73.216.208   [ Reverse IP ]
Web Server : Microsoft-IIS/10.0
System : Windows NT NS3076740 10.0 build 17763 (Windows Server 2019) AMD64
User : IWPD_292(growel19p) ( 0)
PHP Version : 8.3.12
Disable Function : NONE
Domains : 0 Domains
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Inetpub/vhosts/growel.com/httpdocs/blog/wp-content/plugins/firebox/media/admin/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : C:/Inetpub/vhosts/growel.com/httpdocs/blog/wp-content/plugins/firebox/media/admin/js/dashboard.js
/*! For license information please see dashboard.js.LICENSE.txt */
(()=>{var e={386:function(e,t,n){var r,a,i;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}i=function(){"use strict";var e=6e4,t=36e5,n="millisecond",r="second",a="minute",i="hour",s="day",l="week",c="month",u="quarter",f="year",d="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(a,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,c),i=n-a<0,o=t.clone().add(r+(i?-1:1),c);return+(-(r+(n-a)/(i?a-o:o-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:f,w:l,d:s,D:d,h:i,m:a,s:r,ms:n,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",x={};x[b]=m;var _="$isDayjsObject",w=function(e){return e instanceof O||!(!e||!e[_])},k=function e(t,n,r){var a;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();x[i]&&(a=i),n&&(x[i]=n,a=i);var o=t.split("-");if(!a&&o.length>1)return e(o[0])}else{var s=t.name;x[s]=t,a=s}return!r&&a&&(b=a),a||!r&&b},S=function(e,t){if(w(e))return e.clone();var n="object"==o(t)?t:{};return n.date=e,n.args=arguments,new O(n)},C=g;C.l=k,C.i=w,C.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function o(e){this.$L=k(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[_]=!0}var m=o.prototype;return m.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(C.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(p);if(r){var a=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},m.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},m.$utils=function(){return C},m.isValid=function(){return!(this.$d.toString()===h)},m.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},m.isAfter=function(e,t){return S(e)<this.startOf(t)},m.isBefore=function(e,t){return this.endOf(t)<S(e)},m.$g=function(e,t,n){return C.u(e)?this[t]:this.set(n,e)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(e,t){var n=this,o=!!C.u(t)||t,u=C.p(e),h=function(e,t){var r=C.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return o?r:r.endOf(s)},p=function(e,t){return C.w(n.toDate()[e].apply(n.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,m=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case f:return o?h(1,0):h(31,11);case c:return o?h(1,m):h(0,m+1);case l:var b=this.$locale().weekStart||0,x=(v<b?v+7:v)-b;return h(o?y-x:y+(6-x),m);case s:case d:return p(g+"Hours",0);case i:return p(g+"Minutes",1);case a:return p(g+"Seconds",2);case r:return p(g+"Milliseconds",3);default:return this.clone()}},m.endOf=function(e){return this.startOf(e,!1)},m.$set=function(e,t){var o,l=C.p(e),u="set"+(this.$u?"UTC":""),h=(o={},o[s]=u+"Date",o[d]=u+"Date",o[c]=u+"Month",o[f]=u+"FullYear",o[i]=u+"Hours",o[a]=u+"Minutes",o[r]=u+"Seconds",o[n]=u+"Milliseconds",o)[l],p=l===s?this.$D+(t-this.$W):t;if(l===c||l===f){var v=this.clone().set(d,1);v.$d[h](p),v.init(),this.$d=v.set(d,Math.min(this.$D,v.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},m.set=function(e,t){return this.clone().$set(e,t)},m.get=function(e){return this[C.p(e)]()},m.add=function(n,o){var u,d=this;n=Number(n);var h=C.p(o),p=function(e){var t=S(d);return C.w(t.date(t.date()+Math.round(e*n)),d)};if(h===c)return this.set(c,this.$M+n);if(h===f)return this.set(f,this.$y+n);if(h===s)return p(1);if(h===l)return p(7);var v=(u={},u[a]=e,u[i]=t,u[r]=1e3,u)[h]||1,m=this.$d.getTime()+n*v;return C.w(m,this)},m.subtract=function(e,t){return this.add(-1*e,t)},m.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=C.z(this),i=this.$H,o=this.$m,s=this.$M,l=n.weekdays,c=n.months,u=n.meridiem,f=function(e,n,a,i){return e&&(e[n]||e(t,r))||a[n].slice(0,i)},d=function(e){return C.s(i%12||12,e,"0")},p=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(v,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return C.s(t.$y,4,"0");case"M":return s+1;case"MM":return C.s(s+1,2,"0");case"MMM":return f(n.monthsShort,s,c,3);case"MMMM":return f(c,s);case"D":return t.$D;case"DD":return C.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(n.weekdaysMin,t.$W,l,2);case"ddd":return f(n.weekdaysShort,t.$W,l,3);case"dddd":return l[t.$W];case"H":return String(i);case"HH":return C.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return p(i,o,!0);case"A":return p(i,o,!1);case"m":return String(o);case"mm":return C.s(o,2,"0");case"s":return String(t.$s);case"ss":return C.s(t.$s,2,"0");case"SSS":return C.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(n,o,d){var h,p=this,v=C.p(o),m=S(n),y=(m.utcOffset()-this.utcOffset())*e,g=this-m,b=function(){return C.m(p,m)};switch(v){case f:h=b()/12;break;case c:h=b();break;case u:h=b()/3;break;case l:h=(g-y)/6048e5;break;case s:h=(g-y)/864e5;break;case i:h=g/t;break;case a:h=g/e;break;case r:h=g/1e3;break;default:h=g}return d?h:C.a(h)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return x[this.$L]},m.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=k(e,t,!0);return r&&(n.$L=r),n},m.clone=function(){return C.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},o}(),D=O.prototype;return S.prototype=D,[["$ms",n],["$s",r],["$m",a],["$H",i],["$W",s],["$M",c],["$y",f],["$D",d]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,O,S),e.$i=!0),S},S.locale=k,S.isDayjs=w,S.unix=function(e){return S(1e3*e)},S.en=x[b],S.Ls=x,S.p={},S},"object"==o(t)?e.exports=i():void 0===(a="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=a)},828:function(e,t,n){var r,a,i;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}i=function(){"use strict";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}},"object"==o(t)?e.exports=i():void 0===(a="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=a)},932:function(e,t,n){var r,a,i;function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}i=function(){"use strict";return function(e,t){t.prototype.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)}}},"object"==o(t)?e.exports=i():void 0===(a="function"==typeof(r=i)?r.call(t,n,t,e):r)||(e.exports=a)},480:(e,t,n)=>{"use strict";var r=n(69),a={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||a}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var c=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var a=h(n);a&&a!==p&&e(t,a,r)}var o=u(n);f&&(o=o.concat(f(n)));for(var s=l(t),v=l(n),m=0;m<o.length;++m){var y=o[m];if(!(i[y]||r&&r[y]||v&&v[y]||s&&s[y])){var g=d(n,y);try{c(t,y,g)}catch(e){}}}}return t}},995:(e,t)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var r="function"==typeof Symbol&&Symbol.for,a=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,v=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,x=r?Symbol.for("react.responder"):60118,_=r?Symbol.for("react.scope"):60119;function w(e){if("object"===n(e)&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case f:case d:case o:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case h:case y:case m:case c:return e;default:return t}}case i:return t}}}function k(e){return w(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=a,t.ForwardRef=h,t.Fragment=o,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=l,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return k(e)||w(e)===f},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"===n(e)&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===y},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===l},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===s||e===p||e===v||"object"===n(e)&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===c||e.$$typeof===u||e.$$typeof===h||e.$$typeof===b||e.$$typeof===x||e.$$typeof===_||e.$$typeof===g)},t.typeOf=w},69:(e,t,n)=>{"use strict";e.exports=n(995)},769:(e,t,n)=>{"use strict";var r=n(533);t.s=r.createRoot,r.hydrateRoot},533:e=>{"use strict";e.exports=ReactDOM}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=React;var t=n.n(e),r=n(769),a=n(386),i=n.n(a),o=n(932),s=n.n(o),l=n(828),c=n.n(l),u=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),f=Math.abs,d=String.fromCharCode,h=Object.assign;function p(e){return e.trim()}function v(e,t,n){return e.replace(t,n)}function m(e,t){return e.indexOf(t)}function y(e,t){return 0|e.charCodeAt(t)}function g(e,t,n){return e.slice(t,n)}function b(e){return e.length}function x(e){return e.length}function _(e,t){return t.push(e),e}var w=1,k=1,S=0,C=0,O=0,D="";function A(e,t,n,r,a,i,o){return{value:e,root:t,parent:n,type:r,props:a,children:i,line:w,column:k,length:o,return:""}}function M(e,t){return h(A("",null,null,"",null,null,0),e,{length:-e.length},t)}function E(){return O=C>0?y(D,--C):0,k--,10===O&&(k=1,w--),O}function j(){return O=C<S?y(D,C++):0,k++,10===O&&(k=1,w++),O}function P(){return y(D,C)}function I(){return C}function L(e,t){return g(D,e,t)}function R(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 N(e){return w=k=1,S=b(D=e),C=0,[]}function T(e){return D="",e}function F(e){return p(L(C-1,H(91===e?e+2:40===e?e+1:e)))}function z(e){for(;(O=P())&&O<33;)j();return R(e)>2||R(O)>3?"":" "}function V(e,t){for(;--t&&j()&&!(O<48||O>102||O>57&&O<65||O>70&&O<97););return L(e,I()+(t<6&&32==P()&&32==j()))}function H(e){for(;j();)switch(O){case e:return C;case 34:case 39:34!==e&&39!==e&&H(O);break;case 40:41===e&&H(e);break;case 92:j()}return C}function W(e,t){for(;j()&&e+O!==57&&(e+O!==84||47!==P()););return"/*"+L(t,C-1)+"*"+d(47===e?e:j())}function $(e){for(;!R(P());)j();return L(e,C)}var B="-ms-",Y="-webkit-",U="comm",G="rule",Z="decl",K="@keyframes";function X(e,t){for(var n="",r=x(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function q(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Z:return e.return=e.return||e.value;case U:return"";case K:return e.return=e.value+"{"+X(e.children,r)+"}";case G:e.value=e.props.join(",")}return b(n=X(e.children,r))?e.return=e.value+"{"+n+"}":""}function J(e){return function(t){t.root||(t=t.return)&&e(t)}}function Q(e){return T(ee("",null,null,null,[""],e=N(e),0,[0],e))}function ee(e,t,n,r,a,i,o,s,l){for(var c=0,u=0,f=o,h=0,p=0,g=0,x=1,w=1,k=1,S=0,C="",O=a,D=i,A=r,M=C;w;)switch(g=S,S=j()){case 40:if(108!=g&&58==y(M,f-1)){-1!=m(M+=v(F(S),"&","&\f"),"&\f")&&(k=-1);break}case 34:case 39:case 91:M+=F(S);break;case 9:case 10:case 13:case 32:M+=z(g);break;case 92:M+=V(I()-1,7);continue;case 47:switch(P()){case 42:case 47:_(ne(W(j(),I()),t,n),l);break;default:M+="/"}break;case 123*x:s[c++]=b(M)*k;case 125*x:case 59:case 0:switch(S){case 0:case 125:w=0;case 59+u:-1==k&&(M=v(M,/\f/g,"")),p>0&&b(M)-f&&_(p>32?re(M+";",r,n,f-1):re(v(M," ","")+";",r,n,f-2),l);break;case 59:M+=";";default:if(_(A=te(M,t,n,c,u,a,s,C,O=[],D=[],f),i),123===S)if(0===u)ee(M,t,A,A,O,i,f,s,D);else switch(99===h&&110===y(M,3)?100:h){case 100:case 108:case 109:case 115:ee(e,A,A,r&&_(te(e,A,A,0,0,a,s,C,a,O=[],f),D),a,D,f,s,r?O:D);break;default:ee(M,A,A,A,[""],D,0,s,D)}}c=u=p=0,x=k=1,C=M="",f=o;break;case 58:f=1+b(M),p=g;default:if(x<1)if(123==S)--x;else if(125==S&&0==x++&&125==E())continue;switch(M+=d(S),S*x){case 38:k=u>0?1:(M+="\f",-1);break;case 44:s[c++]=(b(M)-1)*k,k=1;break;case 64:45===P()&&(M+=F(j())),h=P(),u=f=b(C=M+=$(I())),S++;break;case 45:45===g&&2==b(M)&&(x=0)}}return i}function te(e,t,n,r,a,i,o,s,l,c,u){for(var d=a-1,h=0===a?i:[""],m=x(h),y=0,b=0,_=0;y<r;++y)for(var w=0,k=g(e,d+1,d=f(b=o[y])),S=e;w<m;++w)(S=p(b>0?h[w]+" "+k:v(k,/&\f/g,h[w])))&&(l[_++]=S);return A(e,t,n,0===a?G:s,l,c,u)}function ne(e,t,n){return A(e,t,n,U,d(O),g(e,2,-2),0)}function re(e,t,n,r){return A(e,t,n,Z,g(e,0,r),g(e,r+1,-1),r)}var ae=function(e,t,n){for(var r=0,a=0;r=a,a=P(),38===r&&12===a&&(t[n]=1),!R(a);)j();return L(e,C)},ie=new WeakMap,oe=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ie.get(n))&&!r){ie.set(e,!0);for(var a=[],i=function(e,t){return T(function(e,t){var n=-1,r=44;do{switch(R(r)){case 0:38===r&&12===P()&&(t[n]=1),e[n]+=ae(C-1,t,n);break;case 2:e[n]+=F(r);break;case 4:if(44===r){e[++n]=58===P()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=d(r)}}while(r=j());return e}(N(e),t))}(t,a),o=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<o.length;c++,l++)e.props[l]=a[s]?i[s].replace(/&\f/g,o[c]):o[c]+" "+i[s]}}},se=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function le(e,t){switch(function(e,t){return 45^y(e,0)?(((t<<2^y(e,0))<<2^y(e,1))<<2^y(e,2))<<2^y(e,3):0}(e,t)){case 5103:return"-webkit-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 Y+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Y+e+"-moz-"+e+B+e+e;case 6828:case 4268:return Y+e+B+e+e;case 6165:return Y+e+B+"flex-"+e+e;case 5187:return Y+e+v(e,/(\w+).+(:[^]+)/,"-webkit-box-$1$2-ms-flex-$1$2")+e;case 5443:return Y+e+B+"flex-item-"+v(e,/flex-|-self/,"")+e;case 4675:return Y+e+B+"flex-line-pack"+v(e,/align-content|flex-|-self/,"")+e;case 5548:return Y+e+B+v(e,"shrink","negative")+e;case 5292:return Y+e+B+v(e,"basis","preferred-size")+e;case 6060:return"-webkit-box-"+v(e,"-grow","")+Y+e+B+v(e,"grow","positive")+e;case 4554:return Y+v(e,/([^-])(transform)/g,"$1-webkit-$2")+e;case 6187:return v(v(v(e,/(zoom-|grab)/,"-webkit-$1"),/(image-set)/,"-webkit-$1"),e,"")+e;case 5495:case 3959:return v(e,/(image-set\([^]*)/,"-webkit-$1$`$1");case 4968:return v(v(e,/(.+:)(flex-)?(.*)/,"-webkit-box-pack:$3-ms-flex-pack:$3"),/s.+-b[^;]+/,"justify")+Y+e+e;case 4095:case 3583:case 4068:case 2532:return v(e,/(.+)-inline(.+)/,"-webkit-$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(b(e)-1-t>6)switch(y(e,t+1)){case 109:if(45!==y(e,t+4))break;case 102:return v(e,/(.+:)(.+)-([^]+)/,"$1-webkit-$2-$3$1-moz-"+(108==y(e,t+3)?"$3":"$2-$3"))+e;case 115:return~m(e,"stretch")?le(v(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==y(e,t+1))break;case 6444:switch(y(e,b(e)-3-(~m(e,"!important")&&10))){case 107:return v(e,":",":-webkit-")+e;case 101:return v(e,/(.+:)([^;!]+)(;|!.+)?/,"$1-webkit-"+(45===y(e,14)?"inline-":"")+"box$3$1-webkit-$2$3$1-ms-$2box$3")+e}break;case 5936:switch(y(e,t+11)){case 114:return Y+e+B+v(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Y+e+B+v(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Y+e+B+v(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Y+e+B+e+e}return e}var ce=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Z:e.return=le(e.value,e.length);break;case K:return X([M(e,{value:v(e.value,"@","@-webkit-")})],r);case G:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return X([M(e,{props:[v(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return X([M(e,{props:[v(t,/:(plac\w+)/,":-webkit-input-$1")]}),M(e,{props:[v(t,/:(plac\w+)/,":-moz-$1")]}),M(e,{props:[v(t,/:(plac\w+)/,"-ms-input-$1")]})],r)}return""}))}}],ue=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,a,i=e.stylisPlugins||ce,o={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)o[t[n]]=!0;s.push(e)}));var l,c,f,d=[oe,se],h=[q,J((function(e){l.insert(e)}))],p=(c=d.concat(i,h),f=x(c),function(e,t,n,r){for(var a="",i=0;i<f;i++)a+=c[i](e,t,n,r)||"";return a});a=function(e,t,n,r){l=n,X(Q(e?e+"{"+t.styles+"}":t.styles),p),r&&(v.inserted[t.name]=!0)};var v={key:t,sheet:new u({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:a};return v.sheet.hydrate(s),v},fe={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,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};function de(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}var pe=/[A-Z]|^ms/g,ve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,me=function(e){return 45===e.charCodeAt(1)},ye=function(e){return null!=e&&"boolean"!=typeof e},ge=de((function(e){return me(e)?e:e.replace(pe,"-$&").toLowerCase()})),be=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ve,(function(e,t,n){return _e={name:t,styles:n,next:_e},t}))}return 1===fe[e]||me(e)||"number"!=typeof t||0===t?t:t+"px"};function xe(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(he(n)){case"boolean":return"";case"object":if(1===n.anim)return _e={name:n.name,styles:n.styles,next:_e},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)_e={name:r.name,styles:r.styles,next:_e},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=xe(e,t,n[a])+";";else for(var i in n){var o=n[i];if("object"!==he(o))null!=t&&void 0!==t[o]?r+=i+"{"+t[o]+"}":ye(o)&&(r+=ge(i)+":"+be(i,o)+";");else if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var s=xe(e,t,o);switch(i){case"animation":case"animationName":r+=ge(i)+":"+s+";";break;default:r+=i+"{"+s+"}"}}else for(var l=0;l<o.length;l++)ye(o[l])&&(r+=ge(i)+":"+be(i,o[l])+";")}return r}(e,t,n);case"function":if(void 0!==e){var a=_e,i=n(e);return _e=a,xe(e,t,i)}}if(null==t)return n;var o=t[n];return void 0!==o?o:n}var _e,we=/label:\s*([^\s;\n{]+)\s*(;|$)/g,ke=function(e,t,n){if(1===e.length&&"object"===he(e[0])&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,a="";_e=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,a+=xe(n,t,i)):a+=i[0];for(var o=1;o<e.length;o++)a+=xe(n,t,e[o]),r&&(a+=i[o]);we.lastIndex=0;for(var s,l="";null!==(s=we.exec(a));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,a=e.length;a>=4;++r,a-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(a){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(a)+l;return{name:c,styles:a,next:_e}};!!e.useInsertionEffect&&e.useInsertionEffect||e.useLayoutEffect,e.createContext("undefined"!=typeof HTMLElement?ue({key:"css"}):null).Provider;var Se=function(e,t,n){!function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var a=t;do{e.insert(t===a?"."+r:"",a,e.sheet,!0),a=a.next}while(void 0!==a)}};n(480);var Ce={dark:["#C1C2C5","#A6A7AB","#909296","#5c5f66","#373A40","#2C2E33","#25262b","#1A1B1E","#141517","#101113"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"],red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],violet:["#f3f0ff","#e5dbff","#d0bfff","#b197fc","#9775fa","#845ef7","#7950f2","#7048e8","#6741d9","#5f3dc4"],indigo:["#edf2ff","#dbe4ff","#bac8ff","#91a7ff","#748ffc","#5c7cfa","#4c6ef5","#4263eb","#3b5bdb","#364fc7"],blue:["#e7f5ff","#d0ebff","#a5d8ff","#74c0fc","#4dabf7","#339af0","#228be6","#1c7ed6","#1971c2","#1864ab"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],teal:["#e6fcf5","#c3fae8","#96f2d7","#63e6be","#38d9a9","#20c997","#12b886","#0ca678","#099268","#087f5b"],green:["#ebfbee","#d3f9d8","#b2f2bb","#8ce99a","#69db7c","#51cf66","#40c057","#37b24d","#2f9e44","#2b8a3e"],lime:["#f4fce3","#e9fac8","#d8f5a2","#c0eb75","#a9e34b","#94d82d","#82c91e","#74b816","#66a80f","#5c940d"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],orange:["#fff4e6","#ffe8cc","#ffd8a8","#ffc078","#ffa94d","#ff922b","#fd7e14","#f76707","#e8590c","#d9480f"]};function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ae=Object.defineProperty,Me=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,Pe=function(e,t,n){return t in e?Ae(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Ie=function(e,t){for(var n in t||(t={}))Ee.call(t,n)&&Pe(e,n,t[n]);if(Me){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return De(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?De(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(Me(t));try{for(a.s();!(r=a.n()).done;)n=r.value,je.call(t,n)&&Pe(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e};function Le(e){return function(t){return"number"==typeof e.primaryShade?e.primaryShade:e.primaryShade[t||e.colorScheme]}}function Re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Te(e){var t=Le(e);return function(n,r){var a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("string"==typeof n&&n.includes(".")){var o=n.split("."),s=Re(o,2),l=s[0],c=s[1],u=parseInt(c,10);if(l in e.colors&&u>=0&&u<10)return e.colors[l]["number"!=typeof r||i?u:r]}var f="number"==typeof r?r:t();return n in e.colors?e.colors[n][f]:a?e.colors[e.primaryColor][f]:n}}function Fe(e){for(var t="",n=1;n<e.length-1;n+=1)t+="".concat(e[n]," ").concat(n/(e.length-1)*100,"%, ");return"".concat(e[0]," 0%, ").concat(t).concat(e[e.length-1]," 100%")}function ze(e){var t=Te(e),n=Le(e);return function(r){var a={from:(null==r?void 0:r.from)||e.defaultGradient.from,to:(null==r?void 0:r.to)||e.defaultGradient.to,deg:(null==r?void 0:r.deg)||e.defaultGradient.deg};return"linear-gradient(".concat(a.deg,"deg, ").concat(t(a.from,n(),!1)," 0%, ").concat(t(a.to,n(),!1)," 100%)")}}function Ve(e){return function(t){if("number"==typeof t)return"".concat(t/16).concat(e);if("string"==typeof t){var n=t.replace("px","");if(!Number.isNaN(Number(n)))return"".concat(Number(n)/16).concat(e)}return t}}var He=Ve("rem"),We=Ve("em");function $e(e){var t=e.size,n=e.sizes,r=e.units;return t in n?n[t]:"number"==typeof t?"em"===r?We(t):He(t):t||n.md}function Be(e){return"number"==typeof e?e:"string"==typeof e&&e.includes("rem")?16*Number(e.replace("rem","")):"string"==typeof e&&e.includes("em")?16*Number(e.replace("em","")):Number(e)}function Ye(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ue(e){return function(e){return/^#?([0-9A-F]{3}){1,2}$/i.test(e)}(e)?function(e){var t=e.replace("#","");if(3===t.length){var n=t.split("");t=[n[0],n[0],n[1],n[1],n[2],n[2]].join("")}var r=parseInt(t,16);return{r:r>>16&255,g:r>>8&255,b:255&r,a:1}}(e):e.startsWith("rgb")?function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ye(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ye(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.replace(/[^0-9,.]/g,"").split(",").map(Number),4);return{r:t[0],g:t[1],b:t[2],a:t[3]||1}}(e):{r:0,g:0,b:0,a:1}}function Ge(e,t){if("string"!=typeof e||t>1||t<0)return"rgba(0, 0, 0, 1)";if(e.startsWith("var(--"))return e;var n=Ue(e),r=n.r,a=n.g,i=n.b;return"rgba(".concat(r,", ").concat(a,", ").concat(i,", ").concat(t,")")}function Ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ke={fontStyles:function(e){return function(){return{fontFamily:e.fontFamily||"sans-serif"}}},themeColor:Te,focusStyles:function(e){return function(t){var n;return Oe(n={WebkitTapHighlightColor:"transparent"},t||"&:focus",Ie({},"always"===e.focusRing||"auto"===e.focusRing?e.focusRingStyles.styles(e):e.focusRingStyles.resetStyles(e))),Oe(n,t?t.replace(":focus",":focus:not(:focus-visible)"):"&:focus:not(:focus-visible)",Ie({},"auto"===e.focusRing||"never"===e.focusRing?e.focusRingStyles.resetStyles(e):null)),n}},linearGradient:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"linear-gradient(".concat(e,"deg, ").concat(Fe(n),")")},radialGradient:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return"radial-gradient(circle, ".concat(Fe(t),")")},smallerThan:function(e){return function(t){return"@media (max-width: ".concat(We(Be($e({size:t,sizes:e.breakpoints}))-1),")")}},largerThan:function(e){return function(t){return"@media (min-width: ".concat(We(Be($e({size:t,sizes:e.breakpoints}))),")")}},rgba:Ge,cover:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return{position:"absolute",top:He(e),right:He(e),left:He(e),bottom:He(e)}},darken:function(e,t){if("string"==typeof e&&e.startsWith("var(--"))return e;var n=Ue(e),r=n.r,a=n.g,i=n.b,o=n.a,s=1-t,l=function(e){return Math.round(e*s)};return"rgba(".concat(l(r),", ").concat(l(a),", ").concat(l(i),", ").concat(o,")")},lighten:function(e,t){if("string"==typeof e&&e.startsWith("var(--"))return e;var n=Ue(e),r=n.r,a=n.g,i=n.b,o=n.a,s=function(e){return Math.round(e+(255-e)*t)};return"rgba(".concat(s(r),", ").concat(s(a),", ").concat(s(i),", ").concat(o,")")},radius:function(e){return function(t){if("number"==typeof t)return He(t);var n="number"==typeof e.defaultRadius?e.defaultRadius:e.radius[e.defaultRadius]||e.defaultRadius;return e.radius[t]||t||n}},variant:function(e){var t=Te(e),n=Le(e),r=ze(e);return function(a){var i=a.variant,o=a.color,s=a.gradient,l=a.primaryFallback,c=function(e,t){if("string"==typeof e&&e.includes(".")){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ze(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split("."),2),r=n[0],a=n[1],i=parseInt(a,10);if(r in t.colors&&i>=0&&i<10)return{isSplittedColor:!0,key:r,shade:i}}return{isSplittedColor:!1}}(o,e);switch(i){case"light":return{border:"transparent",background:Ge(t(o,"dark"===e.colorScheme?8:0,l,!1),"dark"===e.colorScheme?.2:1),color:"dark"===o?"dark"===e.colorScheme?e.colors.dark[0]:e.colors.dark[9]:t(o,"dark"===e.colorScheme?2:n("light")),hover:Ge(t(o,"dark"===e.colorScheme?7:1,l,!1),"dark"===e.colorScheme?.25:.65)};case"subtle":return{border:"transparent",background:"transparent",color:"dark"===o?"dark"===e.colorScheme?e.colors.dark[0]:e.colors.dark[9]:t(o,"dark"===e.colorScheme?2:n("light")),hover:Ge(t(o,"dark"===e.colorScheme?8:0,l,!1),"dark"===e.colorScheme?.2:1)};case"outline":return{border:t(o,"dark"===e.colorScheme?5:n("light")),background:"transparent",color:t(o,"dark"===e.colorScheme?5:n("light")),hover:"dark"===e.colorScheme?Ge(t(o,5,l,!1),.05):Ge(t(o,0,l,!1),.35)};case"default":return{border:"dark"===e.colorScheme?e.colors.dark[4]:e.colors.gray[4],background:"dark"===e.colorScheme?e.colors.dark[6]:e.white,color:"dark"===e.colorScheme?e.white:e.black,hover:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]};case"white":return{border:"transparent",background:e.white,color:t(o,n()),hover:null};case"transparent":return{border:"transparent",color:"dark"===o?"dark"===e.colorScheme?e.colors.dark[0]:e.colors.dark[9]:t(o,"dark"===e.colorScheme?2:n("light")),background:"transparent",hover:null};case"gradient":return{background:r(s),color:e.white,border:"transparent",hover:null};default:var u=n(),f=c.isSplittedColor?c.shade:u,d=c.isSplittedColor?c.key:o;return{border:"transparent",background:t(d,f,l),color:e.white,hover:t(d,9===f?8:f+1)}}}},primaryShade:Le,hover:function(e){return{"@media (hover: hover)":{"&:hover":e},"@media (hover: none)":{"&:active":e}}},gradient:ze,primaryColor:function(e){return function(t){var n=Le(e)(t);return e.colors[e.primaryColor][n]}},placeholderStyles:function(e){return function(){return{userSelect:"none",color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[5]}}},dimmed:function(e){return function(){return"dark"===e.colorScheme?e.colors.dark[2]:e.colors.gray[6]}}};function Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var qe=Object.defineProperty,Je=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,nt=Object.prototype.propertyIsEnumerable,rt=function(e,t,n){return t in e?qe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};function at(e){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},at(e)}Object.keys(Ce);var it,ot,st,lt=(ot=function(e,t){for(var n in t||(t={}))tt.call(t,n)&&rt(e,n,t[n]);if(et){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Xe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(et(t));try{for(a.s();!(r=a.n()).done;)n=r.value,nt.call(t,n)&&rt(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({},it={dir:"ltr",primaryShade:{light:6,dark:8},focusRing:"auto",loader:"oval",colorScheme:"light",white:"#fff",black:"#000",defaultRadius:"sm",transitionTimingFunction:"ease",colors:Ce,lineHeight:1.55,fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontFamilyMonospace:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",primaryColor:"blue",respectReducedMotion:!0,cursorType:"default",defaultGradient:{from:"indigo",to:"cyan",deg:45},shadows:{xs:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",sm:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",md:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",lg:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",xl:"0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"},fontSizes:{xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem"},radius:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"1rem",xl:"2rem"},spacing:{xs:"0.625rem",sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},breakpoints:{xs:"36em",sm:"48em",md:"62em",lg:"75em",xl:"88em"},headings:{fontFamily:"-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",fontWeight:700,sizes:{h1:{fontSize:"2.125rem",lineHeight:1.3,fontWeight:void 0},h2:{fontSize:"1.625rem",lineHeight:1.35,fontWeight:void 0},h3:{fontSize:"1.375rem",lineHeight:1.4,fontWeight:void 0},h4:{fontSize:"1.125rem",lineHeight:1.45,fontWeight:void 0},h5:{fontSize:"1rem",lineHeight:1.5,fontWeight:void 0},h6:{fontSize:"0.875rem",lineHeight:1.5,fontWeight:void 0}}},other:{},components:{},activeStyles:{transform:"translateY(0.0625rem)"},datesLocale:"en",globalStyles:void 0,focusRingStyles:{styles:function(e){return{outlineOffset:"0.125rem",outline:"0.125rem solid ".concat(e.colors[e.primaryColor]["dark"===e.colorScheme?7:5])}},resetStyles:function(){return{outline:"none"}},inputStyles:function(e){return{outline:"none",borderColor:e.colors[e.primaryColor]["object"===at(e.primaryShade)?e.primaryShade[e.colorScheme]:e.primaryShade]}}}}),st={fn:{fontStyles:Ke.fontStyles(it),themeColor:Ke.themeColor(it),focusStyles:Ke.focusStyles(it),largerThan:Ke.largerThan(it),smallerThan:Ke.smallerThan(it),radialGradient:Ke.radialGradient,linearGradient:Ke.linearGradient,gradient:Ke.gradient(it),rgba:Ke.rgba,cover:Ke.cover,lighten:Ke.lighten,darken:Ke.darken,primaryShade:Ke.primaryShade(it),radius:Ke.radius(it),variant:Ke.variant(it),hover:Ke.hover,primaryColor:Ke.primaryColor(it),placeholderStyles:Ke.placeholderStyles(it),dimmed:Ke.dimmed(it)}},Je(ot,Qe(st)));function ct(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,"".concat(He(1)," dotted ButtonText");var ft=Object.defineProperty,dt=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,vt=function(e,t,n){return t in e?ft(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},mt=function(e,t){for(var n in t||(t={}))ht.call(t,n)&&vt(e,n,t[n]);if(dt){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ut(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ut(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(dt(t));try{for(a.s();!(r=a.n()).done;)n=r.value,pt.call(t,n)&&vt(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},yt=(0,e.createContext)({theme:lt});function gt(){var t;return(null==(t=(0,e.useContext)(yt))?void 0:t.theme)||lt}function bt(){var t;return null==(t=(0,e.useContext)(yt))?void 0:t.emotionCache}function xt(e,t,n){var r,a=gt(),i=null==(r=a.components[e])?void 0:r.defaultProps,o="function"==typeof i?i(a):i;return mt(mt(mt({},t),o),ct(n))}function _t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wt(t){var n=t.value,r=t.defaultValue,a=t.finalValue,i=t.onChange,o=void 0===i?function(){}:i,s=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return _t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_t(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)(void 0!==r?r:a),2),l=s[0],c=s[1];return void 0!==n?[n,o,!0]:[l,function(e){c(e),null==o||o(e)},!1]}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var St=function(e){return"range"===e?[null,null]:"multiple"===e?[]:null};function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ot(e,t){var n=function(e){return function(e){if(Array.isArray(e))return Ct(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t).sort((function(e,t){return e.getTime()-t.getTime()}));return i()(n[0]).startOf("day").subtract(1,"ms").isBefore(e)&&i()(n[1]).endOf("day").add(1,"ms").isAfter(e)}function Dt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||At(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function At(e,t){if(e){if("string"==typeof e)return Mt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mt(e,t):void 0}}function Mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Et(t){var n=t.type,r=t.level,a=t.value,o=t.defaultValue,s=t.onChange,l=t.allowSingleDateInRange,c=t.allowDeselect,u=t.onMouseLeave,f=function(t){var n=t.type,r=t.value,a=t.defaultValue,i=t.onChange,o=(0,e.useRef)(n),s=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(wt({value:r,defaultValue:a,onChange:i,finalValue:St(n)}),2),l=s[0],c=s[1],u=l;return o.current!==n&&(o.current=n,void 0===r&&c(u=void 0!==a?a:St(n))),[u,c]}({type:n,value:a,defaultValue:o,onChange:s}),d=Dt(f,2),h=d[0],p=d[1],v=Dt((0,e.useState)("range"===n&&h[0]&&!h[1]?h[0]:null),2),m=v[0],y=v[1],g=Dt((0,e.useState)(null),2),b=g[0],x=g[1],_=function(e){return m instanceof Date&&b instanceof Date?Ot(e,[b,m]):h[0]instanceof Date&&h[1]instanceof Date&&Ot(e,h)},w=function(e){return h[0]instanceof Date&&!!i()(e).isSame(h[0],r)&&!(b&&i()(b).isBefore(h[0]))},k=function(e){return h[1]instanceof Date?i()(e).isSame(h[1],r):!!(h[0]instanceof Date&&b)&&i()(b).isBefore(h[0])&&i()(e).isSame(h[0],r)};return{onDateChange:function(e){if("range"===n){if(m instanceof Date&&!h[1]){if(i()(e).isSame(m,r)&&!l)return y(null),x(null),void p([null,null]);var t=[e,m];return t.sort((function(e,t){return e.getTime()-t.getTime()})),p(t),x(null),void y(null)}return h[0]&&!h[1]&&i()(e).isSame(h[0],r)&&!l?(y(null),x(null),void p([null,null])):(p([e,null]),x(null),void y(e))}"multiple"!==n?h&&c&&i()(e).isSame(h,r)?p(null):p(e):h.some((function(t){return i()(t).isSame(e,r)}))?p(h.filter((function(t){return!i()(t).isSame(e,r)}))):p([].concat(function(e){return function(e){if(Array.isArray(e))return Mt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||At(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(h),[e]))},onRootMouseLeave:"range"===n?function(e){null==u||u(e),x(null)}:u,onHoveredDateChange:"range"===n&&m?x:function(){},getControlProps:function(e){if("range"===n)return{selected:h.some((function(t){return t&&i()(t).isSame(e,r)})),inRange:_(e),firstInRange:w(e),lastInRange:k(e),"data-autofocus":!!h[0]&&i()(h[0]).isSame(e,r)||void 0};if("multiple"===n)return{selected:h.some((function(t){return t&&i()(t).isSame(e,r)})),"data-autofocus":!!h[0]&&i()(h[0]).isSame(e,r)||void 0};var t=i()(h).isSame(e,r);return{selected:t,"data-autofocus":t||void 0}},_value:h,setValue:p}}function jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Pt=Object.getOwnPropertySymbols,It=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable;function Rt(e){var t=e,n=t.m,r=t.mx,a=t.my,i=t.mt,o=t.mb,s=t.ml,l=t.mr,c=t.p,u=t.px,f=t.py,d=t.pt,h=t.pb,p=t.pl,v=t.pr,m=t.bg,y=t.c,g=t.opacity,b=t.ff,x=t.fz,_=t.fw,w=t.lts,k=t.ta,S=t.lh,C=t.fs,O=t.tt,D=t.td,A=t.w,M=t.miw,E=t.maw,j=t.h,P=t.mih,I=t.mah,L=t.bgsz,R=t.bgp,N=t.bgr,T=t.bga,F=t.pos,z=t.top,V=t.left,H=t.bottom,W=t.right,$=t.inset,B=t.display,Y=function(e,t){var n={};for(var r in e)It.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Pt){var a,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return jt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(Pt(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&Lt.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(t,["m","mx","my","mt","mb","ml","mr","p","px","py","pt","pb","pl","pr","bg","c","opacity","ff","fz","fw","lts","ta","lh","fs","tt","td","w","miw","maw","h","mih","mah","bgsz","bgp","bgr","bga","pos","top","left","bottom","right","inset","display"]);return{systemStyles:ct({m:n,mx:r,my:a,mt:i,mb:o,ml:s,mr:l,p:c,px:u,py:f,pt:d,pb:h,pl:p,pr:v,bg:m,c:y,opacity:g,ff:b,fz:x,fw:_,lts:w,ta:k,lh:S,fs:C,tt:O,td:D,w:A,miw:M,maw:E,h:j,mih:P,mah:I,bgsz:L,bgp:R,bgr:N,bga:T,pos:F,top:z,left:V,bottom:H,right:W,inset:$,display:B}),rest:Y}}function Nt(e){return Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nt(e)}function Tt(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"===Nt(e))if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Tt(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Ft(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Tt(e))&&(r&&(r+=" "),r+=t);return r}function zt(e){return function(e){if(Array.isArray(e))return Vt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ht=ue({key:"mantine",prepend:!0});function Wt(e,t){if(e){if("string"==typeof e)return $t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$t(e,t):void 0}}function $t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Bt=Object.defineProperty,Yt=Object.getOwnPropertySymbols,Ut=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,Zt=function(e,t,n){return t in e?Bt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};function Kt(e){var t;if(1!==e.length)return{args:e,ref:t};var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||Wt(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,1)[0];if(!(n instanceof Object))return{args:e,ref:t};if(!("ref"in n))return{args:e,ref:t};t=n.ref;var r=function(e,t){for(var n in t||(t={}))Ut.call(t,n)&&Zt(e,n,t[n]);if(Yt){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Wt(e))){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(Yt(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Gt.call(t,n)&&Zt(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({},n);return delete r.ref,{args:[r],ref:t}}var Xt=function(){function e(e,t,n){var r=[],a=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(e,r,n);return r.length<2?n:a+t(r)}return{cssFactory:function(t){var n=t.cache,r=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var a=Kt(t),i=a.ref,o=a.args,s=ke(o,n.registered);return Se(n,s,!1),"".concat(n.key,"-").concat(s.name).concat(void 0===i?"":" ".concat(i))};return{css:r,cx:function(){for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];return e(n.registered,r,Ft(a))}}}}}().cssFactory;function qt(){var t,n,r,a=bt()||Ht;return t=function(){return Xt({cache:a})},n=[a],(!(r=(0,e.useRef)()).current||n.length!==r.current.prevDeps.length||r.current.prevDeps.map((function(e,t){return e===n[t]})).indexOf(!1)>=0)&&(r.current={v:t(),prevDeps:zt(n)}),r.current.v}function Jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qt(e){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qt(e)}function en(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tn(e){var t=e.value,n=e.theme,r=e.getValue,a=e.property;if(null!=t){if("object"===Qt(t)){var i=function(e,t){var n=Object.keys(e).filter((function(e){return"base"!==e})).sort((function(e,n){return Be($e({size:e,sizes:t.breakpoints}))-Be($e({size:n,sizes:t.breakpoints}))}));return"base"in e?["base"].concat(function(e){return function(e){if(Array.isArray(e))return en(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return en(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?en(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(n)):n}(t,n).reduce((function(e,i){if("base"===i&&void 0!==t.base){var o=r(t.base,n);return Array.isArray(a)?(a.forEach((function(t){e[t]=o})),e):(e[a]=o,e)}var s=r(t[i],n);return Array.isArray(a)?(e[n.fn.largerThan(i)]={},a.forEach((function(t){e[n.fn.largerThan(i)][t]=s})),e):(e[n.fn.largerThan(i)]=Jt({},a,s),e)}),{});return i}var o=r(t,n);return Array.isArray(a)?a.reduce((function(e,t){return e[t]=o,e}),{}):Jt({},a,o)}}var nn=["-xs","-sm","-md","-lg","-xl"],rn={identity:function(e){return e},color:function(e,t){return"dimmed"===e?"dark"===t.colorScheme?t.colors.dark[2]:t.colors.gray[6]:t.fn.variant({variant:"filled",color:e,primaryFallback:!1}).background},size:function(e){return He(e)},fontSize:function(e,t){return $e({size:e,sizes:t.fontSizes})},spacing:function(e,t){return nn.includes(e)?"calc(".concat($e({size:e.replace("-",""),sizes:t.spacing})," * -1)"):$e({size:e,sizes:t.spacing})}},an={m:{type:"spacing",property:"margin"},mt:{type:"spacing",property:"marginTop"},mb:{type:"spacing",property:"marginBottom"},ml:{type:"spacing",property:"marginLeft"},mr:{type:"spacing",property:"marginRight"},mx:{type:"spacing",property:["marginRight","marginLeft"]},my:{type:"spacing",property:["marginTop","marginBottom"]},p:{type:"spacing",property:"padding"},pt:{type:"spacing",property:"paddingTop"},pb:{type:"spacing",property:"paddingBottom"},pl:{type:"spacing",property:"paddingLeft"},pr:{type:"spacing",property:"paddingRight"},px:{type:"spacing",property:["paddingRight","paddingLeft"]},py:{type:"spacing",property:["paddingTop","paddingBottom"]},bg:{type:"color",property:"background"},c:{type:"color",property:"color"},opacity:{type:"identity",property:"opacity"},ff:{type:"identity",property:"fontFamily"},fz:{type:"fontSize",property:"fontSize"},fw:{type:"identity",property:"fontWeight"},lts:{type:"size",property:"letterSpacing"},ta:{type:"identity",property:"textAlign"},lh:{type:"identity",property:"lineHeight"},fs:{type:"identity",property:"fontStyle"},tt:{type:"identity",property:"textTransform"},td:{type:"identity",property:"textDecoration"},w:{type:"spacing",property:"width"},miw:{type:"spacing",property:"minWidth"},maw:{type:"spacing",property:"maxWidth"},h:{type:"spacing",property:"height"},mih:{type:"spacing",property:"minHeight"},mah:{type:"spacing",property:"maxHeight"},bgsz:{type:"size",property:"backgroundSize"},bgp:{type:"identity",property:"backgroundPosition"},bgr:{type:"identity",property:"backgroundRepeat"},bga:{type:"identity",property:"backgroundAttachment"},pos:{type:"identity",property:"position"},top:{type:"identity",property:"top"},left:{type:"size",property:"left"},bottom:{type:"size",property:"bottom"},right:{type:"size",property:"right"},inset:{type:"size",property:"inset"},display:{type:"identity",property:"display"}};function on(e){return on="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},on(e)}function sn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ln=Object.defineProperty,cn=Object.getOwnPropertySymbols,un=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,dn=function(e,t,n){return t in e?ln(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},hn=function(e,t){for(var n in t||(t={}))un.call(t,n)&&dn(e,n,t[n]);if(cn){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return sn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?sn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(cn(t));try{for(a.s();!(r=a.n()).done;)n=r.value,fn.call(t,n)&&dn(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e};function pn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:an,r=Object.keys(n).reduce((function(r,a){return a in e&&void 0!==e[a]&&r.push(tn({value:e[a],getValue:rn[n[a].type],property:n[a].property,theme:t})),r}),[]);return r.reduce((function(e,t){return Object.keys(t).forEach((function(n){"object"===on(t[n])&&null!==t[n]?e[n]=n in e?hn(hn({},e[n]),t[n]):t[n]:e[n]=t[n]})),e}),{})}function vn(e,t){return"function"==typeof e?e(t):e}function mn(e,t,n){var r=gt(),a=qt(),i=a.css,o=a.cx;return Array.isArray(e)?o(n,i(pn(t,r)),e.map((function(e){return i(vn(e,r))}))):o(n,i(vn(e,r)),i(pn(t,r)))}function yn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bn=Object.defineProperty,xn=Object.getOwnPropertySymbols,_n=Object.prototype.hasOwnProperty,wn=Object.prototype.propertyIsEnumerable,kn=function(e,t,n){return t in e?bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Sn=(0,e.forwardRef)((function(e,n){var r=e,a=r.className,i=r.component,o=r.style,s=r.sx,l=Rt(function(e,t){var n={};for(var r in e)_n.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&xn){var a,i=yn(xn(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&wn.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["className","component","style","sx"])),c=l.systemStyles,u=l.rest,f=i||"div";return t().createElement(f,function(e,t){for(var n in t||(t={}))_n.call(t,n)&&kn(e,n,t[n]);if(xn){var r,a=yn(xn(t));try{for(a.s();!(r=a.n()).done;)n=r.value,wn.call(t,n)&&kn(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({ref:n,className:mn(s,c,a),style:o},u))}));Sn.displayName="@mantine/core/Box";var Cn=Sn;function On(e,t){return e?"month"===e?0:"year"===e?1:2:t}function Dn(e,t,n){return a=On(e,0),i=On(t,0),o=On(n,2),0===(r=Math.min(Math.max(a,i),o))?"month":1===r?"year":"decade";var r,a,i,o}function An(e){var t=e.cx,n=e.classes,r=e.context,a=e.classNames,i=e.name,o=e.cache,s=r.reduce((function(e,t){return Object.keys(t.classNames).forEach((function(n){"string"!=typeof e[n]?e[n]="".concat(t.classNames[n]):e[n]="".concat(e[n]," ").concat(t.classNames[n])})),e}),{});return Object.keys(n).reduce((function(e,r){return e[r]=t(n[r],s[r],null!=a&&a[r],Array.isArray(i)?i.filter(Boolean).map((function(e){return"".concat((null==o?void 0:o.key)||"mantine","-").concat(e,"-").concat(r)})).join(" "):i?"".concat((null==o?void 0:o.key)||"mantine","-").concat(i,"-").concat(r):null),e}),{})}function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var En=Object.defineProperty,jn=Object.getOwnPropertySymbols,Pn=Object.prototype.hasOwnProperty,In=Object.prototype.propertyIsEnumerable,Ln=function(e,t,n){return t in e?En(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Rn=function(e,t){for(var n in t||(t={}))Pn.call(t,n)&&Ln(e,n,t[n]);if(jn){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Mn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(jn(t));try{for(a.s();!(r=a.n()).done;)n=r.value,In.call(t,n)&&Ln(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e};function Nn(e,t){return t&&Object.keys(t).forEach((function(n){e[n]?e[n]=Rn(Rn({},e[n]),t[n]):e[n]=Rn({},t[n])})),e}function Tn(e,t,n,r){var a=function(e){return"function"==typeof e?e(t,n||{},r):e||{}};return Array.isArray(e)?e.map((function(e){return a(e.styles)})).reduce((function(e,t){return Nn(e,t)}),{}):a(e)}function Fn(e){var t="function"==typeof e?e:function(){return e};return function(e,n){var r=gt(),a=function(e){var t=gt(),n=function(e){var n,r,a,i;return{styles:(null==(n=t.components[e])?void 0:n.styles)||{},classNames:(null==(r=t.components[e])?void 0:r.classNames)||{},variants:null==(a=t.components[e])?void 0:a.variants,sizes:null==(i=t.components[e])?void 0:i.sizes}};return Array.isArray(e)?e.map(n):[n(e)]}(null==n?void 0:n.name),i=bt(),o={variant:null==n?void 0:n.variant,size:null==n?void 0:n.size},s=qt(),l=s.css,c=s.cx,u=t(r,e,o),f=Tn(null==n?void 0:n.styles,r,e,o),d=Tn(a,r,e,o),h=function(e){var t=e.theme,n=e.params,r=e.variant,a=e.size;return e.ctx.reduce((function(e,i){return i.variants&&r in i.variants&&Nn(e,i.variants[r](t,n,{variant:r,size:a})),i.sizes&&a in i.sizes&&Nn(e,i.sizes[a](t,n,{variant:r,size:a})),e}),{})}({ctx:a,theme:r,params:e,variant:null==n?void 0:n.variant,size:null==n?void 0:n.size}),p=Object.fromEntries(Object.keys(u).map((function(e){return[e,c(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},l(u[e]),!(null==n?void 0:n.unstyled)),l(h[e]),l(d[e]),l(f[e]))]})));return{classes:An({cx:c,classes:p,context:a,classNames:null==n?void 0:n.classNames,name:null==n?void 0:n.name,cache:i}),cx:c,theme:r}}}const zn=Fn((function(){return{calendar:{}}}));var Vn=Fn((function(e,t,n){return{monthLevelGroup:{display:"flex","& [data-month-level]:not(:last-of-type)":{marginRight:$e({size:n.size,sizes:e.spacing})}}}}));const Hn=Vn,Wn=Fn((function(e){return{monthLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}}));Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var $n={locale:"en",firstDayOfWeek:1,weekendDays:[0,6],labelSeparator:"–"},Bn=(0,e.createContext)($n);function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Un=Object.defineProperty,Gn=Object.defineProperties,Zn=Object.getOwnPropertyDescriptors,Kn=Object.getOwnPropertySymbols,Xn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,Jn=function(e,t,n){return t in e?Un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n};function Qn(){var t,n=(0,e.useContext)(Bn),r=(0,e.useCallback)((function(e){return e||n.locale}),[n.locale]),a=(0,e.useCallback)((function(e){return"number"==typeof e?e:n.firstDayOfWeek}),[n.firstDayOfWeek]),i=(0,e.useCallback)((function(e){return Array.isArray(e)?e:n.weekendDays}),[n.weekendDays]),o=(0,e.useCallback)((function(e){return"string"==typeof e?e:n.labelSeparator}),[n.labelSeparator]);return t=function(e,t){for(var n in t||(t={}))Xn.call(t,n)&&Jn(e,n,t[n]);if(Kn){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Yn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(Kn(t));try{for(a.s();!(r=a.n()).done;)n=r.value,qn.call(t,n)&&Jn(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({},n),Gn(t,Zn({getLocale:r,getFirstDayOfWeek:a,getWeekendDays:i,getLabelSeparator:o}))}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var tr=Object.defineProperty,nr=Object.defineProperties,rr=Object.getOwnPropertyDescriptors,ar=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,or=Object.prototype.propertyIsEnumerable,sr=function(e,t,n){return t in e?tr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},lr=function(e,t){for(var n in t||(t={}))ir.call(t,n)&&sr(e,n,t[n]);if(ar){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?er(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(ar(t));try{for(a.s();!(r=a.n()).done;)n=r.value,or.call(t,n)&&sr(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e};const cr=Fn((function(e){return{root:(t=lr(lr({},e.fn.focusStyles()),e.fn.fontStyles()),n={cursor:"pointer",border:0,padding:0,appearance:"none",fontSize:e.fontSizes.md,backgroundColor:"transparent",textAlign:"left",color:"dark"===e.colorScheme?e.colors.dark[0]:e.black,textDecoration:"none",boxSizing:"border-box"},nr(t,rr(n)))};var t,n}));function ur(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return fr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function fr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dr=Object.defineProperty,hr=Object.getOwnPropertySymbols,pr=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable,mr=function(e,t,n){return t in e?dr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},yr=(0,e.forwardRef)((function(e,n){var r=xt("UnstyledButton",{},e),a=r.className,i=r.component,o=void 0===i?"button":i,s=r.unstyled,l=r.variant,c=function(e,t){var n={};for(var r in e)pr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&hr){var a,i=ur(hr(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&vr.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["className","component","unstyled","variant"]),u=cr(null,{name:"UnstyledButton",unstyled:s,variant:l}),f=u.classes,d=u.cx;return t().createElement(Cn,function(e,t){for(var n in t||(t={}))pr.call(t,n)&&mr(e,n,t[n]);if(hr){var r,a=ur(hr(t));try{for(a.s();!(r=a.n()).done;)n=r.value,vr.call(t,n)&&mr(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({component:o,ref:n,className:d(f.root,a),type:"button"===o?"button":void 0},c))}));yr.displayName="@mantine/core/UnstyledButton";var gr=yr;function br(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return xr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?xr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function xr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var _r=Object.defineProperty,wr=Object.getOwnPropertySymbols,kr=Object.prototype.hasOwnProperty,Sr=Object.prototype.propertyIsEnumerable,Cr=function(e,t,n){return t in e?_r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Or=function(e,t){for(var n in t||(t={}))kr.call(t,n)&&Cr(e,n,t[n]);if(wr){var r,a=br(wr(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Sr.call(t,n)&&Cr(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e};function Dr(e){var n=e,r=n.style,a=function(e,t){var n={};for(var r in e)kr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&wr){var a,i=br(wr(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&Sr.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(n,["style"]);return t().createElement("svg",Or({viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:Or({width:He(16),height:He(16)},r)},a),t().createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Ar(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Mr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Er=Object.defineProperty,jr=Object.defineProperties,Pr=Object.getOwnPropertyDescriptors,Ir=Object.getOwnPropertySymbols,Lr=Object.prototype.hasOwnProperty,Rr=Object.prototype.propertyIsEnumerable,Nr=function(e,t,n){return t in e?Er(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Tr=function(e,t){for(var n in t||(t={}))Lr.call(t,n)&&Nr(e,n,t[n]);if(Ir){var r,a=Ar(Ir(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Rr.call(t,n)&&Nr(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},Fr=function(e,t){return jr(e,Pr(t))};function zr(e){var n=e,r=n.direction,a=n.style,i=function(e,t){var n={};for(var r in e)Lr.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ir){var a,i=Ar(Ir(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&Rr.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(n,["direction","style"]),o=gt();return t().createElement(Dr,Fr(Tr({},i),{style:Fr(Tr({},a),{transform:"next"===r&&"ltr"===o.dir||"previous"===r&&"rtl"===o.dir?"rotate(270deg)":"rotate(90deg)"})}))}function Vr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}zr.displayName="@mantine/dates/Chevron";var Hr=Object.defineProperty,Wr=Object.defineProperties,$r=Object.getOwnPropertyDescriptors,Br=Object.getOwnPropertySymbols,Yr=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Gr=function(e,t,n){return t in e?Hr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Zr=function(e,t){for(var n in t||(t={}))Yr.call(t,n)&&Gr(e,n,t[n]);if(Br){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Vr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(Br(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Ur.call(t,n)&&Gr(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},Kr=function(e,t){return Wr(e,$r(t))},Xr={xs:He(30),sm:He(36),md:He(42),lg:He(48),xl:He(54)},qr=Fn((function(e,t,n){var r=t.radius,a=t.isStatic,i=n.size,o=e.fn.variant({variant:"filled"}),s=e.fn.variant({variant:"light"});return{day:Kr(Zr({width:$e({size:i,sizes:Xr}),height:$e({size:i,sizes:Xr}),fontSize:$e({size:i,sizes:e.fontSizes}),display:"inline-flex",justifyContent:"center",alignItems:"center",userSelect:a?void 0:"none",cursor:a?"default":"pointer",borderRadius:e.fn.radius(r)},a?null:e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":a?void 0:e.activeStyles,"&[data-disabled]":Kr(Zr({color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}}),"&[data-weekend]":{color:e.colors.red[e.fn.primaryShade()]},"&[data-outside]":{color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4]},"&[data-in-range]":Zr({backgroundColor:s.background,borderRadius:0},a?null:e.fn.hover({backgroundColor:s.hover})),"&[data-first-in-range]":{borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-selected]":Zr({color:o.color,backgroundColor:o.background},a?null:e.fn.hover({backgroundColor:o.hover})),"&[data-hidden]":{display:"none"}})}}));const Jr=qr;function Qr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ea=Object.defineProperty,ta=Object.defineProperties,na=Object.getOwnPropertyDescriptors,ra=Object.getOwnPropertySymbols,aa=Object.prototype.hasOwnProperty,ia=Object.prototype.propertyIsEnumerable,oa=function(e,t,n){return t in e?ea(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},sa=function(e,t){for(var n in t||(t={}))aa.call(t,n)&&oa(e,n,t[n]);if(ra){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Qr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(ra(t));try{for(a.s();!(r=a.n()).done;)n=r.value,ia.call(t,n)&&oa(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},la=function(e,t){return ta(e,na(t))},ca=Fn((function(e,t,n){var r=n.size,a=$e({size:r,sizes:Xr});return{calendarHeaderControlIcon:{},calendarHeader:{display:"flex",maxWidth:"calc(".concat(a," * 7 + ").concat(He(7),")")},calendarHeaderControl:la(sa({width:a,height:a,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none"},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-disabled]":la(sa({opacity:.2,cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})}),calendarHeaderLevel:la(sa({height:a,borderRadius:e.fn.radius(),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",flex:1,fontSize:$e({size:r,sizes:e.fontSizes}),fontWeight:500,textTransform:"capitalize"},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-static]":la(sa({cursor:"default",userSelect:"unset"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}));const ua=ca;function fa(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return da(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?da(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function da(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ha=Object.defineProperty,pa=Object.getOwnPropertySymbols,va=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,ya=function(e,t,n){return t in e?ha(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ga={nextDisabled:!1,previousDisabled:!1,hasNextLevel:!0,withNext:!0,withPrevious:!0,size:"sm"},ba=(0,e.forwardRef)((function(e,n){var r=xt("CalendarHeader",ga,e),a=r.className,i=r.nextIcon,o=r.previousIcon,s=r.nextLabel,l=r.previousLabel,c=r.onNext,u=r.onPrevious,f=r.onLevelClick,d=r.label,h=r.classNames,p=r.styles,v=r.unstyled,m=r.nextDisabled,y=r.previousDisabled,g=r.hasNextLevel,b=r.levelControlAriaLabel,x=r.withNext,_=r.withPrevious,w=r.__staticSelector,k=r.__preventFocus,S=r.__stopPropagation,C=r.size,O=r.variant,D=function(e,t){var n={};for(var r in e)va.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&pa){var a,i=fa(pa(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&ma.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["className","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","label","classNames","styles","unstyled","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","__staticSelector","__preventFocus","__stopPropagation","size","variant"]),A=ua(null,{name:["CalendarHeader",w],classNames:h,styles:p,unstyled:v,size:C,variant:O}),M=A.classes,E=A.cx,j=k?function(e){return e.preventDefault()}:void 0;return t().createElement(Cn,function(e,t){for(var n in t||(t={}))va.call(t,n)&&ya(e,n,t[n]);if(pa){var r,a=fa(pa(t));try{for(a.s();!(r=a.n()).done;)n=r.value,ma.call(t,n)&&ya(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({className:E(M.calendarHeader,a),ref:n},D),_&&t().createElement(gr,{className:M.calendarHeaderControl,"data-previous":!0,"aria-label":l,onClick:u,unstyled:v,onMouseDown:j,disabled:y,"data-disabled":y||void 0,tabIndex:k?-1:0,"data-mantine-stop-propagation":S||void 0},o||t().createElement(zr,{className:M.calendarHeaderControlIcon,direction:"previous","data-previous":!0})),t().createElement(gr,{component:g?"button":"div",className:M.calendarHeaderLevel,onClick:g?f:void 0,unstyled:v,onMouseDown:g?j:void 0,disabled:!g,"data-static":!g||void 0,"aria-label":b,tabIndex:k||!g?-1:0,"data-mantine-stop-propagation":S||void 0},d),x&&t().createElement(gr,{className:M.calendarHeaderControl,"data-next":!0,"aria-label":s,onClick:c,unstyled:v,onMouseDown:j,disabled:m,"data-disabled":m||void 0,tabIndex:k?-1:0,"data-mantine-stop-propagation":S||void 0},i||t().createElement(zr,{className:M.calendarHeaderControlIcon,direction:"next","data-next":!0})))}));function xa(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=new Date(e);n.getDay()!==t;)n.setDate(n.getDate()-1);return n}function _a(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=new Date(e),r=0===t?6:t-1;n.getDay()!==r;)n.setDate(n.getDate()+1);return n}function wa(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function ka(e,t){return!(t instanceof Date)||i()(e).isBefore(i()(t).add(1,"day"),"day")}function Sa(e,t){return!(t instanceof Date)||i()(e).isAfter(i()(t).subtract(1,"day"),"day")}function Ca(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}ba.displayName="@mantine/dates/CalendarHeader";var Oa=Object.defineProperty,Da=Object.defineProperties,Aa=Object.getOwnPropertyDescriptors,Ma=Object.getOwnPropertySymbols,Ea=Object.prototype.hasOwnProperty,ja=Object.prototype.propertyIsEnumerable,Pa=function(e,t,n){return t in e?Oa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Ia=function(e,t){for(var n in t||(t={}))Ea.call(t,n)&&Pa(e,n,t[n]);if(Ma){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ca(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ca(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(Ma(t));try{for(a.s();!(r=a.n()).done;)n=r.value,ja.call(t,n)&&Pa(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e};const La=Fn((function(e){return{monthThead:{},monthRow:{},monthTbody:{},monthCell:{padding:0,"&[data-with-spacing]":{padding:He(.5)}},month:(t=Ia({},e.fn.fontStyles()),n={borderCollapse:"collapse",tableLayout:"fixed","& *":{boxSizing:"border-box"}},Da(t,Aa(n)))};var t,n}));function Ra(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Na(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Na(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Na(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ta=Object.defineProperty,Fa=Object.getOwnPropertySymbols,za=Object.prototype.hasOwnProperty,Va=Object.prototype.propertyIsEnumerable,Ha=function(e,t,n){return t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Wa={tabIndex:0,size:"sm"},$a=(0,e.forwardRef)((function(e,n){var r=xt("Day",Wa,e),a=r.className,o=r.date,s=r.radius,l=r.disabled,c=r.styles,u=r.classNames,f=r.unstyled,d=r.__staticSelector,h=r.weekend,p=r.outside,v=r.selected,m=r.renderDay,y=r.inRange,g=r.firstInRange,b=r.lastInRange,x=r.hidden,_=r.static,w=r.variant,k=r.size,S=function(e,t){var n={};for(var r in e)za.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Fa){var a,i=Ra(Fa(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&Va.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["className","date","radius","disabled","styles","classNames","unstyled","__staticSelector","weekend","outside","selected","renderDay","inRange","firstInRange","lastInRange","hidden","static","variant","size"]),C=Jr({radius:s,isStatic:_},{name:["Day",d],classNames:u,styles:c,unstyled:f,variant:w,size:k}),O=C.classes,D=C.cx;return t().createElement(gr,function(e,t){for(var n in t||(t={}))za.call(t,n)&&Ha(e,n,t[n]);if(Fa){var r,a=Ra(Fa(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Va.call(t,n)&&Ha(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({component:_?"div":"button",ref:n,className:D(O.day,a),disabled:l,"data-today":i()(o).isSame(new Date,"day")||void 0,"data-hidden":x||void 0,"data-disabled":l||void 0,"data-weekend":!l&&!p&&h||void 0,"data-outside":!l&&p||void 0,"data-selected":!l&&v||void 0,"data-in-range":y&&!l||void 0,"data-first-in-range":g&&!l||void 0,"data-last-in-range":b&&!l||void 0,unstyled:f},S),(null==m?void 0:m(o))||o.getDate())}));$a.displayName="@mantine/dates/Day";var Ba=Fn((function(e,t,n){var r=n.size;return{weekdaysRow:{},weekday:{color:"dark"===e.colorScheme?e.colors.dark[1]:e.colors.gray[5],fontWeight:400,fontSize:$e({size:r,sizes:e.fontSizes}),textTransform:"capitalize",paddingBottom:"calc(".concat($e({size:r,sizes:e.spacing})," / 2)")}}}));const Ya=Ba;function Ua(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ga(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ga(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Ga(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Za=Object.defineProperty,Ka=Object.getOwnPropertySymbols,Xa=Object.prototype.hasOwnProperty,qa=Object.prototype.propertyIsEnumerable,Ja=function(e,t,n){return t in e?Za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Qa={weekdayFormat:"dd",cellComponent:"th",size:"sm"},ei=(0,e.forwardRef)((function(e,n){var r=xt("WeekdaysRow",Qa,e),a=r.className,o=r.locale,s=r.firstDayOfWeek,l=r.weekdayFormat,c=r.cellComponent,u=r.__staticSelector,f=r.classNames,d=r.styles,h=r.unstyled,p=r.variant,v=r.size,m=function(e,t){var n={};for(var r in e)Xa.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ka){var a,i=Ua(Ka(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&qa.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["className","locale","firstDayOfWeek","weekdayFormat","cellComponent","__staticSelector","classNames","styles","unstyled","variant","size"]),y=Qn(),g=Ya(null,{name:["WeekdaysRow",u],classNames:f,styles:d,unstyled:h,variant:p,size:v}),b=g.classes,x=g.cx,_=function(e){for(var t=e.locale,n=e.format,r=void 0===n?"dd":n,a=e.firstDayOfWeek,o=void 0===a?1:a,s=i()().day(o),l=[],c=0;c<7;c+=1)"string"==typeof r?l.push(i()(s).add(c,"days").locale(t).format(r)):l.push(r(i()(s).add(c,"days").toDate()));return l}({locale:y.getLocale(o),format:l,firstDayOfWeek:y.getFirstDayOfWeek(s)}).map((function(e,n){return t().createElement(c,{key:n,className:b.weekday},e)}));return t().createElement(Cn,function(e,t){for(var n in t||(t={}))Xa.call(t,n)&&Ja(e,n,t[n]);if(Ka){var r,a=Ua(Ka(t));try{for(a.s();!(r=a.n()).done;)n=r.value,qa.call(t,n)&&Ja(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({component:"tr",ref:n,className:x(b.weekdaysRow,a)},m),_)}));function ti(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ni(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ni(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function ni(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}ei.displayName="@mantine/dates/WeekdaysRow";var ri=Object.defineProperty,ai=Object.defineProperties,ii=Object.getOwnPropertyDescriptors,oi=Object.getOwnPropertySymbols,si=Object.prototype.hasOwnProperty,li=Object.prototype.propertyIsEnumerable,ci=function(e,t,n){return t in e?ri(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ui=function(e,t){for(var n in t||(t={}))si.call(t,n)&&ci(e,n,t[n]);if(oi){var r,a=ti(oi(t));try{for(a.s();!(r=a.n()).done;)n=r.value,li.call(t,n)&&ci(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},fi=function(e,t){return ai(e,ii(t))},di={size:"sm",withCellSpacing:!0},hi=(0,e.forwardRef)((function(e,n){var r=xt("Month",di,e),a=r.className,o=r.classNames,s=r.styles,l=r.unstyled,c=r.__staticSelector,u=r.locale,f=r.firstDayOfWeek,d=r.weekdayFormat,h=r.month,p=r.weekendDays,v=r.getDayProps,m=r.excludeDate,y=r.minDate,g=r.maxDate,b=r.renderDay,x=r.hideOutsideDates,_=r.hideWeekdays,w=r.getDayAriaLabel,k=r.static,S=r.__getDayRef,C=r.__onDayKeyDown,O=r.__onDayClick,D=r.__onDayMouseEnter,A=r.__preventFocus,M=r.__stopPropagation,E=r.withCellSpacing,j=r.size,P=r.variant,I=function(e,t){var n={};for(var r in e)si.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&oi){var a,i=ti(oi(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&li.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["className","classNames","styles","unstyled","__staticSelector","locale","firstDayOfWeek","weekdayFormat","month","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","static","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","__preventFocus","__stopPropagation","withCellSpacing","size","variant"]),L=Qn(),R=La(null,{name:["Month",c],classNames:o,styles:s,unstyled:l,variant:P,size:j}),N=R.classes,T=R.cx,F={__staticSelector:c||"Month",classNames:o,styles:s,unstyled:l,variant:P,size:j},z=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e.getMonth(),r=new Date(e.getFullYear(),n,1),a=_a(new Date(e.getFullYear(),e.getMonth()+1,0),t),i=xa(r,t),o=[];i<=a;){for(var s=[],l=0;l<7;l+=1)s.push(new Date(i)),i.setDate(i.getDate()+1);o.push(s)}return o}(h,L.getFirstDayOfWeek(f)),V=function(e,t,n,r,a,o,s){var l=e.flat().filter((function(e){var i;return ka(e,n)&&Sa(e,t)&&!(null==a?void 0:a(e))&&!(null==(i=null==r?void 0:r(e))?void 0:i.disabled)&&(!o||wa(e,s))})),c=l.find((function(e){var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected}));return c||l.find((function(e){return i()().isSame(e,"date")}))||l[0]}(z,y,g,v,m,x,h),H=z.map((function(e,n){var r=e.map((function(e,r){var a=!wa(e,h),o=(null==w?void 0:w(e))||i()(e).locale(u||L.locale).format("D MMMM YYYY"),s=null==v?void 0:v(e),l=i()(e).isSame(V,"date");return t().createElement("td",{key:e.toString(),className:N.monthCell,"data-with-spacing":E||void 0},t().createElement($a,fi(ui(fi(ui({},F),{"data-mantine-stop-propagation":M||void 0,renderDay:b,date:e,weekend:L.getWeekendDays(p).includes(e.getDay()),outside:a,hidden:!!x&&a,"aria-label":o,static:k,disabled:(null==m?void 0:m(e))||!ka(e,g)||!Sa(e,y),ref:function(e){return null==S?void 0:S(n,r,e)}}),s),{onKeyDown:function(t){var a;null==(a=null==s?void 0:s.onKeyDown)||a.call(s,t),null==C||C(t,{rowIndex:n,cellIndex:r,date:e})},onMouseEnter:function(t){var n;null==(n=null==s?void 0:s.onMouseEnter)||n.call(s,t),null==D||D(t,e)},onClick:function(t){var n;null==(n=null==s?void 0:s.onClick)||n.call(s,t),null==O||O(t,e)},onMouseDown:function(e){var t;null==(t=null==s?void 0:s.onMouseDown)||t.call(s,e),A&&e.preventDefault()},tabIndex:A||!l?-1:0})))}));return t().createElement("tr",{key:n,className:N.monthRow},r)}));return t().createElement(Cn,ui({component:"table",className:T(N.month,a),ref:n},I),!_&&t().createElement("thead",{className:N.monthThead},t().createElement(ei,fi(ui({},F),{locale:u,firstDayOfWeek:f,weekdayFormat:d}))),t().createElement("tbody",{className:N.monthTbody},H))}));function pi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}hi.displayName="@mantine/dates/Month";var mi=Object.defineProperty,yi=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,bi=Object.prototype.propertyIsEnumerable,xi=function(e,t,n){return t in e?mi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},_i=function(e,t){for(var n in t||(t={}))gi.call(t,n)&&xi(e,n,t[n]);if(yi){var r,a=pi(yi(t));try{for(a.s();!(r=a.n()).done;)n=r.value,bi.call(t,n)&&xi(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},wi={monthLabelFormat:"MMMM YYYY"},ki=(0,e.forwardRef)((function(e,n){var r=xt("MonthLevel",wi,e),a=r.month,o=r.locale,s=r.firstDayOfWeek,l=r.weekdayFormat,c=r.weekendDays,u=r.getDayProps,f=r.excludeDate,d=r.minDate,h=r.maxDate,p=r.renderDay,v=r.hideOutsideDates,m=r.hideWeekdays,y=r.getDayAriaLabel,g=r.__getDayRef,b=r.__onDayKeyDown,x=r.__onDayClick,_=r.__onDayMouseEnter,w=r.withCellSpacing,k=r.__preventFocus,S=r.__stopPropagation,C=r.nextIcon,O=r.previousIcon,D=r.nextLabel,A=r.previousLabel,M=r.onNext,E=r.onPrevious,j=r.onLevelClick,P=r.nextDisabled,I=r.previousDisabled,L=r.hasNextLevel,R=r.levelControlAriaLabel,N=r.withNext,T=r.withPrevious,F=r.className,z=r.monthLabelFormat,V=r.classNames,H=r.styles,W=r.unstyled,$=r.__staticSelector,B=r.size,Y=r.variant,U=r.static,G=function(e,t){var n={};for(var r in e)gi.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&yi){var a,i=pi(yi(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&bi.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__getDayRef","__onDayKeyDown","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","__stopPropagation","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","monthLabelFormat","classNames","styles","unstyled","__staticSelector","size","variant","static"]),Z=Wn(null,{name:["MonthLevel",$],classNames:V,styles:H,unstyled:W,variant:Y,size:B}),K=Z.classes,X=Z.cx,q=Qn(),J={__staticSelector:$||"MonthLevel",classNames:V,styles:H,unstyled:W,variant:Y,size:B},Q="boolean"==typeof P?P:!!h&&!i()(a).endOf("month").isBefore(h),ee="boolean"==typeof I?I:!!d&&!i()(a).startOf("month").isAfter(d);return t().createElement(Cn,_i({className:X(K.monthLevel,F),"data-month-level":!0,ref:n},G),t().createElement(ba,_i({label:"function"==typeof z?z(a):i()(a).locale(o||q.locale).format(z),className:K.calendarHeader,__preventFocus:k,__stopPropagation:S,nextIcon:C,previousIcon:O,nextLabel:D,previousLabel:A,onNext:M,onPrevious:E,onLevelClick:j,nextDisabled:Q,previousDisabled:ee,hasNextLevel:L,levelControlAriaLabel:R,withNext:N,withPrevious:T},J)),t().createElement(hi,_i({month:a,locale:o,firstDayOfWeek:s,weekdayFormat:l,weekendDays:c,getDayProps:u,excludeDate:f,minDate:d,maxDate:h,renderDay:p,hideOutsideDates:v,hideWeekdays:m,getDayAriaLabel:y,__getDayRef:g,__onDayKeyDown:b,__onDayClick:x,__onDayMouseEnter:_,__preventFocus:k,__stopPropagation:S,static:U,withCellSpacing:w},J)))}));function Si(e){var t,n,r=e.controlsRef,a=e.direction,i=e.levelIndex,o=e.rowIndex,s=e.cellIndex,l=e.size,c=function(e){var t=e.levelIndex,n=e.rowIndex,r=e.cellIndex,a=e.size;switch(e.direction){case"up":return 0===t&&0===n?null:0===n?{levelIndex:t-1,rowIndex:r<=a[t-1][a[t-1].length-1]-1?a[t-1].length-1:a[t-1].length-2,cellIndex:r}:{levelIndex:t,rowIndex:n-1,cellIndex:r};case"down":return n===a[t].length-1||n===a[t].length-2&&r>=a[t][a[t].length-1]?{levelIndex:t+1,rowIndex:0,cellIndex:r}:{levelIndex:t,rowIndex:n+1,cellIndex:r};case"left":return 0===t&&0===n&&0===r?null:0===n&&0===r?{levelIndex:t-1,rowIndex:a[t-1].length-1,cellIndex:a[t-1][a[t-1].length-1]-1}:0===r?{levelIndex:t,rowIndex:n-1,cellIndex:a[t][n-1]-1}:{levelIndex:t,rowIndex:n,cellIndex:r-1};case"right":return n===a[t].length-1&&r===a[t][n]-1?{levelIndex:t+1,rowIndex:0,cellIndex:0}:r===a[t][n]-1?{levelIndex:t,rowIndex:n+1,cellIndex:0}:{levelIndex:t,rowIndex:n,cellIndex:r+1};default:return{levelIndex:t,rowIndex:n,cellIndex:r}}}({direction:a,size:l,rowIndex:o,cellIndex:s,levelIndex:i});if(c){var u=null==(n=null==(t=r.current[c.levelIndex])?void 0:t[c.rowIndex])?void 0:n[c.cellIndex];u&&(u.disabled||u.getAttribute("data-hidden")||u.getAttribute("data-outside")?Si({controlsRef:r,direction:a,levelIndex:c.levelIndex,cellIndex:c.cellIndex,rowIndex:c.rowIndex,size:l}):u.focus())}}function Ci(e){var t=e.controlsRef,n=e.levelIndex,r=e.rowIndex,a=e.cellIndex,i=e.event,o=function(e){switch(e){case"ArrowDown":return"down";case"ArrowUp":return"up";case"ArrowRight":return"right";case"ArrowLeft":return"left";default:return null}}(i.key);if(o){i.preventDefault();var s=function(e){return e.current.map((function(e){return e.map((function(e){return e.length}))}))}(t);Si({controlsRef:t,direction:o,levelIndex:n,rowIndex:r,cellIndex:a,size:s})}}function Oi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Di(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Di(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Di(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}ki.displayName="@mantine/dates/MonthLevel";var Ai=Object.defineProperty,Mi=Object.getOwnPropertySymbols,Ei=Object.prototype.hasOwnProperty,ji=Object.prototype.propertyIsEnumerable,Pi=function(e,t,n){return t in e?Ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Ii={numberOfColumns:1},Li=(0,e.forwardRef)((function(n,r){var a=xt("MonthLevelGroup",Ii,n),o=a.month,s=a.locale,l=a.firstDayOfWeek,c=a.weekdayFormat,u=a.weekendDays,f=a.getDayProps,d=a.excludeDate,h=a.minDate,p=a.maxDate,v=a.renderDay,m=a.hideOutsideDates,y=a.hideWeekdays,g=a.getDayAriaLabel,b=a.__onDayClick,x=a.__onDayMouseEnter,_=a.withCellSpacing,w=a.__preventFocus,k=a.nextIcon,S=a.previousIcon,C=a.nextLabel,O=a.previousLabel,D=a.onNext,A=a.onPrevious,M=a.onLevelClick,E=a.nextDisabled,j=a.previousDisabled,P=a.hasNextLevel,I=a.className,L=a.classNames,R=a.styles,N=a.unstyled,T=a.numberOfColumns,F=a.levelControlAriaLabel,z=a.monthLabelFormat,V=a.__staticSelector,H=a.__stopPropagation,W=a.size,$=a.variant,B=a.static,Y=function(e,t){var n={};for(var r in e)Ei.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Mi){var a,i=Oi(Mi(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&ji.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(a,["month","locale","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","minDate","maxDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","__onDayClick","__onDayMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","numberOfColumns","levelControlAriaLabel","monthLabelFormat","__staticSelector","__stopPropagation","size","variant","static"]),U=Hn(null,{name:["MonthLevelGroup",V],classNames:L,styles:R,unstyled:N,variant:$,size:W}),G=U.classes,Z=U.cx,K=(0,e.useRef)([]),X=Array(T).fill(0).map((function(e,n){var r=i()(o).add(n,"months").toDate();return t().createElement(ki,{key:n,month:r,withNext:n===T-1,withPrevious:0===n,monthLabelFormat:z,__stopPropagation:H,__onDayClick:b,__onDayMouseEnter:x,__onDayKeyDown:function(e,t){return Ci({levelIndex:n,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:K})},__getDayRef:function(e,t,r){Array.isArray(K.current[n])||(K.current[n]=[]),Array.isArray(K.current[n][e])||(K.current[n][e]=[]),K.current[n][e][t]=r},levelControlAriaLabel:"function"==typeof F?F(r):F,locale:s,firstDayOfWeek:l,weekdayFormat:c,weekendDays:u,getDayProps:f,excludeDate:d,minDate:h,maxDate:p,renderDay:v,hideOutsideDates:m,hideWeekdays:y,getDayAriaLabel:g,__preventFocus:w,nextIcon:k,previousIcon:S,nextLabel:C,previousLabel:O,onNext:D,onPrevious:A,onLevelClick:M,nextDisabled:E,previousDisabled:j,hasNextLevel:P,classNames:L,styles:R,unstyled:N,__staticSelector:V||"MonthLevelGroup",size:W,variant:$,static:B,withCellSpacing:_})}));return t().createElement(Cn,function(e,t){for(var n in t||(t={}))Ei.call(t,n)&&Pi(e,n,t[n]);if(Mi){var r,a=Oi(Mi(t));try{for(a.s();!(r=a.n()).done;)n=r.value,ji.call(t,n)&&Pi(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({className:Z(G.monthLevelGroup,I),ref:r},Y),X)}));Li.displayName="@mantine/dates/MonthLevelGroup";var Ri=Fn((function(e,t,n){return{yearLevelGroup:{display:"flex","& [data-year-level]:not(:last-of-type)":{marginRight:$e({size:n.size,sizes:e.spacing})}}}}));const Ni=Ri,Ti=Fn((function(e){return{yearLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}}));function Fi(e,t,n){return!!((t||n)&&(t&&i()(e).isBefore(t,"month")||n&&i()(e).isAfter(n,"month")))}const zi=Fn((function(){return{monthsList:{borderCollapse:"collapse",borderWidth:0,cursor:"pointer"},monthsListCell:{padding:0,"&[data-with-spacing]":{padding:He(.5)}},monthsListRow:{}}}));function Vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Hi=Object.defineProperty,Wi=Object.defineProperties,$i=Object.getOwnPropertyDescriptors,Bi=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Ui=Object.prototype.propertyIsEnumerable,Gi=function(e,t,n){return t in e?Hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Zi=function(e,t){for(var n in t||(t={}))Yi.call(t,n)&&Gi(e,n,t[n]);if(Bi){var r,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Vi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(Bi(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Ui.call(t,n)&&Gi(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},Ki=function(e,t){return Wi(e,$i(t))},Xi=Fn((function(e,t,n){var r=n.size,a=e.fn.variant({variant:"filled"}),i=e.fn.variant({variant:"light"});return{pickerControl:Ki(Zi({fontSize:$e({size:r,sizes:e.fontSizes}),height:$e({size:r,sizes:Xr}),width:"calc((".concat($e({size:r,sizes:Xr})," * 7) / 3 + ").concat(He(1.5),")"),display:"flex",justifyContent:"center",alignItems:"center",userSelect:"none",borderRadius:e.fn.radius()},e.fn.hover({backgroundColor:"dark"===e.colorScheme?e.colors.dark[5]:e.colors.gray[0]})),{"&:active":e.activeStyles,"&[data-in-range]":Zi({backgroundColor:i.background,borderRadius:0},e.fn.hover({backgroundColor:i.hover})),"&[data-first-in-range]":{borderRadius:0,borderTopLeftRadius:e.radius.sm,borderBottomLeftRadius:e.radius.sm},"&[data-last-in-range]":{borderRadius:0,borderTopRightRadius:e.radius.sm,borderBottomRightRadius:e.radius.sm},"&[data-last-in-range][data-first-in-range]":{borderRadius:e.radius.sm},"&[data-selected]":Zi({color:a.color,backgroundColor:a.background},e.fn.hover({backgroundColor:a.hover})),"&[data-disabled]":Ki(Zi({color:"dark"===e.colorScheme?e.colors.dark[3]:e.colors.gray[4],cursor:"not-allowed"},e.fn.hover({backgroundColor:"transparent"})),{"&:active":{transform:"none"}})})}}));const qi=Xi;function Ji(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Qi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Qi(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Qi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var eo=Object.defineProperty,to=Object.getOwnPropertySymbols,no=Object.prototype.hasOwnProperty,ro=Object.prototype.propertyIsEnumerable,ao=function(e,t,n){return t in e?eo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},io={size:"sm"},oo=(0,e.forwardRef)((function(e,n){var r=xt("PickerControl",io,e),a=r.className,i=r.children,o=r.disabled,s=r.selected,l=r.classNames,c=r.styles,u=r.unstyled,f=r.firstInRange,d=r.lastInRange,h=r.inRange,p=r.__staticSelector,v=r.size,m=r.variant,y=function(e,t){var n={};for(var r in e)no.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&to){var a,i=Ji(to(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&ro.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["className","children","disabled","selected","classNames","styles","unstyled","firstInRange","lastInRange","inRange","__staticSelector","size","variant"]),g=qi(null,{name:["PickerControl",p],classNames:l,styles:c,unstyled:u,variant:m,size:v}),b=g.classes,x=g.cx;return t().createElement(gr,function(e,t){for(var n in t||(t={}))no.call(t,n)&&ao(e,n,t[n]);if(to){var r,a=Ji(to(t));try{for(a.s();!(r=a.n()).done;)n=r.value,ro.call(t,n)&&ao(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({className:x(b.pickerControl,a),ref:n,unstyled:u,"data-picker-control":!0,"data-selected":s&&!o||void 0,"data-disabled":o||void 0,"data-in-range":h&&!o&&!s||void 0,"data-first-in-range":f&&!o||void 0,"data-last-in-range":d&&!o||void 0,disabled:o},y),i)}));function so(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return lo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function lo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}oo.displayName="@mantine/dates/PickerControl";var co=Object.defineProperty,uo=Object.defineProperties,fo=Object.getOwnPropertyDescriptors,ho=Object.getOwnPropertySymbols,po=Object.prototype.hasOwnProperty,vo=Object.prototype.propertyIsEnumerable,mo=function(e,t,n){return t in e?co(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},yo=function(e,t){for(var n in t||(t={}))po.call(t,n)&&mo(e,n,t[n]);if(ho){var r,a=so(ho(t));try{for(a.s();!(r=a.n()).done;)n=r.value,vo.call(t,n)&&mo(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},go={monthsListFormat:"MMM",size:"sm",withCellSpacing:!0},bo=(0,e.forwardRef)((function(e,n){var r=xt("MonthsList",go,e),a=r.year,o=r.className,s=r.monthsListFormat,l=r.locale,c=r.minDate,u=r.maxDate,f=r.getMonthControlProps,d=r.classNames,h=r.styles,p=r.unstyled,v=r.__staticSelector,m=r.__getControlRef,y=r.__onControlKeyDown,g=r.__onControlClick,b=r.__onControlMouseEnter,x=r.__preventFocus,_=r.size,w=r.variant,k=r.__stopPropagation,S=r.withCellSpacing,C=function(e,t){var n={};for(var r in e)po.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ho){var a,i=so(ho(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&vo.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["year","className","monthsListFormat","locale","minDate","maxDate","getMonthControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","size","variant","__stopPropagation","withCellSpacing"]),O=zi(null,{name:["MonthsList",v],classNames:d,styles:h,unstyled:p,variant:w,size:_}),D=O.classes,A=O.cx,M=Qn(),E=function(e){for(var t=i()(e).startOf("year").toDate(),n=[[],[],[],[]],r=0,a=0;a<4;a+=1)for(var o=0;o<3;o+=1)n[a].push(i()(t).add(r,"months").toDate()),r+=1;return n}(a),j=function(e,t,n,r){var a=e.flat().filter((function(e){var a;return!Fi(e,t,n)&&!(null==(a=null==r?void 0:r(e))?void 0:a.disabled)})),o=a.find((function(e){var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected}));return o||a.find((function(e){return i()().isSame(e,"month")}))||a[0]}(E,c,u,f),P=E.map((function(e,n){var r=e.map((function(e,r){var a,o=null==f?void 0:f(e),C=i()(e).isSame(j,"month");return t().createElement("td",{key:r,className:D.monthsListCell,"data-with-spacing":S||void 0},t().createElement(oo,(a=yo({variant:w,size:_,classNames:d,styles:h,unstyled:p,__staticSelector:v||"MonthsList","data-mantine-stop-propagation":k||void 0,disabled:Fi(e,c,u),ref:function(e){return null==m?void 0:m(n,r,e)}},o),uo(a,fo({onKeyDown:function(t){var a;null==(a=null==o?void 0:o.onKeyDown)||a.call(o,t),null==y||y(t,{rowIndex:n,cellIndex:r,date:e})},onClick:function(t){var n;null==(n=null==o?void 0:o.onClick)||n.call(o,t),null==g||g(t,e)},onMouseEnter:function(t){var n;null==(n=null==o?void 0:o.onMouseEnter)||n.call(o,t),null==b||b(t,e)},onMouseDown:function(e){var t;null==(t=null==o?void 0:o.onMouseDown)||t.call(o,e),x&&e.preventDefault()},tabIndex:x||!C?-1:0}))),i()(e).locale(M.getLocale(l)).format(s)))}));return t().createElement("tr",{key:n,className:D.monthsListRow},r)}));return t().createElement(Cn,yo({component:"table",ref:n,className:A(D.monthsList,o)},C),t().createElement("tbody",null,P))}));function xo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function _o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}bo.displayName="@mantine/dates/MonthsList";var wo=Object.defineProperty,ko=Object.getOwnPropertySymbols,So=Object.prototype.hasOwnProperty,Co=Object.prototype.propertyIsEnumerable,Oo=function(e,t,n){return t in e?wo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Do=function(e,t){for(var n in t||(t={}))So.call(t,n)&&Oo(e,n,t[n]);if(ko){var r,a=xo(ko(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Co.call(t,n)&&Oo(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},Ao={yearLabelFormat:"YYYY",size:"sm"},Mo=(0,e.forwardRef)((function(e,n){var r=xt("YearLevel",Ao,e),a=r.year,o=r.locale,s=r.minDate,l=r.maxDate,c=r.monthsListFormat,u=r.getMonthControlProps,f=r.__getControlRef,d=r.__onControlKeyDown,h=r.__onControlClick,p=r.__onControlMouseEnter,v=r.withCellSpacing,m=r.__preventFocus,y=r.nextIcon,g=r.previousIcon,b=r.nextLabel,x=r.previousLabel,_=r.onNext,w=r.onPrevious,k=r.onLevelClick,S=r.nextDisabled,C=r.previousDisabled,O=r.hasNextLevel,D=r.levelControlAriaLabel,A=r.withNext,M=r.withPrevious,E=r.className,j=r.yearLabelFormat,P=r.classNames,I=r.styles,L=r.unstyled,R=r.__staticSelector,N=r.__stopPropagation,T=r.size,F=r.variant,z=function(e,t){var n={};for(var r in e)So.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ko){var a,i=xo(ko(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&Co.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","levelControlAriaLabel","withNext","withPrevious","className","yearLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","size","variant"]),V=Ti(null,{name:["YearLevel",R],classNames:P,styles:I,unstyled:L,size:T,variant:F}),H=V.classes,W=V.cx,$=Qn(),B={__staticSelector:R||"YearLevel",classNames:P,styles:I,unstyled:L,size:T,variant:F},Y="boolean"==typeof S?S:!!l&&!i()(a).endOf("year").isBefore(l),U="boolean"==typeof C?C:!!s&&!i()(a).startOf("year").isAfter(s);return t().createElement(Cn,Do({className:W(H.yearLevel,E),"data-year-level":!0,ref:n},z),t().createElement(ba,Do({label:"function"==typeof j?j(a):i()(a).locale(o||$.locale).format(j),className:H.calendarHeader,__preventFocus:m,__stopPropagation:N,nextIcon:y,previousIcon:g,nextLabel:b,previousLabel:x,onNext:_,onPrevious:w,onLevelClick:k,nextDisabled:Y,previousDisabled:U,hasNextLevel:O,levelControlAriaLabel:D,withNext:A,withPrevious:M},B)),t().createElement(bo,Do({year:a,locale:o,minDate:s,maxDate:l,monthsListFormat:c,getMonthControlProps:u,__getControlRef:f,__onControlKeyDown:d,__onControlClick:h,__onControlMouseEnter:p,__preventFocus:m,__stopPropagation:N,withCellSpacing:v},B)))}));function Eo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return jo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function jo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Mo.displayName="@mantine/dates/YearLevel";var Po=Object.defineProperty,Io=Object.getOwnPropertySymbols,Lo=Object.prototype.hasOwnProperty,Ro=Object.prototype.propertyIsEnumerable,No=function(e,t,n){return t in e?Po(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},To={numberOfColumns:1,size:"sm"},Fo=(0,e.forwardRef)((function(n,r){var a=xt("YearLevelGroup",To,n),o=a.year,s=a.locale,l=a.minDate,c=a.maxDate,u=a.monthsListFormat,f=a.getMonthControlProps,d=a.__onControlClick,h=a.__onControlMouseEnter,p=a.withCellSpacing,v=a.__preventFocus,m=a.nextIcon,y=a.previousIcon,g=a.nextLabel,b=a.previousLabel,x=a.onNext,_=a.onPrevious,w=a.onLevelClick,k=a.nextDisabled,S=a.previousDisabled,C=a.hasNextLevel,O=a.className,D=a.classNames,A=a.styles,M=a.unstyled,E=a.__staticSelector,j=a.__stopPropagation,P=a.numberOfColumns,I=a.levelControlAriaLabel,L=a.yearLabelFormat,R=a.variant,N=a.size,T=function(e,t){var n={};for(var r in e)Lo.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Io){var a,i=Eo(Io(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&Ro.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(a,["year","locale","minDate","maxDate","monthsListFormat","getMonthControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","onLevelClick","nextDisabled","previousDisabled","hasNextLevel","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","yearLabelFormat","variant","size"]),F=Ni(null,{name:["YearLevelGroup",E],styles:A,classNames:D,unstyled:M,variant:R,size:N}),z=F.classes,V=F.cx,H=(0,e.useRef)([]),W=Array(P).fill(0).map((function(e,n){var r=i()(o).add(n,"years").toDate();return t().createElement(Mo,{key:n,variant:R,size:N,monthsListFormat:u,year:r,withNext:n===P-1,withPrevious:0===n,yearLabelFormat:L,__stopPropagation:j,__onControlClick:d,__onControlMouseEnter:h,__onControlKeyDown:function(e,t){return Ci({levelIndex:n,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:H})},__getControlRef:function(e,t,r){Array.isArray(H.current[n])||(H.current[n]=[]),Array.isArray(H.current[n][e])||(H.current[n][e]=[]),H.current[n][e][t]=r},levelControlAriaLabel:"function"==typeof I?I(r):I,locale:s,minDate:l,maxDate:c,__preventFocus:v,nextIcon:m,previousIcon:y,nextLabel:g,previousLabel:b,onNext:x,onPrevious:_,onLevelClick:w,nextDisabled:k,previousDisabled:S,hasNextLevel:C,getMonthControlProps:f,classNames:D,styles:A,unstyled:M,__staticSelector:E||"YearLevelGroup",withCellSpacing:p})}));return t().createElement(Cn,function(e,t){for(var n in t||(t={}))Lo.call(t,n)&&No(e,n,t[n]);if(Io){var r,a=Eo(Io(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Ro.call(t,n)&&No(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({className:V(z.yearLevelGroup,O),ref:r},T),W)}));Fo.displayName="@mantine/dates/YearLevelGroup";const zo=Fn((function(e){return{decadeLevelGroup:{display:"flex",gap:e.spacing.md}}}));function Vo(e){for(var t=e.getFullYear(),n=t-t%10,r=0,a=[[],[],[],[]],i=0;i<4;i+=1)for(var o=3===i?1:3,s=0;s<o;s+=1)a[i].push(new Date(n+r,0)),r+=1;return a}const Ho=Fn((function(e){return{decadeLevel:{},calendarHeader:{marginBottom:e.spacing.xs}}}));function Wo(e,t,n){return!!((t||n)&&(t&&i()(e).isBefore(t,"year")||n&&i()(e).isAfter(n,"year")))}const $o=Fn((function(){return{yearsList:{borderCollapse:"collapse",borderWidth:0},yearsListCell:{padding:0,"&[data-with-spacing]":{padding:He(.5)}},yearsListRow:{}}}));function Bo(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yo(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Uo=Object.defineProperty,Go=Object.defineProperties,Zo=Object.getOwnPropertyDescriptors,Ko=Object.getOwnPropertySymbols,Xo=Object.prototype.hasOwnProperty,qo=Object.prototype.propertyIsEnumerable,Jo=function(e,t,n){return t in e?Uo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Qo=function(e,t){for(var n in t||(t={}))Xo.call(t,n)&&Jo(e,n,t[n]);if(Ko){var r,a=Bo(Ko(t));try{for(a.s();!(r=a.n()).done;)n=r.value,qo.call(t,n)&&Jo(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},es={yearsListFormat:"YYYY",size:"sm",withCellSpacing:!0},ts=(0,e.forwardRef)((function(e,n){var r=xt("YearsList",es,e),a=r.decade,o=r.className,s=r.yearsListFormat,l=r.locale,c=r.minDate,u=r.maxDate,f=r.getYearControlProps,d=r.classNames,h=r.styles,p=r.unstyled,v=r.__staticSelector,m=r.__getControlRef,y=r.__onControlKeyDown,g=r.__onControlClick,b=r.__onControlMouseEnter,x=r.__preventFocus,_=r.__stopPropagation,w=r.size,k=r.variant,S=r.withCellSpacing,C=function(e,t){var n={};for(var r in e)Xo.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ko){var a,i=Bo(Ko(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&qo.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["decade","className","yearsListFormat","locale","minDate","maxDate","getYearControlProps","classNames","styles","unstyled","__staticSelector","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","__preventFocus","__stopPropagation","size","variant","withCellSpacing"]),O=$o(null,{name:["YearsList",v],classNames:d,styles:h,unstyled:p,variant:k,size:w}),D=O.classes,A=O.cx,M=Qn(),E=Vo(a),j=function(e,t,n,r){var a=e.flat().filter((function(e){var a;return!Wo(e,t,n)&&!(null==(a=null==r?void 0:r(e))?void 0:a.disabled)})),o=a.find((function(e){var t;return null==(t=null==r?void 0:r(e))?void 0:t.selected}));return o||a.find((function(e){return i()().isSame(e,"year")}))||a[0]}(E,c,u,f),P=E.map((function(e,n){var r=e.map((function(e,r){var a,o=null==f?void 0:f(e),C=i()(e).isSame(j,"year");return t().createElement("td",{key:r,className:D.yearsListCell,"data-with-spacing":S||void 0},t().createElement(oo,(a=Qo({size:w,variant:k,classNames:d,styles:h,unstyled:p,__staticSelector:v||"YearsList","data-mantine-stop-propagation":_||void 0,disabled:Wo(e,c,u),ref:function(e){return null==m?void 0:m(n,r,e)}},o),Go(a,Zo({onKeyDown:function(t){var a;null==(a=null==o?void 0:o.onKeyDown)||a.call(o,t),null==y||y(t,{rowIndex:n,cellIndex:r,date:e})},onClick:function(t){var n;null==(n=null==o?void 0:o.onClick)||n.call(o,t),null==g||g(t,e)},onMouseEnter:function(t){var n;null==(n=null==o?void 0:o.onMouseEnter)||n.call(o,t),null==b||b(t,e)},onMouseDown:function(e){var t;null==(t=null==o?void 0:o.onMouseDown)||t.call(o,e),x&&e.preventDefault()},tabIndex:x||!C?-1:0}))),i()(e).locale(M.getLocale(l)).format(s)))}));return t().createElement("tr",{key:n,className:D.yearsListRow},r)}));return t().createElement(Cn,Qo({component:"table",ref:n,className:A(D.yearsList,o)},C),t().createElement("tbody",null,P))}));function ns(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=rs(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function rs(e,t){if(e){if("string"==typeof e)return as(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?as(e,t):void 0}}function as(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}ts.displayName="@mantine/dates/YearsList";var is=Object.defineProperty,os=Object.getOwnPropertySymbols,ss=Object.prototype.hasOwnProperty,ls=Object.prototype.propertyIsEnumerable,cs=function(e,t,n){return t in e?is(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},us=function(e,t){for(var n in t||(t={}))ss.call(t,n)&&cs(e,n,t[n]);if(os){var r,a=ns(os(t));try{for(a.s();!(r=a.n()).done;)n=r.value,ls.call(t,n)&&cs(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},fs={decadeLabelFormat:"YYYY"},ds=(0,e.forwardRef)((function(e,n){var r=xt("DecadeLevel",fs,e),a=r.decade,o=r.locale,s=r.minDate,l=r.maxDate,c=r.yearsListFormat,u=r.getYearControlProps,f=r.__getControlRef,d=r.__onControlKeyDown,h=r.__onControlClick,p=r.__onControlMouseEnter,v=r.withCellSpacing,m=r.__preventFocus,y=r.nextIcon,g=r.previousIcon,b=r.nextLabel,x=r.previousLabel,_=r.onNext,w=r.onPrevious,k=r.nextDisabled,S=r.previousDisabled,C=r.levelControlAriaLabel,O=r.withNext,D=r.withPrevious,A=r.className,M=r.decadeLabelFormat,E=r.classNames,j=r.styles,P=r.unstyled,I=r.__staticSelector,L=r.__stopPropagation,R=r.variant,N=r.size,T=function(e,t){var n={};for(var r in e)ss.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&os){var a,i=ns(os(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&ls.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__getControlRef","__onControlKeyDown","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","levelControlAriaLabel","withNext","withPrevious","className","decadeLabelFormat","classNames","styles","unstyled","__staticSelector","__stopPropagation","variant","size"]),F=Ho(null,{name:["DecadeLevel",I],classNames:E,styles:j,unstyled:P,variant:R,size:N}),z=F.classes,V=F.cx,H=Qn(),W=function(e){var t=Vo(e);return[t[0][0],t[3][0]]}(a),$=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||rs(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(W,2),B=$[0],Y=$[1],U={__staticSelector:I||"DecadeLevel",classNames:E,styles:j,unstyled:P,variant:R,size:N},G="boolean"==typeof k?k:!!l&&!i()(Y).endOf("year").isBefore(l),Z="boolean"==typeof S?S:!!s&&!i()(B).startOf("year").isAfter(s),K=function(e,t){return i()(e).locale(o||H.locale).format(t)};return t().createElement(Cn,us({className:V(z.decadeLevel,A),"data-decade-level":!0,ref:n},T),t().createElement(ba,us({label:"function"==typeof M?M(B,Y):"".concat(K(B,M)," – ").concat(K(Y,M)),className:z.calendarHeader,__preventFocus:m,__stopPropagation:L,nextIcon:y,previousIcon:g,nextLabel:b,previousLabel:x,onNext:_,onPrevious:w,nextDisabled:G,previousDisabled:Z,hasNextLevel:!1,levelControlAriaLabel:C,withNext:O,withPrevious:D},U)),t().createElement(ts,us({decade:a,locale:o,minDate:s,maxDate:l,yearsListFormat:c,getYearControlProps:u,__getControlRef:f,__onControlKeyDown:d,__onControlClick:h,__onControlMouseEnter:p,__preventFocus:m,__stopPropagation:L,withCellSpacing:v},U)))}));function hs(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return ps(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ps(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function ps(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}ds.displayName="@mantine/dates/DecadeLevel";var vs=Object.defineProperty,ms=Object.getOwnPropertySymbols,ys=Object.prototype.hasOwnProperty,gs=Object.prototype.propertyIsEnumerable,bs=function(e,t,n){return t in e?vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},xs={numberOfColumns:1},_s=(0,e.forwardRef)((function(n,r){var a=xt("DecadeLevelGroup",xs,n),o=a.decade,s=a.locale,l=a.minDate,c=a.maxDate,u=a.yearsListFormat,f=a.getYearControlProps,d=a.__onControlClick,h=a.__onControlMouseEnter,p=a.withCellSpacing,v=a.__preventFocus,m=a.nextIcon,y=a.previousIcon,g=a.nextLabel,b=a.previousLabel,x=a.onNext,_=a.onPrevious,w=a.nextDisabled,k=a.previousDisabled,S=a.className,C=a.classNames,O=a.styles,D=a.unstyled,A=a.__staticSelector,M=a.__stopPropagation,E=a.numberOfColumns,j=a.levelControlAriaLabel,P=a.decadeLabelFormat,I=a.variant,L=a.size,R=function(e,t){var n={};for(var r in e)ys.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ms){var a,i=hs(ms(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&gs.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(a,["decade","locale","minDate","maxDate","yearsListFormat","getYearControlProps","__onControlClick","__onControlMouseEnter","withCellSpacing","__preventFocus","nextIcon","previousIcon","nextLabel","previousLabel","onNext","onPrevious","nextDisabled","previousDisabled","className","classNames","styles","unstyled","__staticSelector","__stopPropagation","numberOfColumns","levelControlAriaLabel","decadeLabelFormat","variant","size"]),N=zo(null,{name:["DecadeLevelGroup",A],styles:O,classNames:C,unstyled:D,variant:I,size:L}),T=N.classes,F=N.cx,z=(0,e.useRef)([]),V=Array(E).fill(0).map((function(e,n){var r=i()(o).add(10*n,"years").toDate();return t().createElement(ds,{key:n,variant:I,size:L,yearsListFormat:u,decade:r,withNext:n===E-1,withPrevious:0===n,decadeLabelFormat:P,__onControlClick:d,__onControlMouseEnter:h,__onControlKeyDown:function(e,t){return Ci({levelIndex:n,rowIndex:t.rowIndex,cellIndex:t.cellIndex,event:e,controlsRef:z})},__getControlRef:function(e,t,r){Array.isArray(z.current[n])||(z.current[n]=[]),Array.isArray(z.current[n][e])||(z.current[n][e]=[]),z.current[n][e][t]=r},levelControlAriaLabel:"function"==typeof j?j(r):j,locale:s,minDate:l,maxDate:c,__preventFocus:v,__stopPropagation:M,nextIcon:m,previousIcon:y,nextLabel:g,previousLabel:b,onNext:x,onPrevious:_,nextDisabled:w,previousDisabled:k,getYearControlProps:f,__staticSelector:A||"DecadeLevelGroup",classNames:C,styles:O,unstyled:D,withCellSpacing:p})}));return t().createElement(Cn,function(e,t){for(var n in t||(t={}))ys.call(t,n)&&bs(e,n,t[n]);if(ms){var r,a=hs(ms(t));try{for(a.s();!(r=a.n()).done;)n=r.value,gs.call(t,n)&&bs(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e}({className:F(T.decadeLevelGroup,S),ref:r},R),V)}));function ws(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||Ss(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ks(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ss(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Ss(e,t){if(e){if("string"==typeof e)return Cs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cs(e,t):void 0}}function Cs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}_s.displayName="@mantine/dates/DecadeLevelGroup";var Os=Object.defineProperty,Ds=Object.getOwnPropertySymbols,As=Object.prototype.hasOwnProperty,Ms=Object.prototype.propertyIsEnumerable,Es=function(e,t,n){return t in e?Os(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},js=function(e,t){for(var n in t||(t={}))As.call(t,n)&&Es(e,n,t[n]);if(Ds){var r,a=ks(Ds(t));try{for(a.s();!(r=a.n()).done;)n=r.value,Ms.call(t,n)&&Es(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},Ps={maxLevel:"decade",minLevel:"month",__updateDateOnYearSelect:!0,__updateDateOnMonthSelect:!0},Is=(0,e.forwardRef)((function(e,n){var r=xt("Calendar",Ps,e),a=r.maxLevel,o=r.minLevel,s=r.defaultLevel,l=r.level,c=r.onLevelChange,u=r.date,f=r.defaultDate,d=r.onDateChange,h=r.numberOfColumns,p=r.columnsToScroll,v=r.ariaLabels,m=r.onYearSelect,y=r.onMonthSelect,g=r.onYearMouseEnter,b=r.onMonthMouseEnter,x=r.__updateDateOnYearSelect,_=r.__updateDateOnMonthSelect,w=r.firstDayOfWeek,k=r.weekdayFormat,S=r.weekendDays,C=r.getDayProps,O=r.excludeDate,D=r.renderDay,A=r.hideOutsideDates,M=r.hideWeekdays,E=r.getDayAriaLabel,j=r.monthLabelFormat,P=r.nextIcon,I=r.previousIcon,L=r.__onDayClick,R=r.__onDayMouseEnter,N=r.withCellSpacing,T=r.monthsListFormat,F=r.getMonthControlProps,z=r.yearLabelFormat,V=r.yearsListFormat,H=r.getYearControlProps,W=r.decadeLabelFormat,$=r.minDate,B=r.maxDate,Y=r.locale,U=r.className,G=r.classNames,Z=r.styles,K=r.__staticSelector,X=r.unstyled,q=r.variant,J=r.size,Q=r.__preventFocus,ee=r.__stopPropagation,te=r.onNextDecade,ne=r.onPreviousDecade,re=r.onNextYear,ae=r.onPreviousYear,ie=r.onNextMonth,oe=r.onPreviousMonth,se=r.static,le=function(e,t){var n={};for(var r in e)As.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ds){var a,i=ks(Ds(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&Ms.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["maxLevel","minLevel","defaultLevel","level","onLevelChange","date","defaultDate","onDateChange","numberOfColumns","columnsToScroll","ariaLabels","onYearSelect","onMonthSelect","onYearMouseEnter","onMonthMouseEnter","__updateDateOnYearSelect","__updateDateOnMonthSelect","firstDayOfWeek","weekdayFormat","weekendDays","getDayProps","excludeDate","renderDay","hideOutsideDates","hideWeekdays","getDayAriaLabel","monthLabelFormat","nextIcon","previousIcon","__onDayClick","__onDayMouseEnter","withCellSpacing","monthsListFormat","getMonthControlProps","yearLabelFormat","yearsListFormat","getYearControlProps","decadeLabelFormat","minDate","maxDate","locale","className","classNames","styles","__staticSelector","unstyled","variant","size","__preventFocus","__stopPropagation","onNextDecade","onPreviousDecade","onNextYear","onPreviousYear","onNextMonth","onPreviousMonth","static"]),ce=zn(null,{name:["Calendar",K],classNames:G,styles:Z,unstyled:X,variant:q,size:J}),ue=ce.classes,fe=ce.cx,de=ws(wt({value:l?Dn(l,o,a):void 0,defaultValue:s?Dn(s,o,a):void 0,finalValue:Dn(void 0,o,a),onChange:c}),2),he=de[0],pe=de[1],ve=ws(wt({value:u,defaultValue:f,finalValue:null,onChange:d}),2),me=ve[0],ye=ve[1],ge={__staticSelector:K||"Calendar",styles:Z,classNames:G,unstyled:X,variant:q,size:J},be=p||h||1,xe=me||new Date;return t().createElement(Cn,js({className:fe(ue.calendar,U),ref:n},le),"month"===he&&t().createElement(Li,js({month:xe,minDate:$,maxDate:B,firstDayOfWeek:w,weekdayFormat:k,weekendDays:S,getDayProps:C,excludeDate:O,renderDay:D,hideOutsideDates:A,hideWeekdays:M,getDayAriaLabel:E,onNext:function(){var e=i()(xe).add(be,"month").toDate();null==ie||ie(e),ye(e)},onPrevious:function(){var e=i()(xe).subtract(be,"month").toDate();null==oe||oe(e),ye(e)},hasNextLevel:"month"!==a,onLevelClick:function(){return pe("year")},numberOfColumns:h,locale:Y,levelControlAriaLabel:null==v?void 0:v.monthLevelControl,nextLabel:null==v?void 0:v.nextMonth,nextIcon:P,previousLabel:null==v?void 0:v.previousMonth,previousIcon:I,monthLabelFormat:j,__onDayClick:L,__onDayMouseEnter:R,__preventFocus:Q,__stopPropagation:ee,static:se,withCellSpacing:N},ge)),"year"===he&&t().createElement(Fo,js({year:xe,numberOfColumns:h,minDate:$,maxDate:B,monthsListFormat:T,getMonthControlProps:F,locale:Y,onNext:function(){var e=i()(xe).add(be,"year").toDate();null==re||re(e),ye(e)},onPrevious:function(){var e=i()(xe).subtract(be,"year").toDate();null==ae||ae(e),ye(e)},hasNextLevel:"month"!==a&&"year"!==a,onLevelClick:function(){return pe("decade")},levelControlAriaLabel:null==v?void 0:v.yearLevelControl,nextLabel:null==v?void 0:v.nextYear,nextIcon:P,previousLabel:null==v?void 0:v.previousYear,previousIcon:I,yearLabelFormat:z,__onControlMouseEnter:b,__onControlClick:function(e,t){_&&ye(t),pe(Dn("month",o,a)),null==y||y(t)},__preventFocus:Q,__stopPropagation:ee,withCellSpacing:N},ge)),"decade"===he&&t().createElement(_s,js({decade:xe,minDate:$,maxDate:B,yearsListFormat:V,getYearControlProps:H,locale:Y,onNext:function(){var e=i()(xe).add(10*be,"year").toDate();null==te||te(e),ye(e)},onPrevious:function(){var e=i()(xe).subtract(10*be,"year").toDate();null==ne||ne(e),ye(e)},numberOfColumns:h,nextLabel:null==v?void 0:v.nextDecade,nextIcon:P,previousLabel:null==v?void 0:v.previousDecade,previousIcon:I,decadeLabelFormat:W,__onControlMouseEnter:g,__onControlClick:function(e,t){x&&ye(t),pe(Dn("year",o,a)),null==m||m(t)},__preventFocus:Q,__stopPropagation:ee,withCellSpacing:N},ge)))}));function Ls(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Rs(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Rs(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function Rs(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Is.displayName="@mantine/dates/Calendar";var Ns=Object.defineProperty,Ts=Object.getOwnPropertySymbols,Fs=Object.prototype.hasOwnProperty,zs=Object.prototype.propertyIsEnumerable,Vs=function(e,t,n){return t in e?Ns(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},Hs=function(e,t){for(var n in t||(t={}))Fs.call(t,n)&&Vs(e,n,t[n]);if(Ts){var r,a=Ls(Ts(t));try{for(a.s();!(r=a.n()).done;)n=r.value,zs.call(t,n)&&Vs(e,n,t[n])}catch(e){a.e(e)}finally{a.f()}}return e},Ws={type:"default",numberOfColumns:1},$s=(0,e.forwardRef)((function(e,n){var r=xt("DatePicker",Ws,e),a=r.type,i=r.defaultValue,o=r.value,s=r.onChange,l=r.__staticSelector,c=r.getDayProps,u=r.allowSingleDateInRange,f=r.allowDeselect,d=r.onMouseLeave,h=r.numberOfColumns,p=function(e,t){var n={};for(var r in e)Fs.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&Ts){var a,i=Ls(Ts(e));try{for(i.s();!(a=i.n()).done;)r=a.value,t.indexOf(r)<0&&zs.call(e,r)&&(n[r]=e[r])}catch(e){i.e(e)}finally{i.f()}}return n}(r,["type","defaultValue","value","onChange","__staticSelector","getDayProps","allowSingleDateInRange","allowDeselect","onMouseLeave","numberOfColumns"]),v=Et({type:a,level:"day",allowDeselect:f,allowSingleDateInRange:u,value:o,defaultValue:i,onChange:s,onMouseLeave:d}),m=v.onDateChange,y=v.onRootMouseLeave,g=v.onHoveredDateChange,b=v.getControlProps;return t().createElement(Is,Hs({ref:n,minLevel:"month",__staticSelector:l||"DatePicker",onMouseLeave:y,hideOutsideDates:1!==h,numberOfColumns:h,__onDayMouseEnter:function(e,t){return g(t)},__onDayClick:function(e,t){return m(t)},getDayProps:function(e){return Hs(Hs({},b(e)),null==c?void 0:c(e))}},p))}));function Bs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ys(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ys(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ys(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}$s.displayName="@mantine/dates/DatePicker";var Us=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];(0,e.useEffect)((function(){var e=new IntersectionObserver((function(n){Bs(n,1)[0].isIntersecting&&(t(),e.disconnect())}),{rootMargin:"0px 0px 0px 0px"});return e.observe(n.current),function(){return e.disconnect()}}),r)},Gs=function(t,n){(0,e.useEffect)((function(){function e(e){t.current&&t.current instanceof HTMLElement&&!t.current.contains(e.target)&&n()}return document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[t,n])};const Zs=function(e){var t=e.className,n=void 0===t?"":t;return React.createElement("svg",{className:"min-w-[24px]".concat(n?" "+n:""),width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_406_27403",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},React.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_406_27403)"},React.createElement("path",{d:"M12 14.6538L7.59619 10.25H16.4038L12 14.6538Z",fill:"currentColor"})))};var Ks=function(e,t){var n=null,r=null;switch(e){case"today":(n=new Date).setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"last_7_days":(n=new Date).setDate(n.getDate()-6),n.setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"last_4_weeks":(n=new Date).setDate(n.getDate()-27),n.setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"last_6_months":(n=new Date).setMonth(n.getMonth()-6),n.setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"last_12_months":(n=new Date).setMonth(n.getMonth()-12),n.setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"month_to_date":(n=new Date).setDate(1),n.setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"quarter_to_date":var a=new Date,i=Math.floor(a.getMonth()/3);(n=new Date(a.getFullYear(),3*i,1)).setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"year_to_date":(n=new Date).setMonth(0,1),n.setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999);break;case"custom":t&&2===t.length&&t[0]&&t[1]&&t[0]instanceof Date&&t[1]instanceof Date?((n=new Date(t[0])).setHours(0,0,0,0),(r=new Date(t[1])).setHours(23,59,59,999)):(console.warn("Invalid custom date period, falling back to last 7 days"),(n=new Date).setDate(n.getDate()-6),n.setHours(0,0,0,0),(r=new Date).setHours(23,59,59,999));break;default:return{startDate:null,endDate:null}}return{startDate:n,endDate:r}};const Xs=function(e,t){var n,r=Ks(e,t),a=r.startDate,i=r.endDate;return a&&i?{start_date:(n=a,n.getFullYear()+"/"+(n.getMonth()+1)+"/"+n.getDate()+" 00:00:00"),end_date:function(e){return e.getFullYear()+"/"+(e.getMonth()+1)+"/"+e.getDate()+" 23:59:59"}(i)}:{start_date:null,end_date:null}};function qs(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Js(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Js(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Js(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}i().extend(s()),i().extend(c());var Qs=[{key:"today",label:fbox_admin_js_object.langs.TODAY},{key:"last_7_days",label:fbox_admin_js_object.langs.LAST_7_DAYS},{key:"last_4_weeks",label:fbox_admin_js_object.langs.LAST_4_WEEKS},{key:"last_6_months",label:fbox_admin_js_object.langs.LAST_6_MONTHS},{key:"last_12_months",label:fbox_admin_js_object.langs.LAST_12_MONTHS},{key:"month_to_date",label:fbox_admin_js_object.langs.MONTH_TO_DATE},{key:"quarter_to_date",label:fbox_admin_js_object.langs.QUARTER_TO_DATE},{key:"year_to_date",label:fbox_admin_js_object.langs.YEAR_TO_DATE}],el=(0,e.memo)((function(n){var r=n.theme,a=n.date_period,o=n.custom_date_period,s=n.onSelectDatePeriod,l=n.onSelectCustomDatePeriod,c=qs((0,e.useState)(!1),2),u=c[0],f=c[1],d=qs((0,e.useState)([null,null]),2),h=d[0],p=d[1],v=qs((0,e.useState)(a),2),m=v[0],y=v[1],g=qs((0,e.useState)([null,null]),2),b=g[0],x=g[1],_=qs((0,e.useState)(a),2),w=_[0],k=_[1],S=(0,e.useRef)();Gs(S,(function(){f(!1),C()}));var C=function(){k(m),x(h)},O=function(){if(w!==m)return!0;if("custom"===w){if(!(b[0]&&b[1]&&h[0]&&h[1]))return!1;var e=i()(b[0]),t=i()(b[1]),n=i()(h[0]),r=i()(h[1]);return!e.isSame(n,"day")||!t.isSame(r,"day")}return!1};(0,e.useEffect)((function(){if("custom"===a&&o&&2===o.length)if(o[0]&&o[1]){var e=[new Date(o[0]),new Date(o[1])];p(e),x(e)}else{var t=D("last_7_days");p(t),x(t),y("last_7_days"),k("last_7_days")}else{var n=D(a);p(n),x(n)}y(a),k(a)}),[a,o]);var D=function(e){var t=Ks(e,null);return[t.startDate,t.endDate]};return t().createElement("div",{ref:S,className:"relative"},t().createElement("button",{onClick:function(){return u?f(!1):(f(!0),void C())},className:"flex items-center cursor-pointer gap-[4px] bg-transparent border-none p-0 text-gray-700 dark:text-gray-300"},t().createElement("span",null,function(){if("custom"===a&&o&&2===o.length&&o[0]&&o[1]){var e=i()(o[0]),t=i()(o[1]);return e.isSame(t,"day")?e.format("MMM D, YYYY"):"".concat(e.format("MMM D, YYYY")," - ").concat(t.format("MMM D, YYYY"))}var n=Qs.find((function(e){return e.key===a}));return n?n.label:"Last 7 days"}()),t().createElement(Zs,{className:u?"rotate-180":""})),u&&t().createElement("div",{className:"absolute top-full left-0 mt-1 bg-white dark:bg-[#343d43] border border-gray-200 dark:border-[#626f78] rounded-md shadow-lg z-50 p-3 w-[710px]"},t().createElement("div",{className:"flex gap-3"},t().createElement("div",{className:"min-w-[120px] flex flex-col gap-2"},Qs.map((function(e){return t().createElement("button",{key:e.key,onClick:function(){return function(e){if(k(e),"custom"!==e){var t=D(e);x(t)}}(e.key)},className:"\n                                        w-full text-left cursor-pointer text-sm transition-colors border-none p-0 bg-transparent rounded\n                                        ".concat(w===e.key?"text-accent dark:text-dark-accent font-medium":"text-gray-700 dark:text-gray-100","\n                                    ")},e.label)}))),t().createElement("div",{className:"flex-1"},t().createElement("div",{className:"flex items-center justify-between mb-4"},t().createElement("div",{className:"flex items-center gap-4"},t().createElement("div",{className:"flex items-center gap-2"},t().createElement("span",{className:"text-sm text-gray-600 dark:text-gray-400"},"Start"),t().createElement("div",{className:"px-3 py-1 bg-gray-100 dark:bg-[#626f78] text-gray-900 dark:text-gray-100 rounded text-sm min-w-[100px] text-center"},b[0]?i()(b[0]).format("DD/MM/YYYY"):i()().format("DD/MM/YYYY"))),t().createElement("div",{className:"flex items-center gap-2"},t().createElement("span",{className:"text-sm text-gray-600 dark:text-gray-300"},"End"),t().createElement("div",{className:"px-3 py-1 bg-gray-100 dark:bg-[#626f78] text-gray-900 dark:text-gray-100 rounded text-sm min-w-[100px] text-center"},b[1]?i()(b[1]).format("DD/MM/YYYY"):i()().format("DD/MM/YYYY"))))),t().createElement("div",{className:"mb-4"},t().createElement($s,{type:"range",value:b,onChange:function(e){x(e),k("custom")},allowSingleDateInRange:!0,numberOfColumns:2,getDayProps:function(e){var t=new Date;if(t.setHours(23,59,59,999),e>t)return{disabled:!0};var n=new Date;n.setHours(0,0,0,0);var a=new Date(e);return a.setHours(0,0,0,0),a.getTime()===n.getTime()?{style:{backgroundColor:"dark"===r?"rgb(75, 85, 99)":"rgb(229, 231, 235)",fontWeight:"500"}}:{}},firstDayOfWeek:1,styles:{calendar:{width:"100%"},calendarBase:{width:"100%"},monthsListControl:{color:"dark"===r?"#d1d5db":"inherit","&:hover":{backgroundColor:"dark"===r?"#626f78":"rgb(243, 244, 246)"}},yearLevelGroup:{gap:"1rem"},month:{width:"250px"},monthThead:{color:"dark"===r?"#9ca3af":"rgb(107, 114, 128)"},calendarHeaderLevel:{color:"dark"===r?"#d1d5db":"inherit",fontWeight:"500","&:hover":{backgroundColor:"dark"===r?"#626f78":"rgb(243, 244, 246)"}},calendarHeaderControl:{color:"dark"===r?"#d1d5db":"inherit","&:hover":{backgroundColor:"dark"===r?"#626f78":"rgb(243, 244, 246)"}},calendarHeaderControlIcon:{color:"dark"===r?"#d1d5db":"inherit"},day:{color:"dark"===r?"#d1d5db":"inherit",borderRadius:"50%","&:hover":{backgroundColor:"dark"===r?"#626f78":"rgb(243, 244, 246)"},"&[data-selected]":{backgroundColor:"rgb(37, 99, 235)",color:"white","&:hover":{backgroundColor:"rgb(29, 78, 216)"},"&[data-weekend]":{color:"#fff"},"&[data-last-in-range]":{backgroundColor:"rgb(37, 99, 235) !important",color:"white"}},"&[data-in-range]":{backgroundColor:"dark"===r?"rgb(30, 64, 175)":"rgb(219, 234, 254)",color:"dark"===r?"#d1d5db":"inherit",borderRadius:"50%"},"&[data-first-in-range]":{backgroundColor:"rgb(37, 99, 235)",color:"white"},"&[data-last-in-range]":{backgroundColor:"rgb(37, 99, 235)",color:"white"},"&[data-disabled]":{color:"dark"===r?"rgba(209, 213, 219, 0.4)":"rgba(107, 114, 128, 0.4)",backgroundColor:"transparent"},"&[data-weekend]":{color:"dark"===r?"rgb(209, 213, 219)":"inherit"}}}})),t().createElement("div",{className:"flex justify-end gap-2"},t().createElement("button",{onClick:function(){if(y(w),p(b),"custom"!==w)s(w),localStorage.setItem("firebox_analytics_date_period",w),localStorage.removeItem("firebox_analytics_custom_date_period");else if(b[0]&&b[1]&&b[0]instanceof Date&&b[1]instanceof Date){var e=[b[0],b[1]];l(e),s("custom"),localStorage.setItem("firebox_analytics_date_period","custom"),localStorage.setItem("firebox_analytics_custom_date_period",JSON.stringify(e))}else s("last_7_days"),localStorage.setItem("firebox_analytics_date_period","last_7_days"),localStorage.removeItem("firebox_analytics_custom_date_period");f(!1)},disabled:!O(),className:"\n                                        px-3 py-1 text-sm rounded transition-colors border-none\n                                        ".concat(O()?"bg-accent text-white hover:bg-dark-accent-hover cursor-pointer":"bg-gray-300 dark:bg-gray-600 text-gray-500 dark:text-gray-400 cursor-not-allowed opacity-50 pointer-events-none","\n                                    ")},"Apply"))))))}));const tl=el;var nl=t().createContext(),rl=t().createContext(),al=function(){return(0,e.useContext)(nl)};function il(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ol(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ol(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ol(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var sl=(0,e.memo)((function(n){var r=n.selected_campaign,a=n.onSelectCampaign,i=il((0,e.useState)(!1),2),o=i[0],s=i[1],l=il((0,e.useState)(null),2),c=l[0],u=l[1],f=il((0,e.useState)(""),2),d=f[0],h=f[1],p=il((0,e.useState)(fbox_admin_js_object.langs.ALL_CAMPAIGNS),2),v=p[0],m=p[1],y=(0,e.useMemo)((function(){return d?null==c?void 0:c.filter((function(e){return e.label.toLowerCase().includes(d.toLowerCase())})):c}),[c,d]),g=(0,e.useRef)("Filters_CampaignsDropdown");if(Gs(g,(function(){s(!1)})),(0,e.useEffect)((function(){if(null===c){var e=new IntersectionObserver((function(t){if(il(t,1)[0].isIntersecting){var n=new FormData;n.append("nonce",fpf_js_object.nonce),n.append("action","firebox_analytics_get_dropdown_campaigns"),fetch(fpf_js_object.ajax_url,{method:"POST",body:n}).then((function(e){return e.json()})).then((function(e){u(e)})),e.disconnect()}}),{rootMargin:"0px 0px 0px 0px"});e.observe(g.current)}}),[]),(0,e.useEffect)((function(){var e,t=fbox_admin_js_object.langs.ALL_CAMPAIGNS;c&&null!=c&&c.length&&(t=null===r?fbox_admin_js_object.langs.ALL_CAMPAIGNS:(null===(e=c.filter((function(e){return parseInt(e.id)===parseInt(r)}))[0])||void 0===e?void 0:e.label)||fbox_admin_js_object.langs.ALL_CAMPAIGNS),m(t)}),[c,r]),null==c||!c.permission_denied)return t().createElement("div",{ref:g,className:"relative"},t().createElement("div",{className:"leading-[24px] max-w-[400px] text-default dark:text-white min-h-[24px] min-w-[120px]"},null===c?t().createElement("div",{className:"animate-pulse h-3 bg-slate-200 dark:bg-slate-700 rounded"}):(null==c?void 0:c.length)>0&&t().createElement("div",{className:"flex items-center gap-1 justify-end"},t().createElement("div",{className:"flex items-center cursor-pointer truncate",onClick:function(){s((function(e){return!e}))}},t().createElement("div",{className:"truncate",title:v},v),t().createElement(Zs,{className:o?"rotate-180":""})),null!==r&&t().createElement("button",{type:"button",onClick:function(e){var t;null==e||null===(t=e.stopPropagation)||void 0===t||t.call(e),a(null),s(!1)},className:"inline-flex items-center cursor-pointer shrink-0 p-0 bg-transparent border-0 hover:text-accent dark:hover:text-accent",title:fbox_admin_js_object.langs.CLEAR_SELECTED_CAMPAIGN||fbox_admin_js_object.langs.VIEW_ALL_ANALYTICS,"aria-label":fbox_admin_js_object.langs.CLEAR_SELECTED_CAMPAIGN||fbox_admin_js_object.langs.VIEW_ALL_ANALYTICS},t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24","aria-hidden":"true"},t().createElement("circle",{cx:"12",cy:"12",r:"9",fill:"none",stroke:"currentColor",strokeWidth:"2"}),t().createElement("path",{d:"M9 9l6 6M15 9l-6 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}))))),c&&(null==c?void 0:c.length)>0&&o&&t().createElement("div",{className:"flex flex-col bg-white dark:bg-[#343d43] text-sm text-default hover:text-black w-[400px] absolute right-0 top-full z-20 rounded shadow-box"},t().createElement("div",{className:"flex flex-col sticky top-0 bg-white dark:bg-[#343d43] rounded-tl rounded-tr border border-solid border-grey-3 dark:border-[#626f78] border-r-0 border-l-0 border-t-0"},t().createElement("input",{autoFocus:!0,onChange:function(e){return h(e.target.value)},value:d,className:"border border-solid dark:bg-[#626f78] dark:placeholder:text-grey-4 dark:text-white border-grey-3 focus:border-grey-1 m-1 px-2 py-[11px] pr-6 rounded-[27px] shadow-none outline-none dark:border-none",placeholder:fbox_admin_js_object.langs.SEARCH_DOTS}),!d&&t().createElement("svg",{xmlns:"http://www.w3.org/2000/svg",className:"absolute dark:text-white right-3 top-1/2 -translate-y-1/2",width:"24",height:"24",viewBox:"0 -960 960 960"},t().createElement("path",{d:"M781.692-136.924 530.461-388.155q-30 24.769-69 38.769t-80.692 14q-102.55 0-173.582-71.014t-71.032-173.537q0-102.524 71.014-173.601 71.014-71.076 173.538-71.076 102.523 0 173.6 71.032T625.384-580q0 42.846-14.385 81.846-14.385 39-38.385 67.846l251.231 251.231-42.153 42.153Zm-400.923-258.46q77.308 0 130.962-53.654Q565.385-502.692 565.385-580q0-77.308-53.654-130.962-53.654-53.654-130.962-53.654-77.308 0-130.962 53.654Q196.154-657.308 196.154-580q0 77.308 53.653 130.962 53.654 53.654 130.962 53.654Z",fill:"currentColor"})),d&&t().createElement("svg",{onClick:function(){return h("")},xmlns:"http://www.w3.org/2000/svg",className:"absolute cursor-pointer dark:text-white right-3 top-1/2 -translate-y-1/2",width:"24",height:"24",viewBox:"0 -960 960 960"},t().createElement("path",{d:"M256-213.847 213.847-256l224-224-224-224L256-746.153l224 224 224-224L746.153-704l-224 224 224 224L704-213.847l-224-224-224 224Z",fill:"currentColor"}))),t().createElement("ul",{className:"m-0 h-[200px] overflow-y-auto overscroll-contain"},y.length>0?t().createElement(t().Fragment,null,Object.keys(y).map((function(e,n){return t().createElement("li",{key:n,onClick:function(){return t=y[e].id,a(t),void s(!1);var t},className:"p-1 m-0 hover:cursor-pointer ".concat(r===y[e].id?" pointer-events-none bg-pale-blue text-black dark:bg-pale-blue":"hover:bg-pale-blue dark:hover:bg-[#6b7a84] text-default hover:text-black dark:text-grey-3 dark:hover:text-white")},y[e].label)}))):t().createElement("li",{className:"pointer-events-none dark:text-grey-3 p-4 text-center m-0 h-full flex items-center justify-center"},fbox_admin_js_object.langs.NO_CAMPAIGNS_FOUND))))}));const ll=sl;function cl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)e[r]=n[r]}return e}var ul=function e(t,n){function r(e,r,a){if("undefined"!=typeof document){"number"==typeof(a=cl({},n,a)).expires&&(a.expires=new Date(Date.now()+864e5*a.expires)),a.expires&&(a.expires=a.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var o in a)a[o]&&(i+="; "+o,!0!==a[o]&&(i+="="+a[o].split(";")[0]));return document.cookie=e+"="+t.write(r,e)+i}}return Object.create({set:r,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var n=document.cookie?document.cookie.split("; "):[],r={},a=0;a<n.length;a++){var i=n[a].split("="),o=i.slice(1).join("=");try{var s=decodeURIComponent(i[0]);if(r[s]=t.read(o,s),e===s)break}catch(e){}}return e?r[e]:r}},remove:function(e,t){r(e,"",cl({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,cl({},this.attributes,t))},withConverter:function(t){return e(cl({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function fl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dl(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fl(Object(n),!0).forEach((function(t){hl(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fl(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function hl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vl={views:{label:fbox_admin_js_object.langs.VIEWS,colorClass:"text-metric-views",color:"#5383EC"},conversions:{label:fbox_admin_js_object.langs.CONVERSIONS,colorClass:"text-metric-conversions",color:"#dfa1b7"},conversionrate:{label:fbox_admin_js_object.langs.CONVERSION_RATE,colorClass:"text-metric-conversion-rate",color:"#8B5CF6",suffix:"%"}},ml=function(){return"undefined"!=typeof window&&window.wp&&window.wp.hooks?window.wp.hooks:null},yl=dl({},function(){var e=ml();return e?e.applyFilters("firebox.performance.metrics",vl):vl}()),gl=ml();gl&&gl.addAction("firebox.revenue.ready","firebox/performance-metrics",(function(){var e=ml(),t=e?e.applyFilters("firebox.performance.metrics",vl):vl;yl=dl({},t)}),10);var bl=function(){return"dark"===(ul.get("fireplugins_theme")||"light")?"dark":"light"},xl=function(){return React.createElement("div",{className:"flex flex-col gap-2"},React.createElement("div",{className:"flex gap-[4px] flex-wrap justify-between"},React.createElement("div",{className:"animate-pulse h-2 w-[100px] bg-slate-200 dark:bg-slate-700 rounded"}),React.createElement("div",{className:"animate-pulse h-2 w-[100px] bg-slate-200 dark:bg-slate-700 rounded"})),React.createElement("div",{className:"flex flex-col gap-5 justify-between h-[320px] w-full"},React.createElement("div",{className:"animate-pulse h-1 bg-slate-200 dark:bg-slate-700 rounded"}),React.createElement("div",{className:"animate-pulse h-1 bg-slate-200 dark:bg-slate-700 rounded"}),React.createElement("div",{className:"animate-pulse h-1 bg-slate-200 dark:bg-slate-700 rounded"})))},_l={list:fbox_admin_js_object.langs.DAILY,weekly:fbox_admin_js_object.langs.WEEKLY,monthly:fbox_admin_js_object.langs.MONTHLY};function wl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const kl=function(n){var r=n.showCampaignDropdown,a=void 0===r||r,i=(0,e.useContext)(rl),o=al(),s=o.date_period,l=o.custom_date_period,c=o.selected_campaign,u=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wl(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)(bl()),2),f=u[0],d=u[1];(0,e.useEffect)((function(){var e=function(){d(bl())};return window.addEventListener("fireplugins/theme/change",e),function(){window.removeEventListener("fireplugins/theme/change",e)}}),[]);var h=(0,e.useCallback)((function(e){i({type:"SET_DATE_PERIOD",payload:e})}),[]),p=(0,e.useCallback)((function(e){i({type:"SET_CAMPAIGN_DATA",payload:null}),i({type:"SET_SELECTED_CAMPAIGN",payload:e})}),[]),v=(0,e.useCallback)((function(e){i({type:"SET_CUSTOM_DATE_PERIOD",payload:e})}),[]);return t().createElement("div",{className:"flex items-center text-base justify-between gap-2 flex-wrap"},t().createElement(tl,{theme:f,date_period:s,custom_date_period:l,onSelectDatePeriod:h,onSelectCustomDatePeriod:v}),a&&t().createElement(ll,{selected_campaign:c,onSelectCampaign:p}))};function Sl(e){return Sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sl(e)}function Cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ol(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dl(e){return e+.5|0}var Al=function(e,t,n){return Math.max(Math.min(e,n),t)};function Ml(e){return Al(Dl(2.55*e),0,255)}function El(e){return Al(Dl(255*e),0,255)}function jl(e){return Al(Dl(e/2.55)/100,0,1)}function Pl(e){return Al(Dl(100*e),0,100)}var Il,Ll,Rl={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},Nl=function(e){if(Array.isArray(e))return Ol(e)}(Il="0123456789ABCDEF")||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(Il)||Ol(Il,Ll)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),Tl=function(e){return Nl[15&e]},Fl=function(e){return Nl[(240&e)>>4]+Nl[15&e]},zl=function(e){return(240&e)>>4==(15&e)};var Vl=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Hl(e,t,n){var r=t*Math.min(n,1-n),a=function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(a-3,9-a,1),-1)};return[a(0),a(8),a(4)]}function Wl(e,t,n){var r=function(r){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(a,4-a,1),0)};return[r(5),r(3),r(1)]}function $l(e,t,n){var r,a=Hl(e,1,.5);for(t+n>1&&(t*=r=1/(t+n),n*=r),r=0;r<3;r++)a[r]*=1-t-n,a[r]+=t;return a}function Bl(e){var t,n,r,a=e.r/255,i=e.g/255,o=e.b/255,s=Math.max(a,i,o),l=Math.min(a,i,o),c=(s+l)/2;return s!==l&&(r=s-l,n=c>.5?r/(2-s-l):r/(s+l),t=function(e,t,n,r,a){return e===a?(t-n)/r+(t<n?6:0):t===a?(n-e)/r+2:(e-t)/r+4}(a,i,o,r,s),t=60*t+.5),[0|t,n||0,c]}function Yl(e,t,n,r){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,n,r)).map(El)}function Ul(e,t,n){return Yl(Hl,e,t,n)}function Gl(e){return(e%360+360)%360}var Zl,Kl={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"},Xl={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"};var ql=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,Jl=function(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055},Ql=function(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)};function ec(e,t,n){if(e){var r=Bl(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=Ul(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function tc(e,t){return e?Object.assign(t||{},e):e}function nc(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=El(e[3]))):(t=tc(e,{r:0,g:0,b:0,a:1})).a=El(t.a),t}function rc(e){return"r"===e.charAt(0)?function(e){var t,n,r,a=ql.exec(e),i=255;if(a){if(a[7]!==t){var o=+a[7];i=a[8]?Ml(o):Al(255*o,0,255)}return t=+a[1],n=+a[3],r=+a[5],{r:t=255&(a[2]?Ml(t):Al(t,0,255)),g:n=255&(a[4]?Ml(n):Al(n,0,255)),b:r=255&(a[6]?Ml(r):Al(r,0,255)),a:i}}}(e):function(e){var t,n=Vl.exec(e),r=255;if(n){n[5]!==t&&(r=n[6]?Ml(+n[5]):El(+n[5]));var a=Gl(+n[2]),i=+n[3]/100,o=+n[4]/100;return{r:(t="hwb"===n[1]?function(e,t,n){return Yl($l,e,t,n)}(a,i,o):"hsv"===n[1]?function(e,t,n){return Yl(Wl,e,t,n)}(a,i,o):Ul(a,i,o))[0],g:t[1],b:t[2],a:r}}}(e)}var ac=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t instanceof e)return t;var n,r,a,i,o=Sl(t);"object"===o?n=nc(t):"string"===o&&(i=(r=t).length,"#"===r[0]&&(4===i||5===i?a={r:255&17*Rl[r[1]],g:255&17*Rl[r[2]],b:255&17*Rl[r[3]],a:5===i?17*Rl[r[4]]:255}:7!==i&&9!==i||(a={r:Rl[r[1]]<<4|Rl[r[2]],g:Rl[r[3]]<<4|Rl[r[4]],b:Rl[r[5]]<<4|Rl[r[6]],a:9===i?Rl[r[7]]<<4|Rl[r[8]]:255})),n=a||function(e){Zl||((Zl=function(){var e,t,n,r,a,i={},o=Object.keys(Xl),s=Object.keys(Kl);for(e=0;e<o.length;e++){for(r=a=o[e],t=0;t<s.length;t++)n=s[t],a=a.replace(n,Kl[n]);n=parseInt(Xl[r],16),i[a]=[n>>16&255,n>>8&255,255&n]}return i}()).transparent=[0,0,0,0]);var t=Zl[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}(t)||rc(t)),this._rgb=n,this._valid=!!n}var t,n;return t=e,(n=[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var e=tc(this._rgb);return e&&(e.a=jl(e.a)),e},set:function(e){this._rgb=nc(e)}},{key:"rgbString",value:function(){return this._valid?(e=this._rgb)&&(e.a<255?"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(jl(e.a),")"):"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")")):void 0;var e}},{key:"hexString",value:function(){return this._valid?(e=this._rgb,t=function(e){return zl(e.r)&&zl(e.g)&&zl(e.b)&&zl(e.a)}(e)?Tl:Fl,e?"#"+t(e.r)+t(e.g)+t(e.b)+function(e,t){return e<255?t(e):""}(e.a,t):void 0):void 0;var e,t}},{key:"hslString",value:function(){return this._valid?function(e){if(e){var t=Bl(e),n=t[0],r=Pl(t[1]),a=Pl(t[2]);return e.a<255?"hsla(".concat(n,", ").concat(r,"%, ").concat(a,"%, ").concat(jl(e.a),")"):"hsl(".concat(n,", ").concat(r,"%, ").concat(a,"%)")}}(this._rgb):void 0}},{key:"mix",value:function(e,t){if(e){var n,r=this.rgb,a=e.rgb,i=t===n?.5:t,o=2*i-1,s=r.a-a.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;n=1-l,r.r=255&l*r.r+n*a.r+.5,r.g=255&l*r.g+n*a.g+.5,r.b=255&l*r.b+n*a.b+.5,r.a=i*r.a+(1-i)*a.a,this.rgb=r}return this}},{key:"interpolate",value:function(e,t){return e&&(this._rgb=function(e,t,n){var r=Ql(jl(e.r)),a=Ql(jl(e.g)),i=Ql(jl(e.b));return{r:El(Jl(r+n*(Ql(jl(t.r))-r))),g:El(Jl(a+n*(Ql(jl(t.g))-a))),b:El(Jl(i+n*(Ql(jl(t.b))-i))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}},{key:"clone",value:function(){return new e(this.rgb)}},{key:"alpha",value:function(e){return this._rgb.a=El(e),this}},{key:"clearer",value:function(e){return this._rgb.a*=1-e,this}},{key:"greyscale",value:function(){var e=this._rgb,t=Dl(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}},{key:"opaquer",value:function(e){return this._rgb.a*=1+e,this}},{key:"negate",value:function(){var e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}},{key:"lighten",value:function(e){return ec(this._rgb,2,e),this}},{key:"darken",value:function(e){return ec(this._rgb,2,-e),this}},{key:"saturate",value:function(e){return ec(this._rgb,1,e),this}},{key:"desaturate",value:function(e){return ec(this._rgb,1,-e),this}},{key:"rotate",value:function(e){return function(e,t){var n=Bl(e);n[0]=Gl(n[0]+t),n=Ul(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}])&&Cl(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ic(e){return function(e){if(Array.isArray(e))return fc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||uc(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lc(e){return lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},lc(e)}function cc(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=uc(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function uc(e,t){if(e){if("string"==typeof e)return fc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fc(e,t):void 0}}function fc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dc(){}var hc,pc=(hc=0,function(){return hc++});function vc(e){return null==e}function mc(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function yc(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function gc(e){return("number"==typeof e||e instanceof Number)&&isFinite(+e)}function bc(e,t){return gc(e)?e:t}function xc(e,t){return void 0===e?t:e}var _c=function(e,t){return"string"==typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e};function wc(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)}function kc(e,t,n,r){var a,i,o;if(mc(e))if(i=e.length,r)for(a=i-1;a>=0;a--)t.call(n,e[a],a);else for(a=0;a<i;a++)t.call(n,e[a],a);else if(yc(e))for(i=(o=Object.keys(e)).length,a=0;a<i;a++)t.call(n,e[o[a]],o[a])}function Sc(e,t){var n,r,a,i;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(a=e[n],i=t[n],a.datasetIndex!==i.datasetIndex||a.index!==i.index)return!1;return!0}function Cc(e){if(mc(e))return e.map(Cc);if(yc(e)){for(var t=Object.create(null),n=Object.keys(e),r=n.length,a=0;a<r;++a)t[n[a]]=Cc(e[n[a]]);return t}return e}function Oc(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}function Dc(e,t,n,r){if(Oc(e)){var a=t[e],i=n[e];yc(a)&&yc(i)?Ac(a,i,r):t[e]=Cc(i)}}function Ac(e,t,n){var r=mc(t)?t:[t],a=r.length;if(!yc(e))return e;for(var i,o=(n=n||{}).merger||Dc,s=0;s<a;++s)if(yc(i=r[s]))for(var l=Object.keys(i),c=0,u=l.length;c<u;++c)o(l[c],e,i,n);return e}function Mc(e,t){return Ac(e,t,{merger:Ec})}function Ec(e,t,n){if(Oc(e)){var r=t[e],a=n[e];yc(r)&&yc(a)?Mc(r,a):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=Cc(a))}}var jc={"":function(e){return e},x:function(e){return e.x},y:function(e){return e.y}};function Pc(e,t){return(jc[t]||(jc[t]=function(e){var t=function(e){var t,n=[],r="",a=cc(e.split("."));try{for(a.s();!(t=a.n()).done;)(r+=t.value).endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="")}catch(e){a.e(e)}finally{a.f()}return n}(e);return function(e){var n,r=cc(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(""===a)break;e=e&&e[a]}}catch(e){r.e(e)}finally{r.f()}return e}}(t)))(e)}function Ic(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Lc=function(e){return void 0!==e},Rc=function(e){return"function"==typeof e},Nc=function(e,t){if(e.size!==t.size)return!1;var n,r=cc(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(!t.has(a))return!1}}catch(e){r.e(e)}finally{r.f()}return!0},Tc=Math.PI,Fc=2*Tc,zc=Fc+Tc,Vc=Number.POSITIVE_INFINITY,Hc=Tc/180,Wc=Tc/2,$c=Tc/4,Bc=2*Tc/3,Yc=Math.log10,Uc=Math.sign;function Gc(e,t,n){return Math.abs(e-t)<n}function Zc(e){var t=Math.round(e);e=Gc(e,t,e/1e3)?t:e;var n=Math.pow(10,Math.floor(Yc(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Kc(e){return!isNaN(parseFloat(e))&&isFinite(e)}function Xc(e,t,n){var r,a,i;for(r=0,a=e.length;r<a;r++)i=e[r][n],isNaN(i)||(t.min=Math.min(t.min,i),t.max=Math.max(t.max,i))}function qc(e){return e*(Tc/180)}function Jc(e){return e*(180/Tc)}function Qc(e){if(gc(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}}function eu(e,t){var n=t.x-e.x,r=t.y-e.y,a=Math.sqrt(n*n+r*r),i=Math.atan2(r,n);return i<-.5*Tc&&(i+=Fc),{angle:i,distance:a}}function tu(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function nu(e,t){return(e-t+zc)%Fc-Tc}function ru(e){return(e%Fc+Fc)%Fc}function au(e,t,n,r){var a=ru(e),i=ru(t),o=ru(n),s=ru(i-a),l=ru(o-a),c=ru(a-i),u=ru(a-o);return a===i||a===o||r&&i===o||s>l&&c<u}function iu(e,t,n){return Math.max(t,Math.min(n,e))}function ou(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e-6;return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function su(e,t,n){n=n||function(n){return e[n]<t};for(var r,a=e.length-1,i=0;a-i>1;)n(r=i+a>>1)?i=r:a=r;return{lo:i,hi:a}}var lu=function(e,t,n,r){return su(e,n,r?function(r){var a=e[r][t];return a<n||a===n&&e[r+1][t]===n}:function(r){return e[r][t]<n})},cu=function(e,t,n){return su(e,n,(function(r){return e[r][t]>=n}))},uu=["push","pop","shift","splice","unshift"];function fu(e,t){var n=e._chartjs;if(n){var r=n.listeners,a=r.indexOf(t);-1!==a&&r.splice(a,1),r.length>0||(uu.forEach((function(t){delete e[t]})),delete e._chartjs)}}function du(e){var t=new Set(e);return t.size===e.length?e:Array.from(t)}var hu="undefined"==typeof window?function(e){return e()}:window.requestAnimationFrame;function pu(e,t){var n=[],r=!1;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];n=i,r||(r=!0,hu.call(window,(function(){r=!1,e.apply(t,n)})))}}var vu=function(e){return"start"===e?"left":"end"===e?"right":"center"},mu=function(e,t,n){return"start"===e?t:"end"===e?n:(t+n)/2};function yu(e,t,n){var r=t.length,a=0,i=r;if(e._sorted){var o=e.iScale,s=e._parsed,l=o.axis,c=o.getUserBounds(),u=c.min,f=c.max,d=c.minDefined,h=c.maxDefined;d&&(a=iu(Math.min(lu(s,l,u).lo,n?r:lu(t,l,o.getPixelForValue(u)).lo),0,r-1)),i=h?iu(Math.max(lu(s,o.axis,f,!0).hi+1,n?0:lu(t,l,o.getPixelForValue(f),!0).hi+1),a,r)-a:r-a}return{start:a,count:i}}function gu(e){var t=e.xScale,n=e.yScale,r=e._scaleRanges,a={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=a,!0;var i=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,a),i}var bu=function(e){return 0===e||1===e},xu=function(e,t,n){return-Math.pow(2,10*(e-=1))*Math.sin((e-t)*Fc/n)},_u=function(e,t,n){return Math.pow(2,-10*e)*Math.sin((e-t)*Fc/n)+1},wu={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*Wc)},easeOutSine:function(e){return Math.sin(e*Wc)},easeInOutSine:function(e){return-.5*(Math.cos(Tc*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return bu(e)?e:e<.5?.5*Math.pow(2,10*(2*e-1)):.5*(2-Math.pow(2,-10*(2*e-1)))},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){return bu(e)?e:xu(e,.075,.3)},easeOutElastic:function(e){return bu(e)?e:_u(e,.075,.3)},easeInOutElastic:function(e){var t=.1125;return bu(e)?e:e<.5?.5*xu(2*e,t,.45):.5+.5*_u(2*e-1,t,.45)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-wu.easeOutBounce(1-e)},easeOutBounce:function(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*wu.easeInBounce(2*e):.5*wu.easeOutBounce(2*e-1)+.5}};function ku(e){if(e&&"object"===lc(e)){var t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function Su(e){return ku(e)?e:new ac(e)}function Cu(e){return ku(e)?e:new ac(e).saturate(.5).darken(.1).hexString()}var Ou=["x","y","borderWidth","radius","tension"],Du=["color","borderColor","backgroundColor"],Au=new Map;function Mu(e,t,n){return function(e,t){t=t||{};var n=e+JSON.stringify(t),r=Au.get(n);return r||(r=new Intl.NumberFormat(e,t),Au.set(n,r)),r}(t,n).format(e)}var Eu={values:function(e){return mc(e)?e:""+e},numeric:function(e,t,n){if(0===e)return"0";var r,a=this.chart.options.locale,i=e;if(n.length>1){var o=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(o<1e-4||o>1e15)&&(r="scientific"),i=function(e,t){var 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}(e,n)}var s=Yc(Math.abs(i)),l=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),c={notation:r,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(c,this.options.ticks.format),Mu(e,a,c)},logarithmic:function(e,t,n){if(0===e)return"0";var r=n[t].significand||e/Math.pow(10,Math.floor(Yc(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?Eu.numeric.call(this,e,t,n):""}},ju={formatters:Eu},Pu=Object.create(null),Iu=Object.create(null);function Lu(e,t){if(!t)return e;for(var n=t.split("."),r=0,a=n.length;r<a;++r){var i=n[r];e=e[i]||(e[i]=Object.create(null))}return e}function Ru(e,t,n){return"string"==typeof t?Ac(Lu(e,t),n):Ac(Lu(e,""),t)}var Nu=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),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=function(e){return e.chart.platform.getDevicePixelRatio()},this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=function(e,t){return Cu(t.backgroundColor)},this.hoverBorderColor=function(e,t){return Cu(t.borderColor)},this.hoverColor=function(e,t){return Cu(t.color)},this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(n)}var t,n;return t=e,(n=[{key:"set",value:function(e,t){return Ru(this,e,t)}},{key:"get",value:function(e){return Lu(this,e)}},{key:"describe",value:function(e,t){return Ru(Iu,e,t)}},{key:"override",value:function(e,t){return Ru(Pu,e,t)}},{key:"route",value:function(e,t,n,r){var a,i=Lu(this,e),o=Lu(this,n),s="_"+t;Object.defineProperties(i,(oc(a={},s,{value:i[t],writable:!0}),oc(a,t,{enumerable:!0,get:function(){var e=this[s],t=o[r];return yc(e)?Object.assign({},t,e):xc(e,t)},set:function(e){this[s]=e}}),a))}},{key:"apply",value:function(e){var t=this;e.forEach((function(e){return e(t)}))}}])&&sc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Tu=new Nu({_scriptable:function(e){return!e.startsWith("on")},_indexable:function(e){return"events"!==e},hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:function(e){return"onProgress"!==e&&"onComplete"!==e&&"fn"!==e}}),e.set("animations",{colors:{type:"color",properties:Du},numbers:{type:"number",properties:Ou}}),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:function(e){return 0|e}}}}})},function(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:function(e,t){return t.lineWidth},tickColor:function(e,t){return t.color},offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:ju.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:function(e){return!e.startsWith("before")&&!e.startsWith("after")&&"callback"!==e&&"parser"!==e},_indexable:function(e){return"borderDash"!==e&&"tickBorderDash"!==e&&"dash"!==e}}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:function(e){return"backdropPadding"!==e&&"callback"!==e},_indexable:function(e){return"backdropPadding"!==e}})}]);function Fu(e,t,n,r,a){var i=t[a];return i||(i=t[a]=e.measureText(a).width,n.push(a)),i>r&&(r=i),r}function zu(e,t,n,r){var a=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(a=r.data={},i=r.garbageCollect=[],r.font=t),e.save(),e.font=t;var o,s,l,c,u,f=0,d=n.length;for(o=0;o<d;o++)if(null==(c=n[o])||mc(c)){if(mc(c))for(s=0,l=c.length;s<l;s++)null==(u=c[s])||mc(u)||(f=Fu(e,a,i,f,u))}else f=Fu(e,a,i,f,c);e.restore();var h=i.length/2;if(h>n.length){for(o=0;o<h;o++)delete a[i[o]];i.splice(0,h)}return f}function Vu(e,t,n){var r=e.currentDevicePixelRatio,a=0!==n?Math.max(n/2,.5):0;return Math.round((t-a)*r)/r+a}function Hu(e,t){(t=t||e.getContext("2d")).save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore()}function Wu(e,t,n,r){$u(e,t,n,r,null)}function $u(e,t,n,r,a){var i,o,s,l,c,u,f,d,h=t.pointStyle,p=t.rotation,v=t.radius,m=(p||0)*Hc;if(h&&"object"===lc(h)&&("[object HTMLImageElement]"===(i=h.toString())||"[object HTMLCanvasElement]"===i))return e.save(),e.translate(n,r),e.rotate(m),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),void e.restore();if(!(isNaN(v)||v<=0)){switch(e.beginPath(),h){default:a?e.ellipse(n,r,a/2,v,0,0,Fc):e.arc(n,r,v,0,Fc),e.closePath();break;case"triangle":u=a?a/2:v,e.moveTo(n+Math.sin(m)*u,r-Math.cos(m)*v),m+=Bc,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*v),m+=Bc,e.lineTo(n+Math.sin(m)*u,r-Math.cos(m)*v),e.closePath();break;case"rectRounded":l=v-(c=.516*v),o=Math.cos(m+$c)*l,f=Math.cos(m+$c)*(a?a/2-c:l),s=Math.sin(m+$c)*l,d=Math.sin(m+$c)*(a?a/2-c:l),e.arc(n-f,r-s,c,m-Tc,m-Wc),e.arc(n+d,r-o,c,m-Wc,m),e.arc(n+f,r+s,c,m,m+Wc),e.arc(n-d,r+o,c,m+Wc,m+Tc),e.closePath();break;case"rect":if(!p){l=Math.SQRT1_2*v,u=a?a/2:l,e.rect(n-u,r-l,2*u,2*l);break}m+=$c;case"rectRot":f=Math.cos(m)*(a?a/2:v),o=Math.cos(m)*v,s=Math.sin(m)*v,d=Math.sin(m)*(a?a/2:v),e.moveTo(n-f,r-s),e.lineTo(n+d,r-o),e.lineTo(n+f,r+s),e.lineTo(n-d,r+o),e.closePath();break;case"crossRot":m+=$c;case"cross":f=Math.cos(m)*(a?a/2:v),o=Math.cos(m)*v,s=Math.sin(m)*v,d=Math.sin(m)*(a?a/2:v),e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"star":f=Math.cos(m)*(a?a/2:v),o=Math.cos(m)*v,s=Math.sin(m)*v,d=Math.sin(m)*(a?a/2:v),e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o),m+=$c,f=Math.cos(m)*(a?a/2:v),o=Math.cos(m)*v,s=Math.sin(m)*v,d=Math.sin(m)*(a?a/2:v),e.moveTo(n-f,r-s),e.lineTo(n+f,r+s),e.moveTo(n+d,r-o),e.lineTo(n-d,r+o);break;case"line":o=a?a/2:Math.cos(m)*v,s=Math.sin(m)*v,e.moveTo(n-o,r-s),e.lineTo(n+o,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(m)*(a?a/2:v),r+Math.sin(m)*v);break;case!1:e.closePath()}e.fill(),t.borderWidth>0&&e.stroke()}}function Bu(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 Yu(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Uu(e){e.restore()}function Gu(e,t,n,r,a){if(!t)return e.lineTo(n.x,n.y);if("middle"===a){var i=(t.x+n.x)/2;e.lineTo(i,t.y),e.lineTo(i,n.y)}else"after"===a!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Zu(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 Ku(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),vc(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 Xu(e,t,n,r,a){if(a.strikethrough||a.underline){var i=e.measureText(r),o=t-i.actualBoundingBoxLeft,s=t+i.actualBoundingBoxRight,l=n-i.actualBoundingBoxAscent,c=n+i.actualBoundingBoxDescent,u=a.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=a.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function qu(e,t){var n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function Ju(e,t,n,r,a){var i,o,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},l=mc(t)?t:[t],c=s.strokeWidth>0&&""!==s.strokeColor;for(e.save(),e.font=a.string,Ku(e,s),i=0;i<l.length;++i)o=l[i],s.backdrop&&qu(e,s.backdrop),c&&(s.strokeColor&&(e.strokeStyle=s.strokeColor),vc(s.strokeWidth)||(e.lineWidth=s.strokeWidth),e.strokeText(o,n,r,s.maxWidth)),e.fillText(o,n,r,s.maxWidth),Xu(e,n,r,o,s),r+=Number(a.lineHeight);e.restore()}function Qu(e,t){var n=t.x,r=t.y,a=t.w,i=t.h,o=t.radius;e.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*Tc,Tc,!0),e.lineTo(n,r+i-o.bottomLeft),e.arc(n+o.bottomLeft,r+i-o.bottomLeft,o.bottomLeft,Tc,Wc,!0),e.lineTo(n+a-o.bottomRight,r+i),e.arc(n+a-o.bottomRight,r+i-o.bottomRight,o.bottomRight,Wc,0,!0),e.lineTo(n+a,r+o.topRight),e.arc(n+a-o.topRight,r+o.topRight,o.topRight,0,-Wc,!0),e.lineTo(n+o.topLeft,r)}var ef=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,tf=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function nf(e,t){var n=(""+e).match(ef);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e}function rf(e,t){var n,r={},a=yc(t),i=a?Object.keys(t):t,o=yc(e)?a?function(n){return xc(e[n],e[t[n]])}:function(t){return e[t]}:function(){return e},s=cc(i);try{for(s.s();!(n=s.n()).done;){var l=n.value;r[l]=+o(l)||0}}catch(e){s.e(e)}finally{s.f()}return r}function af(e){return rf(e,{top:"y",right:"x",bottom:"y",left:"x"})}function of(e){return rf(e,["topLeft","topRight","bottomLeft","bottomRight"])}function sf(e){var t=af(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function lf(e,t){e=e||{},t=t||Tu.font;var n=xc(e.size,t.size);"string"==typeof n&&(n=parseInt(n,10));var r=xc(e.style,t.style);r&&!(""+r).match(tf)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);var a={family:xc(e.family,t.family),lineHeight:nf(xc(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:xc(e.weight,t.weight),string:""};return a.string=function(e){return!e||vc(e.size)||vc(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}(a),a}function cf(e,t,n,r){var a,i,o,s=!0;for(a=0,i=e.length;a<i;++a)if(void 0!==(o=e[a])&&(void 0!==t&&"function"==typeof o&&(o=o(t),s=!1),void 0!==n&&mc(o)&&(o=o[n%o.length],s=!1),void 0!==o))return r&&!s&&(r.cacheable=!1),o}function uf(e,t){return Object.assign(Object.create(e),t)}function ff(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[""],r=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return e[0]},o=r||e;void 0===a&&(a=kf("_fallback",e));var s=(oc(t={},Symbol.toStringTag,"Object"),oc(t,"_cacheable",!0),oc(t,"_scopes",e),oc(t,"_rootScopes",o),oc(t,"_fallback",a),oc(t,"_getTarget",i),oc(t,"override",(function(t){return ff([t].concat(ic(e)),n,o,a)})),t);return new Proxy(s,{deleteProperty:function(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get:function(t,r){return mf(t,r,(function(){return wf(r,n,e,t)}))},getOwnPropertyDescriptor:function(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf:function(){return Reflect.getPrototypeOf(e[0])},has:function(e,t){return Sf(e).includes(t)},ownKeys:function(e){return Sf(e)},set:function(e,t,n){var r=e._storage||(e._storage=i());return e[t]=r[t]=n,delete e._keys,!0}})}function df(e,t,n,r){var a={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:hf(e,r),setContext:function(t){return df(e,t,n,r)},override:function(a){return df(e.override(a),t,n,r)}};return new Proxy(a,{deleteProperty:function(t,n){return delete t[n],delete e[n],!0},get:function(e,t,n){return mf(e,t,(function(){return function(e,t,n){var r=e._proxy,a=e._context,i=e._subProxy,o=e._descriptors,s=r[t];return Rc(s)&&o.isScriptable(t)&&(s=function(e,t,n,r){var a=n._proxy,i=n._context,o=n._subProxy,s=n._stack;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);var l=t(i,o||r);return s.delete(e),vf(e,l)&&(l=xf(a._scopes,a,e,l)),l}(t,s,e,n)),mc(s)&&s.length&&(s=function(e,t,n,r){var a=n._proxy,i=n._context,o=n._subProxy,s=n._descriptors;if(void 0!==i.index&&r(e))return t[i.index%t.length];if(yc(t[0])){var l=t,c=a._scopes.filter((function(e){return e!==l}));t=[];var u,f=cc(l);try{for(f.s();!(u=f.n()).done;){var d=xf(c,a,e,u.value);t.push(df(d,i,o&&o[e],s))}}catch(e){f.e(e)}finally{f.f()}}return t}(t,s,e,o.isIndexable)),vf(t,s)&&(s=df(s,a,i&&i[t],o)),s}(e,t,n)}))},getOwnPropertyDescriptor:function(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf:function(){return Reflect.getPrototypeOf(e)},has:function(t,n){return Reflect.has(e,n)},ownKeys:function(){return Reflect.ownKeys(e)},set:function(t,n,r){return e[n]=r,delete t[n],!0}})}function hf(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},n=e._scriptable,r=void 0===n?t.scriptable:n,a=e._indexable,i=void 0===a?t.indexable:a,o=e._allKeys,s=void 0===o?t.allKeys:o;return{allKeys:s,scriptable:r,indexable:i,isScriptable:Rc(r)?r:function(){return r},isIndexable:Rc(i)?i:function(){return i}}}var pf=function(e,t){return e?e+Ic(t):t},vf=function(e,t){return yc(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object)};function mf(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];var r=n();return e[t]=r,r}function yf(e,t,n){return Rc(e)?e(t,n):e}var gf=function(e,t){return!0===e?t:"string"==typeof e?Pc(t,e):void 0};function bf(e,t,n,r,a){var i,o=cc(t);try{for(o.s();!(i=o.n()).done;){var s=i.value,l=gf(n,s);if(l){e.add(l);var c=yf(l._fallback,n,a);if(void 0!==c&&c!==n&&c!==r)return c}else if(!1===l&&void 0!==r&&n!==r)return null}}catch(e){o.e(e)}finally{o.f()}return!1}function xf(e,t,n,r){var a=t._rootScopes,i=yf(t._fallback,n,r),o=[].concat(ic(e),ic(a)),s=new Set;s.add(r);var l=_f(s,o,n,i||n,r);return null!==l&&(void 0===i||i===n||null!==(l=_f(s,o,i,l,r)))&&ff(Array.from(s),[""],a,i,(function(){return function(e,t,n){var r=e._getTarget();t in r||(r[t]={});var a=r[t];return mc(a)&&yc(n)?n:a||{}}(t,n,r)}))}function _f(e,t,n,r,a){for(;n;)n=bf(e,t,n,r,a);return n}function wf(e,t,n,r){var a,i,o=cc(t);try{for(o.s();!(i=o.n()).done;){var s=i.value;if(void 0!==(a=kf(pf(s,e),n)))return vf(e,a)?xf(n,r,e,a):a}}catch(e){o.e(e)}finally{o.f()}}function kf(e,t){var n,r=cc(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a){var i=a[e];if(void 0!==i)return i}}}catch(e){r.e(e)}finally{r.f()}}function Sf(e){var t=e._keys;return t||(t=e._keys=function(e){var t,n=new Set,r=cc(e);try{for(r.s();!(t=r.n()).done;){var a,i=t.value,o=cc(Object.keys(i).filter((function(e){return!e.startsWith("_")})));try{for(o.s();!(a=o.n()).done;){var s=a.value;n.add(s)}}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return Array.from(n)}(e._scopes)),t}function Cf(e,t,n,r){var a,i,o,s,l=e.iScale,c=this._parsing.key,u=void 0===c?"r":c,f=new Array(r);for(a=0,i=r;a<i;++a)s=t[o=a+n],f[a]={r:l.parse(Pc(s,u),o)};return f}var Of=Number.EPSILON||1e-14,Df=function(e,t){return t<e.length&&!e[t].skip&&e[t]},Af=function(e){return"x"===e?"y":"x"};function Mf(e,t,n,r){var a=e.skip?t:e,i=t,o=n.skip?t:n,s=tu(i,a),l=tu(o,i),c=s/(s+l),u=l/(s+l),f=r*(c=isNaN(c)?0:c),d=r*(u=isNaN(u)?0:u);return{previous:{x:i.x-f*(o.x-a.x),y:i.y-f*(o.y-a.y)},next:{x:i.x+d*(o.x-a.x),y:i.y+d*(o.y-a.y)}}}function Ef(e,t,n){for(var r,a,i,o,s,l=e.length,c=Df(e,0),u=0;u<l-1;++u)s=c,c=Df(e,u+1),s&&c&&(Gc(t[u],0,Of)?n[u]=n[u+1]=0:(r=n[u]/t[u],a=n[u+1]/t[u],(o=Math.pow(r,2)+Math.pow(a,2))<=9||(i=3/Math.sqrt(o),n[u]=r*i*t[u],n[u+1]=a*i*t[u])))}function jf(e,t){for(var n,r,a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x",o=Af(i),s=e.length,l=Df(e,0),c=0;c<s;++c)if(r=a,a=l,l=Df(e,c+1),a){var u=a[i],f=a[o];r&&(n=(u-r[i])/3,a["cp1".concat(i)]=u-n,a["cp1".concat(o)]=f-n*t[c]),l&&(n=(l[i]-u)/3,a["cp2".concat(i)]=u+n,a["cp2".concat(o)]=f+n*t[c])}}function Pf(e,t,n){return Math.max(Math.min(e,n),t)}function If(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Lf(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t}function Rf(e,t,n){var r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}var Nf=function(e){return e.ownerDocument.defaultView.getComputedStyle(e,null)},Tf=["top","right","bottom","left"];function Ff(e,t,n){var r={};n=n?"-"+n:"";for(var a=0;a<4;a++){var i=Tf[a];r[i]=parseFloat(e[t+"-"+i+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}function zf(e,t){if("native"in e)return e;var n=t.canvas,r=t.currentDevicePixelRatio,a=Nf(n),i="border-box"===a.boxSizing,o=Ff(a,"padding"),s=Ff(a,"border","width"),l=function(e,t){var n,r,a=e.touches,i=a&&a.length?a[0]:e,o=i.offsetX,s=i.offsetY,l=!1;if(function(e,t,n){return(e>0||t>0)&&(!n||!n.shadowRoot)}(o,s,e.target))n=o,r=s;else{var c=t.getBoundingClientRect();n=i.clientX-c.left,r=i.clientY-c.top,l=!0}return{x:n,y:r,box:l}}(e,n),c=l.x,u=l.y,f=l.box,d=o.left+(f&&s.left),h=o.top+(f&&s.top),p=t.width,v=t.height;return i&&(p-=o.width+s.width,v-=o.height+s.height),{x:Math.round((c-d)/p*n.width/r),y:Math.round((u-h)/v*n.height/r)}}var Vf=function(e){return Math.round(10*e)/10};function Hf(e,t,n){var r=t||1,a=Math.floor(e.height*r),i=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);var o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height="".concat(e.height,"px"),o.style.width="".concat(e.width,"px")),(e.currentDevicePixelRatio!==r||o.height!==a||o.width!==i)&&(e.currentDevicePixelRatio=r,o.height=a,o.width=i,e.ctx.setTransform(r,0,0,r,0,0),!0)}var Wf=function(){var e=!1;try{var t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}return e}();function $f(e,t){var n=function(e,t){return Nf(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Bf(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Yf(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function Uf(e,t,n,r){var a={x:e.cp2x,y:e.cp2y},i={x:t.cp1x,y:t.cp1y},o=Bf(e,a,n),s=Bf(a,i,n),l=Bf(i,t,n),c=Bf(o,s,n),u=Bf(s,l,n);return Bf(c,u,n)}function Gf(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}}function Zf(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function Kf(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function Xf(e){return"angle"===e?{between:au,compare:nu,normalize:ru}:{between:ou,compare:function(e,t){return e-t},normalize:function(e){return e}}}function qf(e){var t=e.start,n=e.end,r=e.count;return{start:t%r,end:n%r,loop:e.loop&&(n-t+1)%r==0,style:e.style}}function Jf(e,t,n){if(!n)return[e];for(var r,a,i,o=n.property,s=n.start,l=n.end,c=t.length,u=Xf(o),f=u.compare,d=u.between,h=u.normalize,p=function(e,t,n){var r,a,i=n.property,o=n.start,s=n.end,l=Xf(i),c=l.between,u=l.normalize,f=t.length,d=e.start,h=e.end,p=e.loop;if(p){for(d+=f,h+=f,r=0,a=f;r<a&&c(u(t[d%f][i]),o,s);++r)d--,h--;d%=f,h%=f}return h<d&&(h+=f),{start:d,end:h,loop:p,style:e.style}}(e,t,n),v=p.start,m=p.end,y=p.loop,g=p.style,b=[],x=!1,_=null,w=v,k=v;w<=m;++w)(a=t[w%c]).skip||(r=h(a[o]))!==i&&(x=d(r,s,l),null===_&&(x||d(s,i,r)&&0!==f(s,i))&&(_=0===f(r,s)?w:k),null!==_&&(!x||0===f(l,r)||d(l,i,r))&&(b.push(qf({start:_,end:w,loop:y,count:c,style:g})),_=null),k=w,i=r);return null!==_&&b.push(qf({start:_,end:m,loop:y,count:c,style:g})),b}function Qf(e,t){for(var n=[],r=e.segments,a=0;a<r.length;a++){var i=Jf(r[a],e.points,t);i.length&&n.push.apply(n,ic(i))}return n}function ed(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function td(e,t){if(!t)return!1;var n=[],r=function(e,t){return ku(t)?(n.includes(t)||n.push(t),n.indexOf(t)):t};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function nd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nd(Object(n),!0).forEach((function(t){hd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ad(){return ad="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=id(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ad.apply(this,arguments)}function id(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=fd(e)););return e}function od(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sd(e,t)}function sd(e,t){return sd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},sd(e,t)}function ld(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=fd(e);if(t){var a=fd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cd(this,n)}}function cd(e,t){if(t&&("object"===vd(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ud(e)}function ud(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fd(e){return fd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fd(e)}function dd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||yd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pd(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=yd(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function vd(e){return vd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vd(e)}function md(e){return function(e){if(Array.isArray(e))return gd(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||yd(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function yd(e,t){if(e){if("string"==typeof e)return gd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gd(e,t):void 0}}function gd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _d(e,t,n){return t&&xd(e.prototype,t),n&&xd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var wd=new(function(){function e(){bd(this,e),this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}return _d(e,[{key:"_notify",value:function(e,t,n,r){var a=t.listeners[r],i=t.duration;a.forEach((function(r){return r({chart:e,initial:t.initial,numSteps:i,currentStep:Math.min(n-t.start,i)})}))}},{key:"_refresh",value:function(){var e=this;this._request||(this._running=!0,this._request=hu.call(window,(function(){e._update(),e._request=null,e._running&&e._refresh()})))}},{key:"_update",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Date.now(),n=0;this._charts.forEach((function(r,a){if(r.running&&r.items.length){for(var i,o=r.items,s=o.length-1,l=!1;s>=0;--s)(i=o[s])._active?(i._total>r.duration&&(r.duration=i._total),i.tick(t),l=!0):(o[s]=o[o.length-1],o.pop());l&&(a.draw(),e._notify(a,r,t,"progress")),o.length||(r.running=!1,e._notify(a,r,t,"complete"),r.initial=!1),n+=o.length}})),this._lastDate=t,0===n&&(this._running=!1)}},{key:"_getAnims",value:function(e){var t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}},{key:"listen",value:function(e,t,n){this._getAnims(e).listeners[t].push(n)}},{key:"add",value:function(e,t){var n;t&&t.length&&(n=this._getAnims(e).items).push.apply(n,md(t))}},{key:"has",value:function(e){return this._getAnims(e).items.length>0}},{key:"start",value:function(e){var t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((function(e,t){return Math.max(e,t._duration)}),0),this._refresh())}},{key:"running",value:function(e){if(!this._running)return!1;var t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}},{key:"stop",value:function(e){var t=this._charts.get(e);if(t&&t.items.length){for(var n=t.items,r=n.length-1;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}}},{key:"remove",value:function(e){return this._charts.delete(e)}}]),e}()),kd="transparent",Sd={boolean:function(e,t,n){return n>.5?t:e},color:function(e,t,n){var r=Su(e||kd),a=r.valid&&Su(t||kd);return a&&a.valid?a.mix(r,n).hexString():t},number:function(e,t,n){return e+(t-e)*n}},Cd=function(){function e(t,n,r,a){bd(this,e);var i=n[r];a=cf([t.to,a,i,t.from]);var o=cf([t.from,i,a]);this._active=!0,this._fn=t.fn||Sd[t.type||vd(o)],this._easing=wu[t.easing]||wu.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=o,this._to=a,this._promises=void 0}return _d(e,[{key:"active",value:function(){return this._active}},{key:"update",value:function(e,t,n){if(this._active){this._notify(!1);var r=this._target[this._prop],a=n-this._start,i=this._duration-a;this._start=n,this._duration=Math.floor(Math.max(i,e.duration)),this._total+=a,this._loop=!!e.loop,this._to=cf([e.to,t,r,e.from]),this._from=cf([e.from,r,t])}}},{key:"cancel",value:function(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}},{key:"tick",value:function(e){var t,n=e-this._start,r=this._duration,a=this._prop,i=this._from,o=this._loop,s=this._to;if(this._active=i!==s&&(o||n<r),!this._active)return this._target[a]=s,void this._notify(!0);n<0?this._target[a]=i:(t=n/r%2,t=o&&t>1?2-t:t,t=this._easing(Math.min(1,Math.max(0,t))),this._target[a]=this._fn(i,s,t))}},{key:"wait",value:function(){var e=this._promises||(this._promises=[]);return new Promise((function(t,n){e.push({res:t,rej:n})}))}},{key:"_notify",value:function(e){for(var t=e?"res":"rej",n=this._promises||[],r=0;r<n.length;r++)n[r][t]()}}]),e}(),Od=function(){function e(t,n){bd(this,e),this._chart=t,this._properties=new Map,this.configure(n)}return _d(e,[{key:"configure",value:function(e){if(yc(e)){var t=Object.keys(Tu.animation),n=this._properties;Object.getOwnPropertyNames(e).forEach((function(r){var a=e[r];if(yc(a)){var i,o={},s=pd(t);try{for(s.s();!(i=s.n()).done;){var l=i.value;o[l]=a[l]}}catch(e){s.e(e)}finally{s.f()}(mc(a.properties)&&a.properties||[r]).forEach((function(e){e!==r&&n.has(e)||n.set(e,o)}))}}))}}},{key:"_animateOptions",value:function(e,t){var n=t.options,r=function(e,t){if(t){var n=e.options;if(n)return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n;e.options=t}}(e,n);if(!r)return[];var a=this._createAnimations(r,n);return n.$shared&&function(e,t){for(var n=[],r=Object.keys(t),a=0;a<r.length;a++){var i=e[r[a]];i&&i.active()&&n.push(i.wait())}return Promise.all(n)}(e.options.$animations,n).then((function(){e.options=n}),(function(){})),a}},{key:"_createAnimations",value:function(e,t){var n,r=this._properties,a=[],i=e.$animations||(e.$animations={}),o=Object.keys(t),s=Date.now();for(n=o.length-1;n>=0;--n){var l=o[n];if("$"!==l.charAt(0))if("options"!==l){var c=t[l],u=i[l],f=r.get(l);if(u){if(f&&u.active()){u.update(f,c,s);continue}u.cancel()}f&&f.duration?(i[l]=u=new Cd(f,e,l,c),a.push(u)):e[l]=c}else a.push.apply(a,md(this._animateOptions(e,t)))}return a}},{key:"update",value:function(e,t){if(0!==this._properties.size){var n=this._createAnimations(e,t);return n.length?(wd.add(this._chart,n),!0):void 0}Object.assign(e,t)}}]),e}();function Dd(e,t){var n=e&&e.options||{},r=n.reverse,a=void 0===n.min?t:0,i=void 0===n.max?t:0;return{start:r?i:a,end:r?a:i}}function Ad(e,t){var n,r,a=[],i=e._getSortedDatasetMetas(t);for(n=0,r=i.length;n<r;++n)a.push(i[n].index);return a}function Md(e,t,n){var r,a,i,o,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},l=e.keys,c="single"===s.mode;if(null!==t){for(r=0,a=l.length;r<a;++r){if((i=+l[r])===n){if(s.all)continue;break}gc(o=e.values[i])&&(c||0===t||Uc(t)===Uc(o))&&(t+=o)}return t}}function Ed(e,t){var n=e&&e.options.stacked;return n||void 0===n&&void 0!==t.stack}function jd(e,t,n){var r=e[t]||(e[t]={});return r[n]||(r[n]={})}function Pd(e,t,n,r){var a,i=pd(t.getMatchingVisibleMetas(r).reverse());try{for(i.s();!(a=i.n()).done;){var o=a.value,s=e[o.index];if(n&&s>0||!n&&s<0)return o.index}}catch(e){i.e(e)}finally{i.f()}return null}function Id(e,t){for(var n,r=e.chart,a=e._cachedMeta,i=r._stacks||(r._stacks={}),o=a.iScale,s=a.vScale,l=a.index,c=o.axis,u=s.axis,f=function(e,t,n){return"".concat(e.id,".").concat(t.id,".").concat(n.stack||n.type)}(o,s,a),d=t.length,h=0;h<d;++h){var p=t[h],v=p[c],m=p[u];(n=(p._stacks||(p._stacks={}))[u]=jd(i,f,v))[l]=m,n._top=Pd(n,s,!0,a.type),n._bottom=Pd(n,s,!1,a.type),(n._visualValues||(n._visualValues={}))[l]=m}}function Ld(e,t){var n=e.scales;return Object.keys(n).filter((function(e){return n[e].axis===t})).shift()}function Rd(e,t){var n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){var a,i=pd(t=t||e._parsed);try{for(i.s();!(a=i.n()).done;){var o=a.value._stacks;if(!o||void 0===o[r]||void 0===o[r][n])return;delete o[r][n],void 0!==o[r]._visualValues&&void 0!==o[r]._visualValues[n]&&delete o[r]._visualValues[n]}}catch(e){i.e(e)}finally{i.f()}}}var Nd=function(e){return"reset"===e||"none"===e},Td=function(e,t){return t?e:Object.assign({},e)},Fd=function(){function e(t,n){bd(this,e),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=(this instanceof e?this.constructor:void 0).datasetElementType,this.dataElementType=(this instanceof e?this.constructor:void 0).dataElementType,this.initialize()}return _d(e,[{key:"initialize",value:function(){var e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Ed(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}},{key:"updateIndex",value:function(e){this.index!==e&&Rd(this._cachedMeta),this.index=e}},{key:"linkScales",value:function(){var e=this.chart,t=this._cachedMeta,n=this.getDataset(),r=function(e,t,n,r){return"x"===e?t:"r"===e?r:n},a=t.xAxisID=xc(n.xAxisID,Ld(e,"x")),i=t.yAxisID=xc(n.yAxisID,Ld(e,"y")),o=t.rAxisID=xc(n.rAxisID,Ld(e,"r")),s=t.indexAxis,l=t.iAxisID=r(s,a,i,o),c=t.vAxisID=r(s,i,a,o);t.xScale=this.getScaleForId(a),t.yScale=this.getScaleForId(i),t.rScale=this.getScaleForId(o),t.iScale=this.getScaleForId(l),t.vScale=this.getScaleForId(c)}},{key:"getDataset",value:function(){return this.chart.data.datasets[this.index]}},{key:"getMeta",value:function(){return this.chart.getDatasetMeta(this.index)}},{key:"getScaleForId",value:function(e){return this.chart.scales[e]}},{key:"_getOtherScale",value:function(e){var t=this._cachedMeta;return e===t.iScale?t.vScale:t.iScale}},{key:"reset",value:function(){this._update("reset")}},{key:"_destroy",value:function(){var e=this._cachedMeta;this._data&&fu(this._data,this),e._stacked&&Rd(e)}},{key:"_dataCheck",value:function(){var e,t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(yc(n))this._data=function(e){var t,n,r,a=Object.keys(e),i=new Array(a.length);for(t=0,n=a.length;t<n;++t)r=a[t],i[t]={x:r,y:e[r]};return i}(n);else if(r!==n){if(r){fu(r,this);var a=this._cachedMeta;Rd(a),a._parsed=[]}n&&Object.isExtensible(n)&&(this,(e=n)._chartjs?e._chartjs.listeners.push(this):(Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),uu.forEach((function(t){var n="_onData"+Ic(t),r=e[t];Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:function(){for(var t=arguments.length,a=new Array(t),i=0;i<t;i++)a[i]=arguments[i];var o=r.apply(this,a);return e._chartjs.listeners.forEach((function(e){"function"==typeof e[n]&&e[n].apply(e,a)})),o}})})))),this._syncList=[],this._data=n}}},{key:"addElements",value:function(){var e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}},{key:"buildOrUpdateElements",value:function(e){var t=this._cachedMeta,n=this.getDataset(),r=!1;this._dataCheck();var a=t._stacked;t._stacked=Ed(t.vScale,t),t.stack!==n.stack&&(r=!0,Rd(t),t.stack=n.stack),this._resyncElements(e),(r||a!==t._stacked)&&Id(this,t._parsed)}},{key:"configure",value:function(){var e=this.chart.config,t=e.datasetScopeKeys(this._type),n=e.getOptionScopes(this.getDataset(),t,!0);this.options=e.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}},{key:"parse",value:function(e,t){var n,r,a,i=this._cachedMeta,o=this._data,s=i.iScale,l=i._stacked,c=s.axis,u=0===e&&t===o.length||i._sorted,f=e>0&&i._parsed[e-1];if(!1===this._parsing)i._parsed=o,i._sorted=!0,a=o;else{for(a=mc(o[e])?this.parseArrayData(i,o,e,t):yc(o[e])?this.parseObjectData(i,o,e,t):this.parsePrimitiveData(i,o,e,t),n=0;n<t;++n)i._parsed[n+e]=r=a[n],u&&((null===r[c]||f&&r[c]<f[c])&&(u=!1),f=r);i._sorted=u}l&&Id(this,a)}},{key:"parsePrimitiveData",value:function(e,t,n,r){var a,i,o,s=e.iScale,l=e.vScale,c=s.axis,u=l.axis,f=s.getLabels(),d=s===l,h=new Array(r);for(a=0,i=r;a<i;++a){var p;o=a+n,h[a]=(hd(p={},c,d||s.parse(f[o],o)),hd(p,u,l.parse(t[o],o)),p)}return h}},{key:"parseArrayData",value:function(e,t,n,r){var a,i,o,s,l=e.xScale,c=e.yScale,u=new Array(r);for(a=0,i=r;a<i;++a)s=t[o=a+n],u[a]={x:l.parse(s[0],o),y:c.parse(s[1],o)};return u}},{key:"parseObjectData",value:function(e,t,n,r){var a,i,o,s,l=e.xScale,c=e.yScale,u=this._parsing,f=u.xAxisKey,d=void 0===f?"x":f,h=u.yAxisKey,p=void 0===h?"y":h,v=new Array(r);for(a=0,i=r;a<i;++a)s=t[o=a+n],v[a]={x:l.parse(Pc(s,d),o),y:c.parse(Pc(s,p),o)};return v}},{key:"getParsed",value:function(e){return this._cachedMeta._parsed[e]}},{key:"getDataElement",value:function(e){return this._cachedMeta.data[e]}},{key:"applyStack",value:function(e,t,n){var r=this.chart,a=this._cachedMeta,i=t[e.axis];return Md({keys:Ad(r,!0),values:t._stacks[e.axis]._visualValues},i,a.index,{mode:n})}},{key:"updateRangeFromParsed",value:function(e,t,n,r){var a=n[t.axis],i=null===a?NaN:a,o=r&&n._stacks[t.axis];r&&o&&(r.values=o,i=Md(r,a,this._cachedMeta.index)),e.min=Math.min(e.min,i),e.max=Math.max(e.max,i)}},{key:"getMinMax",value:function(e,t){var n,r,a=this._cachedMeta,i=a._parsed,o=a._sorted&&e===a.iScale,s=i.length,l=this._getOtherScale(e),c=function(e,t,n){return e&&!t.hidden&&t._stacked&&{keys:Ad(n,!0),values:null}}(t,a,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},f=function(e){var t=e.getUserBounds(),n=t.min,r=t.max,a=t.minDefined,i=t.maxDefined;return{min:a?n:Number.NEGATIVE_INFINITY,max:i?r:Number.POSITIVE_INFINITY}}(l),d=f.min,h=f.max;function p(){var t=(r=i[n])[l.axis];return!gc(r[e.axis])||d>t||h<t}for(n=0;n<s&&(p()||(this.updateRangeFromParsed(u,e,r,c),!o));++n);if(o)for(n=s-1;n>=0;--n)if(!p()){this.updateRangeFromParsed(u,e,r,c);break}return u}},{key:"getAllParsedValues",value:function(e){var t,n,r,a=this._cachedMeta._parsed,i=[];for(t=0,n=a.length;t<n;++t)gc(r=a[t][e.axis])&&i.push(r);return i}},{key:"getMaxOverflow",value:function(){return!1}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=t.iScale,r=t.vScale,a=this.getParsed(e);return{label:n?""+n.getLabelForValue(a[n.axis]):"",value:r?""+r.getLabelForValue(a[r.axis]):""}}},{key:"_update",value:function(e){var t,n,r,a,i,o=this._cachedMeta;this.update(e||"default"),o._clip=(yc(t=xc(this.options.clip,function(e,t,n){if(!1===n)return!1;var r=Dd(e,n),a=Dd(t,n);return{top:a.end,right:r.end,bottom:a.start,left:r.start}}(o.xScale,o.yScale,this.getMaxOverflow())))?(n=t.top,r=t.right,a=t.bottom,i=t.left):n=r=a=i=t,{top:n,right:r,bottom:a,left:i,disabled:!1===t})}},{key:"update",value:function(e){}},{key:"draw",value:function(){var e,t=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],i=n.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||a.length-s,c=this.options.drawActiveElementsOnTop;for(r.dataset&&r.dataset.draw(t,i,s,l),e=s;e<s+l;++e){var u=a[e];u.hidden||(u.active&&c?o.push(u):u.draw(t,i))}for(e=0;e<o.length;++e)o[e].draw(t,i)}},{key:"getStyle",value:function(e,t){var n=t?"active":"default";return void 0===e&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(e||0,n)}},{key:"getContext",value:function(e,t,n){var r,a=this.getDataset();if(e>=0&&e<this._cachedMeta.data.length){var i=this._cachedMeta.data[e];r=i.$context||(i.$context=function(e,t,n){return uf(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}(this.getContext(),e,i)),r.parsed=this.getParsed(e),r.raw=a.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=function(e,t){return uf(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=a,r.index=r.datasetIndex=this.index;return r.active=!!t,r.mode=n,r}},{key:"resolveDatasetElementOptions",value:function(e){return this._resolveElementOptions(this.datasetElementType.id,e)}},{key:"resolveDataElementOptions",value:function(e,t){return this._resolveElementOptions(this.dataElementType.id,t,e)}},{key:"_resolveElementOptions",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2?arguments[2]:void 0,a="active"===n,i=this._cachedDataOpts,o=e+"-"+n,s=i[o],l=this.enableOptionSharing&&Lc(r);if(s)return Td(s,l);var c=this.chart.config,u=c.datasetElementScopeKeys(this._type,e),f=a?["".concat(e,"Hover"),"hover",e,""]:[e,""],d=c.getOptionScopes(this.getDataset(),u),h=Object.keys(Tu.elements[e]),p=function(){return t.getContext(r,a,n)},v=c.resolveNamedOptions(d,h,p,f);return v.$shared&&(v.$shared=l,i[o]=Object.freeze(Td(v,l))),v}},{key:"_resolveAnimations",value:function(e,t,n){var r,a=this.chart,i=this._cachedDataOpts,o="animation-".concat(t),s=i[o];if(s)return s;if(!1!==a.options.animation){var l=this.chart.config,c=l.datasetAnimationScopeKeys(this._type,t),u=l.getOptionScopes(this.getDataset(),c);r=l.createResolver(u,this.getContext(e,n,t))}var f=new Od(a,r&&r.animations);return r&&r._cacheable&&(i[o]=Object.freeze(f)),f}},{key:"getSharedOptions",value:function(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}},{key:"includeOptions",value:function(e,t){return!t||Nd(e)||this.chart._animationsDisabled}},{key:"_getSharedOptions",value:function(e,t){var n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,a=this.getSharedOptions(n),i=this.includeOptions(t,a)||a!==r;return this.updateSharedOptions(a,t,n),{sharedOptions:a,includeOptions:i}}},{key:"updateElement",value:function(e,t,n,r){Nd(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}},{key:"updateSharedOptions",value:function(e,t,n){e&&!Nd(t)&&this._resolveAnimations(void 0,t).update(e,n)}},{key:"_setStyle",value:function(e,t,n,r){e.active=r;var a=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(a)||a})}},{key:"removeHoverStyle",value:function(e,t,n){this._setStyle(e,n,"active",!1)}},{key:"setHoverStyle",value:function(e,t,n){this._setStyle(e,n,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}},{key:"_resyncElements",value:function(e){var t,n=this._data,r=this._cachedMeta.data,a=pd(this._syncList);try{for(a.s();!(t=a.n()).done;){var i=dd(t.value,3),o=i[0],s=i[1],l=i[2];this[o](s,l)}}catch(e){a.e(e)}finally{a.f()}this._syncList=[];var c=r.length,u=n.length,f=Math.min(u,c);f&&this.parse(0,f),u>c?this._insertElements(c,u-c,e):u<c&&this._removeElements(u,c-u)}},{key:"_insertElements",value:function(e,t){var n,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this._cachedMeta,i=a.data,o=e+t,s=function(e){for(e.length+=t,n=e.length-1;n>=o;n--)e[n]=e[n-t]};for(s(i),n=e;n<o;++n)i[n]=new this.dataElementType;this._parsing&&s(a._parsed),this.parse(e,t),r&&this.updateElements(i,e,t,"reset")}},{key:"updateElements",value:function(e,t,n,r){}},{key:"_removeElements",value:function(e,t){var n=this._cachedMeta;if(this._parsing){var r=n._parsed.splice(e,t);n._stacked&&Rd(n,r)}n.data.splice(e,t)}},{key:"_sync",value:function(e){if(this._parsing)this._syncList.push(e);else{var t=dd(e,3),n=t[0],r=t[1],a=t[2];this[n](r,a)}this.chart._dataChanges.push([this.index].concat(md(e)))}},{key:"_onDataPush",value:function(){var e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}},{key:"_onDataPop",value:function(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}},{key:"_onDataShift",value:function(){this._sync(["_removeElements",0,1])}},{key:"_onDataSplice",value:function(e,t){t&&this._sync(["_removeElements",e,t]);var n=arguments.length-2;n&&this._sync(["_insertElements",e,n])}},{key:"_onDataUnshift",value:function(){this._sync(["_insertElements",0,arguments.length])}}]),e}();function zd(e){var t,n,r,a,i=e.iScale,o=function(e,t){if(!e._cache.$bar){for(var n=e.getMatchingVisibleMetas(t),r=[],a=0,i=n.length;a<i;a++)r=r.concat(n[a].controller.getAllParsedValues(e));e._cache.$bar=du(r.sort((function(e,t){return e-t})))}return e._cache.$bar}(i,e.type),s=i._length,l=function(){32767!==r&&-32768!==r&&(Lc(a)&&(s=Math.min(s,Math.abs(r-a)||s)),a=r)};for(t=0,n=o.length;t<n;++t)r=i.getPixelForValue(o[t]),l();for(a=void 0,t=0,n=i.ticks.length;t<n;++t)r=i.getPixelForTick(t),l();return s}function Vd(e,t,n,r){return mc(e)?function(e,t,n,r){var a=n.parse(e[0],r),i=n.parse(e[1],r),o=Math.min(a,i),s=Math.max(a,i),l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:a,end:i,min:o,max:s}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Hd(e,t,n,r){var a,i,o,s,l=e.iScale,c=e.vScale,u=l.getLabels(),f=l===c,d=[];for(a=n,i=n+r;a<i;++a)s=t[a],(o={})[l.axis]=f||l.parse(u[a],a),d.push(Vd(s,o,c,a));return d}function Wd(e){return e&&void 0!==e.barStart&&void 0!==e.barEnd}function $d(e,t,n,r){var a=t.borderSkipped,i={};if(a)if(!0!==a){var o=function(e){var t,n,r,a,i;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(a="end",i="start"):(a="start",i="end"),{start:n,end:r,reverse:t,top:a,bottom:i}}(e),s=o.start,l=o.end,c=o.reverse,u=o.top,f=o.bottom;"middle"===a&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?a=u:(n._bottom||0)===r?a=f:(i[Bd(f,s,l,c)]=!0,a=u)),i[Bd(a,s,l,c)]=!0,e.borderSkipped=i}else e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};else e.borderSkipped=i}function Bd(e,t,n,r){var a,i,o;return r?(o=n,e=Yd(e=(a=e)===(i=t)?o:a===o?i:a,n,t)):e=Yd(e,t,n),e}function Yd(e,t,n){return"start"===e?t:"end"===e?n:e}function Ud(e,t,n){var r=t.inflateAmount;e.inflateAmount="auto"===r?1===n?.33:0:r}hd(Fd,"defaults",{}),hd(Fd,"datasetElementType",null),hd(Fd,"dataElementType",null);var Gd=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"parsePrimitiveData",value:function(e,t,n,r){return Hd(e,t,n,r)}},{key:"parseArrayData",value:function(e,t,n,r){return Hd(e,t,n,r)}},{key:"parseObjectData",value:function(e,t,n,r){var a,i,o,s,l=e.iScale,c=e.vScale,u=this._parsing,f=u.xAxisKey,d=void 0===f?"x":f,h=u.yAxisKey,p=void 0===h?"y":h,v="x"===l.axis?d:p,m="x"===c.axis?d:p,y=[];for(a=n,i=n+r;a<i;++a)s=t[a],(o={})[l.axis]=l.parse(Pc(s,v),a),y.push(Vd(Pc(s,m),o,c,a));return y}},{key:"updateRangeFromParsed",value:function(e,t,r,a){ad(fd(n.prototype),"updateRangeFromParsed",this).call(this,e,t,r,a);var i=r._custom;i&&t===this._cachedMeta.vScale&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}},{key:"getMaxOverflow",value:function(){return 0}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=t.iScale,r=t.vScale,a=this.getParsed(e),i=a._custom,o=Wd(i)?"["+i.start+", "+i.end+"]":""+r.getLabelForValue(a[r.axis]);return{label:""+n.getLabelForValue(a[n.axis]),value:o}}},{key:"initialize",value:function(){this.enableOptionSharing=!0,ad(fd(n.prototype),"initialize",this).call(this),this._cachedMeta.stack=this.getDataset().stack}},{key:"update",value:function(e){var t=this._cachedMeta;this.updateElements(t.data,0,t.data.length,e)}},{key:"updateElements",value:function(e,t,n,r){for(var a="reset"===r,i=this.index,o=this._cachedMeta.vScale,s=o.getBasePixel(),l=o.isHorizontal(),c=this._getRuler(),u=this._getSharedOptions(t,r),f=u.sharedOptions,d=u.includeOptions,h=t;h<t+n;h++){var p=this.getParsed(h),v=a||vc(p[o.axis])?{base:s,head:s}:this._calculateBarValuePixels(h),m=this._calculateBarIndexPixels(h,c),y=(p._stacks||{})[o.axis],g={horizontal:l,base:v.base,enableBorderRadius:!y||Wd(p._custom)||i===y._top||i===y._bottom,x:l?v.head:m.center,y:l?m.center:v.head,height:l?m.size:Math.abs(v.size),width:l?Math.abs(v.size):m.size};d&&(g.options=f||this.resolveDataElementOptions(h,e[h].active?"active":r));var b=g.options||e[h].options;$d(g,b,y,i),Ud(g,b,c.ratio),this.updateElement(e[h],h,g,r)}}},{key:"_getStacks",value:function(e,t){var n,r=this._cachedMeta.iScale,a=r.getMatchingVisibleMetas(this._type).filter((function(e){return e.controller.options.grouped})),i=r.options.stacked,o=[],s=function(e){var n=e.controller.getParsed(t),r=n&&n[e.vScale.axis];if(vc(r)||isNaN(r))return!0},l=pd(a);try{for(l.s();!(n=l.n()).done;){var c=n.value;if((void 0===t||!s(c))&&((!1===i||-1===o.indexOf(c.stack)||void 0===i&&void 0===c.stack)&&o.push(c.stack),c.index===e))break}}catch(e){l.e(e)}finally{l.f()}return o.length||o.push(void 0),o}},{key:"_getStackCount",value:function(e){return this._getStacks(void 0,e).length}},{key:"_getStackIndex",value:function(e,t,n){var r=this._getStacks(e,n),a=void 0!==t?r.indexOf(t):-1;return-1===a?r.length-1:a}},{key:"_getRuler",value:function(){var e,t,n=this.options,r=this._cachedMeta,a=r.iScale,i=[];for(e=0,t=r.data.length;e<t;++e)i.push(a.getPixelForValue(this.getParsed(e)[a.axis],e));var o=n.barThickness;return{min:o||zd(r),pixels:i,start:a._startPixel,end:a._endPixel,stackCount:this._getStackCount(),scale:a,grouped:n.grouped,ratio:o?1:n.categoryPercentage*n.barPercentage}}},{key:"_calculateBarValuePixels",value:function(e){var t,n,r=this._cachedMeta,a=r.vScale,i=r._stacked,o=r.index,s=this.options,l=s.base,c=s.minBarLength,u=l||0,f=this.getParsed(e),d=f._custom,h=Wd(d),p=f[a.axis],v=0,m=i?this.applyStack(a,f,i):p;m!==p&&(v=m-p,m=p),h&&(p=d.barStart,m=d.barEnd-d.barStart,0!==p&&Uc(p)!==Uc(d.barEnd)&&(v=0),v+=p);var y=vc(l)||h?v:l,g=a.getPixelForValue(y);if(n=(t=this.chart.getDataVisibility(e)?a.getPixelForValue(v+m):g)-g,Math.abs(n)<c){n=function(e,t,n){return 0!==e?Uc(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}(n,a,u)*c,p===u&&(g-=n/2);var b=a.getPixelForDecimal(0),x=a.getPixelForDecimal(1),_=Math.min(b,x),w=Math.max(b,x);t=(g=Math.max(Math.min(g,w),_))+n,i&&!h&&(f._stacks[a.axis]._visualValues[o]=a.getValueForPixel(t)-a.getValueForPixel(g))}if(g===a.getPixelForValue(u)){var k=Uc(n)*a.getLineWidthForValue(u)/2;g+=k,n-=k}return{size:n,base:g,head:t,center:t+n/2}}},{key:"_calculateBarIndexPixels",value:function(e,t){var n,r,a=t.scale,i=this.options,o=i.skipNull,s=xc(i.maxBarThickness,1/0);if(t.grouped){var l=o?this._getStackCount(e):t.stackCount,c="flex"===i.barThickness?function(e,t,n,r){var a=t.pixels,i=a[e],o=e>0?a[e-1]:null,s=e<a.length-1?a[e+1]:null,l=n.categoryPercentage;null===o&&(o=i-(null===s?t.end-t.start:s-i)),null===s&&(s=i+i-o);var c=i-(i-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/r,ratio:n.barPercentage,start:c}}(e,t,i,l):function(e,t,n,r){var a,i,o=n.barThickness;return vc(o)?(a=t.min*n.categoryPercentage,i=n.barPercentage):(a=o*r,i=1),{chunk:a/r,ratio:i,start:t.pixels[e]-a/2}}(e,t,i,l),u=this._getStackIndex(this.index,this._cachedMeta.stack,o?e:void 0);n=c.start+c.chunk*u+c.chunk/2,r=Math.min(s,c.chunk*c.ratio)}else n=a.getPixelForValue(this.getParsed(e)[a.axis],e),r=Math.min(s,t.min*t.ratio);return{base:n-r/2,head:n+r/2,center:n,size:r}}},{key:"draw",value:function(){for(var e=this._cachedMeta,t=e.vScale,n=e.data,r=n.length,a=0;a<r;++a)null!==this.getParsed(a)[t.axis]&&n[a].draw(this._ctx)}}]),n}(Fd);hd(Gd,"id","bar"),hd(Gd,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),hd(Gd,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});var Zd=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"initialize",value:function(){this.enableOptionSharing=!0,ad(fd(n.prototype),"initialize",this).call(this)}},{key:"parsePrimitiveData",value:function(e,t,r,a){for(var i=ad(fd(n.prototype),"parsePrimitiveData",this).call(this,e,t,r,a),o=0;o<i.length;o++)i[o]._custom=this.resolveDataElementOptions(o+r).radius;return i}},{key:"parseArrayData",value:function(e,t,r,a){for(var i=ad(fd(n.prototype),"parseArrayData",this).call(this,e,t,r,a),o=0;o<i.length;o++){var s=t[r+o];i[o]._custom=xc(s[2],this.resolveDataElementOptions(o+r).radius)}return i}},{key:"parseObjectData",value:function(e,t,r,a){for(var i=ad(fd(n.prototype),"parseObjectData",this).call(this,e,t,r,a),o=0;o<i.length;o++){var s=t[r+o];i[o]._custom=xc(s&&s.r&&+s.r,this.resolveDataElementOptions(o+r).radius)}return i}},{key:"getMaxOverflow",value:function(){for(var e=this._cachedMeta.data,t=0,n=e.length-1;n>=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart.data.labels||[],r=t.xScale,a=t.yScale,i=this.getParsed(e),o=r.getLabelForValue(i.x),s=a.getLabelForValue(i.y),l=i._custom;return{label:n[e]||"",value:"("+o+", "+s+(l?", "+l:"")+")"}}},{key:"update",value:function(e){var t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}},{key:"updateElements",value:function(e,t,n,r){for(var a="reset"===r,i=this._cachedMeta,o=i.iScale,s=i.vScale,l=this._getSharedOptions(t,r),c=l.sharedOptions,u=l.includeOptions,f=o.axis,d=s.axis,h=t;h<t+n;h++){var p=e[h],v=!a&&this.getParsed(h),m={},y=m[f]=a?o.getPixelForDecimal(.5):o.getPixelForValue(v[f]),g=m[d]=a?s.getBasePixel():s.getPixelForValue(v[d]);m.skip=isNaN(y)||isNaN(g),u&&(m.options=c||this.resolveDataElementOptions(h,p.active?"active":r),a&&(m.options.radius=0)),this.updateElement(p,h,m,r)}}},{key:"resolveDataElementOptions",value:function(e,t){var r=this.getParsed(e),a=ad(fd(n.prototype),"resolveDataElementOptions",this).call(this,e,t);a.$shared&&(a=Object.assign({},a,{$shared:!1}));var i=a.radius;return"active"!==t&&(a.radius=0),a.radius+=xc(r&&r._custom,i),a}}]),n}(Fd);hd(Zd,"id","bubble"),hd(Zd,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),hd(Zd,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});var Kd=function(e){od(n,e);var t=ld(n);function n(e,r){var a;return bd(this,n),(a=t.call(this,e,r)).enableOptionSharing=!0,a.innerRadius=void 0,a.outerRadius=void 0,a.offsetX=void 0,a.offsetY=void 0,a}return _d(n,[{key:"linkScales",value:function(){}},{key:"parse",value:function(e,t){var n=this.getDataset().data,r=this._cachedMeta;if(!1===this._parsing)r._parsed=n;else{var a,i,o=function(e){return+n[e]};if(yc(n[e])){var s=this._parsing.key,l=void 0===s?"value":s;o=function(e){return+Pc(n[e],l)}}for(a=e,i=e+t;a<i;++a)r._parsed[a]=o(a)}}},{key:"_getRotation",value:function(){return qc(this.options.rotation-90)}},{key:"_getCircumference",value:function(){return qc(this.options.circumference)}},{key:"_getRotationExtents",value:function(){for(var e=Fc,t=-Fc,n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){var r=this.chart.getDatasetMeta(n).controller,a=r._getRotation(),i=r._getCircumference();e=Math.min(e,a),t=Math.max(t,a+i)}return{rotation:e,circumference:t-e}}},{key:"update",value:function(e){var t,n,r=this.chart.chartArea,a=this._cachedMeta,i=a.data,o=this.getMaxBorderWidth()+this.getMaxOffset(i)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min((n=s,"string"==typeof(t=this.options.cutout)&&t.endsWith("%")?parseFloat(t)/100:+t/n),1),c=this._getRingWeight(this.index),u=this._getRotationExtents(),f=u.circumference,d=function(e,t,n){var r=1,a=1,i=0,o=0;if(t<Fc){var s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),f=Math.cos(l),d=Math.sin(l),h=function(e,t,r){return au(e,s,l,!0)?1:Math.max(t,t*n,r,r*n)},p=function(e,t,r){return au(e,s,l,!0)?-1:Math.min(t,t*n,r,r*n)},v=h(0,c,f),m=h(Wc,u,d),y=p(Tc,c,f),g=p(Tc+Wc,u,d);r=(v-y)/2,a=(m-g)/2,i=-(v+y)/2,o=-(m+g)/2}return{ratioX:r,ratioY:a,offsetX:i,offsetY:o}}(u.rotation,f,l),h=d.ratioX,p=d.ratioY,v=d.offsetX,m=d.offsetY,y=(r.width-o)/h,g=(r.height-o)/p,b=Math.max(Math.min(y,g)/2,0),x=_c(this.options.radius,b),_=(x-Math.max(x*l,0))/this._getVisibleDatasetWeightTotal();this.offsetX=v*x,this.offsetY=m*x,a.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(i,0,i.length,e)}},{key:"_circumference",value:function(e,t){var n=this.options,r=this._cachedMeta,a=this._getCircumference();return t&&n.animation.animateRotate||!this.chart.getDataVisibility(e)||null===r._parsed[e]||r.data[e].hidden?0:this.calculateCircumference(r._parsed[e]*a/Fc)}},{key:"updateElements",value:function(e,t,n,r){var a,i="reset"===r,o=this.chart,s=o.chartArea,l=o.options.animation,c=(s.left+s.right)/2,u=(s.top+s.bottom)/2,f=i&&l.animateScale,d=f?0:this.innerRadius,h=f?0:this.outerRadius,p=this._getSharedOptions(t,r),v=p.sharedOptions,m=p.includeOptions,y=this._getRotation();for(a=0;a<t;++a)y+=this._circumference(a,i);for(a=t;a<t+n;++a){var g=this._circumference(a,i),b=e[a],x={x:c+this.offsetX,y:u+this.offsetY,startAngle:y,endAngle:y+g,circumference:g,outerRadius:h,innerRadius:d};m&&(x.options=v||this.resolveDataElementOptions(a,b.active?"active":r)),y+=g,this.updateElement(b,a,x,r)}}},{key:"calculateTotal",value:function(){var e,t=this._cachedMeta,n=t.data,r=0;for(e=0;e<n.length;e++){var a=t._parsed[e];null===a||isNaN(a)||!this.chart.getDataVisibility(e)||n[e].hidden||(r+=Math.abs(a))}return r}},{key:"calculateCircumference",value:function(e){var t=this._cachedMeta.total;return t>0&&!isNaN(e)?Fc*(Math.abs(e)/t):0}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart,r=n.data.labels||[],a=Mu(t._parsed[e],n.options.locale);return{label:r[e]||"",value:a}}},{key:"getMaxBorderWidth",value:function(e){var t,n,r,a,i,o=0,s=this.chart;if(!e)for(t=0,n=s.data.datasets.length;t<n;++t)if(s.isDatasetVisible(t)){e=(r=s.getDatasetMeta(t)).data,a=r.controller;break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)"inner"!==(i=a.resolveDataElementOptions(t)).borderAlign&&(o=Math.max(o,i.borderWidth||0,i.hoverBorderWidth||0));return o}},{key:"getMaxOffset",value:function(e){for(var t=0,n=0,r=e.length;n<r;++n){var a=this.resolveDataElementOptions(n);t=Math.max(t,a.offset||0,a.hoverOffset||0)}return t}},{key:"_getRingWeightOffset",value:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t}},{key:"_getRingWeight",value:function(e){return Math.max(xc(this.chart.data.datasets[e].weight,1),0)}},{key:"_getVisibleDatasetWeightTotal",value:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}]),n}(Fd);hd(Kd,"id","doughnut"),hd(Kd,"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"}),hd(Kd,"descriptors",{_scriptable:function(e){return"spacing"!==e},_indexable:function(e){return"spacing"!==e&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}}),hd(Kd,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels:function(e){var t=e.data;if(t.labels.length&&t.datasets.length){var n=e.legend.options.labels,r=n.pointStyle,a=n.color;return t.labels.map((function(t,n){var i=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:a,lineWidth:i.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(n),index:n}}))}return[]}},onClick:function(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}}});var Xd=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"initialize",value:function(){this.enableOptionSharing=!0,this.supportsDecimation=!0,ad(fd(n.prototype),"initialize",this).call(this)}},{key:"update",value:function(e){var t=this._cachedMeta,n=t.dataset,r=t.data,a=void 0===r?[]:r,i=t._dataset,o=this.chart._animationsDisabled,s=yu(t,a,o),l=s.start,c=s.count;this._drawStart=l,this._drawCount=c,gu(t)&&(l=0,c=a.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!i._decimated,n.points=a;var u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:u},e),this.updateElements(a,l,c,e)}},{key:"updateElements",value:function(e,t,n,r){for(var a="reset"===r,i=this._cachedMeta,o=i.iScale,s=i.vScale,l=i._stacked,c=i._dataset,u=this._getSharedOptions(t,r),f=u.sharedOptions,d=u.includeOptions,h=o.axis,p=s.axis,v=this.options,m=v.spanGaps,y=v.segment,g=Kc(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||a||"none"===r,x=t+n,_=e.length,w=t>0&&this.getParsed(t-1),k=0;k<_;++k){var S=e[k],C=b?S:{};if(k<t||k>=x)C.skip=!0;else{var O=this.getParsed(k),D=vc(O[p]),A=C[h]=o.getPixelForValue(O[h],k),M=C[p]=a||D?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,O,l):O[p],k);C.skip=isNaN(A)||isNaN(M)||D,C.stop=k>0&&Math.abs(O[h]-w[h])>g,y&&(C.parsed=O,C.raw=c.data[k]),d&&(C.options=f||this.resolveDataElementOptions(k,S.active?"active":r)),b||this.updateElement(S,k,C,r),w=O}}}},{key:"getMaxOverflow",value:function(){var e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;var a=r[0].size(this.resolveDataElementOptions(0)),i=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,a,i)/2}},{key:"draw",value:function(){var e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),ad(fd(n.prototype),"draw",this).call(this)}}]),n}(Fd);hd(Xd,"id","line"),hd(Xd,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),hd(Xd,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var qd=function(e){od(n,e);var t=ld(n);function n(e,r){var a;return bd(this,n),(a=t.call(this,e,r)).innerRadius=void 0,a.outerRadius=void 0,a}return _d(n,[{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart,r=n.data.labels||[],a=Mu(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:a}}},{key:"parseObjectData",value:function(e,t,n,r){return Cf.bind(this)(e,t,n,r)}},{key:"update",value:function(e){var t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}},{key:"getMinMax",value:function(){var e=this,t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((function(t,r){var a=e.getParsed(r).r;!isNaN(a)&&e.chart.getDataVisibility(r)&&(a<n.min&&(n.min=a),a>n.max&&(n.max=a))})),n}},{key:"_updateRadius",value:function(){var e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),a=Math.max(r/2,0),i=(a-Math.max(n.cutoutPercentage?a/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=a-i*this.index,this.innerRadius=this.outerRadius-i}},{key:"updateElements",value:function(e,t,n,r){var a,i="reset"===r,o=this.chart,s=o.options.animation,l=this._cachedMeta.rScale,c=l.xCenter,u=l.yCenter,f=l.getIndexAngle(0)-.5*Tc,d=f,h=360/this.countVisibleElements();for(a=0;a<t;++a)d+=this._computeAngle(a,r,h);for(a=t;a<t+n;a++){var p=e[a],v=d,m=d+this._computeAngle(a,r,h),y=o.getDataVisibility(a)?l.getDistanceFromCenterForValue(this.getParsed(a).r):0;d=m,i&&(s.animateScale&&(y=0),s.animateRotate&&(v=m=f));var g={x:c,y:u,innerRadius:0,outerRadius:y,startAngle:v,endAngle:m,options:this.resolveDataElementOptions(a,p.active?"active":r)};this.updateElement(p,a,g,r)}}},{key:"countVisibleElements",value:function(){var e=this,t=this._cachedMeta,n=0;return t.data.forEach((function(t,r){!isNaN(e.getParsed(r).r)&&e.chart.getDataVisibility(r)&&n++})),n}},{key:"_computeAngle",value:function(e,t,n){return this.chart.getDataVisibility(e)?qc(this.resolveDataElementOptions(e,t).angle||n):0}}]),n}(Fd);hd(qd,"id","polarArea"),hd(qd,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),hd(qd,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels:function(e){var t=e.data;if(t.labels.length&&t.datasets.length){var n=e.legend.options.labels,r=n.pointStyle,a=n.color;return t.labels.map((function(t,n){var i=e.getDatasetMeta(0).controller.getStyle(n);return{text:t,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,fontColor:a,lineWidth:i.borderWidth,pointStyle:r,hidden:!e.getDataVisibility(n),index:n}}))}return[]}},onClick:function(e,t,n){n.chart.toggleDataVisibility(t.index),n.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});var Jd=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n)}(Kd);hd(Jd,"id","pie"),hd(Jd,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});var Qd=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta.vScale,n=this.getParsed(e);return{label:t.getLabels()[e],value:""+t.getLabelForValue(n[t.axis])}}},{key:"parseObjectData",value:function(e,t,n,r){return Cf.bind(this)(e,t,n,r)}},{key:"update",value:function(e){var t=this._cachedMeta,n=t.dataset,r=t.data||[],a=t.iScale.getLabels();if(n.points=r,"resize"!==e){var i=this.resolveDatasetElementOptions(e);this.options.showLine||(i.borderWidth=0);var o={_loop:!0,_fullLoop:a.length===r.length,options:i};this.updateElement(n,void 0,o,e)}this.updateElements(r,0,r.length,e)}},{key:"updateElements",value:function(e,t,n,r){for(var a=this._cachedMeta.rScale,i="reset"===r,o=t;o<t+n;o++){var s=e[o],l=this.resolveDataElementOptions(o,s.active?"active":r),c=a.getPointPositionForValue(o,this.getParsed(o).r),u=i?a.xCenter:c.x,f=i?a.yCenter:c.y,d={x:u,y:f,angle:c.angle,skip:isNaN(u)||isNaN(f),options:l};this.updateElement(s,o,d,r)}}}]),n}(Fd);hd(Qd,"id","radar"),hd(Qd,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),hd(Qd,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});var eh=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart.data.labels||[],r=t.xScale,a=t.yScale,i=this.getParsed(e),o=r.getLabelForValue(i.x),s=a.getLabelForValue(i.y);return{label:n[e]||"",value:"("+o+", "+s+")"}}},{key:"update",value:function(e){var t=this._cachedMeta,n=t.data,r=void 0===n?[]:n,a=this.chart._animationsDisabled,i=yu(t,r,a),o=i.start,s=i.count;if(this._drawStart=o,this._drawCount=s,gu(t)&&(o=0,s=r.length),this.options.showLine){this.datasetElementType||this.addElements();var l=t.dataset,c=t._dataset;l._chart=this.chart,l._datasetIndex=this.index,l._decimated=!!c._decimated,l.points=r;var u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(l,void 0,{animated:!a,options:u},e)}else this.datasetElementType&&(delete t.dataset,this.datasetElementType=!1);this.updateElements(r,o,s,e)}},{key:"addElements",value:function(){var e=this.options.showLine;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),ad(fd(n.prototype),"addElements",this).call(this)}},{key:"updateElements",value:function(e,t,n,r){for(var a="reset"===r,i=this._cachedMeta,o=i.iScale,s=i.vScale,l=i._stacked,c=i._dataset,u=this.resolveDataElementOptions(t,r),f=this.getSharedOptions(u),d=this.includeOptions(r,f),h=o.axis,p=s.axis,v=this.options,m=v.spanGaps,y=v.segment,g=Kc(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||a||"none"===r,x=t>0&&this.getParsed(t-1),_=t;_<t+n;++_){var w=e[_],k=this.getParsed(_),S=b?w:{},C=vc(k[p]),O=S[h]=o.getPixelForValue(k[h],_),D=S[p]=a||C?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,k,l):k[p],_);S.skip=isNaN(O)||isNaN(D)||C,S.stop=_>0&&Math.abs(k[h]-x[h])>g,y&&(S.parsed=k,S.raw=c.data[_]),d&&(S.options=f||this.resolveDataElementOptions(_,w.active?"active":r)),b||this.updateElement(w,_,S,r),x=k}this.updateSharedOptions(f,r,u)}},{key:"getMaxOverflow",value:function(){var e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){for(var n=0,r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}var a=e.dataset,i=a.options&&a.options.borderWidth||0;if(!t.length)return i;var o=t[0].size(this.resolveDataElementOptions(0)),s=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(i,o,s)/2}}]),n}(Fd);function th(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}hd(eh,"id","scatter"),hd(eh,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),hd(eh,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var nh={_date:function(){function e(t){bd(this,e),hd(this,"options",void 0),this.options=t||{}}return _d(e,[{key:"init",value:function(){}},{key:"formats",value:function(){return th()}},{key:"parse",value:function(){return th()}},{key:"format",value:function(){return th()}},{key:"add",value:function(){return th()}},{key:"diff",value:function(){return th()}},{key:"startOf",value:function(){return th()}},{key:"endOf",value:function(){return th()}}],[{key:"override",value:function(t){Object.assign(e.prototype,t)}}]),e}()};function rh(e,t,n,r){var a=e.controller,i=e.data,o=e._sorted,s=a._cachedMeta.iScale;if(s&&t===s.axis&&"r"!==t&&o&&i.length){var l=s._reversePixels?cu:lu;if(!r)return l(i,t,n);if(a._sharedOptions){var c=i[0],u="function"==typeof c.getRange&&c.getRange(t);if(u){var f=l(i,t,n-u),d=l(i,t,n+u);return{lo:f.lo,hi:d.hi}}}}return{lo:0,hi:i.length-1}}function ah(e,t,n,r,a){for(var i=e.getSortedVisibleDatasetMetas(),o=n[t],s=0,l=i.length;s<l;++s)for(var c=i[s],u=c.index,f=c.data,d=rh(i[s],t,o,a),h=d.lo,p=d.hi,v=h;v<=p;++v){var m=f[v];m.skip||r(m,u,v)}}function ih(e,t,n,r,a){var i=[];return a||e.isPointInArea(t)?(ah(e,n,t,(function(n,o,s){(a||Bu(n,e.chartArea,0))&&n.inRange(t.x,t.y,r)&&i.push({element:n,datasetIndex:o,index:s})}),!0),i):i}function oh(e,t,n,r,a,i){return i||e.isPointInArea(t)?"r"!==n||r?function(e,t,n,r,a,i){var o=[],s=function(e){var t=-1!==e.indexOf("x"),n=-1!==e.indexOf("y");return function(e,r){var a=t?Math.abs(e.x-r.x):0,i=n?Math.abs(e.y-r.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(i,2))}}(n),l=Number.POSITIVE_INFINITY;return ah(e,n,t,(function(n,c,u){var f=n.inRange(t.x,t.y,a);if(!r||f){var d=n.getCenterPoint(a);if(i||e.isPointInArea(d)||f){var h=s(t,d);h<l?(o=[{element:n,datasetIndex:c,index:u}],l=h):h===l&&o.push({element:n,datasetIndex:c,index:u})}}})),o}(e,t,n,r,a,i):function(e,t,n,r){var a=[];return ah(e,n,t,(function(e,n,i){var o=e.getProps(["startAngle","endAngle"],r),s=o.startAngle,l=o.endAngle;au(eu(e,{x:t.x,y:t.y}).angle,s,l)&&a.push({element:e,datasetIndex:n,index:i})})),a}(e,t,n,a):[]}function sh(e,t,n,r,a){var i=[],o="x"===n?"inXRange":"inYRange",s=!1;return ah(e,n,t,(function(e,r,l){e[o](t[n],a)&&(i.push({element:e,datasetIndex:r,index:l}),s=s||e.inRange(t.x,t.y,a))})),r&&!s?[]:i}var lh={evaluateInteractionItems:ah,modes:{index:function(e,t,n,r){var a=zf(t,e),i=n.axis||"x",o=n.includeInvisible||!1,s=n.intersect?ih(e,a,i,r,o):oh(e,a,i,!1,r,o),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach((function(e){var t=s[0].index,n=e.data[t];n&&!n.skip&&l.push({element:n,datasetIndex:e.index,index:t})})),l):[]},dataset:function(e,t,n,r){var a=zf(t,e),i=n.axis||"xy",o=n.includeInvisible||!1,s=n.intersect?ih(e,a,i,r,o):oh(e,a,i,!1,r,o);if(s.length>0){var l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(var u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point:function(e,t,n,r){return ih(e,zf(t,e),n.axis||"xy",r,n.includeInvisible||!1)},nearest:function(e,t,n,r){var a=zf(t,e),i=n.axis||"xy",o=n.includeInvisible||!1;return oh(e,a,i,n.intersect,r,o)},x:function(e,t,n,r){return sh(e,zf(t,e),"x",n.intersect,r)},y:function(e,t,n,r){return sh(e,zf(t,e),"y",n.intersect,r)}}},ch=["left","top","right","bottom"];function uh(e,t){return e.filter((function(e){return e.pos===t}))}function fh(e,t){return e.filter((function(e){return-1===ch.indexOf(e.pos)&&e.box.axis===t}))}function dh(e,t){return e.sort((function(e,n){var r=t?n:e,a=t?e:n;return r.weight===a.weight?r.index-a.index:r.weight-a.weight}))}function hh(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function ph(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 vh(e,t,n,r){var a=n.pos,i=n.box,o=e.maxPadding;if(!yc(a)){n.size&&(e[a]-=n.size);var s=r[n.stack]||{size:0,count:1};s.size=Math.max(s.size,n.horizontal?i.height:i.width),n.size=s.size/s.count,e[a]+=n.size}i.getPadding&&ph(o,i.getPadding());var l=Math.max(0,t.outerWidth-hh(o,e,"left","right")),c=Math.max(0,t.outerHeight-hh(o,e,"top","bottom")),u=l!==e.w,f=c!==e.h;return e.w=l,e.h=c,n.horizontal?{same:u,other:f}:{same:f,other:u}}function mh(e,t){var n=t.maxPadding;return function(e){var r={left:0,top:0,right:0,bottom:0};return e.forEach((function(e){r[e]=Math.max(t[e],n[e])})),r}(e?["left","right"]:["top","bottom"])}function yh(e,t,n,r){var a,i,o,s,l,c,u=[];for(a=0,i=e.length,l=0;a<i;++a){(s=(o=e[a]).box).update(o.width||t.w,o.height||t.h,mh(o.horizontal,t));var f=vh(t,n,o,r),d=f.same,h=f.other;l|=d&&u.length,c=c||h,s.fullSize||u.push(o)}return l&&yh(u,t,n,r)||c}function gh(e,t,n,r,a){e.top=n,e.left=t,e.right=t+r,e.bottom=n+a,e.width=r,e.height=a}function bh(e,t,n,r){var a,i=n.padding,o=t.x,s=t.y,l=pd(e);try{for(l.s();!(a=l.n()).done;){var c=a.value,u=c.box,f=r[c.stack]||{count:1,placed:0,weight:1},d=c.stackWeight/f.weight||1;if(c.horizontal){var h=t.w*d,p=f.size||u.height;Lc(f.start)&&(s=f.start),u.fullSize?gh(u,i.left,s,n.outerWidth-i.right-i.left,p):gh(u,t.left+f.placed,s,h,p),f.start=s,f.placed+=h,s=u.bottom}else{var v=t.h*d,m=f.size||u.width;Lc(f.start)&&(o=f.start),u.fullSize?gh(u,o,i.top,m,n.outerHeight-i.bottom-i.top):gh(u,o,t.top+f.placed,m,v),f.start=o,f.placed+=v,o=u.right}}}catch(e){l.e(e)}finally{l.f()}t.x=o,t.y=s}var xh=function(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:function(e){t.draw(e)}}]},e.boxes.push(t)},_h=function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},wh=function(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},kh=function(e,t,n,r){if(e){var a=sf(e.options.layout.padding),i=Math.max(t-a.width,0),o=Math.max(n-a.height,0),s=function(e){var t=function(e){var t,n,r,a,i,o,s=[];for(t=0,n=(e||[]).length;t<n;++t){var l=r=e[t];a=l.position;var c=l.options;i=c.stack;var u=c.stackWeight;o=void 0===u?1:u,s.push({index:t,box:r,pos:a,horizontal:r.isHorizontal(),weight:r.weight,stack:i&&a+i,stackWeight:o})}return s}(e),n=dh(t.filter((function(e){return e.box.fullSize})),!0),r=dh(uh(t,"left"),!0),a=dh(uh(t,"right")),i=dh(uh(t,"top"),!0),o=dh(uh(t,"bottom")),s=fh(t,"x"),l=fh(t,"y");return{fullSize:n,leftAndTop:r.concat(i),rightAndBottom:a.concat(l).concat(o).concat(s),chartArea:uh(t,"chartArea"),vertical:r.concat(a).concat(l),horizontal:i.concat(o).concat(s)}}(e.boxes),l=s.vertical,c=s.horizontal;kc(e.boxes,(function(e){"function"==typeof e.beforeLayout&&e.beforeLayout()}));var u=l.reduce((function(e,t){return t.box.options&&!1===t.box.options.display?e:e+1}),0)||1,f=Object.freeze({outerWidth:t,outerHeight:n,padding:a,availableWidth:i,availableHeight:o,vBoxMaxWidth:i/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},a);ph(d,sf(r));var h=Object.assign({maxPadding:d,w:i,h:o,x:a.left,y:a.top},a),p=function(e,t){var n,r,a,i=function(e){var t,n={},r=pd(e);try{for(r.s();!(t=r.n()).done;){var a=t.value,i=a.stack,o=a.pos,s=a.stackWeight;if(i&&ch.includes(o)){var l=n[i]||(n[i]={count:0,placed:0,weight:0,size:0});l.count++,l.weight+=s}}}catch(e){r.e(e)}finally{r.f()}return n}(e),o=t.vBoxMaxWidth,s=t.hBoxMaxHeight;for(n=0,r=e.length;n<r;++n){var l=(a=e[n]).box.fullSize,c=i[a.stack],u=c&&a.stackWeight/c.weight;a.horizontal?(a.width=u?u*o:l&&t.availableWidth,a.height=s):(a.width=o,a.height=u?u*s:l&&t.availableHeight)}return i}(l.concat(c),f);yh(s.fullSize,h,f,p),yh(l,h,f,p),yh(c,h,f,p)&&yh(l,h,f,p),function(e){var t=e.maxPadding;function n(n){var r=Math.max(t[n]-e[n],0);return e[n]+=r,r}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}(h),bh(s.leftAndTop,h,f,p),h.x+=h.w,h.y+=h.h,bh(s.rightAndBottom,h,f,p),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},kc(s.chartArea,(function(t){var n=t.box;Object.assign(n,e.chartArea),n.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})}))}},Sh=function(){function e(){bd(this,e)}return _d(e,[{key:"acquireContext",value:function(e,t){}},{key:"releaseContext",value:function(e){return!1}},{key:"addEventListener",value:function(e,t,n){}},{key:"removeEventListener",value:function(e,t,n){}},{key:"getDevicePixelRatio",value:function(){return 1}},{key:"getMaximumSize",value:function(e,t,n,r){return t=Math.max(0,t||e.width),n=n||e.height,{width:t,height:Math.max(0,r?Math.floor(t/r):n)}}},{key:"isAttached",value:function(e){return!0}},{key:"updateConfig",value:function(e){}}]),e}(),Ch=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"acquireContext",value:function(e){return e&&e.getContext&&e.getContext("2d")||null}},{key:"updateConfig",value:function(e){e.options.animation=!1}}]),n}(Sh),Oh={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Dh=function(e){return null===e||""===e},Ah=!!Wf&&{passive:!0};function Mh(e,t,n){e.canvas.removeEventListener(t,n,Ah)}function Eh(e,t){var n,r=pd(e);try{for(r.s();!(n=r.n()).done;){var a=n.value;if(a===t||a.contains(t))return!0}}catch(e){r.e(e)}finally{r.f()}}function jh(e,t,n){var r=e.canvas,a=new MutationObserver((function(e){var t,a=!1,i=pd(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;a=(a=a||Eh(o.addedNodes,r))&&!Eh(o.removedNodes,r)}}catch(e){i.e(e)}finally{i.f()}a&&n()}));return a.observe(document,{childList:!0,subtree:!0}),a}function Ph(e,t,n){var r=e.canvas,a=new MutationObserver((function(e){var t,a=!1,i=pd(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;a=(a=a||Eh(o.removedNodes,r))&&!Eh(o.addedNodes,r)}}catch(e){i.e(e)}finally{i.f()}a&&n()}));return a.observe(document,{childList:!0,subtree:!0}),a}var Ih=new Map,Lh=0;function Rh(){var e=window.devicePixelRatio;e!==Lh&&(Lh=e,Ih.forEach((function(t,n){n.currentDevicePixelRatio!==e&&t()})))}function Nh(e,t,n){var r=e.canvas,a=r&&Lf(r);if(a){var i=pu((function(e,t){var r=a.clientWidth;n(e,t),r<a.clientWidth&&n()}),window),o=new ResizeObserver((function(e){var t=e[0],n=t.contentRect.width,r=t.contentRect.height;0===n&&0===r||i(n,r)}));return o.observe(a),function(e,t){Ih.size||window.addEventListener("resize",Rh),Ih.set(e,t)}(e,i),o}}function Th(e,t,n){n&&n.disconnect(),"resize"===t&&function(e){Ih.delete(e),Ih.size||window.removeEventListener("resize",Rh)}(e)}function Fh(e,t,n){var r=e.canvas,a=pu((function(t){null!==e.ctx&&n(function(e,t){var n=Oh[e.type]||e.type,r=zf(e,t),a=r.x,i=r.y;return{type:n,chart:t,native:e,x:void 0!==a?a:null,y:void 0!==i?i:null}}(t,e))}),e);return function(e,t,n){e.addEventListener(t,n,Ah)}(r,t,a),a}var zh=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"acquireContext",value:function(e,t){var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(function(e,t){var n=e.style,r=e.getAttribute("height"),a=e.getAttribute("width");if(e.$chartjs={initial:{height:r,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",Dh(a)){var i=$f(e,"width");void 0!==i&&(e.width=i)}if(Dh(r))if(""===e.style.height)e.height=e.width/(t||2);else{var o=$f(e,"height");void 0!==o&&(e.height=o)}}(e,t),n):null}},{key:"releaseContext",value:function(e){var t=e.canvas;if(!t.$chartjs)return!1;var n=t.$chartjs.initial;["height","width"].forEach((function(e){var r=n[e];vc(r)?t.removeAttribute(e):t.setAttribute(e,r)}));var r=n.style||{};return Object.keys(r).forEach((function(e){t.style[e]=r[e]})),t.width=t.width,delete t.$chartjs,!0}},{key:"addEventListener",value:function(e,t,n){this.removeEventListener(e,t);var r=e.$proxies||(e.$proxies={}),a={attach:jh,detach:Ph,resize:Nh}[t]||Fh;r[t]=a(e,t,n)}},{key:"removeEventListener",value:function(e,t){var n=e.$proxies||(e.$proxies={}),r=n[t];r&&(({attach:Th,detach:Th,resize:Th}[t]||Mh)(e,t,r),n[t]=void 0)}},{key:"getDevicePixelRatio",value:function(){return window.devicePixelRatio}},{key:"getMaximumSize",value:function(e,t,n,r){return function(e,t,n,r){var a=Nf(e),i=Ff(a,"margin"),o=Rf(a.maxWidth,e,"clientWidth")||Vc,s=Rf(a.maxHeight,e,"clientHeight")||Vc,l=function(e,t,n){var r,a;if(void 0===t||void 0===n){var i=Lf(e);if(i){var o=i.getBoundingClientRect(),s=Nf(i),l=Ff(s,"border","width"),c=Ff(s,"padding");t=o.width-c.width-l.width,n=o.height-c.height-l.height,r=Rf(s.maxWidth,i,"clientWidth"),a=Rf(s.maxHeight,i,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||Vc,maxHeight:a||Vc}}(e,t,n),c=l.width,u=l.height;if("content-box"===a.boxSizing){var f=Ff(a,"border","width"),d=Ff(a,"padding");c-=d.width+f.width,u-=d.height+f.height}return c=Math.max(0,c-i.width),u=Math.max(0,r?c/r:u-i.height),c=Vf(Math.min(c,o,l.maxWidth)),u=Vf(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Vf(c/2)),(void 0!==t||void 0!==n)&&r&&l.height&&u>l.height&&(u=l.height,c=Vf(Math.floor(u*r))),{width:c,height:u}}(e,t,n,r)}},{key:"isAttached",value:function(e){var t=Lf(e);return!(!t||!t.isConnected)}}]),n}(Sh),Vh=function(){function e(){bd(this,e),hd(this,"x",void 0),hd(this,"y",void 0),hd(this,"active",!1),hd(this,"options",void 0),hd(this,"$animations",void 0)}return _d(e,[{key:"tooltipPosition",value:function(e){var t=this.getProps(["x","y"],e);return{x:t.x,y:t.y}}},{key:"hasValue",value:function(){return Kc(this.x)&&Kc(this.y)}},{key:"getProps",value:function(e,t){var n=this,r=this.$animations;if(!t||!r)return this;var a={};return e.forEach((function(e){a[e]=r[e]&&r[e].active()?r[e]._to:n[e]})),a}}]),e}();function Hh(e,t,n,r,a){var i,o,s,l=xc(r,0),c=Math.min(xc(a,e.length),e.length),u=0;for(n=Math.ceil(n),a&&(n=(i=a-r)/Math.floor(i/n)),s=l;s<0;)u++,s=Math.round(l+u*n);for(o=Math.max(l,0);o<c;o++)o===s&&(t.push(e[o]),u++,s=Math.round(l+u*n))}hd(Vh,"defaults",{}),hd(Vh,"defaultRoutes",void 0);var Wh=function(e,t,n){return"top"===t||"left"===t?e[t]+n:e[t]-n},$h=function(e,t){return Math.min(t||e,e)};function Bh(e,t){for(var n=[],r=e.length/t,a=e.length,i=0;i<a;i+=r)n.push(e[Math.floor(i)]);return n}function Yh(e,t,n){var r,a=e.ticks.length,i=Math.min(t,a-1),o=e._startPixel,s=e._endPixel,l=1e-6,c=e.getPixelForTick(i);if(!(n&&(r=1===a?Math.max(c-o,s-c):0===t?(e.getPixelForTick(1)-c)/2:(c-e.getPixelForTick(i-1))/2,(c+=i<t?r:-r)<o-l||c>s+l)))return c}function Uh(e){return e.drawTicks?e.tickLength:0}function Gh(e,t){if(!e.display)return 0;var n=lf(e.font,t),r=sf(e.padding);return(mc(e.text)?e.text.length:1)*n.lineHeight+r.height}function Zh(e,t,n){var r=vu(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=function(e){return"left"===e?"right":"right"===e?"left":e}(r)),r}var Kh=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this)).id=e.id,r.type=e.type,r.options=void 0,r.ctx=e.ctx,r.chart=e.chart,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.width=void 0,r.height=void 0,r._margins={left:0,right:0,top:0,bottom:0},r.maxWidth=void 0,r.maxHeight=void 0,r.paddingTop=void 0,r.paddingBottom=void 0,r.paddingLeft=void 0,r.paddingRight=void 0,r.axis=void 0,r.labelRotation=void 0,r.min=void 0,r.max=void 0,r._range=void 0,r.ticks=[],r._gridLineItems=null,r._labelItems=null,r._labelSizes=null,r._length=0,r._maxLength=0,r._longestTextCache={},r._startPixel=void 0,r._endPixel=void 0,r._reversePixels=!1,r._userMax=void 0,r._userMin=void 0,r._suggestedMax=void 0,r._suggestedMin=void 0,r._ticksLength=0,r._borderValue=0,r._cache={},r._dataLimitsCached=!1,r.$context=void 0,r}return _d(n,[{key:"init",value:function(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}},{key:"parse",value:function(e,t){return e}},{key:"getUserBounds",value:function(){var e=this._userMin,t=this._userMax,n=this._suggestedMin,r=this._suggestedMax;return e=bc(e,Number.POSITIVE_INFINITY),t=bc(t,Number.NEGATIVE_INFINITY),n=bc(n,Number.POSITIVE_INFINITY),r=bc(r,Number.NEGATIVE_INFINITY),{min:bc(e,n),max:bc(t,r),minDefined:gc(e),maxDefined:gc(t)}}},{key:"getMinMax",value:function(e){var t,n=this.getUserBounds(),r=n.min,a=n.max,i=n.minDefined,o=n.maxDefined;if(i&&o)return{min:r,max:a};for(var s=this.getMatchingVisibleMetas(),l=0,c=s.length;l<c;++l)t=s[l].controller.getMinMax(this,e),i||(r=Math.min(r,t.min)),o||(a=Math.max(a,t.max));return{min:bc(r=o&&r>a?a:r,bc(a=i&&r>a?r:a,r)),max:bc(a,bc(r,a))}}},{key:"getPadding",value:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}},{key:"getTicks",value:function(){return this.ticks}},{key:"getLabels",value:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}},{key:"getLabelItems",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.chart.chartArea,t=this._labelItems||(this._labelItems=this._computeLabelItems(e));return t}},{key:"beforeLayout",value:function(){this._cache={},this._dataLimitsCached=!1}},{key:"beforeUpdate",value:function(){wc(this.options.beforeUpdate,[this])}},{key:"update",value:function(e,t,n){var r=this.options,a=r.beginAtZero,i=r.grace,o=r.ticks,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){var r=e.min,a=e.max,i=_c(t,(a-r)/2),o=function(e,t){return n&&0===e?0:e+t};return{min:o(r,-Math.abs(i)),max:o(a,i)}}(this,i,a),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();var l=s<this.ticks.length;this._convertTicksToLabels(l?Bh(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=function(e,t){var n=e.options.ticks,r=function(e){var t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),a=e._maxLength/n;return Math.floor(Math.min(r,a))}(e),a=Math.min(n.maxTicksLimit||r,r),i=n.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;t<n;t++)e[t].major&&r.push(t);return r}(t):[],o=i.length,s=i[0],l=i[o-1],c=[];if(o>a)return function(e,t,n,r){var a,i=0,o=n[0];for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),o=n[++i*r])}(t,c,i,o/a),c;var u=function(e,t,n){var r=function(e){var t,n,r=e.length;if(r<2)return!1;for(n=e[0],t=1;t<r;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),a=t.length/n;if(!r)return Math.max(a,1);for(var i=function(e){var t,n=[],r=Math.sqrt(e);for(t=1;t<r;t++)e%t==0&&(n.push(t),n.push(e/t));return r===(0|r)&&n.push(r),n.sort((function(e,t){return e-t})).pop(),n}(r),o=0,s=i.length-1;o<s;o++){var l=i[o];if(l>a)return l}return Math.max(a,1)}(i,t,a);if(o>0){var f,d,h=o>1?Math.round((l-s)/(o-1)):null;for(Hh(t,c,u,vc(h)?0:s-h,s),f=0,d=o-1;f<d;f++)Hh(t,c,u,i[f],i[f+1]);return Hh(t,c,u,l,vc(h)?t.length:l+h),c}return Hh(t,c,u),c}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}},{key:"configure",value:function(){var e,t,n=this.options.reverse;this.isHorizontal()?(e=this.left,t=this.right):(e=this.top,t=this.bottom,n=!n),this._startPixel=e,this._endPixel=t,this._reversePixels=n,this._length=t-e,this._alignToPixels=this.options.alignToPixels}},{key:"afterUpdate",value:function(){wc(this.options.afterUpdate,[this])}},{key:"beforeSetDimensions",value:function(){wc(this.options.beforeSetDimensions,[this])}},{key:"setDimensions",value:function(){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}},{key:"afterSetDimensions",value:function(){wc(this.options.afterSetDimensions,[this])}},{key:"_callHooks",value:function(e){this.chart.notifyPlugins(e,this.getContext()),wc(this.options[e],[this])}},{key:"beforeDataLimits",value:function(){this._callHooks("beforeDataLimits")}},{key:"determineDataLimits",value:function(){}},{key:"afterDataLimits",value:function(){this._callHooks("afterDataLimits")}},{key:"beforeBuildTicks",value:function(){this._callHooks("beforeBuildTicks")}},{key:"buildTicks",value:function(){return[]}},{key:"afterBuildTicks",value:function(){this._callHooks("afterBuildTicks")}},{key:"beforeTickToLabelConversion",value:function(){wc(this.options.beforeTickToLabelConversion,[this])}},{key:"generateTickLabels",value:function(e){var t,n,r,a=this.options.ticks;for(t=0,n=e.length;t<n;t++)(r=e[t]).label=wc(a.callback,[r.value,t,e],this)}},{key:"afterTickToLabelConversion",value:function(){wc(this.options.afterTickToLabelConversion,[this])}},{key:"beforeCalculateLabelRotation",value:function(){wc(this.options.beforeCalculateLabelRotation,[this])}},{key:"calculateLabelRotation",value:function(){var e,t,n,r=this.options,a=r.ticks,i=$h(this.ticks.length,r.ticks.maxTicksLimit),o=a.minRotation||0,s=a.maxRotation,l=o;if(!this._isVisible()||!a.display||o>=s||i<=1||!this.isHorizontal())this.labelRotation=o;else{var c=this._getLabelSizes(),u=c.widest.width,f=c.highest.height,d=iu(this.chart.width-u,0,this.maxWidth);u+6>(e=r.offset?this.maxWidth/i:d/(i-1))&&(e=d/(i-(r.offset?.5:1)),t=this.maxHeight-Uh(r.grid)-a.padding-Gh(r.title,this.chart.options.font),n=Math.sqrt(u*u+f*f),l=Jc(Math.min(Math.asin(iu((c.highest.height+6)/e,-1,1)),Math.asin(iu(t/n,-1,1))-Math.asin(iu(f/n,-1,1)))),l=Math.max(o,Math.min(s,l))),this.labelRotation=l}}},{key:"afterCalculateLabelRotation",value:function(){wc(this.options.afterCalculateLabelRotation,[this])}},{key:"afterAutoSkip",value:function(){}},{key:"beforeFit",value:function(){wc(this.options.beforeFit,[this])}},{key:"fit",value:function(){var e={width:0,height:0},t=this.chart,n=this.options,r=n.ticks,a=n.title,i=n.grid,o=this._isVisible(),s=this.isHorizontal();if(o){var l=Gh(a,t.options.font);if(s?(e.width=this.maxWidth,e.height=Uh(i)+l):(e.height=this.maxHeight,e.width=Uh(i)+l),r.display&&this.ticks.length){var c=this._getLabelSizes(),u=c.first,f=c.last,d=c.widest,h=c.highest,p=2*r.padding,v=qc(this.labelRotation),m=Math.cos(v),y=Math.sin(v);if(s){var g=r.mirror?0:y*d.width+m*h.height;e.height=Math.min(this.maxHeight,e.height+g+p)}else{var b=r.mirror?0:m*d.width+y*h.height;e.width=Math.min(this.maxWidth,e.width+b+p)}this._calculatePadding(u,f,y,m)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}},{key:"_calculatePadding",value:function(e,t,n,r){var a=this.options,i=a.ticks,o=i.align,s=i.padding,l=a.position,c=0!==this.labelRotation,u="top"!==l&&"x"===this.axis;if(this.isHorizontal()){var f=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1),h=0,p=0;c?u?(h=r*e.width,p=n*t.height):(h=n*e.height,p=r*t.width):"start"===o?p=t.width:"end"===o?h=e.width:"inner"!==o&&(h=e.width/2,p=t.width/2),this.paddingLeft=Math.max((h-f+s)*this.width/(this.width-f),0),this.paddingRight=Math.max((p-d+s)*this.width/(this.width-d),0)}else{var v=t.height/2,m=e.height/2;"start"===o?(v=0,m=e.height):"end"===o&&(v=t.height,m=0),this.paddingTop=v+s,this.paddingBottom=m+s}}},{key:"_handleMargins",value:function(){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))}},{key:"afterFit",value:function(){wc(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var e=this.options,t=e.axis,n=e.position;return"top"===n||"bottom"===n||"x"===t}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(e){var t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;t<n;t++)vc(e[t].label)&&(e.splice(t,1),n--,t--);this.afterTickToLabelConversion()}},{key:"_getLabelSizes",value:function(){var e=this._labelSizes;if(!e){var t=this.options.ticks.sampleSize,n=this.ticks;t<n.length&&(n=Bh(n,t)),this._labelSizes=e=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return e}},{key:"_computeLabelSizes",value:function(e,t,n){var r,a,i,o,s,l,c,u,f,d,h,p=this.ctx,v=this._longestTextCache,m=[],y=[],g=Math.floor(t/$h(t,n)),b=0,x=0;for(r=0;r<t;r+=g){if(o=e[r].label,s=this._resolveTickFontOptions(r),p.font=l=s.string,c=v[l]=v[l]||{data:{},gc:[]},u=s.lineHeight,f=d=0,vc(o)||mc(o)){if(mc(o))for(a=0,i=o.length;a<i;++a)vc(h=o[a])||mc(h)||(f=Fu(p,c.data,c.gc,f,h),d+=u)}else f=Fu(p,c.data,c.gc,f,o),d=u;m.push(f),y.push(d),b=Math.max(f,b),x=Math.max(d,x)}!function(e,t){kc(e,(function(e){var n,r=e.gc,a=r.length/2;if(a>t){for(n=0;n<a;++n)delete e.data[r[n]];r.splice(0,a)}}))}(v,t);var _=m.indexOf(b),w=y.indexOf(x),k=function(e){return{width:m[e]||0,height:y[e]||0}};return{first:k(0),last:k(t-1),widest:k(_),highest:k(w),widths:m,heights:y}}},{key:"getLabelForValue",value:function(e){return e}},{key:"getPixelForValue",value:function(e,t){return NaN}},{key:"getValueForPixel",value:function(e){}},{key:"getPixelForTick",value:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}},{key:"getPixelForDecimal",value:function(e){this._reversePixels&&(e=1-e);var t=this._startPixel+e*this._length;return iu(this._alignToPixels?Vu(this.chart,t,0):t,-32768,32767)}},{key:"getDecimalForPixel",value:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var e=this.min,t=this.max;return e<0&&t<0?t:e>0&&t>0?e:0}},{key:"getContext",value:function(e){var t=this.ticks||[];if(e>=0&&e<t.length){var n=t[e];return n.$context||(n.$context=function(e,t,n){return uf(e,{tick:n,index:t,type:"tick"})}(this.getContext(),e,n))}return this.$context||(this.$context=uf(this.chart.getContext(),{scale:this,type:"scale"}))}},{key:"_tickSize",value:function(){var e=this.options.ticks,t=qc(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),a=this._getLabelSizes(),i=e.autoSkipPadding||0,o=a?a.widest.width+i:0,s=a?a.highest.height+i:0;return this.isHorizontal()?s*n>o*r?o/n:s/r:s*r<o*n?s/n:o/r}},{key:"_isVisible",value:function(){var e=this.options.display;return"auto"!==e?!!e:this.getMatchingVisibleMetas().length>0}},{key:"_computeGridLineItems",value:function(e){var t,n,r,a,i,o,s,l,c,u,f,d,h=this.axis,p=this.chart,v=this.options,m=v.grid,y=v.position,g=v.border,b=m.offset,x=this.isHorizontal(),_=this.ticks.length+(b?1:0),w=Uh(m),k=[],S=g.setContext(this.getContext()),C=S.display?S.width:0,O=C/2,D=function(e){return Vu(p,e,C)};if("top"===y)t=D(this.bottom),o=this.bottom-w,l=t-O,u=D(e.top)+O,d=e.bottom;else if("bottom"===y)t=D(this.top),u=e.top,d=D(e.bottom)-O,o=t+O,l=this.top+w;else if("left"===y)t=D(this.right),i=this.right-w,s=t-O,c=D(e.left)+O,f=e.right;else if("right"===y)t=D(this.left),c=e.left,f=D(e.right)-O,i=t+O,s=this.left+w;else if("x"===h){if("center"===y)t=D((e.top+e.bottom)/2+.5);else if(yc(y)){var A=Object.keys(y)[0],M=y[A];t=D(this.chart.scales[A].getPixelForValue(M))}u=e.top,d=e.bottom,l=(o=t+O)+w}else if("y"===h){if("center"===y)t=D((e.left+e.right)/2);else if(yc(y)){var E=Object.keys(y)[0],j=y[E];t=D(this.chart.scales[E].getPixelForValue(j))}s=(i=t-O)-w,c=e.left,f=e.right}var P=xc(v.ticks.maxTicksLimit,_),I=Math.max(1,Math.ceil(_/P));for(n=0;n<_;n+=I){var L=this.getContext(n),R=m.setContext(L),N=g.setContext(L),T=R.lineWidth,F=R.color,z=N.dash||[],V=N.dashOffset,H=R.tickWidth,W=R.tickColor,$=R.tickBorderDash||[],B=R.tickBorderDashOffset;void 0!==(r=Yh(this,n,b))&&(a=Vu(p,r,T),x?i=s=c=f=a:o=l=u=d=a,k.push({tx1:i,ty1:o,tx2:s,ty2:l,x1:c,y1:u,x2:f,y2:d,width:T,color:F,borderDash:z,borderDashOffset:V,tickWidth:H,tickColor:W,tickBorderDash:$,tickBorderDashOffset:B}))}return this._ticksLength=_,this._borderValue=t,k}},{key:"_computeLabelItems",value:function(e){var t,n,r,a,i,o,s,l,c,u,f,d=this.axis,h=this.options,p=h.position,v=h.ticks,m=this.isHorizontal(),y=this.ticks,g=v.align,b=v.crossAlign,x=v.padding,_=v.mirror,w=Uh(h.grid),k=w+x,S=_?-x:k,C=-qc(this.labelRotation),O=[],D="middle";if("top"===p)i=this.bottom-S,o=this._getXAxisLabelAlignment();else if("bottom"===p)i=this.top+S,o=this._getXAxisLabelAlignment();else if("left"===p){var A=this._getYAxisLabelAlignment(w);o=A.textAlign,a=A.x}else if("right"===p){var M=this._getYAxisLabelAlignment(w);o=M.textAlign,a=M.x}else if("x"===d){if("center"===p)i=(e.top+e.bottom)/2+k;else if(yc(p)){var E=Object.keys(p)[0],j=p[E];i=this.chart.scales[E].getPixelForValue(j)+k}o=this._getXAxisLabelAlignment()}else if("y"===d){if("center"===p)a=(e.left+e.right)/2-k;else if(yc(p)){var P=Object.keys(p)[0],I=p[P];a=this.chart.scales[P].getPixelForValue(I)}o=this._getYAxisLabelAlignment(w).textAlign}"y"===d&&("start"===g?D="top":"end"===g&&(D="bottom"));var L=this._getLabelSizes();for(t=0,n=y.length;t<n;++t){r=y[t].label;var R=v.setContext(this.getContext(t));s=this.getPixelForTick(t)+v.labelOffset,c=(l=this._resolveTickFontOptions(t)).lineHeight;var N=(u=mc(r)?r.length:1)/2,T=R.color,F=R.textStrokeColor,z=R.textStrokeWidth,V=o;m?(a=s,"inner"===o&&(V=t===n-1?this.options.reverse?"left":"right":0===t?this.options.reverse?"right":"left":"center"),f="top"===p?"near"===b||0!==C?-u*c+c/2:"center"===b?-L.highest.height/2-N*c+c:-L.highest.height+c/2:"near"===b||0!==C?c/2:"center"===b?L.highest.height/2-N*c:L.highest.height-u*c,_&&(f*=-1),0===C||R.showLabelBackdrop||(a+=c/2*Math.sin(C))):(i=s,f=(1-u)*c/2);var H=void 0;if(R.showLabelBackdrop){var W=sf(R.backdropPadding),$=L.heights[t],B=L.widths[t],Y=f-W.top,U=0-W.left;switch(D){case"middle":Y-=$/2;break;case"bottom":Y-=$}switch(o){case"center":U-=B/2;break;case"right":U-=B}H={left:U,top:Y,width:B+W.width,height:$+W.height,color:R.backdropColor}}O.push({label:r,font:l,textOffset:f,options:{rotation:C,color:T,strokeColor:F,strokeWidth:z,textAlign:V,textBaseline:D,translation:[a,i],backdrop:H}})}return O}},{key:"_getXAxisLabelAlignment",value:function(){var e=this.options,t=e.position,n=e.ticks;if(-qc(this.labelRotation))return"top"===t?"left":"right";var r="center";return"start"===n.align?r="left":"end"===n.align?r="right":"inner"===n.align&&(r="inner"),r}},{key:"_getYAxisLabelAlignment",value:function(e){var t,n,r=this.options,a=r.position,i=r.ticks,o=i.crossAlign,s=i.mirror,l=i.padding,c=e+l,u=this._getLabelSizes().widest.width;return"left"===a?s?(n=this.right+l,"near"===o?t="left":"center"===o?(t="center",n+=u/2):(t="right",n+=u)):(n=this.right-c,"near"===o?t="right":"center"===o?(t="center",n-=u/2):(t="left",n=this.left)):"right"===a?s?(n=this.left+l,"near"===o?t="right":"center"===o?(t="center",n-=u/2):(t="left",n-=u)):(n=this.left+c,"near"===o?t="left":"center"===o?(t="center",n+=u/2):(t="right",n=this.right)):t="right",{textAlign:t,x:n}}},{key:"_computeLabelArea",value:function(){if(!this.options.ticks.mirror){var e=this.chart,t=this.options.position;return"left"===t||"right"===t?{top:0,left:this.left,bottom:e.height,right:this.right}:"top"===t||"bottom"===t?{top:this.top,left:0,bottom:this.bottom,right:e.width}:void 0}}},{key:"drawBackground",value:function(){var e=this.ctx,t=this.options.backgroundColor,n=this.left,r=this.top,a=this.width,i=this.height;t&&(e.save(),e.fillStyle=t,e.fillRect(n,r,a,i),e.restore())}},{key:"getLineWidthForValue",value:function(e){var t=this.options.grid;if(!this._isVisible()||!t.display)return 0;var n=this.ticks.findIndex((function(t){return t.value===e}));return n>=0?t.setContext(this.getContext(n)).lineWidth:0}},{key:"drawGrid",value:function(e){var t,n,r=this.options.grid,a=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o=function(e,t,n){n.width&&n.color&&(a.save(),a.lineWidth=n.width,a.strokeStyle=n.color,a.setLineDash(n.borderDash||[]),a.lineDashOffset=n.borderDashOffset,a.beginPath(),a.moveTo(e.x,e.y),a.lineTo(t.x,t.y),a.stroke(),a.restore())};if(r.display)for(t=0,n=i.length;t<n;++t){var s=i[t];r.drawOnChartArea&&o({x:s.x1,y:s.y1},{x:s.x2,y:s.y2},s),r.drawTicks&&o({x:s.tx1,y:s.ty1},{x:s.tx2,y:s.ty2},{color:s.tickColor,width:s.tickWidth,borderDash:s.tickBorderDash,borderDashOffset:s.tickBorderDashOffset})}}},{key:"drawBorder",value:function(){var e=this.chart,t=this.ctx,n=this.options,r=n.border,a=n.grid,i=r.setContext(this.getContext()),o=r.display?i.width:0;if(o){var s,l,c,u,f=a.setContext(this.getContext(0)).lineWidth,d=this._borderValue;this.isHorizontal()?(s=Vu(e,this.left,o)-o/2,l=Vu(e,this.right,f)+f/2,c=u=d):(c=Vu(e,this.top,o)-o/2,u=Vu(e,this.bottom,f)+f/2,s=l=d),t.save(),t.lineWidth=i.width,t.strokeStyle=i.color,t.beginPath(),t.moveTo(s,c),t.lineTo(l,u),t.stroke(),t.restore()}}},{key:"drawLabels",value:function(e){if(this.options.ticks.display){var t=this.ctx,n=this._computeLabelArea();n&&Yu(t,n);var r,a=pd(this.getLabelItems(e));try{for(a.s();!(r=a.n()).done;){var i=r.value,o=i.options,s=i.font;Ju(t,i.label,0,i.textOffset,s,o)}}catch(e){a.e(e)}finally{a.f()}n&&Uu(t)}}},{key:"drawTitle",value:function(){var e=this.ctx,t=this.options,n=t.position,r=t.title,a=t.reverse;if(r.display){var i=lf(r.font),o=sf(r.padding),s=r.align,l=i.lineHeight/2;"bottom"===n||"center"===n||yc(n)?(l+=o.bottom,mc(r.text)&&(l+=i.lineHeight*(r.text.length-1))):l+=o.top;var c=function(e,t,n,r){var a,i,o,s=e.top,l=e.left,c=e.bottom,u=e.right,f=e.chart,d=f.chartArea,h=f.scales,p=0,v=c-s,m=u-l;if(e.isHorizontal()){if(i=mu(r,l,u),yc(n)){var y=Object.keys(n)[0],g=n[y];o=h[y].getPixelForValue(g)+v-t}else o="center"===n?(d.bottom+d.top)/2+v-t:Wh(e,n,t);a=u-l}else{if(yc(n)){var b=Object.keys(n)[0],x=n[b];i=h[b].getPixelForValue(x)-m+t}else i="center"===n?(d.left+d.right)/2-m+t:Wh(e,n,t);o=mu(r,c,s),p="left"===n?-Wc:Wc}return{titleX:i,titleY:o,maxWidth:a,rotation:p}}(this,l,n,s),u=c.titleX,f=c.titleY,d=c.maxWidth,h=c.rotation;Ju(e,r.text,0,0,i,{color:r.color,maxWidth:d,rotation:h,textAlign:Zh(s,n,a),textBaseline:"middle",translation:[u,f]})}}},{key:"draw",value:function(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}},{key:"_layers",value:function(){var e=this,t=this.options,r=t.ticks&&t.ticks.z||0,a=xc(t.grid&&t.grid.z,-1),i=xc(t.border&&t.border.z,0);return this._isVisible()&&this.draw===n.prototype.draw?[{z:a,draw:function(t){e.drawBackground(),e.drawGrid(t),e.drawTitle()}},{z:i,draw:function(){e.drawBorder()}},{z:r,draw:function(t){e.drawLabels(t)}}]:[{z:r,draw:function(t){e.draw(t)}}]}},{key:"getMatchingVisibleMetas",value:function(e){var t,n,r=this.chart.getSortedVisibleDatasetMetas(),a=this.axis+"AxisID",i=[];for(t=0,n=r.length;t<n;++t){var o=r[t];o[a]!==this.id||e&&o.type!==e||i.push(o)}return i}},{key:"_resolveTickFontOptions",value:function(e){return lf(this.options.ticks.setContext(this.getContext(e)).font)}},{key:"_maxDigits",value:function(){var e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}]),n}(Vh),Xh=function(){function e(t,n,r){bd(this,e),this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}return _d(e,[{key:"isForType",value:function(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}},{key:"register",value:function(e){var t,n=Object.getPrototypeOf(e);(function(e){return"id"in e&&"defaults"in e})(n)&&(t=this.register(n));var r=this.items,a=e.id,i=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+e);return a in r||(r[a]=e,function(e,t,n){var r=Ac(Object.create(null),[n?Tu.get(n):{},Tu.get(t),e.defaults]);Tu.set(t,r),e.defaultRoutes&&function(e,t){Object.keys(t).forEach((function(n){var r=n.split("."),a=r.pop(),i=[e].concat(r).join("."),o=t[n].split("."),s=o.pop(),l=o.join(".");Tu.route(i,a,l,s)}))}(t,e.defaultRoutes),e.descriptors&&Tu.describe(t,e.descriptors)}(e,i,t),this.override&&Tu.override(e.id,e.overrides)),i}},{key:"get",value:function(e){return this.items[e]}},{key:"unregister",value:function(e){var t=this.items,n=e.id,r=this.scope;n in t&&delete t[n],r&&n in Tu[r]&&(delete Tu[r][n],this.override&&delete Pu[n])}}]),e}(),qh=function(){function e(){bd(this,e),this.controllers=new Xh(Fd,"datasets",!0),this.elements=new Xh(Vh,"elements"),this.plugins=new Xh(Object,"plugins"),this.scales=new Xh(Kh,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}return _d(e,[{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t)}},{key:"remove",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t)}},{key:"addControllers",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.controllers)}},{key:"addElements",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.elements)}},{key:"addPlugins",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.plugins)}},{key:"addScales",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("register",t,this.scales)}},{key:"getController",value:function(e){return this._get(e,this.controllers,"controller")}},{key:"getElement",value:function(e){return this._get(e,this.elements,"element")}},{key:"getPlugin",value:function(e){return this._get(e,this.plugins,"plugin")}},{key:"getScale",value:function(e){return this._get(e,this.scales,"scale")}},{key:"removeControllers",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.controllers)}},{key:"removeElements",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.elements)}},{key:"removePlugins",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.plugins)}},{key:"removeScales",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this._each("unregister",t,this.scales)}},{key:"_each",value:function(e,t,n){var r=this;md(t).forEach((function(t){var a=n||r._getRegistryForType(t);n||a.isForType(t)||a===r.plugins&&t.id?r._exec(e,a,t):kc(t,(function(t){var a=n||r._getRegistryForType(t);r._exec(e,a,t)}))}))}},{key:"_exec",value:function(e,t,n){var r=Ic(e);wc(n["before"+r],[],n),t[e](n),wc(n["after"+r],[],n)}},{key:"_getRegistryForType",value:function(e){for(var t=0;t<this._typedRegistries.length;t++){var n=this._typedRegistries[t];if(n.isForType(e))return n}return this.plugins}},{key:"_get",value:function(e,t,n){var r=t.get(e);if(void 0===r)throw new Error('"'+e+'" is not a registered '+n+".");return r}}]),e}(),Jh=new qh,Qh=function(){function e(){bd(this,e),this._init=[]}return _d(e,[{key:"notify",value:function(e,t,n,r){"beforeInit"===t&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install"));var a=r?this._descriptors(e).filter(r):this._descriptors(e),i=this._notify(a,e,t,n);return"afterDestroy"===t&&(this._notify(a,e,"stop"),this._notify(this._init,e,"uninstall")),i}},{key:"_notify",value:function(e,t,n,r){r=r||{};var a,i=pd(e);try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o.plugin;if(!1===wc(s[n],[t,r,o.options],s)&&r.cancelable)return!1}}catch(e){i.e(e)}finally{i.f()}return!0}},{key:"invalidate",value:function(){vc(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}},{key:"_descriptors",value:function(e){if(this._cache)return this._cache;var t=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),t}},{key:"_createDescriptors",value:function(e,t){var n=e&&e.config,r=xc(n.options&&n.options.plugins,{}),a=function(e){for(var t={},n=[],r=Object.keys(Jh.plugins.items),a=0;a<r.length;a++)n.push(Jh.getPlugin(r[a]));for(var i=e.plugins||[],o=0;o<i.length;o++){var s=i[o];-1===n.indexOf(s)&&(n.push(s),t[s.id]=!0)}return{plugins:n,localIds:t}}(n);return!1!==r||t?function(e,t,n,r){var a,i=t.plugins,o=t.localIds,s=[],l=e.getContext(),c=pd(i);try{for(c.s();!(a=c.n()).done;){var u=a.value,f=u.id,d=ep(n[f],r);null!==d&&s.push({plugin:u,options:tp(e.config,{plugin:u,local:o[f]},d,l)})}}catch(e){c.e(e)}finally{c.f()}return s}(e,a,r,t):[]}},{key:"_notifyStateChanges",value:function(e){var t=this._oldCache||[],n=this._cache,r=function(e,t){return e.filter((function(e){return!t.some((function(t){return e.plugin.id===t.plugin.id}))}))};this._notify(r(t,n),e,"stop"),this._notify(r(n,t),e,"start")}}]),e}();function ep(e,t){return t||!1!==e?!0===e?{}:e:null}function tp(e,t,n,r){var a=t.plugin,i=t.local,o=e.pluginScopeKeys(a),s=e.getOptionScopes(n,o);return i&&a.defaults&&s.push(a.defaults),e.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function np(e,t){var n=Tu.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function rp(e){if("x"===e||"y"===e||"r"===e)return e}function ap(e){return"top"===e||"bottom"===e?"x":"left"===e||"right"===e?"y":void 0}function ip(e){if(rp(e))return e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var a=0,i=n;a<i.length;a++){var o=i[a],s=o.axis||ap(o.position)||e.length>1&&rp(e[0].toLowerCase());if(s)return s}throw new Error("Cannot determine type of '".concat(e,"' axis. Please provide 'axis' or 'position' option."))}function op(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function sp(e){var t=e.options||(e.options={});t.plugins=xc(t.plugins,{}),t.scales=function(e,t){var n=Pu[e.type]||{scales:{}},r=t.scales||{},a=np(e.type,t),i=Object.create(null);return Object.keys(r).forEach((function(t){var o=r[t];if(!yc(o))return console.error("Invalid scale configuration for scale: ".concat(t));if(o._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(t));var s=ip(t,o,function(e,t){if(t.data&&t.data.datasets){var n=t.data.datasets.filter((function(t){return t.xAxisID===e||t.yAxisID===e}));if(n.length)return op(e,"x",n[0])||op(e,"y",n[0])}return{}}(t,e),Tu.scales[o.type]),l=function(e,t){return e===t?"_index_":"_value_"}(s,a),c=n.scales||{};i[t]=Mc(Object.create(null),[{axis:s},o,c[s],c[l]])})),e.data.datasets.forEach((function(n){var a=n.type||e.type,o=n.indexAxis||np(a,t),s=(Pu[a]||{}).scales||{};Object.keys(s).forEach((function(e){var t=function(e,t){var n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,o),a=n[t+"AxisID"]||t;i[a]=i[a]||Object.create(null),Mc(i[a],[{axis:t},r[a],s[e]])}))})),Object.keys(i).forEach((function(e){var t=i[e];Mc(t,[Tu.scales[t.type],Tu.scale])})),i}(e,t)}function lp(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}var cp=new Map,up=new Set;function fp(e,t){var n=cp.get(e);return n||(n=t(),cp.set(e,n),up.add(n)),n}var dp=function(e,t,n){var r=Pc(t,n);void 0!==r&&e.add(r)},hp=function(){function e(t){bd(this,e),this._config=function(e){return(e=e||{}).data=lp(e.data),sp(e),e}(t),this._scopeCache=new Map,this._resolverCache=new Map}return _d(e,[{key:"platform",get:function(){return this._config.platform}},{key:"type",get:function(){return this._config.type},set:function(e){this._config.type=e}},{key:"data",get:function(){return this._config.data},set:function(e){this._config.data=lp(e)}},{key:"options",get:function(){return this._config.options},set:function(e){this._config.options=e}},{key:"plugins",get:function(){return this._config.plugins}},{key:"update",value:function(){var e=this._config;this.clearCache(),sp(e)}},{key:"clearCache",value:function(){this._scopeCache.clear(),this._resolverCache.clear()}},{key:"datasetScopeKeys",value:function(e){return fp(e,(function(){return[["datasets.".concat(e),""]]}))}},{key:"datasetAnimationScopeKeys",value:function(e,t){return fp("".concat(e,".transition.").concat(t),(function(){return[["datasets.".concat(e,".transitions.").concat(t),"transitions.".concat(t)],["datasets.".concat(e),""]]}))}},{key:"datasetElementScopeKeys",value:function(e,t){return fp("".concat(e,"-").concat(t),(function(){return[["datasets.".concat(e,".elements.").concat(t),"datasets.".concat(e),"elements.".concat(t),""]]}))}},{key:"pluginScopeKeys",value:function(e){var t=e.id,n=this.type;return fp("".concat(n,"-plugin-").concat(t),(function(){return[["plugins.".concat(t)].concat(md(e.additionalOptionScopes||[]))]}))}},{key:"_cachedScopes",value:function(e,t){var n=this._scopeCache,r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}},{key:"getOptionScopes",value:function(e,t,n){var r=this.options,a=this.type,i=this._cachedScopes(e,n),o=i.get(t);if(o)return o;var s=new Set;t.forEach((function(t){e&&(s.add(e),t.forEach((function(t){return dp(s,e,t)}))),t.forEach((function(e){return dp(s,r,e)})),t.forEach((function(e){return dp(s,Pu[a]||{},e)})),t.forEach((function(e){return dp(s,Tu,e)})),t.forEach((function(e){return dp(s,Iu,e)}))}));var l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),up.has(t)&&i.set(t,l),l}},{key:"chartOptionScopes",value:function(){var e=this.options,t=this.type;return[e,Pu[t]||{},Tu.datasets[t]||{},{type:t},Tu,Iu]}},{key:"resolveNamedOptions",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""],a={$shared:!0},i=pp(this._resolverCache,e,r),o=i.resolver,s=i.subPrefixes,l=o;if(mp(o,t)){a.$shared=!1,n=Rc(n)?n():n;var c=this.createResolver(e,n,s);l=df(o,n,c)}var u,f=pd(t);try{for(f.s();!(u=f.n()).done;){var d=u.value;a[d]=l[d]}}catch(e){f.e(e)}finally{f.f()}return a}},{key:"createResolver",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0,a=pp(this._resolverCache,e,n),i=a.resolver;return yc(t)?df(i,t,void 0,r):i}}]),e}();function pp(e,t,n){var r=e.get(t);r||(r=new Map,e.set(t,r));var a=n.join(),i=r.get(a);return i||(i={resolver:ff(t,n),subPrefixes:n.filter((function(e){return!e.toLowerCase().includes("hover")}))},r.set(a,i)),i}var vp=function(e){return yc(e)&&Object.getOwnPropertyNames(e).reduce((function(t,n){return t||Rc(e[n])}),!1)};function mp(e,t){var n,r=hf(e),a=r.isScriptable,i=r.isIndexable,o=pd(t);try{for(o.s();!(n=o.n()).done;){var s=n.value,l=a(s),c=i(s),u=(c||l)&&e[s];if(l&&(Rc(u)||vp(u))||c&&mc(u))return!0}}catch(e){o.e(e)}finally{o.f()}return!1}var yp=["top","bottom","left","right","chartArea"];function gp(e,t){return"top"===e||"bottom"===e||-1===yp.indexOf(e)&&"x"===t}function bp(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function xp(e){var t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),wc(n&&n.onComplete,[e],t)}function _p(e){var t=e.chart,n=t.options.animation;wc(n&&n.onProgress,[e],t)}function wp(e){return If()&&"string"==typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var kp={},Sp=function(e){var t=wp(e);return Object.values(kp).filter((function(e){return e.canvas===t})).pop()};function Cp(e,t,n){for(var r=0,a=Object.keys(e);r<a.length;r++){var i=a[r],o=+i;if(o>=t){var s=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=s)}}}function Op(e,t,n){return e.options.clip?e[n]:t[n]}var Dp=function(){function e(t,n){var r=this;bd(this,e);var a=this.config=new hp(n),i=wp(t),o=Sp(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.");var s=a.createResolver(a.chartOptionScopes(),this.getContext());this.platform=new(a.platform||function(e){return!If()||"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?Ch:zh}(i)),this.platform.updateConfig(a);var l,c,u,f=this.platform.acquireContext(i,s.aspectRatio),d=f&&f.canvas,h=d&&d.height,p=d&&d.width;this.id=pc(),this.ctx=f,this.canvas=d,this.width=p,this.height=h,this._options=s,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 Qh,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=(l=function(e){return r.update(e)},c=s.resizeDelay||0,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c?(clearTimeout(u),u=setTimeout(l,c,t)):l.apply(this,t),c}),this._dataChanges=[],kp[this.id]=this,f&&d?(wd.listen(this,"complete",xp),wd.listen(this,"progress",_p),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}return _d(e,[{key:"aspectRatio",get:function(){var e=this.options,t=e.aspectRatio,n=e.maintainAspectRatio,r=this.width,a=this.height,i=this._aspectRatio;return vc(t)?n&&i?i:a?r/a:null:t}},{key:"data",get:function(){return this.config.data},set:function(e){this.config.data=e}},{key:"options",get:function(){return this._options},set:function(e){this.config.options=e}},{key:"registry",get:function(){return Jh}},{key:"_initialize",value:function(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Hf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}},{key:"clear",value:function(){return Hu(this.canvas,this.ctx),this}},{key:"stop",value:function(){return wd.stop(this),this}},{key:"resize",value:function(e,t){wd.running(this)?this._resizeBeforeDraw={width:e,height:t}:this._resize(e,t)}},{key:"_resize",value:function(e,t){var n=this.options,r=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,i=this.platform.getMaximumSize(r,e,t,a),o=n.devicePixelRatio||this.platform.getDevicePixelRatio(),s=this.width?"resize":"attach";this.width=i.width,this.height=i.height,this._aspectRatio=this.aspectRatio,Hf(this,o,!0)&&(this.notifyPlugins("resize",{size:i}),wc(n.onResize,[this,i],this),this.attached&&this._doResize(s)&&this.render())}},{key:"ensureScalesHaveIDs",value:function(){kc(this.options.scales||{},(function(e,t){e.id=t}))}},{key:"buildOrUpdateScales",value:function(){var e=this,t=this.options,n=t.scales,r=this.scales,a=Object.keys(r).reduce((function(e,t){return e[t]=!1,e}),{}),i=[];n&&(i=i.concat(Object.keys(n).map((function(e){var t=n[e],r=ip(e,t),a="r"===r,i="x"===r;return{options:t,dposition:a?"chartArea":i?"bottom":"left",dtype:a?"radialLinear":i?"category":"linear"}})))),kc(i,(function(n){var i=n.options,o=i.id,s=ip(o,i),l=xc(i.type,n.dtype);void 0!==i.position&&gp(i.position,s)===gp(n.dposition)||(i.position=n.dposition),a[o]=!0;var c=null;o in r&&r[o].type===l?c=r[o]:(c=new(Jh.getScale(l))({id:o,type:l,ctx:e.ctx,chart:e}),r[c.id]=c),c.init(i,t)})),kc(a,(function(e,t){e||delete r[t]})),kc(r,(function(t){wh(0,t,t.options),xh(e,t)}))}},{key:"_updateMetasets",value:function(){var e=this._metasets,t=this.data.datasets.length,n=e.length;if(e.sort((function(e,t){return e.index-t.index})),n>t){for(var r=t;r<n;++r)this._destroyDatasetMeta(r);e.splice(t,n-t)}this._sortedMetasets=e.slice(0).sort(bp("order","index"))}},{key:"_removeUnreferencedMetasets",value:function(){var e=this,t=this._metasets,n=this.data.datasets;t.length>n.length&&delete this._stacks,t.forEach((function(t,r){0===n.filter((function(e){return e===t._dataset})).length&&e._destroyDatasetMeta(r)}))}},{key:"buildOrUpdateControllers",value:function(){var e,t,n=[],r=this.data.datasets;for(this._removeUnreferencedMetasets(),e=0,t=r.length;e<t;e++){var a=r[e],i=this.getDatasetMeta(e),o=a.type||this.config.type;if(i.type&&i.type!==o&&(this._destroyDatasetMeta(e),i=this.getDatasetMeta(e)),i.type=o,i.indexAxis=a.indexAxis||np(o,this.options),i.order=a.order||0,i.index=e,i.label=""+a.label,i.visible=this.isDatasetVisible(e),i.controller)i.controller.updateIndex(e),i.controller.linkScales();else{var s=Jh.getController(o),l=Tu.datasets[o],c=l.datasetElementType,u=l.dataElementType;Object.assign(s,{dataElementType:Jh.getElement(u),datasetElementType:c&&Jh.getElement(c)}),i.controller=new s(this,e),n.push(i.controller)}}return this._updateMetasets(),n}},{key:"_resetElements",value:function(){var e=this;kc(this.data.datasets,(function(t,n){e.getDatasetMeta(n).controller.reset()}),this)}},{key:"reset",value:function(){this._resetElements(),this.notifyPlugins("reset")}},{key:"update",value:function(e){var t=this.config;t.update();var n=this._options=t.createResolver(t.chartOptionScopes(),this.getContext()),r=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1!==this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})){var a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");for(var i=0,o=0,s=this.data.datasets.length;o<s;o++){var l=this.getDatasetMeta(o).controller,c=!r&&-1===a.indexOf(l);l.buildOrUpdateElements(c),i=Math.max(+l.getMaxOverflow(),i)}i=this._minPadding=n.layout.autoPadding?i:0,this._updateLayout(i),r||kc(a,(function(e){e.reset()})),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(bp("z","_idx"));var u=this._active,f=this._lastEvent;f?this._eventHandler(f,!0):u.length&&this._updateHoverStyles(u,u,!0),this.render()}}},{key:"_updateScales",value:function(){var e=this;kc(this.scales,(function(t){_h(e,t)})),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}},{key:"_checkEventBindings",value:function(){var e=this.options,t=new Set(Object.keys(this._listeners)),n=new Set(e.events);Nc(t,n)&&!!this._responsiveListeners===e.responsive||(this.unbindEvents(),this.bindEvents())}},{key:"_updateHiddenIndices",value:function(){var e,t=this._hiddenIndices,n=pd(this._getUniformDataChanges()||[]);try{for(n.s();!(e=n.n()).done;){var r=e.value,a=r.method,i=r.start,o=r.count;Cp(t,i,"_removeElements"===a?-o:o)}}catch(e){n.e(e)}finally{n.f()}}},{key:"_getUniformDataChanges",value:function(){var e=this._dataChanges;if(e&&e.length){this._dataChanges=[];for(var t=this.data.datasets.length,n=function(t){return new Set(e.filter((function(e){return e[0]===t})).map((function(e,t){return t+","+e.splice(1).join(",")})))},r=n(0),a=1;a<t;a++)if(!Nc(r,n(a)))return;return Array.from(r).map((function(e){return e.split(",")})).map((function(e){return{method:e[1],start:+e[2],count:+e[3]}}))}}},{key:"_updateLayout",value:function(e){var t=this;if(!1!==this.notifyPlugins("beforeLayout",{cancelable:!0})){kh(this,this.width,this.height,e);var n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],kc(this.boxes,(function(e){var n;r&&"chartArea"===e.position||(e.configure&&e.configure(),(n=t._layers).push.apply(n,md(e._layers())))}),this),this._layers.forEach((function(e,t){e._idx=t})),this.notifyPlugins("afterLayout")}}},{key:"_updateDatasets",value:function(e){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})){for(var t=0,n=this.data.datasets.length;t<n;++t)this.getDatasetMeta(t).controller.configure();for(var r=0,a=this.data.datasets.length;r<a;++r)this._updateDataset(r,Rc(e)?e({datasetIndex:r}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}},{key:"_updateDataset",value:function(e,t){var n=this.getDatasetMeta(e),r={meta:n,index:e,mode:t,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",r)&&(n.controller._update(t),r.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",r))}},{key:"render",value:function(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(wd.has(this)?this.attached&&!wd.running(this)&&wd.start(this):(this.draw(),xp({chart:this})))}},{key:"draw",value:function(){var e;if(this._resizeBeforeDraw){var t=this._resizeBeforeDraw,n=t.width,r=t.height;this._resize(n,r),this._resizeBeforeDraw=null}if(this.clear(),!(this.width<=0||this.height<=0)&&!1!==this.notifyPlugins("beforeDraw",{cancelable:!0})){var a=this._layers;for(e=0;e<a.length&&a[e].z<=0;++e)a[e].draw(this.chartArea);for(this._drawDatasets();e<a.length;++e)a[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}}},{key:"_getSortedDatasetMetas",value:function(e){var t,n,r=this._sortedMetasets,a=[];for(t=0,n=r.length;t<n;++t){var i=r[t];e&&!i.visible||a.push(i)}return a}},{key:"getSortedVisibleDatasetMetas",value:function(){return this._getSortedDatasetMetas(!0)}},{key:"_drawDatasets",value:function(){if(!1!==this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})){for(var e=this.getSortedVisibleDatasetMetas(),t=e.length-1;t>=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(e){var t=this.ctx,n=e._clip,r=!n.disabled,a=function(e,t){var n=e.xScale,r=e.yScale;return n&&r?{left:Op(n,t,"left"),right:Op(n,t,"right"),top:Op(r,t,"top"),bottom:Op(r,t,"bottom")}:t}(e,this.chartArea),i={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(r&&Yu(t,{left:!1===n.left?0:a.left-n.left,right:!1===n.right?this.width:a.right+n.right,top:!1===n.top?0:a.top-n.top,bottom:!1===n.bottom?this.height:a.bottom+n.bottom}),e.controller.draw(),r&&Uu(t),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}},{key:"isPointInArea",value:function(e){return Bu(e,this.chartArea,this._minPadding)}},{key:"getElementsAtEventForMode",value:function(e,t,n,r){var a=lh.modes[t];return"function"==typeof a?a(this,e,n,r):[]}},{key:"getDatasetMeta",value:function(e){var t=this.data.datasets[e],n=this._metasets,r=n.filter((function(e){return e&&e._dataset===t})).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}},{key:"getContext",value:function(){return this.$context||(this.$context=uf(null,{chart:this,type:"chart"}))}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(e){var t=this.data.datasets[e];if(!t)return!1;var n=this.getDatasetMeta(e);return"boolean"==typeof n.hidden?!n.hidden:!t.hidden}},{key:"setDatasetVisibility",value:function(e,t){this.getDatasetMeta(e).hidden=!t}},{key:"toggleDataVisibility",value:function(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}},{key:"getDataVisibility",value:function(e){return!this._hiddenIndices[e]}},{key:"_updateVisibility",value:function(e,t,n){var r=n?"show":"hide",a=this.getDatasetMeta(e),i=a.controller._resolveAnimations(void 0,r);Lc(t)?(a.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),i.update(a,{visible:n}),this.update((function(t){return t.datasetIndex===e?r:void 0})))}},{key:"hide",value:function(e,t){this._updateVisibility(e,t,!1)}},{key:"show",value:function(e,t){this._updateVisibility(e,t,!0)}},{key:"_destroyDatasetMeta",value:function(e){var t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}},{key:"_stop",value:function(){var e,t;for(this.stop(),wd.remove(this),e=0,t=this.data.datasets.length;e<t;++e)this._destroyDatasetMeta(e)}},{key:"destroy",value:function(){this.notifyPlugins("beforeDestroy");var e=this.canvas,t=this.ctx;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Hu(e,t),this.platform.releaseContext(t),this.canvas=null,this.ctx=null),delete kp[this.id],this.notifyPlugins("afterDestroy")}},{key:"toBase64Image",value:function(){var e;return(e=this.canvas).toDataURL.apply(e,arguments)}},{key:"bindEvents",value:function(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}},{key:"bindUserEvents",value:function(){var e=this,t=this._listeners,n=this.platform,r=function(t,n,r){t.offsetX=n,t.offsetY=r,e._eventHandler(t)};kc(this.options.events,(function(a){return function(r,a){n.addEventListener(e,r,a),t[r]=a}(a,r)}))}},{key:"bindResponsiveEvents",value:function(){var e=this;this._responsiveListeners||(this._responsiveListeners={});var t,n=this._responsiveListeners,r=this.platform,a=function(t,a){r.addEventListener(e,t,a),n[t]=a},i=function(t,a){n[t]&&(r.removeEventListener(e,t,a),delete n[t])},o=function(t,n){e.canvas&&e.resize(t,n)},s=function n(){i("attach",n),e.attached=!0,e.resize(),a("resize",o),a("detach",t)};t=function(){e.attached=!1,i("resize",o),e._stop(),e._resize(0,0),a("attach",s)},r.isAttached(this.canvas)?s():t()}},{key:"unbindEvents",value:function(){var e=this;kc(this._listeners,(function(t,n){e.platform.removeEventListener(e,n,t)})),this._listeners={},kc(this._responsiveListeners,(function(t,n){e.platform.removeEventListener(e,n,t)})),this._responsiveListeners=void 0}},{key:"updateHoverStyle",value:function(e,t,n){var r,a,i,o=n?"set":"remove";for("dataset"===t&&this.getDatasetMeta(e[0].datasetIndex).controller["_"+o+"DatasetHoverStyle"](),a=0,i=e.length;a<i;++a){var s=(r=e[a])&&this.getDatasetMeta(r.datasetIndex).controller;s&&s[o+"HoverStyle"](r.element,r.datasetIndex,r.index)}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(e){var t=this,n=this._active||[],r=e.map((function(e){var n=e.datasetIndex,r=e.index,a=t.getDatasetMeta(n);if(!a)throw new Error("No dataset found at index "+n);return{datasetIndex:n,element:a.data[r],index:r}}));!Sc(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}},{key:"notifyPlugins",value:function(e,t,n){return this._plugins.notify(this,e,t,n)}},{key:"isPluginEnabled",value:function(e){return 1===this._plugins._cache.filter((function(t){return t.plugin.id===e})).length}},{key:"_updateHoverStyles",value:function(e,t,n){var r=this.options.hover,a=function(e,t){return e.filter((function(e){return!t.some((function(t){return e.datasetIndex===t.datasetIndex&&e.index===t.index}))}))},i=a(t,e),o=n?e:a(e,t);i.length&&this.updateHoverStyle(i,r.mode,!1),o.length&&r.mode&&this.updateHoverStyle(o,r.mode,!0)}},{key:"_eventHandler",value:function(e,t){var n=this,r={event:e,replay:t,cancelable:!0,inChartArea:this.isPointInArea(e)},a=function(t){return(t.options.events||n.options.events).includes(e.native.type)};if(!1!==this.notifyPlugins("beforeEvent",r,a)){var i=this._handleEvent(e,t,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,a),(i||r.changed)&&this.render(),this}}},{key:"_handleEvent",value:function(e,t,n){var r=this._active,a=void 0===r?[]:r,i=this.options,o=t,s=this._getActiveElements(e,a,n,o),l=function(e){return"mouseup"===e.type||"click"===e.type||"contextmenu"===e.type}(e),c=function(e,t,n,r){return n&&"mouseout"!==e.type?r?t:e:null}(e,this._lastEvent,n,l);n&&(this._lastEvent=null,wc(i.onHover,[e,s,this],this),l&&wc(i.onClick,[e,s,this],this));var u=!Sc(s,a);return(u||t)&&(this._active=s,this._updateHoverStyles(s,a,t)),this._lastEvent=c,u}},{key:"_getActiveElements",value:function(e,t,n,r){if("mouseout"===e.type)return[];if(!n)return t;var a=this.options.hover;return this.getElementsAtEventForMode(e,a.mode,a,r)}}],[{key:"register",value:function(){Jh.add.apply(Jh,arguments),Ap()}},{key:"unregister",value:function(){Jh.remove.apply(Jh,arguments),Ap()}}]),e}();function Ap(){return kc(Dp.instances,(function(e){return e._plugins.invalidate()}))}function Mp(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function Ep(e,t,n,r,a,i){var o=t.x,s=t.y,l=t.startAngle,c=t.pixelMargin,u=t.innerRadius,f=Math.max(t.outerRadius+r+n-c,0),d=u>0?u+r+n+c:0,h=0,p=a-l;if(r){var v=((u>0?u-r:0)+(f>0?f-r:0))/2;h=(p-(0!==v?p*v/(v+r):p))/2}var m=(p-Math.max(.001,p*f-n/Tc)/f)/2,y=l+m+h,g=a-m-h,b=function(e,t,n,r){var a=rf(e.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),i=(n-t)/2,o=Math.min(i,r*t/2),s=function(e){var t=(n-Math.min(i,e))*r/2;return iu(e,0,Math.min(i,t))};return{outerStart:s(a.outerStart),outerEnd:s(a.outerEnd),innerStart:iu(a.innerStart,0,o),innerEnd:iu(a.innerEnd,0,o)}}(t,d,f,g-y),x=b.outerStart,_=b.outerEnd,w=b.innerStart,k=b.innerEnd,S=f-x,C=f-_,O=y+x/S,D=g-_/C,A=d+w,M=d+k,E=y+w/A,j=g-k/M;if(e.beginPath(),i){var P=(O+D)/2;if(e.arc(o,s,f,O,P),e.arc(o,s,f,P,D),_>0){var I=Mp(C,D,o,s);e.arc(I.x,I.y,_,D,g+Wc)}var L=Mp(M,g,o,s);if(e.lineTo(L.x,L.y),k>0){var R=Mp(M,j,o,s);e.arc(R.x,R.y,k,g+Wc,j+Math.PI)}var N=(g-k/d+(y+w/d))/2;if(e.arc(o,s,d,g-k/d,N,!0),e.arc(o,s,d,N,y+w/d,!0),w>0){var T=Mp(A,E,o,s);e.arc(T.x,T.y,w,E+Math.PI,y-Wc)}var F=Mp(S,y,o,s);if(e.lineTo(F.x,F.y),x>0){var z=Mp(S,O,o,s);e.arc(z.x,z.y,x,y-Wc,O)}}else{e.moveTo(o,s);var V=Math.cos(O)*f+o,H=Math.sin(O)*f+s;e.lineTo(V,H);var W=Math.cos(D)*f+o,$=Math.sin(D)*f+s;e.lineTo(W,$)}e.closePath()}hd(Dp,"defaults",Tu),hd(Dp,"instances",kp),hd(Dp,"overrides",Pu),hd(Dp,"registry",Jh),hd(Dp,"version","4.4.0"),hd(Dp,"getChart",Sp);var jp=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),hd(ud(r=t.call(this)),"circumference",void 0),hd(ud(r),"endAngle",void 0),hd(ud(r),"fullCircles",void 0),hd(ud(r),"innerRadius",void 0),hd(ud(r),"outerRadius",void 0),hd(ud(r),"pixelMargin",void 0),hd(ud(r),"startAngle",void 0),r.options=void 0,r.circumference=void 0,r.startAngle=void 0,r.endAngle=void 0,r.innerRadius=void 0,r.outerRadius=void 0,r.pixelMargin=0,r.fullCircles=0,e&&Object.assign(ud(r),e),r}return _d(n,[{key:"inRange",value:function(e,t,n){var r=eu(this.getProps(["x","y"],n),{x:e,y:t}),a=r.angle,i=r.distance,o=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),s=o.startAngle,l=o.endAngle,c=o.innerRadius,u=o.outerRadius,f=o.circumference,d=(this.options.spacing+this.options.borderWidth)/2,h=xc(f,l-s)>=Fc||au(a,s,l),p=ou(i,c+d,u+d);return h&&p}},{key:"getCenterPoint",value:function(e){var t=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),n=t.x,r=t.y,a=t.startAngle,i=t.endAngle,o=t.innerRadius,s=t.outerRadius,l=this.options,c=l.offset,u=(a+i)/2,f=(o+s+l.spacing+c)/2;return{x:n+Math.cos(u)*f,y:r+Math.sin(u)*f}}},{key:"tooltipPosition",value:function(e){return this.getCenterPoint(e)}},{key:"draw",value:function(e){var t=this.options,n=this.circumference,r=(t.offset||0)/4,a=(t.spacing||0)/2,i=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>Fc?Math.floor(n/Fc):0,!(0===n||this.innerRadius<0||this.outerRadius<0)){e.save();var o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);var s=r*(1-Math.sin(Math.min(Tc,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,a){var i=t.fullCircles,o=t.startAngle,s=t.circumference,l=t.endAngle;if(i){Ep(e,t,n,r,l,a);for(var c=0;c<i;++c)e.fill();isNaN(s)||(l=o+(s%Fc||Fc))}Ep(e,t,n,r,l,a),e.fill()}(e,this,s,a,i),function(e,t,n,r,a){var i=t.fullCircles,o=t.startAngle,s=t.circumference,l=t.options,c=l.borderWidth,u=l.borderJoinStyle,f=l.borderDash,d=l.borderDashOffset,h="inner"===l.borderAlign;if(c){e.setLineDash(f||[]),e.lineDashOffset=d,h?(e.lineWidth=2*c,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");var p=t.endAngle;if(i){Ep(e,t,n,r,p,a);for(var v=0;v<i;++v)e.stroke();isNaN(s)||(p=o+(s%Fc||Fc))}h&&function(e,t,n){var r=t.startAngle,a=t.pixelMargin,i=t.x,o=t.y,s=t.outerRadius,l=t.innerRadius,c=a/s;e.beginPath(),e.arc(i,o,s,r-c,n+c),l>a?(c=a/l,e.arc(i,o,l,n+c,r-c,!0)):e.arc(i,o,a,n+Wc,r-Wc),e.closePath(),e.clip()}(e,t,p),i||(Ep(e,t,n,r,p,a),e.stroke())}}(e,this,s,a,i),e.restore()}}}]),n}(Vh);function Pp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;e.lineCap=xc(n.borderCapStyle,t.borderCapStyle),e.setLineDash(xc(n.borderDash,t.borderDash)),e.lineDashOffset=xc(n.borderDashOffset,t.borderDashOffset),e.lineJoin=xc(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=xc(n.borderWidth,t.borderWidth),e.strokeStyle=xc(n.borderColor,t.borderColor)}function Ip(e,t,n){e.lineTo(n.x,n.y)}function Lp(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.length,a=n.start,i=void 0===a?0:a,o=n.end,s=void 0===o?r-1:o,l=t.start,c=t.end,u=Math.max(i,l),f=Math.min(s,c),d=i<l&&s<l||i>c&&s>c;return{count:r,start:u,loop:t.loop,ilen:f<u&&!d?r+f-u:f-u}}function Rp(e,t,n,r){var a,i,o,s=t.points,l=t.options,c=Lp(s,n,r),u=c.count,f=c.start,d=c.loop,h=c.ilen,p=function(e){return e.stepped?Gu:e.tension||"monotone"===e.cubicInterpolationMode?Zu:Ip}(l),v=r||{},m=v.move,y=void 0===m||m,g=v.reverse;for(a=0;a<=h;++a)(i=s[(f+(g?h-a:a))%u]).skip||(y?(e.moveTo(i.x,i.y),y=!1):p(e,o,i,g,l.stepped),o=i);return d&&p(e,o,i=s[(f+(g?h:0))%u],g,l.stepped),!!d}function Np(e,t,n,r){var a,i,o,s,l,c,u=t.points,f=Lp(u,n,r),d=f.count,h=f.start,p=f.ilen,v=r||{},m=v.move,y=void 0===m||m,g=v.reverse,b=0,x=0,_=function(e){return(h+(g?p-e:e))%d},w=function(){s!==l&&(e.lineTo(b,l),e.lineTo(b,s),e.lineTo(b,c))};for(y&&(i=u[_(0)],e.moveTo(i.x,i.y)),a=0;a<=p;++a)if(!(i=u[_(a)]).skip){var k=i.x,S=i.y,C=0|k;C===o?(S<s?s=S:S>l&&(l=S),b=(x*b+k)/++x):(w(),e.lineTo(k,S),o=C,x=0,s=l=S),c=S}w()}function Tp(e){var t=e.options,n=t.borderDash&&t.borderDash.length;return e._decimated||e._loop||t.tension||"monotone"===t.cubicInterpolationMode||t.stepped||n?Rp:Np}hd(jp,"id","arc"),hd(jp,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),hd(jp,"defaultRoutes",{backgroundColor:"backgroundColor"}),hd(jp,"descriptors",{_scriptable:!0,_indexable:function(e){return"borderDash"!==e}});var Fp="function"==typeof Path2D;var zp=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this)).animated=!0,r.options=void 0,r._chart=void 0,r._loop=void 0,r._fullLoop=void 0,r._path=void 0,r._points=void 0,r._segments=void 0,r._decimated=!1,r._pointsUpdated=!1,r._datasetIndex=void 0,e&&Object.assign(ud(r),e),r}return _d(n,[{key:"updateControlPoints",value:function(e,t){var n=this.options;if((n.tension||"monotone"===n.cubicInterpolationMode)&&!n.stepped&&!this._pointsUpdated){var r=n.spanGaps?this._loop:this._fullLoop;(function(e,t,n,r,a){var i,o,s,l;if(t.spanGaps&&(e=e.filter((function(e){return!e.skip}))),"monotone"===t.cubicInterpolationMode)!function(e){var t,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"x",i=Af(a),o=e.length,s=Array(o).fill(0),l=Array(o),c=Df(e,0);for(t=0;t<o;++t)if(n=r,r=c,c=Df(e,t+1),r){if(c){var u=c[a]-r[a];s[t]=0!==u?(c[i]-r[i])/u:0}l[t]=n?c?Uc(s[t-1])!==Uc(s[t])?0:(s[t-1]+s[t])/2:s[t-1]:s[t]}Ef(e,s,l),jf(e,l,a)}(e,a);else{var c=r?e[e.length-1]:e[0];for(i=0,o=e.length;i<o;++i)l=Mf(c,s=e[i],e[Math.min(i+1,o-(r?0:1))%o],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&&function(e,t){var n,r,a,i,o,s=Bu(e[0],t);for(n=0,r=e.length;n<r;++n)o=i,i=s,s=n<r-1&&Bu(e[n+1],t),i&&(a=e[n],o&&(a.cp1x=Pf(a.cp1x,t.left,t.right),a.cp1y=Pf(a.cp1y,t.top,t.bottom)),s&&(a.cp2x=Pf(a.cp2x,t.left,t.right),a.cp2y=Pf(a.cp2y,t.top,t.bottom)))}(e,n)})(this._points,n,e,r,t),this._pointsUpdated=!0}}},{key:"points",get:function(){return this._points},set:function(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}},{key:"segments",get:function(){return this._segments||(this._segments=function(e,t){var n=e.points,r=e.options.spanGaps,a=n.length;if(!a)return[];var i=!!e._loop,o=function(e,t,n,r){var a=0,i=t-1;if(n&&!r)for(;a<t&&!e[a].skip;)a++;for(;a<t&&e[a].skip;)a++;for(a%=t,n&&(i+=a);i>a&&e[i%t].skip;)i--;return{start:a,end:i%=t}}(n,a,i,r),s=o.start,l=o.end;return function(e,t,n,r){return r&&r.setContext&&n?function(e,t,n,r){var a=e._chart.getContext(),i=ed(e.options),o=e._datasetIndex,s=e.options.spanGaps,l=n.length,c=[],u=i,f=t[0].start,d=f;function h(e,t,r,a){var i=s?-1:1;if(e!==t){for(e+=l;n[e%l].skip;)e-=i;for(;n[t%l].skip;)t+=i;e%l!=t%l&&(c.push({start:e%l,end:t%l,loop:r,style:a}),u=a,f=t%l)}}var p,v=cc(t);try{for(v.s();!(p=v.n()).done;){var m=p.value;f=s?f:m.start;var y=n[f%l],g=void 0;for(d=f+1;d<=m.end;d++){var b=n[d%l];td(g=ed(r.setContext(uf(a,{type:"segment",p0:y,p1:b,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),u)&&h(f,d-1,m.loop,u),y=b,u=g}f<d-1&&h(f,d-1,m.loop,u)}}catch(e){v.e(e)}finally{v.f()}return c}(e,t,n,r):t}(e,!0===r?[{start:s,end:l,loop:i}]:function(e,t,n,r){var a,i=e.length,o=[],s=t,l=e[t];for(a=t+1;a<=n;++a){var c=e[a%i];c.skip||c.stop?l.skip||(r=!1,o.push({start:t%i,end:(a-1)%i,loop:r}),t=s=c.stop?a:null):(s=a,l.skip&&(t=a)),l=c}return null!==s&&o.push({start:t%i,end:s%i,loop:r}),o}(n,s,l<s?l+a:l,!!e._fullLoop&&0===s&&l===a-1),n,t)}(this,this.options.segment))}},{key:"first",value:function(){var e=this.segments,t=this.points;return e.length&&t[e[0].start]}},{key:"last",value:function(){var e=this.segments,t=this.points,n=e.length;return n&&t[e[n-1].end]}},{key:"interpolate",value:function(e,t){var n=this.options,r=e[t],a=this.points,i=Qf(this,{property:t,start:r,end:r});if(i.length){var o,s,l=[],c=function(e){return e.stepped?Yf:e.tension||"monotone"===e.cubicInterpolationMode?Uf:Bf}(n);for(o=0,s=i.length;o<s;++o){var u=i[o],f=u.start,d=u.end,h=a[f],p=a[d];if(h!==p){var v=c(h,p,Math.abs((r-h[t])/(p[t]-h[t])),n.stepped);v[t]=e[t],l.push(v)}else l.push(h)}return 1===l.length?l[0]:l}}},{key:"pathSegment",value:function(e,t,n){return Tp(this)(e,this,t,n)}},{key:"path",value:function(e,t,n){var r=this.segments,a=Tp(this),i=this._loop;t=t||0,n=n||this.points.length-t;var o,s=pd(r);try{for(s.s();!(o=s.n()).done;)i&=a(e,this,o.value,{start:t,end:t+n-1})}catch(e){s.e(e)}finally{s.f()}return!!i}},{key:"draw",value:function(e,t,n,r){var a=this.options||{};(this.points||[]).length&&a.borderWidth&&(e.save(),function(e,t,n,r){Fp&&!t.options.segment?function(e,t,n,r){var a=t._path;a||(a=t._path=new Path2D,t.path(a,n,r)&&a.closePath()),Pp(e,t.options),e.stroke(a)}(e,t,n,r):function(e,t,n,r){var a,i=t.segments,o=t.options,s=Tp(t),l=pd(i);try{for(l.s();!(a=l.n()).done;){var c=a.value;Pp(e,o,c.style),e.beginPath(),s(e,t,c,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}}catch(e){l.e(e)}finally{l.f()}}(e,t,n,r)}(e,this,n,r),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}]),n}(Vh);function Vp(e,t,n,r){var a=e.options,i=e.getProps([n],r)[n];return Math.abs(t-i)<a.radius+a.hitRadius}hd(zp,"id","line"),hd(zp,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),hd(zp,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),hd(zp,"descriptors",{_scriptable:!0,_indexable:function(e){return"borderDash"!==e&&"fill"!==e}});var Hp=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),hd(ud(r=t.call(this)),"parsed",void 0),hd(ud(r),"skip",void 0),hd(ud(r),"stop",void 0),r.options=void 0,r.parsed=void 0,r.skip=void 0,r.stop=void 0,e&&Object.assign(ud(r),e),r}return _d(n,[{key:"inRange",value:function(e,t,n){var r=this.options,a=this.getProps(["x","y"],n),i=a.x,o=a.y;return Math.pow(e-i,2)+Math.pow(t-o,2)<Math.pow(r.hitRadius+r.radius,2)}},{key:"inXRange",value:function(e,t){return Vp(this,e,"x",t)}},{key:"inYRange",value:function(e,t){return Vp(this,e,"y",t)}},{key:"getCenterPoint",value:function(e){var t=this.getProps(["x","y"],e);return{x:t.x,y:t.y}}},{key:"size",value:function(e){var t=(e=e||this.options||{}).radius||0;return 2*((t=Math.max(t,t&&e.hoverRadius||0))+(t&&e.borderWidth||0))}},{key:"draw",value:function(e,t){var n=this.options;this.skip||n.radius<.1||!Bu(this,t,this.size(n)/2)||(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.fillStyle=n.backgroundColor,Wu(e,n,this.x,this.y))}},{key:"getRange",value:function(){var e=this.options||{};return e.radius+e.hitRadius}}]),n}(Vh);function Wp(e,t){var n,r,a,i,o,s=e.getProps(["x","y","base","width","height"],t),l=s.x,c=s.y,u=s.base,f=s.width,d=s.height;return e.horizontal?(o=d/2,n=Math.min(l,u),r=Math.max(l,u),a=c-o,i=c+o):(n=l-(o=f/2),r=l+o,a=Math.min(c,u),i=Math.max(c,u)),{left:n,top:a,right:r,bottom:i}}function $p(e,t,n,r){return e?0:iu(t,n,r)}function Bp(e,t,n,r){var a=null===t,i=null===n,o=e&&!(a&&i)&&Wp(e,r);return o&&(a||ou(t,o.left,o.right))&&(i||ou(n,o.top,o.bottom))}function Yp(e,t){e.rect(t.x,t.y,t.w,t.h)}function Up(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.x!==n.x?-t:0,a=e.y!==n.y?-t:0,i=(e.x+e.w!==n.x+n.w?t:0)-r,o=(e.y+e.h!==n.y+n.h?t:0)-a;return{x:e.x+r,y:e.y+a,w:e.w+i,h:e.h+o,radius:e.radius}}hd(Hp,"id","point"),hd(Hp,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),hd(Hp,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var Gp=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this)).options=void 0,r.horizontal=void 0,r.base=void 0,r.width=void 0,r.height=void 0,r.inflateAmount=void 0,e&&Object.assign(ud(r),e),r}return _d(n,[{key:"draw",value:function(e){var t,n,r,a,i,o,s=this.inflateAmount,l=this.options,c=l.borderColor,u=l.backgroundColor,f=(n=Wp(t=this),r=n.right-n.left,a=n.bottom-n.top,i=function(e,t,n){var r=e.options.borderWidth,a=e.borderSkipped,i=af(r);return{t:$p(a.top,i.top,0,n),r:$p(a.right,i.right,0,t),b:$p(a.bottom,i.bottom,0,n),l:$p(a.left,i.left,0,t)}}(t,r/2,a/2),o=function(e,t,n){var r=e.getProps(["enableBorderRadius"]).enableBorderRadius,a=e.options.borderRadius,i=of(a),o=Math.min(t,n),s=e.borderSkipped,l=r||yc(a);return{topLeft:$p(!l||s.top||s.left,i.topLeft,0,o),topRight:$p(!l||s.top||s.right,i.topRight,0,o),bottomLeft:$p(!l||s.bottom||s.left,i.bottomLeft,0,o),bottomRight:$p(!l||s.bottom||s.right,i.bottomRight,0,o)}}(t,r/2,a/2),{outer:{x:n.left,y:n.top,w:r,h:a,radius:o},inner:{x:n.left+i.l,y:n.top+i.t,w:r-i.l-i.r,h:a-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))}}}),d=f.inner,h=f.outer,p=function(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}(h.radius)?Qu:Yp;e.save(),h.w===d.w&&h.h===d.h||(e.beginPath(),p(e,Up(h,s,d)),e.clip(),p(e,Up(d,-s,h)),e.fillStyle=c,e.fill("evenodd")),e.beginPath(),p(e,Up(d,s)),e.fillStyle=u,e.fill(),e.restore()}},{key:"inRange",value:function(e,t,n){return Bp(this,e,t,n)}},{key:"inXRange",value:function(e,t){return Bp(this,e,null,t)}},{key:"inYRange",value:function(e,t){return Bp(this,null,e,t)}},{key:"getCenterPoint",value:function(e){var t=this.getProps(["x","y","base","horizontal"],e),n=t.x,r=t.y,a=t.base,i=t.horizontal;return{x:i?(n+a)/2:n,y:i?r:(r+a)/2}}},{key:"getRange",value:function(e){return"x"===e?this.width/2:this.height/2}}]),n}(Vh);function Zp(e,t,n,r){if(!r){var a=t[e],i=n[e];return"angle"===e&&(a=ru(a),i=ru(i)),{property:e,start:a,end:i}}}function Kp(e,t,n){for(;t>e;t--){var r=n[t];if(!isNaN(r.x)&&!isNaN(r.y))break}return t}function Xp(e,t,n,r){return e&&t?r(e[n],t[n]):e?e[n]:t?t[n]:0}function qp(e,t){var n=[],r=!1;return mc(e)?(r=!0,n=e):n=function(e,t){var n=e||{},r=n.x,a=void 0===r?null:r,i=n.y,o=void 0===i?null:i,s=t.points,l=[];return t.segments.forEach((function(e){var t=e.start,n=e.end;n=Kp(t,n,s);var r=s[t],i=s[n];null!==o?(l.push({x:r.x,y:o}),l.push({x:i.x,y:o})):null!==a&&(l.push({x:a,y:r.y}),l.push({x:a,y:i.y}))})),l}(e,t),n.length?new zp({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function Jp(e){return e&&!1!==e.fill}function Qp(e,t,n){var r,a=e[t].fill,i=[t];if(!n)return a;for(;!1!==a&&-1===i.indexOf(a);){if(!gc(a))return a;if(!(r=e[a]))return!1;if(r.visible)return a;i.push(a),a=r.fill}return!1}function ev(e,t,n){var r=function(e){var t=e.options,n=t.fill,r=xc(n&&n.target,n);return void 0===r&&(r=!!t.backgroundColor),!1!==r&&null!==r&&(!0===r?"origin":r)}(e);if(yc(r))return!isNaN(r.value)&&r;var a=parseFloat(r);return gc(a)&&Math.floor(a)===a?function(e,t,n,r){return"-"!==e&&"+"!==e||(n=t+n),!(n===t||n<0||n>=r)&&n}(r[0],t,a,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function tv(e,t,n){for(var r=[],a=0;a<n.length;a++){var i=nv(n[a],t,"x"),o=i.first,s=i.last,l=i.point;if(!(!l||o&&s))if(o)r.unshift(l);else if(e.push(l),!s)break}e.push.apply(e,r)}function nv(e,t,n){var r=e.interpolate(t,n);if(!r)return{};for(var a=r[n],i=e.segments,o=e.points,s=!1,l=!1,c=0;c<i.length;c++){var u=i[c],f=o[u.start][n],d=o[u.end][n];if(ou(a,f,d)){s=a===f,l=a===d;break}}return{first:s,last:l,point:r}}hd(Gp,"id","bar"),hd(Gp,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),hd(Gp,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var rv=function(){function e(t){bd(this,e),this.x=t.x,this.y=t.y,this.radius=t.radius}return _d(e,[{key:"pathSegment",value:function(e,t,n){var r=this.x,a=this.y,i=this.radius;return t=t||{start:0,end:Fc},e.arc(r,a,i,t.end,t.start,!0),!n.bounds}},{key:"interpolate",value:function(e){var t=this.x,n=this.y,r=this.radius,a=e.angle;return{x:t+Math.cos(a)*r,y:n+Math.sin(a)*r,angle:a}}}]),e}();function av(e,t,n){var r=function(e){var t=e.chart,n=e.fill,r=e.line;if(gc(n))return function(e,t){var n=e.getDatasetMeta(t);return n&&e.isDatasetVisible(t)?n.dataset:null}(t,n);if("stack"===n)return function(e){var t=e.scale,n=e.index,r=e.line,a=[],i=r.segments,o=r.points,s=function(e,t){for(var n=[],r=e.getMatchingVisibleMetas("line"),a=0;a<r.length;a++){var i=r[a];if(i.index===t)break;i.hidden||n.unshift(i.dataset)}return n}(t,n);s.push(qp({x:null,y:t.bottom},r));for(var l=0;l<i.length;l++)for(var c=i[l],u=c.start;u<=c.end;u++)tv(a,o[u],s);return new zp({points:a,options:{}})}(e);if("shape"===n)return!0;var a=function(e){return(e.scale||{}).getPointPositionForValue?function(e){var t=e.scale,n=e.fill,r=t.options,a=t.getLabels().length,i=r.reverse?t.max:t.min,o=function(e,t,n){return"start"===e?n:"end"===e?t.options.reverse?t.min:t.max:yc(e)?e.value:t.getBaseValue()}(n,t,i),s=[];if(r.grid.circular){var l=t.getPointPositionForValue(0,i);return new rv({x:l.x,y:l.y,radius:t.getDistanceFromCenterForValue(o)})}for(var c=0;c<a;++c)s.push(t.getPointPositionForValue(c,o));return s}(e):function(e){var t=e.scale,n=void 0===t?{}:t,r=function(e,t){var n=null;return"start"===e?n=t.bottom:"end"===e?n=t.top:yc(e)?n=t.getPixelForValue(e.value):t.getBasePixel&&(n=t.getBasePixel()),n}(e.fill,n);if(gc(r)){var a=n.isHorizontal();return{x:a?r:null,y:a?null:r}}return null}(e)}(e);return a instanceof rv?a:qp(a,r)}(t),a=t.line,i=t.scale,o=t.axis,s=a.options,l=s.fill,c=s.backgroundColor,u=l||{},f=u.above,d=void 0===f?c:f,h=u.below,p=void 0===h?c:h;r&&a.points.length&&(Yu(e,n),function(e,t){var n=t.line,r=t.target,a=t.above,i=t.below,o=t.area,s=t.scale,l=n._loop?"angle":t.axis;e.save(),"x"===l&&i!==a&&(iv(e,r,o.top),ov(e,{line:n,target:r,color:a,scale:s,property:l}),e.restore(),e.save(),iv(e,r,o.bottom)),ov(e,{line:n,target:r,color:i,scale:s,property:l}),e.restore()}(e,{line:a,target:r,above:d,below:p,area:n,scale:i,axis:o}),Uu(e))}function iv(e,t,n){var r=t.segments,a=t.points,i=!0,o=!1;e.beginPath();var s,l=pd(r);try{for(l.s();!(s=l.n()).done;){var c=s.value,u=c.start,f=c.end,d=a[u],h=a[Kp(u,f,a)];i?(e.moveTo(d.x,d.y),i=!1):(e.lineTo(d.x,n),e.lineTo(d.x,d.y)),(o=!!t.pathSegment(e,c,{move:o}))?e.closePath():e.lineTo(h.x,n)}}catch(e){l.e(e)}finally{l.f()}e.lineTo(t.first().x,n),e.closePath(),e.clip()}function ov(e,t){var n,r=t.line,a=t.target,i=t.property,o=t.color,s=t.scale,l=function(e,t,n){var r,a=e.segments,i=e.points,o=t.points,s=[],l=pd(a);try{for(l.s();!(r=l.n()).done;){var c=r.value,u=c.start,f=c.end;f=Kp(u,f,i);var d=Zp(n,i[u],i[f],c.loop);if(t.segments){var h,p=pd(Qf(t,d));try{for(p.s();!(h=p.n()).done;){var v,m=h.value,y=Zp(n,o[m.start],o[m.end],m.loop),g=pd(Jf(c,i,y));try{for(g.s();!(v=g.n()).done;){var b=v.value;s.push({source:b,target:m,start:hd({},n,Xp(d,y,"start",Math.max)),end:hd({},n,Xp(d,y,"end",Math.min))})}}catch(e){g.e(e)}finally{g.f()}}}catch(e){p.e(e)}finally{p.f()}}else s.push({source:c,target:d,start:i[u],end:i[f]})}}catch(e){l.e(e)}finally{l.f()}return s}(r,a,i),c=pd(l);try{for(c.s();!(n=c.n()).done;){var u=n.value,f=u.source,d=u.target,h=u.start,p=u.end,v=f.style,m=(v=void 0===v?{}:v).backgroundColor,y=void 0===m?o:m,g=!0!==a;e.save(),e.fillStyle=y,sv(e,s,g&&Zp(i,h,p)),e.beginPath();var b=!!r.pathSegment(e,f),x=void 0;if(g){b?e.closePath():lv(e,a,p,i);var _=!!a.pathSegment(e,d,{move:b,reverse:!0});(x=b&&_)||lv(e,a,h,i)}e.closePath(),e.fill(x?"evenodd":"nonzero"),e.restore()}}catch(e){c.e(e)}finally{c.f()}}function sv(e,t,n){var r=t.chart.chartArea,a=r.top,i=r.bottom,o=n||{},s=o.property,l=o.start,c=o.end;"x"===s&&(e.beginPath(),e.rect(l,a,c-l,i-a),e.clip())}function lv(e,t,n,r){var a=t.interpolate(n,r);a&&e.lineTo(a.x,a.y)}var cv={id:"filler",afterDatasetsUpdate:function(e,t,n){var r,a,i,o,s=(e.data.datasets||[]).length,l=[];for(a=0;a<s;++a)o=null,(i=(r=e.getDatasetMeta(a)).dataset)&&i.options&&i instanceof zp&&(o={visible:e.isDatasetVisible(a),index:a,fill:ev(i,a,s),chart:e,axis:r.controller.options.indexAxis,scale:r.vScale,line:i}),r.$filler=o,l.push(o);for(a=0;a<s;++a)(o=l[a])&&!1!==o.fill&&(o.fill=Qp(l,a,n.propagate))},beforeDraw:function(e,t,n){for(var r="beforeDraw"===n.drawTime,a=e.getSortedVisibleDatasetMetas(),i=e.chartArea,o=a.length-1;o>=0;--o){var s=a[o].$filler;s&&(s.line.updateControlPoints(i,s.axis),r&&s.fill&&av(e.ctx,s,i))}},beforeDatasetsDraw:function(e,t,n){if("beforeDatasetsDraw"===n.drawTime)for(var r=e.getSortedVisibleDatasetMetas(),a=r.length-1;a>=0;--a){var i=r[a].$filler;Jp(i)&&av(e.ctx,i,e.chartArea)}},beforeDatasetDraw:function(e,t,n){var r=t.meta.$filler;Jp(r)&&"beforeDatasetDraw"===n.drawTime&&av(e.ctx,r,e.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}},uv=function(e,t){var n=e.boxHeight,r=void 0===n?t:n,a=e.boxWidth,i=void 0===a?t:a;return e.usePointStyle&&(r=Math.min(r,t),i=e.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:r,itemHeight:Math.max(t,r)}},fv=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this))._added=!1,r.legendHitBoxes=[],r._hoveredItem=null,r.doughnutMode=!1,r.chart=e.chart,r.options=e.options,r.ctx=e.ctx,r.legendItems=void 0,r.columnSizes=void 0,r.lineWidths=void 0,r.maxHeight=void 0,r.maxWidth=void 0,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.height=void 0,r.width=void 0,r._margins=void 0,r.position=void 0,r.weight=void 0,r.fullSize=void 0,r}return _d(n,[{key:"update",value:function(e,t,n){this.maxWidth=e,this.maxHeight=t,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}},{key:"setDimensions",value:function(){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)}},{key:"buildLabels",value:function(){var e=this,t=this.options.labels||{},n=wc(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter((function(n){return t.filter(n,e.chart.data)}))),t.sort&&(n=n.sort((function(n,r){return t.sort(n,r,e.chart.data)}))),this.options.reverse&&n.reverse(),this.legendItems=n}},{key:"fit",value:function(){var e=this.options,t=this.ctx;if(e.display){var n,r,a=e.labels,i=lf(a.font),o=i.size,s=this._computeTitleHeight(),l=uv(a,o),c=l.boxWidth,u=l.itemHeight;t.font=i.string,this.isHorizontal()?(n=this.maxWidth,r=this._fitRows(s,o,c,u)+10):(r=this.maxHeight,n=this._fitCols(s,i,c,u)+10),this.width=Math.min(n,e.maxWidth||this.maxWidth),this.height=Math.min(r,e.maxHeight||this.maxHeight)}else this.width=this.height=0}},{key:"_fitRows",value:function(e,t,n,r){var a=this.ctx,i=this.maxWidth,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.lineWidths=[0],c=r+o,u=e;a.textAlign="left",a.textBaseline="middle";var f=-1,d=-c;return this.legendItems.forEach((function(e,h){var p=n+t/2+a.measureText(e.text).width;(0===h||l[l.length-1]+p+2*o>i)&&(u+=c,l[l.length-(h>0?0:1)]=0,d+=c,f++),s[h]={left:0,top:d,row:f,width:p,height:r},l[l.length-1]+=p+o})),u}},{key:"_fitCols",value:function(e,t,n,r){var a=this.ctx,i=this.maxHeight,o=this.options.labels.padding,s=this.legendHitBoxes=[],l=this.columnSizes=[],c=i-e,u=o,f=0,d=0,h=0,p=0;return this.legendItems.forEach((function(e,i){var v=function(e,t,n,r,a){var i=function(e,t,n,r){var a=e.text;return a&&"string"!=typeof a&&(a=a.reduce((function(e,t){return e.length>t.length?e:t}))),t+n.size/2+r.measureText(a).width}(r,e,t,n),o=function(e,t,n){var r=e;return"string"!=typeof t.text&&(r=dv(t,n)),r}(a,r,t.lineHeight);return{itemWidth:i,itemHeight:o}}(n,t,a,e,r),m=v.itemWidth,y=v.itemHeight;i>0&&d+y+2*o>c&&(u+=f+o,l.push({width:f,height:d}),h+=f+o,p++,f=d=0),s[i]={left:h,top:d,col:p,width:m,height:y},f=Math.max(f,m),d+=y+o})),u+=f,l.push({width:f,height:d}),u}},{key:"adjustHitBoxes",value:function(){if(this.options.display){var e=this._computeTitleHeight(),t=this.legendHitBoxes,n=this.options,r=n.align,a=n.labels.padding,i=Gf(n.rtl,this.left,this.width);if(this.isHorizontal()){var o,s=0,l=mu(r,this.left+a,this.right-this.lineWidths[s]),c=pd(t);try{for(c.s();!(o=c.n()).done;){var u=o.value;s!==u.row&&(s=u.row,l=mu(r,this.left+a,this.right-this.lineWidths[s])),u.top+=this.top+e+a,u.left=i.leftForLtr(i.x(l),u.width),l+=u.width+a}}catch(e){c.e(e)}finally{c.f()}}else{var f,d=0,h=mu(r,this.top+e+a,this.bottom-this.columnSizes[d].height),p=pd(t);try{for(p.s();!(f=p.n()).done;){var v=f.value;v.col!==d&&(d=v.col,h=mu(r,this.top+e+a,this.bottom-this.columnSizes[d].height)),v.top=h,v.left+=this.left+a,v.left=i.leftForLtr(i.x(v.left),v.width),h+=v.height+a}}catch(e){p.e(e)}finally{p.f()}}}}},{key:"isHorizontal",value:function(){return"top"===this.options.position||"bottom"===this.options.position}},{key:"draw",value:function(){if(this.options.display){var e=this.ctx;Yu(e,this),this._draw(),Uu(e)}}},{key:"_draw",value:function(){var e,t=this,n=this.options,r=this.columnSizes,a=this.lineWidths,i=this.ctx,o=n.align,s=n.labels,l=Tu.color,c=Gf(n.rtl,this.left,this.width),u=lf(s.font),f=s.padding,d=u.size,h=d/2;this.drawTitle(),i.textAlign=c.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;var p=uv(s,d),v=p.boxWidth,m=p.boxHeight,y=p.itemHeight,g=this.isHorizontal(),b=this._computeTitleHeight();e=g?{x:mu(o,this.left+f,this.right-a[0]),y:this.top+f+b,line:0}:{x:this.left+f,y:mu(o,this.top+b+f,this.bottom-r[0].height),line:0},Zf(this.ctx,n.textDirection);var x=y+f;this.legendItems.forEach((function(p,_){i.strokeStyle=p.fontColor,i.fillStyle=p.fontColor;var w=i.measureText(p.text).width,k=c.textAlign(p.textAlign||(p.textAlign=s.textAlign)),S=v+h+w,C=e.x,O=e.y;if(c.setWidth(t.width),g?_>0&&C+S+f>t.right&&(O=e.y+=x,e.line++,C=e.x=mu(o,t.left+f,t.right-a[e.line])):_>0&&O+x>t.bottom&&(C=e.x=C+r[e.line].width+f,e.line++,O=e.y=mu(o,t.top+b+f,t.bottom-r[e.line].height)),function(e,t,n){if(!(isNaN(v)||v<=0||isNaN(m)||m<0)){i.save();var r=xc(n.lineWidth,1);if(i.fillStyle=xc(n.fillStyle,l),i.lineCap=xc(n.lineCap,"butt"),i.lineDashOffset=xc(n.lineDashOffset,0),i.lineJoin=xc(n.lineJoin,"miter"),i.lineWidth=r,i.strokeStyle=xc(n.strokeStyle,l),i.setLineDash(xc(n.lineDash,[])),s.usePointStyle){var a={radius:m*Math.SQRT2/2,pointStyle:n.pointStyle,rotation:n.rotation,borderWidth:r},o=c.xPlus(e,v/2);$u(i,a,o,t+h,s.pointStyleWidth&&v)}else{var u=t+Math.max((d-m)/2,0),f=c.leftForLtr(e,v),p=of(n.borderRadius);i.beginPath(),Object.values(p).some((function(e){return 0!==e}))?Qu(i,{x:f,y:u,w:v,h:m,radius:p}):i.rect(f,u,v,m),i.fill(),0!==r&&i.stroke()}i.restore()}}(c.x(C),O,p),C=function(e,t,n,r){return e===(r?"left":"right")?n:"center"===e?(t+n)/2:t}(k,C+v+h,g?C+S:t.right,n.rtl),function(e,t,n){Ju(i,n.text,e,t+y/2,u,{strikethrough:n.hidden,textAlign:c.textAlign(n.textAlign)})}(c.x(C),O,p),g)e.x+=S+f;else if("string"!=typeof p.text){var D=u.lineHeight;e.y+=dv(p,D)+f}else e.y+=x})),Kf(this.ctx,n.textDirection)}},{key:"drawTitle",value:function(){var e=this.options,t=e.title,n=lf(t.font),r=sf(t.padding);if(t.display){var a,i=Gf(e.rtl,this.left,this.width),o=this.ctx,s=t.position,l=n.size/2,c=r.top+l,u=this.left,f=this.width;if(this.isHorizontal())f=Math.max.apply(Math,md(this.lineWidths)),a=this.top+c,u=mu(e.align,u,this.right-f);else{var d=this.columnSizes.reduce((function(e,t){return Math.max(e,t.height)}),0);a=c+mu(e.align,this.top,this.bottom-d-e.labels.padding-this._computeTitleHeight())}var h=mu(s,u,u+f);o.textAlign=i.textAlign(vu(s)),o.textBaseline="middle",o.strokeStyle=t.color,o.fillStyle=t.color,o.font=n.string,Ju(o,t.text,h,a,n)}}},{key:"_computeTitleHeight",value:function(){var e=this.options.title,t=lf(e.font),n=sf(e.padding);return e.display?t.lineHeight+n.height:0}},{key:"_getLegendItemAt",value:function(e,t){var n,r,a;if(ou(e,this.left,this.right)&&ou(t,this.top,this.bottom))for(a=this.legendHitBoxes,n=0;n<a.length;++n)if(ou(e,(r=a[n]).left,r.left+r.width)&&ou(t,r.top,r.top+r.height))return this.legendItems[n];return null}},{key:"handleEvent",value:function(e){var t=this.options;if(function(e,t){return!("mousemove"!==e&&"mouseout"!==e||!t.onHover&&!t.onLeave)||!(!t.onClick||"click"!==e&&"mouseup"!==e)}(e.type,t)){var n,r,a=this._getLegendItemAt(e.x,e.y);if("mousemove"===e.type||"mouseout"===e.type){var i=this._hoveredItem,o=(r=a,null!==(n=i)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);i&&!o&&wc(t.onLeave,[e,i,this],this),this._hoveredItem=a,a&&!o&&wc(t.onHover,[e,a,this],this)}else a&&wc(t.onClick,[e,a,this],this)}}}]),n}(Vh);function dv(e,t){return t*(e.text?e.text.length:0)}var hv={id:"legend",_element:fv,start:function(e,t,n){var r=e.legend=new fv({ctx:e.ctx,options:n,chart:e});wh(0,r,n),xh(e,r)},stop:function(e){_h(e,e.legend),delete e.legend},beforeUpdate:function(e,t,n){var r=e.legend;wh(0,r,n),r.options=n},afterUpdate:function(e){var t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent:function(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick:function(e,t,n){var r=t.datasetIndex,a=n.chart;a.isDatasetVisible(r)?(a.hide(r),t.hidden=!0):(a.show(r),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:function(e){return e.chart.options.color},boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.legend.options.labels,r=n.usePointStyle,a=n.pointStyle,i=n.textAlign,o=n.color,s=n.useBorderRadius,l=n.borderRadius;return e._getSortedDatasetMetas().map((function(e){var n=e.controller.getStyle(r?0:void 0),c=sf(n.borderWidth);return{text:t[e.index].label,fillStyle:n.backgroundColor,fontColor:o,hidden:!e.visible,lineCap:n.borderCapStyle,lineDash:n.borderDash,lineDashOffset:n.borderDashOffset,lineJoin:n.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:n.borderColor,pointStyle:a||n.pointStyle,rotation:n.rotation,textAlign:i||n.textAlign,borderRadius:s&&(l||n.borderRadius),datasetIndex:e.index}}),this)}},title:{color:function(e){return e.chart.options.color},display:!1,position:"center",text:""}},descriptors:{_scriptable:function(e){return!e.startsWith("on")},labels:{_scriptable:function(e){return!["generateLabels","filter","sort"].includes(e)}}}},pv=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this)).chart=e.chart,r.options=e.options,r.ctx=e.ctx,r._padding=void 0,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.width=void 0,r.height=void 0,r.position=void 0,r.weight=void 0,r.fullSize=void 0,r}return _d(n,[{key:"update",value:function(e,t){var n=this.options;if(this.left=0,this.top=0,n.display){this.width=this.right=e,this.height=this.bottom=t;var r=mc(n.text)?n.text.length:1;this._padding=sf(n.padding);var a=r*lf(n.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=a:this.width=a}else this.width=this.height=this.right=this.bottom=0}},{key:"isHorizontal",value:function(){var e=this.options.position;return"top"===e||"bottom"===e}},{key:"_drawArgs",value:function(e){var t,n,r,a=this.top,i=this.left,o=this.bottom,s=this.right,l=this.options,c=l.align,u=0;return this.isHorizontal()?(n=mu(c,i,s),r=a+e,t=s-i):("left"===l.position?(n=i+e,r=mu(c,o,a),u=-.5*Tc):(n=s-e,r=mu(c,a,o),u=.5*Tc),t=o-a),{titleX:n,titleY:r,maxWidth:t,rotation:u}}},{key:"draw",value:function(){var e=this.ctx,t=this.options;if(t.display){var n=lf(t.font),r=n.lineHeight/2+this._padding.top,a=this._drawArgs(r),i=a.titleX,o=a.titleY,s=a.maxWidth,l=a.rotation;Ju(e,t.text,0,0,n,{color:t.color,maxWidth:s,rotation:l,textAlign:vu(t.align),textBaseline:"middle",translation:[i,o]})}}}]),n}(Vh),vv={id:"title",_element:pv,start:function(e,t,n){!function(e,t){var n=new pv({ctx:e.ctx,options:t,chart:e});wh(0,n,t),xh(e,n),e.titleBlock=n}(e,n)},stop:function(e){var t=e.titleBlock;_h(e,t),delete e.titleBlock},beforeUpdate:function(e,t,n){var r=e.titleBlock;wh(0,r,n),r.options=n},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}},mv=(new WeakMap,{average:function(e){if(!e.length)return!1;var t,n,r=0,a=0,i=0;for(t=0,n=e.length;t<n;++t){var o=e[t].element;if(o&&o.hasValue()){var s=o.tooltipPosition();r+=s.x,a+=s.y,++i}}return{x:r/i,y:a/i}},nearest:function(e,t){if(!e.length)return!1;var n,r,a,i=t.x,o=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){var l=e[n].element;if(l&&l.hasValue()){var c=tu(t,l.getCenterPoint());c<s&&(s=c,a=l)}}if(a){var u=a.tooltipPosition();i=u.x,o=u.y}return{x:i,y:o}}});function yv(e,t){return t&&(mc(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function gv(e){return("string"==typeof e||e instanceof String)&&e.indexOf("\n")>-1?e.split("\n"):e}function bv(e,t){var n=t.element,r=t.datasetIndex,a=t.index,i=e.getDatasetMeta(r).controller,o=i.getLabelAndValue(a),s=o.label,l=o.value;return{chart:e,label:s,parsed:i.getParsed(a),raw:e.data.datasets[r].data[a],formattedValue:l,dataset:i.getDataset(),dataIndex:a,datasetIndex:r,element:n}}function xv(e,t){var n=e.chart.ctx,r=e.body,a=e.footer,i=e.title,o=t.boxWidth,s=t.boxHeight,l=lf(t.bodyFont),c=lf(t.titleFont),u=lf(t.footerFont),f=i.length,d=a.length,h=r.length,p=sf(t.padding),v=p.height,m=0,y=r.reduce((function(e,t){return e+t.before.length+t.lines.length+t.after.length}),0);y+=e.beforeBody.length+e.afterBody.length,f&&(v+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),y&&(v+=h*(t.displayColors?Math.max(s,l.lineHeight):l.lineHeight)+(y-h)*l.lineHeight+(y-1)*t.bodySpacing),d&&(v+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);var g=0,b=function(e){m=Math.max(m,n.measureText(e).width+g)};return n.save(),n.font=c.string,kc(e.title,b),n.font=l.string,kc(e.beforeBody.concat(e.afterBody),b),g=t.displayColors?o+2+t.boxPadding:0,kc(r,(function(e){kc(e.before,b),kc(e.lines,b),kc(e.after,b)})),g=0,n.font=u.string,kc(e.footer,b),n.restore(),{width:m+=p.width,height:v}}function _v(e,t,n,r){var a=n.x,i=n.width,o=e.width,s=e.chartArea,l=s.left,c=s.right,u="center";return"center"===r?u=a<=(l+c)/2?"left":"right":a<=i/2?u="left":a>=o-i/2&&(u="right"),function(e,t,n,r){var a=r.x,i=r.width,o=n.caretSize+n.caretPadding;return"left"===e&&a+i+o>t.width||"right"===e&&a-i-o<0||void 0}(u,e,t,n)&&(u="center"),u}function wv(e,t,n){var r=n.yAlign||t.yAlign||function(e,t){var n=t.y,r=t.height;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}(e,n);return{xAlign:n.xAlign||t.xAlign||_v(e,t,n,r),yAlign:r}}function kv(e,t,n,r){var a=e.caretSize,i=e.caretPadding,o=e.cornerRadius,s=n.xAlign,l=n.yAlign,c=a+i,u=of(o),f=u.topLeft,d=u.topRight,h=u.bottomLeft,p=u.bottomRight,v=function(e,t){var n=e.x,r=e.width;return"right"===t?n-=r:"center"===t&&(n-=r/2),n}(t,s),m=function(e,t,n){var r=e.y,a=e.height;return"top"===t?r+=n:r-="bottom"===t?a+n:a/2,r}(t,l,c);return"center"===l?"left"===s?v+=c:"right"===s&&(v-=c):"left"===s?v-=Math.max(f,h)+a:"right"===s&&(v+=Math.max(d,p)+a),{x:iu(v,0,r.width-t.width),y:iu(m,0,r.height-t.height)}}function Sv(e,t,n){var r=sf(n.padding);return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-r.right:e.x+r.left}function Cv(e){return yv([],gv(e))}function Ov(e,t){var n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}var Dv={beforeTitle:dc,title:function(e){if(e.length>0){var t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&"dataset"===this.options.mode)return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:dc,beforeBody:dc,beforeLabel:dc,label:function(e){if(this&&this.options&&"dataset"===this.options.mode)return e.label+": "+e.formattedValue||e.formattedValue;var t=e.dataset.label||"";t&&(t+=": ");var n=e.formattedValue;return vc(n)||(t+=n),t},labelColor:function(e){var t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:t.borderColor,backgroundColor:t.backgroundColor,borderWidth:t.borderWidth,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderRadius:0}},labelTextColor:function(){return this.options.bodyColor},labelPointStyle:function(e){var t=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:t.pointStyle,rotation:t.rotation}},afterLabel:dc,afterBody:dc,beforeFooter:dc,footer:dc,afterFooter:dc};function Av(e,t,n,r){var a=e[t].call(n,r);return void 0===a?Dv[t].call(n,r):a}var Mv=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this)).opacity=0,r._active=[],r._eventPosition=void 0,r._size=void 0,r._cachedAnimations=void 0,r._tooltipItems=[],r.$animations=void 0,r.$context=void 0,r.chart=e.chart,r.options=e.options,r.dataPoints=void 0,r.title=void 0,r.beforeBody=void 0,r.body=void 0,r.afterBody=void 0,r.footer=void 0,r.xAlign=void 0,r.yAlign=void 0,r.x=void 0,r.y=void 0,r.height=void 0,r.width=void 0,r.caretX=void 0,r.caretY=void 0,r.labelColors=void 0,r.labelPointStyles=void 0,r.labelTextColors=void 0,r}return _d(n,[{key:"initialize",value:function(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}},{key:"_resolveAnimations",value:function(){var e=this._cachedAnimations;if(e)return e;var t=this.chart,n=this.options.setContext(this.getContext()),r=n.enabled&&t.options.animation&&n.animations,a=new Od(this.chart,r);return r._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}},{key:"getContext",value:function(){return this.$context||(this.$context=(this,uf(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"})))}},{key:"getTitle",value:function(e,t){var n=t.callbacks,r=Av(n,"beforeTitle",this,e),a=Av(n,"title",this,e),i=Av(n,"afterTitle",this,e),o=[];return o=yv(o,gv(r)),o=yv(o,gv(a)),yv(o,gv(i))}},{key:"getBeforeBody",value:function(e,t){return Cv(Av(t.callbacks,"beforeBody",this,e))}},{key:"getBody",value:function(e,t){var n=this,r=t.callbacks,a=[];return kc(e,(function(e){var t={before:[],lines:[],after:[]},i=Ov(r,e);yv(t.before,gv(Av(i,"beforeLabel",n,e))),yv(t.lines,Av(i,"label",n,e)),yv(t.after,gv(Av(i,"afterLabel",n,e))),a.push(t)})),a}},{key:"getAfterBody",value:function(e,t){return Cv(Av(t.callbacks,"afterBody",this,e))}},{key:"getFooter",value:function(e,t){var n=t.callbacks,r=Av(n,"beforeFooter",this,e),a=Av(n,"footer",this,e),i=Av(n,"afterFooter",this,e),o=[];return o=yv(o,gv(r)),o=yv(o,gv(a)),yv(o,gv(i))}},{key:"_createItems",value:function(e){var t,n,r=this,a=this._active,i=this.chart.data,o=[],s=[],l=[],c=[];for(t=0,n=a.length;t<n;++t)c.push(bv(this.chart,a[t]));return e.filter&&(c=c.filter((function(t,n,r){return e.filter(t,n,r,i)}))),e.itemSort&&(c=c.sort((function(t,n){return e.itemSort(t,n,i)}))),kc(c,(function(t){var n=Ov(e.callbacks,t);o.push(Av(n,"labelColor",r,t)),s.push(Av(n,"labelPointStyle",r,t)),l.push(Av(n,"labelTextColor",r,t))})),this.labelColors=o,this.labelPointStyles=s,this.labelTextColors=l,this.dataPoints=c,c}},{key:"update",value:function(e,t){var n,r=this.options.setContext(this.getContext()),a=this._active,i=[];if(a.length){var o=mv[r.position].call(this,a,this._eventPosition);i=this._createItems(r),this.title=this.getTitle(i,r),this.beforeBody=this.getBeforeBody(i,r),this.body=this.getBody(i,r),this.afterBody=this.getAfterBody(i,r),this.footer=this.getFooter(i,r);var s=this._size=xv(this,r),l=Object.assign({},o,s),c=wv(this.chart,r,l),u=kv(r,l,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,n={opacity:1,x:u.x,y:u.y,width:s.width,height:s.height,caretX:o.x,caretY:o.y}}else 0!==this.opacity&&(n={opacity:0});this._tooltipItems=i,this.$context=void 0,n&&this._resolveAnimations().update(this,n),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:t})}},{key:"drawCaret",value:function(e,t,n,r){var a=this.getCaretPosition(e,n,r);t.lineTo(a.x1,a.y1),t.lineTo(a.x2,a.y2),t.lineTo(a.x3,a.y3)}},{key:"getCaretPosition",value:function(e,t,n){var r,a,i,o,s,l,c=this.xAlign,u=this.yAlign,f=n.caretSize,d=of(n.cornerRadius),h=d.topLeft,p=d.topRight,v=d.bottomLeft,m=d.bottomRight,y=e.x,g=e.y,b=t.width,x=t.height;return"center"===u?(s=g+x/2,"left"===c?(a=(r=y)-f,o=s+f,l=s-f):(a=(r=y+b)+f,o=s-f,l=s+f),i=r):(a="left"===c?y+Math.max(h,v)+f:"right"===c?y+b-Math.max(p,m)-f:this.caretX,"top"===u?(s=(o=g)-f,r=a-f,i=a+f):(s=(o=g+x)+f,r=a+f,i=a-f),l=o),{x1:r,x2:a,x3:i,y1:o,y2:s,y3:l}}},{key:"drawTitle",value:function(e,t,n){var r,a,i,o=this.title,s=o.length;if(s){var l=Gf(n.rtl,this.x,this.width);for(e.x=Sv(this,n.titleAlign,n),t.textAlign=l.textAlign(n.titleAlign),t.textBaseline="middle",r=lf(n.titleFont),a=n.titleSpacing,t.fillStyle=n.titleColor,t.font=r.string,i=0;i<s;++i)t.fillText(o[i],l.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+a,i+1===s&&(e.y+=n.titleMarginBottom-a)}}},{key:"_drawColorBox",value:function(e,t,n,r,a){var i=this.labelColors[n],o=this.labelPointStyles[n],s=a.boxHeight,l=a.boxWidth,c=lf(a.bodyFont),u=Sv(this,"left",a),f=r.x(u),d=s<c.lineHeight?(c.lineHeight-s)/2:0,h=t.y+d;if(a.usePointStyle){var p={radius:Math.min(l,s)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},v=r.leftForLtr(f,l)+l/2,m=h+s/2;e.strokeStyle=a.multiKeyBackground,e.fillStyle=a.multiKeyBackground,Wu(e,p,v,m),e.strokeStyle=i.borderColor,e.fillStyle=i.backgroundColor,Wu(e,p,v,m)}else{e.lineWidth=yc(i.borderWidth)?Math.max.apply(Math,md(Object.values(i.borderWidth))):i.borderWidth||1,e.strokeStyle=i.borderColor,e.setLineDash(i.borderDash||[]),e.lineDashOffset=i.borderDashOffset||0;var y=r.leftForLtr(f,l),g=r.leftForLtr(r.xPlus(f,1),l-2),b=of(i.borderRadius);Object.values(b).some((function(e){return 0!==e}))?(e.beginPath(),e.fillStyle=a.multiKeyBackground,Qu(e,{x:y,y:h,w:l,h:s,radius:b}),e.fill(),e.stroke(),e.fillStyle=i.backgroundColor,e.beginPath(),Qu(e,{x:g,y:h+1,w:l-2,h:s-2,radius:b}),e.fill()):(e.fillStyle=a.multiKeyBackground,e.fillRect(y,h,l,s),e.strokeRect(y,h,l,s),e.fillStyle=i.backgroundColor,e.fillRect(g,h+1,l-2,s-2))}e.fillStyle=this.labelTextColors[n]}},{key:"drawBody",value:function(e,t,n){var r,a,i,o,s,l,c,u=this.body,f=n.bodySpacing,d=n.bodyAlign,h=n.displayColors,p=n.boxHeight,v=n.boxWidth,m=n.boxPadding,y=lf(n.bodyFont),g=y.lineHeight,b=0,x=Gf(n.rtl,this.x,this.width),_=function(n){t.fillText(n,x.x(e.x+b),e.y+g/2),e.y+=g+f},w=x.textAlign(d);for(t.textAlign=d,t.textBaseline="middle",t.font=y.string,e.x=Sv(this,w,n),t.fillStyle=n.bodyColor,kc(this.beforeBody,_),b=h&&"right"!==w?"center"===d?v/2+m:v+2+m:0,o=0,l=u.length;o<l;++o){for(r=u[o],a=this.labelTextColors[o],t.fillStyle=a,kc(r.before,_),i=r.lines,h&&i.length&&(this._drawColorBox(t,e,o,x,n),g=Math.max(y.lineHeight,p)),s=0,c=i.length;s<c;++s)_(i[s]),g=y.lineHeight;kc(r.after,_)}b=0,g=y.lineHeight,kc(this.afterBody,_),e.y-=f}},{key:"drawFooter",value:function(e,t,n){var r,a,i=this.footer,o=i.length;if(o){var s=Gf(n.rtl,this.x,this.width);for(e.x=Sv(this,n.footerAlign,n),e.y+=n.footerMarginTop,t.textAlign=s.textAlign(n.footerAlign),t.textBaseline="middle",r=lf(n.footerFont),t.fillStyle=n.footerColor,t.font=r.string,a=0;a<o;++a)t.fillText(i[a],s.x(e.x),e.y+r.lineHeight/2),e.y+=r.lineHeight+n.footerSpacing}}},{key:"drawBackground",value:function(e,t,n,r){var a=this.xAlign,i=this.yAlign,o=e.x,s=e.y,l=n.width,c=n.height,u=of(r.cornerRadius),f=u.topLeft,d=u.topRight,h=u.bottomLeft,p=u.bottomRight;t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.beginPath(),t.moveTo(o+f,s),"top"===i&&this.drawCaret(e,t,n,r),t.lineTo(o+l-d,s),t.quadraticCurveTo(o+l,s,o+l,s+d),"center"===i&&"right"===a&&this.drawCaret(e,t,n,r),t.lineTo(o+l,s+c-p),t.quadraticCurveTo(o+l,s+c,o+l-p,s+c),"bottom"===i&&this.drawCaret(e,t,n,r),t.lineTo(o+h,s+c),t.quadraticCurveTo(o,s+c,o,s+c-h),"center"===i&&"left"===a&&this.drawCaret(e,t,n,r),t.lineTo(o,s+f),t.quadraticCurveTo(o,s,o+f,s),t.closePath(),t.fill(),r.borderWidth>0&&t.stroke()}},{key:"_updateAnimationTarget",value:function(e){var t=this.chart,n=this.$animations,r=n&&n.x,a=n&&n.y;if(r||a){var i=mv[e.position].call(this,this._active,this._eventPosition);if(!i)return;var o=this._size=xv(this,e),s=Object.assign({},i,this._size),l=wv(t,e,s),c=kv(e,s,l,t);r._to===c.x&&a._to===c.y||(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,c))}}},{key:"_willRender",value:function(){return!!this.opacity}},{key:"draw",value:function(e){var t=this.options.setContext(this.getContext()),n=this.opacity;if(n){this._updateAnimationTarget(t);var r={width:this.width,height:this.height},a={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;var i=sf(t.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;t.enabled&&o&&(e.save(),e.globalAlpha=n,this.drawBackground(a,e,r,t),Zf(e,t.textDirection),a.y+=i.top,this.drawTitle(a,e,t),this.drawBody(a,e,t),this.drawFooter(a,e,t),Kf(e,t.textDirection),e.restore())}}},{key:"getActiveElements",value:function(){return this._active||[]}},{key:"setActiveElements",value:function(e,t){var n=this,r=this._active,a=e.map((function(e){var t=e.datasetIndex,r=e.index,a=n.chart.getDatasetMeta(t);if(!a)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:a.data[r],index:r}})),i=!Sc(r,a),o=this._positionChanged(a,t);(i||o)&&(this._active=a,this._eventPosition=t,this._ignoreReplayEvents=!0,this.update(!0))}},{key:"handleEvent",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(t&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;var r=this.options,a=this._active||[],i=this._getActiveElements(e,a,t,n),o=this._positionChanged(i,e),s=t||!Sc(i,a)||o;return s&&(this._active=i,(r.enabled||r.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,t))),s}},{key:"_getActiveElements",value:function(e,t,n,r){var a=this.options;if("mouseout"===e.type)return[];if(!r)return t;var i=this.chart.getElementsAtEventForMode(e,a.mode,a,n);return a.reverse&&i.reverse(),i}},{key:"_positionChanged",value:function(e,t){var n=this.caretX,r=this.caretY,a=this.options,i=mv[a.position].call(this,e,t);return!1!==i&&(n!==i.x||r!==i.y)}}]),n}(Vh);hd(Mv,"positioners",mv);var Ev={id:"tooltip",_element:Mv,positioners:mv,afterInit:function(e,t,n){n&&(e.tooltip=new Mv({chart:e,options:n}))},beforeUpdate:function(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset:function(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw:function(e){var t=e.tooltip;if(t&&t._willRender()){var n={tooltip:t};if(!1===e.notifyPlugins("beforeTooltipDraw",rd(rd({},n),{},{cancelable:!0})))return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent:function(e,t){if(e.tooltip){var 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:function(e,t){return t.bodyFont.size},boxWidth:function(e,t){return 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:Dv},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:function(e){return"filter"!==e&&"itemSort"!==e&&"external"!==e},_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function jv(e){var t=this.getLabels();return e>=0&&e<t.length?t[e]:e}var Pv=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this,e))._startValue=void 0,r._valueRange=0,r._addedLabels=[],r}return _d(n,[{key:"init",value:function(e){var t=this._addedLabels;if(t.length){var r,a=this.getLabels(),i=pd(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,s=o.index,l=o.label;a[s]===l&&a.splice(s,1)}}catch(e){i.e(e)}finally{i.f()}this._addedLabels=[]}ad(fd(n.prototype),"init",this).call(this,e)}},{key:"parse",value:function(e,t){if(vc(e))return null;var n=this.getLabels();return function(e,t){return null===e?null:iu(Math.round(e),0,t)}(t=isFinite(t)&&n[t]===e?t:function(e,t,n,r){var a=e.indexOf(t);return-1===a?function(e,t,n,r){return"string"==typeof t?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n}(e,t,n,r):a!==e.lastIndexOf(t)?n:a}(n,e,xc(t,e),this._addedLabels),n.length-1)}},{key:"determineDataLimits",value:function(){var e=this.getUserBounds(),t=e.minDefined,n=e.maxDefined,r=this.getMinMax(!0),a=r.min,i=r.max;"ticks"===this.options.bounds&&(t||(a=0),n||(i=this.getLabels().length-1)),this.min=a,this.max=i}},{key:"buildTicks",value:function(){var e=this.min,t=this.max,n=this.options.offset,r=[],a=this.getLabels();a=0===e&&t===a.length-1?a:a.slice(e,t+1),this._valueRange=Math.max(a.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(var i=e;i<=t;i++)r.push({value:i});return r}},{key:"getLabelForValue",value:function(e){return jv.call(this,e)}},{key:"configure",value:function(){ad(fd(n.prototype),"configure",this).call(this),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}},{key:"getPixelForValue",value:function(e){return"number"!=typeof e&&(e=this.parse(e)),null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}},{key:"getPixelForTick",value:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e].value)}},{key:"getValueForPixel",value:function(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}},{key:"getBasePixel",value:function(){return this.bottom}}]),n}(Kh);function Iv(e,t,n){var r=n.horizontal,a=qc(n.minRotation),i=(r?Math.sin(a):Math.cos(a))||.001,o=.75*t*(""+e).length;return Math.min(t/i,o)}hd(Pv,"id","category"),hd(Pv,"defaults",{ticks:{callback:jv}});var Lv=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this,e)).start=void 0,r.end=void 0,r._startValue=void 0,r._endValue=void 0,r._valueRange=0,r}return _d(n,[{key:"parse",value:function(e,t){return vc(e)||("number"==typeof e||e instanceof Number)&&!isFinite(+e)?null:+e}},{key:"handleTickRangeOptions",value:function(){var e=this.options.beginAtZero,t=this.getUserBounds(),n=t.minDefined,r=t.maxDefined,a=this.min,i=this.max,o=function(e){return a=n?a:e},s=function(e){return i=r?i:e};if(e){var l=Uc(a),c=Uc(i);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(a===i){var u=0===i?1:Math.abs(.05*i);s(i+u),e||o(a-u)}this.min=a,this.max=i}},{key:"getTickLimit",value:function(){var e,t=this.options.ticks,n=t.maxTicksLimit,r=t.stepSize;return r?(e=Math.ceil(this.max/r)-Math.floor(this.min/r)+1)>1e3&&(console.warn("scales.".concat(this.id,".ticks.stepSize: ").concat(r," would result generating up to ").concat(e," ticks. Limiting to 1000.")),e=1e3):(e=this.computeTickLimit(),n=n||11),n&&(e=Math.min(n,e)),e}},{key:"computeTickLimit",value:function(){return Number.POSITIVE_INFINITY}},{key:"buildTicks",value:function(){var e=this.options,t=e.ticks,n=this.getTickLimit(),r=function(e,t){var n,r,a,i,o,s,l,c=[],u=e.bounds,f=e.step,d=e.min,h=e.max,p=e.precision,v=e.count,m=e.maxTicks,y=e.maxDigits,g=e.includeBounds,b=f||1,x=m-1,_=t.min,w=t.max,k=!vc(d),S=!vc(h),C=!vc(v),O=(w-_)/(y+1),D=Zc((w-_)/x/b)*b;if(D<1e-14&&!k&&!S)return[{value:_},{value:w}];(i=Math.ceil(w/D)-Math.floor(_/D))>x&&(D=Zc(i*D/x/b)*b),vc(p)||(n=Math.pow(10,p),D=Math.ceil(D*n)/n),"ticks"===u?(r=Math.floor(_/D)*D,a=Math.ceil(w/D)*D):(r=_,a=w),k&&S&&f&&(o=(h-d)/f,s=D/1e3,(l=Math.round(o))-s<=o&&l+s>=o)?(D=(h-d)/(i=Math.round(Math.min((h-d)/D,m))),r=d,a=h):C?D=((a=S?h:a)-(r=k?d:r))/(i=v-1):i=Gc(i=(a-r)/D,Math.round(i),D/1e3)?Math.round(i):Math.ceil(i);var A=Math.max(Qc(D),Qc(r));n=Math.pow(10,vc(p)?A:p),r=Math.round(r*n)/n,a=Math.round(a*n)/n;var M=0;for(k&&(g&&r!==d?(c.push({value:d}),r<d&&M++,Gc(Math.round((r+M*D)*n)/n,d,Iv(d,O,e))&&M++):r<d&&M++);M<i;++M){var E=Math.round((r+M*D)*n)/n;if(S&&E>h)break;c.push({value:E})}return S&&g&&a!==h?c.length&&Gc(c[c.length-1].value,h,Iv(h,O,e))?c[c.length-1].value=h:c.push({value:h}):S&&a!==h||c.push({value:a}),c}({maxTicks:n=Math.max(2,n),bounds:e.bounds,min:e.min,max:e.max,precision:t.precision,step:t.stepSize,count:t.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:t.minRotation||0,includeBounds:!1!==t.includeBounds},this._range||this);return"ticks"===e.bounds&&Xc(r,this,"value"),e.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}},{key:"configure",value:function(){var e=this.ticks,t=this.min,r=this.max;if(ad(fd(n.prototype),"configure",this).call(this),this.options.offset&&e.length){var a=(r-t)/Math.max(e.length-1,1)/2;t-=a,r+=a}this._startValue=t,this._endValue=r,this._valueRange=r-t}},{key:"getLabelForValue",value:function(e){return Mu(e,this.chart.options.locale,this.options.ticks.format)}}]),n}(Kh),Rv=function(e){od(n,e);var t=ld(n);function n(){return bd(this,n),t.apply(this,arguments)}return _d(n,[{key:"determineDataLimits",value:function(){var e=this.getMinMax(!0),t=e.min,n=e.max;this.min=gc(t)?t:0,this.max=gc(n)?n:1,this.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){var e=this.isHorizontal(),t=e?this.width:this.height,n=qc(this.options.ticks.minRotation),r=(e?Math.sin(n):Math.cos(n))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(t/Math.min(40,a.lineHeight/r))}},{key:"getPixelForValue",value:function(e){return null===e?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}]),n}(Lv);hd(Rv,"id","linear"),hd(Rv,"defaults",{ticks:{callback:ju.formatters.numeric}});var Nv=function(e){return Math.floor(Yc(e))},Tv=function(e,t){return Math.pow(10,Nv(e)+t)};function Fv(e){return 1==e/Math.pow(10,Nv(e))}function zv(e,t,n){var r=Math.pow(10,n),a=Math.floor(e/r);return Math.ceil(t/r)-a}var Vv=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this,e)).start=void 0,r.end=void 0,r._startValue=void 0,r._valueRange=0,r}return _d(n,[{key:"parse",value:function(e,t){var n=Lv.prototype.parse.apply(this,[e,t]);if(0!==n)return gc(n)&&n>0?n:null;this._zero=!0}},{key:"determineDataLimits",value:function(){var e=this.getMinMax(!0),t=e.min,n=e.max;this.min=gc(t)?Math.max(0,t):null,this.max=gc(n)?Math.max(0,n):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!gc(this._userMin)&&(this.min=t===Tv(this.min,0)?Tv(this.min,-1):Tv(this.min,0)),this.handleTickRangeOptions()}},{key:"handleTickRangeOptions",value:function(){var e=this.getUserBounds(),t=e.minDefined,n=e.maxDefined,r=this.min,a=this.max,i=function(e){return r=t?r:e},o=function(e){return a=n?a:e};r===a&&(r<=0?(i(1),o(10)):(i(Tv(r,-1)),o(Tv(a,1)))),r<=0&&i(Tv(a,-1)),a<=0&&o(Tv(r,1)),this.min=r,this.max=a}},{key:"buildTicks",value:function(){var e=this.options,t=function(e,t){var n=t.min,r=t.max;n=bc(e.min,n);for(var a=[],i=Nv(n),o=function(e,t){for(var n=Nv(t-e);zv(e,t,n)>10;)n++;for(;zv(e,t,n)<10;)n--;return Math.min(n,Nv(e))}(n,r),s=o<0?Math.pow(10,Math.abs(o)):1,l=Math.pow(10,o),c=i>o?Math.pow(10,i):0,u=Math.round((n-c)*s)/s,f=Math.floor((n-c)/l/10)*l*10,d=Math.floor((u-f)/Math.pow(10,o)),h=bc(e.min,Math.round((c+f+d*Math.pow(10,o))*s)/s);h<r;)a.push({value:h,major:Fv(h),significand:d}),d>=10?d=d<15?15:20:d++,d>=20&&(d=2,s=++o>=0?1:s),h=Math.round((c+f+d*Math.pow(10,o))*s)/s;var p=bc(e.max,h);return a.push({value:p,major:Fv(p),significand:d}),a}({min:this._userMin,max:this._userMax},this);return"ticks"===e.bounds&&Xc(t,this,"value"),e.reverse?(t.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),t}},{key:"getLabelForValue",value:function(e){return void 0===e?"0":Mu(e,this.chart.options.locale,this.options.ticks.format)}},{key:"configure",value:function(){var e=this.min;ad(fd(n.prototype),"configure",this).call(this),this._startValue=Yc(e),this._valueRange=Yc(this.max)-Yc(e)}},{key:"getPixelForValue",value:function(e){return void 0!==e&&0!==e||(e=this.min),null===e||isNaN(e)?NaN:this.getPixelForDecimal(e===this.min?0:(Yc(e)-this._startValue)/this._valueRange)}},{key:"getValueForPixel",value:function(e){var t=this.getDecimalForPixel(e);return Math.pow(10,this._startValue+t*this._valueRange)}}]),n}(Kh);function Hv(e){var t=e.ticks;if(t.display&&e.display){var n=sf(t.backdropPadding);return xc(t.font&&t.font.size,Tu.font.size)+n.height}return 0}function Wv(e,t,n,r,a){return e===r||e===a?{start:t-n/2,end:t+n/2}:e<r||e>a?{start:t-n,end:t}:{start:t,end:t+n}}function $v(e,t,n,r,a){var i=Math.abs(Math.sin(n)),o=Math.abs(Math.cos(n)),s=0,l=0;r.start<t.l?(s=(t.l-r.start)/i,e.l=Math.min(e.l,t.l-s)):r.end>t.r&&(s=(r.end-t.r)/i,e.r=Math.max(e.r,t.r+s)),a.start<t.t?(l=(t.t-a.start)/o,e.t=Math.min(e.t,t.t-l)):a.end>t.b&&(l=(a.end-t.b)/o,e.b=Math.max(e.b,t.b+l))}function Bv(e,t,n){var r,a,i,o=e.drawingArea,s=n.extra,l=n.additionalAngle,c=n.padding,u=n.size,f=e.getPointPosition(t,o+s+c,l),d=Math.round(Jc(ru(f.angle+Wc))),h=function(e,t,n){return 90===n||270===n?e-=t/2:(n>270||n<90)&&(e-=t),e}(f.y,u.h,d),p=function(e){return 0===e||180===e?"center":e<180?"left":"right"}(d),v=(r=f.x,a=u.w,"right"===(i=p)?r-=a:"center"===i&&(r-=a/2),r);return{visible:!0,x:f.x,y:h,textAlign:p,left:v,top:h,right:v+u.w,bottom:h+u.h}}function Yv(e,t){if(!t)return!0;var n=e.left,r=e.top,a=e.right,i=e.bottom;return!(Bu({x:n,y:r},t)||Bu({x:n,y:i},t)||Bu({x:a,y:r},t)||Bu({x:a,y:i},t))}function Uv(e,t,n){var r=n.left,a=n.top,i=n.right,o=n.bottom,s=t.backdropColor;if(!vc(s)){var l=of(t.borderRadius),c=sf(t.backdropPadding);e.fillStyle=s;var u=r-c.left,f=a-c.top,d=i-r+c.width,h=o-a+c.height;Object.values(l).some((function(e){return 0!==e}))?(e.beginPath(),Qu(e,{x:u,y:f,w:d,h,radius:l}),e.fill()):e.fillRect(u,f,d,h)}}function Gv(e,t,n,r){var a=e.ctx;if(n)a.arc(e.xCenter,e.yCenter,t,0,Fc);else{var i=e.getPointPosition(0,t);a.moveTo(i.x,i.y);for(var o=1;o<r;o++)i=e.getPointPosition(o,t),a.lineTo(i.x,i.y)}}hd(Vv,"id","logarithmic"),hd(Vv,"defaults",{ticks:{callback:ju.formatters.logarithmic,major:{enabled:!0}}});var Zv=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this,e)).xCenter=void 0,r.yCenter=void 0,r.drawingArea=void 0,r._pointLabels=[],r._pointLabelItems=[],r}return _d(n,[{key:"setDimensions",value:function(){var e=this._padding=sf(Hv(this.options)/2),t=this.width=this.maxWidth-e.width,n=this.height=this.maxHeight-e.height;this.xCenter=Math.floor(this.left+t/2+e.left),this.yCenter=Math.floor(this.top+n/2+e.top),this.drawingArea=Math.floor(Math.min(t,n)/2)}},{key:"determineDataLimits",value:function(){var e=this.getMinMax(!1),t=e.min,n=e.max;this.min=gc(t)&&!isNaN(t)?t:0,this.max=gc(n)&&!isNaN(n)?n:0,this.handleTickRangeOptions()}},{key:"computeTickLimit",value:function(){return Math.ceil(this.drawingArea/Hv(this.options))}},{key:"generateTickLabels",value:function(e){var t=this;Lv.prototype.generateTickLabels.call(this,e),this._pointLabels=this.getLabels().map((function(e,n){var r=wc(t.options.pointLabels.callback,[e,n],t);return r||0===r?r:""})).filter((function(e,n){return t.chart.getDataVisibility(n)}))}},{key:"fit",value:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){for(var t,n,r,a={l:e.left+e._padding.left,r:e.right-e._padding.right,t:e.top+e._padding.top,b:e.bottom-e._padding.bottom},i=Object.assign({},a),o=[],s=[],l=e._pointLabels.length,c=e.options.pointLabels,u=c.centerPointLabels?Tc/l:0,f=0;f<l;f++){var d=c.setContext(e.getPointLabelContext(f));s[f]=d.padding;var h=e.getPointPosition(f,e.drawingArea+s[f],u),p=lf(d.font),v=(t=e.ctx,n=p,r=mc(r=e._pointLabels[f])?r:[r],{w:zu(t,n.string,r),h:r.length*n.lineHeight});o[f]=v;var m=ru(e.getIndexAngle(f)+u),y=Math.round(Jc(m));$v(i,a,m,Wv(y,h.x,v.w,0,180),Wv(y,h.y,v.h,90,270))}e.setCenterPoint(a.l-i.l,i.r-a.r,a.t-i.t,i.b-a.b),e._pointLabelItems=function(e,t,n){for(var r,a=[],i=e._pointLabels.length,o=e.options,s=o.pointLabels,l=s.centerPointLabels,c=s.display,u={extra:Hv(o)/2,additionalAngle:l?Tc/i:0},f=0;f<i;f++){u.padding=n[f],u.size=t[f];var d=Bv(e,f,u);a.push(d),"auto"===c&&(d.visible=Yv(d,r),d.visible&&(r=d))}return a}(e,o,s)}(this):this.setCenterPoint(0,0,0,0)}},{key:"setCenterPoint",value:function(e,t,n,r){this.xCenter+=Math.floor((e-t)/2),this.yCenter+=Math.floor((n-r)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(e,t,n,r))}},{key:"getIndexAngle",value:function(e){return ru(e*(Fc/(this._pointLabels.length||1))+qc(this.options.startAngle||0))}},{key:"getDistanceFromCenterForValue",value:function(e){if(vc(e))return NaN;var t=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-e)*t:(e-this.min)*t}},{key:"getValueForDistanceFromCenter",value:function(e){if(vc(e))return NaN;var t=e/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-t:this.min+t}},{key:"getPointLabelContext",value:function(e){var t=this._pointLabels||[];if(e>=0&&e<t.length){var n=t[e];return function(e,t,n){return uf(e,{label:n,index:t,type:"pointLabel"})}(this.getContext(),e,n)}}},{key:"getPointPosition",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.getIndexAngle(e)-Wc+n;return{x:Math.cos(r)*t+this.xCenter,y:Math.sin(r)*t+this.yCenter,angle:r}}},{key:"getPointPositionForValue",value:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))}},{key:"getBasePosition",value:function(e){return this.getPointPositionForValue(e||0,this.getBaseValue())}},{key:"getPointLabelPosition",value:function(e){var t=this._pointLabelItems[e];return{left:t.left,top:t.top,right:t.right,bottom:t.bottom}}},{key:"drawBackground",value:function(){var e=this.options,t=e.backgroundColor,n=e.grid.circular;if(t){var r=this.ctx;r.save(),r.beginPath(),Gv(this,this.getDistanceFromCenterForValue(this._endValue),n,this._pointLabels.length),r.closePath(),r.fillStyle=t,r.fill(),r.restore()}}},{key:"drawGrid",value:function(){var e,t,n,r=this,a=this.ctx,i=this.options,o=i.angleLines,s=i.grid,l=i.border,c=this._pointLabels.length;if(i.pointLabels.display&&function(e,t){for(var n=e.ctx,r=e.options.pointLabels,a=t-1;a>=0;a--){var i=e._pointLabelItems[a];if(i.visible){var o=r.setContext(e.getPointLabelContext(a));Uv(n,o,i);var s=lf(o.font),l=i.x,c=i.y,u=i.textAlign;Ju(n,e._pointLabels[a],l,c+s.lineHeight/2,s,{color:o.color,textAlign:u,textBaseline:"middle"})}}}(this,c),s.display&&this.ticks.forEach((function(e,n){if(0!==n){t=r.getDistanceFromCenterForValue(e.value);var a=r.getContext(n),i=s.setContext(a),o=l.setContext(a);!function(e,t,n,r,a){var i=e.ctx,o=t.circular,s=t.color,l=t.lineWidth;!o&&!r||!s||!l||n<0||(i.save(),i.strokeStyle=s,i.lineWidth=l,i.setLineDash(a.dash),i.lineDashOffset=a.dashOffset,i.beginPath(),Gv(e,n,o,r),i.closePath(),i.stroke(),i.restore())}(r,i,t,c,o)}})),o.display){for(a.save(),e=c-1;e>=0;e--){var u=o.setContext(this.getPointLabelContext(e)),f=u.color,d=u.lineWidth;d&&f&&(a.lineWidth=d,a.strokeStyle=f,a.setLineDash(u.borderDash),a.lineDashOffset=u.borderDashOffset,t=this.getDistanceFromCenterForValue(i.ticks.reverse?this.min:this.max),n=this.getPointPosition(e,t),a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(n.x,n.y),a.stroke())}a.restore()}}},{key:"drawBorder",value:function(){}},{key:"drawLabels",value:function(){var e=this,t=this.ctx,n=this.options,r=n.ticks;if(r.display){var a,i,o=this.getIndexAngle(0);t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(o),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((function(o,s){if(0!==s||n.reverse){var l=r.setContext(e.getContext(s)),c=lf(l.font);if(a=e.getDistanceFromCenterForValue(e.ticks[s].value),l.showLabelBackdrop){t.font=c.string,i=t.measureText(o.label).width,t.fillStyle=l.backdropColor;var u=sf(l.backdropPadding);t.fillRect(-i/2-u.left,-a-c.size/2-u.top,i+u.width,c.size+u.height)}Ju(t,o.label,0,-a,c,{color:l.color,strokeColor:l.textStrokeColor,strokeWidth:l.textStrokeWidth})}})),t.restore()}}},{key:"drawTitle",value:function(){}}]),n}(Lv);hd(Zv,"id","radialLinear"),hd(Zv,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:ju.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:function(e){return e},padding:5,centerPointLabels:!1}}),hd(Zv,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),hd(Zv,"descriptors",{angleLines:{_fallback:"grid"}});var Kv={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}},Xv=Object.keys(Kv);function qv(e,t){return e-t}function Jv(e,t){if(vc(t))return null;var n=e._adapter,r=e._parseOpts,a=r.parser,i=r.round,o=r.isoWeekday,s=t;return"function"==typeof a&&(s=a(s)),gc(s)||(s="string"==typeof a?n.parse(s,a):n.parse(s)),null===s?null:(i&&(s="week"!==i||!Kc(o)&&!0!==o?n.startOf(s,i):n.startOf(s,"isoWeek",o)),+s)}function Qv(e,t,n,r){for(var a=Xv.length,i=Xv.indexOf(e);i<a-1;++i){var o=Kv[Xv[i]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-t)/(s*o.size))<=r)return Xv[i]}return Xv[a-1]}function em(e,t,n){if(n){if(n.length){var r=su(n,t),a=r.lo,i=r.hi;e[n[a]>=t?n[a]:n[i]]=!0}}else e[t]=!0}function tm(e,t,n){var r,a,i=[],o={},s=t.length;for(r=0;r<s;++r)o[a=t[r]]=r,i.push({value:a,major:!1});return 0!==s&&n?function(e,t,n,r){var a,i,o=e._adapter,s=+o.startOf(t[0].value,r),l=t[t.length-1].value;for(a=s;a<=l;a=+o.add(a,1,r))(i=n[a])>=0&&(t[i].major=!0);return t}(e,i,o,n):i}var nm=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this,e))._cache={data:[],labels:[],all:[]},r._unit="day",r._majorUnit=void 0,r._offsets={},r._normalized=!1,r._parseOpts=void 0,r}return _d(n,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.time||(e.time={}),a=this._adapter=new nh._date(e.adapters.date);a.init(t),Mc(r.displayFormats,a.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},ad(fd(n.prototype),"init",this).call(this,e),this._normalized=t.normalized}},{key:"parse",value:function(e,t){return void 0===e?null:Jv(this,e)}},{key:"beforeLayout",value:function(){ad(fd(n.prototype),"beforeLayout",this).call(this),this._cache={data:[],labels:[],all:[]}}},{key:"determineDataLimits",value:function(){var e=this.options,t=this._adapter,n=e.time.unit||"day",r=this.getUserBounds(),a=r.min,i=r.max,o=r.minDefined,s=r.maxDefined;function l(e){o||isNaN(e.min)||(a=Math.min(a,e.min)),s||isNaN(e.max)||(i=Math.max(i,e.max))}o&&s||(l(this._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||l(this.getMinMax(!1))),a=gc(a)&&!isNaN(a)?a:+t.startOf(Date.now(),n),i=gc(i)&&!isNaN(i)?i:+t.endOf(Date.now(),n)+1,this.min=Math.min(a,i-1),this.max=Math.max(a+1,i)}},{key:"_getLabelBounds",value:function(){var e=this.getLabelTimestamps(),t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return e.length&&(t=e[0],n=e[e.length-1]),{min:t,max:n}}},{key:"buildTicks",value:function(){var e=this.options,t=e.time,n=e.ticks,r="labels"===n.source?this.getLabelTimestamps():this._generate();"ticks"===e.bounds&&r.length&&(this.min=this._userMin||r[0],this.max=this._userMax||r[r.length-1]);var a=this.min,i=function(e,t,n){for(var r=0,a=e.length;r<a&&e[r]<t;)r++;for(;a>r&&e[a-1]>n;)a--;return r>0||a<e.length?e.slice(r,a):e}(r,a,this.max);return this._unit=t.unit||(n.autoSkip?Qv(t.minUnit,this.min,this.max,this._getLabelCapacity(a)):function(e,t,n,r,a){for(var i=Xv.length-1;i>=Xv.indexOf(n);i--){var o=Xv[i];if(Kv[o].common&&e._adapter.diff(a,r,o)>=t-1)return o}return Xv[n?Xv.indexOf(n):0]}(this,i.length,t.minUnit,this.min,this.max)),this._majorUnit=n.major.enabled&&"year"!==this._unit?function(e){for(var t=Xv.indexOf(e)+1,n=Xv.length;t<n;++t)if(Kv[Xv[t]].common)return Xv[t]}(this._unit):void 0,this.initOffsets(r),e.reverse&&i.reverse(),tm(this,i,this._majorUnit)}},{key:"afterAutoSkip",value:function(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map((function(e){return+e.value})))}},{key:"initOffsets",value:function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=0,a=0;this.options.offset&&n.length&&(e=this.getDecimalForValue(n[0]),r=1===n.length?1-e:(this.getDecimalForValue(n[1])-e)/2,t=this.getDecimalForValue(n[n.length-1]),a=1===n.length?t:(t-this.getDecimalForValue(n[n.length-2]))/2);var i=n.length<3?.5:.25;r=iu(r,0,i),a=iu(a,0,i),this._offsets={start:r,end:a,factor:1/(r+1+a)}}},{key:"_generate",value:function(){var e,t,n=this._adapter,r=this.min,a=this.max,i=this.options,o=i.time,s=o.unit||Qv(o.minUnit,r,a,this._getLabelCapacity(r)),l=xc(i.ticks.stepSize,1),c="week"===s&&o.isoWeekday,u=Kc(c)||!0===c,f={},d=r;if(u&&(d=+n.startOf(d,"isoWeek",c)),d=+n.startOf(d,u?"day":s),n.diff(a,r,s)>1e5*l)throw new Error(r+" and "+a+" are too far apart with stepSize of "+l+" "+s);var h="data"===i.ticks.source&&this.getDataTimestamps();for(e=d,t=0;e<a;e=+n.add(e,l,s),t++)em(f,e,h);return e!==a&&"ticks"!==i.bounds&&1!==t||em(f,e,h),Object.keys(f).sort(qv).map((function(e){return+e}))}},{key:"getLabelForValue",value:function(e){var t=this._adapter,n=this.options.time;return n.tooltipFormat?t.format(e,n.tooltipFormat):t.format(e,n.displayFormats.datetime)}},{key:"format",value:function(e,t){var n=this.options.time.displayFormats,r=this._unit,a=t||n[r];return this._adapter.format(e,a)}},{key:"_tickFormatFunction",value:function(e,t,n,r){var a=this.options,i=a.ticks.callback;if(i)return wc(i,[e,t,n],this);var o=a.time.displayFormats,s=this._unit,l=this._majorUnit,c=s&&o[s],u=l&&o[l],f=n[t],d=l&&u&&f&&f.major;return this._adapter.format(e,r||(d?u:c))}},{key:"generateTickLabels",value:function(e){var t,n,r;for(t=0,n=e.length;t<n;++t)(r=e[t]).label=this._tickFormatFunction(r.value,t,e)}},{key:"getDecimalForValue",value:function(e){return null===e?NaN:(e-this.min)/(this.max-this.min)}},{key:"getPixelForValue",value:function(e){var t=this._offsets,n=this.getDecimalForValue(e);return this.getPixelForDecimal((t.start+n)*t.factor)}},{key:"getValueForPixel",value:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return this.min+n*(this.max-this.min)}},{key:"_getLabelSize",value:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,r=qc(this.isHorizontal()?t.maxRotation:t.minRotation),a=Math.cos(r),i=Math.sin(r),o=this._resolveTickFontOptions(0).size;return{w:n*a+o*i,h:n*i+o*a}}},{key:"_getLabelCapacity",value:function(e){var t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,a=this._tickFormatFunction(e,0,tm(this,[e],this._majorUnit),r),i=this._getLabelSize(a),o=Math.floor(this.isHorizontal()?this.width/i.w:this.height/i.h)-1;return o>0?o:1}},{key:"getDataTimestamps",value:function(){var e,t,n=this._cache.data||[];if(n.length)return n;var r=this.getMatchingVisibleMetas();if(this._normalized&&r.length)return this._cache.data=r[0].controller.getAllParsedValues(this);for(e=0,t=r.length;e<t;++e)n=n.concat(r[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(n)}},{key:"getLabelTimestamps",value:function(){var e,t,n=this._cache.labels||[];if(n.length)return n;var r=this.getLabels();for(e=0,t=r.length;e<t;++e)n.push(Jv(this,r[e]));return this._cache.labels=this._normalized?n:this.normalize(n)}},{key:"normalize",value:function(e){return du(e.sort(qv))}}]),n}(Kh);function rm(e,t,n){var r,a,i,o,s=0,l=e.length-1;if(n){if(t>=e[s].pos&&t<=e[l].pos){var c=lu(e,"pos",t);s=c.lo,l=c.hi}var u=e[s];r=u.pos,i=u.time;var f=e[l];a=f.pos,o=f.time}else{if(t>=e[s].time&&t<=e[l].time){var d=lu(e,"time",t);s=d.lo,l=d.hi}var h=e[s];r=h.time,i=h.pos;var p=e[l];a=p.time,o=p.pos}var v=a-r;return v?i+(o-i)*(t-r)/v:i}hd(nm,"id","time"),hd(nm,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});var am=function(e){od(n,e);var t=ld(n);function n(e){var r;return bd(this,n),(r=t.call(this,e))._table=[],r._minPos=void 0,r._tableRange=void 0,r}return _d(n,[{key:"initOffsets",value:function(){var e=this._getTimestampsForTable(),t=this._table=this.buildLookupTable(e);this._minPos=rm(t,this.min),this._tableRange=rm(t,this.max)-this._minPos,ad(fd(n.prototype),"initOffsets",this).call(this,e)}},{key:"buildLookupTable",value:function(e){var t,n,r,a,i,o=this.min,s=this.max,l=[],c=[];for(t=0,n=e.length;t<n;++t)(a=e[t])>=o&&a<=s&&l.push(a);if(l.length<2)return[{time:o,pos:0},{time:s,pos:1}];for(t=0,n=l.length;t<n;++t)i=l[t+1],r=l[t-1],a=l[t],Math.round((i+r)/2)!==a&&c.push({time:a,pos:t/(n-1)});return c}},{key:"_generate",value:function(){var e=this.min,t=this.max,r=ad(fd(n.prototype),"getDataTimestamps",this).call(this);return r.includes(e)&&r.length||r.splice(0,0,e),r.includes(t)&&1!==r.length||r.push(t),r.sort((function(e,t){return e-t}))}},{key:"_getTimestampsForTable",value:function(){var e=this._cache.all||[];if(e.length)return e;var t=this.getDataTimestamps(),n=this.getLabelTimestamps();return e=t.length&&n.length?this.normalize(t.concat(n)):t.length?t:n,this._cache.all=e}},{key:"getDecimalForValue",value:function(e){return(rm(this._table,e)-this._minPos)/this._tableRange}},{key:"getValueForPixel",value:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end;return rm(this._table,n*this._tableRange+this._minPos,!0)}}]),n}(nm);hd(am,"id","timeseries"),hd(am,"defaults",nm.defaults);var im=["height","width","redraw","datasetIdKey","type","data","options","plugins","fallbackContent","updateMode"];function om(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?om(Object(n),!0).forEach((function(t){lm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):om(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cm="label";function um(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function fm(e,t){e.labels=t}function dm(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:cm,r=[];e.datasets=t.map((function(t){var a=e.datasets.find((function(e){return e[n]===t[n]}));return a&&t.data&&!r.includes(a)?(r.push(a),Object.assign(a,t),a):sm({},t)}))}function hm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cm,n={labels:[],datasets:[]};return fm(n,e.labels),dm(n,e.datasets,t),n}function pm(t,n){var r=t.height,a=void 0===r?150:r,i=t.width,o=void 0===i?300:i,s=t.redraw,l=void 0!==s&&s,c=t.datasetIdKey,u=t.type,f=t.data,d=t.options,h=t.plugins,p=void 0===h?[]:h,v=t.fallbackContent,m=t.updateMode,y=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(t,im),g=(0,e.useRef)(null),b=(0,e.useRef)(),x=function(){g.current&&(b.current=new Dp(g.current,{type:u,data:hm(f,c),options:d&&sm({},d),plugins:p}),um(n,b.current))},_=function(){um(n,null),b.current&&(b.current.destroy(),b.current=null)};return(0,e.useEffect)((function(){!l&&b.current&&d&&function(e,t){var n=e.options;n&&t&&Object.assign(n,t)}(b.current,d)}),[l,d]),(0,e.useEffect)((function(){!l&&b.current&&fm(b.current.config.data,f.labels)}),[l,f.labels]),(0,e.useEffect)((function(){!l&&b.current&&f.datasets&&dm(b.current.config.data,f.datasets,c)}),[l,f.datasets]),(0,e.useEffect)((function(){b.current&&(l?(_(),setTimeout(x)):b.current.update(m))}),[l,d,f.labels,f.datasets,m]),(0,e.useEffect)((function(){b.current&&(_(),setTimeout(x))}),[u]),(0,e.useEffect)((function(){return x(),function(){return _()}}),[]),e.createElement("canvas",Object.assign({ref:g,role:"img",height:a,width:o},y),v)}var vm=(0,e.forwardRef)(pm);const mm=function(e){var t=e.selectedChartMetrics;return React.createElement(React.Fragment,null,React.createElement("div",{className:"flex h-[19px] justify-between items-center text-[12px] text-grey-1"},t.length>0&&t.length<3&&React.createElement("span",null,yl[t[0]].label),t.length>1&&t.length<3&&React.createElement("span",null,yl[t[1]].label)))};var ym=function(e){var t,n=e.num,r=e.decimalPoints,a=void 0===r||r,i=e.showSuffix,o=void 0===i||i,s=e.forceDecimalPlaces,l=void 0!==s&&s,c=["","k","m"],u=0;for(n=null==n?0:n;n>=1e3&&u<c.length-1;)n/=1e3,u++;t=l?2:a?n%1==0?0:1:0;var f=n.toFixed(t);return l||(f=f.replace(/\.0+$/,"")),f+(o?c[u]:"")};function gm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gm(Object(n),!0).forEach((function(t){xm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function xm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function wm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Dp.register(Pv,Rv,Hp,zp,Gp,Gd,Xd,vv,Ev,hv,cv);var km=(0,e.memo)((function(n){var r=n.charts,a=n.selectedChartMetrics,o=_m((0,e.useState)({selectedMetricsTotalPoints:0,labels:[],datasets:[]}),2),s=o[0],l=o[1],c=_m((0,e.useState)(!1),2),u=c[0],f=c[1],d=_m((0,e.useState)(bl()),2),h=d[0],p=d[1];(0,e.useEffect)((function(){var e=0,t=[];a.map((function(n,i){var o;if(null===(o=yl[n])||void 0===o||!o.locked){var s=(null==r?void 0:r.data[n])||[],l=s.map((function(e){return e.total}));s.map((function(t){e+=parseFloat(t.total)}));var c={label:n,data:l,borderColor:yl[n].color,fill:!0,borderWidth:2,pointHoverRadius:5,backgroundColor:function(e){var t=e.chart.ctx.createLinearGradient(0,0,0,400),r=yl[n].color.replace("#",""),a=parseInt(r.substr(0,2),16),i=parseInt(r.substr(2,2),16),o=parseInt(r.substr(4,2),16);return t.addColorStop(0,"rgba(".concat(a,", ").concat(i,", ").concat(o,", 0.2)")),t.addColorStop(1,"rgba(255, 255, 255, 0)"),t},spanGaps:!0};"revenue"===n?(c.type="bar",c.backgroundColor="#deb77b",c.borderColor=yl[n].color,c.borderWidth=0,c.fill=!1,c.order=1,c.barThickness=25,c.borderRadius={topLeft:6,topRight:6,bottomLeft:0,bottomRight:0},c.borderSkipped=!1,delete c.backgroundColor,c.backgroundColor="#deb77b"):c.order=2,a.length<=2&&(c.yAxisID="chart-y-axis-"+(i+1)),t.push(c)}})),l({selectedMetricsTotalPoints:e,labels:v(r.labels),datasets:t})}),[r,a]);var v=function(e){return e.map((function(e,t){return e.includes(":")?e:"list"===(null==r?void 0:r.filter)?i()(e).format("DD/MM/YYYY"):"weekly"===(null==r?void 0:r.filter)?i()(e).format("DD/MM/YY"):"monthly"===(null==r?void 0:r.filter)?i()(e).format("MMM YYYY"):i()(e).format("DD/MM/YYYY")}))};(0,e.useEffect)((function(){var e=function(){p(bl())};return window.addEventListener("fireplugins/theme/change",e),function(){window.removeEventListener("fireplugins/theme/change",e)}}),[]);var m=function(){var e={x:{ticks:{maxTicksLimit:10,color:"dark"===h?"#fff":"#41495B"},grid:{offset:!0,display:!0,drawBorder:!1,drawOnChartArea:!1,drawTicks:!1,tickLength:0,borderColor:"#d1d2db",color:"#d1d2db"}}},t=null;if(a.length>2)t={y:{border:{display:!1},ticks:{display:!1,beginAtZero:!0,maxTicksLimit:5},grid:{display:!0,drawBorder:!1,showGridLines:!1,drawOnChartArea:!0,borderDashOffset:25,borderColor:"#d1d2db",borderWidth:0,color:"#d1d2db"}}};else{var n={},r={position:"left",display:!0,axis:"y",border:{display:!1},min:0,ticks:{display:!0,beginAtZero:!0,maxTicksLimit:5,color:"dark"===h?"#fff":"#41495B"},title:{display:!1},grid:{display:!0,drawBorder:!1,showGridLines:!1,drawOnChartArea:!0,borderDashOffset:25,borderColor:"#d1d2db",borderWidth:0,color:"#d1d2db"}};1===a.length&&(n["chart-y-axis-1"]=r),2===a.length&&(n["chart-y-axis-1"]=r,n["chart-y-axis-2"]={position:"right",display:!0,axis:"y",border:{display:!1},min:0,ticks:{display:!0,beginAtZero:!0,maxTicksLimit:5,color:"dark"===h?"#fff":"#41495B"},title:{display:!1},grid:{display:!0,drawBorder:!1,showGridLines:!1,drawOnChartArea:!1,borderDashOffset:25,borderColor:"#d1d2db",borderWidth:0,color:"#d1d2db"}}),t=n}return bm(bm({},e),t)};(0,e.useEffect)((function(){f(m())}),[]),(0,e.useEffect)((function(){f(m())}),[h,a]);var y={maintainAspectRatio:!1,scales:u,elements:{line:{tension:.3},point:{radius:0}},interaction:{intersect:!1,mode:"index"},plugins:{legend:{display:!1},filler:{propagate:!1},tooltip:{backgroundColor:"#343d43",padding:16,titleColor:"#999",bodyFont:{size:14},callbacks:{title:function(e){var t=r.labels[e[0].dataIndex];return t.includes(":")?t:"list"===(null==r?void 0:r.filter)?i()(t).format("dddd, MMM D"):"weekly"===(null==r?void 0:r.filter)?i()(t).format("DD MMM YY")+" "+fbox_admin_js_object.langs.TO+" "+i()(t).add(6,"day").format("DD MMM YY"):t},label:function(e){var t,n,r,a=parseFloat(e.raw),i=e.dataset.label;if(null!==(t=yl[i])&&void 0!==t&&t.locked)return"";var o=yl[i].label;"conversionrate"===i&&(a=ym({num:a,decimalPoints:!0})),a=0!==a?a.toLocaleString("en-US"):a;var s=(null===(n=yl[i])||void 0===n?void 0:n.suffix)||"",l=(null===(r=yl[i])||void 0===r?void 0:r.prefix)||"";return l?a=l+a:s&&(a+=s)," "+a+" "+o},afterLabel:function(e){var t,n=e.dataset.label;if("revenue"===n&&(null===(t=yl[n])||void 0===t||!t.locked)&&r.revenue_breakdown){var a,i=(null===(a=fbox_admin_js_object)||void 0===a?void 0:a.revenue_attribution_currency)||"$",o=r.labels[e.dataIndex],s=r.revenue_breakdown[o];if(s){var l=s.view_through_revenue,c=s.conversion_through_revenue,u=[];if(l>0){var f=l.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});u.push("View-Through: ".concat(i).concat(f))}if(c>0){var d=c.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2});u.push("Conversion-Through: ".concat(i).concat(d))}return u}}return[]}}}}};return t().createElement("div",{className:"flex flex-col gap-2 flex-grow justify-between"},0===s.labels.length?t().createElement(xl,null):t().createElement(t().Fragment,null,t().createElement("div",null,t().createElement(mm,{selectedChartMetrics:a}),t().createElement("div",{className:"relative"},t().createElement("div",null,t().createElement(vm,{type:"line",data:s,options:y,plugins:[{afterDatasetsDraw:function(e){var t,n,r;if(null!=e&&null!==(t=e.tooltip)&&void 0!==t&&t._active&&null!=e&&null!==(n=e.tooltip)&&void 0!==n&&null!==(r=n._active)&&void 0!==r&&r.length){var a=e.scales["chart-y-axis-1"]?"chart-y-axis-1":"y",i=e.tooltip._active[0],o=e.ctx,s=i.element.x,l=e.scales[a].top,c=e.scales[a].bottom;o.save(),o.beginPath(),o.moveTo(s,l),o.lineTo(s,c),o.setLineDash([1,1]),o.lineWidth=2,o.strokeStyle="#a1a1a1",o.stroke(),o.restore()}}}],key:Date.now(),style:{maxWidth:"100%"},height:336})),0===s.selectedMetricsTotalPoints&&t().createElement("div",{className:"w-full flex flex-col items-center gap-2 justify-center absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 dark:text-white"},t().createElement("svg",{width:"81",height:"80",viewBox:"0 0 81 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("circle",{cx:"41.5",cy:"40",r:"36",fill:"#D1D4F4"}),t().createElement("path",{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M27.0432 7.01953C40.1252 7.54876 50.5683 18.3215 50.5683 31.5333C50.5683 37.589 48.3743 43.1323 44.7379 47.4116L46.8613 49.5349C47.9768 49.001 49.354 49.1962 50.2782 50.1204L66.2755 66.1177C64.3226 67.9708 62.1621 69.6072 59.8324 70.9883L44.6213 55.7772C43.6983 54.8541 43.5025 53.4792 44.0339 52.3645L41.9092 50.2398C37.6304 53.8746 32.0884 56.0675 26.0342 56.0675C17.7197 56.0675 10.3712 51.9315 5.93383 45.6047C5.64824 43.7781 5.5 41.9059 5.5 39.9992C5.5 38.3617 5.60933 36.7497 5.82108 35.1702C7.53793 44.7761 15.9346 52.0675 26.0342 52.0675C37.3749 52.0675 46.5683 42.874 46.5683 31.5333C46.5683 20.1926 37.3749 10.9992 26.0342 10.9992C23.2676 10.9992 20.6289 11.5463 18.2202 12.5382C20.8611 10.2972 23.8294 8.43036 27.0432 7.01953Z",fill:"#41495B"}),t().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M40.9373 43.4396C41.7184 42.6586 42.9847 42.6586 43.7658 43.4396L57.9079 57.5817C58.689 58.3628 58.689 59.6291 57.9079 60.4102C57.1269 61.1912 55.8605 61.1912 55.0795 60.4101L40.9373 46.268C40.1563 45.487 40.1563 44.2206 40.9373 43.4396Z",fill:"#41495B"}),t().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M61.6675 69.8244L44.6209 52.7777C43.4493 51.6061 43.4493 49.7067 44.6209 48.5351L46.0351 47.1209C47.2067 45.9493 49.1061 45.9493 50.2777 47.1209L67.7705 64.6136C65.939 66.5676 63.892 68.3172 61.6675 69.8244Z",fill:"#F5CE81"}),t().createElement("path",{d:"M48.5683 28.5342C48.5683 40.9794 38.4794 51.0683 26.0342 51.0683C13.5889 51.0683 3.5 40.9794 3.5 28.5342C3.5 16.0889 13.5889 6 26.0342 6C38.4794 6 48.5683 16.0889 48.5683 28.5342Z",fill:"#F4F5FE"}),t().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26.0342 8C14.6935 8 5.5 17.1935 5.5 28.5342C5.5 39.8749 14.6935 49.0683 26.0342 49.0683C37.3749 49.0683 46.5683 39.8749 46.5683 28.5342C46.5683 17.1935 37.3749 8 26.0342 8ZM1.5 28.5342C1.5 14.9843 12.4843 4 26.0342 4C39.584 4 50.5683 14.9843 50.5683 28.5342C50.5683 42.084 39.584 53.0683 26.0342 53.0683C12.4843 53.0683 1.5 42.084 1.5 28.5342Z",fill:"#050931"}),t().createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M26 14C17.9919 14 11.5 20.4919 11.5 28.5C11.5 29.6046 10.6046 30.5 9.5 30.5C8.39543 30.5 7.5 29.6046 7.5 28.5C7.5 18.2827 15.7827 10 26 10C27.1046 10 28 10.8954 28 12C28 13.1046 27.1046 14 26 14Z",fill:"white"})),t().createElement("div",null,fbox_admin_js_object.langs.NO," ",a.map((function(e){return yl[e].label})).join(", ")," ",fbox_admin_js_object.langs.DATA_AVAILABLE,"."))))))}));const Sm=km;var Cm=(0,e.memo)((function(t){var n=t.isLoading,r=t.filter,a=t.performanceChartFiltersItems,i=t.showChartFiltersDropdown,o=t.setShowChartFiltersDropdown,s=t.toggleIsOpen,l=t.selectFilter,c=(0,e.useRef)("Performance_dropdownRef");return Gs(c,(function(){o(!1)})),(Object.keys(a).length>0||i)&&!n&&React.createElement("div",{className:"relative dark:text-grey-3",ref:c},React.createElement("span",{className:"inline-flex items-center cursor-pointer hover:text-black dark:hover:text-white",onClick:s},_l[r],React.createElement(Zs,{className:i?"rotate-180":""})),i&&React.createElement("div",{className:"absolute z-20 top-full text-base right-0 rounded-[4px] shadow-box bg-white dark:bg-[#343d43] flex flex-col"},Object.keys(a).map((function(e,t){return React.createElement("div",{key:t,className:"p-1 pr-2 cursor-pointer ".concat(r===e?"pointer-events-none bg-pale-blue dark:bg-white dark:text-black":"bg-white hover:bg-pale-blue dark:bg-transparent dark:hover:bg-pale-blue dark:hover:text-black"),onClick:function(){return l(e)}},a[e])}))))}));const Om=Cm;var Dm=function(e){return e||"__all_templates__"};function Am(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Mm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Mm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Em=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto",n=(0,e.useState)(null),r=Am(n,2),a=r[0],i=r[1],o=(0,e.useState)(!0),s=Am(o,2),l=s[0],c=s[1];return(0,e.useEffect)((function(){var e="undefined"!=typeof window&&window.wp&&window.wp.hooks?window.wp.hooks:null,t=function(){try{var t=null==e?void 0:e.applyFilters("firebox.revenue.type","locked"),n=null==e?void 0:e.applyFilters("firebox.revenue.components",null);if(!n)return i(null),void c(!1);i("pro"===t?{Clicks:n.Clicks,Revenue:n.Revenue,SalesFunnel:n.SalesFunnel,ClickThroughRevenue:n.ClickThroughRevenue,ViewThroughRevenue:n.ViewThroughRevenue,CompactRevenueROI:n.CompactRevenueROI,type:"pro"}:{Clicks:n.ClicksLocked,Revenue:n.RevenueLocked,SalesFunnel:n.SalesFunnelLocked,ClickThroughRevenue:n.ClickThroughRevenueLocked,ViewThroughRevenue:n.ViewThroughRevenueLocked,CompactRevenueROI:n.CompactRevenueROILocked,type:"locked"})}finally{c(!1)}};return t(),e&&e.addAction("firebox.revenue.ready","firebox/analytics",t,10),function(){e&&e.removeAction("firebox.revenue.ready","firebox/analytics")}}),[t]),{components:a,loading:l}},jm=(0,e.memo)((function(e){var t=e.children,n=e.fontSize,r=void 0===n?"text-[12px]":n,a=e.size,i=void 0===a?"w-[150px]":a,o=e.textAlign,s=void 0===o?"text-center":o,l=e.padding,c=void 0===l?"p-1":l,u=e.top,f=void 0===u?"top-[calc(100%+8px)]":u,d=e.className,h=void 0===d?"":d;return React.createElement("div",{className:"absolute opacity-0 -z-10 pointer-events-none ".concat(f," group-hover:opacity-100 group-hover:z-30 group-hover:pointer-events-auto shadow-lg ").concat(s," bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 ").concat(c," rounded text-gray-800 dark:text-white ").concat(r," ").concat(i).concat(""!==h?" "+h:" left-1/2 translate-x-[-50%]")},t)}));const Pm=jm;function Im(){return Im=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Im.apply(this,arguments)}function Lm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Rm=function(n){var r,a,i=n.upgradePlan,o=void 0===i?"":i,s=n.feature,l=void 0===s?"":s,c=n.className,u=void 0===c?"":c,f=n.label,d=void 0===f?"":f,h=n.size,p=void 0===h?"text-[12px]":h,v=n.showLabel,m=void 0!==v&&v,y=n.iconSize,g=void 0===y?10:y,b=n.disableHoverReveal,x=void 0!==b&&b,_=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Lm(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lm(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)(!1),2),w=_[0],k=_[1],S="fpf-modal-opener inline-flex cursor-pointer items-center gap-0 rounded-full border border-amber-200 bg-amber-50 px-1.5 py-0.5 font-medium leading-none text-amber-700 z-10 ".concat(p),C=u?"".concat(S," ").concat(u):"relative ".concat(S),O="Available in ".concat(o," plan"),D={"data-fpf-modal":"#fireboxUpgradeToPlan","data-fpf-modal-item":l,"data-current-plan":(null===(r=fbox_admin_js_object)||void 0===r?void 0:r.license_plan)||(null===(a=fbox_admin_js_object)||void 0===a?void 0:a.license_type)||"basic","data-upgrade-plan":o};return t().createElement("span",Im({className:C,"aria-label":"Locked • ".concat(O),title:O},D,{onMouseEnter:function(){return k(!0)},onMouseLeave:function(){return k(!1)}}),t().createElement("svg",{width:g,height:g,viewBox:"0 0 24 24",className:"fill-current","aria-hidden":"true",focusable:"false"},t().createElement("path",{d:"M6 10V8a6 6 0 1112 0v2h1a1 1 0 011 1v9a1 1 0 01-1 1H5a1 1 0 01-1-1v-9a1 1 0 011-1h1zm2 0h8V8a4 4 0 10-8 0v2z"})),d||o?m?t().createElement("span",{className:"pl-1"},d||o):t().createElement("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-out ".concat(!x&&w?"pl-1 max-w-[10rem] opacity-100":"pl-0 max-w-0 opacity-0")},d||o):null)},Nm=function(e){var t,n,r,a=e.slug,i=e.lockedPlan,o=e.numberClass,s=e.label,l=e.value,c=e.previousPeriodValue,u=e.prefix,f=void 0===u?"":u,d=e.suffix,h=void 0===d?"":d,p=e.formatSuffix,v=e.decimalPoints,m=void 0===v||v,y=e.tooltipMessage,g=e.showCheckbox,b=void 0!==g&&g,x=e.isSelected,_=void 0!==x&&x,w=e.onToggle,k=e.isClickable,S=void 0!==k&&k,C=function(){return React.createElement(React.Fragment,null,ym({num:l,showSuffix:p,decimalPoints:m}),null!=h?h:"")},O=(t=parseFloat(l)||0,0===(n=parseFloat(c)||0)?t>0?100:null:(t-n)/n*100);return React.createElement("div",{className:"flex flex-col"},React.createElement("div",{className:"flex items-center gap-[4px] relative".concat(S?" cursor-pointer":""),onClick:S?w:void 0},b&&React.createElement("div",{className:"".concat(S?"":"opacity-50 cursor-not-allowed")},React.createElement("div",{className:"w-[16px] h-[16px] flex-shrink-0 border border-solid rounded flex items-center justify-center transition-all ".concat(_?"".concat(function(){var e="";switch(a){case"views":e="bg-metric-views";break;case"clicks":e="bg-metric-clicks";break;case"conversions":e="bg-metric-conversions";break;case"conversionrate":e="bg-metric-conversion-rate";break;case"revenue":e="bg-metric-revenue"}return e}()," border-transparent"):"bg-white dark:bg-dark-1 border-gray-400 hover:border-gray-700")},_&&React.createElement("svg",{width:"10",height:"7",viewBox:"0 0 12 9",fill:"none",className:"text-white"},React.createElement("path",{d:"M1 4.5L4 7.5L11 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})))),React.createElement("span",{className:"flex gap-[4px] text-sm text-gray-700 dark:text-gray-200 relative"},React.createElement("span",{className:"group/metriclabel"},s,y&&React.createElement("div",{className:"cursor-default",onClick:function(e){return!i&&e.stopPropagation()},onMouseDown:function(e){return!i&&e.stopPropagation()},onMouseUp:function(e){return!i&&e.stopPropagation()}},React.createElement(Pm,{size:"w-[300px]",fontSize:"text-[14px]",textAlign:"text-left",padding:"p-2",top:"top-full",className:"left-0 right-auto translate-x-0 hidden group-hover/metriclabel:flex flex-col"},y))),i&&React.createElement(Rm,{feature:s,upgradePlan:i,disableHoverReveal:!0}))),React.createElement("div",{className:"font-bold mt-1 text-gray-900 dark:text-white".concat(o?" "+o:""),style:{fontSize:"26px",lineHeight:"1.2"},title:(r=new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:m?2:0,maximumFractionDigits:m?2:0}).format(l||0),(null!=f?f:"")+r+(null!=h?h:""))},null!=e&&e.formatNumberLayout?e.formatNumberLayout({num:l,suffix:h,showSuffix:p,decimalPoints:m,defaultLayout:C}):C()),null!==O&&React.createElement("div",{className:"flex items-center gap-[4px] font-medium ".concat(O>=0?"text-green-600 dark:text-green-400":"text-red-600 dark:text-red-400"),style:{fontSize:"12px"}},React.createElement("span",null,O>=0?"+":"",O.toFixed(1),"%"),O>=0?React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"w-[12px] h-[12px] text-green-500 dark:text-green-600 rotate-180","stroke-width":"2"},React.createElement("path",{"fill-rule":"evenodd",d:"M8 2a.75.75 0 0 1 .75.75v8.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.22 3.22V2.75A.75.75 0 0 1 8 2Z","clip-rule":"evenodd"})):React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"w-[12px] h-[12px] text-red-500 dark:text-red-700 ","stroke-width":"2"},React.createElement("path",{"fill-rule":"evenodd",d:"M8 2a.75.75 0 0 1 .75.75v8.69l3.22-3.22a.75.75 0 1 1 1.06 1.06l-4.5 4.5a.75.75 0 0 1-1.06 0l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.22 3.22V2.75A.75.75 0 0 1 8 2Z","clip-rule":"evenodd"}))))};var Tm=["overall"];function Fm(){return Fm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fm.apply(this,arguments)}var zm=(0,e.memo)((function(e){var t=e.overall,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Tm);return React.createElement(Nm,Fm({label:fbox_admin_js_object.langs.VIEWS,value:t.current.views||0,previousPeriodValue:t.previous.views||0,tooltipMessage:React.createElement(React.Fragment,null,React.createElement("div",null,fbox_admin_js_object.langs.VIEWS_TOOLTIP_DESC),React.createElement("div",{className:"mt-1"},React.createElement("a",{href:"https://www.fireplugins.com/docs/analytics/analytics/?utm_source=source&utm_campaign=firebox-".concat("lite"===fbox_admin_js_object.license_type?"free":"pro","&utm_content=misc&utm_medium=analytics-views#Views"),target:"_blank",className:"text-[#888] no-underline font-semibold hover:text-dark-1 dark:hover:text-white"},fbox_admin_js_object.langs.READ_MORE.toUpperCase()))),slug:"views"},n))}));const Vm=zm;var Hm=["overall"];function Wm(){return Wm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wm.apply(this,arguments)}var $m=(0,e.memo)((function(e){var t=e.overall,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Hm);return React.createElement(Nm,Wm({label:fbox_admin_js_object.langs.CONVERSIONS,value:t.current.conversions||0,previousPeriodValue:t.previous.conversions||0,tooltipMessage:React.createElement(React.Fragment,null,React.createElement("div",null,fbox_admin_js_object.langs.CONVERSIONS_TOOLTIP_DESC),React.createElement("div",{className:"mt-1"},React.createElement("a",{href:"https://www.fireplugins.com/docs/analytics/analytics/?utm_source=source&utm_campaign=firebox-".concat("lite"===fbox_admin_js_object.license_type?"free":"pro","&utm_content=misc&utm_medium=analytics-conversions#Conversions"),target:"_blank",className:"text-[#888] no-underline font-semibold hover:text-dark-1 dark:hover:text-white"},fbox_admin_js_object.langs.READ_MORE.toUpperCase()))),slug:"conversions"},n))}));const Bm=$m;var Ym=["overall"];function Um(){return Um=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Um.apply(this,arguments)}var Gm=(0,e.memo)((function(e){var t=e.overall,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,Ym);return React.createElement(Nm,Um({label:"CVR",value:t.current.conversionrate||fbox_admin_js_object.langs["N/A"],previousPeriodValue:t.previous.conversionrate||0,formatNumberLayout:function(e){var t,n,r,a=e.num;return e.suffix,e.showSuffix,e.decimalPoints,e.defaultLayout,a===fbox_admin_js_object.langs["N/A"]?fbox_admin_js_object.langs["N/A"]:(n=ym({num:t=a,showSuffix:!1,decimalPoints:!0})+"%",r=ym({num:t,showSuffix:!1,decimalPoints:!0})+"%",React.createElement("span",{title:r},n))},suffix:"%",formatSuffix:!1,tooltipMessage:React.createElement(React.Fragment,null,React.createElement("div",null,fbox_admin_js_object.langs.CONVERSION_RATE_TOOLTIP_DESC),React.createElement("div",{className:"mt-1"},React.createElement("a",{href:"https://www.fireplugins.com/docs/analytics/analytics/?utm_source=source&utm_campaign=firebox-".concat("lite"===fbox_admin_js_object.license_type?"free":"pro","&utm_content=misc&utm_medium=analytics-conversion-rate#Conversion-Rate"),target:"_blank",className:"text-[#888] no-underline font-semibold hover:text-dark-1 dark:hover:text-white"},fbox_admin_js_object.langs.READ_MORE.toUpperCase()))),slug:"conversionrate"},n))}));const Zm=Gm;function Km(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Km(Object(n),!0).forEach((function(t){qm(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Km(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function qm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jm(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||Qm(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qm(e,t){if(e){if("string"==typeof e)return ey(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ey(e,t):void 0}}function ey(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ty={labels:[],data:{views:[],clicks:[],conversions:[],conversionrate:[],revenue:[]},days_between:null};const ny=function(){var n,r,a,i,o=localStorage.getItem("fireboxAnalyticsStateData")?JSON.parse(localStorage.getItem("fireboxAnalyticsStateData")):{},s=Jm((0,e.useState)([]),2),l=s[0],c=s[1],u=Jm((0,e.useState)(!0),2),f=u[0],d=u[1],h=Jm((0,e.useState)(!1),2),p=h[0],v=h[1],m=Jm((0,e.useState)(!1),2),y=m[0],g=m[1],b=Jm((0,e.useState)(_l),2),x=b[0],_=b[1],w=Jm((0,e.useState)(!1),2),k=w[0],S=w[1],C=Jm((0,e.useState)("list"),2),O=C[0],D=C[1],A=Jm((0,e.useState)((null==o?void 0:o.performanceFilters)||["views"]),2),M=A[0],E=A[1],j=Jm((0,e.useState)(ty),2),P=j[0],I=j[1],L=Jm((0,e.useState)({current:{},previous:{}}),2),R=L[0],N=L[1],T=Em(),F=T.components,z=(T.loading,t().createRef()),V=al(),H=V.date_period,W=V.custom_date_period,$=V.selected_campaign,B=["views","clicks","conversions","conversionrate","revenue"],Y=function(){var e,t,n=Xs(H,W),r=n.start_date,a=n.end_date,i=Math.round((Date.parse(a)-Date.parse(r))/864e5);if(i<30?(_([]),D("list")):_(i<90?{list:fbox_admin_js_object.langs.DAILY,weekly:fbox_admin_js_object.langs.WEEKLY}:_l),!["today","custom"].includes(H)&&null!=l&&null!==(e=l[Dm($)])&&void 0!==e&&null!==(t=e[H])&&void 0!==t&&t[O]){var o=l[Dm($)][H][O];return I(o.chartData),N(o.overallData),g(!1),void d(!1)}var s=new FormData;s.append("nonce",fpf_js_object.nonce),s.append("action","firebox_analytics_get_charts_data"),s.append("start_date",r),s.append("end_date",a),s.append("selected_campaign",$),s.append("filter",O);var u=new FormData;u.append("nonce",fpf_js_object.nonce),u.append("action","firebox_analytics_stats"),u.append("date_period",H),u.append("start_date",r),u.append("end_date",a),u.append("selected_campaign",$),Promise.all([fetch(fpf_js_object.ajax_url,{method:"POST",body:s}).then((function(e){return e.json()})),fetch(fpf_js_object.ajax_url,{method:"POST",body:u}).then((function(e){return e.json()}))]).then((function(e){var t=Jm(e,2),n=t[0],r=t[1],a=n,o=r;Object.keys(a.data).map((function(e){a.data[e]=1===i?function(e,t){var n,r=new Map,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return pl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pl(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}(t);try{for(a.s();!(n=a.n()).done;){var i=n.value;r.set(i.label,parseFloat(i.total))}}catch(e){a.e(e)}finally{a.f()}return e.map((function(e){return{date:e,total:r.get(e)||0}}))}(a.labels,a.data[e]):function(e,t){var n=new Map;return null!=t&&t.length&&t.forEach((function(e){n.set(e.label,parseFloat(e.total))})),e.map((function(e){return{date:e,total:(null==n?void 0:n.get(e))||"0.00"}}))}(a.labels,a.data[e])})),a.filter=O,I(a),N(o),g(!1),d(!1),["today","custom"].includes(H)||c((function(e){var t,n=Dm($);return Xm(Xm({},e),{},qm({},n,Xm(Xm({},e[n]),{},qm({},H,Xm(Xm({},null===(t=e[n])||void 0===t?void 0:t[H]),{},qm({},O,{chartData:a,overallData:o}))))))}))}))};Us((function(){Y(),v(!0)}),z),(0,e.useEffect)((function(){p&&(d(!0),Y())}),[$,O]),(0,e.useEffect)((function(){p&&"custom"===H&&(2===W.length&&(null===W[0]||null===W[1])||(d(!0),Y()))}),[W]),(0,e.useEffect)((function(){p&&"custom"!==H&&(d(!0),Y())}),[H]);var U,G=(0,e.useCallback)((function(e){if(B.includes(e)){var t=function(e){return function(e){if(Array.isArray(e))return ey(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Qm(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(M),n=t.indexOf(e);-1!==n?t.splice(n,1):t.push(e);var r=localStorage.getItem("fireboxAnalyticsStateData")?JSON.parse(localStorage.getItem("fireboxAnalyticsStateData")):{};r.performanceFilters=t,localStorage.setItem("fireboxAnalyticsStateData",JSON.stringify(r)),0!==t.length&&E(t)}}),[M,B]),Z=(0,e.useCallback)((function(){S((function(e){return!e}))}),[]),K=(0,e.useCallback)((function(e){S(!1),g(!0),D(e)}),[O]),X=(0,e.useCallback)((function(e){B.includes(e)&&G(e)}),[G,B]);return t().createElement("div",{ref:z,className:"relative group flex flex-col gap-3 bg-white dark:bg-dark-1 rounded p-3 h-auto"},t().createElement("div",{className:"flex flex-wrap items-start divide-solid"},(U=function(){var e,n;if(f&&(null==l||null===(e=l[Dm($)])||void 0===e||null===(n=e[H])||void 0===n||!n[O]))return t().createElement("div",{className:"flex flex-wrap gap-3"},Array.from({length:7},(function(e,n){return t().createElement("div",{key:"skeleton-".concat(n),className:"flex flex-col gap-1"},t().createElement("div",{className:"flex items-center gap-[4px]"},t().createElement("div",{className:"animate-pulse h-[16px] w-[16px] bg-slate-200 dark:bg-slate-700 rounded-sm"}),t().createElement("div",{className:"animate-pulse h-[16px] w-16 bg-slate-200 dark:bg-slate-700 rounded"})),t().createElement("div",{className:"animate-pulse h-3 w-12 bg-slate-200 dark:bg-slate-700 rounded"}),t().createElement("div",{className:"animate-pulse h-2 w-8 bg-slate-200 dark:bg-slate-700 rounded"}))})));var r=[];return r.push(t().createElement(Vm,{key:"views",overall:R,showCheckbox:!0,isSelected:M.includes("views"),onToggle:function(){return X("views")},isClickable:!0})),null!=F&&F.Revenue&&r.push(t().createElement(F.Revenue,{key:"revenue",overall:R,showCheckbox:!0,isSelected:M.includes("revenue"),onToggle:function(){return X("revenue")}})),null!=F&&F.Clicks&&r.push(t().createElement(F.Clicks,{key:"clicks",overall:R,showCheckbox:!0,isSelected:M.includes("clicks"),onToggle:function(){return X("clicks")}})),r.push(t().createElement(Bm,{key:"conversions",overall:R,showCheckbox:!0,isSelected:M.includes("conversions"),onToggle:function(){return X("conversions")},isClickable:!0})),r.push(t().createElement(Zm,{key:"conversionrate",overall:R,showCheckbox:!0,isSelected:M.includes("conversionrate"),onToggle:function(){return X("conversionrate")},isClickable:!0})),null!=F&&F.ViewThroughRevenue&&r.push(t().createElement(F.ViewThroughRevenue,{key:"view_through_revenue",overall:R})),null!=F&&F.ClickThroughRevenue&&r.push(t().createElement(F.ClickThroughRevenue,{key:"conversion_through_revenue",overall:R})),r.map((function(e,n){return t().createElement("div",{key:n,className:"".concat(n>0?"pl-3 ml-3 border-l border-t-0 border-r-0 border-b-0 border-gray-200 dark:border-gray-600":"")},e)}))}(),U)),t().createElement("div",{className:"flex flex-col gap-3"},t().createElement(Om,{isLoading:f,filter:O,performanceChartFiltersItems:x,showChartFiltersDropdown:k,setShowChartFiltersDropdown:S,toggleIsOpen:Z,selectFilter:K}),(!f||null!=l&&null!==(n=l[Dm($)])&&void 0!==n&&null!==(r=n[H])&&void 0!==r&&r[O])&&(!y||null!=l&&null!==(a=l[Dm($)])&&void 0!==a&&null!==(i=a[H])&&void 0!==i&&i[O])?t().createElement(Sm,{charts:P,selectedChartMetrics:M}):t().createElement(xl,null)))};var ry=function(e){var t=e.id,n=e.status,r=e.cb;fetch(fpf_js_object.base_url+"/?rest_route=/fpframework/v1/cpt/"+t+"/"+n,{method:"POST",headers:{"X-WP-Nonce":fpf_js_object.wp_rest_nonce}}).then((function(e){return e.json()})).then((function(e){r(t)}))};const ay=function(e){var n=e.checked,r=e.className,a=e.onToggleEnable,i=e.onToggleDisable;return t().createElement("label",{className:"flex cursor-pointer min-w-[30px] w-[30px] h-[16px] rounded-full ".concat(n?"bg-accent hover:bg-accent-hover p-[3px] justify-end":"bg-white border-[2px] border-solid border-default hover:border-black p-[1px]").concat(r?" "+r:"")},t().createElement("input",{type:"checkbox",className:"hidden",checked:n,onChange:function(){n?i():a()}}),t().createElement("div",{className:"w-[10px] h-[10px] ".concat(n?"bg-white":"bg-default"," rounded-full")}))};var iy=(0,e.memo)((function(e){var t=e.id,n=e.status,r=e.setCampaignWithOpenActionsHandler,a=e.onToggleEnable,i=e.onToggleDisable,o=e.onDeleteCampaign,s=e.onDuplicateCampaign,l=e.campaignEditUrl,c=e.isOpen,u=fbox_admin_js_object.campaigns_item_analytics_url.replace("{{ID}}",t);return React.createElement(React.Fragment,null,React.createElement("div",{className:"flex items-center justify-end gap-[4px]"},React.createElement("a",{href:l,title:fbox_admin_js_object.langs.EDIT_CAMPAIGN,className:"flex align-middle gap-1 no-underline cursor-pointer text-default hover:text-black dark:text-grey-3 dark:hover:text-white"},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_465_8826",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},React.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_465_8826)"},React.createElement("path",{d:"M3.43551 12.6673H4.25986L10.433 6.49422L9.60863 5.66986L3.43551 11.843V12.6673ZM12.5714 5.77116L10.3214 3.54171L11.1907 2.67249C11.3864 2.47677 11.6244 2.37891 11.9047 2.37891C12.1851 2.37891 12.4231 2.47677 12.6188 2.67249L13.4304 3.48401C13.6261 3.67973 13.7274 3.91434 13.7342 4.18784C13.741 4.46134 13.6466 4.69595 13.4509 4.89167L12.5714 5.77116ZM11.8483 6.50447L4.6855 13.6673H2.43555V11.4173L9.59836 4.25451L11.8483 6.50447Z",fill:"currentColor"})))),React.createElement("a",{href:u,title:fbox_admin_js_object.langs.VIEW_CAMPAIGN_ANALYTICS,className:"flex align-middle gap-1 no-underline cursor-pointer text-default hover:text-black dark:text-grey-3 dark:hover:text-white"},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_1151_18540",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},React.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_1151_18540)"},React.createElement("path",{d:"M3.55383 17.5488L2.5 16.4949L9.3519 9.59305L13.3519 13.5931L18.9654 8.04878H16V6.54883H21.5V12.0488H20V9.1026L13.3519 15.7507L9.3519 11.7507L3.55383 17.5488Z",fill:"currentColor"})))),React.createElement("svg",{onClick:function(){return r(t)},className:"text-default hover:text-black dark:text-grey-3 dark:hover:text-white",width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_333_15086",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"25",height:"24"},React.createElement("rect",{x:"0.5",width:"24",height:"24",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_333_15086)"},React.createElement("path",{d:"M6.73066 13.5C6.31818 13.5 5.96506 13.3531 5.67131 13.0593C5.37758 12.7656 5.23071 12.4125 5.23071 12C5.23071 11.5875 5.37758 11.2344 5.67131 10.9406C5.96506 10.6469 6.31818 10.5 6.73066 10.5C7.14316 10.5 7.49628 10.6469 7.79001 10.9406C8.08376 11.2344 8.23064 11.5875 8.23064 12C8.23064 12.4125 8.08376 12.7656 7.79001 13.0593C7.49628 13.3531 7.14316 13.5 6.73066 13.5ZM12.4999 13.5C12.0874 13.5 11.7343 13.3531 11.4405 13.0593C11.1468 12.7656 10.9999 12.4125 10.9999 12C10.9999 11.5875 11.1468 11.2344 11.4405 10.9406C11.7343 10.6469 12.0874 10.5 12.4999 10.5C12.9124 10.5 13.2655 10.6469 13.5592 10.9406C13.853 11.2344 13.9999 11.5875 13.9999 12C13.9999 12.4125 13.853 12.7656 13.5592 13.0593C13.2655 13.3531 12.9124 13.5 12.4999 13.5ZM18.2691 13.5C17.8566 13.5 17.5035 13.3531 17.2098 13.0593C16.916 12.7656 16.7691 12.4125 16.7691 12C16.7691 11.5875 16.916 11.2344 17.2098 10.9406C17.5035 10.6469 17.8566 10.5 18.2691 10.5C18.6816 10.5 19.0347 10.6469 19.3285 10.9406C19.6222 11.2344 19.7691 11.5875 19.7691 12C19.7691 12.4125 19.6222 12.7656 19.3285 13.0593C19.0347 13.3531 18.6816 13.5 18.2691 13.5Z",fill:"currentColor"})))),React.createElement("ul",{className:"".concat(c?"block":"hidden"," absolute top-[20px] right-0 z-10 bg-white dark:bg-[#343d43] dark:text-white rounded-[4px] shadow-box text-base")},"publish"!==n&&React.createElement("li",{onClick:function(){return a(t)},className:"p-1 flex align-middle gap-1 rounded-t-[4px] m-0 hover:bg-pale-blue cursor-pointer dark:hover:text-black"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_465_8820",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},React.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_465_8820)"},React.createElement("path",{d:"M8 8.00065C7.81111 8.00065 7.65278 7.93676 7.525 7.80898C7.39722 7.68121 7.33333 7.52287 7.33333 7.33398V2.00065C7.33333 1.81176 7.39722 1.65343 7.525 1.52565C7.65278 1.39787 7.81111 1.33398 8 1.33398C8.18889 1.33398 8.34722 1.39787 8.475 1.52565C8.60278 1.65343 8.66667 1.81176 8.66667 2.00065V7.33398C8.66667 7.52287 8.60278 7.68121 8.475 7.80898C8.34722 7.93676 8.18889 8.00065 8 8.00065ZM8 14.0007C7.16667 14.0007 6.38611 13.8423 5.65833 13.5257C4.93056 13.209 4.29722 12.7812 3.75833 12.2423C3.21944 11.7034 2.79167 11.0701 2.475 10.3423C2.15833 9.61454 2 8.83398 2 8.00065C2 7.32287 2.11111 6.66454 2.33333 6.02565C2.55556 5.38676 2.87778 4.80065 3.3 4.26732C3.42222 4.11176 3.57778 4.03676 3.76667 4.04232C3.95556 4.04787 4.12222 4.12287 4.26667 4.26732C4.38889 4.38954 4.44444 4.53954 4.43333 4.71732C4.42222 4.8951 4.36111 5.06176 4.25 5.21732C3.95 5.61732 3.72222 6.05621 3.56667 6.53398C3.41111 7.01176 3.33333 7.50065 3.33333 8.00065C3.33333 9.30065 3.78611 10.4034 4.69167 11.309C5.59722 12.2145 6.7 12.6673 8 12.6673C9.3 12.6673 10.4028 12.2145 11.3083 11.309C12.2139 10.4034 12.6667 9.30065 12.6667 8.00065C12.6667 7.48954 12.5917 6.99232 12.4417 6.50898C12.2917 6.02565 12.0556 5.58398 11.7333 5.18398C11.6222 5.03954 11.5611 4.88121 11.55 4.70898C11.5389 4.53676 11.5944 4.38954 11.7167 4.26732C11.85 4.13398 12.0111 4.06454 12.2 4.05898C12.3889 4.05343 12.5444 4.12287 12.6667 4.26732C13.1 4.80065 13.4306 5.38398 13.6583 6.01732C13.8861 6.65065 14 7.31176 14 8.00065C14 8.83398 13.8417 9.61454 13.525 10.3423C13.2083 11.0701 12.7806 11.7034 12.2417 12.2423C11.7028 12.7812 11.0694 13.209 10.3417 13.5257C9.61389 13.8423 8.83333 14.0007 8 14.0007Z",fill:"currentColor"}))),fbox_admin_js_object.langs.ACTIVATE),"publish"===n&&React.createElement("li",{onClick:function(){return i(t)},className:"p-1 flex align-middle gap-1 m-0 hover:bg-pale-blue cursor-pointer dark:hover:text-black"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_465_8820",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},React.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_465_8820)"},React.createElement("path",{d:"M8 8.00065C7.81111 8.00065 7.65278 7.93676 7.525 7.80898C7.39722 7.68121 7.33333 7.52287 7.33333 7.33398V2.00065C7.33333 1.81176 7.39722 1.65343 7.525 1.52565C7.65278 1.39787 7.81111 1.33398 8 1.33398C8.18889 1.33398 8.34722 1.39787 8.475 1.52565C8.60278 1.65343 8.66667 1.81176 8.66667 2.00065V7.33398C8.66667 7.52287 8.60278 7.68121 8.475 7.80898C8.34722 7.93676 8.18889 8.00065 8 8.00065ZM8 14.0007C7.16667 14.0007 6.38611 13.8423 5.65833 13.5257C4.93056 13.209 4.29722 12.7812 3.75833 12.2423C3.21944 11.7034 2.79167 11.0701 2.475 10.3423C2.15833 9.61454 2 8.83398 2 8.00065C2 7.32287 2.11111 6.66454 2.33333 6.02565C2.55556 5.38676 2.87778 4.80065 3.3 4.26732C3.42222 4.11176 3.57778 4.03676 3.76667 4.04232C3.95556 4.04787 4.12222 4.12287 4.26667 4.26732C4.38889 4.38954 4.44444 4.53954 4.43333 4.71732C4.42222 4.8951 4.36111 5.06176 4.25 5.21732C3.95 5.61732 3.72222 6.05621 3.56667 6.53398C3.41111 7.01176 3.33333 7.50065 3.33333 8.00065C3.33333 9.30065 3.78611 10.4034 4.69167 11.309C5.59722 12.2145 6.7 12.6673 8 12.6673C9.3 12.6673 10.4028 12.2145 11.3083 11.309C12.2139 10.4034 12.6667 9.30065 12.6667 8.00065C12.6667 7.48954 12.5917 6.99232 12.4417 6.50898C12.2917 6.02565 12.0556 5.58398 11.7333 5.18398C11.6222 5.03954 11.5611 4.88121 11.55 4.70898C11.5389 4.53676 11.5944 4.38954 11.7167 4.26732C11.85 4.13398 12.0111 4.06454 12.2 4.05898C12.3889 4.05343 12.5444 4.12287 12.6667 4.26732C13.1 4.80065 13.4306 5.38398 13.6583 6.01732C13.8861 6.65065 14 7.31176 14 8.00065C14 8.83398 13.8417 9.61454 13.525 10.3423C13.2083 11.0701 12.7806 11.7034 12.2417 12.2423C11.7028 12.7812 11.0694 13.209 10.3417 13.5257C9.61389 13.8423 8.83333 14.0007 8 14.0007Z",fill:"currentColor"}))),fbox_admin_js_object.langs.DEACTIVATE),React.createElement("li",{onClick:function(){return s(t)},className:"p-1 flex align-middle gap-1 m-0 hover:bg-pale-blue cursor-pointer dark:hover:text-black"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_465_8832",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},React.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_465_8832)"},React.createElement("path",{d:"M9.49969 10.4365H10.4997V8.50062H12.4356V7.50065H10.4997V5.56475H9.49969V7.50065H7.56379V8.50062H9.49969V10.4365ZM3.99967 13.3083C2.89113 12.8861 2.00289 12.1919 1.33496 11.2256C0.666991 10.2594 0.333008 9.18439 0.333008 8.00064C0.333008 6.81688 0.66698 5.74188 1.33492 4.77565C2.00289 3.80942 2.89114 3.11519 3.99967 2.69297V3.80063C3.17745 4.18952 2.52745 4.76175 2.04967 5.5173C1.5719 6.27286 1.33301 7.10064 1.33301 8.00064C1.33301 8.90064 1.5719 9.72841 2.04967 10.484C2.52745 11.2395 3.17745 11.8117 3.99967 12.2006V13.3083ZM10 13.6673C9.21347 13.6673 8.4766 13.5186 7.78942 13.2211C7.10225 12.9237 6.5031 12.5194 5.99199 12.0083C5.48089 11.4972 5.07662 10.8982 4.77919 10.2113C4.48175 9.52432 4.33302 8.78757 4.33302 8.001C4.33302 7.21444 4.48175 6.47756 4.77919 5.79039C5.07662 5.10321 5.48089 4.50406 5.99199 3.99295C6.5031 3.48185 7.10212 3.07758 7.78906 2.78015C8.47599 2.48271 9.21274 2.33398 9.99931 2.33398C10.7859 2.33398 11.5227 2.48271 12.2099 2.78015C12.8971 3.07758 13.4962 3.48185 14.0074 3.99295C14.5185 4.50406 14.9227 5.10308 15.2202 5.79002C15.5176 6.47695 15.6663 7.2137 15.6663 8.00027C15.6663 8.78684 15.5176 9.52371 15.2202 10.2109C14.9227 10.8981 14.5185 11.4972 14.0074 12.0083C13.4962 12.5194 12.8972 12.9237 12.2103 13.2211C11.5234 13.5186 10.7866 13.6673 10 13.6673ZM9.99967 12.6673C11.2997 12.6673 12.4025 12.2145 13.308 11.309C14.2136 10.4034 14.6663 9.30064 14.6663 8.00064C14.6663 6.70063 14.2136 5.59786 13.308 4.6923C12.4025 3.78675 11.2997 3.33397 9.99967 3.33397C8.69967 3.33397 7.5969 3.78675 6.69134 4.6923C5.78579 5.59786 5.33301 6.70063 5.33301 8.00064C5.33301 9.30064 5.78579 10.4034 6.69134 11.309C7.5969 12.2145 8.69967 12.6673 9.99967 12.6673Z",fill:"currentColor"}))),fbox_admin_js_object.langs.DUPLICATE),React.createElement("li",{onClick:function(){return o(t)},className:"p-1 flex align-middle gap-1 m-0 text-custom-red hover:bg-custom-red hover:text-white cursor-pointer rounded-b-[4px]"},React.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_465_8823",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"16",height:"16"},React.createElement("rect",{width:"16",height:"16",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_465_8823)"},React.createElement("path",{d:"M4.8718 13.6665C4.53932 13.6665 4.25535 13.5488 4.01988 13.3133C3.78441 13.0778 3.66667 12.7939 3.66667 12.4614V3.99987H3V2.99989H5.99998V2.41016H9.99998V2.99989H13V3.99987H12.3333V12.4614C12.3333 12.7981 12.2166 13.0832 11.9833 13.3165C11.75 13.5499 11.4649 13.6665 11.1282 13.6665H4.8718ZM11.3333 3.99987H4.66665V12.4614C4.66665 12.5212 4.68588 12.5704 4.72435 12.6088C4.76282 12.6473 4.81197 12.6665 4.8718 12.6665H11.1282C11.1795 12.6665 11.2265 12.6452 11.2692 12.6024C11.3119 12.5597 11.3333 12.5127 11.3333 12.4614V3.99987ZM6.26923 11.3332H7.26922V5.33321H6.26923V11.3332ZM8.73075 11.3332H9.73073V5.33321H8.73075V11.3332Z",fill:"currentColor"}))),fbox_admin_js_object.langs.DELETE)))}));const oy=iy;var sy=(0,e.memo)((function(e){var t=e.id,n=e.label,r=e.status,a=e.views,i=e.conversions,o=e.conversionrate,s=e.disabledCampaigns,l=e.campaignWithOpenActions,c=e.setCampaignWithOpenActionsHandler,u=e.onToggleEnable,f=e.onToggleDisable,d=e.onDuplicateCampaign,h=e.onDeleteCampaign,p=fbox_admin_js_object.campaigns_item_edit_url.replace("{{ID}}",t);return React.createElement("tr",{className:"align-middle".concat(-1!==s.indexOf(t)?" pointer-events-none opacity-30":"")},React.createElement("td",{className:"py-[12px] inline-flex items-center gap-1 text-default dark:text-white"},React.createElement(ay,{checked:"publish"===r,onToggleEnable:function(){return u(t)},onToggleDisable:function(){return f(t)}}),n),React.createElement("td",{className:"px-[4px] align-middle text-right font-bold text-metric-conversions"},React.createElement("div",{className:"inline-flex items-center"},React.createElement("div",{className:"relative group"},ym({num:i,showSuffix:!0}),React.createElement(Pm,null,fbox_admin_js_object.langs.NUMBER_OF_CONVERSIONS_IN_THE_LAST_30_DAYS)))),React.createElement("td",{className:"px-[4px] align-middle text-right font-bold text-metric-conversion-rate"},React.createElement("div",{className:"inline-flex items-center"},React.createElement("div",{className:"relative group"},ym({num:o,decimalPoints:!0}),"%",React.createElement(Pm,null,fbox_admin_js_object.langs.CONVERSION_RATE_IN_THE_LAST_30_DAYS)))),React.createElement("td",{className:"px-[4px] align-middle text-right font-bold text-metric-views"},React.createElement("div",{className:"inline-flex items-center"},React.createElement("div",{className:"relative group"},ym({num:a,showSuffix:!0}),React.createElement(Pm,null,fbox_admin_js_object.langs.NUMBER_OF_VIEWS_IN_THE_LAST_30_DAYS)))),React.createElement("td",{className:"relative px-[4px] text-right cursor-pointer"},React.createElement(oy,{id:t,status:r,setCampaignWithOpenActionsHandler:c,onToggleEnable:u,onToggleDisable:f,onDuplicateCampaign:d,onDeleteCampaign:h,campaignEditUrl:p,isOpen:l===t})))}));const ly=sy;var cy=(0,e.memo)((function(t){var n=t.campaigns,r=t.disabledCampaigns,a=t.onToggleEnable,i=t.onToggleDisable,o=t.onDuplicateCampaign,s=t.onDeleteCampaign,l=t.campaignWithOpenActions,c=t.setCampaignWithOpenActions,u=(0,e.useCallback)((function(e){c(l!==e&&e)}),[l]);return React.createElement("table",null,React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{className:"text-left font-normal text-grey-1 text-[12px]"},fbox_admin_js_object.langs.CAMPAIGN),React.createElement("th",{className:"px-[4px] text-right font-normal text-grey-1 text-[12px] w-[38px]"},fbox_admin_js_object.langs.CONVERSIONS),React.createElement("th",{className:"px-[4px] text-right font-normal text-grey-1 text-[12px] w-[100px]"},fbox_admin_js_object.langs.CONVERSION_RATE),React.createElement("th",{className:"px-[4px] text-right font-normal text-grey-1 text-[12px] w-[66px]"},fbox_admin_js_object.langs.VIEWS),React.createElement("th",{className:"px-[4px] text-right font-normal text-grey-1 text-[12px] w-[97px]"},fbox_admin_js_object.langs.ACTIONS))),React.createElement("tbody",null,Object.keys(n).map((function(e,t){var c=n[e].id,f=n[e].label,d=n[e].status,h=n[e].totals.views,p=n[e].totals.conversions,v=n[e].totals.conversionrate;return React.createElement(ly,{key:t,id:c,label:f,status:d,views:h,conversions:p,conversionrate:v,disabledCampaigns:r,campaignWithOpenActions:l,setCampaignWithOpenActionsHandler:u,onToggleEnable:a,onToggleDisable:i,onDuplicateCampaign:o,onDeleteCampaign:s})}))))}));const uy=cy;function fy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||hy(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dy(e){return function(e){if(Array.isArray(e))return py(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hy(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hy(e,t){if(e){if("string"==typeof e)return py(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?py(e,t):void 0}}function py(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function my(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vy(Object(n),!0).forEach((function(t){yy(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var gy=function(e,t){switch(t.type){case"SET_CAMPAIGNS":return my(my({},e),{},{campaigns:t.payload});case"ENABLE_CAMPAIGN":var n=dy(e.campaigns);return n=n.map((function(e,n){return e.id==t.payload?my(my({},e),{},{status:"publish"}):e})),my(my({},e),{},{campaigns:n});case"DISABLE_CAMPAIGN":var r=dy(e.campaigns);return r=r.map((function(e,n){return e.id==t.payload?my(my({},e),{},{status:"draft"}):e})),my(my({},e),{},{campaigns:r});default:throw Error("Unknown action: "+t.type)}};function by(){var n,r,a=fy((0,e.useState)(!1),2),i=a[0],o=a[1],s=fy((0,e.useState)([]),2),l=s[0],c=s[1],u=fy((0,e.useReducer)(gy,{campaigns:null}),2),f=u[0],d=u[1],h=t().createRef();Gs(h,(function(){o(!1)}));var p=function(e){c((function(t){return t.includes(e)?t:[].concat(dy(t),[e])}))},v=function(e){c((function(t){return t.filter((function(t){return t!==e}))}))},m=function(e){v(e),d({type:"ENABLE_CAMPAIGN",payload:e})},y=function(e){v(e),d({type:"DISABLE_CAMPAIGN",payload:e})},g=function(e){var t=Xs("last_4_weeks"),n=t.start_date,r=t.end_date,a=new FormData;a.append("nonce",fpf_js_object.nonce),a.append("action","firebox_analytics_get_campaigns"),a.append("start_date",n),a.append("end_date",r),fetch(fpf_js_object.ajax_url,{method:"POST",body:a}).then((function(e){return e.json()})).then((function(t){d({type:"SET_CAMPAIGNS",payload:t}),e&&e()}))};if(Us((function(){g()}),h),null==f||null===(n=f.campaigns)||void 0===n||!n.permission_denied)return t().createElement("div",{className:"flex flex-col gap-3 bg-white dark:bg-dark-1 rounded p-3",ref:h},t().createElement("div",{className:"flex items-center justify-between gap-1"},t().createElement("h2",{className:"text-[20px] text-default dark:text-white"},fbox_admin_js_object.langs.RECENT_CAMPAIGNS),f.campaigns&&(null==f||null===(r=f.campaigns)||void 0===r?void 0:r.length)>0&&t().createElement("a",{href:fbox_admin_js_object.campaigns_list_url,className:"inline-flex items-center justify-center gap-1 text-default no-underline hover:text-black dark:text-white dark:hover:text-gray-300"},fbox_admin_js_object.langs.VIEW_ALL)),null===f.campaigns?t().createElement("div",{className:"flex flex-col gap-1"},t().createElement("div",{className:"animate-pulse h-1 w-full bg-slate-200 dark:bg-slate-700 rounded"}),t().createElement("div",{className:"flex flex-col gap-2"},t().createElement("div",{className:"animate-pulse h-3 w-full bg-slate-200 dark:bg-slate-700 rounded"}),t().createElement("div",{className:"animate-pulse h-3 w-full bg-slate-200 dark:bg-slate-700 rounded"}),t().createElement("div",{className:"animate-pulse h-3 w-full bg-slate-200 dark:bg-slate-700 rounded"}),t().createElement("div",{className:"animate-pulse h-3 w-full bg-slate-200 dark:bg-slate-700 rounded"}),t().createElement("div",{className:"animate-pulse h-3 w-full bg-slate-200 dark:bg-slate-700 rounded"}))):f.campaigns&&0===f.campaigns.length?t().createElement("div",{className:"flex flex-col gap-2 p-5 items-center justify-center dark:text-white"},t().createElement("svg",{width:"80",height:"80",viewBox:"0 0 80 80",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("circle",{cx:"40",cy:"40",r:"36",fill:"#D1D4F4"}),t().createElement("path",{opacity:"0.2",fillRule:"evenodd",clipRule:"evenodd",d:"M70 20.0932V59.9068C68.253 62.5343 66.17 64.9191 63.8124 67H16.1876C11.6027 62.9533 8.05644 57.7569 6 51.862V28.138C7.4308 24.0365 9.58278 20.2732 12.304 17H67.696C68.5172 17.9878 69.2866 19.0203 70 20.0932Z",fill:"#41495B"}),t().createElement("path",{d:"M8.5 15.9565C8.5 15.7045 8.70436 15.5 8.95677 15.5H70.0432C70.2956 15.5 70.5 15.7045 70.5 15.9565V64.0435C70.5 64.2955 70.2956 64.5 70.0432 64.5H8.95677C8.70436 64.5 8.5 64.2955 8.5 64.0435V15.9565Z",fill:"#F8F9FE",stroke:"#E1E1E1"}),t().createElement("rect",{width:"0.624868",height:"3.74921",rx:"0.312434",transform:"matrix(0.708097 0.706116 -0.708097 0.706116 68.5977 17.4707)",fill:"#999999"}),t().createElement("rect",{width:"0.624866",height:"3.7492",rx:"0.312433",transform:"matrix(-0.708094 0.706119 -0.708093 -0.706119 69.0396 20.1191)",fill:"#999999"}),t().createElement("rect",{x:"41",y:"53",width:"20",height:"6",rx:"3",fill:"#2438E9"}),t().createElement("rect",{x:"18",y:"53",width:"20",height:"6",rx:"3",fill:"#D6D6D6"}),t().createElement("path",{d:"M18 29H62M18 31.5H62M18 34H62M18 36.5H62M18 39H62M18 41.5H62M18 44H47.9564",stroke:"#999999",strokeLinecap:"round"})),t().createElement("div",null,fbox_admin_js_object.langs.YOU_HAVENT_CREATED_ANY_CAMPAIGNS_YET),t().createElement("a",{href:fbox_admin_js_object.campaigns_item_new_url,className:"fpf-open-library-modal rounded bg-accent text-white no-underline px-2 py-1 flex items-center justify-center gap-1 hover:bg-accent-hover"},t().createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("mask",{id:"mask0_498_1527",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},t().createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),t().createElement("g",{mask:"url(#mask0_498_1527)"},t().createElement("path",{d:"M11.25 16.75H12.75V12.75H16.75V11.25H12.75V7.25H11.25V11.25H7.25V12.75H11.25V16.75ZM12.0016 21.5C10.6877 21.5 9.45268 21.2506 8.29655 20.752C7.1404 20.2533 6.13472 19.5765 5.2795 18.7217C4.42427 17.8669 3.74721 16.8616 3.24833 15.706C2.74944 14.5504 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45268 3.248 8.29655C3.74667 7.1404 4.42342 6.13472 5.27825 5.2795C6.1331 4.42427 7.13834 3.74721 8.29398 3.24833C9.44959 2.74944 10.6844 2.5 11.9983 2.5C13.3122 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8652 4.42342 18.7205 5.27825C19.5757 6.1331 20.2527 7.13834 20.7516 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5765 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0016 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76664 3.99998 7.87498 4.77498 6.32498 6.32498C4.77498 7.87498 3.99998 9.76664 3.99998 12C3.99998 14.2333 4.77498 16.125 6.32498 17.675C7.87498 19.225 9.76664 20 12 20Z",fill:"white"}))),fbox_admin_js_object.langs.NEW_CAMPAIGN)):t().createElement(uy,{campaigns:f.campaigns,disabledCampaigns:l,onToggleEnable:function(e){p(e),ry({id:e,status:"publish",cb:m})},onToggleDisable:function(e){p(e),ry({id:e,status:"draft",cb:y})},onDuplicateCampaign:function(e){p(e);var t=new FormData;t.append("nonce",fpf_js_object.nonce),t.append("action","firebox_duplicate_campaign"),t.append("id",e),fetch(fpf_js_object.ajax_url,{method:"POST",body:t}).then((function(e){return e.json()})).then((function(t){g((function(){v(e)}))}))},onDeleteCampaign:function(e){if(confirm(fbox_admin_js_object.langs.ARE_YOU_SURE_YOU_WANT_TO_DELETE_THIS_CAMPAIGN)){p(e);var t=new FormData;t.append("nonce",fpf_js_object.nonce),t.append("action","firebox_delete_campaign"),t.append("id",e),fetch(fpf_js_object.ajax_url,{method:"POST",body:t}).then((function(e){return e.json()})).then((function(t){g((function(){v(e)}))}))}},campaignWithOpenActions:i,setCampaignWithOpenActions:o}))}const xy=t().memo(by);function _y(e,t){if(e){if("string"==typeof e)return wy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wy(e,t):void 0}}function wy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ky=(0,e.memo)((function(){var n=t().createRef(),r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||_y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)(null),2),a=r[0],i=r[1];return Us((function(){var e;(e=new FormData).append("nonce",fpf_js_object.nonce),e.append("action","firebox_analytics_get_trending_templates"),fetch(fpf_js_object.ajax_url,{method:"POST",body:e}).then((function(e){return e.json()})).then((function(e){i(e)}))}),n),t().createElement("div",{className:"flex flex-col gap-3 bg-white dark:bg-dark-1 rounded p-3",ref:n},t().createElement("div",{className:"flex items-center justify-between gap-1"},t().createElement("h2",{className:"text-[20px] text-default dark:text-white"},fbox_admin_js_object.langs.TRENDING_TEMPLATES),(null==a?void 0:a.length)&&t().createElement("a",{href:"",className:"fpf-open-library-modal inline-flex items-center justify-center gap-1 text-default no-underline hover:text-black dark:text-white dark:hover:text-gray-300"},fbox_admin_js_object.langs.VIEW_ALL)),null===a?t().createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2 md:gap-3"},function(e){return function(e){if(Array.isArray(e))return wy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_y(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Array(6).keys()).map((function(e,n){return t().createElement("div",{className:"animate-pulse flex flex-col gap-1",key:n},t().createElement("div",{className:"w-full h-[187px] bg-slate-200 dark:bg-slate-700 rounded"}),t().createElement("div",{className:"w-full h-2 bg-slate-200 dark:bg-slate-700 rounded"}))}))):a&&0===(null==a?void 0:a.length)?t().createElement("div",{className:"text-center py-5 dark:text-white"},fbox_admin_js_object.langs.THERE_ARE_NO_TRENDING_TEMPLATES_TO_SHOW):t().createElement("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-2 md:gap-3"},a.map((function(e,n){return t().createElement("div",{className:"fpf-library-item flex flex-wrap cursor-pointer gap-[4px]",key:n,"data-id":a[n].id},t().createElement("img",{src:a[n].fields.full_image,className:"w-full inline-block rounded-[4px] fpf-modal-opener","data-fpf-modal":"#fpf-library-preview-popup"}),t().createElement("div",{className:"template-label text-base dark:text-white line-clamp-2 h-[37px] fpf-modal-opener","data-fpf-modal":"#fpf-library-preview-popup"},a[n].title),t().createElement("div",{className:"hidden fpf-library-item-actions"},t().createElement("a",{href:"#",className:"fpf-library-item-insert-btn","data-template-id":a[n].id},t().createElement("svg",{className:"icon",width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t().createElement("path",{d:"M2 10L2 13L14 13L14 10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),t().createElement("path",{d:"M8.5 1C8.5 0.723858 8.27614 0.5 8 0.5C7.72386 0.5 7.5 0.723858 7.5 1L8.5 1ZM7.64645 10.3536C7.84171 10.5488 8.15829 10.5488 8.35355 10.3536L11.5355 7.17157C11.7308 6.97631 11.7308 6.65973 11.5355 6.46447C11.3403 6.2692 11.0237 6.2692 10.8284 6.46447L8 9.29289L5.17157 6.46447C4.97631 6.2692 4.65973 6.2692 4.46447 6.46447C4.2692 6.65973 4.2692 6.97631 4.46447 7.17157L7.64645 10.3536ZM7.5 1L7.5 10L8.5 10L8.5 1L7.5 1Z",fill:"currentColor"})),t().createElement("svg",{className:"icon loading",width:"16",height:"16",xmlns:"http://www.w3.org/2000/svg",style:{shapeRendering:"auto"},viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid"},t().createElement("circle",{cx:"50",cy:"50",fill:"none",stroke:"currentColor",strokeWidth:"10",r:"40",strokeDasharray:"160.22122533307947 55.40707511102649"},t().createElement("animateTransform",{attributeName:"transform",type:"rotate",repeatCount:"indefinite",dur:"1s",values:"0 50 50;360 50 50",keyTimes:"0;1"}))),t().createElement("span",{className:"full-label"},fbox_admin_js_object.langs.INSERT_TEMPLATE),t().createElement("span",{className:"label"},fbox_admin_js_object.langs.INSERT))))}))))}));const Sy=ky;function Cy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Oy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oy(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Dy=(0,e.createContext)(),Ay=function(n){var r=n.children,a=Cy((0,e.useState)({current:{views:null,conversions:null,conversionrate:null,revenue:null,view_through_revenue:null,conversion_through_revenue:null},previous:{views:null,conversions:null,conversionrate:null,revenue:null,view_through_revenue:null,conversion_through_revenue:null}}),2),i=a[0],o=a[1],s=Cy((0,e.useState)(!0),2),l=s[0],c=s[1];return t().createElement(Dy.Provider,{value:{overallData:i,setOverallData:o,isLoading:l,setIsLoading:c}},r)};function My(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}const Ey=function(t){var n=t._title,r=void 0===n?fbox_admin_js_object.langs.OVERVIEW:n,a=t.call_to_action,i=void 0===a||a,o=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return My(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?My(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useState)(r),2),s=o[0],l=o[1],c=al().campaign,u=Em(),f=u.components,d=u.loading;return(0,e.useEffect)((function(){l(null!=c&&c.post_title?c.post_title:r)}),[c]),React.createElement("div",{className:"flex items-center justify-between gap-1 flex-wrap"},React.createElement("h1",{className:"mb-0 text-default text-[32px] dark:text-white truncate md:max-w-[800px] fp-admin-page-title"},s),React.createElement("div",{className:"flex items-center gap-4"},!d&&(null==f?void 0:f.CompactRevenueROI)&&React.createElement(f.CompactRevenueROI,null),c?null:i&&React.createElement("a",{href:"#",className:"fpf-open-library-modal rounded bg-accent text-sm text-white no-underline px-2 py-1 flex items-center justify-center gap-1 hover:bg-accent-hover"},React.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},React.createElement("mask",{id:"mask0_498_1527",style:{maskType:"alpha"},maskUnits:"userSpaceOnUse",x:"0",y:"0",width:"24",height:"24"},React.createElement("rect",{width:"24",height:"24",fill:"#D9D9D9"})),React.createElement("g",{mask:"url(#mask0_498_1527)"},React.createElement("path",{d:"M11.25 16.75H12.75V12.75H16.75V11.25H12.75V7.25H11.25V11.25H7.25V12.75H11.25V16.75ZM12.0016 21.5C10.6877 21.5 9.45268 21.2506 8.29655 20.752C7.1404 20.2533 6.13472 19.5765 5.2795 18.7217C4.42427 17.8669 3.74721 16.8616 3.24833 15.706C2.74944 14.5504 2.5 13.3156 2.5 12.0017C2.5 10.6877 2.74933 9.45268 3.248 8.29655C3.74667 7.1404 4.42342 6.13472 5.27825 5.2795C6.1331 4.42427 7.13834 3.74721 8.29398 3.24833C9.44959 2.74944 10.6844 2.5 11.9983 2.5C13.3122 2.5 14.5473 2.74933 15.7034 3.248C16.8596 3.74667 17.8652 4.42342 18.7205 5.27825C19.5757 6.1331 20.2527 7.13834 20.7516 8.29398C21.2505 9.44959 21.5 10.6844 21.5 11.9983C21.5 13.3122 21.2506 14.5473 20.752 15.7034C20.2533 16.8596 19.5765 17.8652 18.7217 18.7205C17.8669 19.5757 16.8616 20.2527 15.706 20.7516C14.5504 21.2505 13.3156 21.5 12.0016 21.5ZM12 20C14.2333 20 16.125 19.225 17.675 17.675C19.225 16.125 20 14.2333 20 12C20 9.76664 19.225 7.87498 17.675 6.32498C16.125 4.77498 14.2333 3.99998 12 3.99998C9.76664 3.99998 7.87498 4.77498 6.32498 6.32498C4.77498 7.87498 3.99998 9.76664 3.99998 12C3.99998 14.2333 4.77498 16.125 6.32498 17.675C7.87498 19.225 9.76664 20 12 20Z",fill:"white"}))),fbox_admin_js_object.langs.NEW_CAMPAIGN)))};function jy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Py(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?jy(Object(n),!0).forEach((function(t){Iy(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Iy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ly=function(e,t){switch(t.type){case"SET_CAMPAIGN":case"SET_CAMPAIGN_DATA":return Py(Py({},e),{},{campaign:t.payload});case"SET_DATE_PERIOD":var n=Py(Py({},e),{},{date_period:t.payload});return"custom"!==t.payload&&(n.custom_date_period=[null,null]),n;case"SET_CUSTOM_DATE_PERIOD":return Py(Py({},e),{},{custom_date_period:t.payload});case"CLEAR_SELECTED_CAMPAIGN":return Py(Py({},e),{},{selected_campaign:null,campaign:null});case"SET_SELECTED_CAMPAIGN":return Py(Py({},e),{},{selected_campaign:t.payload});default:throw Error("Unknown action: "+t.type)}};function Ry(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ny,Ty=localStorage.getItem("firebox_analytics_date_period")||"month_to_date",Fy={yesterday:"today",last_30_days:"last_4_weeks",last_week:"last_7_days",last_month:"month_to_date"}[Ny=Ty]||Ny;Fy!==Ty&&localStorage.setItem("firebox_analytics_date_period",Fy);var zy=localStorage.getItem("firebox_analytics_custom_date_period"),Vy=[];if(zy)try{var Hy=JSON.parse(zy);Hy&&Array.isArray(Hy)&&2===Hy.length&&Hy[0]&&Hy[1]&&(Vy=Hy.map((function(e){return new Date(e)})))}catch(e){console.warn("Invalid custom date period in localStorage, ignoring"),localStorage.removeItem("firebox_analytics_custom_date_period")}var Wy={date_period:Fy,custom_date_period:Vy,selected_campaign:null,campaigns:null},$y=function(n){var r=n.children,a=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){s=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ry(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ry(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}((0,e.useReducer)(Ly,Wy),2),i=a[0],o=a[1];return t().createElement(nl.Provider,{value:i},t().createElement(rl.Provider,{value:o},r))};function By(){return t().createElement(t().Fragment,null,t().createElement($y,null,t().createElement(Ay,null,t().createElement(Ey,null),t().createElement(kl,{showCampaignDropdown:!1}),t().createElement(ny,null))),t().createElement(xy,null),t().createElement(Sy,null))}(0,r.s)(document.querySelector("#fpf-analytics-dashboard")).render(t().createElement(By,null))})()})();

Anon7 - 2022
AnonSec Team