芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/myvyralapp.com/assets/admin/js/vendor/chart.js.2.8.0.js
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],function(t){return e(function(){try{return t("moment")}catch(t){}}())}):t.Chart=e(t.moment)}(this,function(n){"use strict";n=n&&n.hasOwnProperty("default")?n.default:n;var a={rgb2hsl:o,rgb2hsv:e,rgb2hwb:i,rgb2cmyk:s,rgb2keyword:l,rgb2xyz:d,rgb2lab:u,rgb2lch:function(t){return x(u(t))},hsl2rgb:h,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;return 0===n?[0,0,0]:[e,2*(i*=(n*=2)<=1?n:2-n)/(n+i)*100,(n+i)/2*100]},hsl2hwb:function(t){return i(h(t))},hsl2cmyk:function(t){return s(h(t))},hsl2keyword:function(t){return l(h(t))},hsv2rgb:c,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,r=t[2]/100;return e=a*r,[n,100*(e=(e/=(i=(2-a)*r)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return i(c(t))},hsv2cmyk:function(t){return s(c(t))},hsv2keyword:function(t){return l(c(t))},hwb2rgb:f,hwb2hsl:function(t){return o(f(t))},hwb2hsv:function(t){return e(f(t))},hwb2cmyk:function(t){return s(f(t))},hwb2keyword:function(t){return l(f(t))},cmyk2rgb:p,cmyk2hsl:function(t){return o(p(t))},cmyk2hsv:function(t){return e(p(t))},cmyk2hwb:function(t){return i(p(t))},cmyk2keyword:function(t){return l(p(t))},keyword2rgb:w,keyword2hsl:function(t){return o(w(t))},keyword2hsv:function(t){return e(w(t))},keyword2hwb:function(t){return i(w(t))},keyword2cmyk:function(t){return s(w(t))},keyword2lab:function(t){return u(w(t))},keyword2xyz:function(t){return d(w(t))},xyz2rgb:m,xyz2lab:v,xyz2lch:function(t){return x(v(t))},lab2xyz:y,lab2rgb:_,lab2lch:x,lch2lab:k,lch2xyz:function(t){return y(k(t))},lch2rgb:function(t){return _(k(t))}};function o(t){var e,i,n=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o;return s==o?e=0:n==s?e=(a-r)/l:a==s?e=2+(r-n)/l:r==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+s)/2,[e,100*(s==o?0:i<=.5?l/(s+o):l/(2-s-o)),100*i]}function e(t){var e,i,n=t[0],a=t[1],r=t[2],o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o;return i=0==s?0:l/s*1e3/10,s==o?e=0:n==s?e=(a-r)/l:a==s?e=2+(r-n)/l:r==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function i(t){var e=t[0],i=t[1],n=t[2];return[o(t)[0],1/255*Math.min(e,Math.min(i,n))*100,100*(n=1-1/255*Math.max(e,Math.max(i,n)))]}function s(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function l(t){return S[JSON.stringify(t)]}function d(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=.04045
e.left-1e-6&&t.x
e.top-1e-6&&t.y
=i?(ut.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},yt=ut.options.resolve,xt=["push","pop","shift","splice","unshift"];function _t(e,t){var i=e._chartjs;if(i){var n=i.listeners,a=n.indexOf(t);-1!==a&&n.splice(a,1),0
=i.innerRadius&&r<=i.outerRadius;return l&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n=i.startAngle,a=i.endAngle,r="inner"===i.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(i.x,i.y,Math.max(i.outerRadius-r,0),n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.fillStyle=i.backgroundColor,e.fill(),i.borderWidth&&("inner"===i.borderAlign?(e.beginPath(),t=r/i.outerRadius,e.arc(i.x,i.y,i.outerRadius,n-t,a+t),i.innerRadius>r?(t=r/i.innerRadius,e.arc(i.x,i.y,i.innerRadius-r,a+t,n-t,!0)):e.arc(i.x,i.y,r,a+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(i.x,i.y,i.outerRadius,n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.lineWidth=2*i.borderWidth,e.lineJoin="round"):(e.lineWidth=i.borderWidth,e.lineJoin="bevel"),e.strokeStyle=i.borderColor,e.stroke()),e.restore()}}),St=ut.valueOrDefault,Ct=st.global.defaultColor;st._set("global",{elements:{line:{tension:.4,backgroundColor:Ct,borderWidth:3,borderColor:Ct,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Dt=pt.extend({draw:function(){var t,e,i,n,a=this._view,r=this._chart.ctx,o=a.spanGaps,s=this._children.slice(),l=st.global,d=l.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=a.borderCapStyle||d.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||d.borderDash),r.lineDashOffset=St(a.borderDashOffset,d.borderDashOffset),r.lineJoin=a.borderJoinStyle||d.borderJoinStyle,r.lineWidth=St(a.borderWidth,d.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),u=-1,t=0;t
=r.left&&e<=r.right)&&(a||i>=r.top&&i<=r.bottom)}st._set("global",{elements:{rectangle:{backgroundColor:Ft,borderColor:Ft,borderSkipped:"bottom",borderWidth:0}}});var Nt=pt.extend({draw:function(){var t,e,i,n,a,r=this._chart.ctx,o=this._view,s=(e=Lt(t=o),i=e.right-e.left,n=e.bottom-e.top,a=function(t,e,i){var n,a,r,o,s,l,d,u=t.borderWidth,h=(l=(s=t).borderSkipped,d={},l&&(s.horizontal?s.base>s.x&&(l=Rt(l,"left","right")):s.base
');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r
'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var i=s.getDatasetMeta(0),n=l.datasets[0],a=i.data[e],r=a&&a.custom||{},o=s.options.elements.arc;return{text:t,fillStyle:Zt([r.backgroundColor,n.backgroundColor,o.backgroundColor],void 0,e),strokeStyle:Zt([r.borderColor,n.borderColor,o.borderColor],void 0,e),lineWidth:Zt([r.borderWidth,n.borderWidth,o.borderWidth],void 0,e),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i
=Math.PI?-1:m<-Math.PI?1:0))+g,b=Math.cos(m),y=Math.sin(m),x=Math.cos(v),_=Math.sin(v),k=m<=0&&0<=v||m<=2*Math.PI&&2*Math.PI<=v,w=m<=.5*Math.PI&&.5*Math.PI<=v||m<=2.5*Math.PI&&2.5*Math.PI<=v,M=m<=-Math.PI&&-Math.PI<=v||m<=Math.PI&&Math.PI<=v,S=m<=.5*-Math.PI&&.5*-Math.PI<=v||m<=1.5*Math.PI&&1.5*Math.PI<=v,C=f/100,D=M?-1:Math.min(b*(b<0?1:C),x*(x<0?1:C)),P=S?-1:Math.min(y*(y<0?1:C),_*(_<0?1:C)),T=k?1:Math.max(b*(0
(d=d
');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r
'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(o){var s=o.data;return s.labels.length&&s.datasets.length?s.labels.map(function(t,e){var i=o.getDatasetMeta(0),n=s.datasets[0],a=i.data[e].custom||{},r=o.options.elements.arc;return{text:t,fillStyle:ne([a.backgroundColor,n.backgroundColor,r.backgroundColor],void 0,e),strokeStyle:ne([a.borderColor,n.borderColor,r.borderColor],void 0,e),lineWidth:ne([a.borderWidth,n.borderWidth,r.borderWidth],void 0,e),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i
div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&xe.default||xe,we="$chartjs",Me="chartjs-size-monitor",Se="chartjs-render-monitor",Ce=["animationstart","webkitAnimationStart"],De={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function Pe(t,e){var i=ut.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var Te=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Ie(t,e,i){t.addEventListener(e,i,Te)}function Ae(t,e,i){t.removeEventListener(e,i,Te)}function Fe(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Oe(t){var e=document.createElement("div");return e.className=t||"",e}function Le(i,n,a){var t,e,r,o,s,l,d,u=i[we]||(i[we]={}),h=u.resizer=function(t){var e=Oe(Me),i=Oe(Me+"-expand"),n=Oe(Me+"-shrink");i.appendChild(Oe()),n.appendChild(Oe()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};function a(){e._reset(),t()}return Ie(i,"scroll",a.bind(i,"expand")),Ie(n,"scroll",a.bind(n,"shrink")),e}((r=!(t=function(){if(u.resizer){var t=a.options.maintainAspectRatio&&i.parentNode,e=t?t.clientWidth:0;n(Fe("resize",a)),t&&t.clientWidth
l.height-e.height&&(h="bottom");var c=(d.left+d.right)/2,f=(d.top+d.bottom)/2;n="center"===h?(i=function(t){return t<=c},function(t){return c
=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},i(s.x)?(u="left",a(s.x)&&(u="center",h=o(s.y))):n(s.x)&&(u="right",r(s.x)&&(u="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:u,yAlign:g.yAlign?g.yAlign:h}}(this,c=F),g=M._chart,p=h.x,m=h.y,v=h.caretSize,b=h.caretPadding,y=h.cornerRadius,x=f.xAlign,_=f.yAlign,k=v+b,w=y+b,"right"===x?p-=c.width:"center"===x&&((p-=c.width/2)+c.width>g.width&&(p=g.width-c.width),p<0&&(p=0)),"top"===_?m+=k:m-="bottom"===_?c.height+k:c.height/2,"center"===_?"left"===x?p+=k:"right"===x&&(p-=k):"left"===x?p-=w:"right"===x&&(p+=w),A={x:p,y:m}}else D.opacity=0;return D.xAlign=I.xAlign,D.yAlign=I.yAlign,D.x=A.x,D.y=A.y,D.width=F.width,D.height=F.height,D.caretX=O.x,D.caretY=O.y,M._model=D,t&&S.custom&&S.custom.call(M,D),M},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,r,o,s,l,d=i.caretSize,u=i.cornerRadius,h=i.xAlign,c=i.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,l="left"===h?(a=(n=f)-d,r=n,o=s+d,s-d):(a=(n=f+p)+d,r=n,o=s-d,s+d);else if(r=(n="left"===h?(a=f+u+d)-d:"right"===h?(a=f+p-u-d)-d:(a=i.caretX)-d,a+d),"top"===c)s=(o=g)-d,l=o;else{s=(o=g+m)+d,l=o;var v=r;r=n,n=v}return{x1:n,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,i){var n=e.title;if(n.length){t.x=Ue(e,e._titleAlign),i.textAlign=e._titleAlign,i.textBaseline="top";var a,r,o=e.titleFontSize,s=e.titleSpacing;for(i.fillStyle=e.titleFontColor,i.font=ut.fontString(o,e._titleFontStyle,e._titleFontFamily),a=0,r=n.length;a
=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?ut.merge(e[t][a],[Be.getScaleDefaults(r),o]):ut.merge(e[t][a],o)}else ut._merger(t,e,i,n)}})}function Je(){return ut.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){var a=e[t]||{},r=i[t];"scales"===t?e[t]=$e(a,r):"scale"===t?e[t]=ut.merge(a,[Be.getScaleDefaults(r.type),r]):ut._merger(t,e,i,n)}})}function Qe(t){return"top"===t||"bottom"===t}st._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});function ti(t,e){return this.construct(t,e),this}ut.extend(ti.prototype,{construct:function(t,e){var i,n,a=this;(n=(i=(i=e)||{}).data=i.data||{}).datasets=n.datasets||[],n.labels=n.labels||[],i.options=Je(st.global,st[i.type],i.options||{}),e=i;var r=Ne.acquireContext(t,e),o=r&&r.canvas,s=o&&o.height,l=o&&o.width;a.id=ut.uid(),a.ctx=r,a.canvas=o,a.config=e,a.width=l,a.height=s,a.aspectRatio=s?l/s:null,a.options=e.options,a._bufferedRender=!1,(a.chart=a).controller=a,ti.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),r&&o?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return ze.notify(t,"beforeInit"),ut.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),ze.notify(t,"afterInit"),t},clear:function(){return ut.canvas.clear(this),this},stop:function(){return bt.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(ut.getMaximumWidth(n))),o=Math.max(0,Math.floor(a?r/a:ut.getMaximumHeight(n)));if((e.width!==r||e.height!==o)&&(n.width=e.width=r,n.height=e.height=o,n.style.width=r+"px",n.style.height=o+"px",ut.retinaScale(e,i.devicePixelRatio),!t)){var s={width:r,height:o};ze.notify(e,"resize",[s]),i.onResize&&i.onResize(e,s),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;ut.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),ut.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),ut.each(e,function(t){var e=t.options,i=e.id,n=Ke(e.type,t.dtype);Qe(e.position)!==Qe(t.dposition)&&(e.position=t.dposition),l[i]=!0;var a=null;if(i in s&&s[i].type===n)(a=s[i]).options=e,a.ctx=o.ctx,a.chart=o;else{var r=Be.getScaleConstructor(n);if(!r)return;a=new r({id:i,type:n,options:e,ctx:o.ctx,chart:o}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(o.scale=a)}),ut.each(l,function(t,e){t||delete s[e]}),o.scales=s,Be.addScalesToLayout(this)},buildOrUpdateControllers:function(){var r=this,o=[];return ut.each(r.data.datasets,function(t,e){var i=r.getDatasetMeta(e),n=t.type||r.config.type;if(i.type&&i.type!==n&&(r.destroyDatasetMeta(e),i=r.getDatasetMeta(e)),i.type=n,i.controller)i.controller.updateIndex(e),i.controller.linkScales();else{var a=de[i.type];if(void 0===a)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new a(r,e),o.push(i.controller)}},r),o},resetElements:function(){var i=this;ut.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.reset()},i)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i=(e=n).options,ut.each(e.scales,function(t){_e.removeBox(e,t)}),i=Je(st.global,st[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize(),ze._invalidate(n),!1!==ze.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();ut.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),n.options.animation&&n.options.animation.duration&&ut.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],ze.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==ze.notify(this,"beforeLayout")&&(_e.update(this,this.width,this.height),ze.notify(this,"afterScaleUpdate"),ze.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==ze.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t
t.maxHeight){r--;break}r++,l=o*s}t.labelRotation=r},afterCalculateTickRotation:function(){ut.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){ut.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=li(t._ticks),n=t.options,a=n.ticks,r=n.scaleLabel,o=n.gridLines,s=t._isVisible(),l=n.position,d=t.isHorizontal(),u=ut.options._parseFont,h=u(a),c=n.gridLines.tickMarkLength;if(e.width=d?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&o.drawTicks?c:0,e.height=d?s&&o.drawTicks?c:0:t.maxHeight,r.display&&s){var f=u(r),g=ut.options.toPadding(r.padding),p=f.lineHeight+g.height;d?e.height+=p:e.width+=p}if(a.display&&s){var m=ut.longestText(t.ctx,h.string,i,t.longestTextCache),v=ut.numberOfLabelLines(i),b=.5*h.size,y=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=m,d){var x=ut.toRadians(t.labelRotation),_=Math.cos(x),k=Math.sin(x)*m+h.lineHeight*v+b;e.height=Math.min(t.maxHeight,e.height+k+y),t.ctx.font=h.string;var w,M,S=di(t.ctx,i[0],h.string),C=di(t.ctx,i[i.length-1],h.string),D=t.getPixelForTick(0)-t.left,P=t.right-t.getPixelForTick(i.length-1);M=0!==t.labelRotation?(w="bottom"===l?_*S:_*b,"bottom"===l?_*b:_*C):(w=S/2,C/2),t.paddingLeft=Math.max(w-D,0)+3,t.paddingRight=Math.max(M-P,0)+3}else a.mirror?m=0:m+=y+b,e.width=Math.min(t.maxWidth,e.width+m),t.paddingTop=h.size/2,t.paddingBottom=h.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){ut.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ut.isNullOrUndef(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:ut.noop,getPixelForValue:ut.noop,getValueForPixel:ut.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;return i&&(a+=n/2),e.left+a+(e.isFullWidth()?e.margins.left:0)}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+i+(e.isFullWidth()?e.margins.left:0)}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0
=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:ci,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),v={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:ut.valueOrDefault(e.fixedStepSize,e.stepSize)},n=t.ticks=function(t,e){var i,n,a,r,o=[],s=v.stepSize,l=s||1,d=v.maxTicks-1,u=v.min,h=v.max,c=v.precision,f=e.min,g=e.max,p=ut.niceNum((g-f)/d/l)*l;if(p<1e-14&&fi(u)&&fi(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>d&&(p=ut.niceNum(r*p/d/l)*l),s||fi(c)?i=Math.pow(10,ut._decimalPlaces(p)):(i=Math.pow(10,c),p=Math.ceil(p*i)/i),n=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!fi(u)&&ut.almostWhole(u/p,p/1e3)&&(n=u),!fi(h)&&ut.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-n)/p,r=ut.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),n=Math.round(n*i)/i,a=Math.round(a*i)/i,o.push(fi(u)?n:u);for(var m=1;m
o.max&&(o.max=i))})});o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=ut.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,i=e.start,n=+e.getRightValue(t),a=e.end-i;return e.isHorizontal()?e.left+e.width/a*(n-i):e.bottom-e.height/a*(n-i)},getValueForPixel:function(t){var e=this,i=e.isHorizontal(),n=i?e.width:e.height,a=(i?t-e.left:e.bottom-t)/n;return e.start+(e.end-e.start)*a},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}}),vi=pi;mi._defaults=vi;var bi=ut.valueOrDefault,yi={position:"left",ticks:{callback:ri.formatters.logarithmic}};function xi(t,e){return ut.isFinite(t)&&0<=t?t:e}var _i=ui.extend({determineDataLimits:function(){var o=this,i=o.options,s=o.chart,t=s.data.datasets,e=o.isHorizontal();function l(t){return e?t.xAxisID===o.id:t.yAxisID===o.id}o.min=null,o.max=null,o.minNotZero=null;var n=i.stacked;if(void 0===n&&ut.each(t,function(t,e){if(!n){var i=s.getDatasetMeta(e);s.isDatasetVisible(e)&&l(i)&&void 0!==i.stack&&(n=!0)}}),i.stacked||n){var d={};ut.each(t,function(t,e){var a=s.getDatasetMeta(e),r=[a.type,void 0===i.stacked&&void 0===a.stack?e:"",a.stack].join(".");s.isDatasetVisible(e)&&l(a)&&(void 0===d[r]&&(d[r]=[]),ut.each(t.data,function(t,e){var i=d[r],n=+o.getRightValue(t);isNaN(n)||a.data[e].hidden||n<0||(i[e]=i[e]||0,i[e]+=n)}))}),ut.each(d,function(t){if(0
o.max&&(o.max=i),0!=i&&(null===o.minNotZero||i
r.r&&(r.r=f.end,o.r=h),g.start
r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=this,a=e.l/Math.sin(i.l),r=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);a=Ai(a),r=Ai(r),o=Ai(o),s=Ai(s),n.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),n.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,i,n){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=i+a.drawingArea,l=a.height-a.paddingTop-n-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/Di(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*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}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0
>1)-1]||null,r=t[n],!a)return{lo:null,hi:r};if(r[e]
i))return{lo:a,hi:r};s=n-1}}return{lo:r,hi:null}}(t,e,i),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(i-r[e])/s:0,d=(o[n]-r[n])*l;return r[n]+d}function Hi(t,e){var i=t._adapter,n=t.options.time,a=n.parser,r=a||n.format,o=e;return"function"==typeof a&&(o=a(o)),ut.isFinite(o)||(o="string"==typeof r?i.parse(o,r):i.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),ut.isFinite(o)||(o=i.parse(o))),o)}function Yi(t,e){if(ut.isNullOrUndef(e))return null;var i=t.options.time,n=Hi(t,t.getRightValue(e));return null===n||i.round&&(n=+t._adapter.startOf(n,i.round)),n}function ji(t){for(var e=zi.indexOf(t)+1,i=zi.length;e
=h&&i<=c&&m.push(i);return u.min=h,u.max=c,u._unit=g.unit||function(t,e,i,n,a){var r,o;for(r=zi.length-1;r>=zi.indexOf(i);r--)if(o=zi[r],Ni[o].common&&t._adapter.diff(a,n,o)>=e.length)return o;return zi[i?zi.indexOf(i):0]}(u,m,g.minUnit,u.min,u.max),u._majorUnit=ji(u._unit),u._table=function(t,e,i){if("linear"===f.distribution||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var n,a,r,o,s,l=[],d=[e];for(n=0,a=t.length;n
e&&o
e?e:t.boxWidth}st._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(i){var t=i.data;return ut.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:ut.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!i.isDatasetVisible(e),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:e}},this):[]}}},legendCallback:function(t){var e=[];e.push('
');for(var i=0;i
'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
"),e.join("")}});var rn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:en,update:function(t,e,i){var n=this;return 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(),n.minSize},afterUpdate:en,beforeSetDimensions:en,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}},afterSetDimensions:en,beforeBuildLabels:en,buildLabels:function(){var e=this,i=e.options.labels||{},t=ut.callback(i.generateLabels,[e.chart],e)||[];i.filter&&(t=t.filter(function(t){return i.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:en,beforeFit:en,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=ut.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,d=t.isHorizontal();if(d?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i)if(a.font=r.string,d){var u=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="top",ut.each(t.legendItems,function(t,e){var i=an(n,o)+o/2+a.measureText(t.text).width;(0===e||u[u.length-1]+i+n.padding>l.width)&&(h+=o+n.padding,u[u.length-(0
l.height-c&&(g+=p+n.padding,f.push(p),m=p=0),p=Math.max(p,i),m+=v,s[e]={left:0,top:0,width:i,height:o}}),g+=p,f.push(p),l.width+=g}t.width=l.width,t.height=l.height},afterFit:en,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var h=this,c=h.options,f=c.labels,t=st.global,g=t.defaultColor,p=t.elements.line,m=h.width,v=h.lineWidths;if(c.display){var b,y=h.ctx,e=nn(f.fontColor,t.defaultFontColor),i=ut.options._parseFont(f),x=i.size;y.textAlign="left",y.textBaseline="middle",y.lineWidth=.5,y.strokeStyle=e,y.fillStyle=e,y.font=i.string;var _=an(f,x),k=h.legendHitBoxes,w=h.isHorizontal();b=w?{x:h.left+(m-v[0])/2+f.padding,y:h.top+f.padding,line:0}:{x:h.left+f.padding,y:h.top+f.padding,line:0};var M=x+f.padding;ut.each(h.legendItems,function(t,e){var i,n,a,r,o,s=y.measureText(t.text).width,l=_+x/2+s,d=b.x,u=b.y;w?0
h.left+h.minSize.width&&(u=b.y+=M,b.line++,d=b.x=h.left+(m-v[b.line])/2+f.padding):0
h.top+h.minSize.height&&(d=b.x=d+h.columnWidths[b.line]+f.padding,u=b.y=h.top+f.padding,b.line++),function(t,e,i){if(!(isNaN(_)||_<=0)){y.save();var n=nn(i.lineWidth,p.borderWidth);if(y.fillStyle=nn(i.fillStyle,g),y.lineCap=nn(i.lineCap,p.borderCapStyle),y.lineDashOffset=nn(i.lineDashOffset,p.borderDashOffset),y.lineJoin=nn(i.lineJoin,p.borderJoinStyle),y.lineWidth=n,y.strokeStyle=nn(i.strokeStyle,g),y.setLineDash&&y.setLineDash(nn(i.lineDash,p.borderDash)),c.labels&&c.labels.usePointStyle){var a=_*Math.SQRT2/2,r=t+_/2,o=e+x/2;ut.canvas.drawPoint(y,i.pointStyle,a,r,o)}else 0!==n&&y.strokeRect(t,e,_,x),y.fillRect(t,e,_,x);y.restore()}}(d,u,t),k[e].left=d,k[e].top=u,i=t,n=s,r=_+(a=x/2)+d,o=u+a,y.fillText(i.text,r,o),i.hidden&&(y.beginPath(),y.lineWidth=2,y.moveTo(r,o),y.lineTo(r+n,o),y.stroke()),w?b.x+=l+f.padding:b.y+=M})}},_getLegendItemAt:function(t,e){var i,n,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,i=0;i
=(n=a[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return r.legendItems[i];return null},handleEvent:function(t){var e,i=this,n=i.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!n.onHover&&!n.onLeave)return}else{if("click"!==a)return;if(!n.onClick)return}e=i._getLegendItemAt(t.x,t.y),"click"===a?e&&n.onClick&&n.onClick.call(i,t.native,e):(n.onLeave&&e!==i._hoveredItem&&(i._hoveredItem&&n.onLeave.call(i,t.native,i._hoveredItem),i._hoveredItem=e),n.onHover&&e&&n.onHover.call(i,t.native,e))}});function on(t,e){var i=new rn({ctx:t.ctx,options:e,chart:t});_e.configure(t,i,e),_e.addBox(t,i),t.legend=i}var sn={id:"legend",_element:rn,beforeInit:function(t){var e=t.options.legend;e&&on(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(ut.mergeIf(e,st.global.legend),i?(_e.configure(t,i,e),i.options=e):on(t,e)):i&&(_e.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},ln=ut.noop;st._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var dn=pt.extend({initialize:function(t){ut.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:ln,update:function(t,e,i){var n=this;return 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(),n.minSize},afterUpdate:ln,beforeSetDimensions:ln,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}},afterSetDimensions:ln,beforeBuildLabels:ln,buildLabels:ln,afterBuildLabels:ln,beforeFit:ln,fit:function(){var t=this,e=t.options,i=e.display,n=t.minSize,a=ut.isArray(e.text)?e.text.length:1,r=ut.options._parseFont(e),o=i?a*r.lineHeight+2*e.padding:0;t.isHorizontal()?(n.width=t.maxWidth,n.height=o):(n.width=o,n.height=t.maxHeight),t.width=n.width,t.height=n.height},afterFit:ln,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,i=t.options;if(i.display){var n,a,r,o=ut.options._parseFont(i),s=o.lineHeight,l=s/2+i.padding,d=0,u=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=ut.valueOrDefault(i.fontColor,st.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=u+l,n=f-h):(a="left"===i.position?h+l:f-l,r=u+(c-u)/2,n=c-u,d=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(d),e.textAlign="center",e.textBaseline="middle";var g=i.text;if(ut.isArray(g))for(var p=0,m=0;m
=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},ut.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},ut.niceNum=function(t,e){var i=Math.floor(ut.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},ut.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},ut.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;n=s&&0
i.length){for(var l=0;l
e&&(e=t.length)}),e},ut.color=G?function(t){return t instanceof CanvasGradient&&(t=st.global.defaultColor),G(t)}:function(t){return console.error("Color.js not found!"),t},ut.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:ut.color(t).saturate(.5).darken(.1).rgbString()},ei._adapters=ai,ei.Animation=vt,ei.animationService=bt,ei.controllers=de,ei.DatasetController=wt,ei.defaults=st,ei.Element=pt,ei.elements=zt,ei.Interaction=me,ei.layouts=_e,ei.platform=Ne,ei.plugins=ze,ei.Scale=ui,ei.scaleService=Be,ei.Ticks=ri,ei.Tooltip=Xe,ei.helpers.each(qi,function(t,e){ei.scaleService.registerScaleType(e,t,t._defaults)}),hn)hn.hasOwnProperty(pn)&&ei.plugins.register(hn[pn]);function mn(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 vn(t){return null!=t&&"none"!==t}function bn(t,e,i){var n=document.defaultView,a=ut._getParentNode(t),r=n.getComputedStyle(t)[e],o=n.getComputedStyle(a)[e],s=vn(r),l=vn(o),d=Number.POSITIVE_INFINITY;return s||l?Math.min(s?mn(r,t,i):d,l?mn(o,a,i):d):"none"}ei.platform.initialize();var yn=ei;return"undefined"!=typeof window&&(window.Chart=ei),(ei.Chart=ei).Legend=hn.legend._element,ei.Title=hn.title._element,ei.pluginService=ei.plugins,ei.PluginBase=ei.Element.extend({}),ei.canvasHelpers=ei.helpers.canvas,ei.layoutService=ei.layouts,ei.LinearScaleBase=gi,ei.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(i){ei[i]=function(t,e){return new ei(t,ei.helpers.merge(e||{},{type:i.charAt(0).toLowerCase()+i.slice(1)}))}}),yn}),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Chart=e()}(this,function(){"use strict";var a={rgb2hsl:o,rgb2hsv:e,rgb2hwb:i,rgb2cmyk:n,rgb2keyword:s,rgb2xyz:l,rgb2lab:d,rgb2lch:function(t){return y(d(t))},hsl2rgb:u,hsl2hsv:function(t){var e=t[0],i=t[1]/100,n=t[2]/100;return 0===n?[0,0,0]:[e,2*(i*=(n*=2)<=1?n:2-n)/(n+i)*100,(n+i)/2*100]},hsl2hwb:function(t){return i(u(t))},hsl2cmyk:function(t){return n(u(t))},hsl2keyword:function(t){return s(u(t))},hsv2rgb:h,hsv2hsl:function(t){var e,i,n=t[0],a=t[1]/100,r=t[2]/100;return e=a*r,[n,100*(e=(e/=(i=(2-a)*r)<=1?i:2-i)||0),100*(i/=2)]},hsv2hwb:function(t){return i(h(t))},hsv2cmyk:function(t){return n(h(t))},hsv2keyword:function(t){return s(h(t))},hwb2rgb:c,hwb2hsl:function(t){return o(c(t))},hwb2hsv:function(t){return e(c(t))},hwb2cmyk:function(t){return n(c(t))},hwb2keyword:function(t){return s(c(t))},cmyk2rgb:f,cmyk2hsl:function(t){return o(f(t))},cmyk2hsv:function(t){return e(f(t))},cmyk2hwb:function(t){return i(f(t))},cmyk2keyword:function(t){return s(f(t))},keyword2rgb:k,keyword2hsl:function(t){return o(k(t))},keyword2hsv:function(t){return e(k(t))},keyword2hwb:function(t){return i(k(t))},keyword2cmyk:function(t){return n(k(t))},keyword2lab:function(t){return d(k(t))},keyword2xyz:function(t){return l(k(t))},xyz2rgb:p,xyz2lab:m,xyz2lch:function(t){return y(m(t))},lab2xyz:v,lab2rgb:x,lab2lch:y,lch2lab:_,lch2xyz:function(t){return v(_(t))},lch2rgb:function(t){return x(_(t))}};function o(t){var e,i,n=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o;return s==o?e=0:n==s?e=(a-r)/l:a==s?e=2+(r-n)/l:r==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),i=(o+s)/2,[e,100*(s==o?0:i<=.5?l/(s+o):l/(2-s-o)),100*i]}function e(t){var e,i,n=t[0],a=t[1],r=t[2],o=Math.min(n,a,r),s=Math.max(n,a,r),l=s-o;return i=0==s?0:l/s*1e3/10,s==o?e=0:n==s?e=(a-r)/l:a==s?e=2+(r-n)/l:r==s&&(e=4+(n-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),[e,i,s/255*1e3/10]}function i(t){var e=t[0],i=t[1],n=t[2];return[o(t)[0],1/255*Math.min(e,Math.min(i,n))*100,100*(n=1-1/255*Math.max(e,Math.max(i,n)))]}function n(t){var e,i=t[0]/255,n=t[1]/255,a=t[2]/255;return[100*((1-i-(e=Math.min(1-i,1-n,1-a)))/(1-e)||0),100*((1-n-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]}function s(t){return M[JSON.stringify(t)]}function l(t){var e=t[0]/255,i=t[1]/255,n=t[2]/255;return[100*(.4124*(e=.04045
e.left-1e-6&&t.x
e.top-1e-6&&t.y
=i?(dt.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},bt=dt.options.resolve,yt=["push","pop","shift","splice","unshift"];function xt(e,t){var i=e._chartjs;if(i){var n=i.listeners,a=n.indexOf(t);-1!==a&&n.splice(a,1),0
=i.innerRadius&&r<=i.outerRadius;return l&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,i=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,i=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*i,y:t.y+Math.sin(e)*i}},draw:function(){var t,e=this._chart.ctx,i=this._view,n=i.startAngle,a=i.endAngle,r="inner"===i.borderAlign?.33:0;e.save(),e.beginPath(),e.arc(i.x,i.y,Math.max(i.outerRadius-r,0),n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.fillStyle=i.backgroundColor,e.fill(),i.borderWidth&&("inner"===i.borderAlign?(e.beginPath(),t=r/i.outerRadius,e.arc(i.x,i.y,i.outerRadius,n-t,a+t),i.innerRadius>r?(t=r/i.innerRadius,e.arc(i.x,i.y,i.innerRadius-r,a+t,n-t,!0)):e.arc(i.x,i.y,r,a+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip(),e.beginPath(),e.arc(i.x,i.y,i.outerRadius,n,a),e.arc(i.x,i.y,i.innerRadius,a,n,!0),e.closePath(),e.lineWidth=2*i.borderWidth,e.lineJoin="round"):(e.lineWidth=i.borderWidth,e.lineJoin="bevel"),e.strokeStyle=i.borderColor,e.stroke()),e.restore()}}),Mt=dt.valueOrDefault,St=ot.global.defaultColor;ot._set("global",{elements:{line:{tension:.4,backgroundColor:St,borderWidth:3,borderColor:St,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var Ct=gt.extend({draw:function(){var t,e,i,n,a=this._view,r=this._chart.ctx,o=a.spanGaps,s=this._children.slice(),l=ot.global,d=l.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=a.borderCapStyle||d.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||d.borderDash),r.lineDashOffset=Mt(a.borderDashOffset,d.borderDashOffset),r.lineJoin=a.borderJoinStyle||d.borderJoinStyle,r.lineWidth=Mt(a.borderWidth,d.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),u=-1,t=0;t
=r.left&&e<=r.right)&&(a||i>=r.top&&i<=r.bottom)}ot._set("global",{elements:{rectangle:{backgroundColor:At,borderColor:At,borderSkipped:"bottom",borderWidth:0}}});var Wt=gt.extend({draw:function(){var t,e,i,n,a,r=this._chart.ctx,o=this._view,s=(e=Ot(t=o),i=e.right-e.left,n=e.bottom-e.top,a=function(t,e,i){var n,a,r,o,s,l,d,u=t.borderWidth,h=(l=(s=t).borderSkipped,d={},l&&(s.horizontal?s.base>s.x&&(l=Lt(l,"left","right")):s.base
');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r
'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var i=s.getDatasetMeta(0),n=l.datasets[0],a=i.data[e],r=a&&a.custom||{},o=s.options.elements.arc;return{text:t,fillStyle:Gt([r.backgroundColor,n.backgroundColor,o.backgroundColor],void 0,e),strokeStyle:Gt([r.borderColor,n.borderColor,o.borderColor],void 0,e),lineWidth:Gt([r.borderWidth,n.borderWidth,o.borderWidth],void 0,e),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i
=Math.PI?-1:m<-Math.PI?1:0))+g,b=Math.cos(m),y=Math.sin(m),x=Math.cos(v),_=Math.sin(v),k=m<=0&&0<=v||m<=2*Math.PI&&2*Math.PI<=v,w=m<=.5*Math.PI&&.5*Math.PI<=v||m<=2.5*Math.PI&&2.5*Math.PI<=v,M=m<=-Math.PI&&-Math.PI<=v||m<=Math.PI&&Math.PI<=v,S=m<=.5*-Math.PI&&.5*-Math.PI<=v||m<=1.5*Math.PI&&1.5*Math.PI<=v,C=f/100,D=M?-1:Math.min(b*(b<0?1:C),x*(x<0?1:C)),P=S?-1:Math.min(y*(y<0?1:C),_*(_<0?1:C)),T=k?1:Math.max(b*(0
(d=d
');var i=t.data,n=i.datasets,a=i.labels;if(n.length)for(var r=0;r
'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(o){var s=o.data;return s.labels.length&&s.datasets.length?s.labels.map(function(t,e){var i=o.getDatasetMeta(0),n=s.datasets[0],a=i.data[e].custom||{},r=o.options.elements.arc;return{text:t,fillStyle:ie([a.backgroundColor,n.backgroundColor,r.backgroundColor],void 0,e),strokeStyle:ie([a.borderColor,n.borderColor,r.borderColor],void 0,e),lineWidth:ie([a.borderWidth,n.borderWidth,r.borderWidth],void 0,e),hidden:isNaN(n.data[e])||i.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var i,n,a,r=e.index,o=this.chart;for(i=0,n=(o.data.datasets||[]).length;i
div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&xe.default||xe,ke="$chartjs",we="chartjs-size-monitor",Me="chartjs-render-monitor",Se=["animationstart","webkitAnimationStart"],Ce={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function De(t,e){var i=dt.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}var Pe=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Te(t,e,i){t.addEventListener(e,i,Pe)}function Ie(t,e,i){t.removeEventListener(e,i,Pe)}function Ae(t,e,i,n,a){return{type:t,chart:e,native:a||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function Fe(t){var e=document.createElement("div");return e.className=t||"",e}function Oe(i,n,a){var t,e,r,o,s,l,d,u=i[ke]||(i[ke]={}),h=u.resizer=function(t){var e=Fe(we),i=Fe(we+"-expand"),n=Fe(we+"-shrink");i.appendChild(Fe()),n.appendChild(Fe()),e.appendChild(i),e.appendChild(n),e._reset=function(){i.scrollLeft=1e6,i.scrollTop=1e6,n.scrollLeft=1e6,n.scrollTop=1e6};function a(){e._reset(),t()}return Te(i,"scroll",a.bind(i,"expand")),Te(n,"scroll",a.bind(n,"shrink")),e}((r=!(t=function(){if(u.resizer){var t=a.options.maintainAspectRatio&&i.parentNode,e=t?t.clientWidth:0;n(Ae("resize",a)),t&&t.clientWidth
l.height-e.height&&(h="bottom");var c=(d.left+d.right)/2,f=(d.top+d.bottom)/2;n="center"===h?(i=function(t){return t<=c},function(t){return c
=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},i(s.x)?(u="left",a(s.x)&&(u="center",h=o(s.y))):n(s.x)&&(u="right",r(s.x)&&(u="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:u,yAlign:g.yAlign?g.yAlign:h}}(this,c=F),g=M._chart,p=h.x,m=h.y,v=h.caretSize,b=h.caretPadding,y=h.cornerRadius,x=f.xAlign,_=f.yAlign,k=v+b,w=y+b,"right"===x?p-=c.width:"center"===x&&((p-=c.width/2)+c.width>g.width&&(p=g.width-c.width),p<0&&(p=0)),"top"===_?m+=k:m-="bottom"===_?c.height+k:c.height/2,"center"===_?"left"===x?p+=k:"right"===x&&(p-=k):"left"===x?p-=w:"right"===x&&(p+=w),A={x:p,y:m}}else D.opacity=0;return D.xAlign=I.xAlign,D.yAlign=I.yAlign,D.x=A.x,D.y=A.y,D.width=F.width,D.height=F.height,D.caretX=O.x,D.caretY=O.y,M._model=D,t&&S.custom&&S.custom.call(M,D),M},drawCaret:function(t,e){var i=this._chart.ctx,n=this._view,a=this.getCaretPosition(t,e,n);i.lineTo(a.x1,a.y1),i.lineTo(a.x2,a.y2),i.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,i){var n,a,r,o,s,l,d=i.caretSize,u=i.cornerRadius,h=i.xAlign,c=i.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,l="left"===h?(a=(n=f)-d,r=n,o=s+d,s-d):(a=(n=f+p)+d,r=n,o=s-d,s+d);else if(r=(n="left"===h?(a=f+u+d)-d:"right"===h?(a=f+p-u-d)-d:(a=i.caretX)-d,a+d),"top"===c)s=(o=g)-d,l=o;else{s=(o=g+m)+d,l=o;var v=r;r=n,n=v}return{x1:n,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,i){var n=e.title;if(n.length){t.x=je(e,e._titleAlign),i.textAlign=e._titleAlign,i.textBaseline="top";var a,r,o=e.titleFontSize,s=e.titleSpacing;for(i.fillStyle=e.titleFontColor,i.font=dt.fontString(o,e._titleFontStyle,e._titleFontFamily),a=0,r=n.length;a
=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?dt.merge(e[t][a],[ze.getScaleDefaults(r),o]):dt.merge(e[t][a],o)}else dt._merger(t,e,i,n)}})}function $e(){return dt.merge({},[].slice.call(arguments),{merger:function(t,e,i,n){var a=e[t]||{},r=i[t];"scales"===t?e[t]=Ke(a,r):"scale"===t?e[t]=dt.merge(a,[ze.getScaleDefaults(r.type),r]):dt._merger(t,e,i,n)}})}function Je(t){return"top"===t||"bottom"===t}ot._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});function Qe(t,e){return this.construct(t,e),this}dt.extend(Qe.prototype,{construct:function(t,e){var i,n,a=this;(n=(i=(i=e)||{}).data=i.data||{}).datasets=n.datasets||[],n.labels=n.labels||[],i.options=$e(ot.global,ot[i.type],i.options||{}),e=i;var r=We.acquireContext(t,e),o=r&&r.canvas,s=o&&o.height,l=o&&o.width;a.id=dt.uid(),a.ctx=r,a.canvas=o,a.config=e,a.width=l,a.height=s,a.aspectRatio=s?l/s:null,a.options=e.options,a._bufferedRender=!1,(a.chart=a).controller=a,Qe.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),r&&o?(a.initialize(),a.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ne.notify(t,"beforeInit"),dt.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),Ne.notify(t,"afterInit"),t},clear:function(){return dt.canvas.clear(this),this},stop:function(){return vt.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(dt.getMaximumWidth(n))),o=Math.max(0,Math.floor(a?r/a:dt.getMaximumHeight(n)));if((e.width!==r||e.height!==o)&&(n.width=e.width=r,n.height=e.height=o,n.style.width=r+"px",n.style.height=o+"px",dt.retinaScale(e,i.devicePixelRatio),!t)){var s={width:r,height:o};Ne.notify(e,"resize",[s]),i.onResize&&i.onResize(e,s),e.stop(),e.update({duration:i.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;dt.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),dt.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),dt.each(e,function(t){var e=t.options,i=e.id,n=Xe(e.type,t.dtype);Je(e.position)!==Je(t.dposition)&&(e.position=t.dposition),l[i]=!0;var a=null;if(i in s&&s[i].type===n)(a=s[i]).options=e,a.ctx=o.ctx,a.chart=o;else{var r=ze.getScaleConstructor(n);if(!r)return;a=new r({id:i,type:n,options:e,ctx:o.ctx,chart:o}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(o.scale=a)}),dt.each(l,function(t,e){t||delete s[e]}),o.scales=s,ze.addScalesToLayout(this)},buildOrUpdateControllers:function(){var r=this,o=[];return dt.each(r.data.datasets,function(t,e){var i=r.getDatasetMeta(e),n=t.type||r.config.type;if(i.type&&i.type!==n&&(r.destroyDatasetMeta(e),i=r.getDatasetMeta(e)),i.type=n,i.controller)i.controller.updateIndex(e),i.controller.linkScales();else{var a=le[i.type];if(void 0===a)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new a(r,e),o.push(i.controller)}},r),o},resetElements:function(){var i=this;dt.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.reset()},i)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,i,n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i=(e=n).options,dt.each(e.scales,function(t){ye.removeBox(e,t)}),i=$e(ot.global,ot[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize(),Ne._invalidate(n),!1!==Ne.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var a=n.buildOrUpdateControllers();dt.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),n.options.animation&&n.options.animation.duration&&dt.each(a,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],Ne.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==Ne.notify(this,"beforeLayout")&&(ye.update(this,this.width,this.height),Ne.notify(this,"afterScaleUpdate"),Ne.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==Ne.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t
t.maxHeight){r--;break}r++,l=o*s}t.labelRotation=r},afterCalculateTickRotation:function(){dt.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){dt.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},i=si(t._ticks),n=t.options,a=n.ticks,r=n.scaleLabel,o=n.gridLines,s=t._isVisible(),l=n.position,d=t.isHorizontal(),u=dt.options._parseFont,h=u(a),c=n.gridLines.tickMarkLength;if(e.width=d?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&o.drawTicks?c:0,e.height=d?s&&o.drawTicks?c:0:t.maxHeight,r.display&&s){var f=u(r),g=dt.options.toPadding(r.padding),p=f.lineHeight+g.height;d?e.height+=p:e.width+=p}if(a.display&&s){var m=dt.longestText(t.ctx,h.string,i,t.longestTextCache),v=dt.numberOfLabelLines(i),b=.5*h.size,y=t.options.ticks.padding;if(t._maxLabelLines=v,t.longestLabelWidth=m,d){var x=dt.toRadians(t.labelRotation),_=Math.cos(x),k=Math.sin(x)*m+h.lineHeight*v+b;e.height=Math.min(t.maxHeight,e.height+k+y),t.ctx.font=h.string;var w,M,S=li(t.ctx,i[0],h.string),C=li(t.ctx,i[i.length-1],h.string),D=t.getPixelForTick(0)-t.left,P=t.right-t.getPixelForTick(i.length-1);M=0!==t.labelRotation?(w="bottom"===l?_*S:_*b,"bottom"===l?_*b:_*C):(w=S/2,C/2),t.paddingLeft=Math.max(w-D,0)+3,t.paddingRight=Math.max(M-P,0)+3}else a.mirror?m=0:m+=y+b,e.width=Math.min(t.maxWidth,e.width+m),t.paddingTop=h.size/2,t.paddingBottom=h.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){dt.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(dt.isNullOrUndef(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:dt.noop,getPixelForValue:dt.noop,getValueForPixel:dt.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(i?0:1),1),a=n*t+e.paddingLeft;return i&&(a+=n/2),e.left+a+(e.isFullWidth()?e.margins.left:0)}var r=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(r/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft;return e.left+i+(e.isFullWidth()?e.margins.left:0)}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0
=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,i=e.stepSize,n=e.maxTicksLimit;return i?t=Math.ceil(this.max/i)-Math.floor(this.min/i)+1:(t=this._computeTickLimit(),n=n||11),n&&(t=Math.min(n,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:hi,buildTicks:function(){var t=this,e=t.options.ticks,i=t.getTickLimit(),v={maxTicks:i=Math.max(2,i),min:e.min,max:e.max,precision:e.precision,stepSize:dt.valueOrDefault(e.fixedStepSize,e.stepSize)},n=t.ticks=function(t,e){var i,n,a,r,o=[],s=v.stepSize,l=s||1,d=v.maxTicks-1,u=v.min,h=v.max,c=v.precision,f=e.min,g=e.max,p=dt.niceNum((g-f)/d/l)*l;if(p<1e-14&&ci(u)&&ci(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>d&&(p=dt.niceNum(r*p/d/l)*l),s||ci(c)?i=Math.pow(10,dt._decimalPlaces(p)):(i=Math.pow(10,c),p=Math.ceil(p*i)/i),n=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!ci(u)&&dt.almostWhole(u/p,p/1e3)&&(n=u),!ci(h)&&dt.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-n)/p,r=dt.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),n=Math.round(n*i)/i,a=Math.round(a*i)/i,o.push(ci(u)?n:u);for(var m=1;m
o.max&&(o.max=i))})});o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=dt.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,i=+this.getRightValue(t),n=this.end-e;return this.isHorizontal()?this.left+this.width/n*(i-e):this.bottom-this.height/n*(i-e)},getValueForPixel:function(t){var e=this.isHorizontal(),i=e?this.width:this.height,n=(e?t-this.left:this.bottom-t)/i;return this.start+(this.end-this.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}}),mi=gi;pi._defaults=mi;var vi=dt.valueOrDefault,bi={position:"left",ticks:{callback:ai.formatters.logarithmic}};function yi(t,e){return dt.isFinite(t)&&0<=t?t:e}var xi=di.extend({determineDataLimits:function(){var o=this,i=o.options,s=o.chart,t=s.data.datasets,e=o.isHorizontal();function l(t){return e?t.xAxisID===o.id:t.yAxisID===o.id}o.min=null,o.max=null,o.minNotZero=null;var n=i.stacked;if(void 0===n&&dt.each(t,function(t,e){if(!n){var i=s.getDatasetMeta(e);s.isDatasetVisible(e)&&l(i)&&void 0!==i.stack&&(n=!0)}}),i.stacked||n){var d={};dt.each(t,function(t,e){var a=s.getDatasetMeta(e),r=[a.type,void 0===i.stacked&&void 0===a.stack?e:"",a.stack].join(".");s.isDatasetVisible(e)&&l(a)&&(void 0===d[r]&&(d[r]=[]),dt.each(t.data,function(t,e){var i=d[r],n=+o.getRightValue(t);isNaN(n)||a.data[e].hidden||n<0||(i[e]=i[e]||0,i[e]+=n)}))}),dt.each(d,function(t){if(0
o.max&&(o.max=i),0!=i&&(null===o.minNotZero||i
r.r&&(r.r=f.end,o.r=h),g.start
r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,i){var n=e.l/Math.sin(i.l),a=Math.max(e.r-this.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),o=-Math.max(e.b-(this.height-this.paddingTop),0)/Math.cos(i.b);n=Ii(n),a=Ii(a),r=Ii(r),o=Ii(o),this.drawingArea=Math.min(Math.floor(t-(n+a)/2),Math.floor(t-(r+o)/2)),this.setCenterPoint(n,a,r,o)},setCenterPoint:function(t,e,i,n){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=i+a.drawingArea,l=a.height-a.paddingTop-n-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){return t*(2*Math.PI/Ci(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(null===t)return 0;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},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}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0
>1)-1]||null,r=t[n],!a)return{lo:null,hi:r};if(r[e]
i))return{lo:a,hi:r};s=n-1}}return{lo:r,hi:null}}(t,e,i),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(i-r[e])/s:0,d=(o[n]-r[n])*l;return r[n]+d}function Ei(t,e){var i=t._adapter,n=t.options.time,a=n.parser,r=a||n.format,o=e;return"function"==typeof a&&(o=a(o)),dt.isFinite(o)||(o="string"==typeof r?i.parse(o,r):i.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),dt.isFinite(o)||(o=i.parse(o))),o)}function Hi(t,e){if(dt.isNullOrUndef(e))return null;var i=t.options.time,n=Ei(t,t.getRightValue(e));return null===n||i.round&&(n=+t._adapter.startOf(n,i.round)),n}function Yi(t){for(var e=Ni.indexOf(t)+1,i=Ni.length;e
=h&&i<=c&&m.push(i);return u.min=h,u.max=c,u._unit=g.unit||function(t,e,i,n,a){var r,o;for(r=Ni.length-1;r>=Ni.indexOf(i);r--)if(o=Ni[r],Wi[o].common&&t._adapter.diff(a,n,o)>=e.length)return o;return Ni[i?Ni.indexOf(i):0]}(u,m,g.minUnit,u.min,u.max),u._majorUnit=Yi(u._unit),u._table=function(t,e,i){if("linear"===f.distribution||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var n,a,r,o,s,l=[],d=[e];for(n=0,a=t.length;n
e&&o
>>0,n=0;n
kt(t)?(r=t+1,s-kt(t)):(r=t,s),{year:r,dayOfYear:o}}function Et(t,e,i){var n,a,r=Bt(t.year(),e,i),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?n=o+Ht(a=t.year()-1,e,i):o>Ht(t.year(),e,i)?(n=o-Ht(t.year(),e,i),a=t.year()+1):(a=t.year(),n=o),{week:n,year:a}}function Ht(t,e,i){var n=Bt(t,e,i),a=Bt(t+1,e,i);return(kt(t)-n+a)/7}function Yt(t,e){return t.slice(e,7).concat(t.slice(0,e))}H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),W("week",5),W("isoWeek",5),lt("w",K),lt("ww",K,q),lt("W",K),lt("WW",K,q),ct(["w","ww","W","WW"],function(t,e,i,n){e[n.substr(0,1)]=M(t)}),H("d",0,"do","day"),H("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),H("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),H("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),ct(["dd","ddd","dddd"],function(t,e,i,n){var a=i._locale.weekdaysParse(t,n,i._strict);null!=a?e.d=a:x(i).invalidWeekday=t}),ct(["d","e","E"],function(t,e,i,n){e[n]=M(t)});var jt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Gt=ot,Zt=ot,Xt=ot;function Kt(){function t(t,e){return e.length-t.length}var e,i,n,a,r,o=[],s=[],l=[],d=[];for(e=0;e<7;e++)i=g([2e3,1]).day(e),n=this.weekdaysMin(i,""),a=this.weekdaysShort(i,""),r=this.weekdays(i,""),o.push(n),s.push(a),l.push(r),d.push(n),d.push(a),d.push(r);for(o.sort(t),s.sort(t),l.sort(t),d.sort(t),e=0;e<7;e++)s[e]=dt(s[e]),l[e]=dt(l[e]),d[e]=dt(d[e]);this._weekdaysRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function $t(){return this.hours()%12||12}function Jt(t,e){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Qt(t,e){return e._meridiemParse}H("H",["HH",2],0,"hour"),H("h",["hh",2],0,$t),H("k",["kk",2],0,function(){return this.hours()||24}),H("hmm",0,0,function(){return""+$t.apply(this)+N(this.minutes(),2)}),H("hmmss",0,0,function(){return""+$t.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),Jt("a",!0),Jt("A",!1),F("hour","h"),W("hour",13),lt("a",Qt),lt("A",Qt),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,q),lt("hh",K,q),lt("kk",K,q),lt("hmm",$),lt("hmmss",J),lt("Hmm",$),lt("Hmmss",J),ht(["H","HH"],mt),ht(["k","kk"],function(t,e,i){var n=M(t);e[mt]=24===n?0:n}),ht(["a","A"],function(t,e,i){i._isPm=i._locale.isPM(t),i._meridiem=t}),ht(["h","hh"],function(t,e,i){e[mt]=M(t),x(i).bigHour=!0}),ht("hmm",function(t,e,i){var n=t.length-2;e[mt]=M(t.substr(0,n)),e[vt]=M(t.substr(n)),x(i).bigHour=!0}),ht("hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[mt]=M(t.substr(0,n)),e[vt]=M(t.substr(n,2)),e[bt]=M(t.substr(a)),x(i).bigHour=!0}),ht("Hmm",function(t,e,i){var n=t.length-2;e[mt]=M(t.substr(0,n)),e[vt]=M(t.substr(n))}),ht("Hmmss",function(t,e,i){var n=t.length-4,a=t.length-2;e[mt]=M(t.substr(0,n)),e[vt]=M(t.substr(n,2)),e[bt]=M(t.substr(a))});var te,ee=Ct("Hours",!0),ie={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Ft,week:{dow:0,doy:6},weekdays:jt,weekdaysMin:qt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},ne={},ae={};function re(t){return t?t.toLowerCase().replace("_","-"):t}function oe(t){var e=null;if(!ne[t]&&Gi&&Gi.exports)try{e=te._abbr,Ui(),se(e)}catch(t){}return ne[t]}function se(t,e){var i;return t&&((i=d(e)?de(t):le(t,e))?te=i:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),te._abbr}function le(t,e){if(null===e)return delete ne[t],null;var i,n=ie;if(e.abbr=t,null!=ne[t])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ne[t]._config;else if(null!=e.parentLocale)if(null!=ne[e.parentLocale])n=ne[e.parentLocale]._config;else{if(null==(i=oe(e.parentLocale)))return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;n=i._config}return ne[t]=new I(T(n,e)),ae[t]&&ae[t].forEach(function(t){le(t.name,t.config)}),se(t),ne[t]}function de(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return te;if(!s(t)){if(e=oe(t))return e;t=[t]}return function(t){for(var e,i,n,a,r=0;r
=e&&o(a,i,!0)>=e-1)break;e--}r++}return te}(t)}function ue(t){var e,i=t._a;return i&&-2===x(t).overflow&&(e=i[gt]<0||11
Tt(i[ft],i[gt])?pt:i[mt]<0||24
Ht(i,r,o)?x(t)._overflowWeeks=!0:null!=l?x(t)._overflowWeekday=!0:(s=Vt(i,n,a,r,o),t._a[ft]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(r=he(t._a[ft],n[ft]),(t._dayOfYear>kt(r)||0===t._dayOfYear)&&(x(t)._overflowDayOfYear=!0),i=zt(r,0,t._dayOfYear),t._a[gt]=i.getUTCMonth(),t._a[pt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=l[e]=n[e];for(;e<7;e++)t._a[e]=l[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[mt]&&0===t._a[vt]&&0===t._a[bt]&&0===t._a[yt]&&(t._nextDay=!0,t._a[mt]=0),t._d=(t._useUTC?zt:function(t,e,i,n,a,r,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,i,n,a,r,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,i,n,a,r,o),s}).apply(null,l),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[mt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(x(t).weekdayMismatch=!0)}}var fe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ge=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,pe=/Z|[+-]\d\d(?::?\d\d)?/,me=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],be=/^\/?Date\((\-?\d+)/i;function ye(t){var e,i,n,a,r,o,s=t._i,l=fe.exec(s)||ge.exec(s);if(l){for(x(t).iso=!0,e=0,i=me.length;e
i.valueOf():i.valueOf()
this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},ui.isLocal=function(){return!!this.isValid()&&!this._isUTC},ui.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},ui.isUtc=Be,ui.isUTC=Be,ui.zoneAbbr=function(){return this._isUTC?"UTC":""},ui.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},ui.dates=i("dates accessor is deprecated. Use date instead.",ai),ui.months=i("months accessor is deprecated. Use month instead",Lt),ui.years=i("years accessor is deprecated. Use year instead",St),ui.zone=i("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),ui.isDSTShifted=i("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!d(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=Me(t))._a){var e=t._isUTC?g(t._a):Ce(t._a);this._isDSTShifted=this.isValid()&&0
e?e:t.boxWidth}ot._set("global",{legend:{display:!0,position:"top",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var i=e.datasetIndex,n=this.chart,a=n.getDatasetMeta(i);a.hidden=null===a.hidden?!n.data.datasets[i].hidden:null,n.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(i){var t=i.data;return dt.isArray(t.datasets)?t.datasets.map(function(t,e){return{text:t.label,fillStyle:dt.isArray(t.backgroundColor)?t.backgroundColor[0]:t.backgroundColor,hidden:!i.isDatasetVisible(e),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,datasetIndex:e}},this):[]}}},legendCallback:function(t){var e=[];e.push('
');for(var i=0;i
'),t.data.datasets[i].label&&e.push(t.data.datasets[i].label),e.push("");return e.push("
"),e.join("")}});var ln=gt.extend({initialize:function(t){dt.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:rn,update:function(t,e,i){var n=this;return 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(),n.minSize},afterUpdate:rn,beforeSetDimensions:rn,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}},afterSetDimensions:rn,beforeBuildLabels:rn,buildLabels:function(){var e=this,i=e.options.labels||{},t=dt.callback(i.generateLabels,[e.chart],e)||[];i.filter&&(t=t.filter(function(t){return i.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:rn,beforeFit:rn,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=dt.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,d=t.isHorizontal();if(d?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i)if(a.font=r.string,d){var u=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="top",dt.each(t.legendItems,function(t,e){var i=sn(n,o)+o/2+a.measureText(t.text).width;(0===e||u[u.length-1]+i+n.padding>l.width)&&(h+=o+n.padding,u[u.length-(0
l.height-c&&(g+=p+n.padding,f.push(p),m=p=0),p=Math.max(p,i),m+=v,s[e]={left:0,top:0,width:i,height:o}}),g+=p,f.push(p),l.width+=g}t.width=l.width,t.height=l.height},afterFit:rn,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var h=this,c=h.options,f=c.labels,t=ot.global,g=t.defaultColor,p=t.elements.line,m=h.width,v=h.lineWidths;if(c.display){var b,y=h.ctx,e=on(f.fontColor,t.defaultFontColor),i=dt.options._parseFont(f),x=i.size;y.textAlign="left",y.textBaseline="middle",y.lineWidth=.5,y.strokeStyle=e,y.fillStyle=e,y.font=i.string;var _=sn(f,x),k=h.legendHitBoxes,w=h.isHorizontal();b=w?{x:h.left+(m-v[0])/2+f.padding,y:h.top+f.padding,line:0}:{x:h.left+f.padding,y:h.top+f.padding,line:0};var M=x+f.padding;dt.each(h.legendItems,function(t,e){var i,n,a,r,o,s=y.measureText(t.text).width,l=_+x/2+s,d=b.x,u=b.y;w?0
h.left+h.minSize.width&&(u=b.y+=M,b.line++,d=b.x=h.left+(m-v[b.line])/2+f.padding):0
h.top+h.minSize.height&&(d=b.x=d+h.columnWidths[b.line]+f.padding,u=b.y=h.top+f.padding,b.line++),function(t,e,i){if(!(isNaN(_)||_<=0)){y.save();var n=on(i.lineWidth,p.borderWidth);if(y.fillStyle=on(i.fillStyle,g),y.lineCap=on(i.lineCap,p.borderCapStyle),y.lineDashOffset=on(i.lineDashOffset,p.borderDashOffset),y.lineJoin=on(i.lineJoin,p.borderJoinStyle),y.lineWidth=n,y.strokeStyle=on(i.strokeStyle,g),y.setLineDash&&y.setLineDash(on(i.lineDash,p.borderDash)),c.labels&&c.labels.usePointStyle){var a=_*Math.SQRT2/2,r=t+_/2,o=e+x/2;dt.canvas.drawPoint(y,i.pointStyle,a,r,o)}else 0!==n&&y.strokeRect(t,e,_,x),y.fillRect(t,e,_,x);y.restore()}}(d,u,t),k[e].left=d,k[e].top=u,i=t,n=s,r=_+(a=x/2)+d,o=u+a,y.fillText(i.text,r,o),i.hidden&&(y.beginPath(),y.lineWidth=2,y.moveTo(r,o),y.lineTo(r+n,o),y.stroke()),w?b.x+=l+f.padding:b.y+=M})}},_getLegendItemAt:function(t,e){var i,n,a;if(t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom)for(a=this.legendHitBoxes,i=0;i
=(n=a[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return this.legendItems[i];return null},handleEvent:function(t){var e,i=this.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}e=this._getLegendItemAt(t.x,t.y),"click"===n?e&&i.onClick&&i.onClick.call(this,t.native,e):(i.onLeave&&e!==this._hoveredItem&&(this._hoveredItem&&i.onLeave.call(this,t.native,this._hoveredItem),this._hoveredItem=e),i.onHover&&e&&i.onHover.call(this,t.native,e))}});function dn(t,e){var i=new ln({ctx:t.ctx,options:e,chart:t});ye.configure(t,i,e),ye.addBox(t,i),t.legend=i}var un={id:"legend",_element:ln,beforeInit:function(t){var e=t.options.legend;e&&dn(t,e)},beforeUpdate:function(t){var e=t.options.legend,i=t.legend;e?(dt.mergeIf(e,ot.global.legend),i?(ye.configure(t,i,e),i.options=e):dn(t,e)):i&&(ye.removeBox(t,i),delete t.legend)},afterEvent:function(t,e){var i=t.legend;i&&i.handleEvent(e)}},hn=dt.noop;ot._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var cn=gt.extend({initialize:function(t){dt.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:hn,update:function(t,e,i){var n=this;return 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(),n.minSize},afterUpdate:hn,beforeSetDimensions:hn,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}},afterSetDimensions:hn,beforeBuildLabels:hn,buildLabels:hn,afterBuildLabels:hn,beforeFit:hn,fit:function(){var t=this.options,e=t.display,i=this.minSize,n=dt.isArray(t.text)?t.text.length:1,a=dt.options._parseFont(t),r=e?n*a.lineHeight+2*t.padding:0;this.isHorizontal()?(i.width=this.maxWidth,i.height=r):(i.width=r,i.height=this.maxHeight),this.width=i.width,this.height=i.height},afterFit:hn,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=this.options;if(e.display){var i,n,a,r=dt.options._parseFont(e),o=r.lineHeight,s=o/2+e.padding,l=0,d=this.top,u=this.left,h=this.bottom,c=this.right;t.fillStyle=dt.valueOrDefault(e.fontColor,ot.global.defaultFontColor),t.font=r.string,this.isHorizontal()?(n=u+(c-u)/2,a=d+s,i=c-u):(n="left"===e.position?u+s:c-s,a=d+(h-d)/2,i=h-d,l=Math.PI*("left"===e.position?-.5:.5)),t.save(),t.translate(n,a),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var f=e.text;if(dt.isArray(f))for(var g=0,p=0;p
=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},dt.previousItem=function(t,e,i){return i?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},dt.niceNum=function(t,e){var i=Math.floor(dt.log10(t)),n=t/Math.pow(10,i);return(e?n<1.5?1:n<3?2:n<7?5:10:n<=1?1:n<=2?2:n<=5?5:10)*Math.pow(10,i)},dt.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},dt.getRelativePosition=function(t,e){var i,n,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;n=s&&0
i.length){for(var l=0;l
e&&(e=t.length)}),e},dt.color=q?function(t){return t instanceof CanvasGradient&&(t=ot.global.defaultColor),q(t)}:function(t){return console.error("Color.js not found!"),t},dt.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:dt.color(t).saturate(.5).darken(.1).rgbString()},ti._adapters=ni,ti.Animation=mt,ti.animationService=vt,ti.controllers=le,ti.DatasetController=kt,ti.defaults=ot,ti.Element=gt,ti.elements=Nt,ti.Interaction=pe,ti.layouts=ye,ti.platform=We,ti.plugins=Ne,ti.Scale=di,ti.scaleService=ze,ti.Ticks=ai,ti.Tooltip=Ze,ti.helpers.each(Zi,function(t,e){ti.scaleService.registerScaleType(e,t,t._defaults)}),gn)gn.hasOwnProperty(bn)&&ti.plugins.register(gn[bn]);function yn(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 xn(t){return null!=t&&"none"!==t}function _n(t,e,i){var n=document.defaultView,a=dt._getParentNode(t),r=n.getComputedStyle(t)[e],o=n.getComputedStyle(a)[e],s=xn(r),l=xn(o),d=Number.POSITIVE_INFINITY;return s||l?Math.min(s?yn(r,t,i):d,l?yn(o,a,i):d):"none"}ti.platform.initialize();var kn=ti;return"undefined"!=typeof window&&(window.Chart=ti),(ti.Chart=ti).Legend=gn.legend._element,ti.Title=gn.title._element,ti.pluginService=ti.plugins,ti.PluginBase=ti.Element.extend({}),ti.canvasHelpers=ti.helpers.canvas,ti.layoutService=ti.layouts,ti.LinearScaleBase=fi,ti.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(i){ti[i]=function(t,e){return new ti(t,ti.helpers.merge(e||{},{type:i.charAt(0).toLowerCase()+i.slice(1)}))}}),kn});