!function(a,b){"function"==typeof define&&define.amd?define(["moment"],b):"object"==typeof exports?module.exports=b.call(a,require("moment")):a.Chart=b.call(a,a.moment)}(this,function(a){/*! * Chart.js * http://chartjs.org/ * Version: 2.0.0-beta2 * * Copyright 2015 Nick Downie * Released under the MIT license * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md */ /*! * Chart.js * http://chartjs.org/ * Version: 2.0.0-beta2 * * Copyright 2015 Nick Downie * Released under the MIT license * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md */ /*! * Chart.js * http://chartjs.org/ * Version: 2.0.0-beta2 * * Copyright 2015 Nick Downie * Released under the MIT license * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md */ /*! * Chart.js * http://chartjs.org/ * Version: 2.0.0-beta2 * * Copyright 2015 Nick Downie * Released under the MIT license * https://github.com/nnnick/Chart.js/blob/master/LICENSE.md */ return!function c(a,b,d){function e(g,h){if(!b[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=b[g]={"exports":{}};a[g][0].call(k.exports,function(b){var c=a[g][1][b];return e(c?c:b)},k,k.exports,c,a,b,d)}return b[g].exports}for(var f="function"==typeof require&&require,g=0;g=d?d/12.92:Math.pow((d+.055)/1.055,2.4)}return.2126*b[0]+.7152*b[1]+.0722*b[2]},"contrast":function(a){var b=this.luminosity(),c=a.luminosity();return b>c?(b+.05)/(c+.05):(c+.05)/(b+.05)},"level":function(a){var b=this.contrast(a);return b>=7.1?"AAA":b>=4.5?"AA":""},"dark":function(){var a=this.values.rgb,b=(299*a[0]+587*a[1]+114*a[2])/1e3;return 128>b},"light":function(){return!this.dark()},"negate":function(){for(var a=[],b=0;3>b;b++)a[b]=255-this.values.rgb[b];return this.setValues("rgb",a),this},"lighten":function(a){return this.values.hsl[2]+=this.values.hsl[2]*a,this.setValues("hsl",this.values.hsl),this},"darken":function(a){return this.values.hsl[2]-=this.values.hsl[2]*a,this.setValues("hsl",this.values.hsl),this},"saturate":function(a){return this.values.hsl[1]+=this.values.hsl[1]*a,this.setValues("hsl",this.values.hsl),this},"desaturate":function(a){return this.values.hsl[1]-=this.values.hsl[1]*a,this.setValues("hsl",this.values.hsl),this},"whiten":function(a){return this.values.hwb[1]+=this.values.hwb[1]*a,this.setValues("hwb",this.values.hwb),this},"blacken":function(a){return this.values.hwb[2]+=this.values.hwb[2]*a,this.setValues("hwb",this.values.hwb),this},"greyscale":function(){var a=this.values.rgb,b=.3*a[0]+.59*a[1]+.11*a[2];return this.setValues("rgb",[b,b,b]),this},"clearer":function(a){return this.setValues("alpha",this.values.alpha-this.values.alpha*a),this},"opaquer":function(a){return this.setValues("alpha",this.values.alpha+this.values.alpha*a),this},"rotate":function(a){var b=this.values.hsl[0];return b=(b+a)%360,b=0>b?360+b:b,this.values.hsl[0]=b,this.setValues("hsl",this.values.hsl),this},"mix":function(a,b){b=1-(null==b?.5:b);for(var c=2*b-1,d=this.alpha()-a.alpha(),e=((c*d==-1?c:(c+d)/(1+c*d))+1)/2,f=1-e,g=this.rgbArray(),h=a.rgbArray(),i=0;ib&&(b+=360),d=(h+i)/2,c=i==h?0:.5>=d?j/(i+h):j/(2-i-h),[b,100*c,100*d]}function f(a){var b,c,d,e=a[0],f=a[1],g=a[2],h=Math.min(e,f,g),i=Math.max(e,f,g),j=i-h;return c=0==i?0:j/i*1e3/10,i==h?b=0:e==i?b=(f-g)/j:f==i?b=2+(g-e)/j:g==i&&(b=4+(e-f)/j),b=Math.min(60*b,360),0>b&&(b+=360),d=i/255*1e3/10,[b,c,d]}function h(a){var b=a[0],c=a[1],d=a[2],f=e(a)[0],g=1/255*Math.min(b,Math.min(c,d)),d=1-1/255*Math.max(b,Math.max(c,d));return[f,100*g,100*d]}function i(a){var b,c,d,e,f=a[0]/255,g=a[1]/255,h=a[2]/255;return e=Math.min(1-f,1-g,1-h),b=(1-f-e)/(1-e)||0,c=(1-g-e)/(1-e)||0,d=(1-h-e)/(1-e)||0,[100*b,100*c,100*d,100*e]}function j(a){return Z[JSON.stringify(a)]}function k(a){var b=a[0]/255,c=a[1]/255,d=a[2]/255;b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92,c=c>.04045?Math.pow((c+.055)/1.055,2.4):c/12.92,d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92;var e=.4124*b+.3576*c+.1805*d,f=.2126*b+.7152*c+.0722*d,g=.0193*b+.1192*c+.9505*d;return[100*e,100*f,100*g]}function l(a){var b,c,d,e=k(a),f=e[0],g=e[1],h=e[2];return f/=95.047,g/=100,h/=108.883,f=f>.008856?Math.pow(f,1/3):7.787*f+16/116,g=g>.008856?Math.pow(g,1/3):7.787*g+16/116,h=h>.008856?Math.pow(h,1/3):7.787*h+16/116,b=116*g-16,c=500*(f-g),d=200*(g-h),[b,c,d]}function m(a){return M(l(a))}function n(a){var b,c,d,e,f,g=a[0]/360,h=a[1]/100,i=a[2]/100;if(0==h)return f=255*i,[f,f,f];c=.5>i?i*(1+h):i+h-i*h,b=2*i-c,e=[0,0,0];for(var j=0;3>j;j++)d=g+1/3*-(j-1),0>d&&d++,d>1&&d--,f=1>6*d?b+6*(c-b)*d:1>2*d?c:2>3*d?b+(c-b)*(2/3-d)*6:b,e[j]=255*f;return e}function o(a){var b,c,d=a[0],e=a[1]/100,f=a[2]/100;return f*=2,e*=1>=f?f:2-f,c=(f+e)/2,b=2*e/(f+e),[d,100*b,100*c]}function p(a){return h(n(a))}function q(a){return i(n(a))}function s(a){return j(n(a))}function t(a){var b=a[0]/60,c=a[1]/100,d=a[2]/100,e=Math.floor(b)%6,f=b-Math.floor(b),g=255*d*(1-c),h=255*d*(1-c*f),i=255*d*(1-c*(1-f)),d=255*d;switch(e){case 0:return[d,i,g];case 1:return[h,d,g];case 2:return[g,d,i];case 3:return[g,h,d];case 4:return[i,g,d];case 5:return[d,g,h]}}function u(a){var b,c,d=a[0],e=a[1]/100,f=a[2]/100;return c=(2-e)*f,b=e*f,b/=1>=c?c:2-c,b=b||0,c/=2,[d,100*b,100*c]}function v(a){return h(t(a))}function w(a){return i(t(a))}function x(a){return j(t(a))}function y(a){var c,d,e,f,h=a[0]/360,i=a[1]/100,j=a[2]/100,k=i+j;switch(k>1&&(i/=k,j/=k),c=Math.floor(6*h),d=1-j,e=6*h-c,0!=(1&c)&&(e=1-e),f=i+e*(d-i),c){default:case 6:case 0:r=d,g=f,b=i;break;case 1:r=f,g=d,b=i;break;case 2:r=i,g=d,b=f;break;case 3:r=i,g=f,b=d;break;case 4:r=f,g=i,b=d;break;case 5:r=d,g=i,b=f}return[255*r,255*g,255*b]}function z(a){return e(y(a))}function A(a){return f(y(a))}function B(a){return i(y(a))}function C(a){return j(y(a))}function D(a){var b,c,d,e=a[0]/100,f=a[1]/100,g=a[2]/100,h=a[3]/100;return b=1-Math.min(1,e*(1-h)+h),c=1-Math.min(1,f*(1-h)+h),d=1-Math.min(1,g*(1-h)+h),[255*b,255*c,255*d]}function E(a){return e(D(a))}function F(a){return f(D(a))}function G(a){return h(D(a))}function H(a){return j(D(a))}function I(a){var b,c,d,e=a[0]/100,f=a[1]/100,g=a[2]/100;return b=3.2406*e+-1.5372*f+g*-.4986,c=e*-.9689+1.8758*f+.0415*g,d=.0557*e+f*-.204+1.057*g,b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:b=12.92*b,c=c>.0031308?1.055*Math.pow(c,1/2.4)-.055:c=12.92*c,d=d>.0031308?1.055*Math.pow(d,1/2.4)-.055:d=12.92*d,b=Math.min(Math.max(0,b),1),c=Math.min(Math.max(0,c),1),d=Math.min(Math.max(0,d),1),[255*b,255*c,255*d]}function J(a){var b,c,d,e=a[0],f=a[1],g=a[2];return e/=95.047,f/=100,g/=108.883,e=e>.008856?Math.pow(e,1/3):7.787*e+16/116,f=f>.008856?Math.pow(f,1/3):7.787*f+16/116,g=g>.008856?Math.pow(g,1/3):7.787*g+16/116,b=116*f-16,c=500*(e-f),d=200*(f-g),[b,c,d]}function K(a){return M(J(a))}function L(a){var b,c,d,e,f=a[0],g=a[1],h=a[2];return 8>=f?(c=100*f/903.3,e=7.787*(c/100)+16/116):(c=100*Math.pow((f+16)/116,3),e=Math.pow(c/100,1/3)),b=.008856>=b/95.047?b=95.047*(g/500+e-16/116)/7.787:95.047*Math.pow(g/500+e,3),d=.008859>=d/108.883?d=108.883*(e-h/200-16/116)/7.787:108.883*Math.pow(e-h/200,3),[b,c,d]}function M(a){var b,c,d,e=a[0],f=a[1],g=a[2];return b=Math.atan2(g,f),c=360*b/2/Math.PI,0>c&&(c+=360),d=Math.sqrt(f*f+g*g),[e,d,c]}function N(a){return I(L(a))}function O(a){var b,c,d,e=a[0],f=a[1],g=a[2];return d=g/360*2*Math.PI,b=f*Math.cos(d),c=f*Math.sin(d),[e,b,c]}function P(a){return L(O(a))}function Q(a){return N(O(a))}function R(a){return Y[a]}function S(a){return e(R(a))}function T(a){return f(R(a))}function U(a){return h(R(a))}function V(a){return i(R(a))}function W(a){return l(R(a))}function X(a){return k(R(a))}c.exports={"rgb2hsl":e,"rgb2hsv":f,"rgb2hwb":h,"rgb2cmyk":i,"rgb2keyword":j,"rgb2xyz":k,"rgb2lab":l,"rgb2lch":m,"hsl2rgb":n,"hsl2hsv":o,"hsl2hwb":p,"hsl2cmyk":q,"hsl2keyword":s,"hsv2rgb":t,"hsv2hsl":u,"hsv2hwb":v,"hsv2cmyk":w,"hsv2keyword":x,"hwb2rgb":y,"hwb2hsl":z,"hwb2hsv":A,"hwb2cmyk":B,"hwb2keyword":C,"cmyk2rgb":D,"cmyk2hsl":E,"cmyk2hsv":F,"cmyk2hwb":G,"cmyk2keyword":H,"keyword2rgb":R,"keyword2hsl":S,"keyword2hsv":T,"keyword2hwb":U,"keyword2cmyk":V,"keyword2lab":W,"keyword2xyz":X,"xyz2rgb":I,"xyz2lab":J,"xyz2lch":K,"lab2xyz":L,"lab2rgb":N,"lab2lch":M,"lch2lab":O,"lch2xyz":P,"lch2rgb":Q};var Y={"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aqua":[0,255,255],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"black":[0,0,0],"blanchedalmond":[255,235,205],"blue":[0,0,255],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"fuchsia":[255,0,255],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"gray":[128,128,128],"green":[0,128,0],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"lime":[0,255,0],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"maroon":[128,0,0],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"navy":[0,0,128],"oldlace":[253,245,230],"olive":[128,128,0],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"purple":[128,0,128],"rebeccapurple":[102,51,153],"red":[255,0,0],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"silver":[192,192,192],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"teal":[0,128,128],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"white":[255,255,255],"whitesmoke":[245,245,245],"yellow":[255,255,0],"yellowgreen":[154,205,50]},Z={};for(var $ in Y)Z[JSON.stringify(Y[$])]=$},{}],"3":[function(a,b,c){var d=a("./conversions"),e=function(){return new j};for(var f in d){e[f+"Raw"]=function(a){return function(b){return"number"==typeof b&&(b=Array.prototype.slice.call(arguments)),d[a](b)}}(f);var g=/(\w+)2(\w+)/.exec(f),h=g[1],i=g[2];e[h]=e[h]||{},e[h][i]=e[f]=function(a){return function(b){"number"==typeof b&&(b=Array.prototype.slice.call(arguments));var c=d[a](b);if("string"==typeof c||void 0===c)return c;for(var e=0;eb||a[3]&&a[3]<1?l(a,b):"rgb("+a[0]+", "+a[1]+", "+a[2]+")"}function l(a,b){return void 0===b&&(b=void 0!==a[3]?a[3]:1),"rgba("+a[0]+", "+a[1]+", "+a[2]+", "+b+")"}function m(a,b){if(1>b||a[3]&&a[3]<1)return n(a,b);var c=Math.round(a[0]/255*100),d=Math.round(a[1]/255*100),e=Math.round(a[2]/255*100);return"rgb("+c+"%, "+d+"%, "+e+"%)"}function n(a,b){var c=Math.round(a[0]/255*100),d=Math.round(a[1]/255*100),e=Math.round(a[2]/255*100);return"rgba("+c+"%, "+d+"%, "+e+"%, "+(b||a[3]||1)+")"}function o(a,b){return 1>b||a[3]&&a[3]<1?p(a,b):"hsl("+a[0]+", "+a[1]+"%, "+a[2]+"%)"}function p(a,b){return void 0===b&&(b=void 0!==a[3]?a[3]:1),"hsla("+a[0]+", "+a[1]+"%, "+a[2]+"%, "+b+")"}function q(a,b){return void 0===b&&(b=void 0!==a[3]?a[3]:1),"hwb("+a[0]+", "+a[1]+"%, "+a[2]+"%"+(void 0!==b&&1!==b?", "+b:"")+")"}function r(a){return v[a.slice(0,3)]}function s(a,b,c){return Math.min(Math.max(b,a),c)}function t(a){var b=a.toString(16).toUpperCase();return b.length<2?"0"+b:b}var u=a("color-name");b.exports={"getRgba":d,"getHsla":e,"getRgb":g,"getHsl":h,"getHwb":f,"getAlpha":i,"hexString":j,"rgbString":k,"rgbaString":l,"percentString":m,"percentaString":n,"hslString":o,"hslaString":p,"hwbString":q,"keyword":r};var v={};for(var w in u)v[u[w]]=w},{"color-name":5}],"5":[function(a,b,c){b.exports={"aliceblue":[240,248,255],"antiquewhite":[250,235,215],"aqua":[0,255,255],"aquamarine":[127,255,212],"azure":[240,255,255],"beige":[245,245,220],"bisque":[255,228,196],"black":[0,0,0],"blanchedalmond":[255,235,205],"blue":[0,0,255],"blueviolet":[138,43,226],"brown":[165,42,42],"burlywood":[222,184,135],"cadetblue":[95,158,160],"chartreuse":[127,255,0],"chocolate":[210,105,30],"coral":[255,127,80],"cornflowerblue":[100,149,237],"cornsilk":[255,248,220],"crimson":[220,20,60],"cyan":[0,255,255],"darkblue":[0,0,139],"darkcyan":[0,139,139],"darkgoldenrod":[184,134,11],"darkgray":[169,169,169],"darkgreen":[0,100,0],"darkgrey":[169,169,169],"darkkhaki":[189,183,107],"darkmagenta":[139,0,139],"darkolivegreen":[85,107,47],"darkorange":[255,140,0],"darkorchid":[153,50,204],"darkred":[139,0,0],"darksalmon":[233,150,122],"darkseagreen":[143,188,143],"darkslateblue":[72,61,139],"darkslategray":[47,79,79],"darkslategrey":[47,79,79],"darkturquoise":[0,206,209],"darkviolet":[148,0,211],"deeppink":[255,20,147],"deepskyblue":[0,191,255],"dimgray":[105,105,105],"dimgrey":[105,105,105],"dodgerblue":[30,144,255],"firebrick":[178,34,34],"floralwhite":[255,250,240],"forestgreen":[34,139,34],"fuchsia":[255,0,255],"gainsboro":[220,220,220],"ghostwhite":[248,248,255],"gold":[255,215,0],"goldenrod":[218,165,32],"gray":[128,128,128],"green":[0,128,0],"greenyellow":[173,255,47],"grey":[128,128,128],"honeydew":[240,255,240],"hotpink":[255,105,180],"indianred":[205,92,92],"indigo":[75,0,130],"ivory":[255,255,240],"khaki":[240,230,140],"lavender":[230,230,250],"lavenderblush":[255,240,245],"lawngreen":[124,252,0],"lemonchiffon":[255,250,205],"lightblue":[173,216,230],"lightcoral":[240,128,128],"lightcyan":[224,255,255],"lightgoldenrodyellow":[250,250,210],"lightgray":[211,211,211],"lightgreen":[144,238,144],"lightgrey":[211,211,211],"lightpink":[255,182,193],"lightsalmon":[255,160,122],"lightseagreen":[32,178,170],"lightskyblue":[135,206,250],"lightslategray":[119,136,153],"lightslategrey":[119,136,153],"lightsteelblue":[176,196,222],"lightyellow":[255,255,224],"lime":[0,255,0],"limegreen":[50,205,50],"linen":[250,240,230],"magenta":[255,0,255],"maroon":[128,0,0],"mediumaquamarine":[102,205,170],"mediumblue":[0,0,205],"mediumorchid":[186,85,211],"mediumpurple":[147,112,219],"mediumseagreen":[60,179,113],"mediumslateblue":[123,104,238],"mediumspringgreen":[0,250,154],"mediumturquoise":[72,209,204],"mediumvioletred":[199,21,133],"midnightblue":[25,25,112],"mintcream":[245,255,250],"mistyrose":[255,228,225],"moccasin":[255,228,181],"navajowhite":[255,222,173],"navy":[0,0,128],"oldlace":[253,245,230],"olive":[128,128,0],"olivedrab":[107,142,35],"orange":[255,165,0],"orangered":[255,69,0],"orchid":[218,112,214],"palegoldenrod":[238,232,170],"palegreen":[152,251,152],"paleturquoise":[175,238,238],"palevioletred":[219,112,147],"papayawhip":[255,239,213],"peachpuff":[255,218,185],"peru":[205,133,63],"pink":[255,192,203],"plum":[221,160,221],"powderblue":[176,224,230],"purple":[128,0,128],"rebeccapurple":[102,51,153],"red":[255,0,0],"rosybrown":[188,143,143],"royalblue":[65,105,225],"saddlebrown":[139,69,19],"salmon":[250,128,114],"sandybrown":[244,164,96],"seagreen":[46,139,87],"seashell":[255,245,238],"sienna":[160,82,45],"silver":[192,192,192],"skyblue":[135,206,235],"slateblue":[106,90,205],"slategray":[112,128,144],"slategrey":[112,128,144],"snow":[255,250,250],"springgreen":[0,255,127],"steelblue":[70,130,180],"tan":[210,180,140],"teal":[0,128,128],"thistle":[216,191,216],"tomato":[255,99,71],"turquoise":[64,224,208],"violet":[238,130,238],"wheat":[245,222,179],"white":[255,255,255],"whitesmoke":[245,245,245],"yellow":[255,255,0],"yellowgreen":[154,205,50]}},{}]},{},[1]),function(){"use strict";var a=this,b=a.Chart,c=function(a,b){this.config=b,a.length&&a[0].getContext&&(a=a[0]),a.getContext&&(a=a.getContext("2d")),this.ctx=a,this.canvas=a.canvas,this.width=a.canvas.width||parseInt(c.helpers.getStyle(a.canvas,"width"))||c.helpers.getMaximumWidth(a.canvas),this.height=a.canvas.height||parseInt(c.helpers.getStyle(a.canvas,"height"))||c.helpers.getMaximumHeight(a.canvas),this.aspectRatio=this.width/this.height,(isNaN(this.aspectRatio)||isFinite(this.aspectRatio)===!1)&&(this.aspectRatio=void 0!==b.aspectRatio?b.aspectRatio:2),this.originalCanvasStyleWidth=a.canvas.style.width,this.originalCanvasStyleHeight=a.canvas.style.height,c.helpers.retinaScale(this),b&&(this.controller=new c.Controller(this));var d=this;return c.helpers.addResizeListener(a.canvas.parentNode,function(){d.controller&&d.controller.config.options.responsive&&d.controller.resize()}),this.controller?this.controller:this};c.defaults={"global":{"responsive":!0,"responsiveAnimationDuration":0,"maintainAspectRatio":!0,"events":["mousemove","mouseout","click","touchstart","touchmove"],"hover":{"onHover":null,"mode":"single","animationDuration":400},"onClick":null,"defaultColor":"rgba(0,0,0,0.1)","elements":{},"legendCallback":function(a){var b=[];b.push('
    ');for(var c=0;c'),a.data.datasets[c].label&&b.push(a.data.datasets[c].label),b.push("");return b.push("
"),b.join("")}}},a.Chart=c,c.noConflict=function(){return a.Chart=b,c}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers={},d=c.each=function(a,b,c,d){var e=Array.prototype.slice.call(arguments,3);if(a)if(a.length===+a.length){var f;if(d)for(f=a.length-1;f>=0;f--)b.apply(c,[a[f],f].concat(e));else for(f=0;f=f[e].length||!f[e][d].type?f[e].push(c.configMerge(a.type?b.scaleService.getScaleDefaults(a.type):{},a)):a.type!==f[e][d].type?f[e][d]=c.configMerge(f[e][d],a.type?b.scaleService.getScaleDefaults(a.type):{},a):f[e][d]=c.configMerge(f[e][d],a)}):(f[e]=[],c.each(a,function(a){f[e].push(c.configMerge(a.type?b.scaleService.getScaleDefaults(a.type):{},a))})):f.hasOwnProperty(e)&&"object"==typeof f[e]&&null!==f[e]&&"object"==typeof a?f[e]=c.configMerge(f[e],a):f[e]=a)}),f},c.getValueAtIndexOrDefault=function(a,b,d){return void 0===a||null===a?d:c.isArray(a)?b=0;d--){var e=a[d];if(b(e))return e}},c.inherits=function(a){var b=this,c=a&&a.hasOwnProperty("constructor")?a.constructor:function(){return b.apply(this,arguments)},d=function(){this.constructor=c};return d.prototype=b.prototype,c.prototype=new d,c.extend=g,a&&f(c.prototype,a),c.__super__=b.prototype,c}),h=c.noop=function(){},i=(c.uid=function(){var a=0;return function(){return"chart-"+a++}}(),c.warn=function(a){console&&"function"==typeof console.warn&&console.warn(a)},c.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)}),j=(c.max=function(a){return Math.max.apply(Math,a)},c.min=function(a){return Math.min.apply(Math,a)},c.sign=function(a){return Math.sign?Math.sign(a):(a=+a,0===a||isNaN(a)?a:a>0?1:-1)},c.log10=function(a){return Math.log10?Math.log10(a):Math.log(a)/Math.LN10},c.getDecimalPlaces=function(a){if(a%1!==0&&i(a)){var b=a.toString();if(b.indexOf("e-")<0)return b.split(".")[1].length;if(b.indexOf(".")<0)return parseInt(b.split("e-")[1]);var c=b.split(".")[1].split("e-");return c[0].length+parseInt(c[1])}return 0},c.toRadians=function(a){return a*(Math.PI/180)},c.toDegrees=function(a){return a*(180/Math.PI)},c.getAngleFromPoint=function(a,b){var c=b.x-a.x,d=b.y-a.y,e=Math.sqrt(c*c+d*d),f=Math.atan2(d,c);return f<-.5*Math.PI&&(f+=2*Math.PI),{"angle":f,"distance":e}},c.aliasPixel=function(a){return a%2===0?0:.5},c.splineCurve=function(a,b,c,d){var e=a.skip?b:a,f=b,g=c.skip?b:c,h=Math.sqrt(Math.pow(f.x-e.x,2)+Math.pow(f.y-e.y,2)),i=Math.sqrt(Math.pow(g.x-f.x,2)+Math.pow(g.y-f.y,2)),j=h/(h+i),k=i/(h+i);j=isNaN(j)?0:j,k=isNaN(k)?0:k;var l=d*j,m=d*k;return{"previous":{"x":f.x-l*(g.x-e.x),"y":f.y-l*(g.y-e.y)},"next":{"x":f.x+m*(g.x-e.x),"y":f.y+m*(g.y-e.y)}}},c.nextItem=function(a,b,c){return c?b>=a.length-1?a[0]:a[b+1]:b>=a.length-1?a[a.length-1]:a[b+1]},c.previousItem=function(a,b,c){return c?0>=b?a[a.length-1]:a[b-1]:0>=b?a[0]:a[b-1]},c.niceNum=function(a,b){var d,e=Math.floor(c.log10(a)),f=a/Math.pow(10,e);return d=b?1.5>f?1:3>f?2:7>f?5:10:1>=f?1:2>=f?2:5>=f?5:10,d*Math.pow(10,e)},c.easingEffects={"linear":function(a){return a},"easeInQuad":function(a){return a*a},"easeOutQuad":function(a){return-1*a*(a-2)},"easeInOutQuad":function(a){return(a/=.5)<1?.5*a*a:-0.5*(--a*(a-2)-1)},"easeInCubic":function(a){return a*a*a},"easeOutCubic":function(a){return 1*((a=a/1-1)*a*a+1)},"easeInOutCubic":function(a){return(a/=.5)<1?.5*a*a*a:.5*((a-=2)*a*a+2)},"easeInQuart":function(a){return a*a*a*a},"easeOutQuart":function(a){return-1*((a=a/1-1)*a*a*a-1)},"easeInOutQuart":function(a){return(a/=.5)<1?.5*a*a*a*a:-0.5*((a-=2)*a*a*a-2)},"easeInQuint":function(a){return 1*(a/=1)*a*a*a*a},"easeOutQuint":function(a){return 1*((a=a/1-1)*a*a*a*a+1)},"easeInOutQuint":function(a){return(a/=.5)<1?.5*a*a*a*a*a:.5*((a-=2)*a*a*a*a+2)},"easeInSine":function(a){return-1*Math.cos(a/1*(Math.PI/2))+1},"easeOutSine":function(a){return 1*Math.sin(a/1*(Math.PI/2))},"easeInOutSine":function(a){return-0.5*(Math.cos(Math.PI*a/1)-1)},"easeInExpo":function(a){return 0===a?1:1*Math.pow(2,10*(a/1-1))},"easeOutExpo":function(a){return 1===a?1:1*(-Math.pow(2,-10*a/1)+1)},"easeInOutExpo":function(a){return 0===a?0:1===a?1:(a/=.5)<1?.5*Math.pow(2,10*(a-1)):.5*(-Math.pow(2,-10*--a)+2)},"easeInCirc":function(a){return a>=1?a:-1*(Math.sqrt(1-(a/=1)*a)-1)},"easeOutCirc":function(a){return 1*Math.sqrt(1-(a=a/1-1)*a)},"easeInOutCirc":function(a){return(a/=.5)<1?-0.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},"easeInElastic":function(a){var b=1.70158,c=0,d=1; return 0===a?0:1==(a/=1)?1:(c||(c=.3),da?-.5*(d*Math.pow(2,10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)):d*Math.pow(2,-10*(a-=1))*Math.sin((1*a-b)*(2*Math.PI)/c)*.5+1)},"easeInBack":function(a){var b=1.70158;return 1*(a/=1)*a*((b+1)*a-b)},"easeOutBack":function(a){var b=1.70158;return 1*((a=a/1-1)*a*((b+1)*a+b)+1)},"easeInOutBack":function(a){var b=1.70158;return(a/=.5)<1?.5*(a*a*(((b*=1.525)+1)*a-b)):.5*((a-=2)*a*(((b*=1.525)+1)*a+b)+2)},"easeInBounce":function(a){return 1-j.easeOutBounce(1-a)},"easeOutBounce":function(a){return(a/=1)<1/2.75?1*(7.5625*a*a):2/2.75>a?1*(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1*(7.5625*(a-=2.25/2.75)*a+.9375):1*(7.5625*(a-=2.625/2.75)*a+.984375)},"easeInOutBounce":function(a){return.5>a?.5*j.easeInBounce(2*a):.5*j.easeOutBounce(2*a-1)+.5}}),k=(c.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),c.cancelAnimFrame=function(){return window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame||function(a){return window.clearTimeout(a,1e3/60)}}(),c.getRelativePosition=function(a,b){var c,d,e=a.originalEvent||a,f=a.currentTarget||a.srcElement,g=f.getBoundingClientRect();return e.touches&&e.touches.length>0?(c=e.touches[0].clientX,d=e.touches[0].clientY):(c=e.clientX,d=e.clientY),c=Math.round((c-g.left)/(g.right-g.left)*f.width/b.currentDevicePixelRatio),d=Math.round((d-g.top)/(g.bottom-g.top)*f.height/b.currentDevicePixelRatio),{"x":c,"y":d}},c.addEvent=function(a,b,c){a.addEventListener?a.addEventListener(b,c):a.attachEvent?a.attachEvent("on"+b,c):a["on"+b]=c}),l=c.removeEvent=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,!1):a.detachEvent?a.detachEvent("on"+b,c):a["on"+b]=h},m=(c.bindEvents=function(a,b,c){a.events||(a.events={}),d(b,function(b){a.events[b]=function(){c.apply(a,arguments)},k(a.chart.canvas,b,a.events[b])})},c.unbindEvents=function(a,b){d(b,function(b,c){l(a.chart.canvas,c,b)})},c.getConstraintWidth=function(a){var b,c=document.defaultView.getComputedStyle(a)["max-width"],d=document.defaultView.getComputedStyle(a.parentNode)["max-width"],e=null!==c&&"none"!==c,f=null!==d&&"none"!==d;return(e||f)&&(b=Math.min(e?parseInt(c,10):Number.POSITIVE_INFINITY,f?parseInt(d,10):Number.POSITIVE_INFINITY)),b}),n=c.getConstraintHeight=function(a){var b,c=document.defaultView.getComputedStyle(a)["max-height"],d=document.defaultView.getComputedStyle(a.parentNode)["max-height"],e=null!==c&&"none"!==c,f=null!==d&&"none"!==d;return(c||d)&&(b=Math.min(e?parseInt(c,10):Number.POSITIVE_INFINITY,f?parseInt(d,10):Number.POSITIVE_INFINITY)),b},o=(c.getMaximumWidth=function(a){var b=a.parentNode,c=parseInt(o(b,"padding-left"))+parseInt(o(b,"padding-right")),d=b.clientWidth-c,e=m(a);return void 0!==e&&(d=Math.min(d,e)),d},c.getMaximumHeight=function(a){var b=a.parentNode,c=parseInt(o(b,"padding-top"))+parseInt(o(b,"padding-bottom")),d=b.clientHeight-c,e=n(a);return void 0!==e&&(d=Math.min(d,e)),d},c.getStyle=function(a,b){return a.currentStyle?a.currentStyle[b]:document.defaultView.getComputedStyle(a,null).getPropertyValue(b)});c.getMaximumSize=c.getMaximumWidth,c.retinaScale=function(a){var b=a.ctx,c=a.canvas.width,d=a.canvas.height,e=a.currentDevicePixelRatio=window.devicePixelRatio||1;1!==e&&(b.canvas.height=d*e,b.canvas.width=c*e,b.scale(e,e),b.canvas.style.width=c+"px",b.canvas.style.height=d+"px",a.originalDevicePixelRatio=a.originalDevicePixelRatio||e)},c.clear=function(a){a.ctx.clearRect(0,0,a.width,a.height)},c.fontString=function(a,b,c){return b+" "+a+"px "+c},c.longestText=function(a,b,c){a.font=b;var e=0;return d(c,function(b){var c=a.measureText(b).width;e=c>e?c:e}),e},c.drawRoundedRectangle=function(a,b,c,d,e,f){a.beginPath(),a.moveTo(b+f,c),a.lineTo(b+d-f,c),a.quadraticCurveTo(b+d,c,b+d,c+f),a.lineTo(b+d,c+e-f),a.quadraticCurveTo(b+d,c+e,b+d-f,c+e),a.lineTo(b+f,c+e),a.quadraticCurveTo(b,c+e,b,c+e-f),a.lineTo(b,c+f),a.quadraticCurveTo(b,c,b+f,c),a.closePath()},c.color=function(b){return a.Color?a.Color(b):(console.log("Color.js not found!"),b)},c.addResizeListener=function(a,b){var c=document.createElement("iframe"),d="chartjs-hidden-iframe";c.classlist?c.classlist.add(d):c.setAttribute("class",d),c.style.width="100%",c.style.display="block",c.style.border=0,c.style.height=0,c.style.margin=0,c.style.position="absolute",c.style.left=0,c.style.right=0,c.style.top=0,c.style.bottom=0,a.insertBefore(c,a.firstChild);(c.contentWindow||c).onresize=function(){b&&b()}},c.removeResizeListener=function(a){var b=a.querySelector(".chartjs-hidden-iframe");b&&b.parentNode.removeChild(b)},c.isArray=function(a){return Array.isArray?Array.isArray(a):"[object Array]"===Object.prototype.toString.call(arg)},c.isDatasetVisible=function(a){return!a.hidden};c.callCallback=function(a,b,c){a&&"function"==typeof a.call&&a.apply(c,b)}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.elements={},b.Element=function(a){c.extend(this,a),this.initialize.apply(this,arguments)},c.extend(b.Element.prototype,{"initialize":function(){},"pivot":function(){return this._view||(this._view=c.clone(this._model)),this._start=c.clone(this._view),this},"transition":function(a){return this._view||(this._view=c.clone(this._model)),this._start||this.pivot(),c.each(this._model,function(b,d){if("_"!==d[0]&&this._model.hasOwnProperty(d))if(this._view[d])if(this._model[d]===this._view[d]);else if("string"==typeof b)try{var e=c.color(this._start[d]).mix(c.color(this._model[d]),a);this._view[d]=e.rgbString()}catch(f){this._view[d]=b}else if("number"==typeof b){var g=void 0!==this._start[d]&&isNaN(this._start[d])===!1?this._start[d]:0;this._view[d]=(this._model[d]-g)*a+g}else this._view[d]=b;else"number"==typeof b&&isNaN(this._view[d])===!1?this._view[d]=b*a:this._view[d]=b||null;else;},this),1===a&&delete this._start,this},"tooltipPosition":function(){return{"x":this._model.x,"y":this._model.y}},"hasValue":function(){return c.isNumber(this._model.x)&&c.isNumber(this._model.y)}}),b.Element.extend=c.inherits}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.global.animation={"duration":1e3,"easing":"easeOutQuart","onProgress":c.noop,"onComplete":c.noop},b.Animation=b.Element.extend({"currentStep":null,"numSteps":60,"easing":"","render":null,"onAnimationProgress":null,"onAnimationComplete":null}),b.animationService={"frameDuration":17,"animations":[],"dropFrames":0,"addAnimation":function(a,b,d,e){e||(a.animating=!0);for(var f=0;f1&&(b=Math.floor(this.dropFrames),this.dropFrames=this.dropFrames%1);for(var d=0;dthis.animations[d].animationObject.numSteps&&(this.animations[d].animationObject.currentStep=this.animations[d].animationObject.numSteps),this.animations[d].animationObject.render(this.animations[d].chartInstance,this.animations[d].animationObject),this.animations[d].animationObject.onAnimationProgress&&this.animations[d].animationObject.onAnimationProgress.call&&this.animations[d].animationObject.onAnimationProgress.call(this.animations[d].chartInstance,this.animations[d]),this.animations[d].animationObject.currentStep==this.animations[d].animationObject.numSteps&&(this.animations[d].animationObject.onAnimationComplete&&this.animations[d].animationObject.onAnimationComplete.call&&this.animations[d].animationObject.onAnimationComplete.call(this.animations[d].chartInstance,this.animations[d]),this.animations[d].chartInstance.animating=!1,this.animations.splice(d,1),d--);var e=Date.now(),f=(e-a)/this.frameDuration;this.dropFrames+=f,this.animations.length>0&&c.requestAnimFrame.call(window,this.digestWrapper)}}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.types={},b.instances={},b.controllers={},b.Controller=function(a){return this.chart=a,this.config=a.config,this.options=this.config.options=c.configMerge(b.defaults.global,b.defaults[this.config.type],this.config.options||{}),this.id=c.uid(),Object.defineProperty(this,"data",{"get":function(){return this.config.data}}),b.instances[this.id]=this,this.options.responsive&&this.resize(!0),this.initialize.call(this),this},c.extend(b.Controller.prototype,{"initialize":function(){return this.bindEvents(),this.ensureScalesHaveIDs(),this.buildOrUpdateControllers(),this.buildScales(),this.buildSurroundingItems(),this.updateLayout(),this.resetElements(),this.initToolTip(),this.update(),this},"clear":function(){return c.clear(this.chart),this},"stop":function(){return b.animationService.cancelAnimation(this),this},"resize":function(a){this.stop();var b=this.chart.canvas,d=c.getMaximumWidth(this.chart.canvas),e=this.options.maintainAspectRatio&&isNaN(this.chart.aspectRatio)===!1&&isFinite(this.chart.aspectRatio)&&0!==this.chart.aspectRatio?d/this.chart.aspectRatio:c.getMaximumHeight(this.chart.canvas);return b.width=this.chart.width=d,b.height=this.chart.height=e,c.retinaScale(this.chart),a||this.update(this.options.responsiveAnimationDuration),this},"ensureScalesHaveIDs":function(){var a="x-axis-",b="y-axis-";this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&c.each(this.options.scales.xAxes,function(b,c){b.id=b.id||a+c},this),this.options.scales.yAxes&&this.options.scales.yAxes.length&&c.each(this.options.scales.yAxes,function(a,c){a.id=a.id||b+c},this))},"buildScales":function(){if(this.scales={},this.options.scales&&(this.options.scales.xAxes&&this.options.scales.xAxes.length&&c.each(this.options.scales.xAxes,function(a,c){var d=b.scaleService.getScaleConstructor(a.type),e=new d({"ctx":this.chart.ctx,"options":a,"chart":this,"id":a.id});this.scales[e.id]=e},this),this.options.scales.yAxes&&this.options.scales.yAxes.length&&c.each(this.options.scales.yAxes,function(a,c){var d=b.scaleService.getScaleConstructor(a.type),e=new d({"ctx":this.chart.ctx,"options":a,"chart":this,"id":a.id});this.scales[e.id]=e},this)),this.options.scale){var a=b.scaleService.getScaleConstructor(this.options.scale.type),d=new a({"ctx":this.chart.ctx,"options":this.options.scale,"chart":this});this.scale=d,this.scales.radialScale=d}b.scaleService.addScalesToLayout(this)},"buildSurroundingItems":function(){this.options.title&&(this.titleBlock=new b.Title({"ctx":this.chart.ctx,"options":this.options.title,"chart":this}),b.layoutService.addBox(this,this.titleBlock)),this.options.legend&&(this.legend=new b.Legend({"ctx":this.chart.ctx,"options":this.options.legend,"chart":this}),b.layoutService.addBox(this,this.legend))},"updateLayout":function(){b.layoutService.update(this,this.chart.width,this.chart.height)},"buildOrUpdateControllers":function(a){var d=[];if(c.each(this.data.datasets,function(c,e){c.type||(c.type=this.config.type);var f=c.type;d.push(f),c.controller?c.controller.updateIndex(e):(c.controller=new b.controllers[f](this,e),a&&c.controller.reset())},this),d.length>1)for(var e=1;e0&&(b=this.data.datasets[b[0]._datasetIndex].metaData),b},"generateLegend":function(){return this.options.legendCallback(this)},"destroy":function(){this.clear(),c.unbindEvents(this,this.events),c.removeResizeListener(this.chart.canvas.parentNode);var a=this.chart.canvas;a.width=this.chart.width,a.height=this.chart.height,void 0!==this.chart.originalDevicePixelRatio&&this.chart.ctx.scale(1/this.chart.originalDevicePixelRatio,1/this.chart.originalDevicePixelRatio),a.style.width=this.chart.originalCanvasStyleWidth,a.style.height=this.chart.originalCanvasStyleHeight,delete b.instances[this.id]},"toBase64Image":function(){return this.chart.canvas.toDataURL.apply(this.chart.canvas,arguments)},"initToolTip":function(){this.tooltip=new b.Tooltip({"_chart":this.chart,"_chartInstance":this,"_data":this.data,"_options":this.options},this)},"bindEvents":function(){c.bindEvents(this,this.options.events,function(a){this.eventHandler(a)})},"eventHandler":function(a){if(this.lastActive=this.lastActive||[],this.lastTooltipActive=this.lastTooltipActive||[],"mouseout"==a.type)this.active=[],this.tooltipActive=[];else{var b=this,d=function(c){switch(c){case"single":return b.getElementAtEvent(a);case"label":return b.getElementsAtEvent(a);case"dataset":return b.getDatasetAtEvent(a);default:return a}};this.active=d(this.options.hover.mode),this.tooltipActive=d(this.options.tooltips.mode)}this.options.hover.onHover&&this.options.hover.onHover.call(this,this.active),("mouseup"==a.type||"click"==a.type)&&(this.options.onClick&&this.options.onClick.call(this,a,this.active),this.legend&&this.legend.handleEvent&&this.legend.handleEvent(a));if(this.lastActive.length)switch(this.options.hover.mode){case"single":this.data.datasets[this.lastActive[0]._datasetIndex].controller.removeHoverStyle(this.lastActive[0],this.lastActive[0]._datasetIndex,this.lastActive[0]._index);break;case"label":case"dataset":for(var e=0;ea)this.getDataset().metaData.splice(a,b-a);else if(a>b)for(var c=b;a>c;++c)this.addElementAndReset(c)},"addElements":c.noop,"addElementAndReset":c.noop,"draw":c.noop,"removeHoverStyle":c.noop,"setHoverStyle":c.noop,"update":c.noop}),b.DatasetController.extend=c.inherits}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.layoutService={"defaults":{},"addBox":function(a,b){a.boxes||(a.boxes=[]),a.boxes.push(b)},"removeBox":function(a,b){a.boxes&&a.boxes.splice(a.boxes.indexOf(b),1)},"update":function(a,b,d){function e(a){var b,c=a.isHorizontal();c?(b=a.update(a.options.fullWidth?p:v,u),w-=b.height):(b=a.update(t,s),v-=b.width),x.push({"horizontal":c,"minSize":b,"box":a})}function f(a){var b=c.findNextWhere(x,function(b){return b.box===a});if(b)if(a.isHorizontal()){var d={"left":y,"right":z,"top":0,"bottom":0};a.update(a.options.fullWidth?p:v,b.minSize.height,d)}else a.update(b.minSize.width,w)}function g(a){var b=c.findNextWhere(x,function(b){return b.box===a}),d={"left":0,"right":0,"top":A,"bottom":B};b&&a.update(b.minSize.width,w,d)}function h(a){a.isHorizontal()?(a.left=a.options.fullWidth?i:y,a.right=a.options.fullWidth?b-i:y+v,a.top=F,a.bottom=F+a.height,F=a.bottom):(a.left=E,a.right=E+a.width,a.top=A,a.bottom=A+w,E=a.right)}if(a){var i=b>30?5:2,j=d>30?5:2,k=c.where(a.boxes,function(a){return"left"==a.options.position}),l=c.where(a.boxes,function(a){return"right"==a.options.position}),m=c.where(a.boxes,function(a){return"top"==a.options.position}),n=c.where(a.boxes,function(a){return"bottom"==a.options.position}),o=c.where(a.boxes,function(a){return"chartArea"==a.options.position});m.sort(function(a,b){return(b.options.fullWidth?1:0)-(a.options.fullWidth?1:0)}),n.sort(function(a,b){return(a.options.fullWidth?1:0)-(b.options.fullWidth?1:0)});var p=b-2*i,q=d-2*j,r=p/2,s=q/2,t=(b-r)/(k.length+l.length),u=(d-s)/(m.length+n.length),v=p,w=q,x=[];c.each(k.concat(l,m,n),e);var y=i,z=i,A=j,B=j;c.each(k.concat(l),f),c.each(k,function(a){y+=a.width}),c.each(l,function(a){z+=a.width}),c.each(m.concat(n),f),c.each(m,function(a){A+=a.height}),c.each(n,function(a){B+=a.height}),c.each(k.concat(l),g),y=i,z=i,A=j,B=j,c.each(k,function(a){y+=a.width}),c.each(l,function(a){z+=a.width}),c.each(m,function(a){A+=a.height}),c.each(n,function(a){B+=a.height});var C=d-A-B,D=b-y-z;(D!==v||C!==w)&&(c.each(k,function(a){a.height=C}),c.each(l,function(a){a.height=C}),c.each(m,function(a){a.width=D}),c.each(n,function(a){a.width=D}),w=C,v=D);var E=i,F=j;c.each(k.concat(m),h),E+=v,F+=w,c.each(l,h),c.each(n,h),a.chartArea={"left":y,"top":A,"right":y+v,"bottom":A+w},c.each(o,function(b){b.left=a.chartArea.left,b.top=a.chartArea.top,b.right=a.chartArea.right,b.bottom=a.chartArea.bottom,b.update(v,w)})}}}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.global.legend={"display":!0,"position":"top","fullWidth":!0,"onClick":function(a,b){var c=this.chart.data.datasets[b.datasetIndex];c.hidden=!c.hidden,this.chart.update()},"labels":{"boxWidth":40,"fontSize":12,"fontStyle":"normal","fontColor":"#666","fontFamily":"Helvetica Neue","padding":10,"generateLabels":function(a){return a.datasets.map(function(a,b){return{"text":a.label,"fillStyle":a.backgroundColor,"hidden":a.hidden,"lineCap":a.borderCapStyle,"lineDash":a.borderDash,"lineDashOffset":a.borderDashOffset,"lineJoin":a.borderJoinStyle,"lineWidth":a.borderWidth,"strokeStyle":a.borderColor,"datasetIndex":b}},this)}}},b.Legend=b.Element.extend({"initialize":function(a){c.extend(this,a),this.legendHitBoxes=[],this.doughnutMode=!1},"beforeUpdate":c.noop,"update":function(a,b,c){return this.beforeUpdate(),this.maxWidth=a,this.maxHeight=b,this.margins=c,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},"afterUpdate":c.noop,"beforeSetDimensions":c.noop,"setDimensions":function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={"width":0,"height":0}},"afterSetDimensions":c.noop,"beforeBuildLabels":c.noop,"buildLabels":function(){this.legendItems=this.options.labels.generateLabels.call(this,this.chart.data)},"afterBuildLabels":c.noop,"beforeFit":c.noop,"fit":function(){var a=this.ctx,b=c.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily);if(this.legendHitBoxes=[],this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=this.options.display?10:0,this.isHorizontal()?this.minSize.height=this.options.display?10:0:this.minSize.height=this.maxHeight,this.options.display&&this.isHorizontal()){this.lineWidths=[0];var d=this.legendItems.length?this.options.labels.fontSize+this.options.labels.padding:0;a.textAlign="left",a.textBaseline="top",a.font=b,c.each(this.legendItems,function(b,c){var e=this.options.labels.boxWidth+this.options.labels.fontSize/2+a.measureText(b.text).width;this.lineWidths[this.lineWidths.length-1]+e>=this.width&&(d+=this.options.labels.fontSize+this.options.labels.padding,this.lineWidths[this.lineWidths.length]=this.left),this.legendHitBoxes[c]={"left":0,"top":0,"width":e,"height":this.options.labels.fontSize},this.lineWidths[this.lineWidths.length-1]+=e+this.options.labels.padding},this),this.minSize.height+=d}this.width=this.minSize.width,this.height=this.minSize.height},"afterFit":c.noop,"isHorizontal":function(){return"top"==this.options.position||"bottom"==this.options.position},"draw":function(){if(this.options.display){var a=this.ctx,d={"x":this.left+(this.width-this.lineWidths[0])/2,"y":this.top+this.options.labels.padding,"line":0},e=c.fontString(this.options.labels.fontSize,this.options.labels.fontStyle,this.options.labels.fontFamily);this.isHorizontal()&&(a.textAlign="left",a.textBaseline="top",a.lineWidth=.5,a.strokeStyle=this.options.labels.fontColor,a.fillStyle=this.options.labels.fontColor,a.font=e,c.each(this.legendItems,function(c,e){var f=a.measureText(c.text).width,g=this.options.labels.boxWidth+this.options.labels.fontSize/2+f;d.x+g>=this.width&&(d.y+=this.options.labels.fontSize+this.options.labels.padding,d.line++,d.x=this.left+(this.width-this.lineWidths[d.line])/2),a.save();var h=function(a,b){return void 0!==a?a:b};a.fillStyle=h(c.fillStyle,b.defaults.global.defaultColor),a.lineCap=h(c.lineCap,b.defaults.global.elements.line.borderCapStyle),a.lineDashOffset=h(c.lineDashOffset,b.defaults.global.elements.line.borderDashOffset),a.lineJoin=h(c.lineJoin,b.defaults.global.elements.line.borderJoinStyle),a.lineWidth=h(c.lineWidth,b.defaults.global.elements.line.borderWidth),a.strokeStyle=h(c.strokeStyle,b.defaults.global.defaultColor),a.setLineDash&&a.setLineDash(h(c.lineDash,b.defaults.global.elements.line.borderDash)),a.strokeRect(d.x,d.y,this.options.labels.boxWidth,this.options.labels.fontSize),a.fillRect(d.x,d.y,this.options.labels.boxWidth,this.options.labels.fontSize),a.restore(),this.legendHitBoxes[e].left=d.x,this.legendHitBoxes[e].top=d.y,a.fillText(c.text,this.options.labels.boxWidth+this.options.labels.fontSize/2+d.x,d.y),c.hidden&&(a.beginPath(),a.lineWidth=2,a.moveTo(this.options.labels.boxWidth+this.options.labels.fontSize/2+d.x,d.y+this.options.labels.fontSize/2),a.lineTo(this.options.labels.boxWidth+this.options.labels.fontSize/2+d.x+f,d.y+this.options.labels.fontSize/2),a.stroke()),d.x+=g+this.options.labels.padding},this))}},"handleEvent":function(a){var b=c.getRelativePosition(a,this.chart.chart);if(b.x>=this.left&&b.x<=this.right&&b.y>=this.top&&b.y<=this.bottom)for(var d=0;d=e.left&&b.x<=e.left+e.width&&b.y>=e.top&&b.y<=e.top+e.height){this.options.onClick&&this.options.onClick.call(this,a,this.legendItems[d]);break}}}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.scale={"display":!0,"gridLines":{"display":!0,"color":"rgba(0, 0, 0, 0.1)","lineWidth":1,"drawOnChartArea":!0,"drawTicks":!0,"zeroLineWidth":1,"zeroLineColor":"rgba(0,0,0,0.25)","offsetGridLines":!1},"scaleLabel":{"fontColor":"#666","fontFamily":"Helvetica Neue","fontSize":12,"fontStyle":"normal","labelString":"","display":!1},"ticks":{"beginAtZero":!1,"fontSize":12,"fontStyle":"normal","fontColor":"#666","fontFamily":"Helvetica Neue","maxRotation":90,"mirror":!1,"padding":10,"reverse":!1,"display":!0,"autoSkip":!0,"autoSkipPadding":20,"callback":function(a){return""+a}}},b.Scale=b.Element.extend({"beforeUpdate":function(){c.callCallback(this.options.beforeUpdate,[this])},"update":function(a,b,d){return this.beforeUpdate(),this.maxWidth=a,this.maxHeight=b,this.margins=c.extend({"left":0,"right":0,"top":0,"bottom":0},d),this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this.beforeBuildTicks(),this.buildTicks(),this.afterBuildTicks(),this.beforeTickToLabelConversion(),this.convertTicksToLabels(),this.afterTickToLabelConversion(),this.beforeCalculateTickRotation(),this.calculateTickRotation(),this.afterCalculateTickRotation(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},"afterUpdate":function(){c.callCallback(this.options.afterUpdate,[this])},"beforeSetDimensions":function(){c.callCallback(this.options.beforeSetDimensions,[this])},"setDimensions":function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0},"afterSetDimensions":function(){c.callCallback(this.options.afterSetDimensions,[this])},"beforeDataLimits":function(){c.callCallback(this.options.beforeDataLimits,[this])},"determineDataLimits":c.noop,"afterDataLimits":function(){c.callCallback(this.options.afterDataLimits,[this])},"beforeBuildTicks":function(){c.callCallback(this.options.beforeBuildTicks,[this])},"buildTicks":c.noop,"afterBuildTicks":function(){c.callCallback(this.options.afterBuildTicks,[this])},"beforeTickToLabelConversion":function(){c.callCallback(this.options.beforeTickToLabelConversion,[this])},"convertTicksToLabels":function(){this.ticks=this.ticks.map(function(a,b,c){return this.options.ticks.userCallback?this.options.ticks.userCallback(a,b,c):this.options.ticks.callback(a,b,c)},this)},"afterTickToLabelConversion":function(){c.callCallback(this.options.afterTickToLabelConversion,[this])},"beforeCalculateTickRotation":function(){c.callCallback(this.options.beforeCalculateTickRotation,[this])},"calculateTickRotation":function(){var a=c.fontString(this.options.ticks.fontSize,this.options.ticks.fontStyle,this.options.ticks.fontFamily);this.ctx.font=a;var b,d,e=this.ctx.measureText(this.ticks[0]).width,f=this.ctx.measureText(this.ticks[this.ticks.length-1]).width;if(this.paddingRight=f/2+3,this.paddingLeft=e/2+3,this.labelRotation=0,this.options.display&&this.isHorizontal()){var g,h,i=c.longestText(this.ctx,a,this.ticks);this.labelWidth=i;for(var j=this.getPixelForTick(1)-this.getPixelForTick(0)-6;this.labelWidth>j&&this.labelRotationthis.yLabelWidth&&(this.paddingLeft=b+this.options.ticks.fontSize/2),this.paddingRight=this.options.ticks.fontSize/2,h*i>this.maxHeight){this.labelRotation--;break}this.labelRotation++,this.labelWidth=g*i}}else this.labelWidth=0,this.paddingRight=0,this.paddingLeft=0;this.margins&&(this.paddingLeft-=this.margins.left,this.paddingRight-=this.margins.right,this.paddingLeft=Math.max(this.paddingLeft,0),this.paddingRight=Math.max(this.paddingRight,0))},"afterCalculateTickRotation":function(){c.callCallback(this.options.afterCalculateTickRotation,[this])},"beforeFit":function(){c.callCallback(this.options.beforeFit,[this])},"fit":function(){if(this.minSize={"width":0,"height":0},this.isHorizontal()?this.minSize.width=this.isFullWidth()?this.maxWidth-this.margins.left-this.margins.right:this.maxWidth:this.minSize.width=this.options.gridLines.display&&this.options.display?10:0,this.isHorizontal()?this.minSize.height=this.options.gridLines.display&&this.options.display?10:0:this.minSize.height=this.maxHeight,this.options.scaleLabel.display&&(this.isHorizontal()?this.minSize.height+=1.5*this.options.scaleLabel.fontSize:this.minSize.width+=1.5*this.options.scaleLabel.fontSize),this.options.ticks.display&&this.options.display){var a=c.fontString(this.options.ticks.fontSize,this.options.ticks.fontStyle,this.options.ticks.fontFamily);if(this.isHorizontal()){this.longestLabelWidth=c.longestText(this.ctx,a,this.ticks);var b=Math.sin(c.toRadians(this.labelRotation))*this.longestLabelWidth+1.5*this.options.ticks.fontSize;this.minSize.height=Math.min(this.maxHeight,this.minSize.height+b),a=c.fontString(this.options.ticks.fontSize,this.options.ticks.fontStyle,this.options.ticks.fontFamily),this.ctx.font=a;var d=this.ctx.measureText(this.ticks[0]).width,e=this.ctx.measureText(this.ticks[this.ticks.length-1]).width,f=Math.cos(c.toRadians(this.labelRotation)),g=Math.sin(c.toRadians(this.labelRotation));this.paddingLeft=0!==this.labelRotation?f*d+3:d/2+3,this.paddingRight=0!==this.labelRotation?g*(this.options.ticks.fontSize/2)+3:e/2+3}else{ var h=this.maxWidth-this.minSize.width,i=c.longestText(this.ctx,a,this.ticks);this.options.ticks.mirror||(i+=this.options.ticks.padding),h>i?this.minSize.width+=i:this.minSize.width=this.maxWidth,this.paddingTop=this.options.ticks.fontSize/2,this.paddingBottom=this.options.ticks.fontSize/2}}this.margins&&(this.paddingLeft-=this.margins.left,this.paddingTop-=this.margins.top,this.paddingRight-=this.margins.right,this.paddingBottom-=this.margins.bottom,this.paddingLeft=Math.max(this.paddingLeft,0),this.paddingTop=Math.max(this.paddingTop,0),this.paddingRight=Math.max(this.paddingRight,0),this.paddingBottom=Math.max(this.paddingBottom,0)),this.width=this.minSize.width,this.height=this.minSize.height},"afterFit":function(){c.callCallback(this.options.afterFit,[this])},"isHorizontal":function(){return"top"===this.options.position||"bottom"===this.options.position},"isFullWidth":function(){return this.options.fullWidth},"getRightValue":function d(a){return null===a||"undefined"==typeof a?NaN:"number"==typeof a&&isNaN(a)?NaN:"object"==typeof a?a instanceof Date?a:d(this.isHorizontal()?a.x:a.y):a},"getLabelForIndex":c.noop,"getPixelForValue":c.noop,"getPixelForTick":function(a,b){if(this.isHorizontal()){var c=this.width-(this.paddingLeft+this.paddingRight),d=c/Math.max(this.ticks.length-(this.options.gridLines.offsetGridLines?0:1),1),e=d*a+this.paddingLeft;b&&(e+=d/2);var f=this.left+Math.round(e);return f+=this.isFullWidth()?this.margins.left:0}var g=this.height-(this.paddingTop+this.paddingBottom);return this.top+a*(g/(this.ticks.length-1))},"getPixelForDecimal":function(a){if(this.isHorizontal()){var b=this.width-(this.paddingLeft+this.paddingRight),c=b*a+this.paddingLeft,d=this.left+Math.round(c);return d+=this.isFullWidth()?this.margins.left:0}return this.top+a*this.height},"draw":function(a){if(this.options.display){var b,d,e,f,g=0!==this.labelRotation,h=this.options.ticks.autoSkip;this.ctx.fillStyle=this.options.ticks.fontColor;var i=c.fontString(this.options.ticks.fontSize,this.options.ticks.fontStyle,this.options.ticks.fontFamily),j=Math.cos(c.toRadians(this.labelRotation)),k=Math.sin(c.toRadians(this.labelRotation)),l=this.longestLabelWidth*j;this.options.ticks.fontSize*k;if(this.isHorizontal()){b=!0;var m="bottom"===this.options.position?this.top:this.bottom-10,n="bottom"===this.options.position?this.top+10:this.bottom;d=!1,(l/2+this.options.ticks.autoSkipPadding)*this.ticks.length>this.width-(this.paddingLeft+this.paddingRight)&&(d=1+Math.floor((l/2+this.options.ticks.autoSkipPadding)*this.ticks.length/(this.width-(this.paddingLeft+this.paddingRight)))),h||(d=!1),c.each(this.ticks,function(e,f){if(!(d>1&&f%d>0||void 0===e||null===e)){var h=this.getPixelForTick(f),j=this.getPixelForTick(f,this.options.gridLines.offsetGridLines);this.options.gridLines.display&&(f===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,b=!0):b&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,b=!1),h+=c.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(h,m),this.ctx.lineTo(h,n)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(h,a.top),this.ctx.lineTo(h,a.bottom)),this.ctx.stroke()),this.options.ticks.display&&(this.ctx.save(),this.ctx.translate(j,g?this.top+12:"top"===this.options.position?this.bottom-10:this.top+10),this.ctx.rotate(-1*c.toRadians(this.labelRotation)),this.ctx.font=i,this.ctx.textAlign=g?"right":"center",this.ctx.textBaseline=g?"middle":"top"===this.options.position?"bottom":"top",this.ctx.fillText(e,0,0),this.ctx.restore())}},this),this.options.scaleLabel.display&&(this.ctx.textAlign="center",this.ctx.textBaseline="middle",this.ctx.fillStyle=this.options.scaleLabel.fontColor,this.ctx.font=c.fontString(this.options.scaleLabel.fontSize,this.options.scaleLabel.fontStyle,this.options.scaleLabel.fontFamily),e=this.left+(this.right-this.left)/2,f="bottom"===this.options.position?this.bottom-this.options.scaleLabel.fontSize/2:this.top+this.options.scaleLabel.fontSize/2,this.ctx.fillText(this.options.scaleLabel.labelString,e,f))}else{b=!0;var o="right"===this.options.position?this.left:this.right-5,p="right"===this.options.position?this.left+5:this.right;if(c.each(this.ticks,function(d,e){if(void 0!==d&&null!==d){var f=this.getPixelForTick(e);if(this.options.gridLines.display&&(e===("undefined"!=typeof this.zeroLineIndex?this.zeroLineIndex:0)?(this.ctx.lineWidth=this.options.gridLines.zeroLineWidth,this.ctx.strokeStyle=this.options.gridLines.zeroLineColor,b=!0):b&&(this.ctx.lineWidth=this.options.gridLines.lineWidth,this.ctx.strokeStyle=this.options.gridLines.color,b=!1),f+=c.aliasPixel(this.ctx.lineWidth),this.ctx.beginPath(),this.options.gridLines.drawTicks&&(this.ctx.moveTo(o,f),this.ctx.lineTo(p,f)),this.options.gridLines.drawOnChartArea&&(this.ctx.moveTo(a.left,f),this.ctx.lineTo(a.right,f)),this.ctx.stroke()),this.options.ticks.display){var g,h=this.getPixelForTick(e,this.options.gridLines.offsetGridLines);this.ctx.save(),"left"===this.options.position?this.options.ticks.mirror?(g=this.right+this.options.ticks.padding,this.ctx.textAlign="left"):(g=this.right-this.options.ticks.padding,this.ctx.textAlign="right"):this.options.ticks.mirror?(g=this.left-this.options.ticks.padding,this.ctx.textAlign="right"):(g=this.left+this.options.ticks.padding,this.ctx.textAlign="left"),this.ctx.translate(g,h),this.ctx.rotate(-1*c.toRadians(this.labelRotation)),this.ctx.font=i,this.ctx.textBaseline="middle",this.ctx.fillText(d,0,0),this.ctx.restore()}}},this),this.options.scaleLabel.display){e="left"===this.options.position?this.left+this.options.scaleLabel.fontSize/2:this.right-this.options.scaleLabel.fontSize/2,f=this.top+(this.bottom-this.top)/2;var q="left"===this.options.position?-.5*Math.PI:.5*Math.PI;this.ctx.save(),this.ctx.translate(e,f),this.ctx.rotate(q),this.ctx.textAlign="center",this.ctx.fillStyle=this.options.scaleLabel.fontColor,this.ctx.font=c.fontString(this.options.scaleLabel.fontSize,this.options.scaleLabel.fontStyle,this.options.scaleLabel.fontFamily),this.ctx.textBaseline="middle",this.ctx.fillText(this.options.scaleLabel.labelString,0,0),this.ctx.restore()}}}}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.scaleService={"constructors":{},"defaults":{},"registerScaleType":function(a,b,d){this.constructors[a]=b,this.defaults[a]=c.clone(d)},"getScaleConstructor":function(a){return this.constructors.hasOwnProperty(a)?this.constructors[a]:void 0},"getScaleDefaults":function(a){return this.defaults.hasOwnProperty(a)?c.scaleMerge(b.defaults.scale,this.defaults[a]):{}},"addScalesToLayout":function(a){c.each(a.scales,function(c){b.layoutService.addBox(a,c)})}}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.global.title={"display":!1,"position":"top","fullWidth":!0,"fontColor":"#666","fontFamily":"Helvetica Neue","fontSize":12,"fontStyle":"bold","padding":10,"text":""},b.Title=b.Element.extend({"initialize":function(a){c.extend(this,a),this.options=c.configMerge(b.defaults.global.title,a.options),this.legendHitBoxes=[]},"beforeUpdate":c.noop,"update":function(a,b,c){return this.beforeUpdate(),this.maxWidth=a,this.maxHeight=b,this.margins=c,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this.beforeBuildLabels(),this.buildLabels(),this.afterBuildLabels(),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate(),this.minSize},"afterUpdate":c.noop,"beforeSetDimensions":c.noop,"setDimensions":function(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0,this.minSize={"width":0,"height":0}},"afterSetDimensions":c.noop,"beforeBuildLabels":c.noop,"buildLabels":c.noop,"afterBuildLabels":c.noop,"beforeFit":c.noop,"fit":function(){this.ctx,c.fontString(this.options.fontSize,this.options.fontStyle,this.options.fontFamily);this.isHorizontal()?this.minSize.width=this.maxWidth:this.minSize.width=0,this.isHorizontal()?this.minSize.height=0:this.minSize.height=this.maxHeight,this.isHorizontal()&&this.options.display&&(this.minSize.height+=this.options.fontSize+2*this.options.padding),this.width=this.minSize.width,this.height=this.minSize.height},"afterFit":c.noop,"isHorizontal":function(){return"top"==this.options.position||"bottom"==this.options.position},"draw":function(){if(this.options.display){var a,b,d=this.ctx;if(this.isHorizontal())this.options.display&&(d.textAlign="center",d.textBaseline="middle",d.fillStyle=this.options.fontColor,d.font=c.fontString(this.options.fontSize,this.options.fontStyle,this.options.fontFamily),a=this.left+(this.right-this.left)/2,b=this.top+(this.bottom-this.top)/2,d.fillText(this.options.text,a,b));else if(this.options.display){a="left"==this.options.position?this.left+this.options.fontSize/2:this.right-this.options.fontSize/2,b=this.top+(this.bottom-this.top)/2;var e="left"==this.options.position?-.5*Math.PI:.5*Math.PI;d.save(),d.translate(a,b),d.rotate(e),d.textAlign="center",d.fillStyle=this.options.fontColor,d.font=c.fontString(this.options.fontSize,this.options.fontStyle,this.options.fontFamily),d.textBaseline="middle",d.fillText(this.options.text,0,0),d.restore()}}}})}.call(this),function(){"use strict";function a(a,b){return b&&(d.isArray(b)?a=a.concat(b):a.push(b)),a}var b=this,c=b.Chart,d=c.helpers;c.defaults.global.tooltips={"enabled":!0,"custom":null,"mode":"single","backgroundColor":"rgba(0,0,0,0.8)","titleFontFamily":"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif","titleFontSize":12,"titleFontStyle":"bold","titleSpacing":2,"titleMarginBottom":6,"titleColor":"#fff","titleAlign":"left","bodyFontFamily":"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif","bodyFontSize":12,"bodyFontStyle":"normal","bodySpacing":2,"bodyColor":"#fff","bodyAlign":"left","footerFontFamily":"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif","footerFontSize":12,"footerFontStyle":"bold","footerSpacing":2,"footerMarginTop":6,"footerColor":"#fff","footerAlign":"left","yPadding":6,"xPadding":6,"caretSize":5,"cornerRadius":6,"multiKeyBackground":"#fff","callbacks":{"beforeTitle":d.noop,"title":function(a,b){var c="";return a.length>0&&(a[0].xLabel?c=a[0].xLabel:b.labels.length>0&&a[0].indexthis._chart.height-a.height&&(this._model.yAlign="bottom");var b,c,d=this,e=(this._chartInstance.chartArea.left+this._chartInstance.chartArea.right)/2;"center"===this._model.yAlign?(b=function(a){return e>=a},c=function(a){return a>e}):(b=function(b){return b<=a.width/2},c=function(b){return b>=d._chart.width-a.width/2}),b(this._model.x)?this._model.xAlign="left":c(this._model.x)&&(this._model.xAlign="right")},"getBackgroundPoint":function(a,b){var c={"x":a.x,"y":a.y};return"right"===a.xAlign?c.x-=b.width:"center"===a.xAlign&&(c.x-=b.width/2),"top"===a.yAlign?c.y+=a.caretPadding+a.caretSize:"bottom"===a.yAlign?c.y-=b.height+a.caretPadding+a.caretSize:c.y-=b.height/2,"center"==a.yAlign?"left"===a.xAlign?c.x+=a.caretPadding+a.caretSize:"right"===a.xAlign&&(c.x-=a.caretPadding+a.caretSize):"left"===a.xAlign?c.x-=a.cornerRadius+a.caretPadding:"right"===a.xAlign&&(c.x+=a.cornerRadius+a.caretPadding),c},"drawCaret":function(a,b,c,e){var f,g,h,i,j,k,l=this._view,m=this._chart.ctx;"center"===l.yAlign?("left"===l.xAlign?(f=a.x,g=f-l.caretSize,h=f):(f=a.x+b.width,g=f+l.caretSize,h=f),j=a.y+b.height/2,i=j-l.caretSize,k=j+l.caretSize):("left"===l.xAlign?(f=a.x+l.cornerRadius,g=f+l.caretSize,h=g+l.caretSize):"right"===l.xAlign?(f=a.x+b.width-l.cornerRadius,g=f-l.caretSize,h=g-l.caretSize):(g=a.x+b.width/2,f=g-l.caretSize,h=g+l.caretSize),"top"===l.yAlign?(i=a.y,j=i-l.caretSize,k=i):(i=a.y+b.height,j=i+l.caretSize,k=i)),m.fillStyle=d.color(l.backgroundColor).alpha(c).rgbString(),m.beginPath(),m.moveTo(f,i),m.lineTo(g,j),m.lineTo(h,k),m.closePath(),m.fill()},"drawTitle":function(a,b,c,e){b.title.length&&(c.textAlign=b._titleAlign,c.textBaseline="top",c.fillStyle=d.color(b.titleColor).alpha(e).rgbString(),c.font=d.fontString(b.titleFontSize,b._titleFontStyle,b._titleFontFamily),d.each(b.title,function(d,e){c.fillText(d,a.x,a.y),a.y+=b.titleFontSize+b.titleSpacing,e+1===b.title.length&&(a.y+=b.titleMarginBottom-b.titleSpacing)},this))},"drawBody":function(a,b,c,e){c.textAlign=b._bodyAlign,c.textBaseline="top",c.fillStyle=d.color(b.bodyColor).alpha(e).rgbString(),c.font=d.fontString(b.bodyFontSize,b._bodyFontStyle,b._bodyFontFamily),d.each(b.beforeBody,function(d){c.fillText(d,a.x,a.y),a.y+=b.bodyFontSize+b.bodySpacing}),d.each(b.body,function(f,g){"single"!==this._options.tooltips.mode&&(c.fillStyle=d.color(b.legendColorBackground).alpha(e).rgbaString(),c.fillRect(a.x,a.y,b.bodyFontSize,b.bodyFontSize),c.strokeStyle=d.color(b.labelColors[g].borderColor).alpha(e).rgbaString(),c.strokeRect(a.x,a.y,b.bodyFontSize,b.bodyFontSize),c.fillStyle=d.color(b.labelColors[g].backgroundColor).alpha(e).rgbaString(),c.fillRect(a.x+1,a.y+1,b.bodyFontSize-2,b.bodyFontSize-2),c.fillStyle=d.color(b.bodyColor).alpha(e).rgbaString()),c.fillText(f,a.x+("single"!==this._options.tooltips.mode?b.bodyFontSize+2:0),a.y),a.y+=b.bodyFontSize+b.bodySpacing},this),d.each(b.afterBody,function(d){c.fillText(d,a.x,a.y),a.y+=b.bodyFontSize}),a.y-=b.bodySpacing},"drawFooter":function(a,b,c,e){b.footer.length&&(a.y+=b.footerMarginTop,c.textAlign=b._footerAlign,c.textBaseline="top",c.fillStyle=d.color(b.footerColor).alpha(e).rgbString(),c.font=d.fontString(b.footerFontSize,b._footerFontStyle,b._footerFontFamily),d.each(b.footer,function(d){c.fillText(d,a.x,a.y),a.y+=b.footerFontSize+b.footerSpacing},this))},"draw":function(){var a=this._chart.ctx,b=this._view;if(0!==b.opacity){var c=b.caretPadding,e=this.getTooltipSize(b),f={"x":b.x,"y":b.y},g=Math.abs(b.opacity<.001)?0:b.opacity;this._options.tooltips.enabled&&(a.fillStyle=d.color(b.backgroundColor).alpha(g).rgbString(),d.drawRoundedRectangle(a,f.x,f.y,e.width,e.height,b.cornerRadius),a.fill(),this.drawCaret(f,e,g,c),f.x+=b.xPadding,f.y+=b.yPadding,this.drawTitle(f,b,a,g),this.drawBody(f,b,a,g),this.drawFooter(f,b,a,g))}}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.bar={"hover":{"mode":"label"},"scales":{"xAxes":[{"type":"category","categoryPercentage":.8,"barPercentage":.9,"gridLines":{"offsetGridLines":!0}}],"yAxes":[{"type":"linear"}]}},b.controllers.bar=b.DatasetController.extend({"initialize":function(a,c){b.DatasetController.prototype.initialize.call(this,a,c),this.getDataset().bar=!0},"getBarCount":function(){var a=0;return c.each(this.chart.data.datasets,function(b){c.isDatasetVisible(b)&&b.bar&&++a},this),a},"addElements":function(){this.getDataset().metaData=this.getDataset().metaData||[],c.each(this.getDataset().data,function(a,c){this.getDataset().metaData[c]=this.getDataset().metaData[c]||new b.elements.Rectangle({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":c})},this)},"addElementAndReset":function(a){this.getDataset().metaData=this.getDataset().metaData||[];var c=new b.elements.Rectangle({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":a}),d=this.getBarCount();this.updateElement(c,a,!0,d),this.getDataset().metaData.splice(a,0,c)},"update":function(a){var b=this.getBarCount();c.each(this.getDataset().metaData,function(c,d){this.updateElement(c,d,a,b)},this)},"updateElement":function(a,b,d,e){var f,g=this.getScaleForId(this.getDataset().xAxisID),h=this.getScaleForId(this.getDataset().yAxisID);f=h.min<0&&h.max<0?h.getPixelForValue(h.max):h.min>0&&h.max>0?h.getPixelForValue(h.min):h.getPixelForValue(0),c.extend(a,{"_chart":this.chart.chart,"_xScale":g,"_yScale":h,"_datasetIndex":this.index,"_index":b,"_model":{"x":this.calculateBarX(b,this.index),"y":d?f:this.calculateBarY(b,this.index),"label":this.chart.data.labels[b],"datasetLabel":this.getDataset().label,"base":this.calculateBarBase(this.index,b),"width":this.calculateBarWidth(e),"backgroundColor":a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.rectangle.backgroundColor),"borderColor":a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.rectangle.borderColor),"borderWidth":a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.rectangle.borderWidth)}}),a.pivot()},"calculateBarBase":function(a,b){var d=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),e=0;if(d.options.stacked){var f=this.chart.data.datasets[a].data[b];if(0>f)for(var g=0;a>g;g++){var h=this.chart.data.datasets[g];c.isDatasetVisible(h)&&h.yAxisID===d.id&&(e+=h.data[b]<0?h.data[b]:0)}else for(var i=0;a>i;i++){var j=this.chart.data.datasets[i];c.isDatasetVisible(j)&&j.yAxisID===d.id&&(e+=j.data[b]>0?j.data[b]:0)}return d.getPixelForValue(e)}return e=d.getPixelForValue(d.min),d.beginAtZero||d.min<=0&&d.max>=0||d.min>=0&&d.max<=0?e=d.getPixelForValue(0,0):d.min<0&&d.max<0&&(e=d.getPixelForValue(d.max)),e},"getRuler":function(){var a=this.getScaleForId(this.getDataset().xAxisID),b=(this.getScaleForId(this.getDataset().yAxisID),this.getBarCount()),c=function(){for(var b=a.getPixelForTick(1)-a.getPixelForTick(0),c=2;cd;++d)c.isDatasetVisible(this.chart.data.datasets[d])&&this.chart.data.datasets[d].bar&&++b;return b},"calculateBarX":function(a,b){var c=(this.getScaleForId(this.getDataset().yAxisID),this.getScaleForId(this.getDataset().xAxisID)),d=this.getBarIndex(b),e=this.getRuler(),f=c.getPixelForValue(null,a,b,this.chart.isCombo);return f-=this.chart.isCombo?e.tickWidth/2:0,c.options.stacked?f+e.categoryWidth/2+e.categorySpacing:f+e.barWidth/2+e.categorySpacing+e.barWidth*d+e.barSpacing/2+e.barSpacing*d},"calculateBarY":function(a,b){var d=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID)),e=this.getDataset().data[a];if(d.options.stacked){for(var f=0,g=0,h=0;b>h;h++){var i=this.chart.data.datasets[h];c.isDatasetVisible(i)&&(i.data[a]<0?g+=i.data[a]||0:f+=i.data[a]||0)}return 0>e?d.getPixelForValue(g+e):d.getPixelForValue(f+e)}return d.getPixelForValue(e)},"draw":function(a){var b=a||1;c.each(this.getDataset().metaData,function(a,c){a.transition(b).draw()},this)},"setHoverStyle":function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index;a._model.backgroundColor=a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(b.hoverBackgroundColor,d,c.color(a._model.backgroundColor).saturate(.5).darken(.1).rgbString()),a._model.borderColor=a.custom&&a.custom.hoverBorderColor?a.custom.hoverBorderColor:c.getValueAtIndexOrDefault(b.hoverBorderColor,d,c.color(a._model.borderColor).saturate(.5).darken(.1).rgbString()),a._model.borderWidth=a.custom&&a.custom.hoverBorderWidth?a.custom.hoverBorderWidth:c.getValueAtIndexOrDefault(b.hoverBorderWidth,d,a._model.borderWidth)},"removeHoverStyle":function(a){var b=(this.chart.data.datasets[a._datasetIndex],a._index);a._model.backgroundColor=a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.rectangle.backgroundColor),a._model.borderColor=a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.rectangle.borderColor),a._model.borderWidth=a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.rectangle.borderWidth)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.bubble={"hover":{"mode":"single"},"scales":{"xAxes":[{"type":"linear","position":"bottom","id":"x-axis-0"}],"yAxes":[{"type":"linear","position":"left","id":"y-axis-0"}]},"tooltips":{"template":"(<%= value.x %>, <%= value.y %>, <%= value.r %>)","multiTemplate":"<%if (datasetLabel){%><%=datasetLabel%>: <%}%>(<%= value.x %>, <%= value.y %>, <%= value.r %>)"}},b.controllers.bubble=b.DatasetController.extend({"addElements":function(){this.getDataset().metaData=this.getDataset().metaData||[],c.each(this.getDataset().data,function(a,c){this.getDataset().metaData[c]=this.getDataset().metaData[c]||new b.elements.Point({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":c})},this)},"addElementAndReset":function(a){this.getDataset().metaData=this.getDataset().metaData||[];var c=new b.elements.Point({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":a});this.updateElement(c,a,!0),this.getDataset().metaData.splice(a,0,c)},"update":function(a){var b,d=this.getDataset().metaData,e=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);b=e.min<0&&e.max<0?e.getPixelForValue(e.max):e.min>0&&e.max>0?e.getPixelForValue(e.min):e.getPixelForValue(0),c.each(d,function(b,c){this.updateElement(b,c,a)},this)},"updateElement":function(a,b,d){var e,f=this.getScaleForId(this.getDataset().yAxisID),g=this.getScaleForId(this.getDataset().xAxisID);e=f.min<0&&f.max<0?f.getPixelForValue(f.max):f.min>0&&f.max>0?f.getPixelForValue(f.min):f.getPixelForValue(0),c.extend(a,{"_chart":this.chart.chart,"_xScale":g,"_yScale":f,"_datasetIndex":this.index,"_index":b,"_model":{"x":d?g.getPixelForDecimal(.5):g.getPixelForValue(this.getDataset().data[b],b,this.index,this.chart.isCombo),"y":d?e:f.getPixelForValue(this.getDataset().data[b],b,this.index),"radius":d?0:a.custom&&a.custom.radius?a.custom.radius:this.getRadius(this.getDataset().data[b]),"backgroundColor":a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.point.backgroundColor),"borderColor":a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.point.borderColor),"borderWidth":a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.point.borderWidth),"hitRadius":a.custom&&a.custom.hitRadius?a.custom.hitRadius:c.getValueAtIndexOrDefault(this.getDataset().hitRadius,b,this.chart.options.elements.point.hitRadius)}}),a._model.skip=a.custom&&a.custom.skip?a.custom.skip:isNaN(a._model.x)||isNaN(a._model.y),a.pivot()},"getRadius":function(a){return a.r||this.chart.options.elements.point.radius},"draw":function(a){var b=a||1;c.each(this.getDataset().metaData,function(a,c){a.transition(b),a.draw()},this)},"setHoverStyle":function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index;a._model.radius=a.custom&&a.custom.hoverRadius?a.custom.hoverRadius:c.getValueAtIndexOrDefault(b.hoverRadius,d,this.chart.options.elements.point.hoverRadius)+this.getRadius(this.getDataset().data[a._index]),a._model.backgroundColor=a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(b.hoverBackgroundColor,d,c.color(a._model.backgroundColor).saturate(.5).darken(.1).rgbString()),a._model.borderColor=a.custom&&a.custom.hoverBorderColor?a.custom.hoverBorderColor:c.getValueAtIndexOrDefault(b.hoverBorderColor,d,c.color(a._model.borderColor).saturate(.5).darken(.1).rgbString()),a._model.borderWidth=a.custom&&a.custom.hoverBorderWidth?a.custom.hoverBorderWidth:c.getValueAtIndexOrDefault(b.hoverBorderWidth,d,a._model.borderWidth)},"removeHoverStyle":function(a){var b=(this.chart.data.datasets[a._datasetIndex],a._index);a._model.radius=a.custom&&a.custom.radius?a.custom.radius:this.getRadius(this.getDataset().data[a._index]),a._model.backgroundColor=a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.point.backgroundColor),a._model.borderColor=a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.point.borderColor),a._model.borderWidth=a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.point.borderWidth)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.doughnut={"animation":{"animateRotate":!0,"animateScale":!1},"aspectRatio":1,"hover":{"mode":"single"},"legendCallback":function(a){var b=[];if(b.push('
    '),a.data.datasets.length)for(var c=0;c'),a.data.labels[c]&&b.push(a.data.labels[c]),b.push("");return b.push("
"),b.join("")},"legend":{"labels":{"generateLabels":function(a){return a.labels.map(function(b,c){return{"text":b,"fillStyle":a.datasets[0].backgroundColor[c],"hidden":isNaN(a.datasets[0].data[c]),"index":c}})}},"onClick":function(a,b){c.each(this.chart.data.datasets,function(a){a.metaHiddenData=a.metaHiddenData||[];var c=b.index;isNaN(a.data[c])?isNaN(a.metaHiddenData[c])||(a.data[c]=a.metaHiddenData[c]):(a.metaHiddenData[c]=a.data[c],a.data[c]=NaN)}),this.chart.update()}},"cutoutPercentage":50,"tooltips":{"callbacks":{"title":function(){return""},"label":function(a,b){return b.labels[a.index]+": "+b.datasets[a.datasetIndex].data[a.index]}}}},b.defaults.pie=c.clone(b.defaults.doughnut),c.extend(b.defaults.pie,{"cutoutPercentage":0}),b.controllers.doughnut=b.controllers.pie=b.DatasetController.extend({"linkScales":function(){}, "addElements":function(){this.getDataset().metaData=this.getDataset().metaData||[],c.each(this.getDataset().data,function(a,c){this.getDataset().metaData[c]=this.getDataset().metaData[c]||new b.elements.Arc({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":c})},this)},"addElementAndReset":function(a,d){this.getDataset().metaData=this.getDataset().metaData||[];var e=new b.elements.Arc({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":a});d&&c.isArray(this.getDataset().backgroundColor)&&this.getDataset().backgroundColor.splice(a,0,d),this.updateElement(e,a,!0),this.getDataset().metaData.splice(a,0,e)},"getVisibleDatasetCount":function(){return c.where(this.chart.data.datasets,function(a){return c.isDatasetVisible(a)}).length},"getRingIndex":function(a){for(var b=0,d=0;a>d;++d)c.isDatasetVisible(this.chart.data.datasets[d])&&++b;return b},"update":function(a){var b=Math.min(this.chart.chartArea.right-this.chart.chartArea.left,this.chart.chartArea.bottom-this.chart.chartArea.top);this.chart.outerRadius=Math.max(b/2-this.chart.options.elements.arc.borderWidth/2,0),this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0),this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount(),this.getDataset().total=0,c.each(this.getDataset().data,function(a){isNaN(a)||(this.getDataset().total+=Math.abs(a))},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.getRingIndex(this.index),this.innerRadius=this.outerRadius-this.chart.radiusLength,c.each(this.getDataset().metaData,function(b,c){this.updateElement(b,c,a)},this)},"updateElement":function(a,b,d){var e=(this.chart.chartArea.left+this.chart.chartArea.right)/2,f=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,g={"x":e,"y":f,"startAngle":Math.PI*-.5,"endAngle":Math.PI*-.5,"circumference":this.chart.options.animation.animateRotate?0:this.calculateCircumference(this.getDataset().data[b]),"outerRadius":this.chart.options.animation.animateScale?0:this.outerRadius,"innerRadius":this.chart.options.animation.animateScale?0:this.innerRadius};c.extend(a,{"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":b,"_model":d?g:{"x":e,"y":f,"circumference":this.calculateCircumference(this.getDataset().data[b]),"outerRadius":this.outerRadius,"innerRadius":this.innerRadius,"backgroundColor":a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.arc.backgroundColor),"hoverBackgroundColor":a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,b,this.chart.options.elements.arc.hoverBackgroundColor),"borderWidth":a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.arc.borderWidth),"borderColor":a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.arc.borderColor),"label":c.getValueAtIndexOrDefault(this.getDataset().label,b,this.chart.data.labels[b])}}),d||(0===b?a._model.startAngle=Math.PI*-.5:a._model.startAngle=this.getDataset().metaData[b-1]._model.endAngle,a._model.endAngle=a._model.startAngle+a._model.circumference,b0&&!isNaN(a)?1.999999*Math.PI*(a/this.getDataset().total):0}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.line={"hover":{"mode":"label"},"scales":{"xAxes":[{"type":"category","id":"x-axis-0"}],"yAxes":[{"type":"linear","id":"y-axis-0"}]}},b.controllers.line=b.DatasetController.extend({"addElements":function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new b.elements.Line({"_chart":this.chart.chart,"_datasetIndex":this.index,"_points":this.getDataset().metaData}),c.each(this.getDataset().data,function(a,c){this.getDataset().metaData[c]=this.getDataset().metaData[c]||new b.elements.Point({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":c})},this)},"addElementAndReset":function(a){this.getDataset().metaData=this.getDataset().metaData||[];var c=new b.elements.Point({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":a});this.updateElement(c,a,!0),this.getDataset().metaData.splice(a,0,c),this.updateBezierControlPoints()},"update":function(a){var b,d=this.getDataset().metaDataset,e=this.getDataset().metaData,f=this.getScaleForId(this.getDataset().yAxisID);this.getScaleForId(this.getDataset().xAxisID);b=f.min<0&&f.max<0?f.getPixelForValue(f.max):f.min>0&&f.max>0?f.getPixelForValue(f.min):f.getPixelForValue(0),c.extend(d,{"_scale":f,"_datasetIndex":this.index,"_children":e,"_model":{"tension":d.custom&&d.custom.tension?d.custom.tension:c.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),"backgroundColor":d.custom&&d.custom.backgroundColor?d.custom.backgroundColor:this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,"borderWidth":d.custom&&d.custom.borderWidth?d.custom.borderWidth:this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,"borderColor":d.custom&&d.custom.borderColor?d.custom.borderColor:this.getDataset().borderColor||this.chart.options.elements.line.borderColor,"borderCapStyle":d.custom&&d.custom.borderCapStyle?d.custom.borderCapStyle:this.getDataset().borderCapStyle||this.chart.options.elements.line.borderCapStyle,"borderDash":d.custom&&d.custom.borderDash?d.custom.borderDash:this.getDataset().borderDash||this.chart.options.elements.line.borderDash,"borderDashOffset":d.custom&&d.custom.borderDashOffset?d.custom.borderDashOffset:this.getDataset().borderDashOffset||this.chart.options.elements.line.borderDashOffset,"borderJoinStyle":d.custom&&d.custom.borderJoinStyle?d.custom.borderJoinStyle:this.getDataset().borderJoinStyle||this.chart.options.elements.line.borderJoinStyle,"fill":d.custom&&d.custom.fill?d.custom.fill:void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,"scaleTop":f.top,"scaleBottom":f.bottom,"scaleZero":b}}),d.pivot(),c.each(e,function(b,c){this.updateElement(b,c,a)},this),this.updateBezierControlPoints()},"getPointBackgroundColor":function(a,b){var d=this.chart.options.elements.point.backgroundColor,e=this.getDataset();return a.custom&&a.custom.backgroundColor?d=a.custom.backgroundColor:e.pointBackgroundColor?d=c.getValueAtIndexOrDefault(e.pointBackgroundColor,b,d):e.backgroundColor&&(d=e.backgroundColor),d},"getPointBorderColor":function(a,b){var d=this.chart.options.elements.point.borderColor,e=this.getDataset();return a.custom&&a.custom.borderColor?d=a.custom.borderColor:e.pointBorderColor?d=c.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,b,d):e.borderColor&&(d=e.borderColor),d},"getPointBorderWidth":function(a,b){var d=this.chart.options.elements.point.borderWidth,e=this.getDataset();return a.custom&&void 0!==a.custom.borderWidth?d=a.custom.borderWidth:void 0!==e.pointBorderWidth?d=c.getValueAtIndexOrDefault(e.pointBorderWidth,b,d):void 0!==e.borderWidth&&(d=e.borderWidth),d},"updateElement":function(a,b,d){var e,f=this.getScaleForId(this.getDataset().yAxisID),g=this.getScaleForId(this.getDataset().xAxisID);e=f.min<0&&f.max<0?f.getPixelForValue(f.max):f.min>0&&f.max>0?f.getPixelForValue(f.min):f.getPixelForValue(0),c.extend(a,{"_chart":this.chart.chart,"_xScale":g,"_yScale":f,"_datasetIndex":this.index,"_index":b,"_model":{"x":g.getPixelForValue(this.getDataset().data[b],b,this.index,this.chart.isCombo),"y":d?e:this.calculatePointY(this.getDataset().data[b],b,this.index,this.chart.isCombo),"tension":a.custom&&a.custom.tension?a.custom.tension:c.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),"radius":a.custom&&a.custom.radius?a.custom.radius:c.getValueAtIndexOrDefault(this.getDataset().radius,b,this.chart.options.elements.point.radius),"backgroundColor":this.getPointBackgroundColor(a,b),"borderColor":this.getPointBorderColor(a,b),"borderWidth":this.getPointBorderWidth(a,b),"hitRadius":a.custom&&a.custom.hitRadius?a.custom.hitRadius:c.getValueAtIndexOrDefault(this.getDataset().hitRadius,b,this.chart.options.elements.point.hitRadius)}}),a._model.skip=a.custom&&a.custom.skip?a.custom.skip:isNaN(a._model.x)||isNaN(a._model.y)},"calculatePointY":function(a,b,d,e){var f=(this.getScaleForId(this.getDataset().xAxisID),this.getScaleForId(this.getDataset().yAxisID));if(f.options.stacked){for(var g=0,h=0,i=this.chart.data.datasets.length-1;i>d;i--){var j=this.chart.data.datasets[i];c.isDatasetVisible(j)&&(j.data[b]<0?h+=j.data[b]||0:g+=j.data[b]||0)}return 0>a?f.getPixelForValue(h+a):f.getPixelForValue(g+a)}return f.getPixelForValue(a)},"updateBezierControlPoints":function(){c.each(this.getDataset().metaData,function(a,b){var d=c.splineCurve(c.previousItem(this.getDataset().metaData,b)._model,a._model,c.nextItem(this.getDataset().metaData,b)._model,a._model.tension);a._model.controlPointPreviousX=Math.max(Math.min(d.previous.x,this.chart.chartArea.right),this.chart.chartArea.left),a._model.controlPointPreviousY=Math.max(Math.min(d.previous.y,this.chart.chartArea.bottom),this.chart.chartArea.top),a._model.controlPointNextX=Math.max(Math.min(d.next.x,this.chart.chartArea.right),this.chart.chartArea.left),a._model.controlPointNextY=Math.max(Math.min(d.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top),a.pivot()},this)},"draw":function(a){var b=a||1;c.each(this.getDataset().metaData,function(a,c){a.transition(b)},this),this.getDataset().metaDataset.transition(b).draw(),c.each(this.getDataset().metaData,function(a){a.draw()})},"setHoverStyle":function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index;a._model.radius=a.custom&&a.custom.hoverRadius?a.custom.hoverRadius:c.getValueAtIndexOrDefault(b.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius),a._model.backgroundColor=a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(b.pointHoverBackgroundColor,d,c.color(a._model.backgroundColor).saturate(.5).darken(.1).rgbString()),a._model.borderColor=a.custom&&a.custom.hoverBorderColor?a.custom.hoverBorderColor:c.getValueAtIndexOrDefault(b.pointHoverBorderColor,d,c.color(a._model.borderColor).saturate(.5).darken(.1).rgbString()),a._model.borderWidth=a.custom&&a.custom.hoverBorderWidth?a.custom.hoverBorderWidth:c.getValueAtIndexOrDefault(b.pointHoverBorderWidth,d,a._model.borderWidth)},"removeHoverStyle":function(a){var b=(this.chart.data.datasets[a._datasetIndex],a._index);a._model.radius=a.custom&&a.custom.radius?a.custom.radius:c.getValueAtIndexOrDefault(this.getDataset().radius,b,this.chart.options.elements.point.radius),a._model.backgroundColor=this.getPointBackgroundColor(a,b),a._model.borderColor=this.getPointBorderColor(a,b),a._model.borderWidth=this.getPointBorderWidth(a,b)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.polarArea={"scale":{"type":"radialLinear","lineArc":!0},"animateRotate":!0,"animateScale":!0,"aspectRatio":1,"legendCallback":function(a){var b=[];if(b.push('
    '),a.data.datasets.length)for(var c=0;c'),a.data.labels[c]&&b.push(a.data.labels[c]),b.push("");return b.push("
"),b.join("")},"legend":{"labels":{"generateLabels":function(a){return a.labels.map(function(b,c){return{"text":b,"fillStyle":a.datasets[0].backgroundColor[c],"hidden":isNaN(a.datasets[0].data[c]),"index":c}})}},"onClick":function(a,b){c.each(this.chart.data.datasets,function(a){a.metaHiddenData=a.metaHiddenData||[];var c=b.index;isNaN(a.data[c])?isNaN(a.metaHiddenData[c])||(a.data[c]=a.metaHiddenData[c]):(a.metaHiddenData[c]=a.data[c],a.data[c]=NaN)}),this.chart.update()}},"tooltips":{"callbacks":{"title":function(){return""},"label":function(a,b){return b.labels[a.index]+": "+a.yLabel}}}},b.controllers.polarArea=b.DatasetController.extend({"linkScales":function(){},"addElements":function(){this.getDataset().metaData=this.getDataset().metaData||[],c.each(this.getDataset().data,function(a,c){this.getDataset().metaData[c]=this.getDataset().metaData[c]||new b.elements.Arc({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":c})},this)},"addElementAndReset":function(a){this.getDataset().metaData=this.getDataset().metaData||[];var c=new b.elements.Arc({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":a});this.updateElement(c,a,!0),this.getDataset().metaData.splice(a,0,c)},"getVisibleDatasetCount":function(){return c.where(this.chart.data.datasets,function(a){return c.isDatasetVisible(a)}).length},"update":function(a){var b=Math.min(this.chart.chartArea.right-this.chart.chartArea.left,this.chart.chartArea.bottom-this.chart.chartArea.top);this.chart.outerRadius=Math.max((b-this.chart.options.elements.arc.borderWidth/2)/2,0),this.chart.innerRadius=Math.max(this.chart.options.cutoutPercentage?this.chart.outerRadius/100*this.chart.options.cutoutPercentage:1,0),this.chart.radiusLength=(this.chart.outerRadius-this.chart.innerRadius)/this.getVisibleDatasetCount(),this.getDataset().total=0,c.each(this.getDataset().data,function(a){this.getDataset().total+=Math.abs(a)},this),this.outerRadius=this.chart.outerRadius-this.chart.radiusLength*this.index,this.innerRadius=this.outerRadius-this.chart.radiusLength,c.each(this.getDataset().metaData,function(b,c){this.updateElement(b,c,a)},this)},"updateElement":function(a,b,d){for(var e=this.calculateCircumference(this.getDataset().data[b]),f=(this.chart.chartArea.left+this.chart.chartArea.right)/2,g=(this.chart.chartArea.top+this.chart.chartArea.bottom)/2,h=0,i=0;b>i;++i)isNaN(this.getDataset().data[i])||++h;var j=-.5*Math.PI+e*h,k=j+e,l={"x":f,"y":g,"innerRadius":0,"outerRadius":this.chart.options.animateScale?0:this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[b]),"startAngle":this.chart.options.animateRotate?Math.PI*-.5:j,"endAngle":this.chart.options.animateRotate?Math.PI*-.5:k,"backgroundColor":a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.arc.backgroundColor),"hoverBackgroundColor":a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,b,this.chart.options.elements.arc.hoverBackgroundColor),"borderWidth":a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.arc.borderWidth),"borderColor":a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.arc.borderColor),"label":c.getValueAtIndexOrDefault(this.chart.data.labels,b,this.chart.data.labels[b])};c.extend(a,{"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":b,"_scale":this.chart.scale,"_model":d?l:{"x":f,"y":g,"innerRadius":0,"outerRadius":this.chart.scale.getDistanceFromCenterForValue(this.getDataset().data[b]),"startAngle":j,"endAngle":k,"backgroundColor":a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.arc.backgroundColor),"hoverBackgroundColor":a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(this.getDataset().hoverBackgroundColor,b,this.chart.options.elements.arc.hoverBackgroundColor),"borderWidth":a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.arc.borderWidth),"borderColor":a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.arc.borderColor),"label":c.getValueAtIndexOrDefault(this.chart.data.labels,b,this.chart.data.labels[b])}}),a.pivot()},"draw":function(a){var b=a||1;c.each(this.getDataset().metaData,function(a,c){a.transition(b).draw()},this)},"setHoverStyle":function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index;a._model.backgroundColor=a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(b.hoverBackgroundColor,d,c.color(a._model.backgroundColor).saturate(.5).darken(.1).rgbString()),a._model.borderColor=a.custom&&a.custom.hoverBorderColor?a.custom.hoverBorderColor:c.getValueAtIndexOrDefault(b.hoverBorderColor,d,c.color(a._model.borderColor).saturate(.5).darken(.1).rgbString()),a._model.borderWidth=a.custom&&a.custom.hoverBorderWidth?a.custom.hoverBorderWidth:c.getValueAtIndexOrDefault(b.borderWidth,d,a._model.borderWidth)},"removeHoverStyle":function(a){var b=(this.chart.data.datasets[a._datasetIndex],a._index);a._model.backgroundColor=a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().backgroundColor,b,this.chart.options.elements.arc.backgroundColor),a._model.borderColor=a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().borderColor,b,this.chart.options.elements.arc.borderColor),a._model.borderWidth=a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().borderWidth,b,this.chart.options.elements.arc.borderWidth)},"calculateCircumference":function(a){if(isNaN(a))return 0;var b=c.where(this.getDataset().data,function(a){return isNaN(a)}).length;return 2*Math.PI/(this.getDataset().data.length-b)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.radar={"scale":{"type":"radialLinear"},"elements":{"line":{"tension":0}}},b.controllers.radar=b.DatasetController.extend({"linkScales":function(){},"addElements":function(){this.getDataset().metaData=this.getDataset().metaData||[],this.getDataset().metaDataset=this.getDataset().metaDataset||new b.elements.Line({"_chart":this.chart.chart,"_datasetIndex":this.index,"_points":this.getDataset().metaData,"_loop":!0}),c.each(this.getDataset().data,function(a,c){this.getDataset().metaData[c]=this.getDataset().metaData[c]||new b.elements.Point({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":c,"_model":{"x":0,"y":0}})},this)},"addElementAndReset":function(a){this.getDataset().metaData=this.getDataset().metaData||[];var c=new b.elements.Point({"_chart":this.chart.chart,"_datasetIndex":this.index,"_index":a});this.updateElement(c,a,!0),this.getDataset().metaData.splice(a,0,c),this.updateBezierControlPoints()},"update":function(a){var b,d=(this.getDataset().metaDataset,this.getDataset().metaData),e=this.chart.scale;b=e.min<0&&e.max<0?e.getPointPositionForValue(0,e.max):e.min>0&&e.max>0?e.getPointPositionForValue(0,e.min):e.getPointPositionForValue(0,0),c.extend(this.getDataset().metaDataset,{"_datasetIndex":this.index,"_children":this.getDataset().metaData,"_model":{"tension":c.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),"backgroundColor":this.getDataset().backgroundColor||this.chart.options.elements.line.backgroundColor,"borderWidth":this.getDataset().borderWidth||this.chart.options.elements.line.borderWidth,"borderColor":this.getDataset().borderColor||this.chart.options.elements.line.borderColor,"fill":void 0!==this.getDataset().fill?this.getDataset().fill:this.chart.options.elements.line.fill,"scaleTop":e.top,"scaleBottom":e.bottom,"scaleZero":b}}),this.getDataset().metaDataset.pivot(),c.each(d,function(b,c){this.updateElement(b,c,a)},this),this.updateBezierControlPoints()},"updateElement":function(a,b,d){var e=this.chart.scale.getPointPositionForValue(b,this.getDataset().data[b]);c.extend(a,{"_datasetIndex":this.index,"_index":b,"_scale":this.chart.scale,"_model":{"x":d?this.chart.scale.xCenter:e.x,"y":d?this.chart.scale.yCenter:e.y,"tension":a.custom&&a.custom.tension?a.custom.tension:c.getValueOrDefault(this.getDataset().tension,this.chart.options.elements.line.tension),"radius":a.custom&&a.custom.radius?a.custom.pointRadius:c.getValueAtIndexOrDefault(this.getDataset().pointRadius,b,this.chart.options.elements.point.radius),"backgroundColor":a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,b,this.chart.options.elements.point.backgroundColor),"borderColor":a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,b,this.chart.options.elements.point.borderColor),"borderWidth":a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,b,this.chart.options.elements.point.borderWidth),"hitRadius":a.custom&&a.custom.hitRadius?a.custom.hitRadius:c.getValueAtIndexOrDefault(this.getDataset().hitRadius,b,this.chart.options.elements.point.hitRadius)}}),a._model.skip=a.custom&&a.custom.skip?a.custom.skip:isNaN(a._model.x)||isNaN(a._model.y)},"updateBezierControlPoints":function(){c.each(this.getDataset().metaData,function(a,b){var d=c.splineCurve(c.previousItem(this.getDataset().metaData,b,!0)._model,a._model,c.nextItem(this.getDataset().metaData,b,!0)._model,a._model.tension);a._model.controlPointPreviousX=Math.max(Math.min(d.previous.x,this.chart.chartArea.right),this.chart.chartArea.left),a._model.controlPointPreviousY=Math.max(Math.min(d.previous.y,this.chart.chartArea.bottom),this.chart.chartArea.top),a._model.controlPointNextX=Math.max(Math.min(d.next.x,this.chart.chartArea.right),this.chart.chartArea.left),a._model.controlPointNextY=Math.max(Math.min(d.next.y,this.chart.chartArea.bottom),this.chart.chartArea.top),a.pivot()},this)},"draw":function(a){var b=a||1;c.each(this.getDataset().metaData,function(a,c){a.transition(b)},this),this.getDataset().metaDataset.transition(b).draw(),c.each(this.getDataset().metaData,function(a){a.draw()})},"setHoverStyle":function(a){var b=this.chart.data.datasets[a._datasetIndex],d=a._index;a._model.radius=a.custom&&a.custom.radius?a.custom.radius:c.getValueAtIndexOrDefault(b.pointHoverRadius,d,this.chart.options.elements.point.hoverRadius),a._model.backgroundColor=a.custom&&a.custom.hoverBackgroundColor?a.custom.hoverBackgroundColor:c.getValueAtIndexOrDefault(b.pointHoverBackgroundColor,d,c.color(a._model.backgroundColor).saturate(.5).darken(.1).rgbString()),a._model.borderColor=a.custom&&a.custom.hoverBorderColor?a.custom.hoverBorderColor:c.getValueAtIndexOrDefault(b.pointHoverBorderColor,d,c.color(a._model.borderColor).saturate(.5).darken(.1).rgbString()),a._model.borderWidth=a.custom&&a.custom.hoverBorderWidth?a.custom.hoverBorderWidth:c.getValueAtIndexOrDefault(b.pointBorderWidth,d,a._model.borderWidth)},"removeHoverStyle":function(a){var b=(this.chart.data.datasets[a._datasetIndex],a._index);a._model.radius=a.custom&&a.custom.radius?a.custom.radius:c.getValueAtIndexOrDefault(this.getDataset().radius,b,this.chart.options.elements.point.radius),a._model.backgroundColor=a.custom&&a.custom.backgroundColor?a.custom.backgroundColor:c.getValueAtIndexOrDefault(this.getDataset().pointBackgroundColor,b,this.chart.options.elements.point.backgroundColor),a._model.borderColor=a.custom&&a.custom.borderColor?a.custom.borderColor:c.getValueAtIndexOrDefault(this.getDataset().pointBorderColor,b,this.chart.options.elements.point.borderColor),a._model.borderWidth=a.custom&&a.custom.borderWidth?a.custom.borderWidth:c.getValueAtIndexOrDefault(this.getDataset().pointBorderWidth,b,this.chart.options.elements.point.borderWidth)}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=(b.helpers,{"position":"bottom"}),d=b.Scale.extend({"buildTicks":function(a){this.ticks=this.chart.data.labels},"getLabelForIndex":function(a,b){return this.ticks[a]},"getPixelForValue":function(a,b,c,d){if(this.isHorizontal()){var e=this.width-(this.paddingLeft+this.paddingRight),f=e/Math.max(this.chart.data.labels.length-(this.options.gridLines.offsetGridLines?0:1),1),g=f*b+this.paddingLeft;return this.options.gridLines.offsetGridLines&&d&&(g+=f/2),this.left+Math.round(g)}var h=this.height-(this.paddingTop+this.paddingBottom),i=h/Math.max(this.chart.data.labels.length-(this.options.gridLines.offsetGridLines?0:1),1),j=i*b+this.paddingTop;return this.options.gridLines.offsetGridLines&&d&&(j+=i/2),this.top+Math.round(j)}});b.scaleService.registerScaleType("category",d,c)}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"position":"left","ticks":{"callback":function(a,b,d){var e=d[1]-d[0];Math.abs(e)>1&&a!==Math.floor(a)&&(e=a-Math.floor(a));var f=c.log10(Math.abs(e)),g="";if(0!==a){var h=-1*Math.floor(f);h=Math.max(Math.min(h,20),0),g=a.toFixed(h)}else g="0";return g}}},e=b.Scale.extend({"determineDataLimits":function(){if(this.min=null,this.max=null,this.options.stacked){var a={};c.each(this.chart.data.datasets,function(b){void 0===a[b.type]&&(a[b.type]={"positiveValues":[],"negativeValues":[]});var d=a[b.type].positiveValues,e=a[b.type].negativeValues;c.isDatasetVisible(b)&&(this.isHorizontal()?b.xAxisID===this.id:b.yAxisID===this.id)&&c.each(b.data,function(a,b){var c=+this.getRightValue(a);isNaN(c)||(d[b]=d[b]||0,e[b]=e[b]||0,this.options.relativePoints?d[b]=100:0>c?e[b]+=c:d[b]+=c)},this)},this),c.each(a,function(a){var b=a.positiveValues.concat(a.negativeValues),d=c.min(b),e=c.max(b);this.min=null===this.min?d:Math.min(this.min,d),this.max=null===this.max?e:Math.max(this.max,e)},this)}else c.each(this.chart.data.datasets,function(a){c.isDatasetVisible(a)&&(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&c.each(a.data,function(a,b){var c=+this.getRightValue(a);isNaN(c)||(null===this.min?this.min=c:cthis.max&&(this.max=c))},this)},this);if(this.options.ticks.beginAtZero){var b=c.sign(this.min),d=c.sign(this.max);0>b&&0>d?this.max=0:b>0&&d>0&&(this.min=0)}void 0!==this.options.ticks.min?this.min=this.options.ticks.min:void 0!==this.options.ticks.suggestedMin&&(this.min=Math.min(this.min,this.options.ticks.suggestedMin)),void 0!==this.options.ticks.max?this.max=this.options.ticks.max:void 0!==this.options.ticks.suggestedMax&&(this.max=Math.max(this.max,this.options.ticks.suggestedMax)),this.min===this.max&&(this.min--,this.max++)},"buildTicks":function(){this.ticks=[];var a;a=this.isHorizontal()?Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.width/50)):Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.height/(2*this.options.ticks.fontSize))),a=Math.max(2,a);var b=c.niceNum(this.max-this.min,!1),d=c.niceNum(b/(a-1),!0),e=Math.floor(this.min/d)*d,f=Math.ceil(this.max/d)*d,g=Math.ceil((f-e)/d);this.ticks.push(void 0!==this.options.ticks.min?this.options.ticks.min:e);for(var h=1;g>h;++h)this.ticks.push(e+h*d);this.ticks.push(void 0!==this.options.ticks.max?this.options.ticks.max:f),("left"==this.options.position||"right"==this.options.position)&&this.ticks.reverse(),this.max=c.max(this.ticks),this.min=c.min(this.ticks),this.ticksAsNumbers=this.ticks.slice(),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),this.zeroLineIndex=this.ticks.indexOf(0)},"getLabelForIndex":function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},"getPixelForValue":function(a,b,c,d){var e,f=+this.getRightValue(a),g=this.end-this.start;if(this.isHorizontal()){var h=this.width-(this.paddingLeft+this.paddingRight);return e=this.left+h/g*(f-this.start),Math.round(e+this.paddingLeft)}var i=this.height-(this.paddingTop+this.paddingBottom);return e=this.bottom-this.paddingBottom-i/g*(f-this.start),Math.round(e)},"getPixelForTick":function(a,b){return this.getPixelForValue(this.ticksAsNumbers[a],null,null,b)}});b.scaleService.registerScaleType("linear",e,d)}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"position":"left","ticks":{"callback":function(a,c,d){var e=a/Math.pow(10,Math.floor(b.helpers.log10(a)));return 1===e||2===e||5===e||0===c||c===d.length-1?a.toExponential():""}}},e=b.Scale.extend({"determineDataLimits":function(){if(this.min=null,this.max=null,this.options.stacked){var a={};c.each(this.chart.data.datasets,function(b){c.isDatasetVisible(b)&&(this.isHorizontal()?b.xAxisID===this.id:b.yAxisID===this.id)&&(void 0===a[b.type]&&(a[b.type]=[]),c.each(b.data,function(c,d){var e=a[b.type],f=+this.getRightValue(c);isNaN(f)||(e[d]=e[d]||0,this.options.relativePoints?e[d]=100:e[d]+=f)},this))},this),c.each(a,function(a){var b=c.min(a),d=c.max(a);this.min=null===this.min?b:Math.min(this.min,b),this.max=null===this.max?d:Math.max(this.max,d)},this)}else c.each(this.chart.data.datasets,function(a){c.isDatasetVisible(a)&&(this.isHorizontal()?a.xAxisID===this.id:a.yAxisID===this.id)&&c.each(a.data,function(a,b){var c=+this.getRightValue(a);isNaN(c)||(null===this.min?this.min=c:cthis.max&&(this.max=c))},this)},this);this.min=void 0!==this.options.ticks.min?this.options.ticks.min:this.min,this.max=void 0!==this.options.ticks.max?this.options.ticks.max:this.max,this.min===this.max&&(0!==this.min&&null!==this.min?(this.min=Math.pow(10,Math.floor(c.log10(this.min))-1),this.max=Math.pow(10,Math.floor(c.log10(this.max))+1)):(this.min=1,this.max=10))},"buildTicks":function(){this.tickValues=[];for(var a=void 0!==this.options.ticks.min?this.options.ticks.min:Math.pow(10,Math.floor(c.log10(this.min)));athis.max&&(this.max=c))},this)},this),this.min===this.max&&(this.min--,this.max++),this.options.ticks.beginAtZero){var a=c.sign(this.min),b=c.sign(this.max);0>a&&0>b?this.max=0:a>0&&b>0&&(this.min=0)}},"buildTicks":function(){this.ticks=[];var a=Math.min(this.options.ticks.maxTicksLimit?this.options.ticks.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*this.options.ticks.fontSize)));a=Math.max(2,a);for(var b=c.niceNum(this.max-this.min,!1),d=c.niceNum(b/(a-1),!0),e=Math.floor(this.min/d)*d,f=Math.ceil(this.max/d)*d,g=e;f>=g;g+=d)this.ticks.push(g);this.max=c.max(this.ticks),this.min=c.min(this.ticks),this.options.ticks.reverse?(this.ticks.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),this.zeroLineIndex=this.ticks.indexOf(0)},"getLabelForIndex":function(a,b){return+this.getRightValue(this.chart.data.datasets[b].data[a])},"getCircumference":function(){return 2*Math.PI/this.getValueCount()},"fit":function(){var a,b,d,e,f,g,h,i,j,k,l,m,n=c.min([this.height/2-this.options.pointLabels.fontSize-5,this.width/2]),o=this.width,p=0;for(this.ctx.font=c.fontString(this.options.pointLabels.fontSize,this.options.pointLabels.fontStyle,this.options.pointLabels.fontFamily),b=0;bo&&(o=a.x+e,f=b),a.x-eo&&(o=a.x+d,f=b):b>this.getValueCount()/2&&a.x-d0||this.options.reverse){var e=this.getDistanceFromCenterForValue(this.ticks[d]),f=this.yCenter-e;if(this.options.gridLines.display)if(a.strokeStyle=this.options.gridLines.color,a.lineWidth=this.options.gridLines.lineWidth,this.options.lineArc)a.beginPath(),a.arc(this.xCenter,this.yCenter,e,0,2*Math.PI),a.closePath(),a.stroke();else{a.beginPath();for(var g=0;g=0;b--){if(this.options.angleLines.display){var d=this.getPointPosition(b,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max));a.beginPath(),a.moveTo(this.xCenter,this.yCenter),a.lineTo(d.x,d.y),a.stroke(),a.closePath()}var e=this.getPointPosition(b,this.getDistanceFromCenterForValue(this.options.reverse?this.min:this.max)+5);a.font=c.fontString(this.options.pointLabels.fontSize,this.options.pointLabels.fontStyle,this.options.pointLabels.fontFamily),a.fillStyle=this.options.pointLabels.fontColor;var f=this.chart.data.labels.length,g=this.chart.data.labels.length/2,h=g/2,i=h>b||b>f-h,j=b===h||b===f-h;0===b?a.textAlign="center":b===g?a.textAlign="center":g>b?a.textAlign="left":a.textAlign="right",j?a.textBaseline="middle":i?a.textBaseline="bottom":a.textBaseline="top",a.fillText(this.chart.data.labels[b],e.x,e.y)}}}}});b.scaleService.registerScaleType("radialLinear",e,d)}.call(this),function(a){"use strict";if(!a)return void console.warn("Chart.js - Moment.js could not be found! You must include it before Chart.js to use the time scale. Download at http://momentjs.com/");var b=this,c=b.Chart,d=c.helpers,e={"units":[{"name":"millisecond","steps":[1,2,5,10,20,50,100,250,500]},{"name":"second","steps":[1,2,5,10,30]},{"name":"minute","steps":[1,2,5,10,30]},{"name":"hour","steps":[1,2,3,6,12]},{"name":"day","steps":[1,2,5]},{"name":"week","maxStep":4},{"name":"month","maxStep":3},{"name":"quarter","maxStep":4},{"name":"year","maxStep":!1}]},f={"position":"bottom","time":{"format":!1,"unit":!1,"round":!1,"displayFormat":!1,"displayFormats":{"millisecond":"SSS [ms]","second":"h:mm:ss a","minute":"h:mm:ss a","hour":"MMM D, hA","day":"ll","week":"ll","month":"MMM YYYY","quarter":"[Q]Q - YYYY","year":"YYYY"}}},g=c.Scale.extend({"getLabelMoment":function(a,b){return this.labelMoments[a][b]},"determineDataLimits":function(){this.labelMoments=[];var b=[];this.chart.data.labels&&this.chart.data.labels.length>0?(d.each(this.chart.data.labels,function(a,c){var d=this.parseTime(a);this.options.time.round&&d.startOf(this.options.time.round),b.push(d)},this),this.options.time.min?this.firstTick=this.parseTime(this.options.time.min):this.firstTick=a.min.call(this,b),this.options.time.max?this.lastTick=this.parseTime(this.options.time.max):this.lastTick=a.max.call(this,b)):(this.firstTick=null,this.lastTick=null),d.each(this.chart.data.datasets,function(c,e){var f=[];"object"==typeof c.data[0]?d.each(c.data,function(b,c){var d=this.parseTime(this.getRightValue(b));this.options.time.round&&d.startOf(this.options.time.round),f.push(d),this.firstTick=null!==this.firstTick?a.min(this.firstTick,d):d,this.lastTick=null!==this.lastTick?a.max(this.lastTick,d):d},this):f=b,this.labelMoments.push(f)},this),this.firstTick=(this.firstTick||a()).clone(),this.lastTick=(this.lastTick||a()).clone()},"buildTicks":function(a){if(this.ticks=[],this.unitScale=1,this.options.time.unit)this.tickUnit=this.options.time.unit||"day",this.displayFormat=this.options.time.displayFormats[this.tickUnit],this.tickRange=Math.ceil(this.lastTick.diff(this.firstTick,this.tickUnit,!0));else{var b=this.width-(this.paddingLeft+this.paddingRight),c=b/(this.options.ticks.fontSize+10),f=this.options.time.round?0:2;this.tickUnit="millisecond",this.tickRange=Math.ceil(this.lastTick.diff(this.firstTick,this.tickUnit,!0)+f),this.displayFormat=this.options.time.displayFormats[this.tickUnit];for(var g=0,h=e.units[g];gMath.ceil(this.tickRange/c)){this.unitScale=h.steps[i];break}break}if(h.maxStep===!1||Math.ceil(this.tickRange/c)1.5*Math.PI?d.startAngle-2*Math.PI:d.startAngle,g=d.endAngle<-.5*Math.PI?d.endAngle+2*Math.PI:d.endAngle>1.5*Math.PI?d.endAngle-2*Math.PI:d.endAngle,h=e.angle>=f&&e.angle<=g,i=e.distance>=d.innerRadius&&e.distance<=d.outerRadius;return h&&i}return!1},"tooltipPosition":function(){var a=this._view,b=a.startAngle+(a.endAngle-a.startAngle)/2,c=(a.outerRadius-a.innerRadius)/2+a.innerRadius;return{"x":a.x+Math.cos(b)*c,"y":a.y+Math.sin(b)*c}},"draw":function(){var a=this._chart.ctx,b=this._view;a.beginPath(),a.arc(b.x,b.y,b.outerRadius,b.startAngle,b.endAngle),a.arc(b.x,b.y,b.innerRadius,b.endAngle,b.startAngle,!0),a.closePath(),a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.fillStyle=b.backgroundColor,a.fill(),a.lineJoin="bevel",b.borderWidth&&a.stroke()}})}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers;b.defaults.global.elements.line={"tension":.4,"backgroundColor":b.defaults.global.defaultColor,"borderWidth":3,"borderColor":b.defaults.global.defaultColor,"borderCapStyle":"butt","borderDash":[],"borderDashOffset":0,"borderJoinStyle":"miter","fill":!0},b.elements.Line=b.Element.extend({"lineToNextPoint":function(a,b,c,d,e){var f=this._chart.ctx;b._view.skip?d.call(this,a,b,c):a._view.skip?e.call(this,a,b,c):0===b._view.tension?f.lineTo(b._view.x,b._view.y):f.bezierCurveTo(a._view.controlPointNextX,a._view.controlPointNextY,b._view.controlPointPreviousX,b._view.controlPointPreviousY,b._view.x,b._view.y)},"draw":function(){function a(a){g._view.skip||h._view.skip?a&&f.lineTo(d._view.scaleZero.x,d._view.scaleZero.y):f.bezierCurveTo(h._view.controlPointNextX,h._view.controlPointNextY,g._view.controlPointPreviousX,g._view.controlPointPreviousY,g._view.x,g._view.y)}var d=this,e=this._view,f=this._chart.ctx,g=this._children[0],h=this._children[this._children.length-1];f.save(),this._children.length>0&&e.fill&&(f.beginPath(),c.each(this._children,function(a,b){var d=c.previousItem(this._children,b),g=c.nextItem(this._children,b);0===b?(this._loop?f.moveTo(e.scaleZero.x,e.scaleZero.y):f.moveTo(a._view.x,e.scaleZero),a._view.skip?this._loop||f.moveTo(g._view.x,this._view.scaleZero):f.lineTo(a._view.x,a._view.y)):this.lineToNextPoint(d,a,g,function(a,b,c){this._loop?f.lineTo(this._view.scaleZero.x,this._view.scaleZero.y):(f.lineTo(a._view.x,this._view.scaleZero),f.moveTo(c._view.x,this._view.scaleZero))},function(a,b){f.lineTo(b._view.x,b._view.y)})},this),this._loop?a(!0):(f.lineTo(this._children[this._children.length-1]._view.x,e.scaleZero),f.lineTo(this._children[0]._view.x,e.scaleZero)),f.fillStyle=e.backgroundColor||b.defaults.global.defaultColor,f.closePath(),f.fill()),f.lineCap=e.borderCapStyle||b.defaults.global.elements.line.borderCapStyle,f.setLineDash&&f.setLineDash(e.borderDash||b.defaults.global.elements.line.borderDash),f.lineDashOffset=e.borderDashOffset||b.defaults.global.elements.line.borderDashOffset,f.lineJoin=e.borderJoinStyle||b.defaults.global.elements.line.borderJoinStyle,f.lineWidth=e.borderWidth||b.defaults.global.elements.line.borderWidth,f.strokeStyle=e.borderColor||b.defaults.global.defaultColor,f.beginPath(),c.each(this._children,function(a,b){var d=c.previousItem(this._children,b),e=c.nextItem(this._children,b);0===b?f.moveTo(a._view.x,a._view.y):this.lineToNextPoint(d,a,e,function(a,b,c){f.moveTo(c._view.x,c._view.y)},function(a,b){f.moveTo(b._view.x,b._view.y)})},this),this._loop&&this._children.length>0&&a(),f.stroke(),f.restore()}})}.call(this),function(){"use strict";var a=this,b=a.Chart;b.helpers;b.defaults.global.elements.point={"radius":3,"backgroundColor":b.defaults.global.defaultColor,"borderWidth":1,"borderColor":b.defaults.global.defaultColor,"hitRadius":1,"hoverRadius":4,"hoverBorderWidth":1},b.elements.Point=b.Element.extend({"inRange":function(a,b){var c=this._view;if(c){var d=c.hitRadius+c.radius;return Math.pow(a-c.x,2)+Math.pow(b-c.y,2)0||a.borderWidth>0)&&(c.beginPath(),c.arc(a.x,a.y,a.radius||b.defaults.global.elements.point.radius,0,2*Math.PI),c.closePath(),c.strokeStyle=a.borderColor||b.defaults.global.defaultColor,c.lineWidth=a.borderWidth||b.defaults.global.elements.point.borderWidth,c.fillStyle=a.backgroundColor||b.defaults.global.defaultColor,c.fill(),c.stroke())}})}.call(this),function(){"use strict";var a=this,b=a.Chart;b.helpers;b.defaults.global.elements.rectangle={"backgroundColor":b.defaults.global.defaultColor,"borderWidth":0,"borderColor":b.defaults.global.defaultColor},b.elements.Rectangle=b.Element.extend({"draw":function(){var a=this._chart.ctx,b=this._view,c=b.width/2,d=b.x-c,e=b.x+c,f=b.base-(b.base-b.y),g=b.borderWidth/2;b.borderWidth&&(d+=g,e-=g,f+=g),a.beginPath(),a.fillStyle=b.backgroundColor,a.strokeStyle=b.borderColor,a.lineWidth=b.borderWidth,a.moveTo(d,b.base),a.lineTo(d,f),a.lineTo(e,f),a.lineTo(e,b.base),a.fill(),b.borderWidth&&a.stroke()},"height":function(){var a=this._view;return a.base-a.y},"inRange":function(a,b){var c=this._view,d=!1;return c&&(d=c.y=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.y&&b<=c.base:a>=c.x-c.width/2&&a<=c.x+c.width/2&&b>=c.base&&b<=c.y),d},"inLabelRange":function(a){var b=this._view;return b?a>=b.x-b.width/2&&a<=b.x+b.width/2:!1},"tooltipPosition":function(){var a=this._view;return{"x":a.x,"y":a.y}}})}.call(this),function(){"use strict";var a=this,b=a.Chart;b.helpers;b.Bar=function(a,c){return c.type="bar",new b(a,c)}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=(b.helpers,{"hover":{"mode":"single"},"scales":{"xAxes":[{"type":"linear","position":"bottom","id":"x-axis-0"}],"yAxes":[{"type":"linear","position":"left","id":"y-axis-0"}]},"tooltips":{"callbacks":{"title":function(a,b){return""},"label":function(a,b){return"("+a.xLabel+", "+a.yLabel+")"}}}});b.defaults.bubble=c,b.Bubble=function(a,c){return c.type="bubble",new b(a,c)}}.call(this),function(){"use strict";var a=this,b=a.Chart;b.helpers;b.Doughnut=function(a,c){return c.type="doughnut",new b(a,c)}}.call(this),function(){"use strict";var a=this,b=a.Chart;b.helpers;b.Line=function(a,c){return c.type="line",new b(a,c)}}.call(this),function(){"use strict";var a=this,b=a.Chart;b.helpers;b.PolarArea=function(a,c){return c.type="polarArea",new b(a,c)}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=b.helpers,d={"aspectRatio":1};b.Radar=function(a,e){return e.options=c.configMerge(d,e.options),e.type="radar",new b(a,e)}}.call(this),function(){"use strict";var a=this,b=a.Chart,c=(b.helpers,{"hover":{"mode":"single"},"scales":{"xAxes":[{"type":"linear","position":"bottom","id":"x-axis-1"}],"yAxes":[{"type":"linear","position":"left","id":"y-axis-1"}]},"tooltips":{"callbacks":{"title":function(a,b){return""},"label":function(a,b){return"("+a.xLabel+", "+a.yLabel+")"}}}});b.defaults.scatter=c,b.controllers.scatter=b.controllers.line,b.Scatter=function(a,c){return c.type="scatter",new b(a,c)}}.call(this),Chart});