text: /*!
   * Chart.js v3.0.0-alpha.2
   * https://www.chartjs.org
   * (c) 2020 Chart.js Contributors
   * Released under the MIT License
   */
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Chart=e()}(this,(function(){"use strict";function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function e(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}function i(){return(i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var a="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;var o=new(function(){function t(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}var e=t.prototype;return e._notify=function(t,e,i,n){var r=e.listeners[n]||[],a=e.duration;r.forEach((function(n){return n({chart:t,numSteps:a,currentStep:Math.min(i-e.start,a)})}))},e._refresh=function(){var t=this;t._request||(t._running=!0,t._request=a.call(window,(function(){t._update(),t._request=null,t._running&&t._refresh()})))},e._update=function(){var t=this,e=Date.now(),i=0;t._charts.forEach((function(n,r){if(n.running&&n.items.length){for(var a,o=n.items,s=o.length-1,l=!1;s>=0;--s)(a=o[s])._active?(a.tick(e),l=!0):(o[s]=o[o.length-1],o.pop());l&&(r.draw(),t._notify(r,n,e,"progress")),r.options.animation.debug&&function(t,e,i,n){var r=1e3/(i-n)|0,a=t.ctx;a.save(),a.clearRect(0,0,50,24),a.fillStyle="black",a.textAlign="right",e&&(a.fillText(e,50,8),a.fillText(r+" fps",50,18)),a.restore()}(r,o.length,e,t._lastDate),o.length||(n.running=!1,t._notify(r,n,e,"complete")),i+=o.length}})),t._lastDate=e,0===i&&(t._running=!1)},e._getAnims=function(t){var e=this._charts,i=e.get(t);return i||(i={running:!1,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i},e.listen=function(t,e,i){this._getAnims(t).listeners[e].push(i)},e.add=function(t,e){var i;e&&e.length&&(i=this._getAnims(t).items).push.apply(i,e)},e.has=function(t){return this._getAnims(t).items.length>0},e.start=function(t){var e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((function(t,e){return Math.max(t,e._duration)}),0),this._refresh())},e.running=function(t){if(!this._running)return!1;var e=this._charts.get(t);return!!(e&&e.running&&e.items.length)},e.stop=function(t){var e=this._charts.get(t);if(e&&e.items.length){for(var i=e.items,n=i.length-1;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}},e.remove=function(t){return this._charts.delete(t)},t}());function s(){}var l,c=(l=0,function(){return l++});function u(t){return null==t}function h(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)}function d(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}var f=function(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)};function p(t,e){return void 0===t?e:t}function g(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function v(t,e,i,n){var r,a,o;if(h(t))if(a=t.length,n)for(r=a-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<a;r++)e.call(i,t[r],r);else if(d(t))for(a=(o=Object.keys(t)).length,r=0;r<a;r++)e.call(i,t[o[r]],o[r])}function m(t,e){var i,n,r,a;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],a=e[i],r.datasetIndex!==a.datasetIndex||r.index!==a.index)return!1;return!0}function b(t){if(h(t))return t.map(b);if(d(t)){for(var e=Object.create(t),i=Object.keys(t),n=i.length,r=0;r<n;++r)e[i[r]]=b(t[i[r]]);return e}return t}function x(t,e,i,n){var r=e[t],a=i[t];d(r)&&d(a)?y(r,a,n):e[t]=b(a)}function y(t,e,i){var n=h(e)?e:[e],r=n.length;if(!d(t))return t;for(var a=(i=i||{}).merger||x,o=0;o<r;++o)if(d(e=n[o]))for(var s=Object.keys(e),l=0,c=s.length;l<c;++l)a(s[l],t,e,i);return t}function _(t,e){return y(t,e,{merger:M})}function M(t,e,i){var n=e[t],r=i[t];d(n)&&d(r)?_(n,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=b(r))}function w(t,e){if(e.length<3)return t[e];for(var i=e.split("."),n=0,r=i.length;n<r;++n){var a=i[n];if(!(a in t))return;t=t[a]}return t}function k(t){return t.charAt(0).toUpperCase()+t.slice(1)}var P=Object.freeze({__proto__:null,noop:s,uid:c,isNullOrUndef:u,isArray:h,isObject:d,isFinite:f,valueOrDefault:p,callback:g,each:v,_elementsEqual:m,clone:b,_merger:x,merge:y,mergeIf:_,_mergerIf:M,_deprecated:function(t,e,i,n){void 0!==e&&console.warn(t+': "'+i+'" is deprecated. Please use "'+n+'" instead')},resolveObjectKey:w,_capitalize:k});function S(t,e){if(!e)return t;for(var i=e.split("."),n=0,r=i.length;n<r;++n){var a=i[n];t=t[a]||(t[a]={})}return t}var D=new(function(){function t(){this.color="rgba(0,0,0,0.1)",this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={color:"#666",family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null,lineWidth:0,strokeStyle:void 0},this.hover={onHover:null,mode:"nearest",intersect:!0},this.maintainAspectRatio=!0,this.onClick=null,this.responsive=!0,this.showLines=!0,this.plugins={},this.scale=void 0,this.doughnut=void 0,this.scales={},this.controllers=void 0}var e=t.prototype;return e.set=function(t,e){return y(S(this,t),e)},e.get=function(t){return S(this,t)},e.route=function(t,e,i,n){var r,a=S(this,t),o=S(this,i),s="_"+e;Object.defineProperties(a,((r={})[s]={writable:!0},r[e]={enumerable:!0,get:function(){return p(this[s],o[n])},set:function(t){this[s]=t}},r))},t}()),T=Math.PI,A=T/180,O=2*T,E=T/2,C=T/4,L=2*T/3;function F(t){return!t||u(t.size)||u(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function R(t,e,i,n,r){var a=e[r];return a||(a=e[r]=t.measureText(r).width,i.push(r)),a>n&&(n=a),n}function I(t,e,i,n){var r=(n=n||{}).data=n.data||{},a=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},a=n.garbageCollect=[],n.font=e),t.save(),t.font=e;var o,s,l,c,u,d=0,f=i.length;for(o=0;o<f;o++)if(null!=(c=i[o])&&!0!==h(c))d=R(t,r,a,d,c);else if(h(c))for(s=0,l=c.length;s<l;s++)null==(u=c[s])||h(u)||(d=R(t,r,a,d,u));t.restore();var p=a.length/2;if(p>i.length){for(o=0;o<p;o++)delete r[a[o]];a.splice(0,p)}return d}function z(t,e,i){var n=t.currentDevicePixelRatio,r=i/2;return Math.round((e-r)*n)/n+r}function V(t){t.ctx.clearRect(0,0,t.width,t.height)}function B(t,e,i,n){var r,a,o,s,l,c=e.pointStyle,u=e.rotation,h=e.radius,d=(u||0)*A;if(c&&"object"==typeof c&&("[object HTMLImageElement]"===(r=c.toString())||"[object HTMLCanvasElement]"===r))return t.save(),t.translate(i,n),t.rotate(d),t.drawImage(c,-c.width/2,-c.height/2,c.width,c.height),void t.restore();if(!(isNaN(h)||h<=0)){switch(t.beginPath(),c){default:t.arc(i,n,h,0,O),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(d)*h,n-Math.cos(d)*h),d+=L,t.lineTo(i+Math.sin(d)*h,n-Math.cos(d)*h),d+=L,t.lineTo(i+Math.sin(d)*h,n-Math.cos(d)*h),t.closePath();break;case"rectRounded":s=h-(l=.516*h),a=Math.cos(d+C)*s,o=Math.sin(d+C)*s,t.arc(i-a,n-o,l,d-T,d-E),t.arc(i+o,n-a,l,d-E,d),t.arc(i+a,n+o,l,d,d+E),t.arc(i-o,n+a,l,d+E,d+T),t.closePath();break;case"rect":if(!u){s=Math.SQRT1_2*h,t.rect(i-s,n-s,2*s,2*s);break}d+=C;case"rectRot":a=Math.cos(d)*h,o=Math.sin(d)*h,t.moveTo(i-a,n-o),t.lineTo(i+o,n-a),t.lineTo(i+a,n+o),t.lineTo(i-o,n+a),t.closePath();break;case"crossRot":d+=C;case"cross":a=Math.cos(d)*h,o=Math.sin(d)*h,t.moveTo(i-a,n-o),t.lineTo(i+a,n+o),t.moveTo(i+o,n-a),t.lineTo(i-o,n+a);break;case"star":a=Math.cos(d)*h,o=Math.sin(d)*h,t.moveTo(i-a,n-o),t.lineTo(i+a,n+o),t.moveTo(i+o,n-a),t.lineTo(i-o,n+a),d+=C,a=Math.cos(d)*h,o=Math.sin(d)*h,t.moveTo(i-a,n-o),t.lineTo(i+a,n+o),t.moveTo(i+o,n-a),t.lineTo(i-o,n+a);break;case"line":a=Math.cos(d)*h,o=Math.sin(d)*h,t.moveTo(i-a,n-o),t.lineTo(i+a,n+o);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(d)*h,n+Math.sin(d)*h)}t.fill(),e.borderWidth>0&&t.stroke()}}function W(t,e){return t.x>e.left-.5&&t.x<e.right+.5&&t.y>e.top-.5&&t.y<e.bottom+.5}function N(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function H(t){t.restore()}function j(t,e,i,n,r){if(!e)return t.lineTo(i.x,i.y);if("middle"===r){var a=(e.x+i.x)/2;t.lineTo(a,e.y),t.lineTo(a,i.y)}else"after"===r!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Y(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.controlPointPreviousX:e.controlPointNextX,n?e.controlPointPreviousY:e.controlPointNextY,n?i.controlPointNextX:i.controlPointPreviousX,n?i.controlPointNextY:i.controlPointPreviousY,i.x,i.y)}var X=Object.freeze({__proto__:null,toFontString:F,_measureText:R,_longestText:I,_alignPixel:z,clear:V,drawPoint:B,_isPointInArea:W,clipArea:N,unclipArea:H,_steppedLineTo:j,_bezierCurveTo:Y});function U(t,e){for(var i,n=t.length-1,r=0;n-r>1;)t[i=r+n>>1]<e?r=i:n=i;return{lo:r,hi:n}}function q(t,e,i){for(var n,r=t.length-1,a=0;r-a>1;)t[n=a+r>>1][e]<i?a=n:r=n;return{lo:a,hi:r}}function K(t,e,i){for(var n,r=t.length-1,a=0;r-a>1;)t[n=a+r>>1][e]<i?r=n:a=n;return{lo:a,hi:r}}var G=["push","pop","shift","splice","unshift"];function $(t,e){var i=t._chartjs;if(i){var n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(G.forEach((function(e){delete t[e]})),delete t._chartjs)}}function Z(t){return null!=t&&"none"!==t}function Q(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function J(t,e,i){var n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}function tt(t,e,i){var n=document.defaultView,r=Q(t),a=n.getComputedStyle(t)[e],o=n.getComputedStyle(r)[e],s=Z(a),l=Z(o),c=Number.POSITIVE_INFINITY;if(s||l)return Math.min(s?J(a,t,i):c,l?J(o,r,i):c)}function et(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}function it(t,e,i){return""===(e=et(t,e))?0:e.indexOf("%")>-1?i*parseInt(e,10)/100:parseInt(e,10)}function nt(t,e){var i,n,r=t.originalEvent||t,a=e.canvas,o=a.getBoundingClientRect(),s=r.touches;s&&s.length>0?(i=s[0].clientX,n=s[0].clientY):(i=r.clientX,n=r.clientY);var l=parseFloat(et(a,"padding-left")),c=parseFloat(et(a,"padding-top")),u=parseFloat(et(a,"padding-right")),h=parseFloat(et(a,"padding-bottom")),d=o.right-o.left-l-u,f=o.bottom-o.top-c-h;return{x:i=Math.round((i-o.left-l)/d*a.width/e.currentDevicePixelRatio),y:n=Math.round((n-o.top-c)/f*a.height/e.currentDevicePixelRatio)}}function rt(t,e){return"number"==typeof t?t:e}function at(t){var e=Q(t);if(!e)return rt(t.clientWidth,t.width);var i=e.clientWidth,n=i-it(e,"padding-left",i)-it(e,"padding-right",i),r=function(t){return tt(t,"max-width","clientWidth")}(t);return isNaN(r)?n:Math.min(n,r)}function ot(t){var e=Q(t);if(!e)return rt(t.clientHeight,t.height);var i=e.clientHeight,n=i-it(e,"padding-top",i)-it(e,"padding-bottom",i),r=function(t){return tt(t,"max-height","clientHeight")}(t);return isNaN(r)?n:Math.min(n,r)}function st(t,e){var i=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1,n=t.canvas,r=t.width,a=t.height;n.height=a*i,n.width=r*i,t.ctx.setTransform(i,0,0,i,0,0),!n.style||n.style.height||n.style.width||(n.style.height=a+"px",n.style.width=r+"px")}var lt=Object.freeze({__proto__:null,_getParentNode:Q,getStyle:et,getRelativePosition:nt,getMaximumWidth:at,getMaximumHeight:ot,retinaScale:st});function ct(t,e){return"native"in t?{x:t.x,y:t.y}:nt(t,e)}function ut(t,e){for(var i,n,r,a=t.getSortedVisibleDatasetMetas(),o=0,s=a.length;o<s;++o){var l=a[o];i=l.index;for(var c=0,u=(n=l.data).length;c<u;++c)(r=n[c]).skip||e(r,i,c)}}function ht(t,e,i,n){var r=t.controller,a=t.data,o=t._sorted,s=r._cachedMeta.iScale;if(s&&e===s.axis&&o&&a.length){var l=s._reversePixels?K:q;if(!n)return l(a,e,i);if(r._sharedOptions){var c=a[0],u="function"==typeof c.getRange&&c.getRange(e);if(u){var h=l(a,e,i-u),d=l(a,e,i+u);return{lo:h.lo,hi:d.hi}}}}return{lo:0,hi:a.length-1}}function dt(t,e,i,n,r){for(var a=t.getSortedVisibleDatasetMetas(),o=i[e],s=0,l=a.length;s<l;++s)for(var c=a[s],u=c.index,h=c.data,d=ht(a[s],e,o,r),f=d.lo,p=d.hi,g=f;g<=p;++g){var v=h[g];v.skip||n(v,u,g)}}function ft(t,e,i,n){var r=[];if(!W(e,t.chartArea))return r;return dt(t,i,e,(function(t,i,a){t.inRange(e.x,e.y,n)&&r.push({element:t,datasetIndex:i,index:a})}),!0),r}function pt(t,e,i,n,r){var a=function(t){var e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){var r=e?Math.abs(t.x-n.x):0,a=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(a,2))}}(i),o=Number.POSITIVE_INFINITY,s=[];if(!W(e,t.chartArea))return s;return dt(t,i,e,(function(t,i,l){if(!n||t.inRange(e.x,e.y,r)){var c=t.getCenterPoint(r),u=a(e,c);u<o?(s=[{element:t,datasetIndex:i,index:l}],o=u):u===o&&s.push({element:t,datasetIndex:i,index:l})}})),s}var gt={modes:{index:function(t,e,i,n){var r=ct(e,t),a=i.axis||"x",o=i.intersect?ft(t,r,a,n):pt(t,r,a,!1,n),s=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach((function(t){var e=o[0].index,i=t.data[e];i&&!i.skip&&s.push({element:i,datasetIndex:t.index,index:e})})),s):[]},dataset:function(t,e,i,n){var r=ct(e,t),a=i.axis||"xy",o=i.intersect?ft(t,r,a,n):pt(t,r,a,!1,n);if(o.length>0){var s=o[0].datasetIndex,l=t.getDatasetMeta(s).data;o=[];for(var c=0;c<l.length;++c)o.push({element:l[c],datasetIndex:s,index:c})}return o},point:function(t,e,i,n){return ft(t,ct(e,t),i.axis||"xy",n)},nearest:function(t,e,i,n){return pt(t,ct(e,t),i.axis||"xy",i.intersect,n)},x:function(t,e,i,n){var r=ct(e,t),a=[],o=!1;return ut(t,(function(t,e,i){t.inXRange(r.x,n)&&a.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(o=!0)})),i.intersect&&!o?[]:a},y:function(t,e,i,n){var r=ct(e,t),a=[],o=!1;return ut(t,(function(t,e,i){t.inYRange(r.y,n)&&a.push({element:t,datasetIndex:e,index:i}),t.inRange(r.x,r.y,n)&&(o=!0)})),i.intersect&&!o?[]:a}}};function vt(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}function mt(t){var e,i,n,r;return d(t)?(e=+t.top||0,i=+t.right||0,n=+t.bottom||0,r=+t.left||0):e=i=n=r=+t||0,{top:e,right:i,bottom:n,left:r,height:e+n,width:r+i}}function bt(t){var e=D.font,i=p((t=t||{}).size,e.size);"string"==typeof i&&(i=parseInt(i,10));var n={color:p(t.color,e.color),family:p(t.family,e.family),lineHeight:vt(p(t.lineHeight,e.lineHeight),i),lineWidth:p(t.lineWidth,e.lineWidth),size:i,style:p(t.style,e.style),weight:p(t.weight,e.weight),strokeStyle:p(t.strokeStyle,e.strokeStyle),string:""};return n.string=F(n),n}function xt(t,e,i,n){var r,a,o,s=!0;for(r=0,a=t.length;r<a;++r)if(void 0!==(o=t[r])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==i&&h(o)&&(o=o[i%o.length],s=!1),void 0!==o))return n&&!s&&(n.cacheable=!1),o}var yt=Object.freeze({__proto__:null,toLineHeight:vt,toPadding:mt,toFont:bt,resolve:xt}),_t=["left","top","right","bottom"];function Mt(t,e){return t.filter((function(t){return t.pos===e}))}function wt(t,e){return t.filter((function(t){return-1===_t.indexOf(t.pos)&&t.box.axis===e}))}function kt(t,e){return t.sort((function(t,i){var n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight}))}function Pt(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function St(t,e,i){var n=i.box,r=t.maxPadding;if(i.size&&(t[i.pos]-=i.size),i.size=i.horizontal?n.height:n.width,t[i.pos]+=i.size,n.getPadding){var a=n.getPadding();r.top=Math.max(r.top,a.top),r.left=Math.max(r.left,a.left),r.bottom=Math.max(r.bottom,a.bottom),r.right=Math.max(r.right,a.right)}var o=e.outerWidth-Pt(r,t,"left","right"),s=e.outerHeight-Pt(r,t,"top","bottom");if(o!==t.w||s!==t.h)return t.w=o,t.h=s,i.horizontal?o!==t.w:s!==t.h}function Dt(t,e){var i=e.maxPadding;function n(t){var n={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){n[t]=Math.max(e[t],i[t])})),n}return n(t?["left","right"]:["top","bottom"])}function Tt(t,e,i){var n,r,a,o,s,l,c=[];for(n=0,r=t.length;n<r;++n)(o=(a=t[n]).box).update(a.width||e.w,a.height||e.h,Dt(a.horizontal,e)),St(e,i,a)&&(l=!0,c.length&&(s=!0)),o.fullWidth||c.push(a);return s&&Tt(c,e,i)||l}function At(t,e,i){var n,r,a,o,s=i.padding,l=e.x,c=e.y;for(n=0,r=t.length;n<r;++n)o=(a=t[n]).box,a.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?i.outerWidth-s.right:e.left+e.w,o.top=c,o.bottom=c+o.height,o.width=o.right-o.left,c=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=c}D.set("layout",{padding:{top:0,right:0,bottom:0,left:0}});var Ot={addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(t){e.draw(t)}}]},t.boxes.push(e)},removeBox:function(t,e){var i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure:function(t,e,i){for(var n,r=["fullWidth","position","weight"],a=r.length,o=0;o<a;++o)n=r[o],Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},update:function(t,e,n){if(t){var r=mt((t.options.layout||{}).padding),a=e-r.width,o=n-r.height,s=function(t){var e=function(t){var e,i,n,r=[];for(e=0,i=(t||[]).length;e<i;++e)n=t[e],r.push({index:e,box:n,pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return r}(t),i=kt(Mt(e,"left"),!0),n=kt(Mt(e,"right")),r=kt(Mt(e,"top"),!0),a=kt(Mt(e,"bottom")),o=wt(e,"x"),s=wt(e,"y");return{leftAndTop:i.concat(r),rightAndBottom:n.concat(s).concat(a).concat(o),chartArea:Mt(e,"chartArea"),vertical:i.concat(n).concat(s),horizontal:r.concat(a).concat(o)}}(t.boxes),l=s.vertical,c=s.horizontal,u=Object.freeze({outerWidth:e,outerHeight:n,padding:r,availableWidth:a,vBoxMaxWidth:a/2/l.length,hBoxMaxHeight:o/2}),h=i({maxPadding:i({},r),w:a,h:o,x:r.left,y:r.top},r);!function(t,e){var i,n,r;for(i=0,n=t.length;i<n;++i)(r=t[i]).width=r.horizontal?r.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,r.height=r.horizontal&&e.hBoxMaxHeight}(l.concat(c),u),Tt(l,h,u),Tt(c,h,u)&&Tt(l,h,u),function(t){var e=t.maxPadding;function i(i){var n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(h),At(s.leftAndTop,h,u),h.x+=h.w,h.y+=h.h,At(s.rightAndBottom,h,u),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},v(s.chartArea,(function(e){var n=e.box;i(n,t.chartArea),n.update(h.w,h.h)}))}}},Et=function(){function t(){}var e=t.prototype;return e.acquireContext=function(t,e){},e.releaseContext=function(t){return!1},e.addEventListener=function(t,e,i){},e.removeEventListener=function(t,e,i){},e.getDevicePixelRatio=function(){return 1},e.isAttached=function(t){return!0},t}(),Ct=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e.prototype.acquireContext=function(t){return t&&t.getContext&&t.getContext("2d")||null},e}(Et),Lt=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var i=-1;return t.some((function(t,n){return t[0]===e&&(i=n,!0)})),i}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var i=t(this.__entries__,e),n=this.__entries__[i];return n&&n[1]},e.prototype.set=function(e,i){var n=t(this.__entries__,e);~n?this.__entries__[n][1]=i:this.__entries__.push([e,i])},e.prototype.delete=function(e){var i=this.__entries__,n=t(i,e);~n&&i.splice(n,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var i=0,n=this.__entries__;i<n.length;i++){var r=n[i];t.call(e,r[1],r[0])}},e}()}(),Ft="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Rt="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),It="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Rt):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var zt=["top","right","bottom","left","width","height","size","weight"],Vt="undefined"!=typeof MutationObserver,Bt=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var i=!1,n=!1,r=0;function a(){i&&(i=!1,t()),n&&s()}function o(){It(a)}function s(){var t=Date.now();if(i){if(t-r<2)return;n=!0}else i=!0,n=!1,setTimeout(o,e);r=t}return s}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,i=e.indexOf(t);~i&&e.splice(i,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){Ft&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Vt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Ft&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,i=void 0===e?"":e;zt.some((function(t){return!!~i.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Wt=function(t,e){for(var i=0,n=Object.keys(e);i<n.length;i++){var r=n[i];Object.defineProperty(t,r,{value:e[r],enumerable:!1,writable:!1,configurable:!0})}return t},Nt=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Rt},Ht=Kt(0,0,0,0);function jt(t){return parseFloat(t)||0}function Yt(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];return e.reduce((function(e,i){return e+jt(t["border-"+i+"-width"])}),0)}function Xt(t){var e=t.clientWidth,i=t.clientHeight;if(!e&&!i)return Ht;var n=Nt(t).getComputedStyle(t),r=function(t){for(var e={},i=0,n=["top","right","bottom","left"];i<n.length;i++){var r=n[i],a=t["padding-"+r];e[r]=jt(a)}return e}(n),a=r.left+r.right,o=r.top+r.bottom,s=jt(n.width),l=jt(n.height);if("border-box"===n.boxSizing&&(Math.round(s+a)!==e&&(s-=Yt(n,"left","right")+a),Math.round(l+o)!==i&&(l-=Yt(n,"top","bottom")+o)),!function(t){return t===Nt(t).document.documentElement}(t)){var c=Math.round(s+a)-e,u=Math.round(l+o)-i;1!==Math.abs(c)&&(s-=c),1!==Math.abs(u)&&(l-=u)}return Kt(r.left,r.top,s,l)}var Ut="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Nt(t).SVGGraphicsElement}:function(t){return t instanceof Nt(t).SVGElement&&"function"==typeof t.getBBox};function qt(t){return Ft?Ut(t)?function(t){var e=t.getBBox();return Kt(0,0,e.width,e.height)}(t):Xt(t):Ht}function Kt(t,e,i,n){return{x:t,y:e,width:i,height:n}}var Gt=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Kt(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=qt(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),$t=function(t,e){var i,n,r,a,o,s,l,c=(n=(i=e).x,r=i.y,a=i.width,o=i.height,s="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,l=Object.create(s.prototype),Wt(l,{x:n,y:r,width:a,height:o,top:r,right:n+a,bottom:o+r,left:n}),l);Wt(this,{target:t,contentRect:c})},Zt=function(){function t(t,e,i){if(this.activeObservations_=[],this.observations_=new Lt,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=i}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Nt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Gt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Nt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new $t(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Qt="undefined"!=typeof WeakMap?new WeakMap:new Lt,Jt=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var i=Bt.getInstance(),n=new Zt(e,i,this);Qt.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Jt.prototype[t]=function(){var e;return(e=Qt.get(this))[t].apply(e,arguments)}}));var te=void 0!==Rt.ResizeObserver?Rt.ResizeObserver:Jt,ee={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ie(t,e){var i=et(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}var ne=!!function(){var t=!1;try{var e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}()&&{passive:!0};function re(t,e,i){t.removeEventListener(e,i,ne)}function ae(t,e){var i=!1,n=[];return function(){for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];n=Array.prototype.slice.call(o),i||(i=!0,a.call(window,(function(){i=!1,t.apply(e,n)})))}}function oe(t,e,i){var n=t.canvas,r=n&&Q(n)||n,a=new MutationObserver((function(t){var e=Q(r);t.forEach((function(t){for(var n=0;n<t.addedNodes.length;n++){var a=t.addedNodes[n];a!==r&&a!==e||i(t.target)}}))}));return a.observe(document,{childList:!0,subtree:!0}),a}function se(t,e,i){var n=t.canvas,r=n&&Q(n);if(r){var a=new MutationObserver((function(t){t.forEach((function(t){for(var e=0;e<t.removedNodes.length;e++)if(t.removedNodes[e]===n){i();break}}))}));return a.observe(r,{childList:!0}),a}}function le(t,e,i){var n=t.canvas,r=n&&Q(n);if(r){var a=ae((function(t,e){var n=r.clientWidth;i(t,e),n<r.clientWidth&&i()}),window),o=new te((function(t){var e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||a(i,n)}));return o.observe(r),o}}function ce(t,e,i){i&&i.disconnect()}function ue(t,e,i){var n=t.canvas,r=ae((function(e){null!==t.ctx&&i(function(t,e){var i=ee[t.type]||t.type,n=nt(t,e);return function(t,e,i,n,r){return{type:t,chart:e,native:r||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}(i,e,n.x,n.y,t)}(e,t))}),t);return function(t,e,i){t.addEventListener(e,i,ne)}(n,e,r),r}var he=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var i=e.prototype;return i.acquireContext=function(t,e){var i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){var i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t.$chartjs={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",null===r||""===r){var a=ie(t,"width");void 0!==a&&(t.width=a)}if(null===n||""===n)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ie(t,"height");void 0!==o&&(t.height=o)}}(t,e),i):null},i.releaseContext=function(t){var e=t.canvas;if(!e.$chartjs)return!1;var i=e.$chartjs.initial;["height","width"].forEach((function(t){var n=i[t];u(n)?e.removeAttribute(t):e.setAttribute(t,n)}));var n=i.style||{};return Object.keys(n).forEach((function(t){e.style[t]=n[t]})),e.width=e.width,delete e.$chartjs,!0},i.addEventListener=function(t,e,i){this.removeEventListener(t,e);var n=t.$proxies||(t.$proxies={}),r={attach:oe,detach:se,resize:le}[e]||ue;n[e]=r(t,e,i)},i.removeEventListener=function(t,e){var i=t.canvas,n=t.$proxies||(t.$proxies={}),r=n[e];r&&(({attach:ce,detach:ce,resize:ce}[e]||re)(i,e,r),n[e]=void 0)},i.getDevicePixelRatio=function(){return window.devicePixelRatio},i.isAttached=function(t){var e=Q(t);return!(!e||!Q(e))},e}(Et),de=Object.freeze({__proto__:null,BasePlatform:Et,BasicPlatform:Ct,DomPlatform:he}),fe={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e,i=0;return 0===t?0:1===t?1:(i||(i=.3),e=i/(2*Math.PI)*Math.asin(1),-1*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e,i=0;return 0===t?0:1===t?1:(i||(i=.3),e=i/(2*Math.PI)*Math.asin(1),1*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e,i=0;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),e=i/(2*Math.PI)*Math.asin(1),t<1?1*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:1*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-fe.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*fe.easeInBounce(2*t):.5*fe.easeOutBounce(2*t-1)+.5}},pe={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},ge="0123456789ABCDEF",ve=function(t){return ge[15&t]},me=function(t){return ge[(240&t)>>4]+ge[15&t]},be=function(t){return(240&t)>>4==(15&t)};function xe(t){var e=function(t){return be(t.r)&&be(t.g)&&be(t.b)&&be(t.a)}(t)?ve:me;return t?"#"+e(t.r)+e(t.g)+e(t.b)+(t.a<255?e(t.a):""):t}function ye(t){return t+.5|0}var _e=function(t,e,i){return Math.max(Math.min(t,i),e)};function Me(t){return _e(ye(2.55*t),0,255)}function we(t){return _e(ye(255*t),0,255)}function ke(t){return _e(ye(t/2.55)/100,0,1)}function Pe(t){return _e(ye(100*t),0,100)}var Se=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var De=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Te(t,e,i){var n=e*Math.min(i,1-i),r=function(e,r){return void 0===r&&(r=(e+t/30)%12),i-n*Math.max(Math.min(r-3,9-r,1),-1)};return[r(0),r(8),r(4)]}function Ae(t,e,i){var n=function(n,r){return void 0===r&&(r=(n+t/60)%6),i-i*e*Math.max(Math.min(r,4-r,1),0)};return[n(5),n(3),n(1)]}function Oe(t,e,i){var n,r=Te(t,1,.5);for(e+i>1&&(e*=n=1/(e+i),i*=n),n=0;n<3;n++)r[n]*=1-e-i,r[n]+=e;return r}function Ee(t){var e,i,n,r=t.r/255,a=t.g/255,o=t.b/255,s=Math.max(r,a,o),l=Math.min(r,a,o),c=(s+l)/2;return s!==l&&(n=s-l,i=c>.5?n/(2-s-l):n/(s+l),e=60*(e=s===r?(a-o)/n+(a<o?6:0):s===a?(o-r)/n+2:(r-a)/n+4)+.5),[0|e,i||0,c]}function Ce(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(we)}function Le(t,e,i){return Ce(Te,t,e,i)}function Fe(t){return(t%360+360)%360}function Re(t){var e,i=De.exec(t),n=255;if(i){i[5]!==e&&(n=i[6]?Me(+i[5]):we(+i[5]));var r=Fe(+i[2]),a=+i[3]/100,o=+i[4]/100;return{r:(e="hwb"===i[1]?function(t,e,i){return Ce(Oe,t,e,i)}(r,a,o):"hsv"===i[1]?function(t,e,i){return Ce(Ae,t,e,i)}(r,a,o):Le(r,a,o))[0],g:e[1],b:e[2],a:n}}}var Ie,ze={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"},Ve={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Be(t){Ie||((Ie=function(){var t,e,i,n,r,a={},o=Object.keys(Ve),s=Object.keys(ze);for(t=0;t<o.length;t++){for(n=r=o[t],e=0;e<s.length;e++)i=s[e],r=r.replace(i,ze[i]);i=parseInt(Ve[n],16),a[r]=[i>>16&255,i>>8&255,255&i]}return a}()).transparent=[0,0,0,0]);var e=Ie[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}function We(t,e,i){if(t){var n=Ee(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=Le(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Ne(t,e){return t?i(e||{},t):t}function He(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=we(t[3]))):(e=Ne(t,{r:0,g:0,b:0,a:1})).a=we(e.a),e}function je(t){return"r"===t.charAt(0)?function(t){var e,i,n,r=Se.exec(t),a=255;if(r){if(r[7]!==e){var o=+r[7];a=255&(r[8]?Me(o):255*o)}return e=+r[1],i=+r[3],n=+r[5],{r:e=255&(r[2]?Me(e):e),g:i=255&(r[4]?Me(i):i),b:n=255&(r[6]?Me(n):n),a:a}}}(t):Re(t)}var Ye=function(){function t(e){if(e instanceof t)return e;var i,n,r,a,o=typeof e;"object"===o?i=He(e):"string"===o&&(a=(n=e).length,"#"===n[0]&&(4===a||5===a?r={r:255&17*pe[n[1]],g:255&17*pe[n[2]],b:255&17*pe[n[3]],a:5===a?17*pe[n[4]]:255}:7!==a&&9!==a||(r={r:pe[n[1]]<<4|pe[n[2]],g:pe[n[3]]<<4|pe[n[4]],b:pe[n[5]]<<4|pe[n[6]],a:9===a?pe[n[7]]<<4|pe[n[8]]:255})),i=r||Be(e)||je(e)),this._rgb=i,this._valid=!!i}var i=t.prototype;return i.rgbString=function(){return this._valid?(t=this._rgb)&&(t.a<255?"rgba("+t.r+", "+t.g+", "+t.b+", "+ke(t.a)+")":"rgb("+t.r+", "+t.g+", "+t.b+")"):this._rgb;var t},i.hexString=function(){return this._valid?xe(this._rgb):this._rgb},i.hslString=function(){return this._valid?function(t){if(t){var e=Ee(t),i=e[0],n=Pe(e[1]),r=Pe(e[2]);return t.a<255?"hsla("+i+", "+n+"%, "+r+"%, "+ke(t.a)+")":"hsl("+i+", "+n+"%, "+r+"%)"}}(this._rgb):this._rgb},i.mix=function(t,e){if(t){var i,n=this.rgb,r=t.rgb,a=e===i?.5:e,o=2*a-1,s=n.a-r.a,l=((o*s==-1?o:(o+s)/(1+o*s))+1)/2;i=1-l,n.r=255&l*n.r+i*r.r+.5,n.g=255&l*n.g+i*r.g+.5,n.b=255&l*n.b+i*r.b+.5,n.a=a*n.a+(1-a)*r.a,this.rgb=n}return this},i.clone=function(){return new t(this.rgb)},i.alpha=function(t){return this._rgb.a=we(t),this},i.clearer=function(t){return this._rgb.a*=1-t,this},i.greyscale=function(){var t=this._rgb,e=ye(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this},i.opaquer=function(t){return this._rgb.a*=1+t,this},i.negate=function(){var t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this},i.lighten=function(t){return We(this._rgb,2,t),this},i.darken=function(t){return We(this._rgb,2,-t),this},i.saturate=function(t){return We(this._rgb,1,t),this},i.desaturate=function(t){return We(this._rgb,1,-t),this},i.rotate=function(t){return function(t,e){var i=Ee(t);i[0]=Fe(i[0]+e),i=Le(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this},e(t,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var t=Ne(this._rgb);return t&&(t.a=ke(t.a)),t},set:function(t){this._rgb=He(t)}}]),t}();function Xe(t){return new Ye(t)}var Ue=function(t){return t instanceof CanvasGradient||t instanceof CanvasPattern};function qe(t){return Ue(t)?t:Xe(t)}function Ke(t){return Ue(t)?t:Xe(t).saturate(.5).darken(.1).hexString()}var Ge={boolean:function(t,e,i){return i>.5?e:t},color:function(t,e,i){var n=qe(t||"transparent"),r=n.valid&&qe(e||"transparent");return r&&r.valid?r.mix(n,i).hexString():e},number:function(t,e,i){return t+(e-t)*i}},$e=function(){function t(t,e,i,n){var r=e[i];n=xt([t.to,n,r,t.from]);var a=xt([t.from,r,n]);this._active=!0,this._fn=t.fn||Ge[t.type||typeof a],this._easing=fe[t.easing||"linear"],this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=a,this._to=n}var e=t.prototype;return e.active=function(){return this._active},e.update=function(t,e,i){var n=this;if(n._active){var r=n._target[n._prop],a=i-n._start,o=n._duration-a;n._start=i,n._duration=Math.floor(Math.max(o,t.duration)),n._loop=!!t.loop,n._to=xt([t.to,e,r,t.from]),n._from=xt([t.from,r,e])}},e.cancel=function(){this._active&&(this.tick(Date.now()),this._active=!1)},e.tick=function(t){var e,i=this,n=t-i._start,r=i._duration,a=i._prop,o=i._from,s=i._loop,l=i._to;i._active=o!==l&&(s||n<r),i._active?n<0?i._target[a]=o:(e=n/r%2,e=s&&e>1?2-e:e,e=i._easing(Math.min(1,Math.max(0,e))),i._target[a]=i._fn(o,l,e)):i._target[a]=l},t}(),Ze=["borderColor","backgroundColor"];D.set("animation",{duration:1e3,easing:"easeOutQuart",onProgress:s,onComplete:s,colors:{type:"color",properties:Ze},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]},active:{duration:400},resize:{duration:0},show:{colors:{type:"color",properties:Ze,from:"transparent"},visible:{type:"boolean",duration:0}},hide:{colors:{type:"color",properties:Ze,to:"transparent"},visible:{type:"boolean",easing:"easeInExpo"}}});var Qe=function(){function t(t,e){this._chart=t,this._properties=new Map,this.configure(e)}var e=t.prototype;return e.configure=function(t){if(d(t)){var e=this._properties,n=function(t){var e={};return Object.keys(t).forEach((function(i){var n=t[i];d(n)||(e[i]=n)})),e}(t);Object.keys(t).forEach((function(r){var a=t[r];d(a)&&(a.properties||[r]).forEach((function(t){e.has(t)?t===r&&e.set(t,i({},e.get(t),a)):e.set(t,i({},n,a))}))}))}},e._animateOptions=function(t,e){var n=e.options,r=[];if(!n)return r;var a=t.options;return a?(a.$shared&&(t.options=a=i({},a,{$shared:!1,$animations:{}})),r=this._createAnimations(a,n)):t.options=n,r},e._createAnimations=function(t,e){var i,n=this._properties,r=[],a=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();for(i=o.length-1;i>=0;--i){var l=o[i];if("$"!==l.charAt(0))if("options"!==l){var c=e[l],u=a[l],h=n.get(l);if(u){if(h&&u.active()){u.update(h,c,s);continue}u.cancel()}h&&h.duration?(a[l]=u=new $e(h,t,l,c),r.push(u)):t[l]=c}else r.push.apply(r,this._animateOptions(t,e))}return r},e.update=function(t,e){if(0===this._properties.size)return function(t,e){var n=t.options,r=e.options;n&&r&&!r.$shared&&(n.$shared?t.options=i({},n,r,{$shared:!1}):i(n,r),delete e.options)}(t,e),void i(t,e);var n=this._createAnimations(t,e);return n.length?(o.add(this._chart,n),!0):void 0},t}(),Je=Math.PI,ti=2*Je,ei=ti+Je;function ii(t){var e,i=[],n=Math.sqrt(t);for(e=1;e<n;e++)t%e==0&&(i.push(e),i.push(t/e));return n===(0|n)&&i.push(n),i.sort((function(t,e){return t-e})).pop(),i}var ni=Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,i=Math.round(e);return t===Math.pow(10,i)?i:e};function ri(t){return!isNaN(parseFloat(t))&&isFinite(t)}function ai(t,e,i){return Math.abs(t-e)<i}function oi(t,e){var i=Math.round(t);return i-e<=t&&i+e>=t}function si(t,e,i){var n,r,a;for(n=0,r=t.length;n<r;n++)a=t[n][i],isNaN(a)||(e.min=Math.min(e.min,a),e.max=Math.max(e.max,a))}var li=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1};function ci(t){return t*(Je/180)}function ui(t){return t*(180/Je)}function hi(t){if(f(t)){for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}}function di(t,e){var i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n),a=Math.atan2(n,i);return a<-.5*Je&&(a+=ti),{angle:a,distance:r}}function fi(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function pi(t,e){return(t-e+ei)%ti-Je}function gi(t){return(t%ti+ti)%ti}function vi(t,e,i){var n=gi(t),r=gi(e),a=gi(i),o=gi(r-n),s=gi(a-n),l=gi(n-r),c=gi(n-a);return n===r||n===a||o>s&&l<c}function mi(t,e,i){return Math.max(e,Math.min(i,t))}var bi=Object.freeze({__proto__:null,_factorize:ii,log10:ni,isNumber:ri,almostEquals:ai,almostWhole:oi,_setMinAndMaxByKey:si,sign:li,toRadians:ci,toDegrees:ui,_decimalPlaces:hi,getAngleFromPoint:di,distanceBetweenPoints:fi,_angleDiff:pi,_normalizeAngle:gi,_angleBetween:vi,_limitValue:mi});function xi(t,e){var i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,a=void 0===i.max?e:0;return{start:n?a:r,end:n?r:a}}function yi(t,e){var i,n,r=[],a=t._getSortedDatasetMetas(e);for(i=0,n=a.length;i<n;++i)r.push(a[i].index);return r}function _i(t,e,i,n){var r,a,o,s,l=t.keys;for(r=0,a=l.length;r<a;++r){if((o=+l[r])===i){if(n)continue;break}s=t.values[o],isNaN(s)||0!==e&&li(e)!==li(s)||(e+=s)}return e}function Mi(t,e){var i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function wi(t,e,i){var n=t[e]||(t[e]={});return n[i]||(n[i]={})}function ki(t,e){for(var i=t.chart,n=t._cachedMeta,r=i._stacks||(i._stacks={}),a=n.iScale,o=n.vScale,s=n.index,l=a.axis,c=o.axis,u=function(t,e,i){return t.id+"."+e.id+"."+i.stack+"."+i.type}(a,o,n),h=e.length,d=0;d<h;++d){var f=e[d],p=f[l],g=f[c];((f._stacks||(f._stacks={}))[c]=wi(r,u,p))[s]=g}}function Pi(t,e){var i=t.scales;return Object.keys(i).filter((function(t){return i[t].axis===e})).shift()}function Si(t,e){return e?"hover"+k(t):t}var Di=function(){function t(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedAnimations={},this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this._config=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this.initialize()}var e=t.prototype;return e.initialize=function(){var t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Mi(t.vScale,t),this.addElements()},e.updateIndex=function(t){this.index=t},e.linkScales=function(){var t=this,e=t.chart,i=t._cachedMeta,n=t.getDataset(),r=function(t,e,i,n){return"x"===t?e:"r"===t?n:i},a=i.xAxisID=p(n.xAxisID,Pi(e,"x")),o=i.yAxisID=p(n.yAxisID,Pi(e,"y")),s=i.rAxisID=p(n.rAxisID,Pi(e,"r")),l=i.indexAxis,c=i.iAxisID=r(l,a,o,s),u=i.vAxisID=r(l,o,a,s);i.xScale=t.getScaleForId(a),i.yScale=t.getScaleForId(o),i.rScale=t.getScaleForId(s),i.iScale=t.getScaleForId(c),i.vScale=t.getScaleForId(u)},e.getDataset=function(){return this.chart.data.datasets[this.index]},e.getMeta=function(){return this.chart.getDatasetMeta(this.index)},e.getScaleForId=function(t){return this.chart.scales[t]},e._getOtherScale=function(t){var e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale},e.reset=function(){this._update("reset")},e._destroy=function(){this._data&&$(this._data,this)},e._dataCheck=function(){var t,e,i=this,n=i.getDataset(),r=n.data||(n.data=[]);d(r)?i._data=function(t){var e,i,n,r=Object.keys(t),a=new Array(r.length);for(e=0,i=r.length;e<i;++e)n=r[e],a[e]={x:n,y:t[n]};return a}(r):i._data!==r&&(i._data&&$(i._data,i),r&&Object.isExtensible(r)&&(e=i,(t=r)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),G.forEach((function(e){var i="_onData"+k(e),n=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];var o=n.apply(this,r);return t._chartjs.listeners.forEach((function(t){"function"==typeof t[i]&&t[i].apply(t,r)})),o}})})))),i._data=r)},e.addElements=function(){var t=this,e=t._cachedMeta;t._dataCheck();for(var i=t._data,n=e.data=new Array(i.length),r=0,a=i.length;r<a;++r)n[r]=new t.dataElementType;t.datasetElementType&&(e.dataset=new t.datasetElementType)},e.buildOrUpdateElements=function(){var t=this,e=t._cachedMeta,i=t.getDataset(),n=!1;t._dataCheck(),e._stacked=Mi(e.vScale,e),e.stack!==i.stack&&(n=!0,e._parsed.forEach((function(t){delete t._stacks[e.vScale.id][e.index]})),e.stack=i.stack),t._resyncElements(),n&&ki(t,e._parsed)},e.configure=function(){var t=this;t._config=y({},[t.chart.options[t._type].datasets,t.getDataset()],{merger:function(t,e,i){"data"!==t&&x(t,e,i)}}),t._parsing=xt([t._config.parsing,t.chart.options.parsing,!0])},e.parse=function(t,e){var i,n,r,a,o=this,s=o._cachedMeta,l=o._data,c=s.iScale,u=s.vScale,f=s._stacked,p=c.axis,g=!0;if(t>0&&(g=s._sorted,a=s._parsed[t-1]),!1===o._parsing)s._parsed=l,s._sorted=!0;else{for(n=h(l[t])?o.parseArrayData(s,l,t,e):d(l[t])?o.parseObjectData(s,l,t,e):o.parsePrimitiveData(s,l,t,e),i=0;i<e;++i)s._parsed[i+t]=r=n[i],g&&(a&&r[p]<a[p]&&(g=!1),a=r);s._sorted=g}f&&ki(o,n),c.invalidateCaches(),u.invalidateCaches()},e.parsePrimitiveData=function(t,e,i,n){var r,a,o,s=t.iScale,l=t.vScale,c=s.axis,u=l.axis,h=s.getLabels(),d=s===l,f=new Array(n);for(r=0,a=n;r<a;++r){var p;o=r+i,f[r]=((p={})[c]=d||s.parse(h[o],o),p[u]=l.parse(e[o],o),p)}return f},e.parseArrayData=function(t,e,i,n){var r,a,o,s,l=t.xScale,c=t.yScale,u=new Array(n);for(r=0,a=n;r<a;++r)s=e[o=r+i],u[r]={x:l.parse(s[0],o),y:c.parse(s[1],o)};return u},e.parseObjectData=function(t,e,i,n){var r,a,o,s,l=t.xScale,c=t.yScale,u=this._parsing,h=u.xAxisKey,d=void 0===h?"x":h,f=u.yAxisKey,p=void 0===f?"y":f,g=new Array(n);for(r=0,a=n;r<a;++r)s=e[o=r+i],g[r]={x:l.parse(w(s,d),o),y:c.parse(w(s,p),o)};return g},e.getParsed=function(t){return this._cachedMeta._parsed[t]},e.applyStack=function(t,e){var i=this.chart,n=this._cachedMeta,r=e[t.axis];return _i({keys:yi(i,!0),values:e._stacks[t.axis]},r,n.index)},e.updateRangeFromParsed=function(t,e,i,n){var r=i[e.axis],a=n&&i._stacks[e.axis];n&&a&&(n.values=a,t.min=Math.min(t.min,r),t.max=Math.max(t.max,r),r=_i(n,r,this._cachedMeta.index,!0)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)},e.getMinMax=function(t,e){var i,n,r,a,o=this,s=o._cachedMeta,l=s._parsed,c=s._sorted&&t===s.iScale,u=l.length,h=o._getOtherScale(t),d=e&&s._stacked&&{keys:yi(o.chart,!0),values:null},f={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},p=function(t){var e=t.getUserBounds(),i=e.min,n=e.max,r=e.minDefined,a=e.maxDefined;return{min:r?i:Number.NEGATIVE_INFINITY,max:a?n:Number.POSITIVE_INFINITY}}(h),g=p.min,v=p.max;function m(){return r=l[i],n=r[t.axis],a=r[h.axis],isNaN(n)||g>a||v<a}for(i=0;i<u&&(m()||(o.updateRangeFromParsed(f,t,r,d),!c));++i);if(c)for(i=u-1;i>=0;--i)if(!m()){o.updateRangeFromParsed(f,t,r,d);break}return f},e.getAllParsedValues=function(t){var e,i,n,r=this._cachedMeta._parsed,a=[];for(e=0,i=r.length;e<i;++e)n=r[e][t.axis],isNaN(n)||a.push(n);return a},e.getMaxOverflow=function(){return!1},e.getLabelAndValue=function(t){var e=this._cachedMeta,i=e.iScale,n=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}},e._update=function(t){var e,i,n,r,a,o=this,s=o._cachedMeta;o.configure(),o._cachedAnimations={},o._cachedDataOpts={},o.update(t),s._clip=(d(e=p(o._config.clip,function(t,e,i){if(!1===i)return!1;var n=xi(t,i),r=xi(e,i);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}(s.xScale,s.yScale,o.getMaxOverflow())))?(i=e.top,n=e.right,r=e.bottom,a=e.left):i=n=r=a=e,{top:i,right:n,bottom:r,left:a})},e.update=function(t){},e.draw=function(){var t,e,i=this._ctx,n=this.chart,r=this._cachedMeta,a=r.data||[],o=n.chartArea,s=[];for(r.dataset&&r.dataset.draw(i,o),t=0,e=a.length;t<e;++t){var l=a[t];l.active?s.push(l):l.draw(i,o)}for(t=0,e=s.length;t<e;++t)s[t].draw(i,o)},e._addAutomaticHoverColors=function(t,e){for(var i,n=this.getStyle(t),r=Object.keys(n).filter((function(t){return-1!==t.indexOf("Color")&&!(t in e)})),a=r.length-1;a>=0;a--)i=r[a],e[i]=Ke(n[i])},e.getStyle=function(t,e){var i=this,n=i._cachedMeta.dataset;i._config||i.configure();var r=n&&void 0===t?i.resolveDatasetElementOptions(e):i.resolveDataElementOptions(t||0,e&&"active");return e&&i._addAutomaticHoverColors(t,r),r},e._getContext=function(t,e){return{chart:this.chart,dataPoint:this.getParsed(t),dataIndex:t,dataset:this.getDataset(),datasetIndex:this.index,active:e}},e.resolveDatasetElementOptions=function(t){return this._resolveOptions(this.datasetElementOptions,{active:t,type:this.datasetElementType.id})},e.resolveDataElementOptions=function(t,e){var i="active"===e,n=this._cachedDataOpts;if(n[e])return n[e];var r={cacheable:!i},a=this._resolveOptions(this.dataElementOptions,{index:t,active:i,info:r,type:this.dataElementType.id});return r.cacheable&&(a.$shared=!0,n[e]=a),a},e._resolveOptions=function(t,e){for(var i=e.index,n=e.active,r=e.type,a=e.info,o=this._config,s=this.chart.options.elements[r]||{},l={},c=this._getContext(i,n),u=function(t){return h(t)?t:Object.keys(t)}(t),d=0,f=u.length;d<f;++d){var p=u[d],g=Si(p,n),v=xt([o[t[g]],o[g],s[g]],c,i,a);void 0!==v&&(l[p]=v)}return l},e._resolveAnimations=function(t,e,n){var r=this.chart,a=this._cachedAnimations;if(a[e=e||"default"])return a[e];var o={cacheable:!0},s=this._getContext(t,n),l=_({},[xt([this._config.animation],s,t,o),xt([r.options.animation],s,t,o)]);l[e]&&(l=i({},l,l[e]));var c=new Qe(r,l);return o.cacheable&&(a[e]=c&&Object.freeze(c)),c},e.getSharedOptions=function(t,e,i){if(t||(this._sharedOptions=i&&i.$shared),"reset"!==t&&i&&i.$shared&&e&&e.options&&e.options.$shared)return{target:e.options,options:i}},e.includeOptions=function(t,e){return"hide"===t||"show"===t||"resize"!==t&&!e},e.updateElement=function(t,e,n,r){"reset"===r||"none"===r?i(t,n):this._resolveAnimations(e,r).update(t,n)},e.updateSharedOptions=function(t,e){t&&this._resolveAnimations(void 0,e).update(t.target,t.options)},e._setStyle=function(t,e,i,n){t.active=n,this._resolveAnimations(e,i,n).update(t,{options:this.getStyle(e,n)})},e.removeHoverStyle=function(t,e,i){this._setStyle(t,i,"active",!1)},e.setHoverStyle=function(t,e,i){this._setStyle(t,i,"active",!0)},e._removeDatasetHoverStyle=function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)},e._setDatasetHoverStyle=function(){var t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)},e._resyncElements=function(){var t=this._cachedMeta,e=t.data.length,i=this._data.length;i>e?this._insertElements(e,i-e):i<e&&(t.data.splice(i,e-i),t._parsed.splice(i,e-i)),this.parse(0,Math.min(i,e))},e._insertElements=function(t,e){var i,n,r=this,a=new Array(e),o=r._cachedMeta,s=o.data;for(i=0;i<e;++i)a[i]=new r.dataElementType;(s.splice.apply(s,[t,0].concat(a)),r._parsing)&&(n=o._parsed).splice.apply(n,[t,0].concat(new Array(e)));r.parse(t,e),r.updateElements(a,t,"reset")},e.updateElements=function(t,e,i){},e._removeElements=function(t,e){this._parsing&&this._cachedMeta._parsed.splice(t,e),this._cachedMeta.data.splice(t,e)},e._onDataPush=function(){var t=arguments.length;this._insertElements(this.getDataset().data.length-t,t)},e._onDataPop=function(){this._removeElements(this._cachedMeta.data.length-1,1)},e._onDataShift=function(){this._removeElements(0,1)},e._onDataSplice=function(t,e){this._removeElements(t,e),this._insertElements(t,arguments.length-2)},e._onDataUnshift=function(){this._insertElements(0,arguments.length)},t}();Di.defaults={},Di.prototype.datasetElementType=null,Di.prototype.dataElementType=null,Di.prototype.datasetElementOptions=["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],Di.prototype.dataElementOptions=["backgroundColor","borderColor","borderWidth","pointStyle"];var Ti=function(){function t(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}var e=t.prototype;return e.tooltipPosition=function(t){var e=this.getProps(["x","y"],t);return{x:e.x,y:e.y}},e.hasValue=function(){return ri(this.x)&&ri(this.y)},e.getProps=function(t,e){var i=this,n=this.$animations;if(!e||!n)return i;var r={};return t.forEach((function(t){r[t]=n[t]&&n[t].active?n[t]._to:i[t]})),r},t}();Ti.defaults={},Ti.defaultRoutes=void 0;var Ai={values:function(t){return h(t)?t:""+t},numeric:function(t,e,n){if(0===t)return"0";var r,a=this.chart.options.locale,o=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(o<1e-4||o>1e15)&&(r="scientific");var s=n.length>3?n[2].value-n[1].value:n[1].value-n[0].value;Math.abs(s)>1&&t!==Math.floor(t)&&(s=t-Math.floor(t));var l=ni(Math.abs(s)),c=Math.max(Math.min(-1*Math.floor(l),20),0),u={notation:r,minimumFractionDigits:c,maximumFractionDigits:c};return i(u,this.options.ticks.format),new Intl.NumberFormat(a,u).format(t)},logarithmic:function(t,e,i){if(0===t)return"0";var n=t/Math.pow(10,Math.floor(ni(t)));return 1===n||2===n||5===n?Ai.numeric.call(this,t,e,i):""}},Oi={formatters:Ai};function Ei(t,e){for(var i=[],n=t.length/e,r=t.length,a=0;a<r;a+=n)i.push(t[Math.floor(a)]);return i}function Ci(t,e,i){var n,r=t.ticks.length,a=Math.min(e,r-1),o=t._startPixel,s=t._endPixel,l=t.getPixelForTick(a);if(!(i&&(n=1===r?Math.max(l-o,s-l):0===e?(t.getPixelForTick(1)-l)/2:(l-t.getPixelForTick(a-1))/2,(l+=a<e?n:-n)<o-1e-6||l>s+1e-6)))return l}function Li(t){return t.drawTicks?t.tickMarkLength:0}function Fi(t){if(!t.display)return 0;var e=bt(t.font),i=mt(t.padding);return e.lineHeight+i.height}function Ri(t,e,i,n,r){var a,o,s,l=p(n,0),c=Math.min(p(r,t.length),t.length),u=0;for(i=Math.ceil(i),r&&(i=(a=r-n)/Math.floor(a/i)),s=l;s<0;)u++,s=Math.round(l+u*i);for(o=Math.max(l,0);o<c;o++)o===s&&(e.push(t[o]),u++,s=Math.round(l+u*i))}D.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,lineWidth:0,strokeStyle:"",padding:0,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Oi.formatters.values,minor:{},major:{}}});var Ii=function(t){function e(e){var i;return(i=t.call(this)||this).id=e.id,i.type=e.type,i.options=void 0,i.ctx=e.ctx,i.chart=e.chart,i.top=void 0,i.bottom=void 0,i.left=void 0,i.right=void 0,i.width=void 0,i.height=void 0,i._margins={left:0,right:0,top:0,bottom:0},i.maxWidth=void 0,i.maxHeight=void 0,i.paddingTop=void 0,i.paddingBottom=void 0,i.paddingLeft=void 0,i.paddingRight=void 0,i.axis=void 0,i.labelRotation=void 0,i.min=void 0,i.max=void 0,i.ticks=[],i._gridLineItems=null,i._labelItems=null,i._labelSizes=null,i._length=0,i._longestTextCache={},i._startPixel=void 0,i._endPixel=void 0,i._reversePixels=!1,i._userMax=void 0,i._userMin=void 0,i._ticksLength=0,i._borderValue=0,i}n(e,t);var r=e.prototype;return r.init=function(t){var e=this;e.options=t,e.axis=e.isHorizontal()?"x":"y",e._userMin=e.parse(t.min),e._userMax=e.parse(t.max)},r.parse=function(t,e){return t},r.getUserBounds=function(){var t=this._userMin,e=this._userMax;return(u(t)||isNaN(t))&&(t=Number.POSITIVE_INFINITY),(u(e)||isNaN(e))&&(e=Number.NEGATIVE_INFINITY),{min:t,max:e,minDefined:f(t),maxDefined:f(e)}},r.getMinMax=function(t){var e,i=this.getUserBounds(),n=i.min,r=i.max,a=i.minDefined,o=i.maxDefined;if(a&&o)return{min:n,max:r};for(var s=this.getMatchingVisibleMetas(),l=0,c=s.length;l<c;++l)e=s[l].controller.getMinMax(this,t),a||(n=Math.min(n,e.min)),o||(r=Math.max(r,e.max));return{min:n,max:r}},r.invalidateCaches=function(){},r.getPadding=function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},r.getTicks=function(){return this.ticks},r.getLabels=function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},r.beforeUpdate=function(){g(this.options.beforeUpdate,[this])},r.update=function(t,e,n){var r=this,a=r.options.ticks,o=a.sampleSize;r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,r._margins=i({left:0,right:0,top:0,bottom:0},n),r.ticks=null,r._labelSizes=null,r._gridLineItems=null,r._labelItems=null,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeDataLimits(),r.determineDataLimits(),r.afterDataLimits(),r.beforeBuildTicks(),r.ticks=r.buildTicks()||[],r.afterBuildTicks();var s=o<r.ticks.length;r._convertTicksToLabels(s?Ei(r.ticks,o):r.ticks),r.configure(),r.beforeCalculateLabelRotation(),r.calculateLabelRotation(),r.afterCalculateLabelRotation(),r.beforeFit(),r.fit(),r.afterFit(),r.ticks=a.display&&(a.autoSkip||"auto"===a.source)?r._autoSkip(r.ticks):r.ticks,s&&r._convertTicksToLabels(r.ticks),r.afterUpdate()},r.configure=function(){var t,e,i=this,n=i.options.reverse;i.isHorizontal()?(t=i.left,e=i.right):(t=i.top,e=i.bottom,n=!n),i._startPixel=t,i._endPixel=e,i._reversePixels=n,i._length=e-t},r.afterUpdate=function(){g(this.options.afterUpdate,[this])},r.beforeSetDimensions=function(){g(this.options.beforeSetDimensions,[this])},r.setDimensions=function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},r.afterSetDimensions=function(){g(this.options.afterSetDimensions,[this])},r.beforeDataLimits=function(){g(this.options.beforeDataLimits,[this])},r.determineDataLimits=function(){},r.afterDataLimits=function(){g(this.options.afterDataLimits,[this])},r.beforeBuildTicks=function(){g(this.options.beforeBuildTicks,[this])},r.buildTicks=function(){return[]},r.afterBuildTicks=function(){g(this.options.afterBuildTicks,[this])},r.beforeTickToLabelConversion=function(){g(this.options.beforeTickToLabelConversion,[this])},r.generateTickLabels=function(t){var e,i,n,r=this.options.ticks;for(e=0,i=t.length;e<i;e++)(n=t[e]).label=g(r.callback,[n.value,e,t],this)},r.afterTickToLabelConversion=function(){g(this.options.afterTickToLabelConversion,[this])},r.beforeCalculateLabelRotation=function(){g(this.options.beforeCalculateLabelRotation,[this])},r.calculateLabelRotation=function(){var t,e,i,n=this,r=n.options,a=r.ticks,o=n.ticks.length,s=a.minRotation||0,l=a.maxRotation,c=s;if(!n._isVisible()||!a.display||s>=l||o<=1||!n.isHorizontal())n.labelRotation=s;else{var u=n._getLabelSizes(),h=u.widest.width,d=u.highest.height-u.highest.offset,f=Math.min(n.maxWidth,n.chart.width-h);h+6>(t=r.offset?n.maxWidth/o:f/(o-1))&&(t=f/(o-(r.offset?.5:1)),e=n.maxHeight-Li(r.gridLines)-a.padding-Fi(r.scaleLabel),i=Math.sqrt(h*h+d*d),c=ui(Math.min(Math.asin(Math.min((u.highest.height+6)/t,1)),Math.asin(Math.min(e/i,1))-Math.asin(d/i))),c=Math.max(s,Math.min(l,c))),n.labelRotation=c}},r.afterCalculateLabelRotation=function(){g(this.options.afterCalculateLabelRotation,[this])},r.beforeFit=function(){g(this.options.beforeFit,[this])},r.fit=function(){var t=this,e={width:0,height:0},i=t.chart,n=t.options,r=n.ticks,a=n.scaleLabel,o=n.gridLines,s=t._isVisible(),l="top"!==n.position&&"x"===t.axis,c=t.isHorizontal();if(c?e.width=t.maxWidth:s&&(e.width=Li(o)+Fi(a)),c?s&&(e.height=Li(o)+Fi(a)):e.height=t.maxHeight,r.display&&s&&t.ticks.length){var u=t._getLabelSizes(),h=u.first,d=u.last,f=u.widest,p=u.highest,g=.8*p.offset,v=r.padding;if(c){var m=0!==t.labelRotation,b=ci(t.labelRotation),x=Math.cos(b),y=Math.sin(b),_=y*f.width+x*(p.height-(m?p.offset:0))+(m?0:g);e.height=Math.min(t.maxHeight,e.height+_+v);var M,w,k=t.getPixelForTick(0)-t.left,P=t.right-t.getPixelForTick(t.ticks.length-1);m?(M=l?x*h.width+y*h.offset:y*(h.height-h.offset),w=l?y*(d.height-d.offset):x*d.width+y*d.offset):(M=h.width/2,w=d.width/2),t.paddingLeft=Math.max((M-k)*t.width/(t.width-k),0)+3,t.paddingRight=Math.max((w-P)*t.width/(t.width-P),0)+3}else{var S=r.mirror?0:f.width+v+g;e.width=Math.min(t.maxWidth,e.width+S),t.paddingTop=d.height/2,t.paddingBottom=h.height/2}}t._handleMargins(),c?(t.width=t._length=i.width-t._margins.left-t._margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=i.height-t._margins.top-t._margins.bottom)},r._handleMargins=function(){var t=this;t._margins&&(t._margins.left=Math.max(t.paddingLeft,t._margins.left),t._margins.top=Math.max(t.paddingTop,t._margins.top),t._margins.right=Math.max(t.paddingRight,t._margins.right),t._margins.bottom=Math.max(t.paddingBottom,t._margins.bottom))},r.afterFit=function(){g(this.options.afterFit,[this])},r.isHorizontal=function(){var t=this.options,e=t.axis,i=t.position;return"top"===i||"bottom"===i||"x"===e},r.isFullWidth=function(){return this.options.fullWidth},r._convertTicksToLabels=function(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t),this.afterTickToLabelConversion()},r._getLabelSizes=function(){var t=this._labelSizes;return t||(this._labelSizes=t=this._computeLabelSizes()),t},r._computeLabelSizes=function(){var t=this,e=t.ctx,i=t._longestTextCache,n=t.options.ticks.sampleSize,r=[],a=[],o=[],s=t.ticks;n<s.length&&(s=Ei(s,n));var l,c,d,f,p,g,m,b,x,y,_,M=s.length;for(l=0;l<M;++l){if(f=s[l].label,p=t._resolveTickFontOptions(l),e.font=g=p.string,m=i[g]=i[g]||{data:{},gc:[]},b=p.lineHeight,x=y=0,u(f)||h(f)){if(h(f))for(c=0,d=f.length;c<d;++c)u(_=f[c])||h(_)||(x=R(e,m.data,m.gc,x,_),y+=b)}else x=R(e,m.data,m.gc,x,f),y=b;r.push(x),a.push(y),o.push(b/2)}!function(t,e){v(t,(function(t){var i,n=t.gc,r=n.length/2;if(r>e){for(i=0;i<r;++i)delete t.data[n[i]];n.splice(0,r)}}))}(i,M);var w=r.indexOf(Math.max.apply(null,r)),k=a.indexOf(Math.max.apply(null,a));function P(t){return{width:r[t]||0,height:a[t]||0,offset:o[t]||0}}return{first:P(0),last:P(M-1),widest:P(w),highest:P(k)}},r.getLabelForValue=function(t){return t},r.getPixelForValue=function(t,e){return NaN},r.getValueForPixel=function(t){},r.getPixelForTick=function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)},r.getPixelForDecimal=function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},r.getDecimalForPixel=function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},r.getBasePixel=function(){return this.getPixelForValue(this.getBaseValue())},r.getBaseValue=function(){var t=this.min,e=this.max;return t<0&&e<0?e:t>0&&e>0?t:0},r._autoSkip=function(t){var e=this.options.ticks,i=e.maxTicksLimit||this._length/this._tickSize(),n=e.major.enabled?function(t){var e,i,n=[];for(e=0,i=t.length;e<i;e++)t[e].major&&n.push(e);return n}(t):[],r=n.length,a=n[0],o=n[r-1],s=[];if(r>i)return function(t,e,i,n){var r,a=0,o=i[0];for(n=Math.ceil(n),r=0;r<t.length;r++)r===o&&(e.push(t[r]),o=i[++a*n])}(t,s,n,r/i),s;var l=function(t,e,i){var n=function(t){var e,i,n=t.length;if(n<2)return!1;for(i=t[0],e=1;e<n;++e)if(t[e]-t[e-1]!==i)return!1;return i}(t),r=e.length/i;if(!n)return Math.max(r,1);for(var a=ii(n),o=0,s=a.length-1;o<s;o++){var l=a[o];if(l>r)return l}return Math.max(r,1)}(n,t,i);if(r>0){var c,h,d=r>1?Math.round((o-a)/(r-1)):null;for(Ri(t,s,l,u(d)?0:a-d,a),c=0,h=r-1;c<h;c++)Ri(t,s,l,n[c],n[c+1]);return Ri(t,s,l,o,u(d)?t.length:o+d),s}return Ri(t,s,l),s},r._tickSize=function(){var t=this.options.ticks,e=ci(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),r=this._getLabelSizes(),a=t.autoSkipPadding||0,o=r?r.widest.width+a:0,s=r?r.highest.height+a:0;return this.isHorizontal()?s*i>o*n?o/i:s/n:s*n<o*i?s/i:o/n},r._isVisible=function(){var t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0},r._computeGridLineItems=function(t){var e,i,n,r,a,o,s,l,c,u,h,f,p=this,g=p.axis,v=p.chart,m=p.options,b=m.gridLines,x=m.position,y=b.offsetGridLines,_=p.isHorizontal(),M=p.ticks,w=M.length+(y?1:0),k=Li(b),P=[],S={chart:v,scale:p,tick:M[0],index:0},D=b.drawBorder?xt([b.borderWidth,b.lineWidth,0],S,0):0,T=D/2,A=function(t){return z(v,t,D)};if("top"===x)e=A(p.bottom),o=p.bottom-k,l=e-T,u=A(t.top)+T,f=t.bottom;else if("bottom"===x)e=A(p.top),u=t.top,f=A(t.bottom)-T,o=e+T,l=p.top+k;else if("left"===x)e=A(p.right),a=p.right-k,s=e-T,c=A(t.left)+T,h=t.right;else if("right"===x)e=A(p.left),c=t.left,h=A(t.right)-T,a=e+T,s=p.left+k;else if("x"===g){if("center"===x)e=A((t.top+t.bottom)/2);else if(d(x)){var O=Object.keys(x)[0],E=x[O];e=A(p.chart.scales[O].getPixelForValue(E))}u=t.top,f=t.bottom,l=(o=e+T)+k}else if("y"===g){if("center"===x)e=A((t.left+t.right)/2);else if(d(x)){var C=Object.keys(x)[0],L=x[C];e=A(p.chart.scales[C].getPixelForValue(L))}s=(a=e-T)-k,c=t.left,h=t.right}for(i=0;i<w;++i){var F=M[i]||{};S={chart:v,scale:p,tick:F,index:i};var R=xt([b.lineWidth],S,i),I=xt([b.color],S,i),V=b.borderDash||[],B=xt([b.borderDashOffset],S,i);void 0!==(n=Ci(p,i,y))&&(r=z(v,n,R),_?a=s=c=h=r:o=l=u=f=r,P.push({tx1:a,ty1:o,tx2:s,ty2:l,x1:c,y1:u,x2:h,y2:f,width:R,color:I,borderDash:V,borderDashOffset:B}))}return p._ticksLength=w,p._borderValue=e,P},r._computeLabelItems=function(t){var e,i,n,r,a,o,s,l,c,u,f,p=this,g=p.axis,v=p.options,m=v.position,b=v.ticks,x=b.mirror,y=p.isHorizontal(),_=p.ticks,M=b.padding,w=Li(v.gridLines),k=-ci(p.labelRotation),P=[];if("top"===m)a=p.bottom-w-M,o=k?"left":"center";else if("bottom"===m)a=p.top+w+M,o=k?"right":"center";else if("left"===m)r=p.right-(x?0:w)-M,o=x?"left":"right";else if("right"===m)r=p.left+(x?0:w)+M,o=x?"right":"left";else if("x"===g){if("center"===m)a=(t.top+t.bottom)/2+w+M;else if(d(m)){var S=Object.keys(m)[0],D=m[S];a=p.chart.scales[S].getPixelForValue(D)+w+M}o=k?"right":"center"}else if("y"===g){if("center"===m)r=(t.left+t.right)/2-w-M;else if(d(m)){var T=Object.keys(m)[0],A=m[T];r=p.chart.scales[T].getPixelForValue(A)}o="right"}for(e=0,i=_.length;e<i;++e)n=_[e].label,s=p.getPixelForTick(e)+b.labelOffset,c=(l=p._resolveTickFontOptions(e)).lineHeight,u=h(n)?n.length:1,y?(r=s,"top"===m?(f=(Math.sin(k)*(u/2)+.5)*c,f-=(0===k?u-.5:Math.cos(k)*(u/2))*c):(f=Math.sin(k)*(u/2)*c,f+=(0===k?.5:Math.cos(k)*(u/2))*c)):(a=s,f=(1-u)*c/2),P.push({x:r,y:a,rotation:k,label:n,font:l,textOffset:f,textAlign:o});return P},r.drawGrid=function(t){var e,i,n=this,r=n.options.gridLines,a=n.ctx,o=n.chart,s={chart:o,scale:n,tick:n.ticks[0],index:0},l=r.drawBorder?xt([r.borderWidth,r.lineWidth,0],s,0):0,c=n._gridLineItems||(n._gridLineItems=n._computeGridLineItems(t));if(r.display)for(e=0,i=c.length;e<i;++e){var u=c[e],h=u.width,d=u.color;h&&d&&(a.save(),a.lineWidth=h,a.strokeStyle=d,a.setLineDash&&(a.setLineDash(u.borderDash),a.lineDashOffset=u.borderDashOffset),a.beginPath(),r.drawTicks&&(a.moveTo(u.tx1,u.ty1),a.lineTo(u.tx2,u.ty2)),r.drawOnChartArea&&(a.moveTo(u.x1,u.y1),a.lineTo(u.x2,u.y2)),a.stroke(),a.restore())}if(l){var f=l;s={chart:o,scale:n,tick:n.ticks[n._ticksLength-1],index:n._ticksLength-1};var p,g,v,m,b=xt([r.lineWidth,1],s,n._ticksLength-1),x=n._borderValue;n.isHorizontal()?(p=z(o,n.left,f)-f/2,g=z(o,n.right,b)+b/2,v=m=x):(v=z(o,n.top,f)-f/2,m=z(o,n.bottom,b)+b/2,p=g=x),a.lineWidth=l,a.strokeStyle=xt([r.borderColor,r.color],s,0),a.beginPath(),a.moveTo(p,v),a.lineTo(g,m),a.stroke()}},r.drawLabels=function(t){var e=this;if(e.options.ticks.display){var i,n,r,a,o=e.ctx,s=e._labelItems||(e._labelItems=e._computeLabelItems(t));for(i=0,r=s.length;i<r;++i){var l=s[i],c=l.font,u=c.lineWidth>0&&""!==c.strokeStyle;o.save(),o.translate(l.x,l.y),o.rotate(l.rotation),o.font=c.string,o.fillStyle=c.color,o.textBaseline="middle",o.textAlign=l.textAlign,u&&(o.strokeStyle=c.strokeStyle,o.lineWidth=c.lineWidth);var d=l.label,f=l.textOffset;if(h(d))for(n=0,a=d.length;n<a;++n)u&&o.strokeText(""+d[n],0,f),o.fillText(""+d[n],0,f),f+=c.lineHeight;else u&&o.strokeText(d,0,f),o.fillText(d,0,f);o.restore()}}},r.drawTitle=function(t){var e=this,i=e.ctx,n=e.options,r=n.scaleLabel;if(r.display){var a,o,s,l=bt(r.font),c=mt(r.padding),u=l.lineHeight/2,h=r.align,d=n.position,f=e.options.reverse,p=0;if(e.isHorizontal()){switch(h){case"start":o=e.left+(f?e.width:0),a=f?"right":"left";break;case"end":o=e.left+(f?0:e.width),a=f?"left":"right";break;default:o=e.left+e.width/2,a="center"}s="top"===d?e.top+u+c.top:e.bottom-u-c.bottom}else{var g="left"===d;switch(o=g?e.left+u+c.top:e.right-u-c.top,h){case"start":s=e.top+(f?0:e.height),a=f===g?"right":"left";break;case"end":s=e.top+(f?e.height:0),a=f===g?"left":"right";break;default:s=e.top+e.height/2,a="center"}p=g?-.5*Math.PI:.5*Math.PI}i.save(),i.translate(o,s),i.rotate(p),i.textAlign=a,i.textBaseline="middle",i.fillStyle=l.color,i.font=l.string,i.fillText(r.labelString,0,0),i.restore()}},r.draw=function(t){this._isVisible()&&(this.drawGrid(t),this.drawTitle(),this.drawLabels(t))},r._layers=function(){var t=this,e=t.options,i=e.ticks&&e.ticks.z||0,n=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&i!==n&&t.draw===t._draw?[{z:n,draw:function(e){t.drawGrid(e),t.drawTitle()}},{z:i,draw:function(e){t.drawLabels(e)}}]:[{z:i,draw:function(e){t.draw(e)}}]},r.getMatchingVisibleMetas=function(t){var e,i,n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",a=[];for(e=0,i=n.length;e<i;++e){var o=n[e];o[r]!==this.id||t&&o.type!==t||a.push(o)}return a},r._resolveTickFontOptions=function(t){var e=this.options.ticks,i=this.ticks||[],n={chart:this.chart,scale:this,tick:i[t],index:t};return bt(xt([e.font],n))},e}(Ti);Ii.prototype._draw=Ii.prototype.draw;var zi=function(){function t(t,e){this.type=t,this.scope=e,this.items=Object.create(null)}var e=t.prototype;return e.isForType=function(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)},e.register=function(t){var e,n=Object.getPrototypeOf(t);(function(t){return"id"in t&&"defaults"in t})(n)&&(e=this.register(n));var r=this.items,a=t.id,o=this.scope,s=o?o+"."+a:a;if(!a)throw new Error("class does not have id: "+t);return a in r||(r[a]=t,function(t,e,n){var r=n?i({},D.get(n),t.defaults):t.defaults;D.set(e,r),t.defaultRoutes&&function(t,e){Object.keys(e).forEach((function(i){var n=e[i].split("."),r=n.pop(),a=n.join(".");D.route(t,i,a,r)}))}(e,t.defaultRoutes)}(t,s,e)),s},e.get=function(t){return this.items[t]},e.unregister=function(t){var e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in D[n]?delete D[n][i]:i in D&&delete D[i]},t}();var Vi=new(function(){function t(){this.controllers=new zi(Di,""),this.elements=new zi(Ti,"elements"),this.plugins=new zi(Object,"plugins"),this.scales=new zi(Ii,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}var e=t.prototype;return e.add=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e)},e.remove=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("unregister",e)},e.addControllers=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.controllers)},e.addElements=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.elements)},e.addPlugins=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.plugins)},e.addScales=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];this._each("register",e,this.scales)},e.getController=function(t){return this._get(t,this.controllers,"controller")},e.getElement=function(t){return this._get(t,this.elements,"element")},e.getPlugin=function(t){return this._get(t,this.plugins,"plugin")},e.getScale=function(t){return this._get(t,this.scales,"scale")},e._each=function(t,e,i){var n=this;[].concat(e).forEach((function(e){var r=i||n._getRegistryForType(e);r.isForType(e)||r===n.plugins&&e.id?n._exec(t,r,e):v(e,(function(e){var r=i||n._getRegistryForType(e);n._exec(t,r,e)}))}))},e._exec=function(t,e,i){var n=k(t);g(i["before"+n],[],i),e[t](i),g(i["after"+n],[],i)},e._getRegistryForType=function(t){for(var e=0;e<this._typedRegistries.length;e++){var i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins},e._get=function(t,e,i){var n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n},t}()),Bi=function(){function t(){}var e=t.prototype;return e.notify=function(t,e,i){for(var n=this._descriptors(t),r=0;r<n.length;++r){var a=n[r],o=a.plugin,s=o[e];if("function"==typeof s){var l=[t].concat(i||[]);if(l.push(a.options),!1===s.apply(o,l))return!1}}return!0},e.invalidate=function(){this._cache=void 0},e._descriptors=function(t){if(this._cache)return this._cache;var e=t&&t.config||{},i=e.options&&e.options.plugins||{},n=function(t,e){for(var i=[],n=0;n<t.length;n++){var r=t[n],a=r.id,o=e[a];!1!==o&&(!0===o&&(o={}),i.push({plugin:r,options:_({},[o,D.plugins[a]])}))}return i}(function(t){for(var e=[],i=Object.keys(Vi.plugins.items),n=0;n<i.length;n++)e.push(Vi.getPlugin(i[n]));for(var r=t.plugins||[],a=0;a<r.length;a++){var o=r[a];-1===e.indexOf(o)&&e.push(o)}return e}(e),i);return this._cache=n,n},t}();function Wi(t,e){var i=(D[t]||{}).datasets||{};return((e[t]||{}).datasets||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ni(t,e){e=e||{};var i=D[t.type]||{scales:{}},n=e.scales||{},r=Wi(t.type,e),a={},o={};return Object.keys(n).forEach((function(t){var e=n[t],s=Xi(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(s,r);a[s]=a[s]||t,o[t]=_({axis:s},[e,i.scales[s],i.scales[l]])})),e.scale&&(o[e.scale.id||"r"]=_({axis:"r"},[e.scale,i.scales.r]),a.r=a.r||e.scale.id||"r"),t.data.datasets.forEach((function(i){var r=i.type||t.type,s=i.indexAxis||Wi(r,e),l=(D[r]||{}).scales||{};Object.keys(l).forEach((function(t){var e=function(t,e){var i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,s),r=i[e+"AxisID"]||a[e]||e;o[r]=o[r]||{},_(o[r],[{axis:e},n[r],l[t]])}))})),Object.keys(o).forEach((function(t){var e=o[t];_(e,[D.scales[e.type],D.scale])})),o}function Hi(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return y({},e,{merger:function(t,e,i,n){"scales"!==t&&"scale"!==t&&x(t,e,i,n)}})}var ji=["top","bottom","left","right","chartArea"];function Yi(t,e){return"top"===t||"bottom"===t||-1===ji.indexOf(t)&&"x"===e}function Xi(t,e){return"x"===t||"y"===t||"r"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Ui(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function qi(t){var e=t.chart,i=e.options.animation;e._plugins.notify(e,"afterRender"),g(i&&i.onComplete,[t],e)}function Ki(t){var e=t.chart,i=e.options.animation;g(i&&i.onProgress,[t],e)}function Gi(){return"undefined"!=typeof window&&"undefined"!=typeof document}var $i=function(){function t(e,i){var n=this;i=function(t){var e=(t=t||{}).data=t.data||{datasets:[],labels:[]};e.datasets=e.datasets||[],e.labels=e.labels||[];var i=Ni(t,t.options),n=t.options=Hi(D,D[t.type],t.options||{});return n.scales=i,n.title=!1!==n.title&&y({},[D.plugins.title,n.title]),n.tooltips=!1!==n.tooltips&&y({},[D.plugins.tooltip,n.tooltips]),t}(i);var r=function(t){return Gi()&&"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}(e);this.platform=n._initializePlatform(r,i);var a=n.platform.acquireContext(r,i),s=a&&a.canvas,l=s&&s.height,u=s&&s.width;this.id=c(),this.ctx=a,this.canvas=s,this.config=i,this.width=u,this.height=l,this.aspectRatio=l?u/l:null,this.options=i.options,this._bufferedRender=!1,this._layers=[],this._metasets=[],this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this.data=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._sortedMetasets=[],this._updating=!1,this.scales={},this.scale=void 0,this._plugins=new Bi,this.$proxies={},this._hiddenIndices={},this.attached=!1,t.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),a&&s?(o.listen(n,"complete",qi),o.listen(n,"progress",Ki),n._initialize(),n.attached&&n.update()):console.error("Failed to create chart: can't acquire context from the given item")}var e=t.prototype;return e._initialize=function(){var t=this;return t._plugins.notify(t,"beforeInit"),t.options.responsive?t.resize(!0):st(t,t.options.devicePixelRatio),t.bindEvents(),t._plugins.notify(t,"afterInit"),t},e._initializePlatform=function(t,e){return e.platform?new e.platform:!Gi()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?new Ct:new he},e.clear=function(){return V(this),this},e.stop=function(){return o.stop(this),this},e.resize=function(t,e,i){var n=this,r=n.options,a=n.canvas,o=function(t,e,i,n){return void 0!==e&&void 0!==i||(e=at(t),i=ot(t)),{width:e=Math.max(0,Math.floor(e)),height:Math.max(0,Math.floor(n?e/n:i))}}(a,e,i,r.maintainAspectRatio&&n.aspectRatio),s=n.currentDevicePixelRatio,l=r.devicePixelRatio||n.platform.getDevicePixelRatio();n.width===o.width&&n.height===o.height&&s===l||(a.width=n.width=o.width,a.height=n.height=o.height,a.style&&(a.style.width=o.width+"px",a.style.height=o.height+"px"),st(n,l),t||(n._plugins.notify(n,"resize",[o]),g(r.onResize,[o],n),n.attached&&n.update("resize")))},e.ensureScalesHaveIDs=function(){var t=this.options,e=t.scales||{},i=t.scale;v(e,(function(t,e){t.id=e})),i&&(i.id=i.id||"scale")},e.buildOrUpdateScales=function(){var t=this,e=t.options,i=e.scales,n=t.scales||{},r=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{}),a=[];i&&(a=a.concat(Object.keys(i).map((function(t){var e=i[t],n=Xi(t,e),r="r"===n,a="x"===n;return{options:e,dposition:r?"chartArea":a?"bottom":"left",dtype:r?"radialLinear":a?"category":"linear"}})))),v(a,(function(i){var a=i.options,o=a.id,s=Xi(o,a),l=p(a.type,i.dtype);void 0!==a.position&&Yi(a.position,s)===Yi(i.dposition)||(a.position=i.dposition),r[o]=!0;var c=null;o in n&&n[o].type===l?c=n[o]:(c=new(Vi.getScale(l))({id:o,type:l,ctx:t.ctx,chart:t}),n[c.id]=c);c.init(a,e),i.isDefault&&(t.scale=c)})),v(r,(function(t,e){t||delete n[e]})),t.scales=n,v(n,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,Ot.addBox(t,e)}))},e._updateMetasetIndex=function(t,e){var i=this._metasets,n=t.index;n!==e&&(i[n]=i[e],i[e]=t,t.index=e)},e._updateMetasets=function(){var t=this._metasets,e=this.data.datasets.length,i=t.length;if(i>e){for(var n=e;n<i;++n)this._destroyDatasetMeta(n);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Ui("order","index"))},e.buildOrUpdateControllers=function(){var t,e,n=this,r=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var o=a[t],s=n.getDatasetMeta(t),l=o.type||n.config.type;if(s.type&&s.type!==l&&(n._destroyDatasetMeta(t),s=n.getDatasetMeta(t)),s.type=l,s.indexAxis=o.indexAxis||Wi(l,n.options),s.order=o.order||0,n._updateMetasetIndex(s,t),s.label=""+o.label,s.visible=n.isDatasetVisible(t),s.controller)s.controller.updateIndex(t),s.controller.linkScales();else{var c=D[l],u=Vi.getController(l);i(u.prototype,{dataElementType:Vi.getElement(c.dataElementType),datasetElementType:c.datasetElementType&&Vi.getElement(c.datasetElementType),dataElementOptions:c.dataElementOptions,datasetElementOptions:c.datasetElementOptions}),s.controller=new u(n,t),r.push(s.controller)}}return n._updateMetasets(),r},e._resetElements=function(){var t=this;v(t.data.datasets,(function(e,i){t.getDatasetMeta(i).controller.reset()}),t)},e.reset=function(){this._resetElements(),this._plugins.notify(this,"reset")},e.update=function(t){var e,i,n=this;if(n._updating=!0,function(t){var e=t.options;v(t.scales,(function(e){Ot.removeBox(t,e)}));var i=Ni(t.config,e);e=Hi(D,D[t.config.type],e),t.options=t.config.options=e,t.options.scales=i,t._animationsDisabled=!e.animation}(n),n.ensureScalesHaveIDs(),n.buildOrUpdateScales(),n._plugins.invalidate(),!1!==n._plugins.notify(n,"beforeUpdate")){var r=n.buildOrUpdateControllers();for(e=0,i=n.data.datasets.length;e<i;e++)n.getDatasetMeta(e).controller.buildOrUpdateElements();n._updateLayout(),n.options.animation&&v(r,(function(t){t.reset()})),n._updateDatasets(t),n._plugins.notify(n,"afterUpdate"),n._layers.sort(Ui("z","_idx")),n._lastEvent&&n._eventHandler(n._lastEvent,!0),n.render(),n._updating=!1}},e._updateLayout=function(){var t=this;!1!==t._plugins.notify(t,"beforeLayout")&&(Ot.update(t,t.width,t.height),t._layers=[],v(t.boxes,(function(e){var i;e.configure&&e.configure(),(i=t._layers).push.apply(i,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),t._plugins.notify(t,"afterLayout"))},e._updateDatasets=function(t){var e=this,i="function"==typeof t;if(!1!==e._plugins.notify(e,"beforeDatasetsUpdate")){for(var n=0,r=e.data.datasets.length;n<r;++n)e._updateDataset(n,i?t({datasetIndex:n}):t);e._plugins.notify(e,"afterDatasetsUpdate")}},e._updateDataset=function(t,e){var i=this,n=i.getDatasetMeta(t),r={meta:n,index:t,mode:e};!1!==i._plugins.notify(i,"beforeDatasetUpdate",[r])&&(n.controller._update(e),i._plugins.notify(i,"afterDatasetUpdate",[r]))},e.render=function(){var t=this,e=t.options.animation;if(!1!==t._plugins.notify(t,"beforeRender")){o.has(t)?t.attached&&!o.running(t)&&o.start(t):(t.draw(),t._plugins.notify(t,"afterRender"),g(e&&e.onComplete,[],t))}},e.draw=function(){var t,e=this;if(e.clear(),!(e.width<=0||e.height<=0)&&!1!==e._plugins.notify(e,"beforeDraw")){var i=e._layers;for(t=0;t<i.length&&i[t].z<=0;++t)i[t].draw(e.chartArea);for(e._drawDatasets();t<i.length;++t)i[t].draw(e.chartArea);e._plugins.notify(e,"afterDraw")}},e._getSortedDatasetMetas=function(t){var e,i,n=this._sortedMetasets,r=[];for(e=0,i=n.length;e<i;++e){var a=n[e];t&&!a.visible||r.push(a)}return r},e.getSortedVisibleDatasetMetas=function(){return this._getSortedDatasetMetas(!0)},e._drawDatasets=function(){var t=this;if(!1!==t._plugins.notify(t,"beforeDatasetsDraw")){for(var e=t.getSortedVisibleDatasetMetas(),i=e.length-1;i>=0;--i)t._drawDataset(e[i]);t._plugins.notify(t,"afterDatasetsDraw")}},e._drawDataset=function(t){var e=this,i=e.ctx,n=t._clip,r=e.chartArea,a={meta:t,index:t.index};!1!==e._plugins.notify(e,"beforeDatasetDraw",[a])&&(N(i,{left:!1===n.left?0:r.left-n.left,right:!1===n.right?e.width:r.right+n.right,top:!1===n.top?0:r.top-n.top,bottom:!1===n.bottom?e.height:r.bottom+n.bottom}),t.controller.draw(),H(i),e._plugins.notify(e,"afterDatasetDraw",[a]))},e.getElementAtEvent=function(t){return gt.modes.nearest(this,t,{intersect:!0})},e.getElementsAtEvent=function(t){return gt.modes.index(this,t,{intersect:!0})},e.getElementsAtXAxis=function(t){return gt.modes.index(this,t,{intersect:!1})},e.getElementsAtEventForMode=function(t,e,i,n){var r=gt.modes[e];return"function"==typeof r?r(this,t,i,n):[]},e.getDatasetAtEvent=function(t){return gt.modes.dataset(this,t,{intersect:!0})},e.getDatasetMeta=function(t){var e=this.data.datasets[t],i=this._metasets,n=i.filter((function(t){return t._dataset===e})).pop();return n||(n=i[t]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1}),n},e.getVisibleDatasetCount=function(){return this.getSortedVisibleDatasetMetas().length},e.isDatasetVisible=function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},e.setDatasetVisibility=function(t,e){this.getDatasetMeta(t).hidden=!e},e.toggleDataVisibility=function(t){this._hiddenIndices[t]=!this._hiddenIndices[t]},e.getDataVisibility=function(t){return!this._hiddenIndices[t]},e._updateDatasetVisibility=function(t,e){var i=e?"show":"hide",n=this.getDatasetMeta(t),r=n.controller._resolveAnimations(void 0,i);this.setDatasetVisibility(t,e),r.update(n,{visible:e}),this.update((function(e){return e.datasetIndex===t?i:void 0}))},e.hide=function(t){this._updateDatasetVisibility(t,!1)},e.show=function(t){this._updateDatasetVisibility(t,!0)},e._destroyDatasetMeta=function(t){var e=this._metasets&&this._metasets[t];e&&(e.controller._destroy(),delete this._metasets[t])},e.destroy=function(){var e,i,n=this,r=n.canvas;for(n.stop(),o.remove(n),e=0,i=n.data.datasets.length;e<i;++e)n._destroyDatasetMeta(e);r&&(n.unbindEvents(),V(n),n.platform.releaseContext(n.ctx),n.canvas=null,n.ctx=null),n._plugins.notify(n,"destroy"),delete t.instances[n.id]},e.toBase64Image=function(){var t;return(t=this.canvas).toDataURL.apply(t,arguments)},e.bindEvents=function(){var t=this,e=t._listeners,i=t.platform,n=function(n,r){i.addEventListener(t,n,r),e[n]=r},r=function(n,r){e[n]&&(i.removeEventListener(t,n,r),delete e[n])},a=function(e){t._eventHandler(e)};if(v(t.options.events,(function(t){return n(t,a)})),t.options.responsive){var o;a=function(e,i){t.canvas&&t.resize(!1,e,i)};var s=function e(){r("attach",e),t.resize(),t.attached=!0,n("resize",a),n("detach",o)};o=function(){t.attached=!1,r("resize",a),n("attach",s)},i.isAttached(t.canvas)?s():o()}else t.attached=!0},e.unbindEvents=function(){var t=this,e=t._listeners;e&&(delete t._listeners,v(e,(function(e,i){t.platform.removeEventListener(t,i,e)})))},e.updateHoverStyle=function(t,e,i){var n,r,a,o=i?"set":"remove";for("dataset"===e&&this.getDatasetMeta(t[0].datasetIndex).controller["_"+o+"DatasetHoverStyle"](),r=0,a=t.length;r<a;++r)(n=t[r])&&this.getDatasetMeta(n.datasetIndex).controller[o+"HoverStyle"](n.element,n.datasetIndex,n.index)},e._updateHoverStyles=function(t,e){var i=(this.options||{}).hover;e.length&&this.updateHoverStyle(e,i.mode,!1),t.length&&i.mode&&this.updateHoverStyle(t,i.mode,!0)},e._eventHandler=function(t,e){var i=this;if(!1!==i._plugins.notify(i,"beforeEvent",[t,e]))return i._handleEvent(t,e),i._plugins.notify(i,"afterEvent",[t,e]),i.render(),i},e._handleEvent=function(t,e){var i,n=this,r=n._active||[],a=n.options,o=a.hover,s=e,l=[];return"mouseout"===t.type?n._lastEvent=null:(l=n.getElementsAtEventForMode(t,o.mode,o,s),n._lastEvent="click"===t.type?n._lastEvent:t),g(a.onHover||a.hover.onHover,[t,l,n],n),"mouseup"!==t.type&&"click"!==t.type||W(t,n.chartArea)&&g(a.onClick,[t,l,n],n),((i=!m(l,r))||e)&&(n._active=l,n._updateHoverStyles(l,r)),i},t}();$i.version="3.0.0-alpha.2",$i.instances={},$i.registry=Vi;var Zi=function(){return v($i.instances,(function(t){return t._plugins.invalidate()}))};$i.register=function(){Vi.add.apply(Vi,arguments),Zi()},$i.unregister=function(){Vi.remove.apply(Vi,arguments),Zi()};var Qi=Number.EPSILON||1e-14;function Ji(t,e,i,n){var r=t.skip?e:t,a=e,o=i.skip?e:i,s=Math.sqrt(Math.pow(a.x-r.x,2)+Math.pow(a.y-r.y,2)),l=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),c=s/(s+l),u=l/(s+l),h=n*(c=isNaN(c)?0:c),d=n*(u=isNaN(u)?0:u);return{previous:{x:a.x-h*(o.x-r.x),y:a.y-h*(o.y-r.y)},next:{x:a.x+d*(o.x-r.x),y:a.y+d*(o.y-r.y)}}}function tn(t){var e,i,n,r,a,o,s,l,c,u=(t||[]).map((function(t){return{model:t,deltaK:0,mK:0}})),h=u.length;for(e=0;e<h;++e)if(!(n=u[e]).model.skip){if(i=e>0?u[e-1]:null,(r=e<h-1?u[e+1]:null)&&!r.model.skip){var d=r.model.x-n.model.x;n.deltaK=0!==d?(r.model.y-n.model.y)/d:0}!i||i.model.skip?n.mK=n.deltaK:!r||r.model.skip?n.mK=i.deltaK:li(i.deltaK)!==li(n.deltaK)?n.mK=0:n.mK=(i.deltaK+n.deltaK)/2}for(e=0;e<h-1;++e)n=u[e],r=u[e+1],n.model.skip||r.model.skip||(ai(n.deltaK,0,Qi)?n.mK=r.mK=0:(a=n.mK/n.deltaK,o=r.mK/n.deltaK,(l=Math.pow(a,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),n.mK=a*s*n.deltaK,r.mK=o*s*n.deltaK)));for(e=0;e<h;++e)(n=u[e]).model.skip||(i=e>0?u[e-1]:null,r=e<h-1?u[e+1]:null,i&&!i.model.skip&&(c=(n.model.x-i.model.x)/3,n.model.controlPointPreviousX=n.model.x-c,n.model.controlPointPreviousY=n.model.y-c*n.mK),r&&!r.model.skip&&(c=(r.model.x-n.model.x)/3,n.model.controlPointNextX=n.model.x+c,n.model.controlPointNextY=n.model.y+c*n.mK))}function en(t,e,i){return Math.max(Math.min(t,i),e)}function nn(t,e,i,n){var r,a,o,s;if(e.spanGaps&&(t=t.filter((function(t){return!t.skip}))),"monotone"===e.cubicInterpolationMode)tn(t);else{var l=n?t[t.length-1]:t[0];for(r=0,a=t.length;r<a;++r)s=Ji(l,o=t[r],t[Math.min(r+1,a-(n?0:1))%a],e.tension),o.controlPointPreviousX=s.previous.x,o.controlPointPreviousY=s.previous.y,o.controlPointNextX=s.next.x,o.controlPointNextY=s.next.y,l=o}e.capBezierPoints&&function(t,e){var i,n,r;for(i=0,n=t.length;i<n;++i)W(r=t[i],e)&&(i>0&&W(t[i-1],e)&&(r.controlPointPreviousX=en(r.controlPointPreviousX,e.left,e.right),r.controlPointPreviousY=en(r.controlPointPreviousY,e.top,e.bottom)),i<t.length-1&&W(t[i+1],e)&&(r.controlPointNextX=en(r.controlPointNextX,e.left,e.right),r.controlPointNextY=en(r.controlPointNextY,e.top,e.bottom)))}(t,i)}function rn(t,e,i){return t?function(t,e){return{x:function(i){return t+t+e-i},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,i):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}}function an(t,e){var i,n;"ltr"!==e&&"rtl"!==e||(n=[(i=t.canvas.style).getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function on(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}var sn=i({},P,{canvas:X,curve:Object.freeze({__proto__:null,splineCurve:Ji,splineCurveMonotone:tn,_updateBezierControlPoints:nn}),dom:lt,easing:{effects:fe},options:yt,math:bi,rtl:Object.freeze({__proto__:null,getRtlAdapter:rn,overrideTextDirection:an,restoreTextDirection:on}),requestAnimFrame:a,fontString:function(t,e,i){return e+" "+t+"px "+i},color:qe,getHoverColor:Ke});function ln(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}var cn=function(){function t(t){this.options=t||{}}var e=t.prototype;return e.formats=function(){return ln()},e.parse=function(t,e){return ln()},e.format=function(t,e){return ln()},e.add=function(t,e,i){return ln()},e.diff=function(t,e,i){return ln()},e.startOf=function(t,e,i){return ln()},e.endOf=function(t,e){return ln()},t}();cn.override=function(t){i(cn.prototype,t)};var un={_date:cn};function hn(t,e,i,n){return h(t)?function(t,e,i,n){var r=i.parse(t[0],n),a=i.parse(t[1],n),o=Math.min(r,a),s=Math.max(r,a),l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:a,min:o,max:s}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function dn(t,e,i,n){var r,a,o,s,l=t.iScale,c=t.vScale,u=l.getLabels(),h=l===c,d=[];for(r=i,a=i+n;r<a;++r)s=e[r],(o={})[l.axis]=h||l.parse(u[r],r),d.push(hn(s,o,c,r));return d}function fn(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}var pn=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var i=e.prototype;return i.parsePrimitiveData=function(t,e,i,n){return dn(t,e,i,n)},i.parseArrayData=function(t,e,i,n){return dn(t,e,i,n)},i.parseObjectData=function(t,e,i,n){var r,a,o,s,l=t.iScale,c=t.vScale,u=this._parsing,h=u.xAxisKey,d=void 0===h?"x":h,f=u.yAxisKey,p=void 0===f?"y":f,g="x"===l.axis?d:p,v="x"===c.axis?d:p,m=[];for(r=i,a=i+n;r<a;++r)s=e[r],(o={})[l.axis]=l.parse(w(s,g),r),m.push(hn(w(s,v),o,c,r));return m},i.updateRangeFromParsed=function(e,i,n,r){t.prototype.updateRangeFromParsed.call(this,e,i,n,r);var a=n._custom;a&&i===this._cachedMeta.vScale&&(e.min=Math.min(e.min,a.min),e.max=Math.max(e.max,a.max))},i.getLabelAndValue=function(t){var e=this._cachedMeta,i=e.iScale,n=e.vScale,r=this.getParsed(t),a=r._custom,o=fn(a)?"["+a.start+", "+a.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:o}},i.initialize=function(){t.prototype.initialize.call(this),this._cachedMeta.stack=this.getDataset().stack},i.update=function(t){var e=this._cachedMeta;this.updateElements(e.data,0,t)},i.updateElements=function(t,e,i){var n,r=this,a="reset"===i,o=r._cachedMeta.vScale,s=o.getBasePixel(),l=o.isHorizontal(),c=r._getRuler(),u=r.resolveDataElementOptions(e,i),h=r.getSharedOptions(i,t[e],u),d=r.includeOptions(i,h);for(n=0;n<t.length;n++){var f=e+n,p=r.resolveDataElementOptions(f,i),g=r._calculateBarValuePixels(f,p),v=r._calculateBarIndexPixels(f,c,p),m={horizontal:l,base:a?s:g.base,x:l?a?s:g.head:v.center,y:l?v.center:a?s:g.head,height:l?v.size:void 0,width:l?void 0:v.size};d&&(m.options=p),r.updateElement(t[n],f,m,i)}r.updateSharedOptions(h,i)},i._getStacks=function(t){var e,i,n=this._cachedMeta.iScale,r=n.getMatchingVisibleMetas(this._type),a=n.options.stacked,o=r.length,s=[];for(e=0;e<o&&(i=r[e],(!1===a||-1===s.indexOf(i.stack)||void 0===a&&void 0===i.stack)&&s.push(i.stack),i.index!==t);++e);return s.length||s.push(void 0),s},i._getStackCount=function(){return this._getStacks().length},i._getStackIndex=function(t,e){var i=this._getStacks(t),n=void 0!==e?i.indexOf(e):-1;return-1===n?i.length-1:n},i._getRuler=function(){var t,e,i=this._cachedMeta,n=i.iScale,r=[];for(t=0,e=i.data.length;t<e;++t)r.push(n.getPixelForValue(this.getParsed(t)[n.axis],t));return{min:function(t,e){var i,n,r,a,o=t._length;for(r=1,a=e.length;r<a;++r)o=Math.min(o,Math.abs(e[r]-e[r-1]));for(r=0,a=t.ticks.length;r<a;++r)n=t.getPixelForTick(r),o=r>0?Math.min(o,Math.abs(n-i)):o,i=n;return o}(n,r),pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n}},i._calculateBarValuePixels=function(t,e){var i,n,r=this._cachedMeta,a=r.vScale,o=e.minBarLength,s=this.getParsed(t),l=s._custom,c=s[a.axis],u=0,h=r._stacked?this.applyStack(a,s):c;h!==c&&(u=h-c,h=c),fn(l)&&(c=l.barStart,h=l.barEnd-l.barStart,0!==c&&li(c)!==li(l.barEnd)&&(u=0),u+=c);var d=mi(a.getPixelForValue(u),a._startPixel-10,a._endPixel+10);return n=(i=a.getPixelForValue(u+h))-d,void 0!==o&&Math.abs(n)<o&&(n=n<0?-o:o,0===c&&(d-=n/2),i=d+n),{size:n,base:d,head:i,center:i+n/2}},i._calculateBarIndexPixels=function(t,e,i){var n="flex"===i.barThickness?function(t,e,i){var n=e.pixels,r=n[t],a=t>0?n[t-1]:null,o=t<n.length-1?n[t+1]:null,s=i.categoryPercentage;null===a&&(a=r-(null===o?e.end-e.start:o-r)),null===o&&(o=r+r-a);var l=r-(r-Math.min(a,o))/2*s;return{chunk:Math.abs(o-a)/2*s/e.stackCount,ratio:i.barPercentage,start:l}}(t,e,i):function(t,e,i){var n,r,a=i.barThickness,o=e.stackCount;return u(a)?(n=e.min*i.categoryPercentage,r=i.barPercentage):(n=a*o,r=1),{chunk:n/o,ratio:r,start:e.pixels[t]-n/2}}(t,e,i),r=this._getStackIndex(this.index,this._cachedMeta.stack),a=n.start+n.chunk*r+n.chunk/2,o=Math.min(p(i.maxBarThickness,1/0),n.chunk*n.ratio);return{base:a-o/2,head:a+o/2,center:a,size:o}},i.draw=function(){var t=this.chart,e=this._cachedMeta,i=e.vScale,n=e.data,r=n.length,a=0;for(N(t.ctx,t.chartArea);a<r;++a)isNaN(this.getParsed(a)[i.axis])||n[a].draw(this._ctx);H(t.ctx)},e}(Di);pn.id="bar",pn.defaults={datasetElementType:!1,dataElementType:"rectangle",dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],hover:{mode:"index"},datasets:{categoryPercentage:.8,barPercentage:.9,animation:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},scales:{_index_:{type:"category",offset:!0,gridLines:{offsetGridLines:!0}},_value_:{type:"linear",beginAtZero:!0}}};var gn=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var r=e.prototype;return r.parseObjectData=function(t,e,i,n){var r,a,o,s=t.xScale,l=t.yScale,c=this._parsing,u=c.xAxisKey,h=void 0===u?"x":u,d=c.yAxisKey,f=void 0===d?"y":d,p=[];for(r=i,a=i+n;r<a;++r)o=e[r],p.push({x:s.parse(w(o,h),r),y:l.parse(w(o,f),r),_custom:o&&o.r&&+o.r});return p},r.getMaxOverflow=function(){for(var t=(this._cachedMeta.data||[]).length-1,e=0;t>=0;--t)e=Math.max(e,this.getStyle(t,!0).radius);return e>0&&e},r.getLabelAndValue=function(t){var e=this._cachedMeta,i=e.xScale,n=e.yScale,r=this.getParsed(t),a=i.getLabelForValue(r.x),o=n.getLabelForValue(r.y),s=r._custom;return{label:e.label,value:"("+a+", "+o+(s?", "+s:"")+")"}},r.update=function(t){var e=this._cachedMeta.data;this.updateElements(e,0,t)},r.updateElements=function(t,e,i){for(var n=this,r="reset"===i,a=n._cachedMeta,o=a.xScale,s=a.yScale,l=n.resolveDataElementOptions(e,i),c=n.getSharedOptions(i,t[e],l),u=n.includeOptions(i,c),h=0;h<t.length;h++){var d=t[h],f=e+h,p=!r&&n.getParsed(f),g=r?o.getPixelForDecimal(.5):o.getPixelForValue(p.x),v=r?s.getBasePixel():s.getPixelForValue(p.y),m={x:g,y:v,skip:isNaN(g)||isNaN(v)};u&&(m.options=n.resolveDataElementOptions(f,i),r&&(m.options.radius=0)),n.updateElement(d,f,m,i)}n.updateSharedOptions(c,i)},r.resolveDataElementOptions=function(e,n){var r=this,a=r.chart,o=r.getDataset(),s=r.getParsed(e),l=t.prototype.resolveDataElementOptions.call(this,e,n),c={chart:a,dataPoint:s,dataIndex:e,dataset:o,datasetIndex:r.index};return l.$shared&&(l=i({},l,{$shared:!1})),"active"!==n&&(l.radius=0),l.radius+=xt([s&&s._custom,r._config.radius,a.options.elements.point.radius],c,e),l},e}(Di);gn.id="bubble",gn.defaults={datasetElementType:!1,dataElementType:"point",dataElementOptions:["backgroundColor","borderColor","borderWidth","hitRadius","radius","pointStyle","rotation"],animation:{numbers:{properties:["x","y","borderWidth","radius"]}},scales:{x:{type:"linear"},y:{type:"linear"}},tooltips:{callbacks:{title:function(){return""}}}};var vn=Math.PI,mn=2*vn,bn=vn/2;var xn=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).innerRadius=void 0,n.outerRadius=void 0,n.offsetX=void 0,n.offsetY=void 0,n}n(e,t);var i=e.prototype;return i.linkScales=function(){},i.parse=function(t,e){var i,n,r=this.getDataset().data,a=this._cachedMeta;for(i=t,n=t+e;i<n;++i)a._parsed[i]=+r[i]},i.getRingIndex=function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&++e;return e},i.update=function(t){var e=this,i=e.chart,n=i.chartArea,r=i.options,a=e._cachedMeta,o=a.data,s=r.cutoutPercentage/100||0,l=e._getRingWeight(e.index),c=function(t,e,i){var n=1,r=1,a=0,o=0;if(e<mn){var s=t%mn,l=(s+=s>=vn?-mn:s<-vn?mn:0)+e,c=Math.cos(s),u=Math.sin(s),h=Math.cos(l),d=Math.sin(l),f=s<=0&&l>=0||l>=mn,p=s<=bn&&l>=bn||l>=mn+bn,g=s<=-bn&&l>=-bn||l>=vn+bn,v=s===-vn||l>=vn?-1:Math.min(c,c*i,h,h*i),m=g?-1:Math.min(u,u*i,d,d*i),b=f?1:Math.max(c,c*i,h,h*i),x=p?1:Math.max(u,u*i,d,d*i);n=(b-v)/2,r=(x-m)/2,a=-(b+v)/2,o=-(x+m)/2}return{ratioX:n,ratioY:r,offsetX:a,offsetY:o}}(r.rotation,r.circumference,s),u=c.ratioX,h=c.ratioY,d=c.offsetX,f=c.offsetY,p=e.getMaxBorderWidth(),g=(n.right-n.left-p)/u,v=(n.bottom-n.top-p)/h,m=Math.max(Math.min(g,v)/2,0),b=(m-Math.max(m*s,0))/e._getVisibleDatasetWeightTotal();e.offsetX=d*m,e.offsetY=f*m,a.total=e.calculateTotal(),e.outerRadius=m-b*e._getRingWeightOffset(e.index),e.innerRadius=Math.max(e.outerRadius-b*l,0),e.updateElements(o,0,t)},i._circumference=function(t,e){var i=this.chart.options,n=this._cachedMeta;return e&&i.animation.animateRotate?0:this.chart.getDataVisibility(t)?this.calculateCircumference(n._parsed[t]*i.circumference/mn):0},i.updateElements=function(t,e,i){var n,r=this,a="reset"===i,o=r.chart,s=o.chartArea,l=o.options,c=l.animation,u=(s.left+s.right)/2,h=(s.top+s.bottom)/2,d=a&&c.animateScale,f=d?0:r.innerRadius,p=d?0:r.outerRadius,g=r.resolveDataElementOptions(e,i),v=r.getSharedOptions(i,t[e],g),m=r.includeOptions(i,v),b=l.rotation;for(n=0;n<e;++n)b+=r._circumference(n,a);for(n=0;n<t.length;++n){var x=e+n,y=r._circumference(x,a),_=t[n],M={x:u+r.offsetX,y:h+r.offsetY,startAngle:b,endAngle:b+y,circumference:y,outerRadius:p,innerRadius:f};m&&(M.options=r.resolveDataElementOptions(x,i)),b+=y,r.updateElement(_,x,M,i)}r.updateSharedOptions(v,i)},i.calculateTotal=function(){var t,e=this._cachedMeta,i=e.data,n=0;for(t=0;t<i.length;t++){var r=e._parsed[t];!isNaN(r)&&this.chart.getDataVisibility(t)&&(n+=Math.abs(r))}return n},i.calculateCircumference=function(t){var e=this._cachedMeta.total;return e>0&&!isNaN(t)?mn*(Math.abs(t)/e):0},i.getMaxBorderWidth=function(t){var e,i,n,r,a,o=0,s=this.chart;if(!t)for(e=0,i=s.data.datasets.length;e<i;++e)if(s.isDatasetVisible(e)){t=(n=s.getDatasetMeta(e)).data,(r=n.controller)!==this&&r.configure();break}if(!t)return 0;for(e=0,i=t.length;e<i;++e)"inner"!==(a=r.resolveDataElementOptions(e)).borderAlign&&(o=Math.max(o,a.borderWidth||0,a.hoverBorderWidth||0));return o},i._getRingWeightOffset=function(t){for(var e=0,i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e},i._getRingWeight=function(t){return Math.max(p(this.chart.data.datasets[t].weight,1),0)},i._getVisibleDatasetWeightTotal=function(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1},e}(Di);xn.id="doughnut",xn.defaults={datasetElementType:!1,dataElementType:"arc",dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],animation:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y"]},animateRotate:!0,animateScale:!1},aspectRatio:1,legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(e,i){var n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick:function(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},cutoutPercentage:50,rotation:-bn,circumference:mn,tooltips:{callbacks:{title:function(){return""},label:function(t){var e=t.chart.data.labels[t.dataIndex],i=": "+t.dataset.data[t.dataIndex];return h(e)?(e=e.slice())[0]+=i:e+=i,e}}}};var yn=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var i=e.prototype;return i.update=function(t){var e=this._cachedMeta,i=e.dataset,n=e.data||[];if("resize"!==t){var r={points:n,options:this.resolveDatasetElementOptions()};this.updateElement(i,void 0,r,t)}this.updateElements(n,0,t)},i.updateElements=function(t,e,i){for(var n,r=this,a="reset"===i,o=r._cachedMeta,s=o.xScale,l=o.yScale,c=o._stacked,u=r.resolveDataElementOptions(e,i),h=r.getSharedOptions(i,t[e],u),d=r.includeOptions(i,h),f=p(r._config.spanGaps,r.chart.options.spanGaps),g=ri(f)?f:Number.POSITIVE_INFINITY,v=0;v<t.length;++v){var m=e+v,b=t[v],x=r.getParsed(m),y=s.getPixelForValue(x.x,m),_=a?l.getBasePixel():l.getPixelForValue(c?r.applyStack(l,x):x.y,m),M={x:y,y:_,skip:isNaN(y)||isNaN(_),stop:v>0&&x.x-n.x>g};d&&(M.options=r.resolveDataElementOptions(m,i)),r.updateElement(b,m,M,i),n=x}r.updateSharedOptions(h,i)},i.resolveDatasetElementOptions=function(e){var i=this._config,n=this.chart.options,r=n.elements.line,a=t.prototype.resolveDatasetElementOptions.call(this,e),o=p(i.showLine,n.showLines);return a.spanGaps=p(i.spanGaps,n.spanGaps),a.tension=p(i.lineTension,r.tension),a.stepped=xt([i.stepped,r.stepped]),o||(a.borderWidth=0),a},i.getMaxOverflow=function(){var t=this._cachedMeta,e=t.dataset.options.borderWidth||0,i=t.data||[];if(!i.length)return e;var n=i[0].size(),r=i[i.length-1].size();return Math.max(e,n,r)/2},e}(Di);yn.id="line",yn.defaults={datasetElementType:"line",datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","capBezierPoints","cubicInterpolationMode","fill"],dataElementType:"point",dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverHitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},showLines:!0,spanGaps:!1,hover:{mode:"index"},scales:{_index_:{type:"category"},_value_:{type:"linear"}}};var _n=function(t){function e(e,i){var n;return(n=t.call(this,e,i)||this).innerRadius=void 0,n.outerRadius=void 0,n}n(e,t);var i=e.prototype;return i.update=function(t){var e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,t)},i._updateRadius=function(){var t=this,e=t.chart,i=e.chartArea,n=e.options,r=Math.min(i.right-i.left,i.bottom-i.top),a=Math.max(r/2,0),o=(a-Math.max(n.cutoutPercentage?a/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();t.outerRadius=a-o*t.index,t.innerRadius=t.outerRadius-o},i.updateElements=function(t,e,i){var n,r=this,a="reset"===i,o=r.chart,s=r.getDataset(),l=o.options,c=l.animation,u=r._cachedMeta.rScale,h=u.xCenter,d=u.yCenter,f=ci(l.startAngle)-.5*Math.PI,p=f;for(r._cachedMeta.count=r.countVisibleElements(),n=0;n<e;++n)p+=r._computeAngle(n);for(n=0;n<t.length;n++){var g=t[n],v=e+n,m=p,b=p+r._computeAngle(v),x=this.chart.getDataVisibility(v)?u.getDistanceFromCenterForValue(s.data[v]):0;p=b,a&&(c.animateScale&&(x=0),c.animateRotate&&(m=f,b=f));var y={x:h,y:d,innerRadius:0,outerRadius:x,startAngle:m,endAngle:b,options:r.resolveDataElementOptions(v,i)};r.updateElement(g,v,y,i)}},i.countVisibleElements=function(){var t=this,e=this.getDataset(),i=this._cachedMeta,n=0;return i.data.forEach((function(i,r){!isNaN(e.data[r])&&t.chart.getDataVisibility(r)&&n++})),n},i._computeAngle=function(t){var e=this,i=e._cachedMeta.count,n=e.getDataset();if(isNaN(n.data[t])||!this.chart.getDataVisibility(t))return 0;var r={chart:e.chart,dataPoint:this.getParsed(t),dataIndex:t,dataset:n,datasetIndex:e.index};return xt([e.chart.options.elements.arc.angle,2*Math.PI/i],r,t)},e}(Di);_n.id="polarArea",_n.defaults={dataElementType:"arc",dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],animation:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]},animateRotate:!0,animateScale:!0},aspectRatio:1,datasets:{indexAxis:"r"},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,gridLines:{circular:!0},pointLabels:{display:!1}}},startAngle:0,legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(e,i){var n=t.getDatasetMeta(0).controller.getStyle(i);return{text:e,fillStyle:n.backgroundColor,strokeStyle:n.borderColor,lineWidth:n.borderWidth,hidden:!t.getDataVisibility(i),index:i}})):[]}},onClick:function(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t){return t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}}};var Mn=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(xn);Mn.id="pie",Mn.defaults={cutoutPercentage:0};var wn=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var i=e.prototype;return i.getLabelAndValue=function(t){var e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}},i.update=function(t){var e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if("resize"!==t){var a={points:n,_loop:!0,_fullLoop:r.length===n.length,options:this.resolveDatasetElementOptions()};this.updateElement(i,void 0,a,t)}this.updateElements(n,0,t)},i.updateElements=function(t,e,i){var n,r=this.getDataset(),a=this._cachedMeta.rScale,o="reset"===i;for(n=0;n<t.length;n++){var s=t[n],l=e+n,c=this.resolveDataElementOptions(l,i),u=a.getPointPositionForValue(l,r.data[l]),h=o?a.xCenter:u.x,d=o?a.yCenter:u.y,f={x:h,y:d,angle:u.angle,skip:isNaN(h)||isNaN(d),options:c};this.updateElement(s,l,f,i)}},i.resolveDatasetElementOptions=function(e){var i=this._config,n=this.chart.options,r=t.prototype.resolveDatasetElementOptions.call(this,e),a=p(i.showLine,n.showLines);return r.spanGaps=p(i.spanGaps,n.spanGaps),r.tension=p(i.lineTension,n.elements.line.tension),a||(r.borderWidth=0),r},e}(Di);wn.id="radar",wn.defaults={datasetElementType:"line",datasetElementOptions:["backgroundColor","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","borderWidth","fill"],dataElementType:"point",dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},aspectRatio:1,spanGaps:!1,scales:{r:{type:"radialLinear"}},datasets:{indexAxis:"r"},elements:{line:{fill:"start",tension:0}}};var kn=function(t){function e(){return t.apply(this,arguments)||this}return n(e,t),e}(yn);kn.id="scatter",kn.defaults={scales:{x:{type:"linear"},y:{type:"linear"}},datasets:{showLine:!1,fill:!1},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.label+", "+t.formattedValue+")"}}}};var Pn=Object.freeze({__proto__:null,BarController:pn,BubbleController:gn,DoughnutController:xn,LineController:yn,PolarAreaController:_n,PieController:Mn,RadarController:wn,ScatterController:kn}),Sn=2*Math.PI;function Dn(t,e){var i=e.startAngle,n=e.endAngle,r=e.pixelMargin,a=e.x,o=e.y,s=r/e.outerRadius;t.beginPath(),t.arc(a,o,e.outerRadius,i-s,n+s),e.innerRadius>r?(s=r/e.innerRadius,t.arc(a,o,e.innerRadius-r,n+s,i-s,!0)):t.arc(a,o,r,n+Math.PI/2,i-Math.PI/2),t.closePath(),t.clip()}function Tn(t,e){t.beginPath(),t.arc(e.x,e.y,e.outerRadius,e.startAngle,e.endAngle),t.arc(e.x,e.y,e.innerRadius,e.endAngle,e.startAngle,!0),t.closePath()}function An(t,e,i){var n=e.options,r="inner"===n.borderAlign;r?(t.lineWidth=2*n.borderWidth,t.lineJoin="round"):(t.lineWidth=n.borderWidth,t.lineJoin="bevel"),i.fullCircles&&function(t,e,i,n){var r,a=i.endAngle;for(n&&(i.endAngle=i.startAngle+Sn,Dn(t,i),i.endAngle=a,i.endAngle===i.startAngle&&i.fullCircles&&(i.endAngle+=Sn,i.fullCircles--)),t.beginPath(),t.arc(i.x,i.y,i.innerRadius,i.startAngle+Sn,i.startAngle,!0),r=0;r<i.fullCircles;++r)t.stroke();for(t.beginPath(),t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.startAngle+Sn),r=0;r<i.fullCircles;++r)t.stroke()}(t,e,i,r),r&&Dn(t,i),t.beginPath(),t.arc(i.x,i.y,e.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.stroke()}var On=function(t){function e(e){var n;return(n=t.call(this)||this).options=void 0,n.circumference=void 0,n.startAngle=void 0,n.endAngle=void 0,n.innerRadius=void 0,n.outerRadius=void 0,e&&i(r(n),e),n}n(e,t);var a=e.prototype;return a.inRange=function(t,e,i){var n=di(this.getProps(["x","y"],i),{x:t,y:e}),r=n.angle,a=n.distance,o=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),s=o.startAngle,l=o.endAngle,c=o.innerRadius,u=o.outerRadius;return(o.circumference>=Sn||vi(r,s,l))&&(a>=c&&a<=u)},a.getCenterPoint=function(t){var e=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),i=e.x,n=e.y,r=(e.startAngle+e.endAngle)/2,a=(e.innerRadius+e.outerRadius)/2;return{x:i+Math.cos(r)*a,y:n+Math.sin(r)*a}},a.tooltipPosition=function(t){return this.getCenterPoint(t)},a.draw=function(t){var e=this,i=e.options,n="inner"===i.borderAlign?.33:0,r={x:e.x,y:e.y,innerRadius:e.innerRadius,outerRadius:Math.max(e.outerRadius-n,0),pixelMargin:n,startAngle:e.startAngle,endAngle:e.endAngle,fullCircles:Math.floor(e.circumference/Sn)};0!==e.circumference&&(t.save(),t.fillStyle=i.backgroundColor,t.strokeStyle=i.borderColor,function(t,e,i){if(e.fullCircles){e.endAngle=e.startAngle+Sn,Tn(t,e);for(var n=0;n<e.fullCircles;++n)t.fill();e.endAngle=e.startAngle+i%Sn}Tn(t,e),t.fill()}(t,r,e.circumference),i.borderWidth&&An(t,e,r),t.restore())},e}(Ti);function En(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Cn(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Ln(t,e,i,n){var r={x:t.controlPointNextX,y:t.controlPointNextY},a={x:e.controlPointPreviousX,y:e.controlPointPreviousY},o=En(t,r,i),s=En(r,a,i),l=En(a,e,i),c=En(o,s,i),u=En(s,l,i);return En(c,u,i)}function Fn(t){return"angle"===t?{between:vi,compare:pi,normalize:gi}:{between:function(t,e,i){return t>=e&&t<=i},compare:function(t,e){return t-e},normalize:function(t){return t}}}function Rn(t,e,i,n){return{start:t%n,end:e%n,loop:i&&(e-t+1)%n==0}}function In(t,e,i){if(!i)return[t];var n,r,a,o,s=i.property,l=i.start,c=i.end,u=e.length,h=Fn(s),d=h.compare,f=h.between,p=h.normalize,g=function(t,e,i){var n,r,a=i.property,o=i.start,s=i.end,l=Fn(a),c=l.between,u=l.normalize,h=e.length,d=t.start,f=t.end,p=t.loop;if(p){for(d+=h,f+=h,n=0,r=h;n<r&&c(u(e[d%h][a]),o,s);++n)d--,f--;d%=h,f%=h}return f<d&&(f+=h),{start:d,end:f,loop:p}}(t,e,i),v=g.start,m=g.end,b=g.loop,x=[],y=!1,_=null;for(n=v;n<=m;++n)(a=e[n%u]).skip||(y=f(r=p(a[s]),l,c),null===_&&y&&(_=n>v&&d(r,l)>0?o:n),null===_||y&&0!==d(r,c)||(x.push(Rn(_,n,b,u)),_=null),o=n);return null!==_&&x.push(Rn(_,m,b,u)),x}function zn(t,e){for(var i=[],n=t.segments,r=0;r<n.length;r++){var a=In(n[r],t.points,e);a.length&&i.push.apply(i,a)}return i}function Vn(t,e,i){t.lineTo(i.x,i.y)}function Bn(t,e,i,n){var r,a,o,s=i.start,l=i.end,c=i.loop,u=e.points,h=e.options,d=function(t){return t.stepped?j:t.tension?Y:Vn}(h),f=u.length,p=n||{},g=p.move,v=void 0===g||g,m=p.reverse,b=l<s?f+l-s:l-s;for(r=0;r<=b;++r)(a=u[(s+(m?b-r:r))%f]).skip||(v?(t.moveTo(a.x,a.y),v=!1):d(t,o,a,m,h.stepped),o=a);return c&&d(t,o,a=u[(s+(m?b:0))%f],m,h.stepped),!!c}function Wn(t,e,i,n){var r,a,o,s,l,c,u=e.points,h=u.length,d=i.start,f=i.end,p=n||{},g=p.move,v=void 0===g||g,m=p.reverse,b=f<d?h+f-d:f-d,x=0,y=0,_=function(t){return(d+(m?b-t:t))%h},M=function(){s!==l&&(t.lineTo(x,l),t.lineTo(x,s),t.lineTo(x,c))};for(v&&(a=u[_(0)],t.moveTo(a.x,a.y)),r=0;r<=b;++r)if(!(a=u[_(r)]).skip){var w=a.x,k=a.y,P=0|w;P===o?(k<s?s=k:k>l&&(l=k),x=(y*x+w)/++y):(M(),t.lineTo(w,k),o=P,y=0,s=l=k),c=k}M()}function Nn(t){var e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._loop||e.tension||e.stepped||i)?Wn:Bn}On.id="arc",On.defaults={borderAlign:"center",borderColor:"#fff",borderWidth:2},On.defaultRoutes={backgroundColor:"color"};var Hn=function(t){function a(e){var n;return(n=t.call(this)||this).options=void 0,n._loop=void 0,n._fullLoop=void 0,n._points=void 0,n._segments=void 0,e&&i(r(n),e),n}n(a,t);var o=a.prototype;return o.updateControlPoints=function(t){var e=this.options;if(e.tension&&!e.stepped){var i=e.spanGaps?this._loop:this._fullLoop;nn(this._points,e,t,i)}},o.first=function(){var t=this.segments,e=this.points;return t.length&&e[t[0].start]},o.last=function(){var t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]},o.interpolate=function(t,e){var i=this.options,n=t[e],r=this.points,a=zn(this,{property:e,start:n,end:n});if(a.length){var o,s,l=[],c=function(t){return t.stepped?Cn:t.tension?Ln:En}(i);for(o=0,s=a.length;o<s;++o){var u=a[o],h=u.start,d=u.end,f=r[h],p=r[d];if(f!==p){var g=c(f,p,Math.abs((n-f[e])/(p[e]-f[e])),i.stepped);g[e]=t[e],l.push(g)}else l.push(f)}return 1===l.length?l[0]:l}},o.pathSegment=function(t,e,i){return Nn(this)(t,this,e,i)},o.path=function(t){for(var e=this.segments,i=e.length,n=Nn(this),r=this._loop,a=0;a<i;++a)r&=n(t,this,e[a]);return!!r},o.draw=function(t){var e=this.options||{};(this.points||[]).length&&e.borderWidth&&(t.save(),function(t,e){t.lineCap=e.borderCapStyle,t.setLineDash(e.borderDash),t.lineDashOffset=e.borderDashOffset,t.lineJoin=e.borderJoinStyle,t.lineWidth=e.borderWidth,t.strokeStyle=e.borderColor}(t,e),t.beginPath(),this.path(t)&&t.closePath(),t.stroke(),t.restore())},e(a,[{key:"points",set:function(t){this._points=t,delete this._segments},get:function(){return this._points}},{key:"segments",get:function(){return this._segments||(this._segments=function(t){var e=t.points,i=t.options.spanGaps,n=e.length;if(!n)return[];var r=!!t._loop,a=function(t,e,i,n){var r=0,a=e-1;if(i&&!n)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,i&&(a+=r);a>r&&t[a%e].skip;)a--;return{start:r,end:a%=e}}(e,n,r,i),o=a.start,s=a.end;return!0===i?[{start:o,end:s,loop:r}]:function(t,e,i,n){var r,a=t.length,o=[],s=e,l=t[e];for(r=e+1;r<=i;++r){var c=t[r%a];c.skip||c.stop?l.skip||(n=!1,o.push({start:e%a,end:(r-1)%a,loop:n}),e=s=c.stop?r:null):(s=r,l.skip&&(e=r)),l=c}return null!==s&&o.push({start:e%a,end:s%a,loop:n}),o}(e,o,s<o?s+n:s,!!t._fullLoop&&0===o&&s===n-1)}(this))}}]),a}(Ti);Hn.id="line",Hn.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,fill:!0,tension:0},Hn.defaultRoutes={backgroundColor:"color",borderColor:"color"};var jn=function(t){function e(e){var n;return(n=t.call(this)||this).options=void 0,n.skip=void 0,n.stop=void 0,e&&i(r(n),e),n}n(e,t);var a=e.prototype;return a.inRange=function(t,e,i){var n=this.options,r=this.getProps(["x","y"],i),a=r.x,o=r.y;return Math.pow(t-a,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)},a.inXRange=function(t,e){var i=this.options,n=this.getProps(["x"],e).x;return Math.abs(t-n)<i.radius+i.hitRadius},a.inYRange=function(t,e){var i=this.options,n=this.getProps(["x"],e).y;return Math.abs(t-n)<i.radius+i.hitRadius},a.getCenterPoint=function(t){var e=this.getProps(["x","y"],t);return{x:e.x,y:e.y}},a.size=function(){var t=this.options||{},e=Math.max(t.radius,t.hoverRadius)||0;return 2*(e+(e&&t.borderWidth||0))},a.draw=function(t,e){var i=this,n=i.options;i.skip||n.radius<=0||(void 0===e||W(i,e))&&(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,B(t,n,i.x,i.y))},a.getRange=function(){var t=this.options||{};return t.radius+t.hitRadius},e}(Ti);function Yn(t,e){var i,n,r,a,o,s=t.getProps(["x","y","base","width","height"],e),l=s.x,c=s.y,u=s.base,h=s.width,d=s.height;return t.horizontal?(o=d/2,i=Math.min(l,u),n=Math.max(l,u),r=c-o,a=c+o):(i=l-(o=h/2),n=l+o,r=Math.min(c,u),a=Math.max(c,u)),{left:i,top:r,right:n,bottom:a}}function Xn(t,e,i,n){var r,a,o;return n?(o=i,t=Un(t=(r=t)===(a=e)?o:r===o?a:r,i,e)):t=Un(t,e,i),t}function Un(t,e,i){return"start"===t?e:"end"===t?i:t}function qn(t,e,i,n){return t?0:Math.max(Math.min(e,n),i)}function Kn(t,e,i){var n,r,a,o,s=t.options.borderWidth,l=function(t){var e=t.options.borderSkipped,i={};return e?(i[e=t.horizontal?Xn(e,"left","right",t.base>t.x):Xn(e,"bottom","top",t.base<t.y)]=!0,i):i}(t);return d(s)?(n=+s.top||0,r=+s.right||0,a=+s.bottom||0,o=+s.left||0):n=r=a=o=+s||0,{t:qn(l.top,n,0,i),r:qn(l.right,r,0,e),b:qn(l.bottom,a,0,i),l:qn(l.left,o,0,e)}}function Gn(t,e,i,n){var r=null===e,a=null===i,o=!(!t||r&&a)&&Yn(t,n);return o&&(r||e>=o.left&&e<=o.right)&&(a||i>=o.top&&i<=o.bottom)}jn.id="point",jn.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3},jn.defaultRoutes={backgroundColor:"color",borderColor:"color"};var $n=function(t){function e(e){var n;return(n=t.call(this)||this).options=void 0,n.horizontal=void 0,n.base=void 0,n.width=void 0,n.height=void 0,e&&i(r(n),e),n}n(e,t);var a=e.prototype;return a.draw=function(t){var e,i,n,r,a,o=this.options,s=(i=Yn(e=this),n=i.right-i.left,r=i.bottom-i.top,a=Kn(e,n/2,r/2),{outer:{x:i.left,y:i.top,w:n,h:r},inner:{x:i.left+a.l,y:i.top+a.t,w:n-a.l-a.r,h:r-a.t-a.b}}),l=s.inner,c=s.outer;t.save(),c.w===l.w&&c.h===l.h||(t.beginPath(),t.rect(c.x,c.y,c.w,c.h),t.clip(),t.rect(l.x,l.y,l.w,l.h),t.fillStyle=o.borderColor,t.fill("evenodd")),t.fillStyle=o.backgroundColor,t.fillRect(l.x,l.y,l.w,l.h),t.restore()},a.inRange=function(t,e,i){return Gn(this,t,e,i)},a.inXRange=function(t,e){return Gn(this,t,null,e)},a.inYRange=function(t,e){return Gn(this,null,t,e)},a.getCenterPoint=function(t){var e=this.getProps(["x","y","base","horizontal"],t),i=e.x,n=e.y,r=e.base,a=e.horizontal;return{x:a?(i+r)/2:i,y:a?n:(n+r)/2}},a.getRange=function(t){return"x"===t?this.width/2:this.height/2},e}(Ti);$n.id="rectangle",$n.defaults={borderSkipped:"start",borderWidth:0},$n.defaultRoutes={backgroundColor:"color",borderColor:"color"};var Zn=Object.freeze({__proto__:null,Arc:On,Line:Hn,Point:jn,Rectangle:$n});function Qn(t,e,i){var n=function(t){var e=t.options,i=e.fill,n=p(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t),r=parseFloat(n);return f(r)&&Math.floor(r)===r?("-"!==n[0]&&"+"!==n[0]||(r=e+r),!(r===e||r<0||r>=i)&&r):["origin","start","end"].indexOf(n)>=0&&n}var Jn=function(){function t(t){this.x=t.x,this.y=t.y,this.radius=t.radius}var e=t.prototype;return e.pathSegment=function(t,e,i){var n=this.x,r=this.y,a=this.radius;return e=e||{start:0,end:2*Math.PI},i.reverse?t.arc(n,r,a,e.end,e.start,!0):t.arc(n,r,a,e.start,e.end),!i.bounds},e.interpolate=function(t,e){var i=this.x,n=this.y,r=this.radius,a=t.angle;if("angle"===e)return{x:i+Math.cos(a)*r,y:n+Math.sin(a)*r,angle:a}},t}();function tr(t){return(t.scale||{}).getPointPositionForValue?function(t){var e,i,n=t.scale,r=t.fill,a=n.options,o=n.getLabels().length,s=[],l=a.reverse?n.max:n.min,c=a.reverse?n.min:n.max,u="start"===r?l:"end"===r?c:n.getBaseValue();if(a.gridLines.circular)return i=n.getPointPositionForValue(0,l),new Jn({x:i.x,y:i.y,radius:n.getDistanceFromCenterForValue(u)});for(e=0;e<o;++e)s.push(n.getPointPositionForValue(e,u));return s}(t):function(t){var e,i=t.scale,n=void 0===i?{}:i,r=t.fill,a=null;return"start"===r?a=n.bottom:"end"===r?a=n.top:n.getBasePixel&&(a=n.getBasePixel()),f(a)?{x:(e=n.isHorizontal())?a:null,y:e?null:a}:null}(t)}function er(t){var e=t.chart,i=t.fill,n=t.line;if(f(i))return function(t,e){var i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);var r=tr(t),a=[],o=!1,s=!1;return r instanceof Jn?r:(h(r)?(o=!0,a=r):(a=function(t,e){var i=t||{},n=i.x,r=void 0===n?null:n,a=i.y,o=void 0===a?null:a,s=e.points,l=[];return e.segments.forEach((function(t){var e=s[t.start],i=s[t.end];null!==o?(l.push({x:e.x,y:o,_prop:"x",_ref:e}),l.push({x:i.x,y:o,_prop:"x",_ref:i})):null!==r&&(l.push({x:r,y:e.y,_prop:"y",_ref:e}),l.push({x:r,y:i.y,_prop:"y",_ref:i}))})),l}(r,n),s=!0),a.length?new Hn({points:a,options:{tension:0},_loop:o,_fullLoop:o,_refPoints:s}):null)}function ir(t,e,i){var n,r=t[e].fill,a=[e];if(!i)return r;for(;!1!==r&&-1===a.indexOf(r);){if(!f(r))return r;if(!(n=t[r]))return!1;if(n.visible)return r;a.push(r),r=n.fill}return!1}function nr(t,e,i){t.beginPath(),e.path(t),t.lineTo(e.last().x,i),t.lineTo(e.first().x,i),t.closePath(),t.clip()}function rr(t,e,i,n){if(!n){var r=e[t],a=i[t];return"angle"===t&&(r=gi(r),a=gi(a)),{property:t,start:r,end:a}}}function ar(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function or(t,e,i){var n=e.chart.chartArea,r=n.top,a=n.bottom,o=i||{},s=o.property,l=o.start,c=o.end;"x"===s&&(t.beginPath(),t.rect(l,r,c-l,a-r),t.clip())}function sr(t,e,i,n){var r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}function lr(t,e){var i=e.line,n=e.target,r=e.property,a=e.color,o=e.scale,s=function(t,e,i){var n=t.segments,r=t.points,a=e.points,o=[];if(e._refPoints)for(var s=0,l=a.length;s<l;++s){var c=a[s],u=c._prop;u&&(c[u]=c._ref[u])}for(var h=0;h<n.length;h++){var d=n[h],f=rr(i,r[d.start],r[d.end],d.loop);if(e.segments)for(var p=zn(e,f),g=0;g<p.length;++g)for(var v=p[g],m=rr(i,a[v.start],a[v.end],v.loop),b=In(d,r,m),x=0;x<b.length;x++){var y,_;o.push({source:b[x],target:v,start:(y={},y[i]=ar(f,m,"start",Math.max),y),end:(_={},_[i]=ar(f,m,"end",Math.min),_)})}else o.push({source:d,target:f,start:r[d.start],end:r[d.end]})}return o}(e.line,e.target,r);t.fillStyle=a;for(var l=0,c=s.length;l<c;++l){var u=s[l],h=u.source,d=u.target,f=u.start,p=u.end;t.save(),or(t,o,rr(r,f,p)),t.beginPath();var g=!!i.pathSegment(t,h);g?t.closePath():sr(t,n,p,r);var v=!!n.pathSegment(t,d,{move:g,reverse:!0}),m=g&&v;m||sr(t,n,f,r),t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}var cr={id:"filler",afterDatasetsUpdate:function(t,e){var i,n,r,a,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(n=0;n<o;++n)a=null,(r=(i=t.getDatasetMeta(n)).dataset)&&r.options&&r instanceof Hn&&(a={visible:t.isDatasetVisible(n),fill:Qn(r,n,o),chart:t,scale:i.vScale,line:r,target:void 0}),i.$filler=a,l.push(a);for(n=0;n<o;++n)(a=l[n])&&!1!==a.fill&&(a.fill=ir(l,n,s),a.target=!1!==a.fill&&er(a))},beforeDatasetsDraw:function(t){var e,i,n=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(e=n.length-1;e>=0;--e)(i=n[e].$filler)&&i.line.updateControlPoints(r)},beforeDatasetDraw:function(t,e){var i=t.chartArea,n=t.ctx,r=e.meta.$filler;if(r&&!1!==r.fill){var a=r.line,o=r.target,s=r.scale,l=a.options,c=l.fill,u=l.backgroundColor,h=c||{},d=h.above,f=void 0===d?u:d,p=h.below,g=void 0===p?u:p;o&&a.points.length&&(N(n,i),function(t,e){var i=e.line,n=e.target,r=e.above,a=e.below,o=e.area,s=e.scale,l=i._loop?"angle":"x";t.save(),"x"===l&&a!==r&&(nr(t,n,o.top),lr(t,{line:i,target:n,color:r,scale:s,property:l}),t.restore(),t.save(),nr(t,n,o.bottom)),lr(t,{line:i,target:n,color:a,scale:s,property:l}),t.restore()}(n,{line:a,target:o,above:f,below:g,area:i,scale:s}),H(n))}},defaults:{propagate:!0}};function ur(t,e){var i=t.boxWidth;return t.usePointStyle&&i>e||u(i)?e:i}function hr(t,e){var i=t.boxHeight;return t.usePointStyle&&i>e||u(i)?e:i}var dr=function(t){function e(e){var n;return i(r(n=t.call(this)||this),e),n.legendHitBoxes=[],n._hoveredItem=null,n.doughnutMode=!1,n.chart=e.chart,n.options=e.options,n.ctx=e.ctx,n.legendItems=void 0,n.columnWidths=void 0,n.columnHeights=void 0,n.lineWidths=void 0,n._minSize=void 0,n.maxHeight=void 0,n.maxWidth=void 0,n.top=void 0,n.bottom=void 0,n.left=void 0,n.right=void 0,n.height=void 0,n.width=void 0,n._margins=void 0,n.paddingTop=void 0,n.paddingBottom=void 0,n.paddingLeft=void 0,n.paddingRight=void 0,n.position=void 0,n.weight=void 0,n.fullWidth=void 0,n}n(e,t);var a=e.prototype;return a.beforeUpdate=function(){},a.update=function(t,e,i){var n=this;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()},a.afterUpdate=function(){},a.beforeSetDimensions=function(){},a.setDimensions=function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t._minSize={width:0,height:0}},a.afterSetDimensions=function(){},a.beforeBuildLabels=function(){},a.buildLabels=function(){var t=this,e=t.options.labels||{},i=g(e.generateLabels,[t.chart],t)||[];e.filter&&(i=i.filter((function(i){return e.filter(i,t.chart.data)}))),t.options.reverse&&i.reverse(),t.legendItems=i},a.afterBuildLabels=function(){},a.beforeFit=function(){},a.fit=function(){var t=this,e=t.options,i=e.labels,n=e.display,r=t.ctx,a=bt(i.font),o=a.size,s=ur(i,o),l=hr(i,o),c=Math.max(l,o),u=t.legendHitBoxes=[],h=t._minSize,d=t.isHorizontal(),f=t._computeTitleHeight();if(d?(h.width=t.maxWidth,h.height=n?10:0):(h.width=n?10:0,h.height=t.maxHeight),n){if(r.font=a.string,d){var p=t.lineWidths=[0],g=f;r.textAlign="left",r.textBaseline="middle",t.legendItems.forEach((function(t,e){var n=s+o/2+r.measureText(t.text).width;(0===e||p[p.length-1]+n+2*i.padding>h.width)&&(g+=c+i.padding,p[p.length-(e>0?0:1)]=0),u[e]={left:0,top:0,width:n,height:c},p[p.length-1]+=n+i.padding})),h.height+=g}else{var v=i.padding,m=t.columnWidths=[],b=t.columnHeights=[],x=i.padding,y=0,_=0,M=h.height-f;t.legendItems.forEach((function(t,e){var n=s+o/2+r.measureText(t.text).width;e>0&&_+o+2*v>M&&(x+=y+i.padding,m.push(y),b.push(_),y=0,_=0),y=Math.max(y,n),_+=o+v,u[e]={left:0,top:0,width:n,height:c}})),x+=y,m.push(y),b.push(_),h.width+=x}t.width=h.width,t.height=h.height}else t.width=h.width=t.height=h.height=0},a.afterFit=function(){},a.isHorizontal=function(){return"top"===this.options.position||"bottom"===this.options.position},a.draw=function(){var t=this,e=t.options,i=e.labels,n=D.color,r=t.height,a=t.columnHeights,o=t.width,s=t.lineWidths;if(e.display){t.drawTitle();var l,c=rn(e.rtl,t.left,t._minSize.width),u=t.ctx,h=bt(i.font),d=h.color,f=h.size;u.textAlign=c.textAlign("left"),u.textBaseline="middle",u.lineWidth=.5,u.strokeStyle=d,u.fillStyle=d,u.font=h.string;var g=ur(i,f),v=hr(i,f),m=Math.max(f,v),b=t.legendHitBoxes,x=function(t,n){switch(e.align){case"start":return i.padding;case"end":return t-n;default:return(t-n+i.padding)/2}},y=t.isHorizontal(),_=this._computeTitleHeight();l=y?{x:t.left+x(o,s[0]),y:t.top+i.padding+_,line:0}:{x:t.left+i.padding,y:t.top+x(r,a[0])+_,line:0},an(t.ctx,e.textDirection);var M=m+i.padding;t.legendItems.forEach((function(e,h){var d=u.measureText(e.text).width,_=g+f/2+d,w=l.x,k=l.y;c.setWidth(t._minSize.width),y?h>0&&w+_+i.padding>t.left+t._minSize.width&&(k=l.y+=M,l.line++,w=l.x=t.left+x(o,s[l.line])):h>0&&k+M>t.top+t._minSize.height&&(w=l.x=w+t.columnWidths[l.line]+i.padding,l.line++,k=l.y=t.top+x(r,a[l.line]));var P=c.x(w);!function(t,e,r){if(!(isNaN(g)||g<=0||isNaN(v)||v<0)){u.save();var a=p(r.lineWidth,1);if(u.fillStyle=p(r.fillStyle,n),u.lineCap=p(r.lineCap,"butt"),u.lineDashOffset=p(r.lineDashOffset,0),u.lineJoin=p(r.lineJoin,"miter"),u.lineWidth=a,u.strokeStyle=p(r.strokeStyle,n),u.setLineDash&&u.setLineDash(p(r.lineDash,[])),i&&i.usePointStyle){var o={radius:g*Math.SQRT2/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:a},s=c.xPlus(t,g/2);B(u,o,s,e+f/2)}else{var l=e+Math.max((f-v)/2,0);u.fillRect(c.leftForLtr(t,g),l,g,v),0!==a&&u.strokeRect(c.leftForLtr(t,g),l,g,v)}u.restore()}}(P,k,e),b[h].left=c.leftForLtr(P,b[h].width),b[h].top=k,function(t,e,i,n){var r=f/2,a=c.xPlus(t,g+r),o=e+m/2;u.fillText(i.text,a,o),i.hidden&&(u.beginPath(),u.lineWidth=2,u.moveTo(a,o),u.lineTo(c.xPlus(a,n),o),u.stroke())}(P,k,e,d),y?l.x+=_+i.padding:l.y+=M})),on(t.ctx,e.textDirection)}},a.drawTitle=function(){var t=this,e=t.options,i=e.title,n=bt(i.font),r=mt(i.padding);if(i.display){var a,o,s=rn(e.rtl,t.left,t._minSize.width),l=t.ctx,c=i.position,u=n.size/2,h=t.top+r.top+u,d=t.left,f=t.width;if(this.isHorizontal())switch(f=Math.max.apply(Math,t.lineWidths),e.align){case"start":break;case"end":d=t.right-f;break;default:d=(t.left+t.right)/2-f/2}else{var p=Math.max.apply(Math,t.columnHeights);switch(e.align){case"start":break;case"end":h+=t.height-p;break;default:h+=(t.height-p)/2}}switch(c){case"start":a=d,o="left";break;case"end":a=d+f,o="right";break;default:a=d+f/2,o="center"}l.textAlign=s.textAlign(o),l.textBaseline="middle",l.strokeStyle=n.color,l.fillStyle=n.color,l.font=n.string,l.fillText(i.text,a,h)}},a._computeTitleHeight=function(){var t=this.options.title,e=bt(t.font),i=mt(t.padding);return t.display?e.lineHeight+i.height:0},a._getLegendItemAt=function(t,e){var i,n,r,a=this;if(t>=a.left&&t<=a.right&&e>=a.top&&e<=a.bottom)for(r=a.legendHitBoxes,i=0;i<r.length;++i)if(t>=(n=r[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return a.legendItems[i];return null},a.handleEvent=function(t){var e=this,i=e.options,n="mouseup"===t.type?"click":t.type;if("mousemove"===n){if(!i.onHover&&!i.onLeave)return}else{if("click"!==n)return;if(!i.onClick)return}var r=e._getLegendItemAt(t.x,t.y);"click"===n?r&&g(i.onClick,[t,r,e],e):(i.onLeave&&r!==e._hoveredItem&&(e._hoveredItem&&g(i.onLeave,[t,e._hoveredItem,e],e),e._hoveredItem=r),r&&g(i.onHover,[t,r,e],e))},e}(Ti);function fr(t){return!1!==t&&y({},[D.plugins.legend,t])}function pr(t,e){var i=new dr({ctx:t.ctx,options:e,chart:t});Ot.configure(t,i,e),Ot.addBox(t,i),t.legend=i}var gr={id:"legend",_element:dr,beforeInit:function(t){var e=fr(t.options.legend);e&&pr(t,e)},beforeUpdate:function(t){var e=fr(t.options.legend),i=t.legend;e?i?(Ot.configure(t,i,e),i.options=e):pr(t,e):i&&(Ot.removeBox(t,i),delete t.legend)},afterUpdate:function(t){t.legend&&t.legend.buildLabels()},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)},defaults:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e,i){var n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,i=t.options.legend||{},n=i.labels&&i.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(t){var i=t.controller.getStyle(n?0:void 0);return{text:e[t.index].label,fillStyle:i.backgroundColor,hidden:!t.visible,lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:t.index}}),this)}},title:{display:!1,position:"center",text:""}}},vr=function(t){function e(e){var n;return i(r(n=t.call(this)||this),e),n.chart=e.chart,n.options=e.options,n.ctx=e.ctx,n._margins=void 0,n._padding=void 0,n.top=void 0,n.bottom=void 0,n.left=void 0,n.right=void 0,n.width=void 0,n.height=void 0,n.maxWidth=void 0,n.maxHeight=void 0,n.position=void 0,n.weight=void 0,n.fullWidth=void 0,n}n(e,t);var a=e.prototype;return a.beforeUpdate=function(){},a.update=function(t,e,i){var n=this;n.beforeUpdate(),n.maxWidth=t,n.maxHeight=e,n._margins=i,n.beforeSetDimensions(),n.setDimensions(),n.afterSetDimensions(),n.beforeBuildLabels(),n.buildLabels(),n.afterBuildLabels(),n.beforeFit(),n.fit(),n.afterFit(),n.afterUpdate()},a.afterUpdate=function(){},a.beforeSetDimensions=function(){},a.setDimensions=function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height)},a.afterSetDimensions=function(){},a.beforeBuildLabels=function(){},a.buildLabels=function(){},a.afterBuildLabels=function(){},a.beforeFit=function(){},a.fit=function(){var t=this,e=t.options,i={},n=t.isHorizontal();if(e.display){var r=h(e.text)?e.text.length:1;t._padding=mt(e.padding);var a=r*bt(e.font).lineHeight+t._padding.height;t.width=i.width=n?t.maxWidth:a,t.height=i.height=n?a:t.maxHeight}else t.width=i.width=t.height=i.height=0},a.afterFit=function(){},a.isHorizontal=function(){var t=this.options.position;return"top"===t||"bottom"===t},a.draw=function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,r,a,o,s=bt(i.font),l=s.lineHeight,c=l/2+t._padding.top,u=0,d=t.top,f=t.left,p=t.bottom,g=t.right;if(t.isHorizontal()){switch(i.align){case"start":r=f,o="left";break;case"end":r=g,o="right";break;default:r=f+(g-f)/2,o="center"}a=d+c,n=g-f}else{switch(r="left"===i.position?f+c:g-c,i.align){case"start":a="left"===i.position?p:d,o="left";break;case"end":a="left"===i.position?d:p,o="right";break;default:a=d+(p-d)/2,o="center"}n=p-d,u=Math.PI*("left"===i.position?-.5:.5)}e.save(),e.fillStyle=s.color,e.font=s.string,e.translate(r,a),e.rotate(u),e.textAlign=o,e.textBaseline="middle";var v=i.text;if(h(v))for(var m=0,b=0;b<v.length;++b)e.fillText(v[b],0,m,n),m+=l;else e.fillText(v,0,0,n);e.restore()}},e}(Ti);function mr(t,e){var i=new vr({ctx:t.ctx,options:e,chart:t});Ot.configure(t,i,e),Ot.addBox(t,i),t.titleBlock=i}var br={id:"title",_element:vr,beforeInit:function(t){var e=t.options.title;e&&mr(t,e)},beforeUpdate:function(t){var e=t.options.title,i=t.titleBlock;e?(_(e,D.plugins.title),i?(Ot.configure(t,i,e),i.options=e):mr(t,e)):i&&(Ot.removeBox(t,i),delete t.titleBlock)},defaults:{align:"center",display:!1,font:{style:"bold"},fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}},xr={average:function(t){if(!t.length)return!1;var e,i,n=0,r=0,a=0;for(e=0,i=t.length;e<i;++e){var o=t[e].element;if(o&&o.hasValue()){var s=o.tooltipPosition();n+=s.x,r+=s.y,++a}}return{x:n/a,y:r/a}},nearest:function(t,e){var i,n,r,a=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){var l=t[i].element;if(l&&l.hasValue()){var c=fi(e,l.getCenterPoint());c<s&&(s=c,r=l)}}if(r){var u=r.tooltipPosition();a=u.x,o=u.y}return{x:a,y:o}}};function yr(t,e){return e&&(h(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function _r(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Mr(t,e){var i=e.element,n=e.datasetIndex,r=e.index,a=t.getDatasetMeta(n).controller,o=a.getLabelAndValue(r),s=o.label,l=o.value;return{chart:t,label:s,dataPoint:a.getParsed(r),formattedValue:l,dataset:a.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function wr(t){var e=t._chart.ctx,i=t.body,n=t.footer,r=t.options,a=t.title,o=r.bodyFont,s=r.footerFont,l=r.titleFont,c=r.boxWidth,u=r.boxHeight,h=a.length,d=n.length,f=i.length,p=2*r.yPadding,g=0,m=i.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);(m+=t.beforeBody.length+t.afterBody.length,h&&(p+=h*l.size+(h-1)*r.titleSpacing+r.titleMarginBottom),m)&&(p+=f*(r.displayColors?Math.max(u,o.size):o.size)+(m-f)*o.size+(m-1)*r.bodySpacing);d&&(p+=r.footerMarginTop+d*s.size+(d-1)*r.footerSpacing);var b=0,x=function(t){g=Math.max(g,e.measureText(t).width+b)};return e.save(),e.font=l.string,v(t.title,x),e.font=o.string,v(t.beforeBody.concat(t.afterBody),x),b=r.displayColors?c+2:0,v(i,(function(t){v(t.before,x),v(t.lines,x),v(t.after,x)})),b=0,e.font=s.string,v(t.footer,x),e.restore(),{width:g+=2*r.xPadding,height:p}}function kr(t,e,i){var n,r,a=i.x,o=i.y,s=i.width,l=i.height,c=t.chartArea,u="center",h="center";o<l?h="top":o>t.height-l&&(h="bottom");var d=(c.left+c.right)/2,f=(c.top+c.bottom)/2;"center"===h?(n=function(t){return t<=d},r=function(t){return t>d}):(n=function(t){return t<=s/2},r=function(e){return e>=t.width-s/2});var p=function(t){return t<=f?"top":"bottom"};return n(a)?(u="left",a+s+e.caretSize+e.caretPadding>t.width&&(u="center",h=p(o))):r(a)&&(u="right",function(t){return t-s-e.caretSize-e.caretPadding<0}(a)&&(u="center",h=p(o))),{xAlign:e.xAlign?e.xAlign:u,yAlign:e.yAlign?e.yAlign:h}}function Pr(t,e,i,n){var r=t.caretSize,a=t.caretPadding,o=t.cornerRadius,s=i.xAlign,l=i.yAlign,c=r+a,u=o+a,h=function(t,e,i){var n=t.x,r=t.width;return"right"===e?n-=r:"center"===e&&((n-=r/2)+r>i&&(n=i-r),n<0&&(n=0)),n}(e,s,n.width);return"center"===l?"left"===s?h+=c:"right"===s&&(h-=c):"left"===s?h-=u:"right"===s&&(h+=u),{x:h,y:function(t,e,i){var n=t.y,r=t.height;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c)}}function Sr(t,e){var i=t.options;return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-i.xPadding:t.x+i.xPadding}function Dr(t){return yr([],_r(t))}var Tr=function(t){function e(e){var i;return(i=t.call(this)||this).opacity=0,i._active=[],i._chart=e._chart,i._eventPosition=void 0,i._size=void 0,i._cachedAnimations=void 0,i.$animations=void 0,i.options=void 0,i.dataPoints=void 0,i.title=void 0,i.beforeBody=void 0,i.body=void 0,i.afterBody=void 0,i.footer=void 0,i.xAlign=void 0,i.yAlign=void 0,i.x=void 0,i.y=void 0,i.height=void 0,i.width=void 0,i.caretX=void 0,i.caretY=void 0,i.labelColors=void 0,i.labelTextColors=void 0,i.initialize(),i}n(e,t);var r=e.prototype;return r.initialize=function(){this.options=function(t){return(t=y({},[D.plugins.tooltip,t])).bodyFont=bt(t.bodyFont),t.titleFont=bt(t.titleFont),t.footerFont=bt(t.footerFont),t.boxHeight=p(t.boxHeight,t.bodyFont.size),t.boxWidth=p(t.boxWidth,t.bodyFont.size),t}(this._chart.options.tooltips)},r._resolveAnimations=function(){var t=this,e=t._cachedAnimations;if(e)return e;var i=t._chart,n=t.options,r=n.enabled&&i.options.animation&&n.animation,a=new Qe(t._chart,r);return t._cachedAnimations=Object.freeze(a),a},r.getTitle=function(t){var e=this.options.callbacks,i=e.beforeTitle.apply(this,[t]),n=e.title.apply(this,[t]),r=e.afterTitle.apply(this,[t]),a=[];return a=yr(a,_r(i)),a=yr(a,_r(n)),a=yr(a,_r(r))},r.getBeforeBody=function(t){return Dr(this.options.callbacks.beforeBody.apply(this,[t]))},r.getBody=function(t){var e=this,i=e.options.callbacks,n=[];return v(t,(function(t){var r={before:[],lines:[],after:[]};yr(r.before,_r(i.beforeLabel.call(e,t))),yr(r.lines,i.label.call(e,t)),yr(r.after,_r(i.afterLabel.call(e,t))),n.push(r)})),n},r.getAfterBody=function(t){return Dr(this.options.callbacks.afterBody.apply(this,[t]))},r.getFooter=function(t){var e=this.options.callbacks,i=e.beforeFooter.apply(this,[t]),n=e.footer.apply(this,[t]),r=e.afterFooter.apply(this,[t]),a=[];return a=yr(a,_r(i)),a=yr(a,_r(n)),a=yr(a,_r(r))},r._createItems=function(){var t,e,i=this,n=i._active,r=i.options,a=i._chart.data,o=[],s=[],l=[];for(t=0,e=n.length;t<e;++t)l.push(Mr(i._chart,n[t]));return r.filter&&(l=l.filter((function(t,e,i){return r.filter(t,e,i,a)}))),r.itemSort&&(l=l.sort((function(t,e){return r.itemSort(t,e,a)}))),v(l,(function(t){o.push(r.callbacks.labelColor.call(i,t)),s.push(r.callbacks.labelTextColor.call(i,t))})),i.labelColors=o,i.labelTextColors=s,i.dataPoints=l,l},r.update=function(t){var e,n=this,r=n.options,a=n._active;if(a.length){var o=xr[r.position].call(n,a,n._eventPosition),s=n._createItems();n.title=n.getTitle(s),n.beforeBody=n.getBeforeBody(s),n.body=n.getBody(s),n.afterBody=n.getAfterBody(s),n.footer=n.getFooter(s);var l=n._size=wr(n),c=i({},o,l),u=kr(n._chart,r,c),h=Pr(r,c,u,n._chart);n.xAlign=u.xAlign,n.yAlign=u.yAlign,e={opacity:1,x:h.x,y:h.y,width:l.width,height:l.height,caretX:o.x,caretY:o.y}}else 0!==n.opacity&&(e={opacity:0});e&&n._resolveAnimations().update(n,e),t&&r.custom&&r.custom.call(n,{chart:n._chart,tooltip:n})},r.drawCaret=function(t,e,i){var n=this.getCaretPosition(t,i);e.lineTo(n.x1,n.y1),e.lineTo(n.x2,n.y2),e.lineTo(n.x3,n.y3)},r.getCaretPosition=function(t,e){var i,n,r,a,o,s,l=this.xAlign,c=this.yAlign,u=this.options,h=u.cornerRadius,d=u.caretSize,f=t.x,p=t.y,g=e.width,v=e.height;return"center"===c?(o=p+v/2,"left"===l?(n=(i=f)-d,a=o+d,s=o-d):(n=(i=f+g)+d,a=o-d,s=o+d),r=i):(n="left"===l?f+h+d:"right"===l?f+g-h-d:this.caretX,"top"===c?(o=(a=p)-d,i=n-d,r=n+d):(o=(a=p+v)+d,i=n+d,r=n-d),s=a),{x1:i,x2:n,x3:r,y1:a,y2:o,y3:s}},r.drawTitle=function(t,e){var i,n,r,a=this,o=a.options,s=a.title,l=s.length;if(l){var c=rn(o.rtl,a.x,a.width);for(t.x=Sr(a,o.titleAlign),e.textAlign=c.textAlign(o.titleAlign),e.textBaseline="middle",i=o.titleFont,n=o.titleSpacing,e.fillStyle=o.titleFont.color,e.font=i.string,r=0;r<l;++r)e.fillText(s[r],c.x(t.x),t.y+i.size/2),t.y+=i.size+n,r+1===l&&(t.y+=o.titleMarginBottom-n)}},r._drawColorBox=function(t,e,i,n){var r=this.options,a=this.labelColors[i],o=r.boxHeight,s=r.boxWidth,l=r.bodyFont,c=Sr(this,"left"),u=n.x(c),h=o<l.size?(l.size-o)/2:0,d=e.y+h;t.fillStyle=r.multiKeyBackground,t.fillRect(n.leftForLtr(u,s),d,s,o),t.lineWidth=1,t.strokeStyle=a.borderColor,t.strokeRect(n.leftForLtr(u,s),d,s,o),t.fillStyle=a.backgroundColor,t.fillRect(n.leftForLtr(n.xPlus(u,1),s-2),d+1,s-2,o-2),t.fillStyle=this.labelTextColors[i]},r.drawBody=function(t,e){var i,n,r,a,o,s,l,c=this,u=c.body,h=c.options,d=h.bodyFont,f=h.bodySpacing,p=h.bodyAlign,g=h.displayColors,m=h.boxHeight,b=h.boxWidth,x=d.size,y=0,_=rn(h.rtl,c.x,c.width),M=function(i){e.fillText(i,_.x(t.x+y),t.y+x/2),t.y+=x+f},w=_.textAlign(p);for(e.textAlign=p,e.textBaseline="middle",e.font=d.string,t.x=Sr(c,w),e.fillStyle=d.color,v(c.beforeBody,M),y=g&&"right"!==w?"center"===p?b/2+1:b+2:0,a=0,s=u.length;a<s;++a){for(i=u[a],n=c.labelTextColors[a],e.fillStyle=n,v(i.before,M),r=i.lines,g&&r.length&&(c._drawColorBox(e,t,a,_),x=Math.max(d.size,m)),o=0,l=r.length;o<l;++o)M(r[o]),x=d.size;v(i.after,M)}y=0,x=d.size,v(c.afterBody,M),t.y-=f},r.drawFooter=function(t,e){var i,n,r=this,a=r.options,o=r.footer,s=o.length;if(s){var l=rn(a.rtl,r.x,r.width);for(t.x=Sr(r,a.footerAlign),t.y+=a.footerMarginTop,e.textAlign=l.textAlign(a.footerAlign),e.textBaseline="middle",i=a.footerFont,e.fillStyle=a.footerFont.color,e.font=i.string,n=0;n<s;++n)e.fillText(o[n],l.x(t.x),t.y+i.size/2),t.y+=i.size+a.footerSpacing}},r.drawBackground=function(t,e,i){var n=this.xAlign,r=this.yAlign,a=this.options,o=t.x,s=t.y,l=i.width,c=i.height,u=a.cornerRadius;e.fillStyle=a.backgroundColor,e.strokeStyle=a.borderColor,e.lineWidth=a.borderWidth,e.beginPath(),e.moveTo(o+u,s),"top"===r&&this.drawCaret(t,e,i),e.lineTo(o+l-u,s),e.quadraticCurveTo(o+l,s,o+l,s+u),"center"===r&&"right"===n&&this.drawCaret(t,e,i),e.lineTo(o+l,s+c-u),e.quadraticCurveTo(o+l,s+c,o+l-u,s+c),"bottom"===r&&this.drawCaret(t,e,i),e.lineTo(o+u,s+c),e.quadraticCurveTo(o,s+c,o,s+c-u),"center"===r&&"left"===n&&this.drawCaret(t,e,i),e.lineTo(o,s+u),e.quadraticCurveTo(o,s,o+u,s),e.closePath(),e.fill(),a.borderWidth>0&&e.stroke()},r._updateAnimationTarget=function(){var t=this,e=t._chart,n=t.options,r=t.$animations,a=r&&r.x,o=r&&r.y;if(a||o){var s=xr[n.position].call(t,t._active,t._eventPosition);if(!s)return;var l=t._size=wr(t),c=i({},s,t._size),u=kr(e,n,c),h=Pr(n,c,u,e);a._to===h.x&&o._to===h.y||(t.xAlign=u.xAlign,t.yAlign=u.yAlign,t.width=l.width,t.height=l.height,t.caretX=s.x,t.caretY=s.y,t._resolveAnimations().update(t,h))}},r.draw=function(t){var e=this,i=e.options,n=e.opacity;if(n){e._updateAnimationTarget();var r={width:e.width,height:e.height},a={x:e.x,y:e.y};n=Math.abs(n)<.001?0:n;var o=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;i.enabled&&o&&(t.save(),t.globalAlpha=n,e.drawBackground(a,t,r),an(t,i.textDirection),a.y+=i.yPadding,e.drawTitle(a,t),e.drawBody(a,t),e.drawFooter(a,t),on(t,i.textDirection),t.restore())}},r.handleEvent=function(t,e){var i,n=this,r=n.options,a=n._active||[],o=[];"mouseout"!==t.type&&(o=n._chart.getElementsAtEventForMode(t,r.mode,r,e),r.reverse&&o.reverse());var s=xr[r.position].call(n,o,t),l=this.caretX!==s.x||this.caretY!==s.y;return(i=e||!m(o,a)||l)&&(n._active=o,(r.enabled||r.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0))),i},e}(Ti);Tr.positioners=xr;var Ar={id:"tooltip",_element:Tr,positioners:xr,afterInit:function(t){t.options.tooltips&&(t.tooltip=new Tr({_chart:t}))},beforeUpdate:function(t){t.tooltip&&t.tooltip.initialize()},reset:function(t){t.tooltip&&t.tooltip.initialize()},afterDraw:function(t){var e=t.tooltip,i={tooltip:e};!1!==t._plugins.notify(t,"beforeTooltipDraw",[i])&&(e&&e.draw(t.ctx),t._plugins.notify(t,"afterTooltipDraw",[i]))},afterEvent:function(t,e,i){if(t.tooltip){var n=i;t.tooltip.handleEvent(e,n)}},defaults:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFont:{style:"bold",color:"#fff"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodySpacing:2,bodyFont:{color:"#fff"},bodyAlign:"left",footerSpacing:2,footerMarginTop:6,footerFont:{color:"#fff",style:"bold"},footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart",numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:s,title:function(t){if(t.length>0){var e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:s,beforeBody:s,beforeLabel:s,label:function(t){var e=t.dataset.label||"";e&&(e+=": ");var i=t.formattedValue;return u(i)||(e+=i),e},labelColor:function(t){var e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor}},labelTextColor:function(){return this.options.bodyFont.color},afterLabel:s,afterBody:s,beforeFooter:s,footer:s,afterFooter:s}}},Or=Object.freeze({__proto__:null,Filler:cr,Legend:gr,Title:br,Tooltip:Ar}),Er=function(t){function e(e){var i;return(i=t.call(this,e)||this)._startValue=void 0,i._valueRange=0,i}n(e,t);var i=e.prototype;return i.parse=function(t,e){var i=this.getLabels();if(i[e]===t)return e;var n=i.indexOf(t),r=i.lastIndexOf(t);return-1===n||n!==r?e:n},i.determineDataLimits=function(){var t=this,e=t.getLabels().length-1;t.min=Math.max(t._userMin||0,0),t.max=Math.min(t._userMax||e,e)},i.buildTicks=function(){var t=this,e=t.min,i=t.max,n=t.options.offset,r=[],a=t.getLabels();a=0===e&&i===a.length-1?a:a.slice(e,i+1),t._valueRange=Math.max(a.length-(n?0:1),1),t._startValue=t.min-(n?.5:0);for(var o=e;o<=i;o++)r.push({value:o});return r},i.getLabelForValue=function(t){var e=this.getLabels();return t>=0&&t<e.length?e[t]:t},i.configure=function(){t.prototype.configure.call(this),this.isHorizontal()||(this._reversePixels=!this._reversePixels)},i.getPixelForValue=function(t){return"number"!=typeof t&&(t=this.parse(t)),this.getPixelForDecimal((t-this._startValue)/this._valueRange)},i.getPixelForTick=function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)},i.getValueForPixel=function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},i.getBasePixel=function(){return this.bottom},e}(Ii);function Cr(t){var e=Math.floor(ni(t)),i=t/Math.pow(10,e);return(i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,e)}Er.id="category",Er.defaults={ticks:{callback:Er.prototype.getLabelForValue}};var Lr=function(t){function e(e){var i;return(i=t.call(this,e)||this).start=void 0,i.end=void 0,i._startValue=void 0,i._endValue=void 0,i._valueRange=0,i}n(e,t);var i=e.prototype;return i.parse=function(t,e){return u(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?NaN:+t},i.handleTickRangeOptions=function(){var t=this,e=t.options;if(e.beginAtZero){var i=li(t.min),n=li(t.max);i<0&&n<0?t.max=0:i>0&&n>0&&(t.min=0)}var r=void 0!==e.min||void 0!==e.suggestedMin,a=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),r!==a&&t.min>=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},i.getTickLimit=function(){var t,e=this.options.ticks,i=e.maxTicksLimit,n=e.stepSize;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this.computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},i.computeTickLimit=function(){return Number.POSITIVE_INFINITY},i.buildTicks=function(){var t=this,e=t.options,i=e.ticks,n=t.getTickLimit(),r=function(t,e){var i,n,r,a,o=[],s=t.stepSize,l=t.min,c=t.max,h=t.precision,d=s||1,f=t.maxTicks-1,p=e.min,g=e.max,v=Cr((g-p)/f/d)*d;if(v<1e-14&&u(l)&&u(c))return[{value:p},{value:g}];(a=Math.ceil(g/v)-Math.floor(p/v))>f&&(v=Cr(a*v/f/d)*d),s||u(h)?i=Math.pow(10,hi(v)):(i=Math.pow(10,h),v=Math.ceil(v*i)/i),n=Math.floor(p/v)*v,r=Math.ceil(g/v)*v,!s||u(l)||u(c)||oi((c-l)/s,v/1e3)&&(n=l,r=c),a=ai(a=(r-n)/v,Math.round(a),v/1e3)?Math.round(a):Math.ceil(a),n=Math.round(n*i)/i,r=Math.round(r*i)/i,o.push({value:u(l)?n:l});for(var m=1;m<a;++m)o.push({value:Math.round((n+m*v)*i)/i});return o.push({value:u(c)?r:c}),o}({maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:i.precision,stepSize:p(i.fixedStepSize,i.stepSize)},t);return si(r,t,"value"),e.reverse?(r.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),r},i.configure=function(){var e=this,i=e.ticks,n=e.min,r=e.max;if(t.prototype.configure.call(this),e.options.offset&&i.length){var a=(r-n)/Math.max(i.length-1,1)/2;n-=a,r+=a}e._startValue=n,e._endValue=r,e._valueRange=r-n},i.getLabelForValue=function(t){return new Intl.NumberFormat(this.options.locale).format(t)},e}(Ii),Fr=function(t){function e(){return t.apply(this,arguments)||this}n(e,t);var i=e.prototype;return i.determineDataLimits=function(){var t=this,e=t.options,i=t.getMinMax(!0),n=i.min,r=i.max;t.min=f(n)?n:p(e.suggestedMin,0),t.max=f(r)?r:p(e.suggestedMax,1),e.stacked&&n>0&&(t.min=0),t.handleTickRangeOptions()},i.computeTickLimit=function(){if(this.isHorizontal())return Math.ceil(this.width/40);var t=this._resolveTickFontOptions(0);return Math.ceil(this.height/t.lineHeight)},i.getPixelForValue=function(t){return this.getPixelForDecimal((t-this._startValue)/this._valueRange)},i.getValueForPixel=function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},e}(Lr);function Rr(t){return 1===t/Math.pow(10,Math.floor(ni(t)))}function Ir(t,e){return f(t)?t:e}Fr.id="linear",Fr.defaults={ticks:{callback:Oi.formatters.numeric}};var zr=function(t){function e(e){var i;return(i=t.call(this,e)||this).start=void 0,i.end=void 0,i._startValue=void 0,i._valueRange=0,i}n(e,t);var i=e.prototype;return i.parse=function(t,e){var i=Lr.prototype.parse.apply(this,[t,e]);if(0!==i)return f(i)&&i>0?i:NaN},i.determineDataLimits=function(){var t=this.getMinMax(!0),e=t.min,i=t.max;this.min=f(e)?Math.max(0,e):null,this.max=f(i)?Math.max(0,i):null,this.handleTickRangeOptions()},i.handleTickRangeOptions=function(){var t=this.min,e=this.max;t===e&&(t<=0?(t=1,e=10):(t=Math.pow(10,Math.floor(ni(t))-1),e=Math.pow(10,Math.floor(ni(e))+1))),t<=0&&(t=Math.pow(10,Math.floor(ni(e))-1)),e<=0&&(e=Math.pow(10,Math.floor(ni(t))+1)),this.min=t,this.max=e},i.buildTicks=function(){var t=this,e=t.options,i=function(t,e){var i=Math.floor(ni(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[],a=Ir(t.min,Math.pow(10,Math.floor(ni(e.min)))),o=Math.floor(ni(a)),s=Math.floor(a/Math.pow(10,o)),l=o<0?Math.pow(10,Math.abs(o)):1;do{r.push({value:a,major:Rr(a)}),10===++s&&(s=1,l=++o>=0?1:l),a=Math.round(s*Math.pow(10,o)*l)/l}while(o<i||o===i&&s<n);var c=Ir(t.max,a);return r.push({value:c,major:Rr(a)}),r}({min:t._userMin,max:t._userMax},t),n=!t.isHorizontal();return si(i,t,"value"),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&i.reverse(),i},i.getLabelForValue=function(t){return void 0===t?"0":new Intl.NumberFormat(this.options.locale).format(t)},i.configure=function(){var e=this.min;t.prototype.configure.call(this),this._startValue=ni(e),this._valueRange=ni(this.max)-ni(e)},i.getPixelForValue=function(t){var e=this;return void 0!==t&&0!==t||(t=e.min),e.getPixelForDecimal(t===e.min?0:(ni(t)-e._startValue)/e._valueRange)},i.getValueForPixel=function(t){var e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)},e}(Ii);function Vr(t){var e=t.ticks;return e.display&&t.display?p(e.font&&e.font.size,D.font.size)+2*e.backdropPaddingY:0}function Br(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:t<n||t>r?{start:e-i,end:e}:{start:e,end:e+i}}function Wr(t){return 0===t||180===t?"center":t<180?"left":"right"}function Nr(t,e,i,n){var r,a,o=i.y+n/2;if(h(e))for(r=0,a=e.length;r<a;++r)t.fillText(e[r],i.x,o),o+=n;else t.fillText(e,i.x,o)}function Hr(t,e,i){90===t||270===t?i.y-=e.h/2:(t>270||t<90)&&(i.y-=e.h)}function jr(t){return ri(t)?t:0}zr.id="logarithmic",zr.defaults={ticks:{callback:Oi.formatters.logarithmic,major:{enabled:!0}}};var Yr=function(t){function e(e){var i;return(i=t.call(this,e)||this).xCenter=void 0,i.yCenter=void 0,i.drawingArea=void 0,i.pointLabels=[],i}n(e,t);var i=e.prototype;return i.init=function(e){t.prototype.init.call(this,e),this.axis="r"},i.setDimensions=function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Vr(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},i.determineDataLimits=function(){var t=this.getMinMax(!1),e=t.min,i=t.max;this.min=f(e)&&!isNaN(e)?e:0,this.max=f(i)&&!isNaN(i)?i:0,this.handleTickRangeOptions()},i.computeTickLimit=function(){return Math.ceil(this.drawingArea/Vr(this.options))},i.generateTickLabels=function(t){var e=this;Lr.prototype.generateTickLabels.call(e,t),e.pointLabels=e.chart.data.labels.map((function(t,i){var n=g(e.options.pointLabels.callback,[t,i],e);return n||0===n?n:""}))},i.fit=function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,i,n,r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},a={};t._pointLabelSizes=[];var o,s,l,c=t.chart.data.labels.length;for(e=0;e<c;e++){n=t.getPointPosition(e,t.drawingArea+5);var u={chart:t.chart,scale:t,index:e,label:t.pointLabels[e]},d=bt(xt([t.options.pointLabels.font],u,e));t.ctx.font=d.string,o=t.ctx,s=d.lineHeight,i=h(l=t.pointLabels[e])?{w:I(o,o.font,l),h:l.length*s}:{w:o.measureText(l).width,h:s},t._pointLabelSizes[e]=i;var f=t.getIndexAngle(e),p=ui(f),g=Br(p,n.x,i.w,0,180),v=Br(p,n.y,i.h,90,270);g.start<r.l&&(r.l=g.start,a.l=f),g.end>r.r&&(r.r=g.end,a.r=f),v.start<r.t&&(r.t=v.start,a.t=f),v.end>r.b&&(r.b=v.end,a.b=f)}t._setReductions(t.drawingArea,r,a)}(this):this.setCenterPoint(0,0,0,0)},i._setReductions=function(t,e,i){var n=this,r=e.l/Math.sin(i.l),a=Math.max(e.r-n.width,0)/Math.sin(i.r),o=-e.t/Math.cos(i.t),s=-Math.max(e.b-(n.height-n.paddingTop),0)/Math.cos(i.b);r=jr(r),a=jr(a),o=jr(o),s=jr(s),n.drawingArea=Math.min(Math.floor(t-(r+a)/2),Math.floor(t-(o+s)/2)),n.setCenterPoint(r,a,o,s)},i.setCenterPoint=function(t,e,i,n){var r=this,a=r.width-e-r.drawingArea,o=t+r.drawingArea,s=i+r.drawingArea,l=r.height-r.paddingTop-n-r.drawingArea;r.xCenter=Math.floor((o+a)/2+r.left),r.yCenter=Math.floor((s+l)/2+r.top+r.paddingTop)},i.getIndexAngle=function(t){var e=this.chart;return gi(t*(2*Math.PI/e.data.labels.length)+ci((e.options||{}).startAngle||0))},i.getDistanceFromCenterForValue=function(t){var e=this;if(u(t))return NaN;var i=e.drawingArea/(e.max-e.min);return e.options.reverse?(e.max-t)*i:(t-e.min)*i},i.getValueForDistanceFromCenter=function(t){if(u(t))return NaN;var e=this,i=t/(e.drawingArea/(e.max-e.min));return e.options.reverse?e.max-i:e.min+i},i.getPointPosition=function(t,e){var i=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(i)*e+this.xCenter,y:Math.sin(i)*e+this.yCenter,angle:i}},i.getPointPositionForValue=function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},i.getBasePosition=function(t){return this.getPointPositionForValue(t||0,this.getBaseValue())},i.drawGrid=function(){var t,e,i,n=this,r=n.ctx,a=n.options,o=a.gridLines,s=a.angleLines;if(a.pointLabels.display&&function(t){var e=t.ctx,i=t.options,n=i.pointLabels,r=Vr(i),a=t.getDistanceFromCenterForValue(i.ticks.reverse?t.min:t.max);e.save(),e.textBaseline="middle";for(var o=t.chart.data.labels.length-1;o>=0;o--){var s=0===o?r/2:0,l=t.getPointPosition(o,a+s+5),c={chart:t.chart,scale:t,index:o,label:t.pointLabels[o]},u=bt(xt([n.font],c,o));e.font=u.string,e.fillStyle=u.color;var h=ui(t.getIndexAngle(o));e.textAlign=Wr(h),Hr(h,t._pointLabelSizes[o],l),Nr(e,t.pointLabels[o],l,u.lineHeight)}e.restore()}(n),o.display&&n.ticks.forEach((function(t,i){0!==i&&(e=n.getDistanceFromCenterForValue(n.ticks[i].value),function(t,e,i,n){var r,a=t.ctx,o=e.circular,s=t.chart.data.labels.length,l={chart:t.chart,scale:t,index:n,tick:t.ticks[n]},c=xt([e.color],l,n-1),u=xt([e.lineWidth],l,n-1);if((o||s)&&c&&u){if(a.save(),a.strokeStyle=c,a.lineWidth=u,a.setLineDash&&(a.setLineDash(xt([e.borderDash,[]],l)),a.lineDashOffset=xt([e.borderDashOffset],l,n-1)),a.beginPath(),o)a.arc(t.xCenter,t.yCenter,i,0,2*Math.PI);else{r=t.getPointPosition(0,i),a.moveTo(r.x,r.y);for(var h=1;h<s;h++)r=t.getPointPosition(h,i),a.lineTo(r.x,r.y)}a.closePath(),a.stroke(),a.restore()}}(n,o,e,i))})),s.display){for(r.save(),t=n.chart.data.labels.length-1;t>=0;t--){var l={chart:n.chart,scale:n,index:t,label:n.pointLabels[t]},c=xt([s.lineWidth,o.lineWidth],l,t),u=xt([s.color,o.color],l,t);c&&u&&(r.lineWidth=c,r.strokeStyle=u,r.setLineDash&&(r.setLineDash(xt([s.borderDash,o.borderDash,[]],l)),r.lineDashOffset=xt([s.borderDashOffset,o.borderDashOffset,0],l,t)),e=n.getDistanceFromCenterForValue(a.ticks.reverse?n.min:n.max),i=n.getPointPosition(t,e),r.beginPath(),r.moveTo(n.xCenter,n.yCenter),r.lineTo(i.x,i.y),r.stroke())}r.restore()}},i.drawLabels=function(){var t=this,e=t.ctx,i=t.options,n=i.ticks;if(n.display){var r,a,o=t.getIndexAngle(0);e.save(),e.translate(t.xCenter,t.yCenter),e.rotate(o),e.textAlign="center",e.textBaseline="middle",t.ticks.forEach((function(o,s){var l={chart:t.chart,scale:t,index:s,tick:o};if(0!==s||i.reverse){var c=t._resolveTickFontOptions(s);e.font=c.string,r=t.getDistanceFromCenterForValue(t.ticks[s].value),xt([n.showLabelBackdrop],l,s)&&(a=e.measureText(o.label).width,e.fillStyle=xt([n.backdropColor],l,s),e.fillRect(-a/2-n.backdropPaddingX,-r-c.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,c.size+2*n.backdropPaddingY)),e.fillStyle=c.color,e.fillText(o.label,0,-r)}})),e.restore()}},i.drawTitle=function(){},e}(Lr);Yr.id="radialLinear",Yr.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:Oi.formatters.numeric},pointLabels:{display:!0,font:{size:10},callback:function(t){return t}}};var Xr=Number.MAX_SAFE_INTEGER||9007199254740991,Ur={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}},qr=Object.keys(Ur);function Kr(t,e){return t-e}function Gr(t,e){if(u(e))return null;var i=t._adapter,n=t.options.time,r=n.parser,a=n.round,o=n.isoWeekday,s=e;return"function"==typeof r&&(s=r(s)),f(s)||(s="string"==typeof r?i.parse(s,r):i.parse(s)),null===s?s:(a&&(s="week"===a&&o?t._adapter.startOf(s,"isoWeek",o):t._adapter.startOf(s,a)),+s)}function $r(t,e,i,n){for(var r=qr.length,a=qr.indexOf(t);a<r-1;++a){var o=Ur[qr[a]],s=o.steps?o.steps:Xr;if(o.common&&Math.ceil((i-e)/(s*o.size))<=n)return qr[a]}return qr[r-1]}function Zr(t,e,i){if(t.length){var n=U(t,i),r=n.lo,a=n.hi;e[t[r]>=i?t[r]:t[a]]=!0}}function Qr(t,e,i){var n,r,a=[],o={},s=e.length;for(n=0;n<s;++n)o[r=e[n]]=n,a.push({value:r,major:!1});return 0!==s&&i?function(t,e,i,n){var r,a,o=t._adapter,s=+o.startOf(e[0].value,n),l=e[e.length-1].value;for(r=s;r<=l;r=+o.add(r,1,n))(a=i[r])>=0&&(e[a].major=!0);return e}(t,a,o,i):a}var Jr=function(t){function e(e){var i;return(i=t.call(this,e)||this)._cache={data:[],labels:[],all:[]},i._unit="day",i._majorUnit=void 0,i._offsets={},i._normalized=!1,i}n(e,t);var i=e.prototype;return i.init=function(e,i){var n=e.time||(e.time={}),r=this._adapter=new un._date(e.adapters.date);_(n.displayFormats,r.formats()),t.prototype.init.call(this,e),this._normalized=i.normalized},i.parse=function(t,e){return void 0===t?NaN:Gr(this,t)},i.invalidateCaches=function(){this._cache={data:[],labels:[],all:[]}},i.determineDataLimits=function(){var t=this,e=t.options,i=t._adapter,n=e.time.unit||"day",r=t.getUserBounds(),a=r.min,o=r.max,s=r.minDefined,l=r.maxDefined;function c(t){s||isNaN(t.min)||(a=Math.min(a,t.min)),l||isNaN(t.max)||(o=Math.max(o,t.max))}s&&l||(c(t._getLabelBounds()),"ticks"===e.bounds&&"labels"===e.ticks.source||c(t.getMinMax(!1))),a=f(a)&&!isNaN(a)?a:+i.startOf(Date.now(),n),o=f(o)&&!isNaN(o)?o:+i.endOf(Date.now(),n)+1,t.min=Math.min(a,o),t.max=Math.max(a+1,o)},i._getLabelBounds=function(){var t=this.getLabelTimestamps(),e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}},i.buildTicks=function(){var t=this,e=t.options,i=e.time,n=e.ticks,r="labels"===n.source?t.getLabelTimestamps():t._generate();"ticks"===e.bounds&&r.length&&(t.min=t._userMin||r[0],t.max=t._userMax||r[r.length-1]);var a=t.min,o=function(t,e,i){for(var n=0,r=t.length;n<r&&t[n]<e;)n++;for(;r>n&&t[r-1]>i;)r--;return n>0||r<t.length?t.slice(n,r):t}(r,a,t.max);return t._unit=i.unit||(n.autoSkip?$r(i.minUnit,t.min,t.max,t._getLabelCapacity(a)):function(t,e,i,n,r){for(var a=qr.length-1;a>=qr.indexOf(i);a--){var o=qr[a];if(Ur[o].common&&t._adapter.diff(r,n,o)>=e-1)return o}return qr[i?qr.indexOf(i):0]}(t,o.length,i.minUnit,t.min,t.max)),t._majorUnit=n.major.enabled&&"year"!==t._unit?function(t){for(var e=qr.indexOf(t)+1,i=qr.length;e<i;++e)if(Ur[qr[e]].common)return qr[e]}(t._unit):void 0,t.initOffsets(r),e.reverse&&o.reverse(),Qr(t,o,t._majorUnit)},i.initOffsets=function(t){var e,i,n=this,r=0,a=0;n.options.offset&&t.length&&(e=n.getDecimalForValue(t[0]),r=1===t.length?1-e:(n.getDecimalForValue(t[1])-e)/2,i=n.getDecimalForValue(t[t.length-1]),a=1===t.length?i:(i-n.getDecimalForValue(t[t.length-2]))/2),n._offsets={start:r,end:a,factor:1/(r+1+a)}},i._generate=function(){var t,e=this,i=e._adapter,n=e.min,r=e.max,a=e.options,o=a.time,s=o.unit||$r(o.minUnit,n,r,e._getLabelCapacity(n)),l=p(o.stepSize,1),c="week"===s&&o.isoWeekday,u={},h=n;if(c&&(h=+i.startOf(h,"isoWeek",c)),h=+i.startOf(h,c?"day":s),i.diff(r,n,s)>1e5*l)throw new Error(n+" and "+r+" are too far apart with stepSize of "+l+" "+s);if("data"===e.options.ticks.source){var d=e.getDataTimestamps();for(t=h;t<r;t=+i.add(t,l,s))Zr(d,u,t);t!==r&&"ticks"!==a.bounds||Zr(d,u,t)}else{for(t=h;t<r;t=+i.add(t,l,s))u[t]=!0;t!==r&&"ticks"!==a.bounds||(u[t]=!0)}return Object.keys(u).map((function(t){return+t}))},i.getLabelForValue=function(t){var e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)},i._tickFormatFunction=function(t,e,i,n){var r=this.options,a=r.time.displayFormats,o=this._unit,s=this._majorUnit,l=o&&a[o],c=s&&a[s],u=i[e],h=s&&c&&u&&u.major,d=this._adapter.format(t,n||(h?c:l)),f=r.ticks.callback;return f?f(d,e,i):d},i.generateTickLabels=function(t){var e,i,n;for(e=0,i=t.length;e<i;++e)(n=t[e]).label=this._tickFormatFunction(n.value,e,t)},i.getDecimalForValue=function(t){return(t-this.min)/(this.max-this.min)},i.getPixelForValue=function(t){var e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)},i.getValueForPixel=function(t){var e=this,i=e._offsets,n=e.getDecimalForPixel(t)/i.factor-i.end;return e.min+n*(e.max-e.min)},i._getLabelSize=function(t){var e=this.options.ticks,i=this.ctx.measureText(t).width,n=ci(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(n),a=Math.sin(n),o=this._resolveTickFontOptions(0).size;return{w:i*r+o*a,h:i*a+o*r}},i._getLabelCapacity=function(t){var e=this,i=e.options.time,n=i.displayFormats,r=n[i.unit]||n.millisecond,a=e._tickFormatFunction(t,0,Qr(e,[t],e._majorUnit),r),o=e._getLabelSize(a),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h)-1;return s>0?s:1},i.getDataTimestamps=function(){var t,e,i=this,n=i._cache.data||[];if(n.length)return n;var r=i.getMatchingVisibleMetas();if(i._normalized&&r.length)return i._cache.data=r[0].controller.getAllParsedValues(i);for(t=0,e=r.length;t<e;++t)n=n.concat(r[t].controller.getAllParsedValues(i));return i._cache.data=i.normalize(n)},i.getLabelTimestamps=function(){var t,e,i=this,n=i._cache.labels||[];if(n.length)return n;var r=i.getLabels();for(t=0,e=r.length;t<e;++t)n.push(Gr(i,r[t]));return i._cache.labels=i._normalized?n:i.normalize(n)},i.normalize=function(t){return function(t){var e,i,n=new Set;for(e=0,i=t.length;e<i;++e)n.add(t[e]);if(n.size===i)return t;var r=[];return n.forEach((function(t){r.push(t)})),r}(t.sort(Kr))},e}(Ii);function ta(t,e,i){var n,r,a,o;if(i)n=Math.floor(e),r=Math.ceil(e),a=t[n],o=t[r];else{var s=U(t,e);a=s.lo,o=s.hi,n=t[a],r=t[o]}var l=r-n;return l?a+(o-a)*(e-n)/l:a}Jr.id="time",Jr.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};var ea=function(t){function e(e){var i;return(i=t.call(this,e)||this)._table=[],i._maxIndex=void 0,i}n(e,t);var i=e.prototype;return i.initOffsets=function(){var e=this,i=e._getTimestampsForTable();e._table=e.buildLookupTable(i),e._maxIndex=e._table.length-1,t.prototype.initOffsets.call(this,i)},i.buildLookupTable=function(t){var e=this.min,i=this.max;if(!t.length)return[{time:e,pos:0},{time:i,pos:1}];var n,r,a,o=[e];for(n=0,r=t.length;n<r;++n)(a=t[n])>e&&a<i&&o.push(a);return o.push(i),o},i._getTimestampsForTable=function(){var t=this,e=t._cache.all||[];if(e.length)return e;var i=t.getDataTimestamps(),n=t.getLabelTimestamps();return e=i.length&&n.length?t.normalize(i.concat(n)):i.length?i:n,e=t._cache.all=e},i.getPixelForValue=function(t,e){var i=this,n=i._offsets,r=i._normalized&&i._maxIndex>0&&!u(e)?e/i._maxIndex:i.getDecimalForValue(t);return i.getPixelForDecimal((n.start+r)*n.factor)},i.getDecimalForValue=function(t){return ta(this._table,t)/this._maxIndex},i.getValueForPixel=function(t){var e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return ta(this._table,i*this._maxIndex,!0)},e}(Jr);ea.id="timeseries",ea.defaults=Jr.defaults;var ia=Object.freeze({__proto__:null,CategoryScale:Er,LinearScale:Fr,LogarithmicScale:zr,RadialLinearScale:Yr,TimeScale:Jr,TimeSeriesScale:ea});return $i.register(Pn,ia,Zn,Or),$i.helpers=sn,$i._adapters=un,$i.Animation=$e,$i.animator=o,$i.animationService=Qe,$i.controllers=Vi.controllers.items,$i.DatasetController=Di,$i.defaults=D,$i.Element=Ti,$i.elements=Zn,$i.Interaction=gt,$i.layouts=Ot,$i.platforms=de,$i.registry=Vi,$i.Scale=Ii,$i.Ticks=Oi,"undefined"!=typeof window&&(window.Chart=$i),$i}));
  