Files
crater/public/build/assets/LineChart.a92f3bea.js
Mohit Panjwani dcb3ddecb9 update v6
2022-01-10 19:33:59 +05:30

57 lines
174 KiB
JavaScript

import{aQ as Zi,ah as Ji,B as Qi,k as eo,a7 as to,D as ro,a0 as ea,o as ao,e as no,h as io}from"./vendor.01d0adc5.js";import{b as oo}from"./main.75722495.js";var ta={exports:{}};/*!
* Chart.js v2.9.4
* https://www.chartjs.org
* (c) 2020 Chart.js Contributors
* Released under the MIT License
*/(function(lt,$){(function(O,j){lt.exports=j(function(){try{return require("moment")}catch{}}())})(Zi,function(O){O=O&&O.hasOwnProperty("default")?O.default:O;function j(e,t){return t={exports:{}},e(t,t.exports),t.exports}function Ie(e){return e&&e.default||e}var ae={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]},F=j(function(e){var t={};for(var r in ae)ae.hasOwnProperty(r)&&(t[ae[r]]=r);var a=e.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 n in a)if(a.hasOwnProperty(n)){if(!("channels"in a[n]))throw new Error("missing channels property: "+n);if(!("labels"in a[n]))throw new Error("missing channel labels property: "+n);if(a[n].labels.length!==a[n].channels)throw new Error("channel and label counts mismatch: "+n);var i=a[n].channels,o=a[n].labels;delete a[n].channels,delete a[n].labels,Object.defineProperty(a[n],"channels",{value:i}),Object.defineProperty(a[n],"labels",{value:o})}a.rgb.hsl=function(s){var u=s[0]/255,d=s[1]/255,f=s[2]/255,c=Math.min(u,d,f),v=Math.max(u,d,f),g=v-c,p,m,b;return v===c?p=0:u===v?p=(d-f)/g:d===v?p=2+(f-u)/g:f===v&&(p=4+(u-d)/g),p=Math.min(p*60,360),p<0&&(p+=360),b=(c+v)/2,v===c?m=0:b<=.5?m=g/(v+c):m=g/(2-v-c),[p,m*100,b*100]},a.rgb.hsv=function(s){var u,d,f,c,v,g=s[0]/255,p=s[1]/255,m=s[2]/255,b=Math.max(g,p,m),x=b-Math.min(g,p,m),y=function(w){return(b-w)/6/x+1/2};return x===0?c=v=0:(v=x/b,u=y(g),d=y(p),f=y(m),g===b?c=f-d:p===b?c=1/3+u-f:m===b&&(c=2/3+d-u),c<0?c+=1:c>1&&(c-=1)),[c*360,v*100,b*100]},a.rgb.hwb=function(s){var u=s[0],d=s[1],f=s[2],c=a.rgb.hsl(s)[0],v=1/255*Math.min(u,Math.min(d,f));return f=1-1/255*Math.max(u,Math.max(d,f)),[c,v*100,f*100]},a.rgb.cmyk=function(s){var u=s[0]/255,d=s[1]/255,f=s[2]/255,c,v,g,p;return p=Math.min(1-u,1-d,1-f),c=(1-u-p)/(1-p)||0,v=(1-d-p)/(1-p)||0,g=(1-f-p)/(1-p)||0,[c*100,v*100,g*100,p*100]};function l(s,u){return Math.pow(s[0]-u[0],2)+Math.pow(s[1]-u[1],2)+Math.pow(s[2]-u[2],2)}a.rgb.keyword=function(s){var u=t[s];if(u)return u;var d=1/0,f;for(var c in ae)if(ae.hasOwnProperty(c)){var v=ae[c],g=l(s,v);g<d&&(d=g,f=c)}return f},a.keyword.rgb=function(s){return ae[s]},a.rgb.xyz=function(s){var u=s[0]/255,d=s[1]/255,f=s[2]/255;u=u>.04045?Math.pow((u+.055)/1.055,2.4):u/12.92,d=d>.04045?Math.pow((d+.055)/1.055,2.4):d/12.92,f=f>.04045?Math.pow((f+.055)/1.055,2.4):f/12.92;var c=u*.4124+d*.3576+f*.1805,v=u*.2126+d*.7152+f*.0722,g=u*.0193+d*.1192+f*.9505;return[c*100,v*100,g*100]},a.rgb.lab=function(s){var u=a.rgb.xyz(s),d=u[0],f=u[1],c=u[2],v,g,p;return d/=95.047,f/=100,c/=108.883,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,f=f>.008856?Math.pow(f,1/3):7.787*f+16/116,c=c>.008856?Math.pow(c,1/3):7.787*c+16/116,v=116*f-16,g=500*(d-f),p=200*(f-c),[v,g,p]},a.hsl.rgb=function(s){var u=s[0]/360,d=s[1]/100,f=s[2]/100,c,v,g,p,m;if(d===0)return m=f*255,[m,m,m];f<.5?v=f*(1+d):v=f+d-f*d,c=2*f-v,p=[0,0,0];for(var b=0;b<3;b++)g=u+1/3*-(b-1),g<0&&g++,g>1&&g--,6*g<1?m=c+(v-c)*6*g:2*g<1?m=v:3*g<2?m=c+(v-c)*(2/3-g)*6:m=c,p[b]=m*255;return p},a.hsl.hsv=function(s){var u=s[0],d=s[1]/100,f=s[2]/100,c=d,v=Math.max(f,.01),g,p;return f*=2,d*=f<=1?f:2-f,c*=v<=1?v:2-v,p=(f+d)/2,g=f===0?2*c/(v+c):2*d/(f+d),[u,g*100,p*100]},a.hsv.rgb=function(s){var u=s[0]/60,d=s[1]/100,f=s[2]/100,c=Math.floor(u)%6,v=u-Math.floor(u),g=255*f*(1-d),p=255*f*(1-d*v),m=255*f*(1-d*(1-v));switch(f*=255,c){case 0:return[f,m,g];case 1:return[p,f,g];case 2:return[g,f,m];case 3:return[g,p,f];case 4:return[m,g,f];case 5:return[f,g,p]}},a.hsv.hsl=function(s){var u=s[0],d=s[1]/100,f=s[2]/100,c=Math.max(f,.01),v,g,p;return p=(2-d)*f,v=(2-d)*c,g=d*c,g/=v<=1?v:2-v,g=g||0,p/=2,[u,g*100,p*100]},a.hwb.rgb=function(s){var u=s[0]/360,d=s[1]/100,f=s[2]/100,c=d+f,v,g,p,m;c>1&&(d/=c,f/=c),v=Math.floor(6*u),g=1-f,p=6*u-v,(v&1)!=0&&(p=1-p),m=d+p*(g-d);var b,x,y;switch(v){default:case 6:case 0:b=g,x=m,y=d;break;case 1:b=m,x=g,y=d;break;case 2:b=d,x=g,y=m;break;case 3:b=d,x=m,y=g;break;case 4:b=m,x=d,y=g;break;case 5:b=g,x=d,y=m;break}return[b*255,x*255,y*255]},a.cmyk.rgb=function(s){var u=s[0]/100,d=s[1]/100,f=s[2]/100,c=s[3]/100,v,g,p;return v=1-Math.min(1,u*(1-c)+c),g=1-Math.min(1,d*(1-c)+c),p=1-Math.min(1,f*(1-c)+c),[v*255,g*255,p*255]},a.xyz.rgb=function(s){var u=s[0]/100,d=s[1]/100,f=s[2]/100,c,v,g;return c=u*3.2406+d*-1.5372+f*-.4986,v=u*-.9689+d*1.8758+f*.0415,g=u*.0557+d*-.204+f*1.057,c=c>.0031308?1.055*Math.pow(c,1/2.4)-.055:c*12.92,v=v>.0031308?1.055*Math.pow(v,1/2.4)-.055:v*12.92,g=g>.0031308?1.055*Math.pow(g,1/2.4)-.055:g*12.92,c=Math.min(Math.max(0,c),1),v=Math.min(Math.max(0,v),1),g=Math.min(Math.max(0,g),1),[c*255,v*255,g*255]},a.xyz.lab=function(s){var u=s[0],d=s[1],f=s[2],c,v,g;return u/=95.047,d/=100,f/=108.883,u=u>.008856?Math.pow(u,1/3):7.787*u+16/116,d=d>.008856?Math.pow(d,1/3):7.787*d+16/116,f=f>.008856?Math.pow(f,1/3):7.787*f+16/116,c=116*d-16,v=500*(u-d),g=200*(d-f),[c,v,g]},a.lab.xyz=function(s){var u=s[0],d=s[1],f=s[2],c,v,g;v=(u+16)/116,c=d/500+v,g=v-f/200;var p=Math.pow(v,3),m=Math.pow(c,3),b=Math.pow(g,3);return v=p>.008856?p:(v-16/116)/7.787,c=m>.008856?m:(c-16/116)/7.787,g=b>.008856?b:(g-16/116)/7.787,c*=95.047,v*=100,g*=108.883,[c,v,g]},a.lab.lch=function(s){var u=s[0],d=s[1],f=s[2],c,v,g;return c=Math.atan2(f,d),v=c*360/2/Math.PI,v<0&&(v+=360),g=Math.sqrt(d*d+f*f),[u,g,v]},a.lch.lab=function(s){var u=s[0],d=s[1],f=s[2],c,v,g;return g=f/360*2*Math.PI,c=d*Math.cos(g),v=d*Math.sin(g),[u,c,v]},a.rgb.ansi16=function(s){var u=s[0],d=s[1],f=s[2],c=1 in arguments?arguments[1]:a.rgb.hsv(s)[2];if(c=Math.round(c/50),c===0)return 30;var v=30+(Math.round(f/255)<<2|Math.round(d/255)<<1|Math.round(u/255));return c===2&&(v+=60),v},a.hsv.ansi16=function(s){return a.rgb.ansi16(a.hsv.rgb(s),s[2])},a.rgb.ansi256=function(s){var u=s[0],d=s[1],f=s[2];if(u===d&&d===f)return u<8?16:u>248?231:Math.round((u-8)/247*24)+232;var c=16+36*Math.round(u/255*5)+6*Math.round(d/255*5)+Math.round(f/255*5);return c},a.ansi16.rgb=function(s){var u=s%10;if(u===0||u===7)return s>50&&(u+=3.5),u=u/10.5*255,[u,u,u];var d=(~~(s>50)+1)*.5,f=(u&1)*d*255,c=(u>>1&1)*d*255,v=(u>>2&1)*d*255;return[f,c,v]},a.ansi256.rgb=function(s){if(s>=232){var u=(s-232)*10+8;return[u,u,u]}s-=16;var d,f=Math.floor(s/36)/5*255,c=Math.floor((d=s%36)/6)/5*255,v=d%6/5*255;return[f,c,v]},a.rgb.hex=function(s){var u=((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255),d=u.toString(16).toUpperCase();return"000000".substring(d.length)+d},a.hex.rgb=function(s){var u=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!u)return[0,0,0];var d=u[0];u[0].length===3&&(d=d.split("").map(function(p){return p+p}).join(""));var f=parseInt(d,16),c=f>>16&255,v=f>>8&255,g=f&255;return[c,v,g]},a.rgb.hcg=function(s){var u=s[0]/255,d=s[1]/255,f=s[2]/255,c=Math.max(Math.max(u,d),f),v=Math.min(Math.min(u,d),f),g=c-v,p,m;return g<1?p=v/(1-g):p=0,g<=0?m=0:c===u?m=(d-f)/g%6:c===d?m=2+(f-u)/g:m=4+(u-d)/g+4,m/=6,m%=1,[m*360,g*100,p*100]},a.hsl.hcg=function(s){var u=s[1]/100,d=s[2]/100,f=1,c=0;return d<.5?f=2*u*d:f=2*u*(1-d),f<1&&(c=(d-.5*f)/(1-f)),[s[0],f*100,c*100]},a.hsv.hcg=function(s){var u=s[1]/100,d=s[2]/100,f=u*d,c=0;return f<1&&(c=(d-f)/(1-f)),[s[0],f*100,c*100]},a.hcg.rgb=function(s){var u=s[0]/360,d=s[1]/100,f=s[2]/100;if(d===0)return[f*255,f*255,f*255];var c=[0,0,0],v=u%1*6,g=v%1,p=1-g,m=0;switch(Math.floor(v)){case 0:c[0]=1,c[1]=g,c[2]=0;break;case 1:c[0]=p,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=g;break;case 3:c[0]=0,c[1]=p,c[2]=1;break;case 4:c[0]=g,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=p}return m=(1-d)*f,[(d*c[0]+m)*255,(d*c[1]+m)*255,(d*c[2]+m)*255]},a.hcg.hsv=function(s){var u=s[1]/100,d=s[2]/100,f=u+d*(1-u),c=0;return f>0&&(c=u/f),[s[0],c*100,f*100]},a.hcg.hsl=function(s){var u=s[1]/100,d=s[2]/100,f=d*(1-u)+.5*u,c=0;return f>0&&f<.5?c=u/(2*f):f>=.5&&f<1&&(c=u/(2*(1-f))),[s[0],c*100,f*100]},a.hcg.hwb=function(s){var u=s[1]/100,d=s[2]/100,f=u+d*(1-u);return[s[0],(f-u)*100,(1-f)*100]},a.hwb.hcg=function(s){var u=s[1]/100,d=s[2]/100,f=1-d,c=f-u,v=0;return c<1&&(v=(f-c)/(1-c)),[s[0],c*100,v*100]},a.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]},a.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]},a.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]},a.gray.hsl=a.gray.hsv=function(s){return[0,0,s[0]]},a.gray.hwb=function(s){return[0,100,s[0]]},a.gray.cmyk=function(s){return[0,0,0,s[0]]},a.gray.lab=function(s){return[s[0],0,0]},a.gray.hex=function(s){var u=Math.round(s[0]/100*255)&255,d=(u<<16)+(u<<8)+u,f=d.toString(16).toUpperCase();return"000000".substring(f.length)+f},a.rgb.gray=function(s){var u=(s[0]+s[1]+s[2])/3;return[u/255*100]}});F.rgb,F.hsl,F.hsv,F.hwb,F.cmyk,F.xyz,F.lab,F.lch,F.hex,F.keyword,F.ansi16,F.ansi256,F.hcg,F.apple,F.gray;function ut(){for(var e={},t=Object.keys(F),r=t.length,a=0;a<r;a++)e[t[a]]={distance:-1,parent:null};return e}function Y(e){var t=ut(),r=[e];for(t[e].distance=0;r.length;)for(var a=r.pop(),n=Object.keys(F[a]),i=n.length,o=0;o<i;o++){var l=n[o],s=t[l];s.distance===-1&&(s.distance=t[a].distance+1,s.parent=a,r.unshift(l))}return t}function Ue(e,t){return function(r){return t(e(r))}}function we(e,t){for(var r=[t[e].parent,e],a=F[t[e].parent][e],n=t[e].parent;t[n].parent;)r.unshift(t[n].parent),a=Ue(F[t[n].parent][n],a),n=t[n].parent;return a.conversion=r,a}var q=function(e){for(var t=Y(e),r={},a=Object.keys(t),n=a.length,i=0;i<n;i++){var o=a[i],l=t[o];l.parent!==null&&(r[o]=we(o,t))}return r},ce={},ra=Object.keys(F);function aa(e){var t=function(r){return r==null?r:(arguments.length>1&&(r=Array.prototype.slice.call(arguments)),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function na(e){var t=function(r){if(r==null)return r;arguments.length>1&&(r=Array.prototype.slice.call(arguments));var a=e(r);if(typeof a=="object")for(var n=a.length,i=0;i<n;i++)a[i]=Math.round(a[i]);return a};return"conversion"in e&&(t.conversion=e.conversion),t}ra.forEach(function(e){ce[e]={},Object.defineProperty(ce[e],"channels",{value:F[e].channels}),Object.defineProperty(ce[e],"labels",{value:F[e].labels});var t=q(e),r=Object.keys(t);r.forEach(function(a){var n=t[a];ce[e][a]=na(n),ce[e][a].raw=aa(n)})});var ia=ce,dt={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]},J={getRgba:ft,getHsla:ht,getRgb:oa,getHsl:sa,getHwb:Yt,getAlpha:la,hexString:ua,rgbString:da,rgbaString:Gt,percentString:fa,percentaString:Xt,hslString:ha,hslaString:Kt,hwbString:ca,keyword:va};function ft(e){if(!!e){var t=/^#([a-fA-F0-9]{3,4})$/i,r=/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,a=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,n=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i,i=/(\w+)/,o=[0,0,0],l=1,s=e.match(t),u="";if(s){s=s[1],u=s[3];for(var d=0;d<o.length;d++)o[d]=parseInt(s[d]+s[d],16);u&&(l=Math.round(parseInt(u+u,16)/255*100)/100)}else if(s=e.match(r)){u=s[2],s=s[1];for(var d=0;d<o.length;d++)o[d]=parseInt(s.slice(d*2,d*2+2),16);u&&(l=Math.round(parseInt(u,16)/255*100)/100)}else if(s=e.match(a)){for(var d=0;d<o.length;d++)o[d]=parseInt(s[d+1]);l=parseFloat(s[4])}else if(s=e.match(n)){for(var d=0;d<o.length;d++)o[d]=Math.round(parseFloat(s[d+1])*2.55);l=parseFloat(s[4])}else if(s=e.match(i)){if(s[1]=="transparent")return[0,0,0,0];if(o=dt[s[1]],!o)return}for(var d=0;d<o.length;d++)o[d]=Q(o[d],0,255);return!l&&l!=0?l=1:l=Q(l,0,1),o[3]=l,o}}function ht(e){if(!!e){var t=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,r=e.match(t);if(r){var a=parseFloat(r[4]),n=Q(parseInt(r[1]),0,360),i=Q(parseFloat(r[2]),0,100),o=Q(parseFloat(r[3]),0,100),l=Q(isNaN(a)?1:a,0,1);return[n,i,o,l]}}}function Yt(e){if(!!e){var t=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,r=e.match(t);if(r){var a=parseFloat(r[4]),n=Q(parseInt(r[1]),0,360),i=Q(parseFloat(r[2]),0,100),o=Q(parseFloat(r[3]),0,100),l=Q(isNaN(a)?1:a,0,1);return[n,i,o,l]}}}function oa(e){var t=ft(e);return t&&t.slice(0,3)}function sa(e){var t=ht(e);return t&&t.slice(0,3)}function la(e){var t=ft(e);if(t)return t[3];if(t=ht(e))return t[3];if(t=Yt(e))return t[3]}function ua(e,t){var t=t!==void 0&&e.length===3?t:e[3];return"#"+$e(e[0])+$e(e[1])+$e(e[2])+(t>=0&&t<1?$e(Math.round(t*255)):"")}function da(e,t){return t<1||e[3]&&e[3]<1?Gt(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"}function Gt(e,t){return t===void 0&&(t=e[3]!==void 0?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function fa(e,t){if(t<1||e[3]&&e[3]<1)return Xt(e,t);var r=Math.round(e[0]/255*100),a=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return"rgb("+r+"%, "+a+"%, "+n+"%)"}function Xt(e,t){var r=Math.round(e[0]/255*100),a=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return"rgba("+r+"%, "+a+"%, "+n+"%, "+(t||e[3]||1)+")"}function ha(e,t){return t<1||e[3]&&e[3]<1?Kt(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"}function Kt(e,t){return t===void 0&&(t=e[3]!==void 0?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function ca(e,t){return t===void 0&&(t=e[3]!==void 0?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(t!==void 0&&t!==1?", "+t:"")+")"}function va(e){return Zt[e.slice(0,3)]}function Q(e,t,r){return Math.min(Math.max(t,e),r)}function $e(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var Zt={};for(var Jt in dt)Zt[dt[Jt]]=Jt;var U=function(e){if(e instanceof U)return e;if(!(this instanceof U))return new U(e);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};var t;typeof e=="string"?(t=J.getRgba(e),t?this.setValues("rgb",t):(t=J.getHsla(e))?this.setValues("hsl",t):(t=J.getHwb(e))&&this.setValues("hwb",t)):typeof e=="object"&&(t=e,t.r!==void 0||t.red!==void 0?this.setValues("rgb",t):t.l!==void 0||t.lightness!==void 0?this.setValues("hsl",t):t.v!==void 0||t.value!==void 0?this.setValues("hsv",t):t.w!==void 0||t.whiteness!==void 0?this.setValues("hwb",t):(t.c!==void 0||t.cyan!==void 0)&&this.setValues("cmyk",t))};U.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 e=this.values;return e.alpha!==1?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return e===void 0?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e%=360,e=e<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return J.hexString(this.values.rgb)},rgbString:function(){return J.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return J.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return J.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return J.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return J.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return J.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return J.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],r=0;r<e.length;r++){var a=e[r]/255;t[r]=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb,t=(e[0]*299+e[1]*587+e[2]*114)/1e3;return t<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=e[0]*.3+e[1]*.59+e[2]*.11;return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,r=(t[0]+e)%360;return t[0]=r<0?360+r:r,this.setValues("hsl",t),this},mix:function(e,t){var r=this,a=e,n=t===void 0?.5:t,i=2*n-1,o=r.alpha()-a.alpha(),l=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,s=1-l;return this.rgb(l*r.red()+s*a.red(),l*r.green()+s*a.green(),l*r.blue()+s*a.blue()).alpha(r.alpha()*n+a.alpha()*(1-n))},toJSON:function(){return this.rgb()},clone:function(){var e=new U,t=this.values,r=e.values,a,n;for(var i in t)t.hasOwnProperty(i)&&(a=t[i],n={}.toString.call(a),n==="[object Array]"?r[i]=a.slice(0):n==="[object Number]"?r[i]=a:console.error("unexpected color value:",a));return e}},U.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},U.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},U.prototype.getValues=function(e){for(var t=this.values,r={},a=0;a<e.length;a++)r[e.charAt(a)]=t[e][a];return t.alpha!==1&&(r.a=t.alpha),r},U.prototype.setValues=function(e,t){var r=this.values,a=this.spaces,n=this.maxes,i=1,o;if(this.valid=!0,e==="alpha")i=t;else if(t.length)r[e]=t.slice(0,e.length),i=t[e.length];else if(t[e.charAt(0)]!==void 0){for(o=0;o<e.length;o++)r[e][o]=t[e.charAt(o)];i=t.a}else if(t[a[e][0]]!==void 0){var l=a[e];for(o=0;o<e.length;o++)r[e][o]=t[l[o]];i=t.alpha}if(r.alpha=Math.max(0,Math.min(1,i===void 0?r.alpha:i)),e==="alpha")return!1;var s;for(o=0;o<e.length;o++)s=Math.max(0,Math.min(n[e][o],r[e][o])),r[e][o]=Math.round(s);for(var u in a)u!==e&&(r[u]=ia[e][u](r[e]));return!0},U.prototype.setSpace=function(e,t){var r=t[0];return r===void 0?this.getValues(e):(typeof r=="number"&&(r=Array.prototype.slice.call(t)),this.setValues(e,r),this)},U.prototype.setChannel=function(e,t,r){var a=this.values[e];return r===void 0?a[t]:r===a[t]?this:(a[t]=r,this.setValues(e,a),this)},typeof window!="undefined"&&(window.Color=U);var Ye=U;function Qt(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}var S={noop:function(){},uid:function(){var e=0;return function(){return e++}}(),isNullOrUndef:function(e){return e===null||typeof e=="undefined"},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return t.substr(0,7)==="[object"&&t.substr(-6)==="Array]"},isObject:function(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"},isFinite:function(e){return(typeof e=="number"||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return typeof e=="undefined"?t:e},valueAtIndexOrDefault:function(e,t,r){return S.valueOrDefault(S.isArray(e)?e[t]:e,r)},callback:function(e,t,r){if(e&&typeof e.call=="function")return e.apply(r,t)},each:function(e,t,r,a){var n,i,o;if(S.isArray(e))if(i=e.length,a)for(n=i-1;n>=0;n--)t.call(r,e[n],n);else for(n=0;n<i;n++)t.call(r,e[n],n);else if(S.isObject(e))for(o=Object.keys(e),i=o.length,n=0;n<i;n++)t.call(r,e[o[n]],o[n])},arrayEquals:function(e,t){var r,a,n,i;if(!e||!t||e.length!==t.length)return!1;for(r=0,a=e.length;r<a;++r)if(n=e[r],i=t[r],n instanceof Array&&i instanceof Array){if(!S.arrayEquals(n,i))return!1}else if(n!==i)return!1;return!0},clone:function(e){if(S.isArray(e))return e.map(S.clone);if(S.isObject(e)){for(var t=Object.create(e),r=Object.keys(e),a=r.length,n=0;n<a;++n)t[r[n]]=S.clone(e[r[n]]);return t}return e},_merger:function(e,t,r,a){if(!!Qt(e)){var n=t[e],i=r[e];S.isObject(n)&&S.isObject(i)?S.merge(n,i,a):t[e]=S.clone(i)}},_mergerIf:function(e,t,r){if(!!Qt(e)){var a=t[e],n=r[e];S.isObject(a)&&S.isObject(n)?S.mergeIf(a,n):t.hasOwnProperty(e)||(t[e]=S.clone(n))}},merge:function(e,t,r){var a=S.isArray(t)?t:[t],n=a.length,i,o,l,s,u;if(!S.isObject(e))return e;for(r=r||{},i=r.merger||S._merger,o=0;o<n;++o)if(t=a[o],!!S.isObject(t))for(l=Object.keys(t),u=0,s=l.length;u<s;++u)i(l[u],e,t,r);return e},mergeIf:function(e,t){return S.merge(e,t,{merger:S._mergerIf})},extend:Object.assign||function(e){return S.merge(e,[].slice.call(arguments,1),{merger:function(t,r,a){r[t]=a[t]}})},inherits:function(e){var t=this,r=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},a=function(){this.constructor=r};return a.prototype=t.prototype,r.prototype=new a,r.extend=S.inherits,e&&S.extend(r.prototype,e),r.__super__=t.prototype,r},_deprecated:function(e,t,r,a){t!==void 0&&console.warn(e+': "'+r+'" is deprecated. Please use "'+a+'" instead')}},G=S;S.callCallback=S.callback,S.indexOf=function(e,t,r){return Array.prototype.indexOf.call(e,t,r)},S.getValueOrDefault=S.valueOrDefault,S.getValueAtIndexOrDefault=S.valueAtIndexOrDefault;var Oe={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e=e-1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e=e-1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e=e-1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return-Math.cos(e*(Math.PI/2))+1},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return e===0?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return e===1?1:-Math.pow(2,-10*e)+1},easeInOutExpo:function(e){return e===0?0:e===1?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(-Math.pow(2,-10*--e)+2)},easeInCirc:function(e){return e>=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e=e-1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,r=0,a=1;return e===0?0:e===1?1:(r||(r=.3),t=r/(2*Math.PI)*Math.asin(1/a),-(a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)))},easeOutElastic:function(e){var t=1.70158,r=0,a=1;return e===0?0:e===1?1:(r||(r=.3),t=r/(2*Math.PI)*Math.asin(1/a),a*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},easeInOutElastic:function(e){var t=1.70158,r=0,a=1;return e===0?0:(e/=.5)==2?1:(r||(r=.45),t=r/(2*Math.PI)*Math.asin(1/a),e<1?-.5*(a*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)):a*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e=e-1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:function(e){return 1-Oe.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?Oe.easeInBounce(e*2)*.5:Oe.easeOutBounce(e*2-1)*.5+.5}},ga={effects:Oe};G.easingEffects=Oe;var z=Math.PI,pa=z/180,ma=z*2,X=z/2,Le=z/4,er=z*2/3,Ge={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,r,a,n,i){if(i){var o=Math.min(i,n/2,a/2),l=t+o,s=r+o,u=t+a-o,d=r+n-o;e.moveTo(t,s),l<u&&s<d?(e.arc(l,s,o,-z,-X),e.arc(u,s,o,-X,0),e.arc(u,d,o,0,X),e.arc(l,d,o,X,z)):l<u?(e.moveTo(l,r),e.arc(u,s,o,-X,X),e.arc(l,s,o,X,z+X)):s<d?(e.arc(l,s,o,-z,0),e.arc(l,d,o,0,z)):e.arc(l,s,o,-z,z),e.closePath(),e.moveTo(t,r)}else e.rect(t,r,a,n)},drawPoint:function(e,t,r,a,n,i){var o,l,s,u,d,f=(i||0)*pa;if(t&&typeof t=="object"&&(o=t.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(a,n),e.rotate(f),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),e.restore();return}if(!(isNaN(r)||r<=0)){switch(e.beginPath(),t){default:e.arc(a,n,r,0,ma),e.closePath();break;case"triangle":e.moveTo(a+Math.sin(f)*r,n-Math.cos(f)*r),f+=er,e.lineTo(a+Math.sin(f)*r,n-Math.cos(f)*r),f+=er,e.lineTo(a+Math.sin(f)*r,n-Math.cos(f)*r),e.closePath();break;case"rectRounded":d=r*.516,u=r-d,l=Math.cos(f+Le)*u,s=Math.sin(f+Le)*u,e.arc(a-l,n-s,d,f-z,f-X),e.arc(a+s,n-l,d,f-X,f),e.arc(a+l,n+s,d,f,f+X),e.arc(a-s,n+l,d,f+X,f+z),e.closePath();break;case"rect":if(!i){u=Math.SQRT1_2*r,e.rect(a-u,n-u,2*u,2*u);break}f+=Le;case"rectRot":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+s,n-l),e.lineTo(a+l,n+s),e.lineTo(a-s,n+l),e.closePath();break;case"crossRot":f+=Le;case"cross":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s),e.moveTo(a+s,n-l),e.lineTo(a-s,n+l);break;case"star":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s),e.moveTo(a+s,n-l),e.lineTo(a-s,n+l),f+=Le,l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s),e.moveTo(a+s,n-l),e.lineTo(a-s,n+l);break;case"line":l=Math.cos(f)*r,s=Math.sin(f)*r,e.moveTo(a-l,n-s),e.lineTo(a+l,n+s);break;case"dash":e.moveTo(a,n),e.lineTo(a+Math.cos(f)*r,n+Math.sin(f)*r);break}e.fill(),e.stroke()}},_isPointInArea:function(e,t){var r=1e-6;return e.x>t.left-r&&e.x<t.right+r&&e.y>t.top-r&&e.y<t.bottom+r},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,r,a){var n=r.steppedLine;if(n){if(n==="middle"){var i=(t.x+r.x)/2;e.lineTo(i,a?r.y:t.y),e.lineTo(i,a?t.y:r.y)}else n==="after"&&!a||n!=="after"&&a?e.lineTo(t.x,r.y):e.lineTo(r.x,t.y);e.lineTo(r.x,r.y);return}if(!r.tension){e.lineTo(r.x,r.y);return}e.bezierCurveTo(a?t.controlPointPreviousX:t.controlPointNextX,a?t.controlPointPreviousY:t.controlPointNextY,a?r.controlPointNextX:r.controlPointPreviousX,a?r.controlPointNextY:r.controlPointPreviousY,r.x,r.y)}},ba=Ge;G.clear=Ge.clear,G.drawRoundedRectangle=function(e){e.beginPath(),Ge.roundedRect.apply(Ge,arguments)};var tr={_set:function(e,t){return G.merge(this[e]||(this[e]={}),t)}};tr._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var _=tr,Xe=G.valueOrDefault;function xa(e){return!e||G.isNullOrUndef(e.size)||G.isNullOrUndef(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}var ya={toLineHeight:function(e,t){var r=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!r||r[1]==="normal")return t*1.2;switch(e=+r[2],r[3]){case"px":return e;case"%":e/=100;break}return t*e},toPadding:function(e){var t,r,a,n;return G.isObject(e)?(t=+e.top||0,r=+e.right||0,a=+e.bottom||0,n=+e.left||0):t=r=a=n=+e||0,{top:t,right:r,bottom:a,left:n,height:t+a,width:n+r}},_parseFont:function(e){var t=_.global,r=Xe(e.fontSize,t.defaultFontSize),a={family:Xe(e.fontFamily,t.defaultFontFamily),lineHeight:G.options.toLineHeight(Xe(e.lineHeight,t.defaultLineHeight),r),size:r,style:Xe(e.fontStyle,t.defaultFontStyle),weight:null,string:""};return a.string=xa(a),a},resolve:function(e,t,r,a){var n=!0,i,o,l;for(i=0,o=e.length;i<o;++i)if(l=e[i],l!==void 0&&(t!==void 0&&typeof l=="function"&&(l=l(t),n=!1),r!==void 0&&G.isArray(l)&&(l=l[r],n=!1),l!==void 0))return a&&!n&&(a.cacheable=!1),l}},rr={_factorize:function(e){var t=[],r=Math.sqrt(e),a;for(a=1;a<r;a++)e%a==0&&(t.push(a),t.push(e/a));return r===(r|0)&&t.push(r),t.sort(function(n,i){return n-i}).pop(),t},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,r=Math.round(t),a=e===Math.pow(10,r);return a?r:t}},_a=rr;G.log10=rr.log10;var ka=function(e,t){return{x:function(r){return e+e+t-r},setWidth:function(r){t=r},textAlign:function(r){return r==="center"?r:r==="right"?"left":"right"},xPlus:function(r,a){return r-a},leftForLtr:function(r,a){return r-a}}},wa=function(){return{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}},Ma=function(e,t,r){return e?ka(t,r):wa()},Sa=function(e,t){var r,a;(t==="ltr"||t==="rtl")&&(r=e.canvas.style,a=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",t,"important"),e.prevTextDirection=a)},Ca=function(e){var t=e.prevTextDirection;t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))},Da={getRtlAdapter:Ma,overrideTextDirection:Sa,restoreTextDirection:Ca},h=G,Pa=ga,Aa=ba,Ta=ya,Fa=_a,Ia=Da;h.easing=Pa,h.canvas=Aa,h.options=Ta,h.math=Fa,h.rtl=Ia;function Oa(e,t,r,a){var n=Object.keys(r),i,o,l,s,u,d,f,c,v;for(i=0,o=n.length;i<o;++i)if(l=n[i],d=r[l],t.hasOwnProperty(l)||(t[l]=d),s=t[l],!(s===d||l[0]==="_")){if(e.hasOwnProperty(l)||(e[l]=s),u=e[l],f=typeof d,f===typeof u){if(f==="string"){if(c=Ye(u),c.valid&&(v=Ye(d),v.valid)){t[l]=v.mix(c,a).rgbString();continue}}else if(h.isFinite(u)&&h.isFinite(d)){t[l]=u+(d-u)*a;continue}}t[l]=d}}var ct=function(e){h.extend(this,e),this.initialize.apply(this,arguments)};h.extend(ct.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var e=this;return e._view||(e._view=h.extend({},e._model)),e._start={},e},transition:function(e){var t=this,r=t._model,a=t._start,n=t._view;return!r||e===1?(t._view=h.extend({},r),t._start=null,t):(n||(n=t._view={}),a||(a=t._start={}),Oa(a,n,r,e),t)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return h.isNumber(this._model.x)&&h.isNumber(this._model.y)}}),ct.extend=h.inherits;var ee=ct,vt=ee.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),gt=vt;Object.defineProperty(vt.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(vt.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),_._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:h.noop,onComplete:h.noop}});var pt={animations:[],request:null,addAnimation:function(e,t,r,a){var n=this.animations,i,o;for(t.chart=e,t.startTime=Date.now(),t.duration=r,a||(e.animating=!0),i=0,o=n.length;i<o;++i)if(n[i].chart===e){n[i]=t;return}n.push(t),n.length===1&&this.requestAnimationFrame()},cancelAnimation:function(e){var t=h.findIndex(this.animations,function(r){return r.chart===e});t!==-1&&(this.animations.splice(t,1),e.animating=!1)},requestAnimationFrame:function(){var e=this;e.request===null&&(e.request=h.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){var e=this;e.advance(),e.animations.length>0&&e.requestAnimationFrame()},advance:function(){for(var e=this.animations,t,r,a,n,i=0;i<e.length;)t=e[i],r=t.chart,a=t.numSteps,n=Math.floor((Date.now()-t.startTime)/t.duration*a)+1,t.currentStep=Math.min(n,a),h.callback(t.render,[r,t],r),h.callback(t.onAnimationProgress,[t],r),t.currentStep>=a?(h.callback(t.onAnimationComplete,[t],r),r.animating=!1,e.splice(i,1)):++i}},Me=h.options.resolve,ar=["push","pop","shift","splice","unshift"];function La(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),ar.forEach(function(r){var a="onData"+r.charAt(0).toUpperCase()+r.slice(1),n=e[r];Object.defineProperty(e,r,{configurable:!0,enumerable:!1,value:function(){var i=Array.prototype.slice.call(arguments),o=n.apply(this,i);return h.each(e._chartjs.listeners,function(l){typeof l[a]=="function"&&l[a].apply(l,i)}),o}})})}function nr(e,t){var r=e._chartjs;if(!!r){var a=r.listeners,n=a.indexOf(t);n!==-1&&a.splice(n,1),!(a.length>0)&&(ar.forEach(function(i){delete e[i]}),delete e._chartjs)}}var mt=function(e,t){this.initialize(e,t)};h.extend(mt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var r=this;r.chart=e,r.index=t,r.linkScales(),r.addElements(),r._type=r.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this,t=e.getMeta(),r=e.chart,a=r.scales,n=e.getDataset(),i=r.options.scales;(t.xAxisID===null||!(t.xAxisID in a)||n.xAxisID)&&(t.xAxisID=n.xAxisID||i.xAxes[0].id),(t.yAxisID===null||!(t.yAxisID in a)||n.yAxisID)&&(t.yAxisID=n.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_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&&nr(this._data,this)},createMetaDataset:function(){var e=this,t=e.datasetElementType;return t&&new t({_chart:e.chart,_datasetIndex:e.index})},createMetaData:function(e){var t=this,r=t.dataElementType;return r&&new r({_chart:t.chart,_datasetIndex:t.index,_index:e})},addElements:function(){var e=this,t=e.getMeta(),r=e.getDataset().data||[],a=t.data,n,i;for(n=0,i=r.length;n<i;++n)a[n]=a[n]||e.createMetaData(n);t.dataset=t.dataset||e.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var e=this,t=e.getDataset(),r=t.data||(t.data=[]);e._data!==r&&(e._data&&nr(e._data,e),r&&Object.isExtensible(r)&&La(r,e),e._data=r),e.resyncElements()},_configure:function(){var e=this;e._config=h.merge(Object.create(null),[e.chart.options.datasets[e._type],e.getDataset()],{merger:function(t,r,a){t!=="_meta"&&t!=="data"&&h._merger(t,r,a)}})},_update:function(e){var t=this;t._configure(),t._cachedDataOpts=null,t.update(e)},update:h.noop,transition:function(e){for(var t=this.getMeta(),r=t.data||[],a=r.length,n=0;n<a;++n)r[n].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],r=t.length,a=0;for(e.dataset&&e.dataset.draw();a<r;++a)t[a].draw()},getStyle:function(e){var t=this,r=t.getMeta(),a=r.dataset,n;return t._configure(),a&&e===void 0?n=t._resolveDatasetElementOptions(a||{}):(e=e||0,n=t._resolveDataElementOptions(r.data[e]||{},e)),(n.fill===!1||n.fill===null)&&(n.backgroundColor=n.borderColor),n},_resolveDatasetElementOptions:function(e,t){var r=this,a=r.chart,n=r._config,i=e.custom||{},o=a.options.elements[r.datasetElementType.prototype._type]||{},l=r._datasetElementOptions,s={},u,d,f,c,v={chart:a,dataset:r.getDataset(),datasetIndex:r.index,hover:t};for(u=0,d=l.length;u<d;++u)f=l[u],c=t?"hover"+f.charAt(0).toUpperCase()+f.slice(1):f,s[f]=Me([i[c],n[c],o[c]],v);return s},_resolveDataElementOptions:function(e,t){var r=this,a=e&&e.custom,n=r._cachedDataOpts;if(n&&!a)return n;var i=r.chart,o=r._config,l=i.options.elements[r.dataElementType.prototype._type]||{},s=r._dataElementOptions,u={},d={chart:i,dataIndex:t,dataset:r.getDataset(),datasetIndex:r.index},f={cacheable:!a},c,v,g,p;if(a=a||{},h.isArray(s))for(v=0,g=s.length;v<g;++v)p=s[v],u[p]=Me([a[p],o[p],l[p]],d,t,f);else for(c=Object.keys(s),v=0,g=c.length;v<g;++v)p=c[v],u[p]=Me([a[p],o[s[p]],o[p],l[p]],d,t,f);return f.cacheable&&(r._cachedDataOpts=Object.freeze(u)),u},removeHoverStyle:function(e){h.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],r=e._index,a=e.custom||{},n=e._model,i=h.getHoverColor;e.$previousStyle={backgroundColor:n.backgroundColor,borderColor:n.borderColor,borderWidth:n.borderWidth},n.backgroundColor=Me([a.hoverBackgroundColor,t.hoverBackgroundColor,i(n.backgroundColor)],void 0,r),n.borderColor=Me([a.hoverBorderColor,t.hoverBorderColor,i(n.borderColor)],void 0,r),n.borderWidth=Me([a.hoverBorderWidth,t.hoverBorderWidth,n.borderWidth],void 0,r)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e=this.getMeta().dataset,t={},r,a,n,i,o,l;if(!!e){for(l=e._model,o=this._resolveDatasetElementOptions(e,!0),i=Object.keys(o),r=0,a=i.length;r<a;++r)n=i[r],t[n]=l[n],l[n]=o[n];e.$previousStyle=t}},resyncElements:function(){var e=this,t=e.getMeta(),r=e.getDataset().data,a=t.data.length,n=r.length;n<a?t.data.splice(n,a-n):n>a&&e.insertElements(a,n-a)},insertElements:function(e,t){for(var r=0;r<t;++r)this.addElementAndReset(e+r)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),mt.extend=h.inherits;var K=mt,te=Math.PI*2;_._set("global",{elements:{arc:{backgroundColor:_.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});function ir(e,t){var r=t.startAngle,a=t.endAngle,n=t.pixelMargin,i=n/t.outerRadius,o=t.x,l=t.y;e.beginPath(),e.arc(o,l,t.outerRadius,r-i,a+i),t.innerRadius>n?(i=n/t.innerRadius,e.arc(o,l,t.innerRadius-n,a+i,r-i,!0)):e.arc(o,l,n,a+Math.PI/2,r-Math.PI/2),e.closePath(),e.clip()}function Ra(e,t,r,a){var n=r.endAngle,i;for(a&&(r.endAngle=r.startAngle+te,ir(e,r),r.endAngle=n,r.endAngle===r.startAngle&&r.fullCircles&&(r.endAngle+=te,r.fullCircles--)),e.beginPath(),e.arc(r.x,r.y,r.innerRadius,r.startAngle+te,r.startAngle,!0),i=0;i<r.fullCircles;++i)e.stroke();for(e.beginPath(),e.arc(r.x,r.y,t.outerRadius,r.startAngle,r.startAngle+te),i=0;i<r.fullCircles;++i)e.stroke()}function Ba(e,t,r){var a=t.borderAlign==="inner";a?(e.lineWidth=t.borderWidth*2,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),r.fullCircles&&Ra(e,t,r,a),a&&ir(e,r),e.beginPath(),e.arc(r.x,r.y,t.outerRadius,r.startAngle,r.endAngle),e.arc(r.x,r.y,r.innerRadius,r.endAngle,r.startAngle,!0),e.closePath(),e.stroke()}var Na=ee.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return t?Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2):!1},inRange:function(e,t){var r=this._view;if(r){for(var a=h.getAngleFromPoint(r,{x:e,y:t}),n=a.angle,i=a.distance,o=r.startAngle,l=r.endAngle;l<o;)l+=te;for(;n>l;)n-=te;for(;n<o;)n+=te;var s=n>=o&&n<=l,u=i>=r.innerRadius&&i<=r.outerRadius;return s&&u}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,r=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,r=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*r,y:e.y+Math.sin(t)*r}},draw:function(){var e=this._chart.ctx,t=this._view,r=t.borderAlign==="inner"?.33:0,a={x:t.x,y:t.y,innerRadius:t.innerRadius,outerRadius:Math.max(t.outerRadius-r,0),pixelMargin:r,startAngle:t.startAngle,endAngle:t.endAngle,fullCircles:Math.floor(t.circumference/te)},n;if(e.save(),e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+te,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),n=0;n<a.fullCircles;++n)e.fill();a.endAngle=a.startAngle+t.circumference%te}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),t.borderWidth&&Ba(e,t,a),e.restore()}}),or=h.valueOrDefault,sr=_.global.defaultColor;_._set("global",{elements:{line:{tension:.4,backgroundColor:sr,borderWidth:3,borderColor:sr,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var za=ee.extend({_type:"line",draw:function(){var e=this,t=e._view,r=e._chart.ctx,a=t.spanGaps,n=e._children.slice(),i=_.global,o=i.elements.line,l=-1,s=e._loop,u,d,f;if(!!n.length){if(e._loop){for(u=0;u<n.length;++u)if(d=h.previousItem(n,u),!n[u]._view.skip&&d._view.skip){n=n.slice(u).concat(n.slice(0,u)),s=a;break}s&&n.push(n[0])}for(r.save(),r.lineCap=t.borderCapStyle||o.borderCapStyle,r.setLineDash&&r.setLineDash(t.borderDash||o.borderDash),r.lineDashOffset=or(t.borderDashOffset,o.borderDashOffset),r.lineJoin=t.borderJoinStyle||o.borderJoinStyle,r.lineWidth=or(t.borderWidth,o.borderWidth),r.strokeStyle=t.borderColor||i.defaultColor,r.beginPath(),f=n[0]._view,f.skip||(r.moveTo(f.x,f.y),l=0),u=1;u<n.length;++u)f=n[u]._view,d=l===-1?h.previousItem(n,u):n[l],f.skip||(l!==u-1&&!a||l===-1?r.moveTo(f.x,f.y):h.canvas.lineTo(r,d._view,f),l=u);s&&r.closePath(),r.stroke(),r.restore()}}}),Ea=h.valueOrDefault,lr=_.global.defaultColor;_._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:lr,borderColor:lr,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});function ur(e){var t=this._view;return t?Math.abs(e-t.x)<t.radius+t.hitRadius:!1}function Wa(e){var t=this._view;return t?Math.abs(e-t.y)<t.radius+t.hitRadius:!1}var Ha=ee.extend({_type:"point",inRange:function(e,t){var r=this._view;return r?Math.pow(e-r.x,2)+Math.pow(t-r.y,2)<Math.pow(r.hitRadius+r.radius,2):!1},inLabelRange:ur,inXRange:ur,inYRange:Wa,getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,r=this._chart.ctx,a=t.pointStyle,n=t.rotation,i=t.radius,o=t.x,l=t.y,s=_.global,u=s.defaultColor;t.skip||(e===void 0||h.canvas._isPointInArea(t,e))&&(r.strokeStyle=t.borderColor||u,r.lineWidth=Ea(t.borderWidth,s.elements.point.borderWidth),r.fillStyle=t.backgroundColor||u,h.canvas.drawPoint(r,a,i,o,l,n))}}),dr=_.global.defaultColor;_._set("global",{elements:{rectangle:{backgroundColor:dr,borderColor:dr,borderSkipped:"bottom",borderWidth:0}}});function Ke(e){return e&&e.width!==void 0}function fr(e){var t,r,a,n,i;return Ke(e)?(i=e.width/2,t=e.x-i,r=e.x+i,a=Math.min(e.y,e.base),n=Math.max(e.y,e.base)):(i=e.height/2,t=Math.min(e.x,e.base),r=Math.max(e.x,e.base),a=e.y-i,n=e.y+i),{left:t,top:a,right:r,bottom:n}}function hr(e,t,r){return e===t?r:e===r?t:e}function Va(e){var t=e.borderSkipped,r={};return t&&(e.horizontal?e.base>e.x&&(t=hr(t,"left","right")):e.base<e.y&&(t=hr(t,"bottom","top")),r[t]=!0),r}function ja(e,t,r){var a=e.borderWidth,n=Va(e),i,o,l,s;return h.isObject(a)?(i=+a.top||0,o=+a.right||0,l=+a.bottom||0,s=+a.left||0):i=o=l=s=+a||0,{t:n.top||i<0?0:i>r?r:i,r:n.right||o<0?0:o>t?t:o,b:n.bottom||l<0?0:l>r?r:l,l:n.left||s<0?0:s>t?t:s}}function qa(e){var t=fr(e),r=t.right-t.left,a=t.bottom-t.top,n=ja(e,r/2,a/2);return{outer:{x:t.left,y:t.top,w:r,h:a},inner:{x:t.left+n.l,y:t.top+n.t,w:r-n.l-n.r,h:a-n.t-n.b}}}function Re(e,t,r){var a=t===null,n=r===null,i=!e||a&&n?!1:fr(e);return i&&(a||t>=i.left&&t<=i.right)&&(n||r>=i.top&&r<=i.bottom)}var Ua=ee.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,r=qa(t),a=r.outer,n=r.inner;e.fillStyle=t.backgroundColor,e.fillRect(a.x,a.y,a.w,a.h),!(a.w===n.w&&a.h===n.h)&&(e.save(),e.beginPath(),e.rect(a.x,a.y,a.w,a.h),e.clip(),e.fillStyle=t.borderColor,e.rect(n.x,n.y,n.w,n.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return Re(this._view,e,t)},inLabelRange:function(e,t){var r=this._view;return Ke(r)?Re(r,e,null):Re(r,null,t)},inXRange:function(e){return Re(this._view,e,null)},inYRange:function(e){return Re(this._view,null,e)},getCenterPoint:function(){var e=this._view,t,r;return Ke(e)?(t=e.x,r=(e.y+e.base)/2):(t=(e.x+e.base)/2,r=e.y),{x:t,y:r}},getArea:function(){var e=this._view;return Ke(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),E={},$a=Na,Ya=za,Ga=Ha,Xa=Ua;E.Arc=$a,E.Line=Ya,E.Point=Ga,E.Rectangle=Xa;var Be=h._deprecated,Se=h.valueOrDefault;_._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),_._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});function Ka(e,t){var r=e._length,a,n,i,o;for(i=1,o=t.length;i<o;++i)r=Math.min(r,Math.abs(t[i]-t[i-1]));for(i=0,o=e.getTicks().length;i<o;++i)n=e.getPixelForTick(i),r=i>0?Math.min(r,Math.abs(n-a)):r,a=n;return r}function Za(e,t,r){var a=r.barThickness,n=t.stackCount,i=t.pixels[e],o=h.isNullOrUndef(a)?Ka(t.scale,t.pixels):-1,l,s;return h.isNullOrUndef(a)?(l=o*r.categoryPercentage,s=r.barPercentage):(l=a*n,s=1),{chunk:l/n,ratio:s,start:i-l/2}}function Ja(e,t,r){var a=t.pixels,n=a[e],i=e>0?a[e-1]:null,o=e<a.length-1?a[e+1]:null,l=r.categoryPercentage,s,u;return i===null&&(i=n-(o===null?t.end-t.start:o-n)),o===null&&(o=n+n-i),s=n-(n-Math.min(i,o))/2*l,u=Math.abs(o-i)/2*l,{chunk:u/t.stackCount,ratio:r.barPercentage,start:s}}var cr=K.extend({dataElementType:E.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e=this,t,r;K.prototype.initialize.apply(e,arguments),t=e.getMeta(),t.stack=e.getDataset().stack,t.bar=!0,r=e._getIndexScale().options,Be("bar chart",r.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Be("bar chart",r.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Be("bar chart",r.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Be("bar chart",e._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Be("bar chart",r.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t=this,r=t.getMeta().data,a,n;for(t._ruler=t.getRuler(),a=0,n=r.length;a<n;++a)t.updateElement(r[a],a,e)},updateElement:function(e,t,r){var a=this,n=a.getMeta(),i=a.getDataset(),o=a._resolveDataElementOptions(e,t);e._xScale=a.getScaleForId(n.xAxisID),e._yScale=a.getScaleForId(n.yAxisID),e._datasetIndex=a.index,e._index=t,e._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:i.label,label:a.chart.data.labels[t]},h.isArray(i.data[t])&&(e._model.borderSkipped=null),a._updateElementGeometry(e,t,r,o),e.pivot()},_updateElementGeometry:function(e,t,r,a){var n=this,i=e._model,o=n._getValueScale(),l=o.getBasePixel(),s=o.isHorizontal(),u=n._ruler||n.getRuler(),d=n.calculateBarValuePixels(n.index,t,a),f=n.calculateBarIndexPixels(n.index,t,u,a);i.horizontal=s,i.base=r?l:d.base,i.x=s?r?l:d.head:f.center,i.y=s?f.center:r?l:d.head,i.height=s?f.size:void 0,i.width=s?void 0:f.size},_getStacks:function(e){var t=this,r=t._getIndexScale(),a=r._getMatchingVisibleMetas(t._type),n=r.options.stacked,i=a.length,o=[],l,s;for(l=0;l<i&&(s=a[l],(n===!1||o.indexOf(s.stack)===-1||n===void 0&&s.stack===void 0)&&o.push(s.stack),s.index!==e);++l);return o},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var r=this._getStacks(e),a=t!==void 0?r.indexOf(t):-1;return a===-1?r.length-1:a},getRuler:function(){var e=this,t=e._getIndexScale(),r=[],a,n;for(a=0,n=e.getMeta().data.length;a<n;++a)r.push(t.getPixelForValue(null,a,e.index));return{pixels:r,start:t._startPixel,end:t._endPixel,stackCount:e.getStackCount(),scale:t}},calculateBarValuePixels:function(e,t,r){var a=this,n=a.chart,i=a._getValueScale(),o=i.isHorizontal(),l=n.data.datasets,s=i._getMatchingVisibleMetas(a._type),u=i._parseValue(l[e].data[t]),d=r.minBarLength,f=i.options.stacked,c=a.getMeta().stack,v=u.start===void 0?0:u.max>=0&&u.min>=0?u.min:u.max,g=u.start===void 0?u.end:u.max>=0&&u.min>=0?u.max-u.min:u.min-u.max,p=s.length,m,b,x,y,w,k,D;if(f||f===void 0&&c!==void 0)for(m=0;m<p&&(b=s[m],b.index!==e);++m)b.stack===c&&(D=i._parseValue(l[b.index].data[t]),x=D.start===void 0?D.end:D.min>=0&&D.max>=0?D.max:D.min,(u.min<0&&x<0||u.max>=0&&x>0)&&(v+=x));return y=i.getPixelForValue(v),w=i.getPixelForValue(v+g),k=w-y,d!==void 0&&Math.abs(k)<d&&(k=d,g>=0&&!o||g<0&&o?w=y-d:w=y+d),{size:k,base:y,head:w,center:w+k/2}},calculateBarIndexPixels:function(e,t,r,a){var n=this,i=a.barThickness==="flex"?Ja(t,r,a):Za(t,r,a),o=n.getStackIndex(e,n.getMeta().stack),l=i.start+i.chunk*o+i.chunk/2,s=Math.min(Se(a.maxBarThickness,1/0),i.chunk*i.ratio);return{base:l-s/2,head:l+s/2,center:l,size:s}},draw:function(){var e=this,t=e.chart,r=e._getValueScale(),a=e.getMeta().data,n=e.getDataset(),i=a.length,o=0;for(h.canvas.clipArea(t.ctx,t.chartArea);o<i;++o){var l=r._parseValue(n.data[o]);!isNaN(l.min)&&!isNaN(l.max)&&a[o].draw()}h.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var e=this,t=h.extend({},K.prototype._resolveDataElementOptions.apply(e,arguments)),r=e._getIndexScale().options,a=e._getValueScale().options;return t.barPercentage=Se(r.barPercentage,t.barPercentage),t.barThickness=Se(r.barThickness,t.barThickness),t.categoryPercentage=Se(r.categoryPercentage,t.categoryPercentage),t.maxBarThickness=Se(r.maxBarThickness,t.maxBarThickness),t.minBarLength=Se(a.minBarLength,t.minBarLength),t}}),bt=h.valueOrDefault,Qa=h.options.resolve;_._set("bubble",{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(){return""},label:function(e,t){var r=t.datasets[e.datasetIndex].label||"",a=t.datasets[e.datasetIndex].data[e.index];return r+": ("+e.xLabel+", "+e.yLabel+", "+a.r+")"}}}});var en=K.extend({dataElementType:E.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(e){var t=this,r=t.getMeta(),a=r.data;h.each(a,function(n,i){t.updateElement(n,i,e)})},updateElement:function(e,t,r){var a=this,n=a.getMeta(),i=e.custom||{},o=a.getScaleForId(n.xAxisID),l=a.getScaleForId(n.yAxisID),s=a._resolveDataElementOptions(e,t),u=a.getDataset().data[t],d=a.index,f=r?o.getPixelForDecimal(.5):o.getPixelForValue(typeof u=="object"?u:NaN,t,d),c=r?l.getBasePixel():l.getPixelForValue(u,t,d);e._xScale=o,e._yScale=l,e._options=s,e._datasetIndex=d,e._index=t,e._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,rotation:s.rotation,radius:r?0:s.radius,skip:i.skip||isNaN(f)||isNaN(c),x:f,y:c},e.pivot()},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=bt(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=bt(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=bt(r.hoverBorderWidth,r.borderWidth),t.radius=r.radius+r.hoverRadius},_resolveDataElementOptions:function(e,t){var r=this,a=r.chart,n=r.getDataset(),i=e.custom||{},o=n.data[t]||{},l=K.prototype._resolveDataElementOptions.apply(r,arguments),s={chart:a,dataIndex:t,dataset:n,datasetIndex:r.index};return r._cachedDataOpts===l&&(l=h.extend({},l)),l.radius=Qa([i.radius,o.r,r._config.radius,a.options.elements.point.radius],s,t),l}}),Ze=h.valueOrDefault,ve=Math.PI,ne=ve*2,ge=ve/2;_._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t=document.createElement("ul"),r=e.data,a=r.datasets,n=r.labels,i,o,l,s;if(t.setAttribute("class",e.id+"-legend"),a.length)for(i=0,o=a[0].data.length;i<o;++i)l=t.appendChild(document.createElement("li")),s=l.appendChild(document.createElement("span")),s.style.backgroundColor=a[0].backgroundColor[i],n[i]&&l.appendChild(document.createTextNode(n[i]));return t.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(r,a){var n=e.getDatasetMeta(0),i=n.controller.getStyle(a);return{text:r,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(t.datasets[0].data[a])||n.data[a].hidden,index:a}}):[]}},onClick:function(e,t){var r=t.index,a=this.chart,n,i,o;for(n=0,i=(a.data.datasets||[]).length;n<i;++n)o=a.getDatasetMeta(n),o.data[r]&&(o.data[r].hidden=!o.data[r].hidden);a.update()}},cutoutPercentage:50,rotation:-ge,circumference:ne,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var r=t.labels[e.index],a=": "+t.datasets[e.datasetIndex].data[e.index];return h.isArray(r)?(r=r.slice(),r[0]+=a):r+=a,r}}}});var vr=K.extend({dataElementType:E.Arc,linkScales:h.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,r=0;r<e;++r)this.chart.isDatasetVisible(r)&&++t;return t},update:function(e){var t=this,r=t.chart,a=r.chartArea,n=r.options,i=1,o=1,l=0,s=0,u=t.getMeta(),d=u.data,f=n.cutoutPercentage/100||0,c=n.circumference,v=t._getRingWeight(t.index),g,p,m,b;if(c<ne){var x=n.rotation%ne;x+=x>=ve?-ne:x<-ve?ne:0;var y=x+c,w=Math.cos(x),k=Math.sin(x),D=Math.cos(y),C=Math.sin(y),P=x<=0&&y>=0||y>=ne,T=x<=ge&&y>=ge||y>=ne+ge,R=x===-ve||y>=ve,L=x<=-ge&&y>=-ge||y>=ve+ge,I=R?-1:Math.min(w,w*f,D,D*f),B=L?-1:Math.min(k,k*f,C,C*f),Te=P?1:Math.max(w,w*f,D,D*f),Fe=T?1:Math.max(k,k*f,C,C*f);i=(Te-I)/2,o=(Fe-B)/2,l=-(Te+I)/2,s=-(Fe+B)/2}for(m=0,b=d.length;m<b;++m)d[m]._options=t._resolveDataElementOptions(d[m],m);for(r.borderWidth=t.getMaxBorderWidth(),g=(a.right-a.left-r.borderWidth)/i,p=(a.bottom-a.top-r.borderWidth)/o,r.outerRadius=Math.max(Math.min(g,p)/2,0),r.innerRadius=Math.max(r.outerRadius*f,0),r.radiusLength=(r.outerRadius-r.innerRadius)/(t._getVisibleDatasetWeightTotal()||1),r.offsetX=l*r.outerRadius,r.offsetY=s*r.outerRadius,u.total=t.calculateTotal(),t.outerRadius=r.outerRadius-r.radiusLength*t._getRingWeightOffset(t.index),t.innerRadius=Math.max(t.outerRadius-r.radiusLength*v,0),m=0,b=d.length;m<b;++m)t.updateElement(d[m],m,e)},updateElement:function(e,t,r){var a=this,n=a.chart,i=n.chartArea,o=n.options,l=o.animation,s=(i.left+i.right)/2,u=(i.top+i.bottom)/2,d=o.rotation,f=o.rotation,c=a.getDataset(),v=r&&l.animateRotate||e.hidden?0:a.calculateCircumference(c.data[t])*(o.circumference/ne),g=r&&l.animateScale?0:a.innerRadius,p=r&&l.animateScale?0:a.outerRadius,m=e._options||{};h.extend(e,{_datasetIndex:a.index,_index:t,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:s+n.offsetX,y:u+n.offsetY,startAngle:d,endAngle:f,circumference:v,outerRadius:p,innerRadius:g,label:h.valueAtIndexOrDefault(c.label,t,n.data.labels[t])}});var b=e._model;(!r||!l.animateRotate)&&(t===0?b.startAngle=o.rotation:b.startAngle=a.getMeta().data[t-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),e.pivot()},calculateTotal:function(){var e=this.getDataset(),t=this.getMeta(),r=0,a;return h.each(t.data,function(n,i){a=e.data[i],!isNaN(a)&&!n.hidden&&(r+=Math.abs(a))}),r},calculateCircumference:function(e){var t=this.getMeta().total;return t>0&&!isNaN(e)?ne*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t=this,r=0,a=t.chart,n,i,o,l,s,u,d,f;if(!e){for(n=0,i=a.data.datasets.length;n<i;++n)if(a.isDatasetVisible(n)){o=a.getDatasetMeta(n),e=o.data,n!==t.index&&(s=o.controller);break}}if(!e)return 0;for(n=0,i=e.length;n<i;++n)l=e[n],s?(s._configure(),u=s._resolveDataElementOptions(l,n)):u=l._options,u.borderAlign!=="inner"&&(d=u.borderWidth,f=u.hoverBorderWidth,r=d>r?d:r,r=f>r?f:r);return r},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Ze(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=Ze(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=Ze(r.hoverBorderWidth,r.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(t+=this._getRingWeight(r));return t},_getRingWeight:function(e){return Math.max(Ze(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});_._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),_._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var tn=cr.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),ie=h.valueOrDefault,rn=h.options.resolve,xt=h.canvas._isPointInArea;_._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});function gr(e,t){var r=e&&e.options.ticks||{},a=r.reverse,n=r.min===void 0?t:0,i=r.max===void 0?t:0;return{start:a?i:n,end:a?n:i}}function an(e,t,r){var a=r/2,n=gr(e,a),i=gr(t,a);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function nn(e){var t,r,a,n;return h.isObject(e)?(t=e.top,r=e.right,a=e.bottom,n=e.left):t=r=a=n=e,{top:t,right:r,bottom:a,left:n}}var pr=K.extend({datasetElementType:E.Line,dataElementType:E.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t=this,r=t.getMeta(),a=r.dataset,n=r.data||[],i=t.chart.options,o=t._config,l=t._showLine=ie(o.showLine,i.showLines),s,u;for(t._xScale=t.getScaleForId(r.xAxisID),t._yScale=t.getScaleForId(r.yAxisID),l&&(o.tension!==void 0&&o.lineTension===void 0&&(o.lineTension=o.tension),a._scale=t._yScale,a._datasetIndex=t.index,a._children=n,a._model=t._resolveDatasetElementOptions(a),a.pivot()),s=0,u=n.length;s<u;++s)t.updateElement(n[s],s,e);for(l&&a._model.tension!==0&&t.updateBezierControlPoints(),s=0,u=n.length;s<u;++s)n[s].pivot()},updateElement:function(e,t,r){var a=this,n=a.getMeta(),i=e.custom||{},o=a.getDataset(),l=a.index,s=o.data[t],u=a._xScale,d=a._yScale,f=n.dataset._model,c,v,g=a._resolveDataElementOptions(e,t);c=u.getPixelForValue(typeof s=="object"?s:NaN,t,l),v=r?d.getBasePixel():a.calculatePointY(s,t,l),e._xScale=u,e._yScale=d,e._options=g,e._datasetIndex=l,e._index=t,e._model={x:c,y:v,skip:i.skip||isNaN(c)||isNaN(v),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:ie(i.tension,f?f.tension:0),steppedLine:f?f.steppedLine:!1,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(e){var t=this,r=t._config,a=e.custom||{},n=t.chart.options,i=n.elements.line,o=K.prototype._resolveDatasetElementOptions.apply(t,arguments);return o.spanGaps=ie(r.spanGaps,n.spanGaps),o.tension=ie(r.lineTension,i.tension),o.steppedLine=rn([a.steppedLine,r.steppedLine,i.stepped]),o.clip=nn(ie(r.clip,an(t._xScale,t._yScale,o.borderWidth))),o},calculatePointY:function(e,t,r){var a=this,n=a.chart,i=a._yScale,o=0,l=0,s,u,d,f,c,v,g;if(i.options.stacked){for(c=+i.getRightValue(e),v=n._getSortedVisibleDatasetMetas(),g=v.length,s=0;s<g&&(d=v[s],d.index!==r);++s)u=n.data.datasets[d.index],d.type==="line"&&d.yAxisID===i.id&&(f=+i.getRightValue(u.data[t]),f<0?l+=f||0:o+=f||0);return c<0?i.getPixelForValue(l+c):i.getPixelForValue(o+c)}return i.getPixelForValue(e)},updateBezierControlPoints:function(){var e=this,t=e.chart,r=e.getMeta(),a=r.dataset._model,n=t.chartArea,i=r.data||[],o,l,s,u;a.spanGaps&&(i=i.filter(function(f){return!f._model.skip}));function d(f,c,v){return Math.max(Math.min(f,v),c)}if(a.cubicInterpolationMode==="monotone")h.splineCurveMonotone(i);else for(o=0,l=i.length;o<l;++o)s=i[o]._model,u=h.splineCurve(h.previousItem(i,o)._model,s,h.nextItem(i,o)._model,a.tension),s.controlPointPreviousX=u.previous.x,s.controlPointPreviousY=u.previous.y,s.controlPointNextX=u.next.x,s.controlPointNextY=u.next.y;if(t.options.elements.line.capBezierPoints)for(o=0,l=i.length;o<l;++o)s=i[o]._model,xt(s,n)&&(o>0&&xt(i[o-1]._model,n)&&(s.controlPointPreviousX=d(s.controlPointPreviousX,n.left,n.right),s.controlPointPreviousY=d(s.controlPointPreviousY,n.top,n.bottom)),o<i.length-1&&xt(i[o+1]._model,n)&&(s.controlPointNextX=d(s.controlPointNextX,n.left,n.right),s.controlPointNextY=d(s.controlPointNextY,n.top,n.bottom)))},draw:function(){var e=this,t=e.chart,r=e.getMeta(),a=r.data||[],n=t.chartArea,i=t.canvas,o=0,l=a.length,s;for(e._showLine&&(s=r.dataset._model.clip,h.canvas.clipArea(t.ctx,{left:s.left===!1?0:n.left-s.left,right:s.right===!1?i.width:n.right+s.right,top:s.top===!1?0:n.top-s.top,bottom:s.bottom===!1?i.height:n.bottom+s.bottom}),r.dataset.draw(),h.canvas.unclipArea(t.ctx));o<l;++o)a[o].draw(n)},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=ie(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=ie(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=ie(r.hoverBorderWidth,r.borderWidth),t.radius=ie(r.hoverRadius,r.radius)}}),on=h.options.resolve;_._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t=document.createElement("ul"),r=e.data,a=r.datasets,n=r.labels,i,o,l,s;if(t.setAttribute("class",e.id+"-legend"),a.length)for(i=0,o=a[0].data.length;i<o;++i)l=t.appendChild(document.createElement("li")),s=l.appendChild(document.createElement("span")),s.style.backgroundColor=a[0].backgroundColor[i],n[i]&&l.appendChild(document.createTextNode(n[i]));return t.outerHTML},legend:{labels:{generateLabels:function(e){var t=e.data;return t.labels.length&&t.datasets.length?t.labels.map(function(r,a){var n=e.getDatasetMeta(0),i=n.controller.getStyle(a);return{text:r,fillStyle:i.backgroundColor,strokeStyle:i.borderColor,lineWidth:i.borderWidth,hidden:isNaN(t.datasets[0].data[a])||n.data[a].hidden,index:a}}):[]}},onClick:function(e,t){var r=t.index,a=this.chart,n,i,o;for(n=0,i=(a.data.datasets||[]).length;n<i;++n)o=a.getDatasetMeta(n),o.data[r].hidden=!o.data[r].hidden;a.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var sn=K.extend({dataElementType:E.Arc,linkScales:h.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t=this,r=t.getDataset(),a=t.getMeta(),n=t.chart.options.startAngle||0,i=t._starts=[],o=t._angles=[],l=a.data,s,u,d;for(t._updateRadius(),a.count=t.countVisibleElements(),s=0,u=r.data.length;s<u;s++)i[s]=n,d=t._computeAngle(s),o[s]=d,n+=d;for(s=0,u=l.length;s<u;++s)l[s]._options=t._resolveDataElementOptions(l[s],s),t.updateElement(l[s],s,e)},_updateRadius:function(){var e=this,t=e.chart,r=t.chartArea,a=t.options,n=Math.min(r.right-r.left,r.bottom-r.top);t.outerRadius=Math.max(n/2,0),t.innerRadius=Math.max(a.cutoutPercentage?t.outerRadius/100*a.cutoutPercentage:1,0),t.radiusLength=(t.outerRadius-t.innerRadius)/t.getVisibleDatasetCount(),e.outerRadius=t.outerRadius-t.radiusLength*e.index,e.innerRadius=e.outerRadius-t.radiusLength},updateElement:function(e,t,r){var a=this,n=a.chart,i=a.getDataset(),o=n.options,l=o.animation,s=n.scale,u=n.data.labels,d=s.xCenter,f=s.yCenter,c=o.startAngle,v=e.hidden?0:s.getDistanceFromCenterForValue(i.data[t]),g=a._starts[t],p=g+(e.hidden?0:a._angles[t]),m=l.animateScale?0:s.getDistanceFromCenterForValue(i.data[t]),b=e._options||{};h.extend(e,{_datasetIndex:a.index,_index:t,_scale:s,_model:{backgroundColor:b.backgroundColor,borderColor:b.borderColor,borderWidth:b.borderWidth,borderAlign:b.borderAlign,x:d,y:f,innerRadius:0,outerRadius:r?m:v,startAngle:r&&l.animateRotate?c:g,endAngle:r&&l.animateRotate?c:p,label:h.valueAtIndexOrDefault(u,t,u[t])}}),e.pivot()},countVisibleElements:function(){var e=this.getDataset(),t=this.getMeta(),r=0;return h.each(t.data,function(a,n){!isNaN(e.data[n])&&!a.hidden&&r++}),r},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor,n=h.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=n(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=n(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=n(r.hoverBorderWidth,r.borderWidth)},_computeAngle:function(e){var t=this,r=this.getMeta().count,a=t.getDataset(),n=t.getMeta();if(isNaN(a.data[e])||n.data[e].hidden)return 0;var i={chart:t.chart,dataIndex:e,dataset:a,datasetIndex:t.index};return on([t.chart.options.elements.arc.angle,2*Math.PI/r],i,e)}});_._set("pie",h.clone(_.doughnut)),_._set("pie",{cutoutPercentage:0});var ln=vr,pe=h.valueOrDefault;_._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var un=K.extend({datasetElementType:E.Line,dataElementType:E.Point,linkScales:h.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t=this,r=t.getMeta(),a=r.dataset,n=r.data||[],i=t.chart.scale,o=t._config,l,s;for(o.tension!==void 0&&o.lineTension===void 0&&(o.lineTension=o.tension),a._scale=i,a._datasetIndex=t.index,a._children=n,a._loop=!0,a._model=t._resolveDatasetElementOptions(a),a.pivot(),l=0,s=n.length;l<s;++l)t.updateElement(n[l],l,e);for(t.updateBezierControlPoints(),l=0,s=n.length;l<s;++l)n[l].pivot()},updateElement:function(e,t,r){var a=this,n=e.custom||{},i=a.getDataset(),o=a.chart.scale,l=o.getPointPositionForValue(t,i.data[t]),s=a._resolveDataElementOptions(e,t),u=a.getMeta().dataset._model,d=r?o.xCenter:l.x,f=r?o.yCenter:l.y;e._scale=o,e._options=s,e._datasetIndex=a.index,e._index=t,e._model={x:d,y:f,skip:n.skip||isNaN(d)||isNaN(f),radius:s.radius,pointStyle:s.pointStyle,rotation:s.rotation,backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,tension:pe(n.tension,u?u.tension:0),hitRadius:s.hitRadius}},_resolveDatasetElementOptions:function(){var e=this,t=e._config,r=e.chart.options,a=K.prototype._resolveDatasetElementOptions.apply(e,arguments);return a.spanGaps=pe(t.spanGaps,r.spanGaps),a.tension=pe(t.lineTension,r.elements.line.tension),a},updateBezierControlPoints:function(){var e=this,t=e.getMeta(),r=e.chart.chartArea,a=t.data||[],n,i,o,l;t.dataset._model.spanGaps&&(a=a.filter(function(u){return!u._model.skip}));function s(u,d,f){return Math.max(Math.min(u,f),d)}for(n=0,i=a.length;n<i;++n)o=a[n]._model,l=h.splineCurve(h.previousItem(a,n,!0)._model,o,h.nextItem(a,n,!0)._model,o.tension),o.controlPointPreviousX=s(l.previous.x,r.left,r.right),o.controlPointPreviousY=s(l.previous.y,r.top,r.bottom),o.controlPointNextX=s(l.next.x,r.left,r.right),o.controlPointNextY=s(l.next.y,r.top,r.bottom)},setHoverStyle:function(e){var t=e._model,r=e._options,a=h.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=pe(r.hoverBackgroundColor,a(r.backgroundColor)),t.borderColor=pe(r.hoverBorderColor,a(r.borderColor)),t.borderWidth=pe(r.hoverBorderWidth,r.borderWidth),t.radius=pe(r.hoverRadius,r.radius)}});_._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),_._set("global",{datasets:{scatter:{showLine:!1}}});var dn=pr,mr={bar:cr,bubble:en,doughnut:vr,horizontalBar:tn,line:pr,polarArea:sn,pie:ln,radar:un,scatter:dn};function me(e,t){return e.native?{x:e.x,y:e.y}:h.getRelativePosition(e,t)}function Ne(e,t){var r=e._getSortedVisibleDatasetMetas(),a,n,i,o,l,s;for(n=0,o=r.length;n<o;++n)for(a=r[n].data,i=0,l=a.length;i<l;++i)s=a[i],s._view.skip||t(s)}function yt(e,t){var r=[];return Ne(e,function(a){a.inRange(t.x,t.y)&&r.push(a)}),r}function _t(e,t,r,a){var n=Number.POSITIVE_INFINITY,i=[];return Ne(e,function(o){if(!(r&&!o.inRange(t.x,t.y))){var l=o.getCenterPoint(),s=a(t,l);s<n?(i=[o],n=s):s===n&&i.push(o)}}),i}function kt(e){var t=e.indexOf("x")!==-1,r=e.indexOf("y")!==-1;return function(a,n){var i=t?Math.abs(a.x-n.x):0,o=r?Math.abs(a.y-n.y):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2))}}function wt(e,t,r){var a=me(t,e);r.axis=r.axis||"x";var n=kt(r.axis),i=r.intersect?yt(e,a):_t(e,a,!1,n),o=[];return i.length?(e._getSortedVisibleDatasetMetas().forEach(function(l){var s=l.data[i[0]._index];s&&!s._view.skip&&o.push(s)}),o):[]}var Ce={modes:{single:function(e,t){var r=me(t,e),a=[];return Ne(e,function(n){if(n.inRange(r.x,r.y))return a.push(n),a}),a.slice(0,1)},label:wt,index:wt,dataset:function(e,t,r){var a=me(t,e);r.axis=r.axis||"xy";var n=kt(r.axis),i=r.intersect?yt(e,a):_t(e,a,!1,n);return i.length>0&&(i=e.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(e,t){return wt(e,t,{intersect:!1})},point:function(e,t){var r=me(t,e);return yt(e,r)},nearest:function(e,t,r){var a=me(t,e);r.axis=r.axis||"xy";var n=kt(r.axis);return _t(e,a,r.intersect,n)},x:function(e,t,r){var a=me(t,e),n=[],i=!1;return Ne(e,function(o){o.inXRange(a.x)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n},y:function(e,t,r){var a=me(t,e),n=[],i=!1;return Ne(e,function(o){o.inYRange(a.y)&&n.push(o),o.inRange(a.x,a.y)&&(i=!0)}),r.intersect&&!i&&(n=[]),n}}},Mt=h.extend;function ze(e,t){return h.where(e,function(r){return r.pos===t})}function Je(e,t){return e.sort(function(r,a){var n=t?a:r,i=t?r:a;return n.weight===i.weight?n.index-i.index:n.weight-i.weight})}function fn(e){var t=[],r,a,n;for(r=0,a=(e||[]).length;r<a;++r)n=e[r],t.push({index:r,box:n,pos:n.position,horizontal:n.isHorizontal(),weight:n.weight});return t}function hn(e,t){var r,a,n;for(r=0,a=e.length;r<a;++r)n=e[r],n.width=n.horizontal?n.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,n.height=n.horizontal&&t.hBoxMaxHeight}function cn(e){var t=fn(e),r=Je(ze(t,"left"),!0),a=Je(ze(t,"right")),n=Je(ze(t,"top"),!0),i=Je(ze(t,"bottom"));return{leftAndTop:r.concat(n),rightAndBottom:a.concat(i),chartArea:ze(t,"chartArea"),vertical:r.concat(a),horizontal:n.concat(i)}}function br(e,t,r,a){return Math.max(e[r],t[r])+Math.max(e[a],t[a])}function vn(e,t,r){var a=r.box,n=e.maxPadding,i,o;if(r.size&&(e[r.pos]-=r.size),r.size=r.horizontal?a.height:a.width,e[r.pos]+=r.size,a.getPadding){var l=a.getPadding();n.top=Math.max(n.top,l.top),n.left=Math.max(n.left,l.left),n.bottom=Math.max(n.bottom,l.bottom),n.right=Math.max(n.right,l.right)}if(i=t.outerWidth-br(n,e,"left","right"),o=t.outerHeight-br(n,e,"top","bottom"),i!==e.w||o!==e.h){e.w=i,e.h=o;var s=r.horizontal?[i,e.w]:[o,e.h];return s[0]!==s[1]&&(!isNaN(s[0])||!isNaN(s[1]))}}function gn(e){var t=e.maxPadding;function r(a){var n=Math.max(t[a]-e[a],0);return e[a]+=n,n}e.y+=r("top"),e.x+=r("left"),r("right"),r("bottom")}function pn(e,t){var r=t.maxPadding;function a(n){var i={left:0,top:0,right:0,bottom:0};return n.forEach(function(o){i[o]=Math.max(t[o],r[o])}),i}return a(e?["left","right"]:["top","bottom"])}function Qe(e,t,r){var a=[],n,i,o,l,s,u;for(n=0,i=e.length;n<i;++n)o=e[n],l=o.box,l.update(o.width||t.w,o.height||t.h,pn(o.horizontal,t)),vn(t,r,o)&&(u=!0,a.length&&(s=!0)),l.fullWidth||a.push(o);return s&&Qe(a,t,r)||u}function xr(e,t,r){var a=r.padding,n=t.x,i=t.y,o,l,s,u;for(o=0,l=e.length;o<l;++o)s=e[o],u=s.box,s.horizontal?(u.left=u.fullWidth?a.left:t.left,u.right=u.fullWidth?r.outerWidth-a.right:t.left+t.w,u.top=i,u.bottom=i+u.height,u.width=u.right-u.left,i=u.bottom):(u.left=n,u.right=n+u.width,u.top=t.top,u.bottom=t.top+t.h,u.height=u.bottom-u.top,n=u.right);t.x=n,t.y=i}_._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var Z={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var r=e.boxes?e.boxes.indexOf(t):-1;r!==-1&&e.boxes.splice(r,1)},configure:function(e,t,r){for(var a=["fullWidth","position","weight"],n=a.length,i=0,o;i<n;++i)o=a[i],r.hasOwnProperty(o)&&(t[o]=r[o])},update:function(e,t,r){if(!!e){var a=e.options.layout||{},n=h.options.toPadding(a.padding),i=t-n.width,o=r-n.height,l=cn(e.boxes),s=l.vertical,u=l.horizontal,d=Object.freeze({outerWidth:t,outerHeight:r,padding:n,availableWidth:i,vBoxMaxWidth:i/2/s.length,hBoxMaxHeight:o/2}),f=Mt({maxPadding:Mt({},n),w:i,h:o,x:n.left,y:n.top},n);hn(s.concat(u),d),Qe(s,f,d),Qe(u,f,d)&&Qe(s,f,d),gn(f),xr(l.leftAndTop,f,d),f.x+=f.w,f.y+=f.h,xr(l.rightAndBottom,f,d),e.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h},h.each(l.chartArea,function(c){var v=c.box;Mt(v,e.chartArea),v.update(f.w,f.h)})}}},mn={acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},bn=`/*\r
* DOM element rendering detection\r
* https://davidwalsh.name/detect-node-insertion\r
*/\r
@keyframes chartjs-render-animation {\r
from { opacity: 0.99; }\r
to { opacity: 1; }\r
}\r
\r
.chartjs-render-monitor {\r
animation: chartjs-render-animation 0.001s;\r
}\r
\r
/*\r
* DOM element resizing detection\r
* https://github.com/marcj/css-element-queries\r
*/\r
.chartjs-size-monitor,\r
.chartjs-size-monitor-expand,\r
.chartjs-size-monitor-shrink {\r
position: absolute;\r
direction: ltr;\r
left: 0;\r
top: 0;\r
right: 0;\r
bottom: 0;\r
overflow: hidden;\r
pointer-events: none;\r
visibility: hidden;\r
z-index: -1;\r
}\r
\r
.chartjs-size-monitor-expand > div {\r
position: absolute;\r
width: 1000000px;\r
height: 1000000px;\r
left: 0;\r
top: 0;\r
}\r
\r
.chartjs-size-monitor-shrink > div {\r
position: absolute;\r
width: 200%;\r
height: 200%;\r
left: 0;\r
top: 0;\r
}\r
`,xn=Object.freeze({__proto__:null,default:bn}),yn=Ie(xn),N="$chartjs",St="chartjs-",Ct=St+"size-monitor",yr=St+"render-monitor",_n=St+"render-animation",_r=["animationstart","webkitAnimationStart"],kn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function kr(e,t){var r=h.getStyle(e,t),a=r&&r.match(/^(\d+)(\.\d+)?px$/);return a?Number(a[1]):void 0}function wn(e,t){var r=e.style,a=e.getAttribute("height"),n=e.getAttribute("width");if(e[N]={initial:{height:a,width:n,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",n===null||n===""){var i=kr(e,"width");i!==void 0&&(e.width=i)}if(a===null||a==="")if(e.style.height==="")e.height=e.width/(t.options.aspectRatio||2);else{var o=kr(e,"height");i!==void 0&&(e.height=o)}return e}var Mn=function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch{}return e}(),wr=Mn?{passive:!0}:!1;function Ee(e,t,r){e.addEventListener(t,r,wr)}function Dt(e,t,r){e.removeEventListener(t,r,wr)}function Pt(e,t,r,a,n){return{type:e,chart:t,native:n||null,x:r!==void 0?r:null,y:a!==void 0?a:null}}function Sn(e,t){var r=kn[e.type]||e.type,a=h.getRelativePosition(e,t);return Pt(r,t,a.x,a.y,e)}function Cn(e,t){var r=!1,a=[];return function(){a=Array.prototype.slice.call(arguments),t=t||this,r||(r=!0,h.requestAnimFrame.call(window,function(){r=!1,e.apply(t,a)}))}}function We(e){var t=document.createElement("div");return t.className=e||"",t}function Dn(e){var t=1e6,r=We(Ct),a=We(Ct+"-expand"),n=We(Ct+"-shrink");a.appendChild(We()),n.appendChild(We()),r.appendChild(a),r.appendChild(n),r._reset=function(){a.scrollLeft=t,a.scrollTop=t,n.scrollLeft=t,n.scrollTop=t};var i=function(){r._reset(),e()};return Ee(a,"scroll",i.bind(a,"expand")),Ee(n,"scroll",i.bind(n,"shrink")),r}function Pn(e,t){var r=e[N]||(e[N]={}),a=r.renderProxy=function(n){n.animationName===_n&&t()};h.each(_r,function(n){Ee(e,n,a)}),r.reflow=!!e.offsetParent,e.classList.add(yr)}function An(e){var t=e[N]||{},r=t.renderProxy;r&&(h.each(_r,function(a){Dt(e,a,r)}),delete t.renderProxy),e.classList.remove(yr)}function Tn(e,t,r){var a=e[N]||(e[N]={}),n=a.resizer=Dn(Cn(function(){if(a.resizer){var i=r.options.maintainAspectRatio&&e.parentNode,o=i?i.clientWidth:0;t(Pt("resize",r)),i&&i.clientWidth<o&&r.canvas&&t(Pt("resize",r))}}));Pn(e,function(){if(a.resizer){var i=e.parentNode;i&&i!==n.parentNode&&i.insertBefore(n,i.firstChild),n._reset()}})}function Fn(e){var t=e[N]||{},r=t.resizer;delete t.resizer,An(e),r&&r.parentNode&&r.parentNode.removeChild(r)}function In(e,t){var r=e[N]||(e[N]={});if(!r.containsStyles){r.containsStyles=!0,t=`/* Chart.js */
`+t;var a=document.createElement("style");a.setAttribute("type","text/css"),a.appendChild(document.createTextNode(t)),e.appendChild(a)}}var Mr={disableCSSInjection:!1,_enabled:typeof window!="undefined"&&typeof document!="undefined",_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document,r=t.host?t:document.head;In(r,yn)}},acquireContext:function(e,t){typeof e=="string"?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(this._ensureLoaded(e),wn(e,t),r):null},releaseContext:function(e){var t=e.canvas;if(!!t[N]){var r=t[N].initial;["height","width"].forEach(function(a){var n=r[a];h.isNullOrUndef(n)?t.removeAttribute(a):t.setAttribute(a,n)}),h.each(r.style||{},function(a,n){t.style[n]=a}),t.width=t.width,delete t[N]}},addEventListener:function(e,t,r){var a=e.canvas;if(t==="resize"){Tn(a,r,e);return}var n=r[N]||(r[N]={}),i=n.proxies||(n.proxies={}),o=i[e.id+"_"+t]=function(l){r(Sn(l,e))};Ee(a,t,o)},removeEventListener:function(e,t,r){var a=e.canvas;if(t==="resize"){Fn(a);return}var n=r[N]||{},i=n.proxies||{},o=i[e.id+"_"+t];!o||Dt(a,t,o)}};h.addEvent=Ee,h.removeEvent=Dt;var On=Mr._enabled?Mr:mn,De=h.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},On);_._set("global",{plugins:{}});var A={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(r){t.indexOf(r)===-1&&t.push(r)}),this._cacheId++},unregister:function(e){var t=this._plugins;[].concat(e).forEach(function(r){var a=t.indexOf(r);a!==-1&&t.splice(a,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,r){var a=this.descriptors(e),n=a.length,i,o,l,s,u;for(i=0;i<n;++i)if(o=a[i],l=o.plugin,u=l[t],typeof u=="function"&&(s=[e].concat(r||[]),s.push(o.options),u.apply(l,s)===!1))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var r=[],a=[],n=e&&e.config||{},i=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(o){var l=r.indexOf(o);if(l===-1){var s=o.id,u=i[s];u!==!1&&(u===!0&&(u=h.clone(_.global.plugins[s])),r.push(o),a.push({plugin:o,options:u||{}}))}}),t.descriptors=a,t.id=this._cacheId,a},_invalidate:function(e){delete e.$plugins}},He={constructors:{},defaults:{},registerScaleType:function(e,t,r){this.constructors[e]=t,this.defaults[e]=h.clone(r)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?h.merge(Object.create(null),[_.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){var r=this;r.defaults.hasOwnProperty(e)&&(r.defaults[e]=h.extend(r.defaults[e],t))},addScalesToLayout:function(e){h.each(e.scales,function(t){t.fullWidth=t.options.fullWidth,t.position=t.options.position,t.weight=t.options.weight,Z.addBox(e,t)})}},oe=h.valueOrDefault,At=h.rtl.getRtlAdapter;_._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:h.noop,title:function(e,t){var r="",a=t.labels,n=a?a.length:0;if(e.length>0){var i=e[0];i.label?r=i.label:i.xLabel?r=i.xLabel:n>0&&i.index<n&&(r=a[i.index])}return r},afterTitle:h.noop,beforeBody:h.noop,beforeLabel:h.noop,label:function(e,t){var r=t.datasets[e.datasetIndex].label||"";return r&&(r+=": "),h.isNullOrUndef(e.value)?r+=e.yLabel:r+=e.value,r},labelColor:function(e,t){var r=t.getDatasetMeta(e.datasetIndex),a=r.data[e.index],n=a._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:h.noop,afterBody:h.noop,beforeFooter:h.noop,footer:h.noop,afterFooter:h.noop}}});var Sr={average:function(e){if(!e.length)return!1;var t,r,a=0,n=0,i=0;for(t=0,r=e.length;t<r;++t){var o=e[t];if(o&&o.hasValue()){var l=o.tooltipPosition();a+=l.x,n+=l.y,++i}}return{x:a/i,y:n/i}},nearest:function(e,t){var r=t.x,a=t.y,n=Number.POSITIVE_INFINITY,i,o,l;for(i=0,o=e.length;i<o;++i){var s=e[i];if(s&&s.hasValue()){var u=s.getCenterPoint(),d=h.distanceBetweenPoints(t,u);d<n&&(n=d,l=s)}}if(l){var f=l.tooltipPosition();r=f.x,a=f.y}return{x:r,y:a}}};function re(e,t){return t&&(h.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function se(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
`)>-1?e.split(`
`):e}function Ln(e){var t=e._xScale,r=e._yScale||e._scale,a=e._index,n=e._datasetIndex,i=e._chart.getDatasetMeta(n).controller,o=i._getIndexScale(),l=i._getValueScale();return{xLabel:t?t.getLabelForIndex(a,n):"",yLabel:r?r.getLabelForIndex(a,n):"",label:o?""+o.getLabelForIndex(a,n):"",value:l?""+l.getLabelForIndex(a,n):"",index:a,datasetIndex:n,x:e._model.x,y:e._model.y}}function Cr(e){var t=_.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:oe(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:oe(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:oe(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:oe(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:oe(e.titleFontStyle,t.defaultFontStyle),titleFontSize:oe(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:oe(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:oe(e.footerFontStyle,t.defaultFontStyle),footerFontSize:oe(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Rn(e,t){var r=e._chart.ctx,a=t.yPadding*2,n=0,i=t.body,o=i.reduce(function(g,p){return g+p.before.length+p.lines.length+p.after.length},0);o+=t.beforeBody.length+t.afterBody.length;var l=t.title.length,s=t.footer.length,u=t.titleFontSize,d=t.bodyFontSize,f=t.footerFontSize;a+=l*u,a+=l?(l-1)*t.titleSpacing:0,a+=l?t.titleMarginBottom:0,a+=o*d,a+=o?(o-1)*t.bodySpacing:0,a+=s?t.footerMarginTop:0,a+=s*f,a+=s?(s-1)*t.footerSpacing:0;var c=0,v=function(g){n=Math.max(n,r.measureText(g).width+c)};return r.font=h.fontString(u,t._titleFontStyle,t._titleFontFamily),h.each(t.title,v),r.font=h.fontString(d,t._bodyFontStyle,t._bodyFontFamily),h.each(t.beforeBody.concat(t.afterBody),v),c=t.displayColors?d+2:0,h.each(i,function(g){h.each(g.before,v),h.each(g.lines,v),h.each(g.after,v)}),c=0,r.font=h.fontString(f,t._footerFontStyle,t._footerFontFamily),h.each(t.footer,v),n+=2*t.xPadding,{width:n,height:a}}function Bn(e,t){var r=e._model,a=e._chart,n=e._chart.chartArea,i="center",o="center";r.y<t.height?o="top":r.y>a.height-t.height&&(o="bottom");var l,s,u,d,f,c=(n.left+n.right)/2,v=(n.top+n.bottom)/2;o==="center"?(l=function(p){return p<=c},s=function(p){return p>c}):(l=function(p){return p<=t.width/2},s=function(p){return p>=a.width-t.width/2}),u=function(p){return p+t.width+r.caretSize+r.caretPadding>a.width},d=function(p){return p-t.width-r.caretSize-r.caretPadding<0},f=function(p){return p<=v?"top":"bottom"},l(r.x)?(i="left",u(r.x)&&(i="center",o=f(r.y))):s(r.x)&&(i="right",d(r.x)&&(i="center",o=f(r.y)));var g=e._options;return{xAlign:g.xAlign?g.xAlign:i,yAlign:g.yAlign?g.yAlign:o}}function Nn(e,t,r,a){var n=e.x,i=e.y,o=e.caretSize,l=e.caretPadding,s=e.cornerRadius,u=r.xAlign,d=r.yAlign,f=o+l,c=s+l;return u==="right"?n-=t.width:u==="center"&&(n-=t.width/2,n+t.width>a.width&&(n=a.width-t.width),n<0&&(n=0)),d==="top"?i+=f:d==="bottom"?i-=t.height+f:i-=t.height/2,d==="center"?u==="left"?n+=f:u==="right"&&(n-=f):u==="left"?n-=c:u==="right"&&(n+=c),{x:n,y:i}}function et(e,t){return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-e.xPadding:e.x+e.xPadding}function Dr(e){return re([],se(e))}var zn=ee.extend({initialize:function(){this._model=Cr(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,r=t.callbacks,a=r.beforeTitle.apply(e,arguments),n=r.title.apply(e,arguments),i=r.afterTitle.apply(e,arguments),o=[];return o=re(o,se(a)),o=re(o,se(n)),o=re(o,se(i)),o},getBeforeBody:function(){return Dr(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var r=this,a=r._options.callbacks,n=[];return h.each(e,function(i){var o={before:[],lines:[],after:[]};re(o.before,se(a.beforeLabel.call(r,i,t))),re(o.lines,a.label.call(r,i,t)),re(o.after,se(a.afterLabel.call(r,i,t))),n.push(o)}),n},getAfterBody:function(){return Dr(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,r=t.beforeFooter.apply(e,arguments),a=t.footer.apply(e,arguments),n=t.afterFooter.apply(e,arguments),i=[];return i=re(i,se(r)),i=re(i,se(a)),i=re(i,se(n)),i},update:function(e){var t=this,r=t._options,a=t._model,n=t._model=Cr(r),i=t._active,o=t._data,l={xAlign:a.xAlign,yAlign:a.yAlign},s={x:a.x,y:a.y},u={width:a.width,height:a.height},d={x:a.caretX,y:a.caretY},f,c;if(i.length){n.opacity=1;var v=[],g=[];d=Sr[r.position].call(t,i,t._eventPosition);var p=[];for(f=0,c=i.length;f<c;++f)p.push(Ln(i[f]));r.filter&&(p=p.filter(function(m){return r.filter(m,o)})),r.itemSort&&(p=p.sort(function(m,b){return r.itemSort(m,b,o)})),h.each(p,function(m){v.push(r.callbacks.labelColor.call(t,m,t._chart)),g.push(r.callbacks.labelTextColor.call(t,m,t._chart))}),n.title=t.getTitle(p,o),n.beforeBody=t.getBeforeBody(p,o),n.body=t.getBody(p,o),n.afterBody=t.getAfterBody(p,o),n.footer=t.getFooter(p,o),n.x=d.x,n.y=d.y,n.caretPadding=r.caretPadding,n.labelColors=v,n.labelTextColors=g,n.dataPoints=p,u=Rn(this,n),l=Bn(this,u),s=Nn(n,u,l,t._chart)}else n.opacity=0;return n.xAlign=l.xAlign,n.yAlign=l.yAlign,n.x=s.x,n.y=s.y,n.width=u.width,n.height=u.height,n.caretX=d.x,n.caretY=d.y,t._model=n,e&&r.custom&&r.custom.call(t,n),t},drawCaret:function(e,t){var r=this._chart.ctx,a=this._view,n=this.getCaretPosition(e,t,a);r.lineTo(n.x1,n.y1),r.lineTo(n.x2,n.y2),r.lineTo(n.x3,n.y3)},getCaretPosition:function(e,t,r){var a,n,i,o,l,s,u=r.caretSize,d=r.cornerRadius,f=r.xAlign,c=r.yAlign,v=e.x,g=e.y,p=t.width,m=t.height;if(c==="center")l=g+m/2,f==="left"?(a=v,n=a-u,i=a,o=l+u,s=l-u):(a=v+p,n=a+u,i=a,o=l-u,s=l+u);else if(f==="left"?(n=v+d+u,a=n-u,i=n+u):f==="right"?(n=v+p-d-u,a=n-u,i=n+u):(n=r.caretX,a=n-u,i=n+u),c==="top")o=g,l=o-u,s=o;else{o=g+m,l=o+u,s=o;var b=i;i=a,a=b}return{x1:a,x2:n,x3:i,y1:o,y2:l,y3:s}},drawTitle:function(e,t,r){var a=t.title,n=a.length,i,o,l;if(n){var s=At(t.rtl,t.x,t.width);for(e.x=et(t,t._titleAlign),r.textAlign=s.textAlign(t._titleAlign),r.textBaseline="middle",i=t.titleFontSize,o=t.titleSpacing,r.fillStyle=t.titleFontColor,r.font=h.fontString(i,t._titleFontStyle,t._titleFontFamily),l=0;l<n;++l)r.fillText(a[l],s.x(e.x),e.y+i/2),e.y+=i+o,l+1===n&&(e.y+=t.titleMarginBottom-o)}},drawBody:function(e,t,r){var a=t.bodyFontSize,n=t.bodySpacing,i=t._bodyAlign,o=t.body,l=t.displayColors,s=0,u=l?et(t,"left"):0,d=At(t.rtl,t.x,t.width),f=function(D){r.fillText(D,d.x(e.x+s),e.y+a/2),e.y+=a+n},c,v,g,p,m,b,x,y,w=d.textAlign(i);for(r.textAlign=i,r.textBaseline="middle",r.font=h.fontString(a,t._bodyFontStyle,t._bodyFontFamily),e.x=et(t,w),r.fillStyle=t.bodyFontColor,h.each(t.beforeBody,f),s=l&&w!=="right"?i==="center"?a/2+1:a+2:0,m=0,x=o.length;m<x;++m){for(c=o[m],v=t.labelTextColors[m],g=t.labelColors[m],r.fillStyle=v,h.each(c.before,f),p=c.lines,b=0,y=p.length;b<y;++b){if(l){var k=d.x(u);r.fillStyle=t.legendColorBackground,r.fillRect(d.leftForLtr(k,a),e.y,a,a),r.lineWidth=1,r.strokeStyle=g.borderColor,r.strokeRect(d.leftForLtr(k,a),e.y,a,a),r.fillStyle=g.backgroundColor,r.fillRect(d.leftForLtr(d.xPlus(k,1),a-2),e.y+1,a-2,a-2),r.fillStyle=v}f(p[b])}h.each(c.after,f)}s=0,h.each(t.afterBody,f),e.y-=n},drawFooter:function(e,t,r){var a=t.footer,n=a.length,i,o;if(n){var l=At(t.rtl,t.x,t.width);for(e.x=et(t,t._footerAlign),e.y+=t.footerMarginTop,r.textAlign=l.textAlign(t._footerAlign),r.textBaseline="middle",i=t.footerFontSize,r.fillStyle=t.footerFontColor,r.font=h.fontString(i,t._footerFontStyle,t._footerFontFamily),o=0;o<n;++o)r.fillText(a[o],l.x(e.x),e.y+i/2),e.y+=i+t.footerSpacing}},drawBackground:function(e,t,r,a){r.fillStyle=t.backgroundColor,r.strokeStyle=t.borderColor,r.lineWidth=t.borderWidth;var n=t.xAlign,i=t.yAlign,o=e.x,l=e.y,s=a.width,u=a.height,d=t.cornerRadius;r.beginPath(),r.moveTo(o+d,l),i==="top"&&this.drawCaret(e,a),r.lineTo(o+s-d,l),r.quadraticCurveTo(o+s,l,o+s,l+d),i==="center"&&n==="right"&&this.drawCaret(e,a),r.lineTo(o+s,l+u-d),r.quadraticCurveTo(o+s,l+u,o+s-d,l+u),i==="bottom"&&this.drawCaret(e,a),r.lineTo(o+d,l+u),r.quadraticCurveTo(o,l+u,o,l+u-d),i==="center"&&n==="left"&&this.drawCaret(e,a),r.lineTo(o,l+d),r.quadraticCurveTo(o,l,o+d,l),r.closePath(),r.fill(),t.borderWidth>0&&r.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(t.opacity!==0){var r={width:t.width,height:t.height},a={x:t.x,y:t.y},n=Math.abs(t.opacity<.001)?0:t.opacity,i=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&i&&(e.save(),e.globalAlpha=n,this.drawBackground(a,t,e,r),a.y+=t.yPadding,h.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(a,t,e),this.drawBody(a,t,e),this.drawFooter(a,t,e),h.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t=this,r=t._options,a=!1;return t._lastActive=t._lastActive||[],e.type==="mouseout"?t._active=[]:(t._active=t._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&t._active.reverse()),a=!h.arrayEquals(t._active,t._lastActive),a&&(t._lastActive=t._active,(r.enabled||r.custom)&&(t._eventPosition={x:e.x,y:e.y},t.update(!0),t.pivot())),a}}),En=Sr,Tt=zn;Tt.positioners=En;var Ft=h.valueOrDefault;_._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});function Pr(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){if(e==="xAxes"||e==="yAxes"){var n=r[e].length,i,o,l;for(t[e]||(t[e]=[]),i=0;i<n;++i)l=r[e][i],o=Ft(l.type,e==="xAxes"?"category":"linear"),i>=t[e].length&&t[e].push({}),!t[e][i].type||l.type&&l.type!==t[e][i].type?h.merge(t[e][i],[He.getScaleDefaults(o),l]):h.merge(t[e][i],l)}else h._merger(e,t,r,a)}})}function It(){return h.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,r,a){var n=t[e]||Object.create(null),i=r[e];e==="scales"?t[e]=Pr(n,i):e==="scale"?t[e]=h.merge(n,[He.getScaleDefaults(i.type),i]):h._merger(e,t,r,a)}})}function Wn(e){e=e||Object.create(null);var t=e.data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=It(_.global,_[e.type],e.options||{}),e}function Hn(e){var t=e.options;h.each(e.scales,function(r){Z.removeBox(e,r)}),t=It(_.global,_[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Ar(e,t,r){var a,n=function(i){return i.id===a};do a=t+r++;while(h.findIndex(e,n)>=0);return a}function Tr(e){return e==="top"||e==="bottom"}function Fr(e,t){return function(r,a){return r[e]===a[e]?r[t]-a[t]:r[e]-a[e]}}var ue=function(e,t){return this.construct(e,t),this};h.extend(ue.prototype,{construct:function(e,t){var r=this;t=Wn(t);var a=De.acquireContext(e,t),n=a&&a.canvas,i=n&&n.height,o=n&&n.width;if(r.id=h.uid(),r.ctx=a,r.canvas=n,r.config=t,r.width=o,r.height=i,r.aspectRatio=i?o/i:null,r.options=t.options,r._bufferedRender=!1,r._layers=[],r.chart=r,r.controller=r,ue.instances[r.id]=r,Object.defineProperty(r,"data",{get:function(){return r.config.data},set:function(l){r.config.data=l}}),!a||!n){console.error("Failed to create chart: can't acquire context from the given item");return}r.initialize(),r.update()},initialize:function(){var e=this;return A.notify(e,"beforeInit"),h.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),A.notify(e,"afterInit"),e},clear:function(){return h.canvas.clear(this),this},stop:function(){return pt.cancelAnimation(this),this},resize:function(e){var t=this,r=t.options,a=t.canvas,n=r.maintainAspectRatio&&t.aspectRatio||null,i=Math.max(0,Math.floor(h.getMaximumWidth(a))),o=Math.max(0,Math.floor(n?i/n:h.getMaximumHeight(a)));if(!(t.width===i&&t.height===o)&&(a.width=t.width=i,a.height=t.height=o,a.style.width=i+"px",a.style.height=o+"px",h.retinaScale(t,r.devicePixelRatio),!e)){var l={width:i,height:o};A.notify(t,"resize",[l]),r.onResize&&r.onResize(t,l),t.stop(),t.update({duration:r.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},r=e.scale;h.each(t.xAxes,function(a,n){a.id||(a.id=Ar(t.xAxes,"x-axis-",n))}),h.each(t.yAxes,function(a,n){a.id||(a.id=Ar(t.yAxes,"y-axis-",n))}),r&&(r.id=r.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,r=e.scales||{},a=[],n=Object.keys(r).reduce(function(i,o){return i[o]=!1,i},{});t.scales&&(a=a.concat((t.scales.xAxes||[]).map(function(i){return{options:i,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(i){return{options:i,dtype:"linear",dposition:"left"}}))),t.scale&&a.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(a,function(i){var o=i.options,l=o.id,s=Ft(o.type,i.dtype);Tr(o.position)!==Tr(i.dposition)&&(o.position=i.dposition),n[l]=!0;var u=null;if(l in r&&r[l].type===s)u=r[l],u.options=o,u.ctx=e.ctx,u.chart=e;else{var d=He.getScaleConstructor(s);if(!d)return;u=new d({id:l,type:s,options:o,ctx:e.ctx,chart:e}),r[u.id]=u}u.mergeTicksOptions(),i.isDefault&&(e.scale=u)}),h.each(n,function(i,o){i||delete r[o]}),e.scales=r,He.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,t=[],r=e.data.datasets,a,n;for(a=0,n=r.length;a<n;a++){var i=r[a],o=e.getDatasetMeta(a),l=i.type||e.config.type;if(o.type&&o.type!==l&&(e.destroyDatasetMeta(a),o=e.getDatasetMeta(a)),o.type=l,o.order=i.order||0,o.index=a,o.controller)o.controller.updateIndex(a),o.controller.linkScales();else{var s=mr[o.type];if(s===void 0)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new s(e,a),t.push(o.controller)}}return t},resetElements:function(){var e=this;h.each(e.data.datasets,function(t,r){e.getDatasetMeta(r).controller.reset()},e)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t=this,r,a;if((!e||typeof e!="object")&&(e={duration:e,lazy:arguments[1]}),Hn(t),A._invalidate(t),A.notify(t,"beforeUpdate")!==!1){t.tooltip._data=t.data;var n=t.buildOrUpdateControllers();for(r=0,a=t.data.datasets.length;r<a;r++)t.getDatasetMeta(r).controller.buildOrUpdateElements();t.updateLayout(),t.options.animation&&t.options.animation.duration&&h.each(n,function(i){i.reset()}),t.updateDatasets(),t.tooltip.initialize(),t.lastActive=[],A.notify(t,"afterUpdate"),t._layers.sort(Fr("z","_idx")),t._bufferedRender?t._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:t.render(e)}},updateLayout:function(){var e=this;A.notify(e,"beforeLayout")!==!1&&(Z.update(this,this.width,this.height),e._layers=[],h.each(e.boxes,function(t){t._configure&&t._configure(),e._layers.push.apply(e._layers,t._layers())},e),e._layers.forEach(function(t,r){t._idx=r}),A.notify(e,"afterScaleUpdate"),A.notify(e,"afterLayout"))},updateDatasets:function(){var e=this;if(A.notify(e,"beforeDatasetsUpdate")!==!1){for(var t=0,r=e.data.datasets.length;t<r;++t)e.updateDataset(t);A.notify(e,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this,r=t.getDatasetMeta(e),a={meta:r,index:e};A.notify(t,"beforeDatasetUpdate",[a])!==!1&&(r.controller._update(),A.notify(t,"afterDatasetUpdate",[a]))},render:function(e){var t=this;(!e||typeof e!="object")&&(e={duration:e,lazy:arguments[1]});var r=t.options.animation,a=Ft(e.duration,r&&r.duration),n=e.lazy;if(A.notify(t,"beforeRender")!==!1){var i=function(l){A.notify(t,"afterRender"),h.callback(r&&r.onComplete,[l],t)};if(r&&a){var o=new gt({numSteps:a/16.66,easing:e.easing||r.easing,render:function(l,s){var u=h.easing.effects[s.easing],d=s.currentStep,f=d/s.numSteps;l.draw(u(f),f,d)},onAnimationProgress:r.onProgress,onAnimationComplete:i});pt.addAnimation(t,o,a,n)}else t.draw(),i(new gt({numSteps:0,chart:t}));return t}},draw:function(e){var t=this,r,a;if(t.clear(),h.isNullOrUndef(e)&&(e=1),t.transition(e),!(t.width<=0||t.height<=0)&&A.notify(t,"beforeDraw",[e])!==!1){for(a=t._layers,r=0;r<a.length&&a[r].z<=0;++r)a[r].draw(t.chartArea);for(t.drawDatasets(e);r<a.length;++r)a[r].draw(t.chartArea);t._drawTooltip(e),A.notify(t,"afterDraw",[e])}},transition:function(e){for(var t=this,r=0,a=(t.data.datasets||[]).length;r<a;++r)t.isDatasetVisible(r)&&t.getDatasetMeta(r).controller.transition(e);t.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t=this,r=t.data.datasets||[],a=[],n,i;for(n=0,i=r.length;n<i;++n)(!e||t.isDatasetVisible(n))&&a.push(t.getDatasetMeta(n));return a.sort(Fr("order","index")),a},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t=this,r,a;if(A.notify(t,"beforeDatasetsDraw",[e])!==!1){for(r=t._getSortedVisibleDatasetMetas(),a=r.length-1;a>=0;--a)t.drawDataset(r[a],e);A.notify(t,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var r=this,a={meta:e,index:e.index,easingValue:t};A.notify(r,"beforeDatasetDraw",[a])!==!1&&(e.controller.draw(t),A.notify(r,"afterDatasetDraw",[a]))},_drawTooltip:function(e){var t=this,r=t.tooltip,a={tooltip:r,easingValue:e};A.notify(t,"beforeTooltipDraw",[a])!==!1&&(r.draw(),A.notify(t,"afterTooltipDraw",[a]))},getElementAtEvent:function(e){return Ce.modes.single(this,e)},getElementsAtEvent:function(e){return Ce.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return Ce.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,r){var a=Ce.modes[t];return typeof a=="function"?a(this,e,r):[]},getDatasetAtEvent:function(e){return Ce.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this,r=t.data.datasets[e];r._meta||(r._meta={});var a=r._meta[t.id];return a||(a=r._meta[t.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r.order||0,index:e}),a},getVisibleDatasetCount:function(){for(var e=0,t=0,r=this.data.datasets.length;t<r;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return typeof t.hidden=="boolean"?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,r=this.data.datasets[e],a=r._meta&&r._meta[t];a&&(a.controller.destroy(),delete r._meta[t])},destroy:function(){var e=this,t=e.canvas,r,a;for(e.stop(),r=0,a=e.data.datasets.length;r<a;++r)e.destroyDatasetMeta(r);t&&(e.unbindEvents(),h.canvas.clear(e),De.releaseContext(e.ctx),e.canvas=null,e.ctx=null),A.notify(e,"destroy"),delete ue.instances[e.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var e=this;e.tooltip=new Tt({_chart:e,_chartInstance:e,_data:e.data,_options:e.options.tooltips},e)},bindEvents:function(){var e=this,t=e._listeners={},r=function(){e.eventHandler.apply(e,arguments)};h.each(e.options.events,function(a){De.addEventListener(e,a,r),t[a]=r}),e.options.responsive&&(r=function(){e.resize()},De.addEventListener(e,"resize",r),t.resize=r)},unbindEvents:function(){var e=this,t=e._listeners;!t||(delete e._listeners,h.each(t,function(r,a){De.removeEventListener(e,a,r)}))},updateHoverStyle:function(e,t,r){var a=r?"set":"remove",n,i,o;for(i=0,o=e.length;i<o;++i)n=e[i],n&&this.getDatasetMeta(n._datasetIndex).controller[a+"HoverStyle"](n);t==="dataset"&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+a+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,r=t.tooltip;if(A.notify(t,"beforeEvent",[e])!==!1){t._bufferedRender=!0,t._bufferedRequest=null;var a=t.handleEvent(e);r&&(a=r._start?r.handleEvent(e):a|r.handleEvent(e)),A.notify(t,"afterEvent",[e]);var n=t._bufferedRequest;return n?t.render(n):a&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t=this,r=t.options||{},a=r.hover,n=!1;return t.lastActive=t.lastActive||[],e.type==="mouseout"?t.active=[]:t.active=t.getElementsAtEventForMode(e,a.mode,a),h.callback(r.onHover||r.hover.onHover,[e.native,t.active],t),(e.type==="mouseup"||e.type==="click")&&r.onClick&&r.onClick.call(t,e.native,t.active),t.lastActive.length&&t.updateHoverStyle(t.lastActive,a.mode,!1),t.active.length&&a.mode&&t.updateHoverStyle(t.active,a.mode,!0),n=!h.arrayEquals(t.active,t.lastActive),t.lastActive=t.active,n}}),ue.instances={};var M=ue;ue.Controller=ue,ue.types={},h.configMerge=It,h.scaleMerge=Pr;var Vn=function(){h.where=function(a,n){if(h.isArray(a)&&Array.prototype.filter)return a.filter(n);var i=[];return h.each(a,function(o){n(o)&&i.push(o)}),i},h.findIndex=Array.prototype.findIndex?function(a,n,i){return a.findIndex(n,i)}:function(a,n,i){i=i===void 0?a:i;for(var o=0,l=a.length;o<l;++o)if(n.call(i,a[o],o,a))return o;return-1},h.findNextWhere=function(a,n,i){h.isNullOrUndef(i)&&(i=-1);for(var o=i+1;o<a.length;o++){var l=a[o];if(n(l))return l}},h.findPreviousWhere=function(a,n,i){h.isNullOrUndef(i)&&(i=a.length);for(var o=i-1;o>=0;o--){var l=a[o];if(n(l))return l}},h.isNumber=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},h.almostEquals=function(a,n,i){return Math.abs(a-n)<i},h.almostWhole=function(a,n){var i=Math.round(a);return i-n<=a&&i+n>=a},h.max=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.max(n,i)},Number.NEGATIVE_INFINITY)},h.min=function(a){return a.reduce(function(n,i){return isNaN(i)?n:Math.min(n,i)},Number.POSITIVE_INFINITY)},h.sign=Math.sign?function(a){return Math.sign(a)}:function(a){return a=+a,a===0||isNaN(a)?a:a>0?1:-1},h.toRadians=function(a){return a*(Math.PI/180)},h.toDegrees=function(a){return a*(180/Math.PI)},h._decimalPlaces=function(a){if(!!h.isFinite(a)){for(var n=1,i=0;Math.round(a*n)/n!==a;)n*=10,i++;return i}},h.getAngleFromPoint=function(a,n){var i=n.x-a.x,o=n.y-a.y,l=Math.sqrt(i*i+o*o),s=Math.atan2(o,i);return s<-.5*Math.PI&&(s+=2*Math.PI),{angle:s,distance:l}},h.distanceBetweenPoints=function(a,n){return Math.sqrt(Math.pow(n.x-a.x,2)+Math.pow(n.y-a.y,2))},h.aliasPixel=function(a){return a%2==0?0:.5},h._alignPixel=function(a,n,i){var o=a.currentDevicePixelRatio,l=i/2;return Math.round((n-l)*o)/o+l},h.splineCurve=function(a,n,i,o){var l=a.skip?n:a,s=n,u=i.skip?n:i,d=Math.sqrt(Math.pow(s.x-l.x,2)+Math.pow(s.y-l.y,2)),f=Math.sqrt(Math.pow(u.x-s.x,2)+Math.pow(u.y-s.y,2)),c=d/(d+f),v=f/(d+f);c=isNaN(c)?0:c,v=isNaN(v)?0:v;var g=o*c,p=o*v;return{previous:{x:s.x-g*(u.x-l.x),y:s.y-g*(u.y-l.y)},next:{x:s.x+p*(u.x-l.x),y:s.y+p*(u.y-l.y)}}},h.EPSILON=Number.EPSILON||1e-14,h.splineCurveMonotone=function(a){var n=(a||[]).map(function(m){return{model:m._model,deltaK:0,mK:0}}),i=n.length,o,l,s,u;for(o=0;o<i;++o)if(s=n[o],!s.model.skip){if(l=o>0?n[o-1]:null,u=o<i-1?n[o+1]:null,u&&!u.model.skip){var d=u.model.x-s.model.x;s.deltaK=d!==0?(u.model.y-s.model.y)/d:0}!l||l.model.skip?s.mK=s.deltaK:!u||u.model.skip?s.mK=l.deltaK:this.sign(l.deltaK)!==this.sign(s.deltaK)?s.mK=0:s.mK=(l.deltaK+s.deltaK)/2}var f,c,v,g;for(o=0;o<i-1;++o)if(s=n[o],u=n[o+1],!(s.model.skip||u.model.skip)){if(h.almostEquals(s.deltaK,0,this.EPSILON)){s.mK=u.mK=0;continue}f=s.mK/s.deltaK,c=u.mK/s.deltaK,g=Math.pow(f,2)+Math.pow(c,2),!(g<=9)&&(v=3/Math.sqrt(g),s.mK=f*v*s.deltaK,u.mK=c*v*s.deltaK)}var p;for(o=0;o<i;++o)s=n[o],!s.model.skip&&(l=o>0?n[o-1]:null,u=o<i-1?n[o+1]:null,l&&!l.model.skip&&(p=(s.model.x-l.model.x)/3,s.model.controlPointPreviousX=s.model.x-p,s.model.controlPointPreviousY=s.model.y-p*s.mK),u&&!u.model.skip&&(p=(u.model.x-s.model.x)/3,s.model.controlPointNextX=s.model.x+p,s.model.controlPointNextY=s.model.y+p*s.mK))},h.nextItem=function(a,n,i){return i?n>=a.length-1?a[0]:a[n+1]:n>=a.length-1?a[a.length-1]:a[n+1]},h.previousItem=function(a,n,i){return i?n<=0?a[a.length-1]:a[n-1]:n<=0?a[0]:a[n-1]},h.niceNum=function(a,n){var i=Math.floor(h.log10(a)),o=a/Math.pow(10,i),l;return n?o<1.5?l=1:o<3?l=2:o<7?l=5:l=10:o<=1?l=1:o<=2?l=2:o<=5?l=5:l=10,l*Math.pow(10,i)},h.requestAnimFrame=function(){return typeof window=="undefined"?function(a){a()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){return window.setTimeout(a,1e3/60)}}(),h.getRelativePosition=function(a,n){var i,o,l=a.originalEvent||a,s=a.target||a.srcElement,u=s.getBoundingClientRect(),d=l.touches;d&&d.length>0?(i=d[0].clientX,o=d[0].clientY):(i=l.clientX,o=l.clientY);var f=parseFloat(h.getStyle(s,"padding-left")),c=parseFloat(h.getStyle(s,"padding-top")),v=parseFloat(h.getStyle(s,"padding-right")),g=parseFloat(h.getStyle(s,"padding-bottom")),p=u.right-u.left-f-v,m=u.bottom-u.top-c-g;return i=Math.round((i-u.left-f)/p*s.width/n.currentDevicePixelRatio),o=Math.round((o-u.top-c)/m*s.height/n.currentDevicePixelRatio),{x:i,y:o}};function e(a,n,i){var o;return typeof a=="string"?(o=parseInt(a,10),a.indexOf("%")!==-1&&(o=o/100*n.parentNode[i])):o=a,o}function t(a){return a!=null&&a!=="none"}function r(a,n,i){var o=document.defaultView,l=h._getParentNode(a),s=o.getComputedStyle(a)[n],u=o.getComputedStyle(l)[n],d=t(s),f=t(u),c=Number.POSITIVE_INFINITY;return d||f?Math.min(d?e(s,a,i):c,f?e(u,l,i):c):"none"}h.getConstraintWidth=function(a){return r(a,"max-width","clientWidth")},h.getConstraintHeight=function(a){return r(a,"max-height","clientHeight")},h._calculatePadding=function(a,n,i){return n=h.getStyle(a,n),n.indexOf("%")>-1?i*parseInt(n,10)/100:parseInt(n,10)},h._getParentNode=function(a){var n=a.parentNode;return n&&n.toString()==="[object ShadowRoot]"&&(n=n.host),n},h.getMaximumWidth=function(a){var n=h._getParentNode(a);if(!n)return a.clientWidth;var i=n.clientWidth,o=h._calculatePadding(n,"padding-left",i),l=h._calculatePadding(n,"padding-right",i),s=i-o-l,u=h.getConstraintWidth(a);return isNaN(u)?s:Math.min(s,u)},h.getMaximumHeight=function(a){var n=h._getParentNode(a);if(!n)return a.clientHeight;var i=n.clientHeight,o=h._calculatePadding(n,"padding-top",i),l=h._calculatePadding(n,"padding-bottom",i),s=i-o-l,u=h.getConstraintHeight(a);return isNaN(u)?s:Math.min(s,u)},h.getStyle=function(a,n){return a.currentStyle?a.currentStyle[n]:document.defaultView.getComputedStyle(a,null).getPropertyValue(n)},h.retinaScale=function(a,n){var i=a.currentDevicePixelRatio=n||typeof window!="undefined"&&window.devicePixelRatio||1;if(i!==1){var o=a.canvas,l=a.height,s=a.width;o.height=l*i,o.width=s*i,a.ctx.scale(i,i),!o.style.height&&!o.style.width&&(o.style.height=l+"px",o.style.width=s+"px")}},h.fontString=function(a,n,i){return n+" "+a+"px "+i},h.longestText=function(a,n,i,o){o=o||{};var l=o.data=o.data||{},s=o.garbageCollect=o.garbageCollect||[];o.font!==n&&(l=o.data={},s=o.garbageCollect=[],o.font=n),a.font=n;var u=0,d=i.length,f,c,v,g,p;for(f=0;f<d;f++)if(g=i[f],g!=null&&h.isArray(g)!==!0)u=h.measureText(a,l,s,u,g);else if(h.isArray(g))for(c=0,v=g.length;c<v;c++)p=g[c],p!=null&&!h.isArray(p)&&(u=h.measureText(a,l,s,u,p));var m=s.length/2;if(m>i.length){for(f=0;f<m;f++)delete l[s[f]];s.splice(0,m)}return u},h.measureText=function(a,n,i,o,l){var s=n[l];return s||(s=n[l]=a.measureText(l).width,i.push(l)),s>o&&(o=s),o},h.numberOfLabelLines=function(a){var n=1;return h.each(a,function(i){h.isArray(i)&&i.length>n&&(n=i.length)}),n},h.color=Ye?function(a){return a instanceof CanvasGradient&&(a=_.global.defaultColor),Ye(a)}:function(a){return console.error("Color.js not found!"),a},h.getHoverColor=function(a){return a instanceof CanvasPattern||a instanceof CanvasGradient?a:h.color(a).saturate(.5).darken(.1).rgbString()}};function be(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function tt(e){this.options=e||{}}h.extend(tt.prototype,{formats:be,parse:be,format:be,add:be,diff:be,startOf:be,endOf:be,_create:function(e){return e}}),tt.override=function(e){h.extend(tt.prototype,e)};var jn=tt,Ot={_date:jn},Ve={formatters:{values:function(e){return h.isArray(e)?e:""+e},linear:function(e,t,r){var a=r.length>3?r[2]-r[1]:r[1]-r[0];Math.abs(a)>1&&e!==Math.floor(e)&&(a=e-Math.floor(e));var n=h.log10(Math.abs(a)),i="";if(e!==0){var o=Math.max(Math.abs(r[0]),Math.abs(r[r.length-1]));if(o<1e-4){var l=h.log10(Math.abs(e)),s=Math.floor(l)-Math.floor(n);s=Math.max(Math.min(s,20),0),i=e.toExponential(s)}else{var u=-1*Math.floor(n);u=Math.max(Math.min(u,20),0),i=e.toFixed(u)}}else i="0";return i},logarithmic:function(e,t,r){var a=e/Math.pow(10,Math.floor(h.log10(e)));return e===0?"0":a===1||a===2||a===5||t===0||t===r.length-1?e.toExponential():""}}},xe=h.isArray,je=h.isNullOrUndef,ye=h.valueOrDefault,Pe=h.valueAtIndexOrDefault;_._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:Ve.formatters.values,minor:{},major:{}}});function qn(e,t){for(var r=[],a=e.length/t,n=0,i=e.length;n<i;n+=a)r.push(e[Math.floor(n)]);return r}function Un(e,t,r){var a=e.getTicks().length,n=Math.min(t,a-1),i=e.getPixelForTick(n),o=e._startPixel,l=e._endPixel,s=1e-6,u;if(!(r&&(a===1?u=Math.max(i-o,l-i):t===0?u=(e.getPixelForTick(1)-i)/2:u=(i-e.getPixelForTick(n-1))/2,i+=n<t?u:-u,i<o-s||i>l+s)))return i}function $n(e,t){h.each(e,function(r){var a=r.gc,n=a.length/2,i;if(n>t){for(i=0;i<n;++i)delete r.data[a[i]];a.splice(0,n)}})}function Yn(e,t,r,a){var n=r.length,i=[],o=[],l=[],s=0,u=0,d,f,c,v,g,p,m,b,x,y,w,k,D;for(d=0;d<n;++d){if(v=r[d].label,g=r[d].major?t.major:t.minor,e.font=p=g.string,m=a[p]=a[p]||{data:{},gc:[]},b=g.lineHeight,x=y=0,!je(v)&&!xe(v))x=h.measureText(e,m.data,m.gc,x,v),y=b;else if(xe(v))for(f=0,c=v.length;f<c;++f)w=v[f],!je(w)&&!xe(w)&&(x=h.measureText(e,m.data,m.gc,x,w),y+=b);i.push(x),o.push(y),l.push(b/2),s=Math.max(x,s),u=Math.max(y,u)}$n(a,n),k=i.indexOf(s),D=o.indexOf(u);function C(P){return{width:i[P]||0,height:o[P]||0,offset:l[P]||0}}return{first:C(0),last:C(n-1),widest:C(k),highest:C(D)}}function qe(e){return e.drawTicks?e.tickMarkLength:0}function Lt(e){var t,r;return e.display?(t=h.options._parseFont(e),r=h.options.toPadding(e.padding),t.lineHeight+r.height):0}function Ir(e,t){return h.extend(h.options._parseFont({fontFamily:ye(t.fontFamily,e.fontFamily),fontSize:ye(t.fontSize,e.fontSize),fontStyle:ye(t.fontStyle,e.fontStyle),lineHeight:ye(t.lineHeight,e.lineHeight)}),{color:h.options.resolve([t.fontColor,e.fontColor,_.global.defaultFontColor])})}function Rt(e){var t=Ir(e,e.minor),r=e.major.enabled?Ir(e,e.major):t;return{minor:t,major:r}}function Bt(e){var t=[],r,a,n;for(a=0,n=e.length;a<n;++a)r=e[a],typeof r._index!="undefined"&&t.push(r);return t}function Gn(e){var t=e.length,r,a;if(t<2)return!1;for(a=e[0],r=1;r<t;++r)if(e[r]-e[r-1]!==a)return!1;return a}function Xn(e,t,r,a){var n=Gn(e),i=(t.length-1)/a,o,l,s,u;if(!n)return Math.max(i,1);for(o=h.math._factorize(n),s=0,u=o.length-1;s<u;s++)if(l=o[s],l>i)return l;return Math.max(i,1)}function Kn(e){var t=[],r,a;for(r=0,a=e.length;r<a;r++)e[r].major&&t.push(r);return t}function Zn(e,t,r){var a=0,n=t[0],i,o;for(r=Math.ceil(r),i=0;i<e.length;i++)o=e[i],i===n?(o._index=i,a++,n=t[a*r]):delete o.label}function rt(e,t,r,a){var n=ye(r,0),i=Math.min(ye(a,e.length),e.length),o=0,l,s,u,d;for(t=Math.ceil(t),a&&(l=a-r,t=l/Math.floor(l/t)),d=n;d<0;)o++,d=Math.round(n+o*t);for(s=Math.max(n,0);s<i;s++)u=e[s],s===d?(u._index=s,o++,d=Math.round(n+o*t)):delete u.label}var Nt=ee.extend({zeroLineIndex:0,getPadding:function(){var e=this;return{left:e.paddingLeft||0,top:e.paddingTop||0,right:e.paddingRight||0,bottom:e.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){h.callback(this.options.beforeUpdate,[this])},update:function(e,t,r){var a=this,n=a.options.ticks,i=n.sampleSize,o,l,s,u,d;if(a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=h.extend({left:0,right:0,top:0,bottom:0},r),a._ticks=null,a.ticks=null,a._labelSizes=null,a._maxLabelLines=0,a.longestLabelWidth=0,a.longestTextCache=a.longestTextCache||{},a._gridLineItems=null,a._labelItems=null,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeDataLimits(),a.determineDataLimits(),a.afterDataLimits(),a.beforeBuildTicks(),u=a.buildTicks()||[],u=a.afterBuildTicks(u)||u,(!u||!u.length)&&a.ticks)for(u=[],o=0,l=a.ticks.length;o<l;++o)u.push({value:a.ticks[o],major:!1});return a._ticks=u,d=i<u.length,s=a._convertTicksToLabels(d?qn(u,i):u),a._configure(),a.beforeCalculateTickRotation(),a.calculateTickRotation(),a.afterCalculateTickRotation(),a.beforeFit(),a.fit(),a.afterFit(),a._ticksToDraw=n.display&&(n.autoSkip||n.source==="auto")?a._autoSkip(u):u,d&&(s=a._convertTicksToLabels(a._ticksToDraw)),a.ticks=s,a.afterUpdate(),a.minSize},_configure:function(){var e=this,t=e.options.ticks.reverse,r,a;e.isHorizontal()?(r=e.left,a=e.right):(r=e.top,a=e.bottom,t=!t),e._startPixel=r,e._endPixel=a,e._reversePixels=t,e._length=a-r},afterUpdate:function(){h.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){h.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){h.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){h.callback(this.options.beforeDataLimits,[this])},determineDataLimits:h.noop,afterDataLimits:function(){h.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){h.callback(this.options.beforeBuildTicks,[this])},buildTicks:h.noop,afterBuildTicks:function(e){var t=this;return xe(e)&&e.length?h.callback(t.options.afterBuildTicks,[t,e]):(t.ticks=h.callback(t.options.afterBuildTicks,[t,t.ticks])||t.ticks,e)},beforeTickToLabelConversion:function(){h.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this,t=e.options.ticks;e.ticks=e.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){h.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){h.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e=this,t=e.options,r=t.ticks,a=e.getTicks().length,n=r.minRotation||0,i=r.maxRotation,o=n,l,s,u,d,f,c,v;if(!e._isVisible()||!r.display||n>=i||a<=1||!e.isHorizontal()){e.labelRotation=n;return}l=e._getLabelSizes(),s=l.widest.width,u=l.highest.height-l.highest.offset,d=Math.min(e.maxWidth,e.chart.width-s),f=t.offset?e.maxWidth/a:d/(a-1),s+6>f&&(f=d/(a-(t.offset?.5:1)),c=e.maxHeight-qe(t.gridLines)-r.padding-Lt(t.scaleLabel),v=Math.sqrt(s*s+u*u),o=h.toDegrees(Math.min(Math.asin(Math.min((l.highest.height+6)/f,1)),Math.asin(Math.min(c/v,1))-Math.asin(u/v))),o=Math.max(n,Math.min(i,o))),e.labelRotation=o},afterCalculateTickRotation:function(){h.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){h.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},r=e.chart,a=e.options,n=a.ticks,i=a.scaleLabel,o=a.gridLines,l=e._isVisible(),s=a.position==="bottom",u=e.isHorizontal();if(u?t.width=e.maxWidth:l&&(t.width=qe(o)+Lt(i)),u?l&&(t.height=qe(o)+Lt(i)):t.height=e.maxHeight,n.display&&l){var d=Rt(n),f=e._getLabelSizes(),c=f.first,v=f.last,g=f.widest,p=f.highest,m=d.minor.lineHeight*.4,b=n.padding;if(u){var x=e.labelRotation!==0,y=h.toRadians(e.labelRotation),w=Math.cos(y),k=Math.sin(y),D=k*g.width+w*(p.height-(x?p.offset:0))+(x?0:m);t.height=Math.min(e.maxHeight,t.height+D+b);var C=e.getPixelForTick(0)-e.left,P=e.right-e.getPixelForTick(e.getTicks().length-1),T,R;x?(T=s?w*c.width+k*c.offset:k*(c.height-c.offset),R=s?k*(v.height-v.offset):w*v.width+k*v.offset):(T=c.width/2,R=v.width/2),e.paddingLeft=Math.max((T-C)*e.width/(e.width-C),0)+3,e.paddingRight=Math.max((R-P)*e.width/(e.width-P),0)+3}else{var L=n.mirror?0:g.width+b+m;t.width=Math.min(e.maxWidth,t.width+L),e.paddingTop=c.height/2,e.paddingBottom=v.height/2}}e.handleMargins(),u?(e.width=e._length=r.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=r.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){h.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return e==="top"||e==="bottom"},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(je(e))return NaN;if((typeof e=="number"||e instanceof Number)&&!isFinite(e))return NaN;if(e){if(this.isHorizontal()){if(e.x!==void 0)return this.getRightValue(e.x)}else if(e.y!==void 0)return this.getRightValue(e.y)}return e},_convertTicksToLabels:function(e){var t=this,r,a,n;for(t.ticks=e.map(function(i){return i.value}),t.beforeTickToLabelConversion(),r=t.convertTicksToLabels(e)||t.ticks,t.afterTickToLabelConversion(),a=0,n=e.length;a<n;++a)e[a].label=r[a];return r},_getLabelSizes:function(){var e=this,t=e._labelSizes;return t||(e._labelSizes=t=Yn(e.ctx,Rt(e.options.ticks),e.getTicks(),e.longestTextCache),e.longestLabelWidth=t.widest.width),t},_parseValue:function(e){var t,r,a,n;return xe(e)?(t=+this.getRightValue(e[0]),r=+this.getRightValue(e[1]),a=Math.min(t,r),n=Math.max(t,r)):(e=+this.getRightValue(e),t=void 0,r=e,a=e,n=e),{min:a,max:n,start:t,end:r}},_getScaleLabel:function(e){var t=this._parseValue(e);return t.start!==void 0?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:h.noop,getPixelForValue:h.noop,getValueForPixel:h.noop,getPixelForTick:function(e){var t=this,r=t.options.offset,a=t._ticks.length,n=1/Math.max(a-(r?0:1),1);return e<0||e>a-1?null:t.getPixelForDecimal(e*n+(r?n/2:0))},getPixelForDecimal:function(e){var t=this;return t._reversePixels&&(e=1-e),t._startPixel+e*t._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this,t=e.min,r=e.max;return e.beginAtZero?0:t<0&&r<0?r:t>0&&r>0?t:0},_autoSkip:function(e){var t=this,r=t.options.ticks,a=t._length,n=r.maxTicksLimit||a/t._tickSize()+1,i=r.major.enabled?Kn(e):[],o=i.length,l=i[0],s=i[o-1],u,d,f,c;if(o>n)return Zn(e,i,o/n),Bt(e);if(f=Xn(i,e,a,n),o>0){for(u=0,d=o-1;u<d;u++)rt(e,f,i[u],i[u+1]);return c=o>1?(s-l)/(o-1):null,rt(e,f,h.isNullOrUndef(c)?0:l-c,l),rt(e,f,s,h.isNullOrUndef(c)?e.length:s+c),Bt(e)}return rt(e,f),Bt(e)},_tickSize:function(){var e=this,t=e.options.ticks,r=h.toRadians(e.labelRotation),a=Math.abs(Math.cos(r)),n=Math.abs(Math.sin(r)),i=e._getLabelSizes(),o=t.autoSkipPadding||0,l=i?i.widest.width+o:0,s=i?i.highest.height+o:0;return e.isHorizontal()?s*a>l*n?l/a:s/n:s*n<l*a?s/a:l/n},_isVisible:function(){var e=this,t=e.chart,r=e.options.display,a,n,i;if(r!=="auto")return!!r;for(a=0,n=t.data.datasets.length;a<n;++a)if(t.isDatasetVisible(a)&&(i=t.getDatasetMeta(a),i.xAxisID===e.id||i.yAxisID===e.id))return!0;return!1},_computeGridLineItems:function(e){var t=this,r=t.chart,a=t.options,n=a.gridLines,i=a.position,o=n.offsetGridLines,l=t.isHorizontal(),s=t._ticksToDraw,u=s.length+(o?1:0),d=qe(n),f=[],c=n.drawBorder?Pe(n.lineWidth,0,0):0,v=c/2,g=h._alignPixel,p=function(Ki){return g(r,Ki,c)},m,b,x,y,w,k,D,C,P,T,R,L,I,B,Te,Fe,$t;for(i==="top"?(m=p(t.bottom),D=t.bottom-d,P=m-v,R=p(e.top)+v,I=e.bottom):i==="bottom"?(m=p(t.top),R=e.top,I=p(e.bottom)-v,D=m+v,P=t.top+d):i==="left"?(m=p(t.right),k=t.right-d,C=m-v,T=p(e.left)+v,L=e.right):(m=p(t.left),T=e.left,L=p(e.right)-v,k=m+v,C=t.left+d),b=0;b<u;++b)x=s[b]||{},!(je(x.label)&&b<s.length)&&(b===t.zeroLineIndex&&a.offset===o?(B=n.zeroLineWidth,Te=n.zeroLineColor,Fe=n.zeroLineBorderDash||[],$t=n.zeroLineBorderDashOffset||0):(B=Pe(n.lineWidth,b,1),Te=Pe(n.color,b,"rgba(0,0,0,0.1)"),Fe=n.borderDash||[],$t=n.borderDashOffset||0),y=Un(t,x._index||b,o),y!==void 0&&(w=g(r,y,B),l?k=C=T=L=w:D=P=R=I=w,f.push({tx1:k,ty1:D,tx2:C,ty2:P,x1:T,y1:R,x2:L,y2:I,width:B,color:Te,borderDash:Fe,borderDashOffset:$t})));return f.ticksLength=u,f.borderValue=m,f},_computeLabelItems:function(){var e=this,t=e.options,r=t.ticks,a=t.position,n=r.mirror,i=e.isHorizontal(),o=e._ticksToDraw,l=Rt(r),s=r.padding,u=qe(t.gridLines),d=-h.toRadians(e.labelRotation),f=[],c,v,g,p,m,b,x,y,w,k,D,C;for(a==="top"?(b=e.bottom-u-s,x=d?"left":"center"):a==="bottom"?(b=e.top+u+s,x=d?"right":"center"):a==="left"?(m=e.right-(n?0:u)-s,x=n?"left":"right"):(m=e.left+(n?0:u)+s,x=n?"right":"left"),c=0,v=o.length;c<v;++c)g=o[c],p=g.label,!je(p)&&(y=e.getPixelForTick(g._index||c)+r.labelOffset,w=g.major?l.major:l.minor,k=w.lineHeight,D=xe(p)?p.length:1,i?(m=y,C=a==="top"?((d?1:.5)-D)*k:(d?0:.5)*k):(b=y,C=(1-D)*k/2),f.push({x:m,y:b,rotation:d,label:p,font:w,textOffset:C,textAlign:x}));return f},_drawGrid:function(e){var t=this,r=t.options.gridLines;if(!!r.display){var a=t.ctx,n=t.chart,i=h._alignPixel,o=r.drawBorder?Pe(r.lineWidth,0,0):0,l=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e)),s,u,d,f,c;for(d=0,f=l.length;d<f;++d)c=l[d],s=c.width,u=c.color,s&&u&&(a.save(),a.lineWidth=s,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(c.borderDash),a.lineDashOffset=c.borderDashOffset),a.beginPath(),r.drawTicks&&(a.moveTo(c.tx1,c.ty1),a.lineTo(c.tx2,c.ty2)),r.drawOnChartArea&&(a.moveTo(c.x1,c.y1),a.lineTo(c.x2,c.y2)),a.stroke(),a.restore());if(o){var v=o,g=Pe(r.lineWidth,l.ticksLength-1,1),p=l.borderValue,m,b,x,y;t.isHorizontal()?(m=i(n,t.left,v)-v/2,b=i(n,t.right,g)+g/2,x=y=p):(x=i(n,t.top,v)-v/2,y=i(n,t.bottom,g)+g/2,m=b=p),a.lineWidth=o,a.strokeStyle=Pe(r.color,0),a.beginPath(),a.moveTo(m,x),a.lineTo(b,y),a.stroke()}}},_drawLabels:function(){var e=this,t=e.options.ticks;if(!!t.display){var r=e.ctx,a=e._labelItems||(e._labelItems=e._computeLabelItems()),n,i,o,l,s,u,d,f;for(n=0,o=a.length;n<o;++n){if(s=a[n],u=s.font,r.save(),r.translate(s.x,s.y),r.rotate(s.rotation),r.font=u.string,r.fillStyle=u.color,r.textBaseline="middle",r.textAlign=s.textAlign,d=s.label,f=s.textOffset,xe(d))for(i=0,l=d.length;i<l;++i)r.fillText(""+d[i],0,f),f+=u.lineHeight;else r.fillText(d,0,f);r.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,r=e.options,a=r.scaleLabel;if(!!a.display){var n=ye(a.fontColor,_.global.defaultFontColor),i=h.options._parseFont(a),o=h.options.toPadding(a.padding),l=i.lineHeight/2,s=r.position,u=0,d,f;if(e.isHorizontal())d=e.left+e.width/2,f=s==="bottom"?e.bottom-l-o.bottom:e.top+l+o.top;else{var c=s==="left";d=c?e.left+l+o.top:e.right-l-o.top,f=e.top+e.height/2,u=c?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(d,f),t.rotate(u),t.textAlign="center",t.textBaseline="middle",t.fillStyle=n,t.font=i.string,t.fillText(a.labelString,0,0),t.restore()}},draw:function(e){var t=this;!t._isVisible()||(t._drawGrid(e),t._drawTitle(),t._drawLabels())},_layers:function(){var e=this,t=e.options,r=t.ticks&&t.ticks.z||0,a=t.gridLines&&t.gridLines.z||0;return!e._isVisible()||r===a||e.draw!==e._draw?[{z:r,draw:function(){e.draw.apply(e,arguments)}}]:[{z:a,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:r,draw:function(){e._drawLabels.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(e){var t=this,r=t.isHorizontal();return t.chart._getSortedVisibleDatasetMetas().filter(function(a){return(!e||a.type===e)&&(r?a.xAxisID===t.id:a.yAxisID===t.id)})}});Nt.prototype._draw=Nt.prototype.draw;var W=Nt,zt=h.isNullOrUndef,Jn={position:"bottom"},Or=W.extend({determineDataLimits:function(){var e=this,t=e._getLabels(),r=e.options.ticks,a=r.min,n=r.max,i=0,o=t.length-1,l;a!==void 0&&(l=t.indexOf(a),l>=0&&(i=l)),n!==void 0&&(l=t.indexOf(n),l>=0&&(o=l)),e.minIndex=i,e.maxIndex=o,e.min=t[i],e.max=t[o]},buildTicks:function(){var e=this,t=e._getLabels(),r=e.minIndex,a=e.maxIndex;e.ticks=r===0&&a===t.length-1?t:t.slice(r,a+1)},getLabelForIndex:function(e,t){var r=this,a=r.chart;return a.getDatasetMeta(t).controller._getValueScaleId()===r.id?r.getRightValue(a.data.datasets[t].data[e]):r._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,r=e.ticks;W.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),!!r&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(r.length-(t?0:1),1))},getPixelForValue:function(e,t,r){var a=this,n,i,o;return!zt(t)&&!zt(r)&&(e=a.chart.data.datasets[r].data[t]),zt(e)||(n=a.isHorizontal()?e.x:e.y),(n!==void 0||e!==void 0&&isNaN(t))&&(i=a._getLabels(),e=h.valueOrDefault(n,e),o=i.indexOf(e),t=o!==-1?o:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=this,r=Math.round(t._startValue+t.getDecimalForPixel(e)*t._valueRange);return Math.min(Math.max(r,0),t.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Qn=Jn;Or._defaults=Qn;var ei=h.noop,_e=h.isNullOrUndef;function ti(e,t){var r=[],a=1e-14,n=e.stepSize,i=n||1,o=e.maxTicks-1,l=e.min,s=e.max,u=e.precision,d=t.min,f=t.max,c=h.niceNum((f-d)/o/i)*i,v,g,p,m;if(c<a&&_e(l)&&_e(s))return[d,f];m=Math.ceil(f/c)-Math.floor(d/c),m>o&&(c=h.niceNum(m*c/o/i)*i),n||_e(u)?v=Math.pow(10,h._decimalPlaces(c)):(v=Math.pow(10,u),c=Math.ceil(c*v)/v),g=Math.floor(d/c)*c,p=Math.ceil(f/c)*c,n&&(!_e(l)&&h.almostWhole(l/c,c/1e3)&&(g=l),!_e(s)&&h.almostWhole(s/c,c/1e3)&&(p=s)),m=(p-g)/c,h.almostEquals(m,Math.round(m),c/1e3)?m=Math.round(m):m=Math.ceil(m),g=Math.round(g*v)/v,p=Math.round(p*v)/v,r.push(_e(l)?g:l);for(var b=1;b<m;++b)r.push(Math.round((g+b*c)*v)/v);return r.push(_e(s)?p:s),r}var at=W.extend({getRightValue:function(e){return typeof e=="string"?+e:W.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options,r=t.ticks;if(r.beginAtZero){var a=h.sign(e.min),n=h.sign(e.max);a<0&&n<0?e.max=0:a>0&&n>0&&(e.min=0)}var i=r.min!==void 0||r.suggestedMin!==void 0,o=r.max!==void 0||r.suggestedMax!==void 0;r.min!==void 0?e.min=r.min:r.suggestedMin!==void 0&&(e.min===null?e.min=r.suggestedMin:e.min=Math.min(e.min,r.suggestedMin)),r.max!==void 0?e.max=r.max:r.suggestedMax!==void 0&&(e.max===null?e.max=r.suggestedMax:e.max=Math.max(e.max,r.suggestedMax)),i!==o&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,r.beginAtZero||e.min--)},getTickLimit:function(){var e=this,t=e.options.ticks,r=t.stepSize,a=t.maxTicksLimit,n;return r?n=Math.ceil(e.max/r)-Math.floor(e.min/r)+1:(n=e._computeTickLimit(),a=a||11),a&&(n=Math.min(a,n)),n},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:ei,buildTicks:function(){var e=this,t=e.options,r=t.ticks,a=e.getTickLimit();a=Math.max(2,a);var n={maxTicks:a,min:r.min,max:r.max,precision:r.precision,stepSize:h.valueOrDefault(r.fixedStepSize,r.stepSize)},i=e.ticks=ti(n,e);e.handleDirectionalChanges(),e.max=h.max(i),e.min=h.min(i),r.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){var e=this;e.ticksAsNumbers=e.ticks.slice(),e.zeroLineIndex=e.ticks.indexOf(0),W.prototype.convertTicksToLabels.call(e)},_configure:function(){var e=this,t=e.getTicks(),r=e.min,a=e.max,n;W.prototype._configure.call(e),e.options.offset&&t.length&&(n=(a-r)/Math.max(t.length-1,1)/2,r-=n,a+=n),e._startValue=r,e._endValue=a,e._valueRange=a-r}}),ri={position:"left",ticks:{callback:Ve.formatters.linear}},ai=0,ni=1;function ii(e,t,r){var a=[r.type,t===void 0&&r.stack===void 0?r.index:"",r.stack].join(".");return e[a]===void 0&&(e[a]={pos:[],neg:[]}),e[a]}function oi(e,t,r,a){var n=e.options,i=n.stacked,o=ii(t,i,r),l=o.pos,s=o.neg,u=a.length,d,f;for(d=0;d<u;++d)f=e._parseValue(a[d]),!(isNaN(f.min)||isNaN(f.max)||r.data[d].hidden)&&(l[d]=l[d]||0,s[d]=s[d]||0,n.relativePoints?l[d]=100:f.min<0||f.max<0?s[d]+=f.min:l[d]+=f.max)}function si(e,t,r){var a=r.length,n,i;for(n=0;n<a;++n)i=e._parseValue(r[n]),!(isNaN(i.min)||isNaN(i.max)||t.data[n].hidden)&&(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}var Lr=at.extend({determineDataLimits:function(){var e=this,t=e.options,r=e.chart,a=r.data.datasets,n=e._getMatchingVisibleMetas(),i=t.stacked,o={},l=n.length,s,u,d,f;if(e.min=Number.POSITIVE_INFINITY,e.max=Number.NEGATIVE_INFINITY,i===void 0)for(s=0;!i&&s<l;++s)u=n[s],i=u.stack!==void 0;for(s=0;s<l;++s)u=n[s],d=a[u.index].data,i?oi(e,o,u,d):si(e,u,d);h.each(o,function(c){f=c.pos.concat(c.neg),e.min=Math.min(e.min,h.min(f)),e.max=Math.max(e.max,h.max(f))}),e.min=h.isFinite(e.min)&&!isNaN(e.min)?e.min:ai,e.max=h.isFinite(e.max)&&!isNaN(e.max)?e.max:ni,e.handleTickRangeOptions()},_computeTickLimit:function(){var e=this,t;return e.isHorizontal()?Math.ceil(e.width/40):(t=h.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){var t=this;return t.getPixelForDecimal((+t.getRightValue(e)-t._startValue)/t._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),li=ri;Lr._defaults=li;var Et=h.valueOrDefault,H=h.math.log10;function ui(e,t){var r=[],a=Et(e.min,Math.pow(10,Math.floor(H(t.min)))),n=Math.floor(H(t.max)),i=Math.ceil(t.max/Math.pow(10,n)),o,l;a===0?(o=Math.floor(H(t.minNotZero)),l=Math.floor(t.minNotZero/Math.pow(10,o)),r.push(a),a=l*Math.pow(10,o)):(o=Math.floor(H(a)),l=Math.floor(a/Math.pow(10,o)));var s=o<0?Math.pow(10,Math.abs(o)):1;do r.push(a),++l,l===10&&(l=1,++o,s=o>=0?1:s),a=Math.round(l*Math.pow(10,o)*s)/s;while(o<n||o===n&&l<i);var u=Et(e.max,a);return r.push(u),r}var di={position:"left",ticks:{callback:Ve.formatters.logarithmic}};function nt(e,t){return h.isFinite(e)&&e>=0?e:t}var Rr=W.extend({determineDataLimits:function(){var e=this,t=e.options,r=e.chart,a=r.data.datasets,n=e.isHorizontal();function i(m){return n?m.xAxisID===e.id:m.yAxisID===e.id}var o,l,s,u,d,f;e.min=Number.POSITIVE_INFINITY,e.max=Number.NEGATIVE_INFINITY,e.minNotZero=Number.POSITIVE_INFINITY;var c=t.stacked;if(c===void 0){for(o=0;o<a.length;o++)if(l=r.getDatasetMeta(o),r.isDatasetVisible(o)&&i(l)&&l.stack!==void 0){c=!0;break}}if(t.stacked||c){var v={};for(o=0;o<a.length;o++){l=r.getDatasetMeta(o);var g=[l.type,t.stacked===void 0&&l.stack===void 0?o:"",l.stack].join(".");if(r.isDatasetVisible(o)&&i(l))for(v[g]===void 0&&(v[g]=[]),u=a[o].data,d=0,f=u.length;d<f;d++){var p=v[g];s=e._parseValue(u[d]),!(isNaN(s.min)||isNaN(s.max)||l.data[d].hidden||s.min<0||s.max<0)&&(p[d]=p[d]||0,p[d]+=s.max)}}h.each(v,function(m){if(m.length>0){var b=h.min(m),x=h.max(m);e.min=Math.min(e.min,b),e.max=Math.max(e.max,x)}})}else for(o=0;o<a.length;o++)if(l=r.getDatasetMeta(o),r.isDatasetVisible(o)&&i(l))for(u=a[o].data,d=0,f=u.length;d<f;d++)s=e._parseValue(u[d]),!(isNaN(s.min)||isNaN(s.max)||l.data[d].hidden||s.min<0||s.max<0)&&(e.min=Math.min(s.min,e.min),e.max=Math.max(s.max,e.max),s.min!==0&&(e.minNotZero=Math.min(s.min,e.minNotZero)));e.min=h.isFinite(e.min)?e.min:null,e.max=h.isFinite(e.max)?e.max:null,e.minNotZero=h.isFinite(e.minNotZero)?e.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks,r=1,a=10;e.min=nt(t.min,e.min),e.max=nt(t.max,e.max),e.min===e.max&&(e.min!==0&&e.min!==null?(e.min=Math.pow(10,Math.floor(H(e.min))-1),e.max=Math.pow(10,Math.floor(H(e.max))+1)):(e.min=r,e.max=a)),e.min===null&&(e.min=Math.pow(10,Math.floor(H(e.max))-1)),e.max===null&&(e.max=e.min!==0?Math.pow(10,Math.floor(H(e.min))+1):a),e.minNotZero===null&&(e.min>0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(H(e.max))):e.minNotZero=r)},buildTicks:function(){var e=this,t=e.options.ticks,r=!e.isHorizontal(),a={min:nt(t.min),max:nt(t.max)},n=e.ticks=ui(a,e);e.max=h.max(n),e.min=h.min(n),t.reverse?(r=!r,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),r&&n.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),W.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(H(e)),r=Math.floor(e/Math.pow(10,t));return r*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,r=0;W.prototype._configure.call(e),t===0&&(t=e._getFirstTickValue(e.minNotZero),r=Et(e.options.ticks.fontSize,_.global.defaultFontSize)/e._length),e._startValue=H(t),e._valueOffset=r,e._valueRange=(H(e.max)-H(t))/(1-r)},getPixelForValue:function(e){var t=this,r=0;return e=+t.getRightValue(e),e>t.min&&e>0&&(r=(H(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(r)},getValueForPixel:function(e){var t=this,r=t.getDecimalForPixel(e);return r===0&&t.min===0?0:Math.pow(10,t._startValue+(r-t._valueOffset)*t._valueRange)}}),fi=di;Rr._defaults=fi;var it=h.valueOrDefault,Wt=h.valueAtIndexOrDefault,Br=h.options.resolve,hi={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:Ve.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Ht(e){var t=e.ticks;return t.display&&e.display?it(t.fontSize,_.global.defaultFontSize)+t.backdropPaddingY*2:0}function ci(e,t,r){return h.isArray(r)?{w:h.longestText(e,e.font,r),h:r.length*t}:{w:e.measureText(r).width,h:t}}function Nr(e,t,r,a,n){return e===a||e===n?{start:t-r/2,end:t+r/2}:e<a||e>n?{start:t-r,end:t}:{start:t,end:t+r}}function vi(e){var t=h.options._parseFont(e.options.pointLabels),r={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={},n,i,o;e.ctx.font=t.string,e._pointLabelSizes=[];var l=e.chart.data.labels.length;for(n=0;n<l;n++){o=e.getPointPosition(n,e.drawingArea+5),i=ci(e.ctx,t.lineHeight,e.pointLabels[n]),e._pointLabelSizes[n]=i;var s=e.getIndexAngle(n),u=h.toDegrees(s)%360,d=Nr(u,o.x,i.w,0,180),f=Nr(u,o.y,i.h,90,270);d.start<r.l&&(r.l=d.start,a.l=s),d.end>r.r&&(r.r=d.end,a.r=s),f.start<r.t&&(r.t=f.start,a.t=s),f.end>r.b&&(r.b=f.end,a.b=s)}e.setReductions(e.drawingArea,r,a)}function gi(e){return e===0||e===180?"center":e<180?"left":"right"}function pi(e,t,r,a){var n=r.y+a/2,i,o;if(h.isArray(t))for(i=0,o=t.length;i<o;++i)e.fillText(t[i],r.x,n),n+=a;else e.fillText(t,r.x,n)}function mi(e,t,r){e===90||e===270?r.y-=t.h/2:(e>270||e<90)&&(r.y-=t.h)}function bi(e){var t=e.ctx,r=e.options,a=r.pointLabels,n=Ht(r),i=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),o=h.options._parseFont(a);t.save(),t.font=o.string,t.textBaseline="middle";for(var l=e.chart.data.labels.length-1;l>=0;l--){var s=l===0?n/2:0,u=e.getPointPosition(l,i+s+5),d=Wt(a.fontColor,l,_.global.defaultFontColor);t.fillStyle=d;var f=e.getIndexAngle(l),c=h.toDegrees(f);t.textAlign=gi(c),mi(c,e._pointLabelSizes[l],u),pi(t,e.pointLabels[l],u,o.lineHeight)}t.restore()}function xi(e,t,r,a){var n=e.ctx,i=t.circular,o=e.chart.data.labels.length,l=Wt(t.color,a-1),s=Wt(t.lineWidth,a-1),u;if(!(!i&&!o||!l||!s)){if(n.save(),n.strokeStyle=l,n.lineWidth=s,n.setLineDash&&(n.setLineDash(t.borderDash||[]),n.lineDashOffset=t.borderDashOffset||0),n.beginPath(),i)n.arc(e.xCenter,e.yCenter,r,0,Math.PI*2);else{u=e.getPointPosition(0,r),n.moveTo(u.x,u.y);for(var d=1;d<o;d++)u=e.getPointPosition(d,r),n.lineTo(u.x,u.y)}n.closePath(),n.stroke(),n.restore()}}function ot(e){return h.isNumber(e)?e:0}var zr=at.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Ht(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,r=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;h.each(t.data.datasets,function(n,i){if(t.isDatasetVisible(i)){var o=t.getDatasetMeta(i);h.each(n.data,function(l,s){var u=+e.getRightValue(l);isNaN(u)||o.data[s].hidden||(r=Math.min(u,r),a=Math.max(u,a))})}}),e.min=r===Number.POSITIVE_INFINITY?0:r,e.max=a===Number.NEGATIVE_INFINITY?0:a,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Ht(this.options))},convertTicksToLabels:function(){var e=this;at.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(function(){var t=h.callback(e.options.pointLabels.callback,arguments,e);return t||t===0?t:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this,t=e.options;t.display&&t.pointLabels.display?vi(e):e.setCenterPoint(0,0,0,0)},setReductions:function(e,t,r){var a=this,n=t.l/Math.sin(r.l),i=Math.max(t.r-a.width,0)/Math.sin(r.r),o=-t.t/Math.cos(r.t),l=-Math.max(t.b-(a.height-a.paddingTop),0)/Math.cos(r.b);n=ot(n),i=ot(i),o=ot(o),l=ot(l),a.drawingArea=Math.min(Math.floor(e-(n+i)/2),Math.floor(e-(o+l)/2)),a.setCenterPoint(n,i,o,l)},setCenterPoint:function(e,t,r,a){var n=this,i=n.width-t-n.drawingArea,o=e+n.drawingArea,l=r+n.drawingArea,s=n.height-n.paddingTop-a-n.drawingArea;n.xCenter=Math.floor((o+i)/2+n.left),n.yCenter=Math.floor((l+s)/2+n.top+n.paddingTop)},getIndexAngle:function(e){var t=this.chart,r=360/t.data.labels.length,a=t.options||{},n=a.startAngle||0,i=(e*r+n)%360;return(i<0?i+360:i)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(h.isNullOrUndef(e))return NaN;var r=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*r:(e-t.min)*r},getPointPosition:function(e,t){var r=this,a=r.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(a)*t+r.xCenter,y:Math.sin(a)*t+r.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this,r=t.min,a=t.max;return t.getPointPositionForValue(e||0,t.beginAtZero?0:r<0&&a<0?a:r>0&&a>0?r:0)},_drawGrid:function(){var e=this,t=e.ctx,r=e.options,a=r.gridLines,n=r.angleLines,i=it(n.lineWidth,a.lineWidth),o=it(n.color,a.color),l,s,u;if(r.pointLabels.display&&bi(e),a.display&&h.each(e.ticks,function(d,f){f!==0&&(s=e.getDistanceFromCenterForValue(e.ticksAsNumbers[f]),xi(e,a,s,f))}),n.display&&i&&o){for(t.save(),t.lineWidth=i,t.strokeStyle=o,t.setLineDash&&(t.setLineDash(Br([n.borderDash,a.borderDash,[]])),t.lineDashOffset=Br([n.borderDashOffset,a.borderDashOffset,0])),l=e.chart.data.labels.length-1;l>=0;l--)s=e.getDistanceFromCenterForValue(r.ticks.reverse?e.min:e.max),u=e.getPointPosition(l,s),t.beginPath(),t.moveTo(e.xCenter,e.yCenter),t.lineTo(u.x,u.y),t.stroke();t.restore()}},_drawLabels:function(){var e=this,t=e.ctx,r=e.options,a=r.ticks;if(!!a.display){var n=e.getIndexAngle(0),i=h.options._parseFont(a),o=it(a.fontColor,_.global.defaultFontColor),l,s;t.save(),t.font=i.string,t.translate(e.xCenter,e.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",h.each(e.ticks,function(u,d){d===0&&!a.reverse||(l=e.getDistanceFromCenterForValue(e.ticksAsNumbers[d]),a.showLabelBackdrop&&(s=t.measureText(u).width,t.fillStyle=a.backdropColor,t.fillRect(-s/2-a.backdropPaddingX,-l-i.size/2-a.backdropPaddingY,s+a.backdropPaddingX*2,i.size+a.backdropPaddingY*2)),t.fillStyle=o,t.fillText(u,0,-l))}),t.restore()}},_drawTitle:h.noop}),yi=hi;zr._defaults=yi;var Vt=h._deprecated,Er=h.options.resolve,_i=h.valueOrDefault,Wr=Number.MIN_SAFE_INTEGER||-9007199254740991,jt=Number.MAX_SAFE_INTEGER||9007199254740991,st={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}},V=Object.keys(st);function Hr(e,t){return e-t}function ki(e){var t={},r=[],a,n,i;for(a=0,n=e.length;a<n;++a)i=e[a],t[i]||(t[i]=!0,r.push(i));return r}function Vr(e){return h.valueOrDefault(e.time.min,e.ticks.min)}function jr(e){return h.valueOrDefault(e.time.max,e.ticks.max)}function wi(e,t,r,a){if(a==="linear"||!e.length)return[{time:t,pos:0},{time:r,pos:1}];var n=[],i=[t],o,l,s,u,d;for(o=0,l=e.length;o<l;++o)u=e[o],u>t&&u<r&&i.push(u);for(i.push(r),o=0,l=i.length;o<l;++o)d=i[o+1],s=i[o-1],u=i[o],(s===void 0||d===void 0||Math.round((d+s)/2)!==u)&&n.push({time:u,pos:o/(l-1)});return n}function Mi(e,t,r){for(var a=0,n=e.length-1,i,o,l;a>=0&&a<=n;)if(i=a+n>>1,o=e[i-1]||null,l=e[i],o)if(l[t]<r)a=i+1;else if(o[t]>r)n=i-1;else return{lo:o,hi:l};else return{lo:null,hi:l};return{lo:l,hi:null}}function Ae(e,t,r,a){var n=Mi(e,t,r),i=n.lo?n.hi?n.lo:e[e.length-2]:e[0],o=n.lo?n.hi?n.hi:e[e.length-1]:e[1],l=o[t]-i[t],s=l?(r-i[t])/l:0,u=(o[a]-i[a])*s;return i[a]+u}function qt(e,t){var r=e._adapter,a=e.options.time,n=a.parser,i=n||a.format,o=t;return typeof n=="function"&&(o=n(o)),h.isFinite(o)||(o=typeof i=="string"?r.parse(o,i):r.parse(o)),o!==null?+o:(!n&&typeof i=="function"&&(o=i(t),h.isFinite(o)||(o=r.parse(o))),o)}function ke(e,t){if(h.isNullOrUndef(t))return null;var r=e.options.time,a=qt(e,e.getRightValue(t));return a===null||r.round&&(a=+e._adapter.startOf(a,r.round)),a}function qr(e,t,r,a){var n=V.length,i,o,l;for(i=V.indexOf(e);i<n-1;++i)if(o=st[V[i]],l=o.steps?o.steps:jt,o.common&&Math.ceil((r-t)/(l*o.size))<=a)return V[i];return V[n-1]}function Si(e,t,r,a,n){var i,o;for(i=V.length-1;i>=V.indexOf(r);i--)if(o=V[i],st[o].common&&e._adapter.diff(n,a,o)>=t-1)return o;return V[r?V.indexOf(r):0]}function Ci(e){for(var t=V.indexOf(e)+1,r=V.length;t<r;++t)if(st[V[t]].common)return V[t]}function Di(e,t,r,a){var n=e._adapter,i=e.options,o=i.time,l=o.unit||qr(o.minUnit,t,r,a),s=Er([o.stepSize,o.unitStepSize,1]),u=l==="week"?o.isoWeekday:!1,d=t,f=[],c;if(u&&(d=+n.startOf(d,"isoWeek",u)),d=+n.startOf(d,u?"day":l),n.diff(r,t,l)>1e5*s)throw t+" and "+r+" are too far apart with stepSize of "+s+" "+l;for(c=d;c<r;c=+n.add(c,s,l))f.push(c);return(c===r||i.bounds==="ticks")&&f.push(c),f}function Pi(e,t,r,a,n){var i=0,o=0,l,s;return n.offset&&t.length&&(l=Ae(e,"time",t[0],"pos"),t.length===1?i=1-l:i=(Ae(e,"time",t[1],"pos")-l)/2,s=Ae(e,"time",t[t.length-1],"pos"),t.length===1?o=s:o=(s-Ae(e,"time",t[t.length-2],"pos"))/2),{start:i,end:o,factor:1/(i+1+o)}}function Ai(e,t,r,a){var n=e._adapter,i=+n.startOf(t[0].value,a),o=t[t.length-1].value,l,s;for(l=i;l<=o;l=+n.add(l,1,a))s=r[l],s>=0&&(t[s].major=!0);return t}function Ur(e,t,r){var a=[],n={},i=t.length,o,l;for(o=0;o<i;++o)l=t[o],n[l]=o,a.push({value:l,major:!1});return i===0||!r?a:Ai(e,a,n,r)}var Ti={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}},$r=W.extend({initialize:function(){this.mergeTicksOptions(),W.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,r=t.time||(t.time={}),a=e._adapter=new Ot._date(t.adapters.date);return Vt("time scale",r.format,"time.format","time.parser"),Vt("time scale",r.min,"time.min","ticks.min"),Vt("time scale",r.max,"time.max","ticks.max"),h.mergeIf(r.displayFormats,a.formats()),W.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&e.t!==void 0&&(e=e.t),W.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e=this,t=e.chart,r=e._adapter,a=e.options,n=a.time.unit||"day",i=jt,o=Wr,l=[],s=[],u=[],d,f,c,v,g,p,m,b=e._getLabels();for(d=0,c=b.length;d<c;++d)u.push(ke(e,b[d]));for(d=0,c=(t.data.datasets||[]).length;d<c;++d)if(t.isDatasetVisible(d))if(g=t.data.datasets[d].data,h.isObject(g[0]))for(s[d]=[],f=0,v=g.length;f<v;++f)p=ke(e,g[f]),l.push(p),s[d][f]=p;else s[d]=u.slice(0),m||(l=l.concat(u),m=!0);else s[d]=[];u.length&&(i=Math.min(i,u[0]),o=Math.max(o,u[u.length-1])),l.length&&(l=c>1?ki(l).sort(Hr):l.sort(Hr),i=Math.min(i,l[0]),o=Math.max(o,l[l.length-1])),i=ke(e,Vr(a))||i,o=ke(e,jr(a))||o,i=i===jt?+r.startOf(Date.now(),n):i,o=o===Wr?+r.endOf(Date.now(),n)+1:o,e.min=Math.min(i,o),e.max=Math.max(i+1,o),e._table=[],e._timestamps={data:l,datasets:s,labels:u}},buildTicks:function(){var e=this,t=e.min,r=e.max,a=e.options,n=a.ticks,i=a.time,o=e._timestamps,l=[],s=e.getLabelCapacity(t),u=n.source,d=a.distribution,f,c,v;for(u==="data"||u==="auto"&&d==="series"?o=o.data:u==="labels"?o=o.labels:o=Di(e,t,r,s),a.bounds==="ticks"&&o.length&&(t=o[0],r=o[o.length-1]),t=ke(e,Vr(a))||t,r=ke(e,jr(a))||r,f=0,c=o.length;f<c;++f)v=o[f],v>=t&&v<=r&&l.push(v);return e.min=t,e.max=r,e._unit=i.unit||(n.autoSkip?qr(i.minUnit,e.min,e.max,s):Si(e,l.length,i.minUnit,e.min,e.max)),e._majorUnit=!n.major.enabled||e._unit==="year"?void 0:Ci(e._unit),e._table=wi(e._timestamps.data,t,r,d),e._offsets=Pi(e._table,l,t,r,a),n.reverse&&l.reverse(),Ur(e,l,e._majorUnit)},getLabelForIndex:function(e,t){var r=this,a=r._adapter,n=r.chart.data,i=r.options.time,o=n.labels&&e<n.labels.length?n.labels[e]:"",l=n.datasets[t].data[e];return h.isObject(l)&&(o=r.getRightValue(l)),i.tooltipFormat?a.format(qt(r,o),i.tooltipFormat):typeof o=="string"?o:a.format(qt(r,o),i.displayFormats.datetime)},tickFormatFunction:function(e,t,r,a){var n=this,i=n._adapter,o=n.options,l=o.time.displayFormats,s=l[n._unit],u=n._majorUnit,d=l[u],f=r[t],c=o.ticks,v=u&&d&&f&&f.major,g=i.format(e,a||(v?d:s)),p=v?c.major:c.minor,m=Er([p.callback,p.userCallback,c.callback,c.userCallback]);return m?m(g,t,r):g},convertTicksToLabels:function(e){var t=[],r,a;for(r=0,a=e.length;r<a;++r)t.push(this.tickFormatFunction(e[r].value,r,e));return t},getPixelForOffset:function(e){var t=this,r=t._offsets,a=Ae(t._table,"time",e,"pos");return t.getPixelForDecimal((r.start+a)*r.factor)},getPixelForValue:function(e,t,r){var a=this,n=null;if(t!==void 0&&r!==void 0&&(n=a._timestamps.datasets[r][t]),n===null&&(n=ke(a,e)),n!==null)return a.getPixelForOffset(n)},getPixelForTick:function(e){var t=this.getTicks();return e>=0&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this,r=t._offsets,a=t.getDecimalForPixel(e)/r.factor-r.end,n=Ae(t._table,"pos",a,"time");return t._adapter._create(n)},_getLabelSize:function(e){var t=this,r=t.options.ticks,a=t.ctx.measureText(e).width,n=h.toRadians(t.isHorizontal()?r.maxRotation:r.minRotation),i=Math.cos(n),o=Math.sin(n),l=_i(r.fontSize,_.global.defaultFontSize);return{w:a*i+l*o,h:a*o+l*i}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this,r=t.options.time,a=r.displayFormats,n=a[r.unit]||a.millisecond,i=t.tickFormatFunction(e,0,Ur(t,[e],t._majorUnit),n),o=t._getLabelSize(i),l=Math.floor(t.isHorizontal()?t.width/o.w:t.height/o.h);return t.options.offset&&l--,l>0?l:1}}),Fi=Ti;$r._defaults=Fi;var Ii={category:Or,linear:Lr,logarithmic:Rr,radialLinear:zr,time:$r},Oi={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"};Ot._date.override(typeof O=="function"?{_id:"moment",formats:function(){return Oi},parse:function(e,t){return typeof e=="string"&&typeof t=="string"?e=O(e,t):e instanceof O||(e=O(e)),e.isValid()?e.valueOf():null},format:function(e,t){return O(e).format(t)},add:function(e,t,r){return O(e).add(t,r).valueOf()},diff:function(e,t,r){return O(e).diff(O(t),r)},startOf:function(e,t,r){return e=O(e),t==="isoWeek"?e.isoWeekday(r).valueOf():e.startOf(t).valueOf()},endOf:function(e,t){return O(e).endOf(t).valueOf()},_create:function(e){return O(e)}}:{}),_._set("global",{plugins:{filler:{propagate:!0}}});var Li={dataset:function(e){var t=e.fill,r=e.chart,a=r.getDatasetMeta(t),n=a&&r.isDatasetVisible(t),i=n&&a.dataset._children||[],o=i.length||0;return o?function(l,s){return s<o&&i[s]._view||null}:null},boundary:function(e){var t=e.boundary,r=t?t.x:null,a=t?t.y:null;return h.isArray(t)?function(n,i){return t[i]}:function(n){return{x:r===null?n.x:r,y:a===null?n.y:a}}}};function Ri(e,t,r){var a=e._model||{},n=a.fill,i;if(n===void 0&&(n=!!a.backgroundColor),n===!1||n===null)return!1;if(n===!0)return"origin";if(i=parseFloat(n,10),isFinite(i)&&Math.floor(i)===i)return(n[0]==="-"||n[0]==="+")&&(i=t+i),i===t||i<0||i>=r?!1:i;switch(n){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return n;default:return!1}}function Bi(e){var t=e.el._model||{},r=e.el._scale||{},a=e.fill,n=null,i;if(isFinite(a))return null;if(a==="start"?n=t.scaleBottom===void 0?r.bottom:t.scaleBottom:a==="end"?n=t.scaleTop===void 0?r.top:t.scaleTop:t.scaleZero!==void 0?n=t.scaleZero:r.getBasePixel&&(n=r.getBasePixel()),n!=null){if(n.x!==void 0&&n.y!==void 0)return n;if(h.isFinite(n))return i=r.isHorizontal(),{x:i?n:null,y:i?null:n}}return null}function Ni(e){var t=e.el._scale,r=t.options,a=t.chart.data.labels.length,n=e.fill,i=[],o,l,s,u,d;if(!a)return null;for(o=r.ticks.reverse?t.max:t.min,l=r.ticks.reverse?t.min:t.max,s=t.getPointPositionForValue(0,o),u=0;u<a;++u)d=n==="start"||n==="end"?t.getPointPositionForValue(u,n==="start"?o:l):t.getBasePosition(u),r.gridLines.circular&&(d.cx=s.x,d.cy=s.y,d.angle=t.getIndexAngle(u)-Math.PI/2),i.push(d);return i}function zi(e){var t=e.el._scale||{};return t.getPointPositionForValue?Ni(e):Bi(e)}function Ei(e,t,r){var a=e[t],n=a.fill,i=[t],o;if(!r)return n;for(;n!==!1&&i.indexOf(n)===-1;){if(!isFinite(n))return n;if(o=e[n],!o)return!1;if(o.visible)return n;i.push(n),n=o.fill}return!1}function Wi(e){var t=e.fill,r="dataset";return t===!1?null:(isFinite(t)||(r="boundary"),Li[r](e))}function Yr(e){return e&&!e.skip}function Gr(e,t,r,a,n){var i,o,l,s;if(!(!a||!n)){for(e.moveTo(t[0].x,t[0].y),i=1;i<a;++i)h.canvas.lineTo(e,t[i-1],t[i]);if(r[0].angle!==void 0){for(o=r[0].cx,l=r[0].cy,s=Math.sqrt(Math.pow(r[0].x-o,2)+Math.pow(r[0].y-l,2)),i=n-1;i>0;--i)e.arc(o,l,s,r[i].angle,r[i-1].angle,!0);return}for(e.lineTo(r[n-1].x,r[n-1].y),i=n-1;i>0;--i)h.canvas.lineTo(e,r[i],r[i-1],!0)}}function Hi(e,t,r,a,n,i){var o=t.length,l=a.spanGaps,s=[],u=[],d=0,f=0,c,v,g,p,m,b,x,y;for(e.beginPath(),c=0,v=o;c<v;++c)g=c%o,p=t[g]._view,m=r(p,g,a),b=Yr(p),x=Yr(m),i&&y===void 0&&b&&(y=c+1,v=o+y),b&&x?(d=s.push(p),f=u.push(m)):d&&f&&(l?(b&&s.push(p),x&&u.push(m)):(Gr(e,s,u,d,f),d=f=0,s=[],u=[]));Gr(e,s,u,d,f),e.closePath(),e.fillStyle=n,e.fill()}var Vi={id:"filler",afterDatasetsUpdate:function(e,t){var r=(e.data.datasets||[]).length,a=t.propagate,n=[],i,o,l,s;for(o=0;o<r;++o)i=e.getDatasetMeta(o),l=i.dataset,s=null,l&&l._model&&l instanceof E.Line&&(s={visible:e.isDatasetVisible(o),fill:Ri(l,o,r),chart:e,el:l}),i.$filler=s,n.push(s);for(o=0;o<r;++o)s=n[o],!!s&&(s.fill=Ei(n,o,a),s.boundary=zi(s),s.mapper=Wi(s))},beforeDatasetsDraw:function(e){var t=e._getSortedVisibleDatasetMetas(),r=e.ctx,a,n,i,o,l,s,u;for(n=t.length-1;n>=0;--n)a=t[n].$filler,!(!a||!a.visible)&&(i=a.el,o=i._view,l=i._children||[],s=a.mapper,u=o.backgroundColor||_.global.defaultColor,s&&u&&l.length&&(h.canvas.clipArea(r,e.chartArea),Hi(r,l,s,o,u,i._loop),h.canvas.unclipArea(r)))}},ji=h.rtl.getRtlAdapter,de=h.noop,fe=h.valueOrDefault;_._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var r=t.datasetIndex,a=this.chart,n=a.getDatasetMeta(r);n.hidden=n.hidden===null?!a.data.datasets[r].hidden:null,a.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,r=e.options.legend||{},a=r.labels&&r.labels.usePointStyle;return e._getSortedDatasetMetas().map(function(n){var i=n.controller.getStyle(a?0:void 0);return{text:t[n.index].label,fillStyle:i.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:i.borderCapStyle,lineDash:i.borderDash,lineDashOffset:i.borderDashOffset,lineJoin:i.borderJoinStyle,lineWidth:i.borderWidth,strokeStyle:i.borderColor,pointStyle:i.pointStyle,rotation:i.rotation,datasetIndex:n.index}},this)}}},legendCallback:function(e){var t=document.createElement("ul"),r=e.data.datasets,a,n,i,o;for(t.setAttribute("class",e.id+"-legend"),a=0,n=r.length;a<n;a++)i=t.appendChild(document.createElement("li")),o=i.appendChild(document.createElement("span")),o.style.backgroundColor=r[a].backgroundColor,r[a].label&&i.appendChild(document.createTextNode(r[a].label));return t.outerHTML}});function Ut(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}var Xr=ee.extend({initialize:function(e){var t=this;h.extend(t,e),t.legendHitBoxes=[],t._hoveredItem=null,t.doughnutMode=!1},beforeUpdate:de,update:function(e,t,r){var a=this;return a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=r,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:de,beforeSetDimensions:de,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:de,beforeBuildLabels:de,buildLabels:function(){var e=this,t=e.options.labels||{},r=h.callback(t.generateLabels,[e.chart],e)||[];t.filter&&(r=r.filter(function(a){return t.filter(a,e.chart.data)})),e.options.reverse&&r.reverse(),e.legendItems=r},afterBuildLabels:de,beforeFit:de,fit:function(){var e=this,t=e.options,r=t.labels,a=t.display,n=e.ctx,i=h.options._parseFont(r),o=i.size,l=e.legendHitBoxes=[],s=e.minSize,u=e.isHorizontal();if(u?(s.width=e.maxWidth,s.height=a?10:0):(s.width=a?10:0,s.height=e.maxHeight),!a){e.width=s.width=e.height=s.height=0;return}if(n.font=i.string,u){var d=e.lineWidths=[0],f=0;n.textAlign="left",n.textBaseline="middle",h.each(e.legendItems,function(x,y){var w=Ut(r,o),k=w+o/2+n.measureText(x.text).width;(y===0||d[d.length-1]+k+2*r.padding>s.width)&&(f+=o+r.padding,d[d.length-(y>0?0:1)]=0),l[y]={left:0,top:0,width:k,height:o},d[d.length-1]+=k+r.padding}),s.height+=f}else{var c=r.padding,v=e.columnWidths=[],g=e.columnHeights=[],p=r.padding,m=0,b=0;h.each(e.legendItems,function(x,y){var w=Ut(r,o),k=w+o/2+n.measureText(x.text).width;y>0&&b+o+2*c>s.height&&(p+=m+r.padding,v.push(m),g.push(b),m=0,b=0),m=Math.max(m,k),b+=o+c,l[y]={left:0,top:0,width:k,height:o}}),p+=m,v.push(m),g.push(b),s.width+=p}e.width=s.width,e.height=s.height},afterFit:de,isHorizontal:function(){return this.options.position==="top"||this.options.position==="bottom"},draw:function(){var e=this,t=e.options,r=t.labels,a=_.global,n=a.defaultColor,i=a.elements.line,o=e.height,l=e.columnHeights,s=e.width,u=e.lineWidths;if(!!t.display){var d=ji(t.rtl,e.left,e.minSize.width),f=e.ctx,c=fe(r.fontColor,a.defaultFontColor),v=h.options._parseFont(r),g=v.size,p;f.textAlign=d.textAlign("left"),f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=c,f.fillStyle=c,f.font=v.string;var m=Ut(r,g),b=e.legendHitBoxes,x=function(C,P,T){if(!(isNaN(m)||m<=0)){f.save();var R=fe(T.lineWidth,i.borderWidth);if(f.fillStyle=fe(T.fillStyle,n),f.lineCap=fe(T.lineCap,i.borderCapStyle),f.lineDashOffset=fe(T.lineDashOffset,i.borderDashOffset),f.lineJoin=fe(T.lineJoin,i.borderJoinStyle),f.lineWidth=R,f.strokeStyle=fe(T.strokeStyle,n),f.setLineDash&&f.setLineDash(fe(T.lineDash,i.borderDash)),r&&r.usePointStyle){var L=m*Math.SQRT2/2,I=d.xPlus(C,m/2),B=P+g/2;h.canvas.drawPoint(f,T.pointStyle,L,I,B,T.rotation)}else f.fillRect(d.leftForLtr(C,m),P,m,g),R!==0&&f.strokeRect(d.leftForLtr(C,m),P,m,g);f.restore()}},y=function(C,P,T,R){var L=g/2,I=d.xPlus(C,m+L),B=P+L;f.fillText(T.text,I,B),T.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(I,B),f.lineTo(d.xPlus(I,R),B),f.stroke())},w=function(C,P){switch(t.align){case"start":return r.padding;case"end":return C-P;default:return(C-P+r.padding)/2}},k=e.isHorizontal();k?p={x:e.left+w(s,u[0]),y:e.top+r.padding,line:0}:p={x:e.left+r.padding,y:e.top+w(o,l[0]),line:0},h.rtl.overrideTextDirection(e.ctx,t.textDirection);var D=g+r.padding;h.each(e.legendItems,function(C,P){var T=f.measureText(C.text).width,R=m+g/2+T,L=p.x,I=p.y;d.setWidth(e.minSize.width),k?P>0&&L+R+r.padding>e.left+e.minSize.width&&(I=p.y+=D,p.line++,L=p.x=e.left+w(s,u[p.line])):P>0&&I+D>e.top+e.minSize.height&&(L=p.x=L+e.columnWidths[p.line]+r.padding,p.line++,I=p.y=e.top+w(o,l[p.line]));var B=d.x(L);x(B,I,C),b[P].left=d.leftForLtr(B,b[P].width),b[P].top=I,y(B,I,C,T),k?p.x+=R+r.padding:p.y+=D}),h.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var r=this,a,n,i;if(e>=r.left&&e<=r.right&&t>=r.top&&t<=r.bottom){for(i=r.legendHitBoxes,a=0;a<i.length;++a)if(n=i[a],e>=n.left&&e<=n.left+n.width&&t>=n.top&&t<=n.top+n.height)return r.legendItems[a]}return null},handleEvent:function(e){var t=this,r=t.options,a=e.type==="mouseup"?"click":e.type,n;if(a==="mousemove"){if(!r.onHover&&!r.onLeave)return}else if(a==="click"){if(!r.onClick)return}else return;n=t._getLegendItemAt(e.x,e.y),a==="click"?n&&r.onClick&&r.onClick.call(t,e.native,n):(r.onLeave&&n!==t._hoveredItem&&(t._hoveredItem&&r.onLeave.call(t,e.native,t._hoveredItem),t._hoveredItem=n),r.onHover&&n&&r.onHover.call(t,e.native,n))}});function Kr(e,t){var r=new Xr({ctx:e.ctx,options:t,chart:e});Z.configure(e,r,t),Z.addBox(e,r),e.legend=r}var qi={id:"legend",_element:Xr,beforeInit:function(e){var t=e.options.legend;t&&Kr(e,t)},beforeUpdate:function(e){var t=e.options.legend,r=e.legend;t?(h.mergeIf(t,_.global.legend),r?(Z.configure(e,r,t),r.options=t):Kr(e,t)):r&&(Z.removeBox(e,r),delete e.legend)},afterEvent:function(e,t){var r=e.legend;r&&r.handleEvent(t)}},le=h.noop;_._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Zr=ee.extend({initialize:function(e){var t=this;h.extend(t,e),t.legendHitBoxes=[]},beforeUpdate:le,update:function(e,t,r){var a=this;return a.beforeUpdate(),a.maxWidth=e,a.maxHeight=t,a.margins=r,a.beforeSetDimensions(),a.setDimensions(),a.afterSetDimensions(),a.beforeBuildLabels(),a.buildLabels(),a.afterBuildLabels(),a.beforeFit(),a.fit(),a.afterFit(),a.afterUpdate(),a.minSize},afterUpdate:le,beforeSetDimensions:le,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:le,beforeBuildLabels:le,buildLabels:le,afterBuildLabels:le,beforeFit:le,fit:function(){var e=this,t=e.options,r=e.minSize={},a=e.isHorizontal(),n,i;if(!t.display){e.width=r.width=e.height=r.height=0;return}n=h.isArray(t.text)?t.text.length:1,i=n*h.options._parseFont(t).lineHeight+t.padding*2,e.width=r.width=a?e.maxWidth:i,e.height=r.height=a?i:e.maxHeight},afterFit:le,isHorizontal:function(){var e=this.options.position;return e==="top"||e==="bottom"},draw:function(){var e=this,t=e.ctx,r=e.options;if(!!r.display){var a=h.options._parseFont(r),n=a.lineHeight,i=n/2+r.padding,o=0,l=e.top,s=e.left,u=e.bottom,d=e.right,f,c,v;t.fillStyle=h.valueOrDefault(r.fontColor,_.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(c=s+(d-s)/2,v=l+i,f=d-s):(c=r.position==="left"?s+i:d-i,v=l+(u-l)/2,f=u-l,o=Math.PI*(r.position==="left"?-.5:.5)),t.save(),t.translate(c,v),t.rotate(o),t.textAlign="center",t.textBaseline="middle";var g=r.text;if(h.isArray(g))for(var p=0,m=0;m<g.length;++m)t.fillText(g[m],0,p,f),p+=n;else t.fillText(g,0,0,f);t.restore()}}});function Jr(e,t){var r=new Zr({ctx:e.ctx,options:t,chart:e});Z.configure(e,r,t),Z.addBox(e,r),e.titleBlock=r}var Ui={id:"title",_element:Zr,beforeInit:function(e){var t=e.options.title;t&&Jr(e,t)},beforeUpdate:function(e){var t=e.options.title,r=e.titleBlock;t?(h.mergeIf(t,_.global.title),r?(Z.configure(e,r,t),r.options=t):Jr(e,t)):r&&(Z.removeBox(e,r),delete e.titleBlock)}},he={},$i=Vi,Yi=qi,Gi=Ui;he.filler=$i,he.legend=Yi,he.title=Gi,M.helpers=h,Vn(),M._adapters=Ot,M.Animation=gt,M.animationService=pt,M.controllers=mr,M.DatasetController=K,M.defaults=_,M.Element=ee,M.elements=E,M.Interaction=Ce,M.layouts=Z,M.platform=De,M.plugins=A,M.Scale=W,M.scaleService=He,M.Ticks=Ve,M.Tooltip=Tt,M.helpers.each(Ii,function(e,t){M.scaleService.registerScaleType(t,e,e._defaults)});for(var Qr in he)he.hasOwnProperty(Qr)&&M.plugins.register(he[Qr]);M.platform.initialize();var Xi=M;return typeof window!="undefined"&&(window.Chart=M),M.Chart=M,M.Legend=he.legend._element,M.Title=he.title._element,M.pluginService=M.plugins,M.PluginBase=M.Element.extend({}),M.canvasHelpers=M.helpers.canvas,M.layoutService=M.layouts,M.LinearScaleBase=at,M.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(e){M[e]=function(t,r){return new M(t,M.helpers.merge(r||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}}),Xi})})(ta);var so=ta.exports;const lo={class:"graph-container h-[300px]"},ho={props:{labels:{type:Array,require:!0,default:Array},values:{type:Array,require:!0,default:Array},invoices:{type:Array,require:!0,default:Array},expenses:{type:Array,require:!0,default:Array},receipts:{type:Array,require:!0,default:Array},income:{type:Array,require:!0,default:Array}},setup(lt){const $=lt,O=Ji("utils");let j=null;const Ie=Qi(null),ae=oo(),F=eo(()=>ae.selectedCompanyCurrency);to(()=>{$.labels&&j&&(j.reset(),ut())}),ro(()=>{let Y=Ie.value.getContext("2d"),Ue=ea({responsive:!0,maintainAspectRatio:!1,tooltips:{enabled:!0,callbacks:{label:function(q,ce){return O.formatMoney(Math.round(q.value*100),F.value)}}},legend:{display:!1}}),we=ea({labels:$.labels,datasets:[{label:"Sales",fill:!1,lineTension:.3,backgroundColor:"rgba(230, 254, 249)",borderColor:"#040405",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",pointBorderColor:"#040405",pointBackgroundColor:"#fff",pointBorderWidth:1,pointHoverRadius:5,pointHoverBackgroundColor:"#040405",pointHoverBorderColor:"rgba(220,220,220,1)",pointHoverBorderWidth:2,pointRadius:4,pointHitRadius:10,data:$.invoices.map(q=>q/100)},{label:"Receipts",fill:!1,lineTension:.3,backgroundColor:"rgba(230, 254, 249)",borderColor:"rgb(2, 201, 156)",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",pointBorderColor:"rgb(2, 201, 156)",pointBackgroundColor:"#fff",pointBorderWidth:1,pointHoverRadius:5,pointHoverBackgroundColor:"rgb(2, 201, 156)",pointHoverBorderColor:"rgba(220,220,220,1)",pointHoverBorderWidth:2,pointRadius:4,pointHitRadius:10,data:$.receipts.map(q=>q/100)},{label:"Expenses",fill:!1,lineTension:.3,backgroundColor:"rgba(245, 235, 242)",borderColor:"rgb(255,0,0)",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",pointBorderColor:"rgb(255,0,0)",pointBackgroundColor:"#fff",pointBorderWidth:1,pointHoverRadius:5,pointHoverBackgroundColor:"rgb(255,0,0)",pointHoverBorderColor:"rgba(220,220,220,1)",pointHoverBorderWidth:2,pointRadius:4,pointHitRadius:10,data:$.expenses.map(q=>q/100)},{label:"Net Income",fill:!1,lineTension:.3,backgroundColor:"rgba(236, 235, 249)",borderColor:"rgba(88, 81, 216, 1)",borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",pointBorderColor:"rgba(88, 81, 216, 1)",pointBackgroundColor:"#fff",pointBorderWidth:1,pointHoverRadius:5,pointHoverBackgroundColor:"rgba(88, 81, 216, 1)",pointHoverBorderColor:"rgba(220,220,220,1)",pointHoverBorderWidth:2,pointRadius:4,pointHitRadius:10,data:$.income.map(q=>q/100)}]});j=new so(Y,{type:"line",data:we,options:Ue})});function ut(){j.data.labels=$.labels,j.data.datasets[0].data=$.invoices.map(Y=>Y/100),j.data.datasets[1].data=$.receipts.map(Y=>Y/100),j.data.datasets[2].data=$.expenses.map(Y=>Y/100),j.data.datasets[3].data=$.income.map(Y=>Y/100),j.update({lazy:!0})}return(Y,Ue)=>(ao(),no("div",lo,[io("canvas",{id:"graph",ref:(we,q)=>{q.graph=we,Ie.value=we}},null,512)]))}};export{ho as _};