/*! For license information please see LICENSES */ (window.webpackJsonp=window.webpackJsonp||[]).push([[14],{1044:function(t,e,n){t.exports=function(t){"use strict";function e(t,e){return t(e={exports:{}},e.exports),e.exports}function n(t){return t&&t.default||t}t=t&&t.hasOwnProperty("default")?t.default:t;var r={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]},o=e((function(t){var e={};for(var n in r)r.hasOwnProperty(n)&&(e[r[n]]=n);var o=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var l in o)if(o.hasOwnProperty(l)){if(!("channels"in o[l]))throw new Error("missing channels property: "+l);if(!("labels"in o[l]))throw new Error("missing channel labels property: "+l);if(o[l].labels.length!==o[l].channels)throw new Error("channel and label counts mismatch: "+l);var d=o[l].channels,c=o[l].labels;delete o[l].channels,delete o[l].labels,Object.defineProperty(o[l],"channels",{value:d}),Object.defineProperty(o[l],"labels",{value:c})}function h(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2)}o.rgb.hsl=function(t){var e,n,r=t[0]/255,g=t[1]/255,b=t[2]/255,o=Math.min(r,g,b),l=Math.max(r,g,b),d=l-o;return l===o?e=0:r===l?e=(g-b)/d:g===l?e=2+(b-r)/d:b===l&&(e=4+(r-g)/d),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+l)/2,[e,100*(l===o?0:n<=.5?d/(l+o):d/(2-l-o)),100*n]},o.rgb.hsv=function(t){var e,n,r,o,s,l=t[0]/255,g=t[1]/255,b=t[2]/255,d=Math.max(l,g,b),c=d-Math.min(l,g,b),h=function(t){return(d-t)/6/c+.5};return 0===c?o=s=0:(s=c/d,e=h(l),n=h(g),r=h(b),l===d?o=r-n:g===d?o=1/3+e-r:b===d&&(o=2/3+n-e),o<0?o+=1:o>1&&(o-=1)),[360*o,100*s,100*d]},o.rgb.hwb=function(t){var e=t[0],g=t[1],b=t[2];return[o.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(g,b))*100,100*(b=1-1/255*Math.max(e,Math.max(g,b)))]},o.rgb.cmyk=function(t){var e,n=t[0]/255,g=t[1]/255,b=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-g,1-b)))/(1-e)||0),100*((1-g-e)/(1-e)||0),100*((1-b-e)/(1-e)||0),100*e]},o.rgb.keyword=function(t){var n=e[t];if(n)return n;var o,l=1/0;for(var d in r)if(r.hasOwnProperty(d)){var c=h(t,r[d]);c.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(g=g>.04045?Math.pow((g+.055)/1.055,2.4):g/12.92)+.1805*(b=b>.04045?Math.pow((b+.055)/1.055,2.4):b/12.92)),100*(.2126*e+.7152*g+.0722*b),100*(.0193*e+.1192*g+.9505*b)]},o.rgb.lab=function(t){var e=o.rgb.xyz(t),n=e[0],r=e[1],l=e[2];return r/=100,l/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(l=l>.008856?Math.pow(l,1/3):7.787*l+16/116))]},o.hsl.rgb=function(t){var e,n,r,o,l,d=t[0]/360,s=t[1]/100,c=t[2]/100;if(0===s)return[l=255*c,l,l];e=2*c-(n=c<.5?c*(1+s):c+s-c*s),o=[0,0,0];for(var i=0;i<3;i++)(r=d+1/3*-(i-1))<0&&r++,r>1&&r--,l=6*r<1?e+6*(n-e)*r:2*r<1?n:3*r<2?e+(n-e)*(2/3-r)*6:e,o[i]=255*l;return o},o.hsl.hsv=function(t){var e=t[0],s=t[1]/100,n=t[2]/100,r=s,o=Math.max(n,.01);return s*=(n*=2)<=1?n:2-n,r*=o<=1?o:2-o,[e,100*(0===n?2*r/(o+r):2*s/(n+s)),(n+s)/2*100]},o.hsv.rgb=function(t){var e=t[0]/60,s=t[1]/100,n=t[2]/100,r=Math.floor(e)%6,o=e-Math.floor(e),p=255*n*(1-s),q=255*n*(1-s*o),l=255*n*(1-s*(1-o));switch(n*=255,r){case 0:return[n,l,p];case 1:return[q,n,p];case 2:return[p,n,l];case 3:return[p,q,n];case 4:return[l,p,n];case 5:return[n,p,q]}},o.hsv.hsl=function(t){var e,n,r,o=t[0],s=t[1]/100,l=t[2]/100,d=Math.max(l,.01);return r=(2-s)*l,n=s*d,[o,100*(n=(n/=(e=(2-s)*d)<=1?e:2-e)||0),100*(r/=2)]},o.hwb.rgb=function(t){var i,e,n,r,o,g,b,l=t[0]/360,d=t[1]/100,c=t[2]/100,h=d+c;switch(h>1&&(d/=h,c/=h),n=6*l-(i=Math.floor(6*l)),0!=(1&i)&&(n=1-n),r=d+n*((e=1-c)-d),i){default:case 6:case 0:o=e,g=r,b=d;break;case 1:o=r,g=e,b=d;break;case 2:o=d,g=e,b=r;break;case 3:o=d,g=r,b=e;break;case 4:o=r,g=d,b=e;break;case 5:o=e,g=d,b=r}return[255*o,255*g,255*b]},o.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,r=t[2]/100,o=t[3]/100;return[255*(1-Math.min(1,e*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},o.xyz.rgb=function(t){var e,g,b,n=t[0]/100,r=t[1]/100,o=t[2]/100;return g=-.9689*n+1.8758*r+.0415*o,b=.0557*n+-.204*r+1.057*o,e=(e=3.2406*n+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:12.92*g,b=b>.0031308?1.055*Math.pow(b,1/2.4)-.055:12.92*b,[255*(e=Math.min(Math.max(0,e),1)),255*(g=Math.min(Math.max(0,g),1)),255*(b=Math.min(Math.max(0,b),1))]},o.xyz.lab=function(t){var e=t[0],n=t[1],r=t[2];return n/=100,r/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(t){var e,n,r,o=t[0];e=t[1]/500+(n=(o+16)/116),r=n-t[2]/200;var l=Math.pow(n,3),d=Math.pow(e,3),c=Math.pow(r,3);return n=l>.008856?l:(n-16/116)/7.787,e=d>.008856?d:(e-16/116)/7.787,r=c>.008856?c:(r-16/116)/7.787,[e*=95.047,n*=100,r*=108.883]},o.lab.lch=function(t){var e,n=t[0],a=t[1],b=t[2];return(e=360*Math.atan2(b,a)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(a*a+b*b),e]},o.lch.lab=function(t){var hr,e=t[0],n=t[1];return hr=t[2]/360*2*Math.PI,[e,n*Math.cos(hr),n*Math.sin(hr)]},o.rgb.ansi16=function(t){var e=t[0],g=t[1],b=t[2],n=1 in arguments?arguments[1]:o.rgb.hsv(t)[2];if(0===(n=Math.round(n/50)))return 30;var r=30+(Math.round(b/255)<<2|Math.round(g/255)<<1|Math.round(e/255));return 2===n&&(r+=60),r},o.hsv.ansi16=function(t){return o.rgb.ansi16(o.hsv.rgb(t),t[2])},o.rgb.ansi256=function(t){var e=t[0],g=t[1],b=t[2];return e===g&&g===b?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(g/255*5)+Math.round(b/255*5)},o.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},o.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},o.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(t){var e,n=t[0]/255,g=t[1]/255,b=t[2]/255,r=Math.max(Math.max(n,g),b),o=Math.min(Math.min(n,g),b),l=r-o;return e=l<=0?0:r===n?(g-b)/l%6:r===g?2+(b-n)/l:4+(n-g)/l+4,e/=6,[360*(e%=1),100*l,100*(l<1?o/(1-l):0)]},o.hsl.hcg=function(t){var s=t[1]/100,e=t[2]/100,n=1,r=0;return(n=e<.5?2*s*e:2*s*(1-e))<1&&(r=(e-.5*n)/(1-n)),[t[0],100*n,100*r]},o.hsv.hcg=function(t){var s=t[1]/100,e=t[2]/100,n=s*e,r=0;return n<1&&(r=(e-n)/(1-n)),[t[0],100*n,100*r]},o.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,g=t[2]/100;if(0===n)return[255*g,255*g,255*g];var r=[0,0,0],o=e%1*6,l=o%1,d=1-l,c=0;switch(Math.floor(o)){case 0:r[0]=1,r[1]=l,r[2]=0;break;case 1:r[0]=d,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=l;break;case 3:r[0]=0,r[1]=d,r[2]=1;break;case 4:r[0]=l,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=d}return c=(1-n)*g,[255*(n*r[0]+c),255*(n*r[1]+c),255*(n*r[2]+c)]},o.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),r=0;return n>0&&(r=e/n),[t[0],100*r,100*n]},o.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,s=0;return n>0&&n<.5?s=e/(2*n):n>=.5&&n<1&&(s=e/(2*(1-n))),[t[0],100*s,100*n]},o.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},o.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,r=n-e,g=0;return r<1&&(g=(n-r)/(1-r)),[t[0],100*r,100*g]},o.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},o.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},o.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},o.gray.hsl=o.gray.hsv=function(t){return[0,0,t[0]]},o.gray.hwb=function(t){return[0,100,t[0]]},o.gray.cmyk=function(t){return[0,0,0,t[0]]},o.gray.lab=function(t){return[t[0],0,0]},o.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function l(){for(var t={},e=Object.keys(o),n=e.length,i=0;i1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}function v(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var r=n.length,i=0;i=0&&a<1?B(Math.round(255*a)):"")}function D(t,e){return e<1||t[3]&&t[3]<1?T(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function T(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function I(t,e){return e<1||t[3]&&t[3]<1?F(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"}function F(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function O(t,e){return e<1||t[3]&&t[3]<1?L(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function L(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function R(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function z(t){return E[t.slice(0,3)]}function N(t,e,n){return Math.min(Math.max(e,t),n)}function B(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var E={};for(var W in y)E[y[W]]=W;var V=function(t){return t instanceof V?t:this instanceof V?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=_.getRgba(t))?this.setValues("rgb",e):(e=_.getHsla(t))?this.setValues("hsl",e):(e=_.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new V(t);var e};V.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return _.hexString(this.values.rgb)},rgbString:function(){return _.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return _.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return _.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return _.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return _.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return _.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return _.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],i=0;in?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],i=0;i<3;i++)t[i]=255-this.values.rgb[i];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,r=t,p=void 0===e?.5:e,o=2*p-1,a=n.alpha()-r.alpha(),l=((o*a==-1?o:(o+a)/(1+o*a))+1)/2,d=1-l;return this.rgb(l*n.red()+d*r.red(),l*n.green()+d*r.green(),l*n.blue()+d*r.blue()).alpha(n.alpha()*p+r.alpha()*(1-p))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new V,source=this.values,r=n.values;for(var o in source)source.hasOwnProperty(o)&&(t=source[o],"[object Array]"===(e={}.toString.call(t))?r[o]=t.slice(0):"[object Number]"===e?r[o]=t:console.error("unexpected color value:",t));return n}},V.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},V.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},V.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i=0;i--)e.call(n,t[i],i);else for(i=0;i=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var s=1.70158,p=0,a=1;return 0===t?0:1===t?1:(p||(p=.3),a<1?(a=1,s=p/4):s=p/(2*Math.PI)*Math.asin(1/a),-a*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/p))},easeOutElastic:function(t){var s=1.70158,p=0,a=1;return 0===t?0:1===t?1:(p||(p=.3),a<1?(a=1,s=p/4):s=p/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*t)*Math.sin((t-s)*(2*Math.PI)/p)+1)},easeInOutElastic:function(t){var s=1.70158,p=0,a=1;return 0===t?0:2==(t/=.5)?1:(p||(p=.45),a<1?(a=1,s=p/4):s=p/(2*Math.PI)*Math.asin(1/a),t<1?a*Math.pow(2,10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/p)*-.5:a*Math.pow(2,-10*(t-=1))*Math.sin((t-s)*(2*Math.PI)/p)*.5+1)},easeInBack:function(t){var s=1.70158;return t*t*((s+1)*t-s)},easeOutBack:function(t){var s=1.70158;return(t-=1)*t*((s+1)*t+s)+1},easeInOutBack:function(t){var s=1.70158;return(t/=.5)<1?t*t*((1+(s*=1.525))*t-s)*.5:.5*((t-=2)*t*((1+(s*=1.525))*t+s)+2)},easeInBounce:function(t){return 1-G.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*G.easeInBounce(2*t):.5*G.easeOutBounce(2*t-1)+.5}},X={effects:G};$.easingEffects=G;var K=Math.PI,Z=K/180,J=2*K,Q=K/2,tt=K/4,et=2*K/3,nt={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,r,o,l){if(l){var d=Math.min(l,o/2,r/2),c=e+d,h=n+d,f=e+r-d,m=n+o-d;t.moveTo(e,h),carea.left-e&&t.xarea.top-e&&t.y0&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,r,o=this.animations,i=0;i=n?(mt.callback(t.onAnimationComplete,[t],e),e.animating=!1,o.splice(i,1)):++i}},Pt=mt.options.resolve,At=["push","pop","shift","splice","unshift"];function Dt(t,e){t._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),At.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),base=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),r=base.apply(this,e);return mt.each(t._chartjs.listeners,(function(object){"function"==typeof object[n]&&object[n].apply(object,e)})),r}})})))}function Tt(t,e){var n=t._chartjs;if(n){var r=n.listeners,o=r.indexOf(e);-1!==o&&r.splice(o,1),r.length>0||(At.forEach((function(e){delete t[e]})),delete t._chartjs)}}var It=function(t,e){this.initialize(t,e)};mt.extend(It.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,meta=t.getMeta(),e=t.chart,n=e.scales,r=t.getDataset(),o=e.options.scales;null!==meta.xAxisID&&meta.xAxisID in n&&!r.xAxisID||(meta.xAxisID=r.xAxisID||o.xAxes[0].id),null!==meta.yAxisID&&meta.yAxisID in n&&!r.yAxisID||(meta.yAxisID=r.yAxisID||o.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&Tt(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var i,t,e=this,meta=e.getMeta(),data=e.getDataset().data||[],n=meta.data;for(i=0,t=data.length;ie&&t.insertElements(e,n-e)},insertElements:function(t,e){for(var i=0;io?(l=o/e.innerRadius,t.arc(d,c,e.innerRadius-o,r+l,n-l,!0)):t.arc(d,c,o,r+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function Rt(t,e,n,r){var i,o=n.endAngle;for(r&&(n.endAngle=n.startAngle+Ot,Lt(t,n),n.endAngle=o,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=Ot,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+Ot,n.startAngle,!0),i=0;ic;)o-=Ot;for(;o=d&&o<=c,f=l>=n.innerRadius&&l<=n.outerRadius;return h&&f}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var i,t=this._chart.ctx,e=this._view,n="inner"===e.borderAlign?.33:0,r={x:e.x,y:e.y,innerRadius:e.innerRadius,outerRadius:Math.max(e.outerRadius-n,0),pixelMargin:n,startAngle:e.startAngle,endAngle:e.endAngle,fullCircles:Math.floor(e.circumference/Ot)};if(t.save(),t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,r.fullCircles){for(r.endAngle=r.startAngle+Ot,t.beginPath(),t.arc(r.x,r.y,r.outerRadius,r.startAngle,r.endAngle),t.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),t.closePath(),i=0;it.x&&(e=Xt(e,"left","right")):t.basen?n:r,r:c.right||o<0?0:o>e?e:o,b:c.bottom||b<0?0:b>n?n:b,l:c.left||l<0?0:l>e?e:l}}function Jt(t){var e=Gt(t),n=e.right-e.left,r=e.bottom-e.top,o=Zt(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r},inner:{x:e.left+o.l,y:e.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b}}}function Qt(t,e,n){var r=null===e,o=null===n,l=!(!t||r&&o)&&Gt(t);return l&&(r||e>=l.left&&e<=l.right)&&(o||n>=l.top&&n<=l.bottom)}ot._set("global",{elements:{rectangle:{backgroundColor:Yt,borderColor:Yt,borderSkipped:"bottom",borderWidth:0}}});var te=wt.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=Jt(e),r=n.outer,o=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(r.x,r.y,r.w,r.h),r.w===o.w&&r.h===o.h||(t.save(),t.beginPath(),t.rect(r.x,r.y,r.w,r.h),t.clip(),t.fillStyle=e.borderColor,t.rect(o.x,o.y,o.w,o.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return Qt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return $t(n)?Qt(n,t,null):Qt(n,null,e)},inXRange:function(t){return Qt(this._view,t,null)},inYRange:function(t){return Qt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return $t(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return $t(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),ee={},ne=Nt,ae=Wt,ie=Ut,re=te;ee.Arc=ne,ee.Line=ae,ee.Point=ie,ee.Rectangle=re;var oe=mt._deprecated,se=mt.valueOrDefault;function le(t,e){var n,r,i,o,l=t._length;for(i=1,o=e.length;i0?Math.min(l,Math.abs(r-n)):l,n=r;return l}function ue(t,e,n){var r,o,l=n.barThickness,d=e.stackCount,c=e.pixels[t],h=mt.isNullOrUndef(l)?le(e.scale,e.pixels):-1;return mt.isNullOrUndef(l)?(r=h*n.categoryPercentage,o=n.barPercentage):(r=l*d,o=1),{chunk:r/d,ratio:o,start:c-r/2}}function de(t,e,n){var r,o=e.pixels,l=o[t],d=t>0?o[t-1]:null,c=t=0&&y.min>=0?y.min:y.max,S=void 0===y.start?y.end:y.max>=0&&y.min>=0?y.max-y.min:y.min-y.max,C=x.length;if(k||void 0===k&&void 0!==w)for(i=0;i=0&&d.max>=0?d.max:d.min,(y.min<0&&o<0||y.max>=0&&o>0)&&(M+=o));return base=f.getPixelForValue(M),l=(head=f.getPixelForValue(M+S))-base,void 0!==_&&Math.abs(l)<_&&(l=_,head=S>=0&&!m||S<0&&m?base-_:base+_),{size:l,base:base,head:head,center:head+l/2}},calculateBarIndexPixels:function(t,e,n,r){var o=this,l="flex"===r.barThickness?de(e,n,r):ue(e,n,r),d=o.getStackIndex(t,o.getMeta().stack),c=l.start+l.chunk*d+l.chunk/2,h=Math.min(se(r.maxBarThickness,1/0),l.chunk*l.ratio);return{base:c-h/2,head:c+h/2,center:c,size:h}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),r=t.getMeta().data,o=t.getDataset(),l=r.length,i=0;for(mt.canvas.clipArea(e.ctx,e.chartArea);i=me?-ve:w<-me?ve:0)+_,S=Math.cos(w),C=Math.sin(w),P=Math.cos(M),A=Math.sin(M),D=w<=0&&M>=0||M>=ve,T=w<=be&&M>=be||M>=ve+be,I=w<=-be&&M>=-be||M>=me+be,F=w===-me||M>=me?-1:Math.min(S,S*y,P,P*y),O=I?-1:Math.min(C,C*y,A,A*y),L=D?1:Math.max(S,S*y,P,P*y),R=T?1:Math.max(C,C*y,A,A*y);h=(L-F)/2,f=(R-O)/2,m=-(L+F)/2,v=-(R+O)/2}for(i=0,r=x.length;i0&&!isNaN(t)?ve*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var i,e,meta,n,r,o,l,d,c=this,h=0,f=c.chart;if(!t)for(i=0,e=f.data.datasets.length;i(h=l>h?l:h)?d:h);return h},setHoverStyle:function(t){var e=t._model,n=t._options,r=mt.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=pe(n.hoverBackgroundColor,r(n.backgroundColor)),e.borderColor=pe(n.hoverBorderColor,r(n.borderColor)),e.borderWidth=pe(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,i=0;i0&&we(d[i-1]._model,area)&&(e.controlPointPreviousX=c(e.controlPointPreviousX,area.left,area.right),e.controlPointPreviousY=c(e.controlPointPreviousY,area.top,area.bottom)),i0&&(l=t.getDatasetMeta(l[0]._datasetIndex).data),l},"x-axis":function(t,e){return Ee(t,e,{intersect:!1})},point:function(t,e){return ze(t,Le(e,t))},nearest:function(t,e,n){var r=Le(e,t);n.axis=n.axis||"xy";var o=Be(n.axis);return Ne(t,r,n.intersect,o)},x:function(t,e,n){var r=Le(e,t),o=[],l=!1;return Re(t,(function(element){element.inXRange(r.x)&&o.push(element),element.inRange(r.x,r.y)&&(l=!0)})),n.intersect&&!l&&(o=[]),o},y:function(t,e,n){var r=Le(e,t),o=[],l=!1;return Re(t,(function(element){element.inYRange(r.y)&&o.push(element),element.inRange(r.x,r.y)&&(l=!0)})),n.intersect&&!l&&(o=[]),o}}},Ve=mt.extend;function He(t,e){return mt.where(t,(function(t){return t.pos===e}))}function je(t,e){return t.sort((function(a,b){var t=e?b:a,n=e?a:b;return t.weight===n.weight?t.index-n.index:t.weight-n.weight}))}function qe(t){var i,e,n,r=[];for(i=0,e=(t||[]).length;i div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n",nn=n(Object.freeze({__proto__:null,default:en})),an="$chartjs",rn="chartjs-",on=rn+"size-monitor",sn=rn+"render-monitor",ln=rn+"render-animation",un=["animationstart","webkitAnimationStart"],dn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function cn(element,t){var e=mt.getStyle(element,t),n=e&&e.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}function hn(canvas,t){var style=canvas.style,e=canvas.getAttribute("height"),n=canvas.getAttribute("width");if(canvas[an]={initial:{height:e,width:n,style:{display:style.display,height:style.height,width:style.width}}},style.display=style.display||"block",null===n||""===n){var r=cn(canvas,"width");void 0!==r&&(canvas.width=r)}if(null===e||""===e)if(""===canvas.style.height)canvas.height=canvas.width/(t.options.aspectRatio||2);else{var o=cn(canvas,"height");void 0!==r&&(canvas.height=o)}return canvas}var fn=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}(),gn=!!fn&&{passive:!0};function pn(t,e,n){t.addEventListener(e,n,gn)}function mn(t,e,n){t.removeEventListener(e,n,gn)}function vn(t,e,n,r,o){return{type:t,chart:e,native:o||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function bn(t,e){var n=dn[t.type]||t.type,r=mt.getRelativePosition(t,e);return vn(n,e,r.x,r.y,t)}function xn(t,e){var n=!1,r=[];return function(){r=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,mt.requestAnimFrame.call(window,(function(){n=!1,t.apply(e,r)})))}}function yn(t){var e=document.createElement("div");return e.className=t||"",e}function _n(t){var e=1e6,n=yn(on),r=yn(on+"-expand"),o=yn(on+"-shrink");r.appendChild(yn()),o.appendChild(yn()),n.appendChild(r),n.appendChild(o),n._reset=function(){r.scrollLeft=e,r.scrollTop=e,o.scrollLeft=e,o.scrollTop=e};var l=function(){n._reset(),t()};return pn(r,"scroll",l.bind(r,"expand")),pn(o,"scroll",l.bind(o,"shrink")),n}function kn(t,e){var n=t[an]||(t[an]={}),r=n.renderProxy=function(t){t.animationName===ln&&e()};mt.each(un,(function(e){pn(t,e,r)})),n.reflow=!!t.offsetParent,t.classList.add(sn)}function wn(t){var e=t[an]||{},n=e.renderProxy;n&&(mt.each(un,(function(e){mn(t,e,n)})),delete e.renderProxy),t.classList.remove(sn)}function Mn(t,e,n){var r=t[an]||(t[an]={}),o=r.resizer=_n(xn((function(){if(r.resizer){var o=n.options.maintainAspectRatio&&t.parentNode,l=o?o.clientWidth:0;e(vn("resize",n)),o&&o.clientWidth0){var r=t[0];r.label?title=r.label:r.xLabel?title=r.xLabel:n>0&&r.index-1?t.split("\n"):t}function Nn(element){var t=element._xScale,e=element._yScale||element._scale,n=element._index,r=element._datasetIndex,o=element._chart.getDatasetMeta(r).controller,l=o._getIndexScale(),d=o._getValueScale();return{xLabel:t?t.getLabelForIndex(n,r):"",yLabel:e?e.getLabelForIndex(n,r):"",label:l?""+l.getLabelForIndex(n,r):"",value:d?""+d.getLabelForIndex(n,r):"",index:n,datasetIndex:r,x:element._model.x,y:element._model.y}}function Bn(t){var e=ot.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Fn(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Fn(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Fn(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Fn(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Fn(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Fn(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Fn(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Fn(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Fn(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function En(t,e){var n=t._chart.ctx,r=2*e.yPadding,o=0,body=e.body,l=body.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);l+=e.beforeBody.length+e.afterBody.length;var d=e.title.length,c=e.footer.length,h=e.titleFontSize,f=e.bodyFontSize,m=e.footerFontSize;r+=d*h,r+=d?(d-1)*e.titleSpacing:0,r+=d?e.titleMarginBottom:0,r+=l*f,r+=l?(l-1)*e.bodySpacing:0,r+=c?e.footerMarginTop:0,r+=c*m,r+=c?(c-1)*e.footerSpacing:0;var v=0,x=function(line){o=Math.max(o,n.measureText(line).width+v)};return n.font=mt.fontString(h,e._titleFontStyle,e._titleFontFamily),mt.each(e.title,x),n.font=mt.fontString(f,e._bodyFontStyle,e._bodyFontFamily),mt.each(e.beforeBody.concat(e.afterBody),x),v=e.displayColors?f+2:0,mt.each(body,(function(t){mt.each(t.before,x),mt.each(t.lines,x),mt.each(t.after,x)})),v=0,n.font=mt.fontString(m,e._footerFontStyle,e._footerFontFamily),mt.each(e.footer,x),{width:o+=2*e.xPadding,height:r}}function Wn(t,e){var n,r,o,l,d,c=t._model,h=t._chart,f=t._chart.chartArea,m="center",v="center";c.yh.height-e.height&&(v="bottom");var x=(f.left+f.right)/2,y=(f.top+f.bottom)/2;"center"===v?(n=function(t){return t<=x},r=function(t){return t>x}):(n=function(t){return t<=e.width/2},r=function(t){return t>=h.width-e.width/2}),o=function(t){return t+e.width+c.caretSize+c.caretPadding>h.width},l=function(t){return t-e.width-c.caretSize-c.caretPadding<0},d=function(t){return t<=y?"top":"bottom"},n(c.x)?(m="left",o(c.x)&&(m="center",v=d(c.y))):r(c.x)&&(m="right",l(c.x)&&(m="center",v=d(c.y)));var _=t._options;return{xAlign:_.xAlign?_.xAlign:m,yAlign:_.yAlign?_.yAlign:v}}function Vn(t,e,n,r){var o=t.x,l=t.y,d=t.caretSize,c=t.caretPadding,h=t.cornerRadius,f=n.xAlign,m=n.yAlign,v=d+c,x=h+c;return"right"===f?o-=e.width:"center"===f&&((o-=e.width/2)+e.width>r.width&&(o=r.width-e.width),o<0&&(o=0)),"top"===m?l+=v:l-="bottom"===m?e.height+v:e.height/2,"center"===m?"left"===f?o+=v:"right"===f&&(o-=v):"left"===f?o-=x:"right"===f&&(o+=x),{x:o,y:l}}function Hn(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function jn(t){return Rn([],zn(t))}var qn=wt.extend({initialize:function(){this._model=Bn(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),title=e.title.apply(t,arguments),r=e.afterTitle.apply(t,arguments),o=[];return o=Rn(o,zn(n)),o=Rn(o,zn(title)),o=Rn(o,zn(r))},getBeforeBody:function(){return jn(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,data){var e=this,n=e._options.callbacks,r=[];return mt.each(t,(function(t){var o={before:[],lines:[],after:[]};Rn(o.before,zn(n.beforeLabel.call(e,t,data))),Rn(o.lines,n.label.call(e,t,data)),Rn(o.after,zn(n.afterLabel.call(e,t,data))),r.push(o)})),r},getAfterBody:function(){return jn(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),footer=e.footer.apply(t,arguments),r=e.afterFooter.apply(t,arguments),o=[];return o=Rn(o,zn(n)),o=Rn(o,zn(footer)),o=Rn(o,zn(r))},update:function(t){var i,e,n=this,r=n._options,o=n._model,l=n._model=Bn(r),d=n._active,data=n._data,c={xAlign:o.xAlign,yAlign:o.yAlign},h={x:o.x,y:o.y},f={width:o.width,height:o.height},m={x:o.caretX,y:o.caretY};if(d.length){l.opacity=1;var v=[],x=[];m=Ln[r.position].call(n,d,n._eventPosition);var y=[];for(i=0,e=d.length;i0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},r={x:e.x,y:e.y},o=Math.abs(e.opacity<.001)?0:e.opacity,l=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&l&&(t.save(),t.globalAlpha=o,this.drawBackground(r,e,t,n),r.y+=e.yPadding,mt.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(r,e,t),this.drawBody(r,e,t),this.drawFooter(r,e,t),mt.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e=this,n=e._options,r=!1;return e._lastActive=e._lastActive||[],"mouseout"===t.type?e._active=[]:(e._active=e._chart.getElementsAtEventForMode(t,n.mode,n),n.reverse&&e._active.reverse()),(r=!mt.arrayEquals(e._active,e._lastActive))&&(e._lastActive=e._active,(n.enabled||n.custom)&&(e._eventPosition={x:t.x,y:t.y},e.update(!0),e.pivot())),r}}),Un=Ln,Yn=qn;Yn.positioners=Un;var $n=mt.valueOrDefault;function Gn(){return mt.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,source,n){if("xAxes"===t||"yAxes"===t){var i,r,o,l=source[t].length;for(e[t]||(e[t]=[]),i=0;i=e[t].length&&e[t].push({}),!e[t][i].type||o.type&&o.type!==e[t][i].type?mt.merge(e[t][i],[In.getScaleDefaults(r),o]):mt.merge(e[t][i],o)}else mt._merger(t,e,source,n)}})}function Xn(){return mt.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,source,n){var r=e[t]||Object.create(null),o=source[t];"scales"===t?e[t]=Gn(r,o):"scale"===t?e[t]=mt.merge(r,[In.getScaleDefaults(o.type),o]):mt._merger(t,e,source,n)}})}function Kn(t){var data=(t=t||Object.create(null)).data=t.data||{};return data.datasets=data.datasets||[],data.labels=data.labels||[],t.options=Xn(ot.global,ot[t.type],t.options||{}),t}function Zn(t){var e=t.options;mt.each(t.scales,(function(e){Qe.removeBox(t,e)})),e=Xn(ot.global,ot[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Jn(t,e,n){var r,o=function(t){return t.id===r};do{r=e+n++}while(mt.findIndex(t,o)>=0);return r}function Qn(t){return"top"===t||"bottom"===t}function ta(t,e){return function(a,b){return a[t]===b[t]?a[e]-b[e]:a[t]-b[t]}}ot._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var ea=function(t,e){return this.construct(t,e),this};mt.extend(ea.prototype,{construct:function(t,e){var n=this;e=Kn(e);var r=Dn.acquireContext(t,e),canvas=r&&r.canvas,o=canvas&&canvas.height,l=canvas&&canvas.width;n.id=mt.uid(),n.ctx=r,n.canvas=canvas,n.config=e,n.width=l,n.height=o,n.aspectRatio=o?l/o:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,ea.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),r&&canvas?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Tn.notify(t,"beforeInit"),mt.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Tn.notify(t,"afterInit"),t},clear:function(){return mt.canvas.clear(this),this},stop:function(){return Ct.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,canvas=e.canvas,r=n.maintainAspectRatio&&e.aspectRatio||null,o=Math.max(0,Math.floor(mt.getMaximumWidth(canvas))),l=Math.max(0,Math.floor(r?o/r:mt.getMaximumHeight(canvas)));if((e.width!==o||e.height!==l)&&(canvas.width=e.width=o,canvas.height=e.height=l,canvas.style.width=o+"px",canvas.style.height=l+"px",mt.retinaScale(e,n.devicePixelRatio),!t)){var d={width:o,height:l};Tn.notify(e,"resize",[d]),n.onResize&&n.onResize(e,d),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;mt.each(e.xAxes,(function(t,n){t.id||(t.id=Jn(e.xAxes,"x-axis-",n))})),mt.each(e.yAxes,(function(t,n){t.id||(t.id=Jn(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},r=[],o=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(r=r.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&r.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),mt.each(r,(function(e){var r=e.options,l=r.id,d=$n(r.type,e.dtype);Qn(r.position)!==Qn(e.dposition)&&(r.position=e.dposition),o[l]=!0;var c=null;if(l in n&&n[l].type===d)(c=n[l]).options=r,c.ctx=t.ctx,c.chart=t;else{var h=In.getScaleConstructor(d);if(!h)return;c=new h({id:l,type:d,options:r,ctx:t.ctx,chart:t}),n[c.id]=c}c.mergeTicksOptions(),e.isDefault&&(t.scale=c)})),mt.each(o,(function(t,e){t||delete n[e]})),t.scales=n,In.addScalesToLayout(this)},buildOrUpdateControllers:function(){var i,t,e=this,n=[],r=e.data.datasets;for(i=0,t=r.length;i=0;--i)n.drawDataset(e[i],t);Tn.notify(n,"afterDatasetsDraw",[t])}},drawDataset:function(meta,t){var e=this,n={meta:meta,index:meta.index,easingValue:t};!1!==Tn.notify(e,"beforeDatasetDraw",[n])&&(meta.controller.draw(t),Tn.notify(e,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this,n=e.tooltip,r={tooltip:n,easingValue:t};!1!==Tn.notify(e,"beforeTooltipDraw",[r])&&(n.draw(),Tn.notify(e,"afterTooltipDraw",[r]))},getElementAtEvent:function(t){return We.modes.single(this,t)},getElementsAtEvent:function(t){return We.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return We.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var r=We.modes[e];return"function"==typeof r?r(this,t,n):[]},getDatasetAtEvent:function(t){return We.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var meta=n._meta[e.id];return meta||(meta=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),meta},getVisibleDatasetCount:function(){for(var t=0,i=0,e=this.data.datasets.length;i=0;i--){var r=t[i];if(e(r))return r}},mt.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},mt.almostEquals=function(t,e,n){return Math.abs(t-e)=t},mt.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},mt.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},mt.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},mt.toRadians=function(t){return t*(Math.PI/180)},mt.toDegrees=function(t){return t*(180/Math.PI)},mt._decimalPlaces=function(t){if(mt.isFinite(t)){for(var e=1,p=0;Math.round(t*e)/e!==t;)e*=10,p++;return p}},mt.getAngleFromPoint=function(t,e){var n=e.x-t.x,r=e.y-t.y,o=Math.sqrt(n*n+r*r),l=Math.atan2(r,n);return l<-.5*Math.PI&&(l+=2*Math.PI),{angle:l,distance:o}},mt.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},mt.aliasPixel=function(t){return t%2==0?0:.5},mt._alignPixel=function(t,e,n){var r=t.currentDevicePixelRatio,o=n/2;return Math.round((e-o)*r)/r+o},mt.splineCurve=function(t,e,n,r){var o=t.skip?e:t,l=e,d=n.skip?e:n,c=Math.sqrt(Math.pow(l.x-o.x,2)+Math.pow(l.y-o.y,2)),h=Math.sqrt(Math.pow(d.x-l.x,2)+Math.pow(d.y-l.y,2)),f=c/(c+h),m=h/(c+h),v=r*(f=isNaN(f)?0:f),x=r*(m=isNaN(m)?0:m);return{previous:{x:l.x-v*(d.x-o.x),y:l.y-v*(d.y-o.y)},next:{x:l.x+x*(d.x-o.x),y:l.y+x*(d.y-o.y)}}},mt.EPSILON=Number.EPSILON||1e-14,mt.splineCurveMonotone=function(t){var i,e,n,r,o,l,d,c,h,f=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),m=f.length;for(i=0;i0?f[i-1]:null,(r=i0?f[i-1]:null,r=i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},mt.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},mt.niceNum=function(t,e){var n=Math.floor(mt.log10(t)),r=t/Math.pow(10,n);return(e?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},mt.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},mt.getRelativePosition=function(t,e){var n,r,o=t.originalEvent||t,canvas=t.target||t.srcElement,l=canvas.getBoundingClientRect(),d=o.touches;d&&d.length>0?(n=d[0].clientX,r=d[0].clientY):(n=o.clientX,r=o.clientY);var c=parseFloat(mt.getStyle(canvas,"padding-left")),h=parseFloat(mt.getStyle(canvas,"padding-top")),f=parseFloat(mt.getStyle(canvas,"padding-right")),m=parseFloat(mt.getStyle(canvas,"padding-bottom")),v=l.right-l.left-c-f,x=l.bottom-l.top-h-m;return{x:n=Math.round((n-l.left-c)/v*canvas.width/e.currentDevicePixelRatio),y:r=Math.round((r-l.top-h)/x*canvas.height/e.currentDevicePixelRatio)}},mt.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},mt.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},mt._calculatePadding=function(t,e,n){return(e=mt.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},mt._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},mt.getMaximumWidth=function(t){var e=mt._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,r=n-mt._calculatePadding(e,"padding-left",n)-mt._calculatePadding(e,"padding-right",n),o=mt.getConstraintWidth(t);return isNaN(o)?r:Math.min(r,o)},mt.getMaximumHeight=function(t){var e=mt._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,r=n-mt._calculatePadding(e,"padding-top",n)-mt._calculatePadding(e,"padding-bottom",n),o=mt.getConstraintHeight(t);return isNaN(o)?r:Math.min(r,o)},mt.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},mt.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var canvas=t.canvas,r=t.height,o=t.width;canvas.height=r*n,canvas.width=o*n,t.ctx.scale(n,n),canvas.style.height||canvas.style.width||(canvas.style.height=r+"px",canvas.style.width=o+"px")}},mt.fontString=function(t,e,n){return e+" "+t+"px "+n},mt.longestText=function(t,e,n,r){var data=(r=r||{}).data=r.data||{},o=r.garbageCollect=r.garbageCollect||[];r.font!==e&&(data=r.data={},o=r.garbageCollect=[],r.font=e),t.font=e;var i,l,d,c,h,f=0,m=n.length;for(i=0;in.length){for(i=0;in&&(n=o),n},mt.numberOfLabelLines=function(t){var e=1;return mt.each(t,(function(t){mt.isArray(t)&&t.length>e&&(e=t.length)})),e},mt.color=H?function(t){return t instanceof CanvasGradient&&(t=ot.global.defaultColor),H(t)}:function(t){return console.error("Color.js not found!"),t},mt.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:mt.color(t).saturate(.5).darken(.1).rgbString()}};function ia(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function ra(t){this.options=t||{}}mt.extend(ra.prototype,{formats:ia,parse:ia,format:ia,add:ia,diff:ia,startOf:ia,endOf:ia,_create:function(t){return t}}),ra.override=function(t){mt.extend(ra.prototype,t)};var oa={_date:ra},sa={formatters:{values:function(t){return mt.isArray(t)?t:""+t},linear:function(t,e,n){var r=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&t!==Math.floor(t)&&(r=t-Math.floor(t));var o=mt.log10(Math.abs(r)),l="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var d=mt.log10(Math.abs(t)),c=Math.floor(d)-Math.floor(o);c=Math.max(Math.min(c,20),0),l=t.toExponential(c)}else{var h=-1*Math.floor(o);h=Math.max(Math.min(h,20),0),l=t.toFixed(h)}else l="0";return l},logarithmic:function(t,e,n){var r=t/Math.pow(10,Math.floor(mt.log10(t)));return 0===t?"0":1===r||2===r||5===r||0===e||e===n.length-1?t.toExponential():""}}},la=mt.isArray,ua=mt.isNullOrUndef,da=mt.valueOrDefault,ca=mt.valueAtIndexOrDefault;function ha(t,e){for(var n=[],r=t.length/e,i=0,o=t.length;ih+f)))return d}function ga(t,e){mt.each(t,(function(t){var i,n=t.gc,r=n.length/2;if(r>e){for(i=0;ih)return l;return Math.max(h,1)}function wa(t){var i,e,n=[];for(i=0,e=t.length;i=x||m<=1||!c.isHorizontal()?c.labelRotation=v:(e=(t=c._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,r=Math.min(c.maxWidth,c.chart.width-e),e+6>(o=h.offset?c.maxWidth/m:r/(m-1))&&(o=r/(m-(h.offset?.5:1)),l=c.maxHeight-ma(h.gridLines)-f.padding-va(h.scaleLabel),d=Math.sqrt(e*e+n*n),y=mt.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/o,1)),Math.asin(Math.min(l/d,1))-Math.asin(n/d))),y=Math.max(v,Math.min(x,y))),c.labelRotation=y)},afterCalculateTickRotation:function(){mt.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){mt.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,r=t.options,o=r.ticks,l=r.scaleLabel,d=r.gridLines,c=t._isVisible(),h="bottom"===r.position,f=t.isHorizontal();if(f?e.width=t.maxWidth:c&&(e.width=ma(d)+va(l)),f?c&&(e.height=ma(d)+va(l)):e.height=t.maxHeight,o.display&&c){var m=xa(o),v=t._getLabelSizes(),x=v.first,y=v.last,_=v.widest,k=v.highest,w=.4*m.minor.lineHeight,M=o.padding;if(f){var S=0!==t.labelRotation,C=mt.toRadians(t.labelRotation),P=Math.cos(C),A=Math.sin(C),D=A*_.width+P*(k.height-(S?k.offset:0))+(S?0:w);e.height=Math.min(t.maxHeight,e.height+D+M);var T,I,F=t.getPixelForTick(0)-t.left,O=t.right-t.getPixelForTick(t.getTicks().length-1);S?(T=h?P*x.width+A*x.offset:A*(x.height-x.offset),I=h?A*(y.height-y.offset):P*y.width+A*y.offset):(T=x.width/2,I=y.width/2),t.paddingLeft=Math.max((T-F)*t.width/(t.width-F),0)+3,t.paddingRight=Math.max((I-O)*t.width/(t.width-O),0)+3}else{var L=o.mirror?0:_.width+M+w;e.width=Math.min(t.maxWidth,e.width+L),t.paddingTop=x.height/2,t.paddingBottom=y.height/2}}t.handleMargins(),f?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){mt.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ua(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,i,n,r=this;for(r.ticks=t.map((function(t){return t.value})),r.beforeTickToLabelConversion(),e=r.convertTicksToLabels(t)||r.ticks,r.afterTickToLabelConversion(),i=0,n=t.length;ir-1?null:e.getPixelForDecimal(t*o+(n?o/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var i,e,n,r,o=this,l=o.options.ticks,d=o._length,c=l.maxTicksLimit||d/o._tickSize()+1,h=l.major.enabled?wa(t):[],f=h.length,m=h[0],v=h[f-1];if(f>c)return Ma(t,h,f/c),ya(t);if(n=ka(h,t,d,c),f>0){for(i=0,e=f-1;i1?(v-m)/(f-1):null,Sa(t,n,mt.isNullOrUndef(r)?0:m-r,m),Sa(t,n,v,mt.isNullOrUndef(r)?t.length:v+r),ya(t)}return Sa(t,n),ya(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=mt.toRadians(t.labelRotation),r=Math.abs(Math.cos(n)),o=Math.abs(Math.sin(n)),l=t._getLabelSizes(),d=e.autoSkipPadding||0,c=l?l.widest.width+d:0,h=l?l.highest.height+d:0;return t.isHorizontal()?h*r>c*o?c/r:h/o:h*o=0&&(d=t),void 0!==l&&(t=n.indexOf(l))>=0&&(c=t),e.minIndex=d,e.maxIndex=c,e.min=n[d],e.max=n[c]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,r=t.maxIndex;t.ticks=0===n&&r===e.length-1?e:e.slice(n,r+1)},getLabelForIndex:function(t,e){var n=this,r=n.chart;return r.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(r.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;Pa.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var r,o,l,d=this;return Aa(e)||Aa(n)||(t=d.chart.data.datasets[n].data[e]),Aa(t)||(r=d.isHorizontal()?t.x:t.y),(void 0!==r||void 0!==t&&isNaN(e))&&(o=d._getLabels(),t=mt.valueOrDefault(r,t),e=-1!==(l=o.indexOf(t))?l:e,isNaN(e)&&(e=t)),d.getPixelForDecimal((e-d._startValue)/d._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Ia=Da;Ta._defaults=Ia;var Fa=mt.noop,Oa=mt.isNullOrUndef;function La(t,e){var n,r,o,l,d=[],c=1e-14,h=t.stepSize,f=h||1,m=t.maxTicks-1,v=t.min,x=t.max,y=t.precision,_=e.min,k=e.max,w=mt.niceNum((k-_)/m/f)*f;if(wm&&(w=mt.niceNum(l*w/m/f)*f),h||Oa(y)?n=Math.pow(10,mt._decimalPlaces(w)):(n=Math.pow(10,y),w=Math.ceil(w*n)/n),r=Math.floor(_/w)*w,o=Math.ceil(k/w)*w,h&&(!Oa(v)&&mt.almostWhole(v/w,w/1e3)&&(r=v),!Oa(x)&&mt.almostWhole(x/w,w/1e3)&&(o=x)),l=(o-r)/w,l=mt.almostEquals(l,Math.round(l),w/1e3)?Math.round(l):Math.ceil(l),r=Math.round(r*n)/n,o=Math.round(o*n)/n,d.push(Oa(v)?r:v);for(var M=1;M0&&r>0&&(t.min=0)}var o=void 0!==e.min||void 0!==e.suggestedMin,l=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),o!==l&&t.min>=t.max&&(o?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,r=n.stepSize,o=n.maxTicksLimit;return r?t=Math.ceil(e.max/r)-Math.floor(e.min/r)+1:(t=e._computeTickLimit(),o=o||11),o&&(t=Math.min(o,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Fa,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:mt.valueOrDefault(e.fixedStepSize,e.stepSize)},o=t.ticks=La(r,t);t.handleDirectionalChanges(),t.max=mt.max(o),t.min=mt.min(o),e.reverse?(o.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),Pa.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),r=e.min,o=e.max;Pa.prototype._configure.call(e),e.options.offset&&n.length&&(r-=t=(o-r)/Math.max(n.length-1,1)/2,o+=t),e._startValue=r,e._endValue=o,e._valueRange=o-r}}),za={position:"left",ticks:{callback:sa.formatters.linear}},Na=0,Ba=1;function Ea(t,e,meta){var n=[meta.type,void 0===e&&void 0===meta.stack?meta.index:"",meta.stack].join(".");return void 0===t[n]&&(t[n]={pos:[],neg:[]}),t[n]}function Wa(t,e,meta,data){var i,n,r=t.options,o=Ea(e,r.stacked,meta),l=o.pos,d=o.neg,c=data.length;for(i=0;ie.length-1?null:this.getPixelForValue(e[t])}}),ja=za;Ha._defaults=ja;var qa=mt.valueOrDefault,Ua=mt.math.log10;function Ya(t,e){var n,r,o=[],l=qa(t.min,Math.pow(10,Math.floor(Ua(e.min)))),d=Math.floor(Ua(e.max)),c=Math.ceil(e.max/Math.pow(10,d));0===l?(n=Math.floor(Ua(e.minNotZero)),r=Math.floor(e.minNotZero/Math.pow(10,n)),o.push(l),l=r*Math.pow(10,n)):(n=Math.floor(Ua(l)),r=Math.floor(l/Math.pow(10,n)));var h=n<0?Math.pow(10,Math.abs(n)):1;do{o.push(l),10==++r&&(r=1,h=++n>=0?1:h),l=Math.round(r*Math.pow(10,n)*h)/h}while(n=0?t:e}var Xa=Pa.extend({determineDataLimits:function(){var t,meta,e,data,i,n,r=this,o=r.options,l=r.chart,d=l.data.datasets,c=r.isHorizontal();function h(meta){return c?meta.xAxisID===r.id:meta.yAxisID===r.id}r.min=Number.POSITIVE_INFINITY,r.max=Number.NEGATIVE_INFINITY,r.minNotZero=Number.POSITIVE_INFINITY;var f=o.stacked;if(void 0===f)for(t=0;t0){var e=mt.min(t),n=mt.max(t);r.min=Math.min(r.min,e),r.max=Math.max(r.max,n)}}))}else for(t=0;t0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Ua(t.max))):t.minNotZero=n)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),r={min:Ga(e.min),max:Ga(e.max)},o=t.ticks=Ya(r,t);t.max=mt.max(o),t.min=mt.min(o),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&o.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),Pa.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Ua(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;Pa.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=qa(t.options.ticks.fontSize,ot.global.defaultFontSize)/t._length),t._startValue=Ua(e),t._valueOffset=n,t._valueRange=(Ua(t.max)-Ua(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Ua(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Ka=$a;Xa._defaults=Ka;var Za=mt.valueOrDefault,Ja=mt.valueAtIndexOrDefault,Qa=mt.options.resolve,ti={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:sa.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(label){return label}}};function ei(t){var e=t.ticks;return e.display&&t.display?Za(e.fontSize,ot.global.defaultFontSize)+2*e.backdropPaddingY:0}function ni(t,e,label){return mt.isArray(label)?{w:mt.longestText(t,t.font,label),h:label.length*e}:{w:t.measureText(label).width,h:e}}function ai(t,e,n,r,o){return t===r||t===o?{start:e-n/2,end:e+n/2}:to?{start:e-n,end:e}:{start:e,end:e+n}}function ii(t){var i,e,n,r=mt.options._parseFont(t.options.pointLabels),o={l:0,r:t.width,t:0,b:t.height-t.paddingTop},l={};t.ctx.font=r.string,t._pointLabelSizes=[];var d=t.chart.data.labels.length;for(i=0;io.r&&(o.r=f.end,l.r=c),m.starto.b&&(o.b=m.end,l.b=c)}t.setReductions(t.drawingArea,o,l)}function ri(t){return 0===t||180===t?"center":t<180?"left":"right"}function oi(t,text,e,n){var i,r,o=e.y+n/2;if(mt.isArray(text))for(i=0,r=text.length;i270||t<90)&&(n.y-=e.h)}function ui(t){var e=t.ctx,n=t.options,r=n.pointLabels,o=ei(n),l=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),d=mt.options._parseFont(r);e.save(),e.font=d.string,e.textBaseline="middle";for(var i=t.chart.data.labels.length-1;i>=0;i--){var c=0===i?o/2:0,h=t.getPointPosition(i,l+c+5),f=Ja(r.fontColor,i,ot.global.defaultFontColor);e.fillStyle=f;var m=t.getIndexAngle(i),v=mt.toDegrees(m);e.textAlign=ri(v),si(v,t._pointLabelSizes[i],h),oi(e,t.pointLabels[i],h,d.lineHeight)}e.restore()}function di(t,e,n,r){var o,l=t.ctx,d=e.circular,c=t.chart.data.labels.length,h=Ja(e.color,r-1),f=Ja(e.lineWidth,r-1);if((d||c)&&h&&f){if(l.save(),l.strokeStyle=h,l.lineWidth=f,l.setLineDash&&(l.setLineDash(e.borderDash||[]),l.lineDashOffset=e.borderDashOffset||0),l.beginPath(),d)l.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{o=t.getPointPosition(0,n),l.moveTo(o.x,o.y);for(var i=1;i0&&r>0?n:0)},_drawGrid:function(){var i,t,e,n=this,r=n.ctx,o=n.options,l=o.gridLines,d=o.angleLines,c=Za(d.lineWidth,l.lineWidth),h=Za(d.color,l.color);if(o.pointLabels.display&&ui(n),l.display&&mt.each(n.ticks,(function(label,e){0!==e&&(t=n.getDistanceFromCenterForValue(n.ticksAsNumbers[e]),di(n,l,t,e))})),d.display&&c&&h){for(r.save(),r.lineWidth=c,r.strokeStyle=h,r.setLineDash&&(r.setLineDash(Qa([d.borderDash,l.borderDash,[]])),r.lineDashOffset=Qa([d.borderDashOffset,l.borderDashOffset,0])),i=n.chart.data.labels.length-1;i>=0;i--)t=n.getDistanceFromCenterForValue(o.ticks.reverse?n.min:n.max),e=n.getPointPosition(i,t),r.beginPath(),r.moveTo(n.xCenter,n.yCenter),r.lineTo(e.x,e.y),r.stroke();r.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var r,o,l=t.getIndexAngle(0),d=mt.options._parseFont(n),c=Za(n.fontColor,ot.global.defaultFontColor);e.save(),e.font=d.string,e.translate(t.xCenter,t.yCenter),e.rotate(l),e.textAlign="center",e.textBaseline="middle",mt.each(t.ticks,(function(label,l){(0!==l||n.reverse)&&(r=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(o=e.measureText(label).width,e.fillStyle=n.backdropColor,e.fillRect(-o/2-n.backdropPaddingX,-r-d.size/2-n.backdropPaddingY,o+2*n.backdropPaddingX,d.size+2*n.backdropPaddingY)),e.fillStyle=c,e.fillText(label,0,-r))})),e.restore()}},_drawTitle:mt.noop}),fi=ti;hi._defaults=fi;var gi=mt._deprecated,pi=mt.options.resolve,mi=mt.valueOrDefault,vi=Number.MIN_SAFE_INTEGER||-9007199254740991,bi=Number.MAX_SAFE_INTEGER||9007199254740991,xi={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},yi=Object.keys(xi);function _i(a,b){return a-b}function ki(t){var i,e,n,r={},o=[];for(i=0,e=t.length;ie&&d=0&&l<=d;){if(r=table[(n=l+d>>1)-1]||null,o=table[n],!r)return{lo:null,hi:o};if(o[t]e))return{lo:r,hi:o};d=n-1}}return{lo:o,hi:null}}function Pi(table,t,e,n){var r=Ci(table,t,e),o=r.lo?r.hi?r.lo:table[table.length-2]:table[0],l=r.lo?r.hi?r.hi:table[table.length-1]:table[1],span=l[t]-o[t],d=span?(e-o[t])/span:0,c=(l[n]-o[n])*d;return o[n]+c}function Ai(t,input){var e=t._adapter,n=t.options.time,r=n.parser,o=r||n.format,l=input;return"function"==typeof r&&(l=r(l)),mt.isFinite(l)||(l="string"==typeof o?e.parse(l,o):e.parse(l)),null!==l?+l:(r||"function"!=typeof o||(l=o(input),mt.isFinite(l)||(l=e.parse(l))),l)}function Di(t,input){if(mt.isNullOrUndef(input))return null;var e=t.options.time,n=Ai(t,t.getRightValue(input));return null===n||e.round&&(n=+t._adapter.startOf(n,e.round)),n}function Ti(t,e,n,r){var i,o,l,d=yi.length;for(i=yi.indexOf(t);i=yi.indexOf(n);i--)if(l=yi[i],xi[l].common&&t._adapter.diff(o,r,l)>=e-1)return l;return yi[n?yi.indexOf(n):0]}function Fi(t){for(var i=yi.indexOf(t)+1,e=yi.length;i1e5*h)throw e+" and "+n+" are too far apart with stepSize of "+h+" "+c;for(time=m;time=0&&(e[o].major=!0);return e}function zi(t,e,n){var i,r,o=[],map={},l=e.length;for(i=0;i1?ki(x).sort(_i):x.sort(_i),m=Math.min(m,x[0]),v=Math.max(v,x[x.length-1])),m=Di(l,wi(h))||m,v=Di(l,Mi(h))||v,m=m===bi?+c.startOf(Date.now(),f):m,v=v===vi?+c.endOf(Date.now(),f)+1:v,l.min=Math.min(m,v),l.max=Math.max(m+1,v),l._table=[],l._timestamps={data:x,datasets:y,labels:_}},buildTicks:function(){var i,t,e,n=this,r=n.min,o=n.max,l=n.options,d=l.ticks,c=l.time,h=n._timestamps,f=[],m=n.getLabelCapacity(r),source=d.source,v=l.distribution;for(h="data"===source||"auto"===source&&"series"===v?h.data:"labels"===source?h.labels:Oi(n,r,o,m),"ticks"===l.bounds&&h.length&&(r=h[0],o=h[h.length-1]),r=Di(n,wi(l))||r,o=Di(n,Mi(l))||o,i=0,t=h.length;i=r&&e<=o&&f.push(e);return n.min=r,n.max=o,n._unit=c.unit||(d.autoSkip?Ti(c.minUnit,n.min,n.max,m):Ii(n,f.length,c.minUnit,n.min,n.max)),n._majorUnit=d.major.enabled&&"year"!==n._unit?Fi(n._unit):void 0,n._table=Si(n._timestamps.data,r,o,v),n._offsets=Li(n._table,f,r,o,l),d.reverse&&f.reverse(),zi(n,f,n._majorUnit)},getLabelForIndex:function(t,e){var n=this,r=n._adapter,data=n.chart.data,o=n.options.time,label=data.labels&&t=0&&t0?c:1}}),Ei=Ni;Bi._defaults=Ei;var Wi={category:Ta,linear:Ha,logarithmic:Xa,radialLinear:hi,time:Bi},Vi={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};oa._date.override("function"==typeof t?{_id:"moment",formats:function(){return Vi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(time,e){return t(time).format(e)},add:function(time,e,n){return t(time).add(e,n).valueOf()},diff:function(e,n,r){return t(e).diff(t(n),r)},startOf:function(time,e,n){return time=t(time),"isoWeek"===e?time.isoWeekday(n).valueOf():time.startOf(e).valueOf()},endOf:function(time,e){return t(time).endOf(e).valueOf()},_create:function(time){return t(time)}}:{}),ot._set("global",{plugins:{filler:{propagate:!0}}});var Hi={dataset:function(source){var t=source.fill,e=source.chart,meta=e.getDatasetMeta(t),n=meta&&e.isDatasetVisible(t)&&meta.dataset._children||[],r=n.length||0;return r?function(t,i){return i=n)&&r;switch(l){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return l;default:return!1}}function qi(source){var t,e=source.el._model||{},n=source.el._scale||{},r=source.fill,o=null;if(isFinite(r))return null;if("start"===r?o=void 0===e.scaleBottom?n.bottom:e.scaleBottom:"end"===r?o=void 0===e.scaleTop?n.top:e.scaleTop:void 0!==e.scaleZero?o=e.scaleZero:n.getBasePixel&&(o=n.getBasePixel()),null!=o){if(void 0!==o.x&&void 0!==o.y)return o;if(mt.isFinite(o))return{x:(t=n.isHorizontal())?o:null,y:t?null:o}}return null}function Ui(source){var t,e,n,i,r,o=source.el._scale,l=o.options,d=o.chart.data.labels.length,c=source.fill,h=[];if(!d)return null;for(t=l.ticks.reverse?o.max:o.min,e=l.ticks.reverse?o.min:o.max,n=o.getPointPositionForValue(0,t),i=0;i0;--i)mt.canvas.lineTo(t,n[i],n[i-1],!0);else for(l=n[0].cx,d=n[0].cy,c=Math.sqrt(Math.pow(n[0].x-l,2)+Math.pow(n[0].y-d,2)),i=o-1;i>0;--i)t.arc(l,d,c,n[i].angle,n[i-1].angle,!0)}}function Zi(t,e,n,view,r,o){var i,l,d,c,h,f,m,v,x=e.length,span=view.spanGaps,y=[],_=[],k=0,w=0;for(t.beginPath(),i=0,l=x;i=0;--i)(meta=l[i].$filler)&&meta.visible&&(view=(e=meta.el)._view,n=e._children||[],r=meta.mapper,o=view.backgroundColor||ot.global.defaultColor,r&&o&&n.length&&(mt.canvas.clipArea(d,t.chartArea),Zi(d,n,r,view,o,e._loop),mt.canvas.unclipArea(d)))}},Qi=mt.rtl.getRtlAdapter,er=mt.noop,nr=mt.valueOrDefault;function ar(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}ot._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,r=this.chart,meta=r.getDatasetMeta(n);meta.hidden=null===meta.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},r=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(meta){var style=meta.controller.getStyle(r?0:void 0);return{text:e[meta.index].label,fillStyle:style.backgroundColor,hidden:!t.isDatasetVisible(meta.index),lineCap:style.borderCapStyle,lineDash:style.borderDash,lineDashOffset:style.borderDashOffset,lineJoin:style.borderJoinStyle,lineWidth:style.borderWidth,strokeStyle:style.borderColor,pointStyle:style.pointStyle,rotation:style.rotation,datasetIndex:meta.index}}),this)}}},legendCallback:function(t){var i,e,n,r=document.createElement("ul"),o=t.data.datasets;for(r.setAttribute("class",t.id+"-legend"),i=0,e=o.length;ih.width)&&(v+=d+n.padding,m[m.length-(i>0?0:1)]=0),c[i]={left:0,top:0,width:e,height:d},m[m.length-1]+=e+n.padding})),h.height+=v}else{var x=n.padding,y=t.columnWidths=[],_=t.columnHeights=[],k=n.padding,w=0,M=0;mt.each(t.legendItems,(function(t,i){var e=ar(n,d)+d/2+o.measureText(t.text).width;i>0&&M+d+2*x>h.height&&(k+=w+n.padding,y.push(w),_.push(M),w=0,M=0),w=Math.max(w,e),M+=d+x,c[i]={left:0,top:0,width:e,height:d}})),k+=w,y.push(w),_.push(M),h.width+=k}t.width=h.width,t.height=h.height}else t.width=h.width=t.height=h.height=0},afterFit:er,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,r=ot.global,o=r.defaultColor,l=r.elements.line,d=t.height,c=t.columnHeights,h=t.width,f=t.lineWidths;if(e.display){var cursor,m=Qi(e.rtl,t.left,t.minSize.width),v=t.ctx,x=nr(n.fontColor,r.defaultFontColor),y=mt.options._parseFont(n),_=y.size;v.textAlign=m.textAlign("left"),v.textBaseline="middle",v.lineWidth=.5,v.strokeStyle=x,v.fillStyle=x,v.font=y.string;var k=ar(n,_),w=t.legendHitBoxes,M=function(t,e,r){if(!(isNaN(k)||k<=0)){v.save();var d=nr(r.lineWidth,l.borderWidth);if(v.fillStyle=nr(r.fillStyle,o),v.lineCap=nr(r.lineCap,l.borderCapStyle),v.lineDashOffset=nr(r.lineDashOffset,l.borderDashOffset),v.lineJoin=nr(r.lineJoin,l.borderJoinStyle),v.lineWidth=d,v.strokeStyle=nr(r.strokeStyle,o),v.setLineDash&&v.setLineDash(nr(r.lineDash,l.borderDash)),n&&n.usePointStyle){var c=k*Math.SQRT2/2,h=m.xPlus(t,k/2),f=e+_/2;mt.canvas.drawPoint(v,r.pointStyle,c,h,f,r.rotation)}else v.fillRect(m.leftForLtr(t,k),e,k,_),0!==d&&v.strokeRect(m.leftForLtr(t,k),e,k,_);v.restore()}},S=function(t,e,n,r){var o=_/2,l=m.xPlus(t,k+o),d=e+o;v.fillText(n.text,l,d),n.hidden&&(v.beginPath(),v.lineWidth=2,v.moveTo(l,d),v.lineTo(m.xPlus(l,r),d),v.stroke())},C=function(t,r){switch(e.align){case"start":return n.padding;case"end":return t-r;default:return(t-r+n.padding)/2}},P=t.isHorizontal();cursor=P?{x:t.left+C(h,f[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+C(d,c[0]),line:0},mt.rtl.overrideTextDirection(t.ctx,e.textDirection);var A=_+n.padding;mt.each(t.legendItems,(function(e,i){var r=v.measureText(e.text).width,o=k+_/2+r,l=cursor.x,x=cursor.y;m.setWidth(t.minSize.width),P?i>0&&l+o+n.padding>t.left+t.minSize.width&&(x=cursor.y+=A,cursor.line++,l=cursor.x=t.left+C(h,f[cursor.line])):i>0&&x+A>t.top+t.minSize.height&&(l=cursor.x=l+t.columnWidths[cursor.line]+n.padding,cursor.line++,x=cursor.y=t.top+C(d,c[cursor.line]));var y=m.x(l);M(y,x,e),w[i].left=m.leftForLtr(y,w[i].width),w[i].top=x,S(y,x,e,r),P?cursor.x+=o+n.padding:cursor.y+=A})),mt.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var i,n,r,o=this;if(t>=o.left&&t<=o.right&&e>=o.top&&e<=o.bottom)for(r=o.legendHitBoxes,i=0;i=(n=r[i]).left&&t<=n.left+n.width&&e>=n.top&&e<=n.top+n.height)return o.legendItems[i];return null},handleEvent:function(t){var e,n=this,r=n.options,o="mouseup"===t.type?"click":t.type;if("mousemove"===o){if(!r.onHover&&!r.onLeave)return}else{if("click"!==o)return;if(!r.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===o?e&&r.onClick&&r.onClick.call(n,t.native,e):(r.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),r.onHover&&e&&r.onHover.call(n,t.native,e))}});function rr(t,e){var legend=new ir({ctx:t.ctx,options:e,chart:t});Qe.configure(t,legend,e),Qe.addBox(t,legend),t.legend=legend}var or={id:"legend",_element:ir,beforeInit:function(t){var e=t.options.legend;e&&rr(t,e)},beforeUpdate:function(t){var e=t.options.legend,legend=t.legend;e?(mt.mergeIf(e,ot.global.legend),legend?(Qe.configure(t,legend,e),legend.options=e):rr(t,e)):legend&&(Qe.removeBox(t,legend),delete t.legend)},afterEvent:function(t,e){var legend=t.legend;legend&&legend.handleEvent(e)}},sr=mt.noop;ot._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var lr=wt.extend({initialize:function(t){var e=this;mt.extend(e,t),e.legendHitBoxes=[]},beforeUpdate:sr,update:function(t,e,n){var r=this;return r.beforeUpdate(),r.maxWidth=t,r.maxHeight=e,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:sr,beforeSetDimensions:sr,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:sr,beforeBuildLabels:sr,buildLabels:sr,afterBuildLabels:sr,beforeFit:sr,fit:function(){var t,e=this,n=e.options,r=e.minSize={},o=e.isHorizontal();n.display?(t=(mt.isArray(n.text)?n.text.length:1)*mt.options._parseFont(n).lineHeight+2*n.padding,e.width=r.width=o?e.maxWidth:t,e.height=r.height=o?t:e.maxHeight):e.width=r.width=e.height=r.height=0},afterFit:sr,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var r,o,l,d=mt.options._parseFont(n),c=d.lineHeight,h=c/2+n.padding,f=0,m=t.top,v=t.left,x=t.bottom,y=t.right;e.fillStyle=mt.valueOrDefault(n.fontColor,ot.global.defaultFontColor),e.font=d.string,t.isHorizontal()?(o=v+(y-v)/2,l=m+h,r=y-v):(o="left"===n.position?v+h:y-h,l=m+(x-m)/2,r=x-m,f=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(o,l),e.rotate(f),e.textAlign="center",e.textBaseline="middle";var text=n.text;if(mt.isArray(text))for(var _=0,i=0;i tags from your chart component. See https://vue-chartjs.org/guide/#vue-single-file-components");this.$data._chart=new d.a(this.$refs.canvas.getContext("2d"),{type:e,data:data,options:t,plugins:this.$data._plugins})}},beforeDestroy:function(){this.$data._chart&&this.$data._chart.destroy()}}}c("bar-chart","bar"),c("horizontalbar-chart","horizontalBar"),c("doughnut-chart","doughnut");var h=c("line-chart","line");c("pie-chart","pie"),c("polar-chart","polarArea"),c("radar-chart","radar"),c("bubble-chart","bubble"),c("scatter-chart","scatter")}}]);