OwlCyberSecurity - MANAGER
Edit File: admin-reports-widget.js
(()=>{var t={62477:function(t,e,n){t.exports=function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={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]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[e[o]]=o);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var i=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:i}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,o=t[0]/255,a=t[1]/255,r=t[2]/255,i=Math.min(o,a,r),s=Math.max(o,a,r),l=s-i;return s===i?e=0:o===s?e=(a-r)/l:a===s?e=2+(r-o)/l:r===s&&(e=4+(o-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(i+s)/2,[e,100*(s===i?0:n<=.5?l/(s+i):l/(2-s-i)),100*n]},a.rgb.hsv=function(t){var e,n,o,a,r,i=t[0]/255,s=t[1]/255,l=t[2]/255,d=Math.max(i,s,l),u=d-Math.min(i,s,l),c=function(t){return(d-t)/6/u+.5};return 0===u?a=r=0:(r=u/d,e=c(i),n=c(s),o=c(l),i===d?a=o-n:s===d?a=1/3+e-o:l===d&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*d]},a.rgb.hwb=function(t){var e=t[0],n=t[1],o=t[2];return[a.rgb.hsl(t)[0],1/255*Math.min(e,Math.min(n,o))*100,100*(o=1-1/255*Math.max(e,Math.max(n,o)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,o=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-o,1-a)))/(1-e)||0),100*((1-o-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var o=n[t];if(o)return o;var a,r,i,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var d=(r=t,i=e[l],Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2)+Math.pow(r[2]-i[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,o=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(o=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92)),100*(.2126*e+.7152*n+.0722*o),100*(.0193*e+.1192*n+.9505*o)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],o=e[1],r=e[2];return o/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116)-16,500*(n-o),200*(o-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,o,a,r,i=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var d=0;d<3;d++)(o=i+1/3*-(d-1))<0&&o++,o>1&&o--,r=6*o<1?e+6*(n-e)*o:2*o<1?n:3*o<2?e+(n-e)*(2/3-o)*6:e,a[d]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,o=t[2]/100,a=n,r=Math.max(o,.01);return n*=(o*=2)<=1?o:2-o,a*=r<=1?r:2-r,[e,100*(0===o?2*a/(r+a):2*n/(o+n)),(o+n)/2*100]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,o=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),i=255*o*(1-n),s=255*o*(1-n*r),l=255*o*(1-n*(1-r));switch(o*=255,a){case 0:return[o,l,i];case 1:return[s,o,i];case 2:return[i,o,l];case 3:return[i,s,o];case 4:return[l,i,o];case 5:return[o,i,s]}},a.hsv.hsl=function(t){var e,n,o,a=t[0],r=t[1]/100,i=t[2]/100,s=Math.max(i,.01);return o=(2-r)*i,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(o/=2)]},a.hwb.rgb=function(t){var e,n,o,a,r,i,s,l=t[0]/360,d=t[1]/100,u=t[2]/100,c=d+u;switch(c>1&&(d/=c,u/=c),o=6*l-(e=Math.floor(6*l)),1&e&&(o=1-o),a=d+o*((n=1-u)-d),e){default:case 6:case 0:r=n,i=a,s=d;break;case 1:r=a,i=n,s=d;break;case 2:r=d,i=n,s=a;break;case 3:r=d,i=a,s=n;break;case 4:r=a,i=d,s=n;break;case 5:r=n,i=d,s=a}return[255*r,255*i,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,o=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,o*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,o,a=t[0]/100,r=t[1]/100,i=t[2]/100;return n=-.9689*a+1.8758*r+.0415*i,o=.0557*a+-.204*r+1.057*i,e=(e=3.2406*a+-1.5372*r+-.4986*i)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,o=o>.0031308?1.055*Math.pow(o,1/2.4)-.055:12.92*o,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(o=Math.min(Math.max(0,o),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],o=t[2];return n/=100,o/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(o=o>.008856?Math.pow(o,1/3):7.787*o+16/116))]},a.lab.xyz=function(t){var e,n,o,a=t[0];e=t[1]/500+(n=(a+16)/116),o=n-t[2]/200;var r=Math.pow(n,3),i=Math.pow(e,3),s=Math.pow(o,3);return n=r>.008856?r:(n-16/116)/7.787,e=i>.008856?i:(e-16/116)/7.787,o=s>.008856?s:(o-16/116)/7.787,[e*=95.047,n*=100,o*=108.883]},a.lab.lch=function(t){var e,n=t[0],o=t[1],a=t[2];return(e=360*Math.atan2(a,o)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(o*o+a*a),e]},a.lch.lab=function(t){var e,n=t[0],o=t[1];return e=t[2]/360*2*Math.PI,[n,o*Math.cos(e),o*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],o=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var i=30+(Math.round(o/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(i+=60),i},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],o=t[2];return e===n&&n===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(o/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var o=parseInt(n,16);return[o>>16&255,o>>8&255,255&o]},a.rgb.hcg=function(t){var e,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,o),a),i=Math.min(Math.min(n,o),a),s=r-i;return e=s<=0?0:r===n?(o-a)/s%6:r===o?2+(a-n)/s:4+(n-o)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?i/(1-s):0)]},a.hsl.hcg=function(t){var e,n=t[1]/100,o=t[2]/100,a=0;return(e=o<.5?2*n*o:2*n*(1-o))<1&&(a=(o-.5*e)/(1-e)),[t[0],100*e,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,o=e*n,a=0;return o<1&&(a=(n-o)/(1-o)),[t[0],100*o,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,o=t[2]/100;if(0===n)return[255*o,255*o,255*o];var a,r=[0,0,0],i=e%1*6,s=i%1,l=1-s;switch(Math.floor(i)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*o,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),o=0;return n>0&&(o=e/n),[t[0],100*o,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,o=0;return n>0&&n<.5?o=e/(2*n):n>=.5&&n<1&&(o=e/(2*(1-n))),[t[0],100*o,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,o=n-e,a=0;return o<1&&(a=(n-o)/(1-o)),[t[0],100*o,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));function o(t){var e=function(){for(var t={},e=Object.keys(n),o=e.length,a=0;a<o;a++)t[e[a]]={distance:-1,parent:null};return t}(),o=[t];for(e[t].distance=0;o.length;)for(var a=o.pop(),r=Object.keys(n[a]),i=r.length,s=0;s<i;s++){var l=r[s],d=e[l];-1===d.distance&&(d.distance=e[a].distance+1,d.parent=a,o.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function r(t,e){for(var o=[e[t].parent,t],r=n[e[t].parent][t],i=e[t].parent;e[i].parent;)o.unshift(e[i].parent),r=a(n[e[i].parent][i],r),i=e[i].parent;return r.conversion=o,r}n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;var i={};Object.keys(n).forEach((function(t){i[t]={},Object.defineProperty(i[t],"channels",{value:n[t].channels}),Object.defineProperty(i[t],"labels",{value:n[t].labels});var e=function(t){for(var e=o(t),n={},a=Object.keys(e),i=a.length,s=0;s<i;s++){var l=a[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(n){var o=e[n];i[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var o=n.length,a=0;a<o;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(o),i[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(o)}))}));var s=i,l={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]},d={getRgba:u,getHsla:c,getRgb:function(t){var e=u(t);return e&&e.slice(0,3)},getHsl:function(t){var e=c(t);return e&&e.slice(0,3)},getHwb:h,getAlpha:function(t){var e=u(t);return e||(e=c(t))||(e=h(t))?e[3]:void 0},hexString:function(t,e){return e=void 0!==e&&3===t.length?e:t[3],"#"+b(t[0])+b(t[1])+b(t[2])+(e>=0&&e<1?b(Math.round(255*e)):"")},rgbString:function(t,e){return e<1||t[3]&&t[3]<1?f(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){return e<1||t[3]&&t[3]<1?p(t,e):"rgb("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%)"},percentaString:p,hslString:function(t,e){return e<1||t[3]&&t[3]<1?g(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:g,hwbString:function(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return y[t.slice(0,3)]}};function u(t){if(t){var e=[0,0,0],n=1,o=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(o){a=(o=o[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(o[r]+o[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(o=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){for(a=o[2],o=o[1],r=0;r<e.length;r++)e[r]=parseInt(o.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(o=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(o[r+1]);n=parseFloat(o[4])}else if(o=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(o[r+1]));n=parseFloat(o[4])}else if(o=t.match(/(\w+)/)){if("transparent"==o[1])return[0,0,0,0];if(!(e=l[o[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function c(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function h(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function p(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function g(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function b(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var y={};for(var v in l)y[l[v]]=v;var x=function(t){return t instanceof x?t:this instanceof x?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=d.getRgba(t))?this.setValues("rgb",e):(e=d.getHsla(t))?this.setValues("hsl",e):(e=d.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new x(t);var e};x.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return d.hexString(this.values.rgb)},rgbString:function(){return d.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return d.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return d.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return d.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return d.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return d.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return d.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var o=t[n]/255;e[n]=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=this,o=t,a=void 0===e?.5:e,r=2*a-1,i=n.alpha()-o.alpha(),s=((r*i==-1?r:(r+i)/(1+r*i))+1)/2,l=1-s;return this.rgb(s*n.red()+l*o.red(),s*n.green()+l*o.green(),s*n.blue()+l*o.blue()).alpha(n.alpha()*a+o.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new x,o=this.values,a=n.values;for(var r in o)o.hasOwnProperty(r)&&(t=o[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},x.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},x.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},x.prototype.getValues=function(t){for(var e=this.values,n={},o=0;o<t.length;o++)n[t.charAt(o)]=e[t][o];return 1!==e.alpha&&(n.a=e.alpha),n},x.prototype.setValues=function(t,e){var n,o,a=this.values,r=this.spaces,i=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var d=r[t];for(n=0;n<t.length;n++)a[t][n]=e[d[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)o=Math.max(0,Math.min(i[t][n],a[t][n])),a[t][n]=Math.round(o);for(var u in r)u!==t&&(a[u]=s[t][u](a[t]));return!0},x.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},x.prototype.setChannel=function(t,e,n){var o=this.values[t];return void 0===n?o[e]:(n===o[e]||(o[e]=n,this.setValues(t,o)),this)},"undefined"!=typeof window&&(window.Color=x);var w=x;function _(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var T,M={noop:function(){},uid:(T=0,function(){return T++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return M.valueOrDefault(M.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,o){var a,r,i;if(M.isArray(t))if(r=t.length,o)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(M.isObject(t))for(r=(i=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[i[a]],i[a])},arrayEquals:function(t,e){var n,o,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,o=t.length;n<o;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!M.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(M.isArray(t))return t.map(M.clone);if(M.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),o=n.length,a=0;a<o;++a)e[n[a]]=M.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,o){if(_(t)){var a=e[t],r=n[t];M.isObject(a)&&M.isObject(r)?M.merge(a,r,o):e[t]=M.clone(r)}},_mergerIf:function(t,e,n){if(_(t)){var o=e[t],a=n[t];M.isObject(o)&&M.isObject(a)?M.mergeIf(o,a):e.hasOwnProperty(t)||(e[t]=M.clone(a))}},merge:function(t,e,n){var o,a,r,i,s,l=M.isArray(e)?e:[e],d=l.length;if(!M.isObject(t))return t;for(o=(n=n||{}).merger||M._merger,a=0;a<d;++a)if(e=l[a],M.isObject(e))for(s=0,i=(r=Object.keys(e)).length;s<i;++s)o(r[s],t,e,n);return t},mergeIf:function(t,e){return M.merge(t,e,{merger:M._mergerIf})},extend:Object.assign||function(t){return M.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},o=function(){this.constructor=n};return o.prototype=e.prototype,n.prototype=new o,n.extend=M.inherits,t&&M.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,o){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+o+'" instead')}},S=M;M.callCallback=M.callback,M.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var k={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,o=1;return 0===t?0:1===t?1:(n||(n=.3),o<1?(o=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/o),-o*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,o=1;return 0===t?0:1===t?1:(n||(n=.3),o<1?(o=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/o),o*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,o=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),o<1?(o=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/o),t<1?o*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:o*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-k.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*k.easeInBounce(2*t):.5*k.easeOutBounce(2*t-1)+.5}},D={effects:k};S.easingEffects=k;var R=Math.PI,A=R/180,F=2*R,C=R/2,P=R/4,E=2*R/3,O={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,o,a,r){if(r){var i=Math.min(r,a/2,o/2),s=e+i,l=n+i,d=e+o-i,u=n+a-i;t.moveTo(e,l),s<d&&l<u?(t.arc(s,l,i,-R,-C),t.arc(d,l,i,-C,0),t.arc(d,u,i,0,C),t.arc(s,u,i,C,R)):s<d?(t.moveTo(s,n),t.arc(d,l,i,-C,C),t.arc(s,l,i,C,R+C)):l<u?(t.arc(s,l,i,-R,0),t.arc(s,u,i,0,R)):t.arc(s,l,i,-R,R),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,o,a)},drawPoint:function(t,e,n,o,a,r){var i,s,l,d,u,c=(r||0)*A;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(i=e.toString())||"[object HTMLCanvasElement]"===i))return t.save(),t.translate(o,a),t.rotate(c),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(o,a,n,0,F),t.closePath();break;case"triangle":t.moveTo(o+Math.sin(c)*n,a-Math.cos(c)*n),c+=E,t.lineTo(o+Math.sin(c)*n,a-Math.cos(c)*n),c+=E,t.lineTo(o+Math.sin(c)*n,a-Math.cos(c)*n),t.closePath();break;case"rectRounded":d=n-(u=.516*n),s=Math.cos(c+P)*d,l=Math.sin(c+P)*d,t.arc(o-s,a-l,u,c-R,c-C),t.arc(o+l,a-s,u,c-C,c),t.arc(o+s,a+l,u,c,c+C),t.arc(o-l,a+s,u,c+C,c+R),t.closePath();break;case"rect":if(!r){d=Math.SQRT1_2*n,t.rect(o-d,a-d,2*d,2*d);break}c+=P;case"rectRot":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(o-s,a-l),t.lineTo(o+l,a-s),t.lineTo(o+s,a+l),t.lineTo(o-l,a+s),t.closePath();break;case"crossRot":c+=P;case"cross":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(o-s,a-l),t.lineTo(o+s,a+l),t.moveTo(o+l,a-s),t.lineTo(o-l,a+s);break;case"star":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(o-s,a-l),t.lineTo(o+s,a+l),t.moveTo(o+l,a-s),t.lineTo(o-l,a+s),c+=P,s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(o-s,a-l),t.lineTo(o+s,a+l),t.moveTo(o+l,a-s),t.lineTo(o-l,a+s);break;case"line":s=Math.cos(c)*n,l=Math.sin(c)*n,t.moveTo(o-s,a-l),t.lineTo(o+s,a+l);break;case"dash":t.moveTo(o,a),t.lineTo(o+Math.cos(c)*n,a+Math.sin(c)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){var n=1e-6;return t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,o){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,o?n.y:e.y),t.lineTo(r,o?e.y:n.y)}else"after"===a&&!o||"after"!==a&&o?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(o?e.controlPointPreviousX:e.controlPointNextX,o?e.controlPointPreviousY:e.controlPointNextY,o?n.controlPointNextX:n.controlPointPreviousX,o?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},L=O;S.clear=O.clear,S.drawRoundedRectangle=function(t){t.beginPath(),O.roundedRect.apply(O,arguments)};var I={_set:function(t,e){return S.merge(this[t]||(this[t]={}),e)}};I._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 N=I,B=S.valueOrDefault;var W={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,o,a;return S.isObject(t)?(e=+t.top||0,n=+t.right||0,o=+t.bottom||0,a=+t.left||0):e=n=o=a=+t||0,{top:e,right:n,bottom:o,left:a,height:e+o,width:a+n}},_parseFont:function(t){var e=N.global,n=B(t.fontSize,e.defaultFontSize),o={family:B(t.fontFamily,e.defaultFontFamily),lineHeight:S.options.toLineHeight(B(t.lineHeight,e.defaultLineHeight),n),size:n,style:B(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return o.string=function(t){return!t||S.isNullOrUndef(t.size)||S.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(o),o},resolve:function(t,e,n,o){var a,r,i,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(i=t[a])&&(void 0!==e&&"function"==typeof i&&(i=i(e),s=!1),void 0!==n&&S.isArray(i)&&(i=i[n],s=!1),void 0!==i))return o&&!s&&(o.cacheable=!1),i}},z={_factorize:function(t){var e,n=[],o=Math.sqrt(t);for(e=1;e<o;e++)t%e==0&&(n.push(e),n.push(t/e));return o===(0|o)&&n.push(o),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},V=z;S.log10=z.log10;var $=S,j=D,H=L,U=W,q=V,Y={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,o;"ltr"!==e&&"rtl"!==e||(o=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=o)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};$.easing=j,$.canvas=H,$.options=U,$.math=q,$.rtl=Y;var G=function(t){$.extend(this,t),this.initialize.apply(this,arguments)};$.extend(G.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=$.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,o=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),o||(o=e._start={}),function(t,e,n,o){var a,r,i,s,l,d,u,c,h,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(d=n[i=f[a]],e.hasOwnProperty(i)||(e[i]=d),(s=e[i])!==d&&"_"!==i[0]){if(t.hasOwnProperty(i)||(t[i]=s),(u=typeof d)==typeof(l=t[i]))if("string"===u){if((c=w(l)).valid&&(h=w(d)).valid){e[i]=h.mix(c,o).rgbString();continue}}else if($.isFinite(l)&&$.isFinite(d)){e[i]=l+(d-l)*o;continue}e[i]=d}}(o,a,n,t),e):(e._view=$.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return $.isNumber(this._model.x)&&$.isNumber(this._model.y)}}),G.extend=$.inherits;var K=G,X=K.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),J=X;Object.defineProperty(X.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(X.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:$.noop,onComplete:$.noop}});var Z={animations:[],request:null,addAnimation:function(t,e,n,o){var a,r,i=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,o||(t.animating=!0),a=0,r=i.length;a<r;++a)if(i[a].chart===t)return void(i[a]=e);i.push(e),1===i.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=$.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=$.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){var t=this;t.advance(),t.animations.length>0&&t.requestAnimationFrame()},advance:function(){for(var t,e,n,o,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,o=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(o,n),$.callback(t.render,[e,t],e),$.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?($.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},Q=$.options.resolve,tt=["push","pop","shift","splice","unshift"];function et(t,e){var n=t._chartjs;if(n){var o=n.listeners,a=o.indexOf(e);-1!==a&&o.splice(a,1),o.length>0||(tt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};$.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this,e=t.getMeta(),n=t.chart,o=n.scales,a=t.getDataset(),r=n.options.scales;null!==e.xAxisID&&e.xAxisID in o&&!a.xAxisID||(e.xAxisID=a.xAxisID||r.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in o&&!a.yAxisID||(e.yAxisID=a.yAxisID||r.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&et(this._data,this)},createMetaDataset:function(){var t=this,e=t.datasetElementType;return e&&new e({_chart:t.chart,_datasetIndex:t.index})},createMetaData:function(t){var e=this,n=e.dataElementType;return n&&new n({_chart:e.chart,_datasetIndex:e.index,_index:t})},addElements:function(){var t,e,n=this,o=n.getMeta(),a=n.getDataset().data||[],r=o.data;for(t=0,e=a.length;t<e;++t)r[t]=r[t]||n.createMetaData(t);o.dataset=o.dataset||n.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,o=n.getDataset(),a=o.data||(o.data=[]);n._data!==a&&(n._data&&et(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tt.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),o=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=o.apply(this,e);return $.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){var t=this;t._config=$.merge(Object.create(null),[t.chart.options.datasets[t._type],t.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&$._merger(t,e,n)}})},_update:function(t){var e=this;e._configure(),e._cachedDataOpts=null,e.update(t)},update:$.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],o=n.length,a=0;a<o;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,o=0;for(t.dataset&&t.dataset.draw();o<n;++o)e[o].draw()},getStyle:function(t){var e,n=this,o=n.getMeta(),a=o.dataset;return n._configure(),a&&void 0===t?e=n._resolveDatasetElementOptions(a||{}):(t=t||0,e=n._resolveDataElementOptions(o.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,o,a,r,i=this,s=i.chart,l=i._config,d=t.custom||{},u=s.options.elements[i.datasetElementType.prototype._type]||{},c=i._datasetElementOptions,h={},f={chart:s,dataset:i.getDataset(),datasetIndex:i.index,hover:e};for(n=0,o=c.length;n<o;++n)a=c[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,h[a]=Q([d[r],l[r],u[r]],f);return h},_resolveDataElementOptions:function(t,e){var n=this,o=t&&t.custom,a=n._cachedDataOpts;if(a&&!o)return a;var r,i,s,l,d=n.chart,u=n._config,c=d.options.elements[n.dataElementType.prototype._type]||{},h=n._dataElementOptions,f={},p={chart:d,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},g={cacheable:!o};if(o=o||{},$.isArray(h))for(i=0,s=h.length;i<s;++i)f[l=h[i]]=Q([o[l],u[l],c[l]],p,e,g);else for(i=0,s=(r=Object.keys(h)).length;i<s;++i)f[l=r[i]]=Q([o[l],u[h[l]],u[l],c[l]],p,e,g);return g.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){$.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,o=t.custom||{},a=t._model,r=$.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=Q([o.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=Q([o.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=Q([o.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,o,a,r,i=this.getMeta().dataset,s={};if(i){for(r=i._model,a=this._resolveDatasetElementOptions(i,!0),t=0,e=(o=Object.keys(a)).length;t<e;++t)s[n=o[t]]=r[n],r[n]=a[n];i.$previousStyle=s}},resyncElements:function(){var t=this,e=t.getMeta(),n=t.getDataset().data,o=e.data.length,a=n.length;a<o?e.data.splice(a,o-a):a>o&&t.insertElements(o,a-o)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),nt.extend=$.inherits;var ot=nt,at=2*Math.PI;function rt(t,e){var n=e.startAngle,o=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,i=e.x,s=e.y;t.beginPath(),t.arc(i,s,e.outerRadius,n-r,o+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(i,s,e.innerRadius-a,o+r,n-r,!0)):t.arc(i,s,a,o+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function it(t,e,n){var o="inner"===e.borderAlign;o?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,o){var a,r=n.endAngle;for(o&&(n.endAngle=n.startAngle+at,rt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=at,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+at,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+at),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,o),o&&rt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}N._set("global",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var st=K.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var o=$.getAngleFromPoint(n,{x:t,y:e}),a=o.angle,r=o.distance,i=n.startAngle,s=n.endAngle;s<i;)s+=at;for(;a>s;)a-=at;for(;a<i;)a+=at;var l=a>=i&&a<=s,d=r>=n.innerRadius&&r<=n.outerRadius;return l&&d}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,o="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-o,0),pixelMargin:o,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/at)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+at,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(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%at}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(),n.borderWidth&&it(e,n,a),e.restore()}}),lt=$.valueOrDefault,dt=N.global.defaultColor;N._set("global",{elements:{line:{tension:.4,backgroundColor:dt,borderWidth:3,borderColor:dt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ut=K.extend({_type:"line",draw:function(){var t,e,n,o=this,a=o._view,r=o._chart.ctx,i=a.spanGaps,s=o._children.slice(),l=N.global,d=l.elements.line,u=-1,c=o._loop;if(s.length){if(o._loop){for(t=0;t<s.length;++t)if(e=$.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),c=i;break}c&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||d.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||d.borderDash),r.lineDashOffset=lt(a.borderDashOffset,d.borderDashOffset),r.lineJoin=a.borderJoinStyle||d.borderJoinStyle,r.lineWidth=lt(a.borderWidth,d.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),u=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===u?$.previousItem(s,t):s[u],n.skip||(u!==t-1&&!i||-1===u?r.moveTo(n.x,n.y):$.canvas.lineTo(r,e._view,n),u=t);c&&r.closePath(),r.stroke(),r.restore()}}}),ct=$.valueOrDefault,ht=N.global.defaultColor;function ft(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ht,borderColor:ht,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var pt=K.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ft,inXRange:ft,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,o=e.pointStyle,a=e.rotation,r=e.radius,i=e.x,s=e.y,l=N.global,d=l.defaultColor;e.skip||(void 0===t||$.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||d,n.lineWidth=ct(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||d,$.canvas.drawPoint(n,o,r,i,s,a))}}),gt=N.global.defaultColor;function mt(t){return t&&void 0!==t.width}function bt(t){var e,n,o,a,r;return mt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,o=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),o=t.y-r,a=t.y+r),{left:e,top:o,right:n,bottom:a}}function yt(t,e,n){return t===e?n:t===n?e:t}function vt(t,e,n){var o,a,r,i,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=yt(e,"left","right")):t.base<t.y&&(e=yt(e,"bottom","top")),n[e]=!0,n):n}(t);return $.isObject(s)?(o=+s.top||0,a=+s.right||0,r=+s.bottom||0,i=+s.left||0):o=a=r=i=+s||0,{t:l.top||o<0?0:o>n?n:o,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||i<0?0:i>e?e:i}}function xt(t,e,n){var o=null===e,a=null===n,r=!(!t||o&&a)&&bt(t);return r&&(o||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:gt,borderColor:gt,borderSkipped:"bottom",borderWidth:0}}});var wt=K.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=bt(t),n=e.right-e.left,o=e.bottom-e.top,a=vt(t,n/2,o/2);return{outer:{x:e.left,y:e.top,w:n,h:o},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:o-a.t-a.b}}}(e),o=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(o.x,o.y,o.w,o.h),o.w===a.w&&o.h===a.h||(t.save(),t.beginPath(),t.rect(o.x,o.y,o.w,o.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},Tt=st,Mt=ut,St=pt,kt=wt;_t.Arc=Tt,_t.Line=Mt,_t.Point=St,_t.Rectangle=kt;var Dt=$._deprecated,Rt=$.valueOrDefault;function At(t,e,n){var o,a,r=n.barThickness,i=e.stackCount,s=e.pixels[t],l=$.isNullOrUndef(r)?function(t,e){var n,o,a,r,i=t._length;for(a=1,r=e.length;a<r;++a)i=Math.min(i,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)o=t.getPixelForTick(a),i=a>0?Math.min(i,Math.abs(o-n)):i,n=o;return i}(e.scale,e.pixels):-1;return $.isNullOrUndef(r)?(o=l*n.categoryPercentage,a=n.barPercentage):(o=r*i,a=1),{chunk:o/i,ratio:a,start:s-o/2}}N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Ft=ot.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;ot.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Dt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Dt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Dt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Dt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Dt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,o=this,a=o.getMeta().data;for(o._ruler=o.getRuler(),e=0,n=a.length;e<n;++e)o.updateElement(a[e],e,t)},updateElement:function(t,e,n){var o=this,a=o.getMeta(),r=o.getDataset(),i=o._resolveDataElementOptions(t,e);t._xScale=o.getScaleForId(a.xAxisID),t._yScale=o.getScaleForId(a.yAxisID),t._datasetIndex=o.index,t._index=e,t._model={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderSkipped:i.borderSkipped,borderWidth:i.borderWidth,datasetLabel:r.label,label:o.chart.data.labels[e]},$.isArray(r.data[e])&&(t._model.borderSkipped=null),o._updateElementGeometry(t,e,n,i),t.pivot()},_updateElementGeometry:function(t,e,n,o){var a=this,r=t._model,i=a._getValueScale(),s=i.getBasePixel(),l=i.isHorizontal(),d=a._ruler||a.getRuler(),u=a.calculateBarValuePixels(a.index,e,o),c=a.calculateBarIndexPixels(a.index,e,d,o);r.horizontal=l,r.base=n?s:u.base,r.x=l?n?s:u.head:c.center,r.y=l?c.center:n?s:u.head,r.height=l?c.size:void 0,r.width=l?void 0:c.size},_getStacks:function(t){var e,n,o=this._getIndexScale(),a=o._getMatchingVisibleMetas(this._type),r=o.options.stacked,i=a.length,s=[];for(e=0;e<i&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),o=void 0!==e?n.indexOf(e):-1;return-1===o?n.length-1:o},getRuler:function(){var t,e,n=this,o=n._getIndexScale(),a=[];for(t=0,e=n.getMeta().data.length;t<e;++t)a.push(o.getPixelForValue(null,t,n.index));return{pixels:a,start:o._startPixel,end:o._endPixel,stackCount:n.getStackCount(),scale:o}},calculateBarValuePixels:function(t,e,n){var o,a,r,i,s,l,d,u=this,c=u.chart,h=u._getValueScale(),f=h.isHorizontal(),p=c.data.datasets,g=h._getMatchingVisibleMetas(u._type),m=h._parseValue(p[t].data[e]),b=n.minBarLength,y=h.options.stacked,v=u.getMeta().stack,x=void 0===m.start?0:m.max>=0&&m.min>=0?m.min:m.max,w=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,_=g.length;if(y||void 0===y&&void 0!==v)for(o=0;o<_&&(a=g[o]).index!==t;++o)a.stack===v&&(r=void 0===(d=h._parseValue(p[a.index].data[e])).start?d.end:d.min>=0&&d.max>=0?d.max:d.min,(m.min<0&&r<0||m.max>=0&&r>0)&&(x+=r));return i=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+w))-i,void 0!==b&&Math.abs(l)<b&&(l=b,s=w>=0&&!f||w<0&&f?i-b:i+b),{size:l,base:i,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,o){var a="flex"===o.barThickness?function(t,e,n){var o,a=e.pixels,r=a[t],i=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===i&&(i=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-i),o=r-(r-Math.min(i,s))/2*l,{chunk:Math.abs(s-i)/2*l/e.stackCount,ratio:n.barPercentage,start:o}}(e,n,o):At(e,n,o),r=this.getStackIndex(t,this.getMeta().stack),i=a.start+a.chunk*r+a.chunk/2,s=Math.min(Rt(o.maxBarThickness,1/0),a.chunk*a.ratio);return{base:i-s/2,head:i+s/2,center:i,size:s}},draw:function(){var t=this,e=t.chart,n=t._getValueScale(),o=t.getMeta().data,a=t.getDataset(),r=o.length,i=0;for($.canvas.clipArea(e.ctx,e.chartArea);i<r;++i){var s=n._parseValue(a.data[i]);isNaN(s.min)||isNaN(s.max)||o[i].draw()}$.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var t=this,e=$.extend({},ot.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,o=t._getValueScale().options;return e.barPercentage=Rt(n.barPercentage,e.barPercentage),e.barThickness=Rt(n.barThickness,e.barThickness),e.categoryPercentage=Rt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Rt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Rt(o.minBarLength,e.minBarLength),e}}),Ct=$.valueOrDefault,Pt=$.options.resolve;N._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(t,e){var n=e.datasets[t.datasetIndex].label||"",o=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+o.r+")"}}}});var Et=ot.extend({dataElementType:_t.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;$.each(n,(function(n,o){e.updateElement(n,o,t)}))},updateElement:function(t,e,n){var o=this,a=o.getMeta(),r=t.custom||{},i=o.getScaleForId(a.xAxisID),s=o.getScaleForId(a.yAxisID),l=o._resolveDataElementOptions(t,e),d=o.getDataset().data[e],u=o.index,c=n?i.getPixelForDecimal(.5):i.getPixelForValue("object"==typeof d?d:NaN,e,u),h=n?s.getBasePixel():s.getPixelForValue(d,e,u);t._xScale=i,t._yScale=s,t._options=l,t._datasetIndex=u,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(c)||isNaN(h),x:c,y:h},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,o=$.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Ct(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=Ct(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=Ct(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,o=n.chart,a=n.getDataset(),r=t.custom||{},i=a.data[e]||{},s=ot.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:o,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=$.extend({},s)),s.radius=Pt([r.radius,i.r,n._config.radius,o.options.elements.point.radius],l,e),s}}),Ot=$.valueOrDefault,Lt=Math.PI,It=2*Lt,Nt=Lt/2;N._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,o,a=document.createElement("ul"),r=t.data,i=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),i.length)for(e=0,n=i[0].data.length;e<n;++e)(o=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[0].backgroundColor[e],s[e]&&o.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,o){var a=t.getDatasetMeta(0),r=a.controller.getStyle(o);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[o])||a.data[o].hidden,index:o}})):[]}},onClick:function(t,e){var n,o,a,r=e.index,i=this.chart;for(n=0,o=(i.data.datasets||[]).length;n<o;++n)(a=i.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);i.update()}},cutoutPercentage:50,rotation:-Nt,circumference:It,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],o=": "+e.datasets[t.datasetIndex].data[t.index];return $.isArray(n)?(n=n.slice())[0]+=o:n+=o,n}}}});var Bt=ot.extend({dataElementType:_t.Arc,linkScales:$.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,o,a,r=this,i=r.chart,s=i.chartArea,l=i.options,d=1,u=1,c=0,h=0,f=r.getMeta(),p=f.data,g=l.cutoutPercentage/100||0,m=l.circumference,b=r._getRingWeight(r.index);if(m<It){var y=l.rotation%It,v=(y+=y>=Lt?-It:y<-Lt?It:0)+m,x=Math.cos(y),w=Math.sin(y),_=Math.cos(v),T=Math.sin(v),M=y<=0&&v>=0||v>=It,S=y<=Nt&&v>=Nt||v>=It+Nt,k=y<=-Nt&&v>=-Nt||v>=Lt+Nt,D=y===-Lt||v>=Lt?-1:Math.min(x,x*g,_,_*g),R=k?-1:Math.min(w,w*g,T,T*g),A=M?1:Math.max(x,x*g,_,_*g),F=S?1:Math.max(w,w*g,T,T*g);d=(A-D)/2,u=(F-R)/2,c=-(A+D)/2,h=-(F+R)/2}for(o=0,a=p.length;o<a;++o)p[o]._options=r._resolveDataElementOptions(p[o],o);for(i.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-i.borderWidth)/d,n=(s.bottom-s.top-i.borderWidth)/u,i.outerRadius=Math.max(Math.min(e,n)/2,0),i.innerRadius=Math.max(i.outerRadius*g,0),i.radiusLength=(i.outerRadius-i.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),i.offsetX=c*i.outerRadius,i.offsetY=h*i.outerRadius,f.total=r.calculateTotal(),r.outerRadius=i.outerRadius-i.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-i.radiusLength*b,0),o=0,a=p.length;o<a;++o)r.updateElement(p[o],o,t)},updateElement:function(t,e,n){var o=this,a=o.chart,r=a.chartArea,i=a.options,s=i.animation,l=(r.left+r.right)/2,d=(r.top+r.bottom)/2,u=i.rotation,c=i.rotation,h=o.getDataset(),f=n&&s.animateRotate||t.hidden?0:o.calculateCircumference(h.data[e])*(i.circumference/It),p=n&&s.animateScale?0:o.innerRadius,g=n&&s.animateScale?0:o.outerRadius,m=t._options||{};$.extend(t,{_datasetIndex:o.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:d+a.offsetY,startAngle:u,endAngle:c,circumference:f,outerRadius:g,innerRadius:p,label:$.valueAtIndexOrDefault(h.label,e,a.data.labels[e])}});var b=t._model;n&&s.animateRotate||(b.startAngle=0===e?i.rotation:o.getMeta().data[e-1]._model.endAngle,b.endAngle=b.startAngle+b.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),o=0;return $.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(o+=Math.abs(t))})),o},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?It*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,o,a,r,i,s,l,d=0,u=this.chart;if(!t)for(e=0,n=u.data.datasets.length;e<n;++e)if(u.isDatasetVisible(e)){t=(o=u.getDatasetMeta(e)).data,e!==this.index&&(r=o.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),i=r._resolveDataElementOptions(a,e)):i=a._options,"inner"!==i.borderAlign&&(s=i.borderWidth,d=(l=i.hoverBorderWidth)>(d=s>d?s:d)?l:d);return d},setHoverStyle:function(t){var e=t._model,n=t._options,o=$.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Ot(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=Ot(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=Ot(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Ot(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._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"}}),N._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Wt=Ft.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),zt=$.valueOrDefault,Vt=$.options.resolve,$t=$.canvas._isPointInArea;function jt(t,e){var n=t&&t.options.ticks||{},o=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:o?r:a,end:o?a:r}}N._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Ht=ot.extend({datasetElementType:_t.Line,dataElementType:_t.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(t){var e,n,o=this,a=o.getMeta(),r=a.dataset,i=a.data||[],s=o.chart.options,l=o._config,d=o._showLine=zt(l.showLine,s.showLines);for(o._xScale=o.getScaleForId(a.xAxisID),o._yScale=o.getScaleForId(a.yAxisID),d&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=o._yScale,r._datasetIndex=o.index,r._children=i,r._model=o._resolveDatasetElementOptions(r),r.pivot()),e=0,n=i.length;e<n;++e)o.updateElement(i[e],e,t);for(d&&0!==r._model.tension&&o.updateBezierControlPoints(),e=0,n=i.length;e<n;++e)i[e].pivot()},updateElement:function(t,e,n){var o,a,r=this,i=r.getMeta(),s=t.custom||{},l=r.getDataset(),d=r.index,u=l.data[e],c=r._xScale,h=r._yScale,f=i.dataset._model,p=r._resolveDataElementOptions(t,e);o=c.getPixelForValue("object"==typeof u?u:NaN,e,d),a=n?h.getBasePixel():r.calculatePointY(u,e,d),t._xScale=c,t._yScale=h,t._options=p,t._datasetIndex=d,t._index=e,t._model={x:o,y:a,skip:s.skip||isNaN(o)||isNaN(a),radius:p.radius,pointStyle:p.pointStyle,rotation:p.rotation,backgroundColor:p.backgroundColor,borderColor:p.borderColor,borderWidth:p.borderWidth,tension:zt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:p.hitRadius}},_resolveDatasetElementOptions:function(t){var e,n,o,a,r,i,s,l,d,u,c,h=this,f=h._config,p=t.custom||{},g=h.chart.options,m=g.elements.line,b=ot.prototype._resolveDatasetElementOptions.apply(h,arguments);return b.spanGaps=zt(f.spanGaps,g.spanGaps),b.tension=zt(f.lineTension,m.tension),b.steppedLine=Vt([p.steppedLine,f.steppedLine,m.stepped]),b.clip=(e=zt(f.clip,(i=h._xScale,s=h._yScale,l=b.borderWidth,u=jt(i,d=l/2),{top:(c=jt(s,d)).end,right:u.end,bottom:c.start,left:u.start})),$.isObject(e)?(n=e.top,o=e.right,a=e.bottom,r=e.left):n=o=a=r=e,{top:n,right:o,bottom:a,left:r}),b},calculatePointY:function(t,e,n){var o,a,r,i,s,l,d,u=this.chart,c=this._yScale,h=0,f=0;if(c.options.stacked){for(s=+c.getRightValue(t),d=(l=u._getSortedVisibleDatasetMetas()).length,o=0;o<d&&(r=l[o]).index!==n;++o)a=u.data.datasets[r.index],"line"===r.type&&r.yAxisID===c.id&&((i=+c.getRightValue(a.data[e]))<0?f+=i||0:h+=i||0);return s<0?c.getPixelForValue(f+s):c.getPixelForValue(h+s)}return c.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,o,a=this.chart,r=this.getMeta(),i=r.dataset._model,s=a.chartArea,l=r.data||[];function d(t,e,n){return Math.max(Math.min(t,n),e)}if(i.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===i.cubicInterpolationMode)$.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,o=$.splineCurve($.previousItem(l,t)._model,n,$.nextItem(l,t)._model,i.tension),n.controlPointPreviousX=o.previous.x,n.controlPointPreviousY=o.previous.y,n.controlPointNextX=o.next.x,n.controlPointNextY=o.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,$t(n,s)&&(t>0&&$t(l[t-1]._model,s)&&(n.controlPointPreviousX=d(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=d(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&$t(l[t+1]._model,s)&&(n.controlPointNextX=d(n.controlPointNextX,s.left,s.right),n.controlPointNextY=d(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this,n=e.chart,o=e.getMeta(),a=o.data||[],r=n.chartArea,i=n.canvas,s=0,l=a.length;for(e._showLine&&(t=o.dataset._model.clip,$.canvas.clipArea(n.ctx,{left:!1===t.left?0:r.left-t.left,right:!1===t.right?i.width:r.right+t.right,top:!1===t.top?0:r.top-t.top,bottom:!1===t.bottom?i.height:r.bottom+t.bottom}),o.dataset.draw(),$.canvas.unclipArea(n.ctx));s<l;++s)a[s].draw(r)},setHoverStyle:function(t){var e=t._model,n=t._options,o=$.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=zt(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=zt(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=zt(n.hoverBorderWidth,n.borderWidth),e.radius=zt(n.hoverRadius,n.radius)}}),Ut=$.options.resolve;N._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(t){var e,n,o,a=document.createElement("ul"),r=t.data,i=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),i.length)for(e=0,n=i[0].data.length;e<n;++e)(o=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=i[0].backgroundColor[e],s[e]&&o.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,o){var a=t.getDatasetMeta(0),r=a.controller.getStyle(o);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[o])||a.data[o].hidden,index:o}})):[]}},onClick:function(t,e){var n,o,a,r=e.index,i=this.chart;for(n=0,o=(i.data.datasets||[]).length;n<o;++n)(a=i.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;i.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var qt=ot.extend({dataElementType:_t.Arc,linkScales:$.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(t){var e,n,o,a=this,r=a.getDataset(),i=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],d=a._angles=[],u=i.data;for(a._updateRadius(),i.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,o=a._computeAngle(e),d[e]=o,s+=o;for(e=0,n=u.length;e<n;++e)u[e]._options=a._resolveDataElementOptions(u[e],e),a.updateElement(u[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,o=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(o.cutoutPercentage?e.outerRadius/100*o.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var o=this,a=o.chart,r=o.getDataset(),i=a.options,s=i.animation,l=a.scale,d=a.data.labels,u=l.xCenter,c=l.yCenter,h=i.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),p=o._starts[e],g=p+(t.hidden?0:o._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),b=t._options||{};$.extend(t,{_datasetIndex:o.index,_index:e,_scale:l,_model:{backgroundColor:b.backgroundColor,borderColor:b.borderColor,borderWidth:b.borderWidth,borderAlign:b.borderAlign,x:u,y:c,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?h:p,endAngle:n&&s.animateRotate?h:g,label:$.valueAtIndexOrDefault(d,e,d[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return $.each(e.data,(function(e,o){isNaN(t.data[o])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,o=$.getHoverColor,a=$.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,o=e.getDataset(),a=e.getMeta();if(isNaN(o.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:o,datasetIndex:e.index};return Ut([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});N._set("pie",$.clone(N.doughnut)),N._set("pie",{cutoutPercentage:0});var Yt=Bt,Gt=$.valueOrDefault;N._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Kt=ot.extend({datasetElementType:_t.Line,dataElementType:_t.Point,linkScales:$.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(t){var e,n,o=this,a=o.getMeta(),r=a.dataset,i=a.data||[],s=o.chart.scale,l=o._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=o.index,r._children=i,r._loop=!0,r._model=o._resolveDatasetElementOptions(r),r.pivot(),e=0,n=i.length;e<n;++e)o.updateElement(i[e],e,t);for(o.updateBezierControlPoints(),e=0,n=i.length;e<n;++e)i[e].pivot()},updateElement:function(t,e,n){var o=this,a=t.custom||{},r=o.getDataset(),i=o.chart.scale,s=i.getPointPositionForValue(e,r.data[e]),l=o._resolveDataElementOptions(t,e),d=o.getMeta().dataset._model,u=n?i.xCenter:s.x,c=n?i.yCenter:s.y;t._scale=i,t._options=l,t._datasetIndex=o.index,t._index=e,t._model={x:u,y:c,skip:a.skip||isNaN(u)||isNaN(c),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Gt(a.tension,d?d.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,o=ot.prototype._resolveDatasetElementOptions.apply(t,arguments);return o.spanGaps=Gt(e.spanGaps,n.spanGaps),o.tension=Gt(e.lineTension,n.elements.line.tension),o},updateBezierControlPoints:function(){var t,e,n,o,a=this.getMeta(),r=this.chart.chartArea,i=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(i=i.filter((function(t){return!t._model.skip}))),t=0,e=i.length;t<e;++t)n=i[t]._model,o=$.splineCurve($.previousItem(i,t,!0)._model,n,$.nextItem(i,t,!0)._model,n.tension),n.controlPointPreviousX=s(o.previous.x,r.left,r.right),n.controlPointPreviousY=s(o.previous.y,r.top,r.bottom),n.controlPointNextX=s(o.next.x,r.left,r.right),n.controlPointNextY=s(o.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,o=$.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Gt(n.hoverBackgroundColor,o(n.backgroundColor)),e.borderColor=Gt(n.hoverBorderColor,o(n.borderColor)),e.borderWidth=Gt(n.hoverBorderWidth,n.borderWidth),e.radius=Gt(n.hoverRadius,n.radius)}});N._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(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),N._set("global",{datasets:{scatter:{showLine:!1}}});var Xt={bar:Ft,bubble:Et,doughnut:Bt,horizontalBar:Wt,line:Ht,polarArea:qt,pie:Yt,radar:Kt,scatter:Ht};function Jt(t,e){return t.native?{x:t.x,y:t.y}:$.getRelativePosition(t,e)}function Zt(t,e){var n,o,a,r,i,s,l=t._getSortedVisibleDatasetMetas();for(o=0,r=l.length;o<r;++o)for(a=0,i=(n=l[o].data).length;a<i;++a)(s=n[a])._view.skip||e(s)}function Qt(t,e){var n=[];return Zt(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function te(t,e,n,o){var a=Number.POSITIVE_INFINITY,r=[];return Zt(t,(function(t){if(!n||t.inRange(e.x,e.y)){var i=t.getCenterPoint(),s=o(e,i);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ee(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,o){var a=e?Math.abs(t.x-o.x):0,r=n?Math.abs(t.y-o.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ne(t,e,n){var o=Jt(e,t);n.axis=n.axis||"x";var a=ee(n.axis),r=n.intersect?Qt(t,o):te(t,o,!1,a),i=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&i.push(e)})),i):[]}var oe={modes:{single:function(t,e){var n=Jt(e,t),o=[];return Zt(t,(function(t){if(t.inRange(n.x,n.y))return o.push(t),o})),o.slice(0,1)},label:ne,index:ne,dataset:function(t,e,n){var o=Jt(e,t);n.axis=n.axis||"xy";var a=ee(n.axis),r=n.intersect?Qt(t,o):te(t,o,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ne(t,e,{intersect:!1})},point:function(t,e){return Qt(t,Jt(e,t))},nearest:function(t,e,n){var o=Jt(e,t);n.axis=n.axis||"xy";var a=ee(n.axis);return te(t,o,n.intersect,a)},x:function(t,e,n){var o=Jt(e,t),a=[],r=!1;return Zt(t,(function(t){t.inXRange(o.x)&&a.push(t),t.inRange(o.x,o.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var o=Jt(e,t),a=[],r=!1;return Zt(t,(function(t){t.inYRange(o.y)&&a.push(t),t.inRange(o.x,o.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},ae=$.extend;function re(t,e){return $.where(t,(function(t){return t.pos===e}))}function ie(t,e){return t.sort((function(t,n){var o=e?n:t,a=e?t:n;return o.weight===a.weight?o.index-a.index:o.weight-a.weight}))}function se(t,e,n,o){return Math.max(t[n],e[n])+Math.max(t[o],e[o])}function le(t,e,n){var o,a,r=n.box,i=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();i.top=Math.max(i.top,s.top),i.left=Math.max(i.left,s.left),i.bottom=Math.max(i.bottom,s.bottom),i.right=Math.max(i.right,s.right)}if(o=e.outerWidth-se(i,t,"left","right"),a=e.outerHeight-se(i,t,"top","bottom"),o!==t.w||a!==t.h){t.w=o,t.h=a;var l=n.horizontal?[o,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function de(t,e){var n,o=e.maxPadding;return n={left:0,top:0,right:0,bottom:0},(t?["left","right"]:["top","bottom"]).forEach((function(t){n[t]=Math.max(e[t],o[t])})),n}function ue(t,e,n){var o,a,r,i,s,l,d=[];for(o=0,a=t.length;o<a;++o)(i=(r=t[o]).box).update(r.width||e.w,r.height||e.h,de(r.horizontal,e)),le(e,n,r)&&(l=!0,d.length&&(s=!0)),i.fullWidth||d.push(r);return s&&ue(d,e,n)||l}function ce(t,e,n){var o,a,r,i,s=n.padding,l=e.x,d=e.y;for(o=0,a=t.length;o<a;++o)i=(r=t[o]).box,r.horizontal?(i.left=i.fullWidth?s.left:e.left,i.right=i.fullWidth?n.outerWidth-s.right:e.left+e.w,i.top=d,i.bottom=d+i.height,i.width=i.right-i.left,d=i.bottom):(i.left=l,i.right=l+i.width,i.top=e.top,i.bottom=e.top+e.h,i.height=i.bottom-i.top,l=i.right);e.x=l,e.y=d}N._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var he,fe={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var o,a=["fullWidth","position","weight"],r=a.length,i=0;i<r;++i)o=a[i],n.hasOwnProperty(o)&&(e[o]=n[o])},update:function(t,e,n){if(t){var o=t.options.layout||{},a=$.options.toPadding(o.padding),r=e-a.width,i=n-a.height,s=function(t){var e=function(t){var e,n,o,a=[];for(e=0,n=(t||[]).length;e<n;++e)o=t[e],a.push({index:e,box:o,pos:o.position,horizontal:o.isHorizontal(),weight:o.weight});return a}(t),n=ie(re(e,"left"),!0),o=ie(re(e,"right")),a=ie(re(e,"top"),!0),r=ie(re(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:o.concat(r),chartArea:re(e,"chartArea"),vertical:n.concat(o),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,d=s.horizontal,u=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:i/2}),c=ae({maxPadding:ae({},a),w:r,h:i,x:a.left,y:a.top},a);(function(t,e){var n,o,a;for(n=0,o=t.length;n<o;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight})(l.concat(d),u),ue(l,c,u),ue(d,c,u)&&ue(l,c,u),function(t){var e=t.maxPadding;function n(n){var o=Math.max(e[n]-t[n],0);return t[n]+=o,o}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(c),ce(s.leftAndTop,c,u),c.x+=c.w,c.y+=c.h,ce(s.rightAndBottom,c,u),t.chartArea={left:c.left,top:c.top,right:c.left+c.w,bottom:c.top+c.h},$.each(s.chartArea,(function(e){var n=e.box;ae(n,t.chartArea),n.update(c.w,c.h)}))}}},pe=(he=Object.freeze({__proto__:null,default:"/*\r\n * DOM element rendering detection\r\n * https://davidwalsh.name/detect-node-insertion\r\n */\r\n@keyframes chartjs-render-animation {\r\n\tfrom { opacity: 0.99; }\r\n\tto { opacity: 1; }\r\n}\r\n\r\n.chartjs-render-monitor {\r\n\tanimation: chartjs-render-animation 0.001s;\r\n}\r\n\r\n/*\r\n * DOM element resizing detection\r\n * https://github.com/marcj/css-element-queries\r\n */\r\n.chartjs-size-monitor,\r\n.chartjs-size-monitor-expand,\r\n.chartjs-size-monitor-shrink {\r\n\tposition: absolute;\r\n\tdirection: ltr;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\toverflow: hidden;\r\n\tpointer-events: none;\r\n\tvisibility: hidden;\r\n\tz-index: -1;\r\n}\r\n\r\n.chartjs-size-monitor-expand > div {\r\n\tposition: absolute;\r\n\twidth: 1000000px;\r\n\theight: 1000000px;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n\r\n.chartjs-size-monitor-shrink > div {\r\n\tposition: absolute;\r\n\twidth: 200%;\r\n\theight: 200%;\r\n\tleft: 0;\r\n\ttop: 0;\r\n}\r\n"}))&&he.default||he,ge="$chartjs",me="chartjs-",be=me+"size-monitor",ye=me+"render-monitor",ve=me+"render-animation",xe=["animationstart","webkitAnimationStart"],we={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function _e(t,e){var n=$.getStyle(t,e),o=n&&n.match(/^(\d+)(\.\d+)?px$/);return o?Number(o[1]):void 0}var Te=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,Te)}function Se(t,e,n){t.removeEventListener(e,n,Te)}function ke(t,e,n,o,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==o?o:null}}function De(t){var e=document.createElement("div");return e.className=t||"",e}function Re(t,e,n){var o,a,r,i,s=t[ge]||(t[ge]={}),l=s.resizer=function(t){var e=1e6,n=De(be),o=De(be+"-expand"),a=De(be+"-shrink");o.appendChild(De()),a.appendChild(De()),n.appendChild(o),n.appendChild(a),n._reset=function(){o.scrollLeft=e,o.scrollTop=e,a.scrollLeft=e,a.scrollTop=e};var r=function(){n._reset(),t()};return Me(o,"scroll",r.bind(o,"expand")),Me(a,"scroll",r.bind(a,"shrink")),n}((o=function(){if(s.resizer){var o=n.options.maintainAspectRatio&&t.parentNode,a=o?o.clientWidth:0;e(ke("resize",n)),o&&o.clientWidth<a&&n.canvas&&e(ke("resize",n))}},r=!1,i=[],function(){i=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,$.requestAnimFrame.call(window,(function(){r=!1,o.apply(a,i)})))}));!function(t,e){var n=t[ge]||(t[ge]={}),o=n.renderProxy=function(t){t.animationName===ve&&e()};$.each(xe,(function(e){Me(t,e,o)})),n.reflow=!!t.offsetParent,t.classList.add(ye)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}function Ae(t){var e=t[ge]||{},n=e.resizer;delete e.resizer,function(t){var e=t[ge]||{},n=e.renderProxy;n&&($.each(xe,(function(e){Se(t,e,n)})),delete e.renderProxy),t.classList.remove(ye)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Fe={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[ge]||(t[ge]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var o=document.createElement("style");o.setAttribute("type","text/css"),o.appendChild(document.createTextNode(e)),t.appendChild(o)}}(e.host?e:document.head,pe)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,o=t.getAttribute("height"),a=t.getAttribute("width");if(t[ge]={initial:{height:o,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=_e(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var i=_e(t,"height");void 0!==r&&(t.height=i)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[ge]){var n=e[ge].initial;["height","width"].forEach((function(t){var o=n[t];$.isNullOrUndef(o)?e.removeAttribute(t):e.setAttribute(t,o)})),$.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[ge]}},addEventListener:function(t,e,n){var o=t.canvas;if("resize"!==e){var a=n[ge]||(n[ge]={});Me(o,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=we[t.type]||t.type,o=$.getRelativePosition(t,e);return ke(n,e,o.x,o.y,t)}(e,t))})}else Re(o,n,t)},removeEventListener:function(t,e,n){var o=t.canvas;if("resize"!==e){var a=((n[ge]||{}).proxies||{})[t.id+"_"+e];a&&Se(o,e,a)}else Ae(o)}};$.addEvent=Me,$.removeEvent=Se;var Ce=Fe._enabled?Fe:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Pe=$.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ce);N._set("global",{plugins:{}});var Ee={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var o,a,r,i,s,l=this.descriptors(t),d=l.length;for(o=0;o<d;++o)if("function"==typeof(s=(r=(a=l[o]).plugin)[e])&&((i=[t].concat(n||[])).push(a.options),!1===s.apply(r,i)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],o=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=$.clone(N.global.plugins[e])),n.push(t),o.push({plugin:t,options:a||{}}))}})),e.descriptors=o,e.id=this._cacheId,o},_invalidate:function(t){delete t.$plugins}},Oe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=$.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?$.merge(Object.create(null),[N.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){var n=this;n.defaults.hasOwnProperty(t)&&(n.defaults[t]=$.extend(n.defaults[t],e))},addScalesToLayout:function(t){$.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,fe.addBox(t,e)}))}},Le=$.valueOrDefault,Ie=$.rtl.getRtlAdapter;N._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:$.noop,title:function(t,e){var n="",o=e.labels,a=o?o.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=o[r.index])}return n},afterTitle:$.noop,beforeBody:$.noop,beforeLabel:$.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),$.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:$.noop,afterBody:$.noop,beforeFooter:$.noop,footer:$.noop,afterFooter:$.noop}}});var Ne={average:function(t){if(!t.length)return!1;var e,n,o=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var i=t[e];if(i&&i.hasValue()){var s=i.tooltipPosition();o+=s.x,a+=s.y,++r}}return{x:o/r,y:a/r}},nearest:function(t,e){var n,o,a,r=e.x,i=e.y,s=Number.POSITIVE_INFINITY;for(n=0,o=t.length;n<o;++n){var l=t[n];if(l&&l.hasValue()){var d=l.getCenterPoint(),u=$.distanceBetweenPoints(e,d);u<s&&(s=u,a=l)}}if(a){var c=a.tooltipPosition();r=c.x,i=c.y}return{x:r,y:i}}};function Be(t,e){return e&&($.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function We(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function ze(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Le(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Le(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Le(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Le(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Le(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Le(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Le(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Le(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Le(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function $e(t){return Be([],We(t))}var je=K.extend({initialize:function(){this._model=ze(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options.callbacks,n=e.beforeTitle.apply(t,arguments),o=e.title.apply(t,arguments),a=e.afterTitle.apply(t,arguments),r=[];return r=Be(r,We(n)),r=Be(r,We(o)),Be(r,We(a))},getBeforeBody:function(){return $e(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,o=n._options.callbacks,a=[];return $.each(t,(function(t){var r={before:[],lines:[],after:[]};Be(r.before,We(o.beforeLabel.call(n,t,e))),Be(r.lines,o.label.call(n,t,e)),Be(r.after,We(o.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return $e(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),o=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Be(r,We(n)),r=Be(r,We(o)),Be(r,We(a))},update:function(t){var e,n,o,a,r,i,s,l,d,u,c=this,h=c._options,f=c._model,p=c._model=ze(h),g=c._active,m=c._data,b={xAlign:f.xAlign,yAlign:f.yAlign},y={x:f.x,y:f.y},v={width:f.width,height:f.height},x={x:f.caretX,y:f.caretY};if(g.length){p.opacity=1;var w=[],_=[];x=Ne[h.position].call(c,g,c._eventPosition);var T=[];for(e=0,n=g.length;e<n;++e)T.push((o=g[e],a=void 0,r=void 0,i=void 0,s=void 0,l=void 0,d=void 0,u=void 0,a=o._xScale,r=o._yScale||o._scale,i=o._index,s=o._datasetIndex,l=o._chart.getDatasetMeta(s).controller,d=l._getIndexScale(),u=l._getValueScale(),{xLabel:a?a.getLabelForIndex(i,s):"",yLabel:r?r.getLabelForIndex(i,s):"",label:d?""+d.getLabelForIndex(i,s):"",value:u?""+u.getLabelForIndex(i,s):"",index:i,datasetIndex:s,x:o._model.x,y:o._model.y}));h.filter&&(T=T.filter((function(t){return h.filter(t,m)}))),h.itemSort&&(T=T.sort((function(t,e){return h.itemSort(t,e,m)}))),$.each(T,(function(t){w.push(h.callbacks.labelColor.call(c,t,c._chart)),_.push(h.callbacks.labelTextColor.call(c,t,c._chart))})),p.title=c.getTitle(T,m),p.beforeBody=c.getBeforeBody(T,m),p.body=c.getBody(T,m),p.afterBody=c.getAfterBody(T,m),p.footer=c.getFooter(T,m),p.x=x.x,p.y=x.y,p.caretPadding=h.caretPadding,p.labelColors=w,p.labelTextColors=_,p.dataPoints=T,y=function(t,e,n,o){var a=t.x,r=t.y,i=t.caretSize,s=t.caretPadding,l=t.cornerRadius,d=n.xAlign,u=n.yAlign,c=i+s,h=l+s;return"right"===d?a-=e.width:"center"===d&&((a-=e.width/2)+e.width>o.width&&(a=o.width-e.width),a<0&&(a=0)),"top"===u?r+=c:r-="bottom"===u?e.height+c:e.height/2,"center"===u?"left"===d?a+=c:"right"===d&&(a-=c):"left"===d?a-=h:"right"===d&&(a+=h),{x:a,y:r}}(p,v=function(t,e){var n=t._chart.ctx,o=2*e.yPadding,a=0,r=e.body,i=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);i+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,d=e.titleFontSize,u=e.bodyFontSize,c=e.footerFontSize;o+=s*d,o+=s?(s-1)*e.titleSpacing:0,o+=s?e.titleMarginBottom:0,o+=i*u,o+=i?(i-1)*e.bodySpacing:0,o+=l?e.footerMarginTop:0,o+=l*c,o+=l?(l-1)*e.footerSpacing:0;var h=0,f=function(t){a=Math.max(a,n.measureText(t).width+h)};return n.font=$.fontString(d,e._titleFontStyle,e._titleFontFamily),$.each(e.title,f),n.font=$.fontString(u,e._bodyFontStyle,e._bodyFontFamily),$.each(e.beforeBody.concat(e.afterBody),f),h=e.displayColors?u+2:0,$.each(r,(function(t){$.each(t.before,f),$.each(t.lines,f),$.each(t.after,f)})),h=0,n.font=$.fontString(c,e._footerFontStyle,e._footerFontFamily),$.each(e.footer,f),{width:a+=2*e.xPadding,height:o}}(this,p),b=function(t,e){var n,o,a,r,i,s=t._model,l=t._chart,d=t._chart.chartArea,u="center",c="center";s.y<e.height?c="top":s.y>l.height-e.height&&(c="bottom");var h=(d.left+d.right)/2,f=(d.top+d.bottom)/2;"center"===c?(n=function(t){return t<=h},o=function(t){return t>h}):(n=function(t){return t<=e.width/2},o=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},i=function(t){return t<=f?"top":"bottom"},n(s.x)?(u="left",a(s.x)&&(u="center",c=i(s.y))):o(s.x)&&(u="right",r(s.x)&&(u="center",c=i(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:c}}(this,v),c._chart)}else p.opacity=0;return p.xAlign=b.xAlign,p.yAlign=b.yAlign,p.x=y.x,p.y=y.y,p.width=v.width,p.height=v.height,p.caretX=x.x,p.caretY=x.y,c._model=p,t&&h.custom&&h.custom.call(c,p),c},drawCaret:function(t,e){var n=this._chart.ctx,o=this._view,a=this.getCaretPosition(t,e,o);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var o,a,r,i,s,l,d=n.caretSize,u=n.cornerRadius,c=n.xAlign,h=n.yAlign,f=t.x,p=t.y,g=e.width,m=e.height;if("center"===h)s=p+m/2,"left"===c?(a=(o=f)-d,r=o,i=s+d,l=s-d):(a=(o=f+g)+d,r=o,i=s-d,l=s+d);else if("left"===c?(o=(a=f+u+d)-d,r=a+d):"right"===c?(o=(a=f+g-u-d)-d,r=a+d):(o=(a=n.caretX)-d,r=a+d),"top"===h)s=(i=p)-d,l=i;else{s=(i=p+m)+d,l=i;var b=r;r=o,o=b}return{x1:o,x2:a,x3:r,y1:i,y2:s,y3:l}},drawTitle:function(t,e,n){var o,a,r,i=e.title,s=i.length;if(s){var l=Ie(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",o=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=$.fontString(o,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(i[r],l.x(t.x),t.y+o/2),t.y+=o+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var o,a,r,i,s,l,d,u,c=e.bodyFontSize,h=e.bodySpacing,f=e._bodyAlign,p=e.body,g=e.displayColors,m=0,b=g?Ve(e,"left"):0,y=Ie(e.rtl,e.x,e.width),v=function(e){n.fillText(e,y.x(t.x+m),t.y+c/2),t.y+=c+h},x=y.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=$.fontString(c,e._bodyFontStyle,e._bodyFontFamily),t.x=Ve(e,x),n.fillStyle=e.bodyFontColor,$.each(e.beforeBody,v),m=g&&"right"!==x?"center"===f?c/2+1:c+2:0,s=0,d=p.length;s<d;++s){for(o=p[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,$.each(o.before,v),l=0,u=(i=o.lines).length;l<u;++l){if(g){var w=y.x(b);n.fillStyle=e.legendColorBackground,n.fillRect(y.leftForLtr(w,c),t.y,c,c),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(y.leftForLtr(w,c),t.y,c,c),n.fillStyle=r.backgroundColor,n.fillRect(y.leftForLtr(y.xPlus(w,1),c-2),t.y+1,c-2,c-2),n.fillStyle=a}v(i[l])}$.each(o.after,v)}m=0,$.each(e.afterBody,v),t.y-=h},drawFooter:function(t,e,n){var o,a,r=e.footer,i=r.length;if(i){var s=Ie(e.rtl,e.x,e.width);for(t.x=Ve(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",o=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=$.fontString(o,e._footerFontStyle,e._footerFontFamily),a=0;a<i;++a)n.fillText(r[a],s.x(t.x),t.y+o/2),t.y+=o+e.footerSpacing}},drawBackground:function(t,e,n,o){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,i=t.x,s=t.y,l=o.width,d=o.height,u=e.cornerRadius;n.beginPath(),n.moveTo(i+u,s),"top"===r&&this.drawCaret(t,o),n.lineTo(i+l-u,s),n.quadraticCurveTo(i+l,s,i+l,s+u),"center"===r&&"right"===a&&this.drawCaret(t,o),n.lineTo(i+l,s+d-u),n.quadraticCurveTo(i+l,s+d,i+l-u,s+d),"bottom"===r&&this.drawCaret(t,o),n.lineTo(i+u,s+d),n.quadraticCurveTo(i,s+d,i,s+d-u),"center"===r&&"left"===a&&this.drawCaret(t,o),n.lineTo(i,s+u),n.quadraticCurveTo(i,s,i+u,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},o={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(o,e,t,n),o.y+=e.yPadding,$.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(o,e,t),this.drawBody(o,e,t),this.drawFooter(o,e,t),$.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,o=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,o.mode,o),o.reverse&&n._active.reverse()),(e=!$.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(o.enabled||o.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),He=Ne,Ue=je;Ue.positioners=He;var qe=$.valueOrDefault;function Ye(){return $.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,o){if("xAxes"===t||"yAxes"===t){var a,r,i,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)i=n[t][a],r=qe(i.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||i.type&&i.type!==e[t][a].type?$.merge(e[t][a],[Oe.getScaleDefaults(r),i]):$.merge(e[t][a],i)}else $._merger(t,e,n,o)}})}function Ge(){return $.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,o){var a=e[t]||Object.create(null),r=n[t];"scales"===t?e[t]=Ye(a,r):"scale"===t?e[t]=$.merge(a,[Oe.getScaleDefaults(r.type),r]):$._merger(t,e,n,o)}})}function Ke(t,e,n){var o,a=function(t){return t.id===o};do{o=e+n++}while($.findIndex(t,a)>=0);return o}function Xe(t){return"top"===t||"bottom"===t}function Je(t,e){return function(n,o){return n[t]===o[t]?n[e]-o[e]:n[t]-o[t]}}N._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Ze=function(t,e){return this.construct(t,e),this};$.extend(Ze.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ge(N.global,N[t.type],t.options||{}),t}(e);var o=Pe.acquireContext(t,e),a=o&&o.canvas,r=a&&a.height,i=a&&a.width;n.id=$.uid(),n.ctx=o,n.canvas=a,n.config=e,n.width=i,n.height=r,n.aspectRatio=r?i/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Ze.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),o&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Ee.notify(t,"beforeInit"),$.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Ee.notify(t,"afterInit"),t},clear:function(){return $.canvas.clear(this),this},stop:function(){return Z.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,o=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor($.getMaximumWidth(o))),i=Math.max(0,Math.floor(a?r/a:$.getMaximumHeight(o)));if((e.width!==r||e.height!==i)&&(o.width=e.width=r,o.height=e.height=i,o.style.width=r+"px",o.style.height=i+"px",$.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:i};Ee.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;$.each(e.xAxes,(function(t,n){t.id||(t.id=Ke(e.xAxes,"x-axis-",n))})),$.each(e.yAxes,(function(t,n){t.id||(t.id=Ke(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},o=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(o=o.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&o.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),$.each(o,(function(e){var o=e.options,r=o.id,i=qe(o.type,e.dtype);Xe(o.position)!==Xe(e.dposition)&&(o.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===i)(s=n[r]).options=o,s.ctx=t.ctx,s.chart=t;else{var l=Oe.getScaleConstructor(i);if(!l)return;s=new l({id:r,type:i,options:o,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),$.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,o=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],i=n.getDatasetMeta(t),s=r.type||n.config.type;if(i.type&&i.type!==s&&(n.destroyDatasetMeta(t),i=n.getDatasetMeta(t)),i.type=s,i.order=r.order||0,i.index=t,i.controller)i.controller.updateIndex(t),i.controller.linkScales();else{var l=Xt[i.type];if(void 0===l)throw new Error('"'+i.type+'" is not a chart type.');i.controller=new l(n,t),o.push(i.controller)}}return o},resetElements:function(){var t=this;$.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,o,a,r=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),a=(o=r).options,$.each(o.scales,(function(t){fe.removeBox(o,t)})),a=Ge(N.global,N[o.config.type],a),o.options=o.config.options=a,o.ensureScalesHaveIDs(),o.buildOrUpdateScales(),o.tooltip._options=a.tooltips,o.tooltip.initialize(),Ee._invalidate(r),!1!==Ee.notify(r,"beforeUpdate")){r.tooltip._data=r.data;var i=r.buildOrUpdateControllers();for(e=0,n=r.data.datasets.length;e<n;e++)r.getDatasetMeta(e).controller.buildOrUpdateElements();r.updateLayout(),r.options.animation&&r.options.animation.duration&&$.each(i,(function(t){t.reset()})),r.updateDatasets(),r.tooltip.initialize(),r.lastActive=[],Ee.notify(r,"afterUpdate"),r._layers.sort(Je("z","_idx")),r._bufferedRender?r._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:r.render(t)}},updateLayout:function(){var t=this;!1!==Ee.notify(t,"beforeLayout")&&(fe.update(this,this.width,this.height),t._layers=[],$.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Ee.notify(t,"afterScaleUpdate"),Ee.notify(t,"afterLayout"))},updateDatasets:function(){var t=this;if(!1!==Ee.notify(t,"beforeDatasetsUpdate")){for(var e=0,n=t.data.datasets.length;e<n;++e)t.updateDataset(e);Ee.notify(t,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this,n=e.getDatasetMeta(t),o={meta:n,index:t};!1!==Ee.notify(e,"beforeDatasetUpdate",[o])&&(n.controller._update(),Ee.notify(e,"afterDatasetUpdate",[o]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,o=qe(t.duration,n&&n.duration),a=t.lazy;if(!1!==Ee.notify(e,"beforeRender")){var r=function(t){Ee.notify(e,"afterRender"),$.callback(n&&n.onComplete,[t],e)};if(n&&o){var i=new J({numSteps:o/16.66,easing:t.easing||n.easing,render:function(t,e){var n=$.easing.effects[e.easing],o=e.currentStep,a=o/e.numSteps;t.draw(n(a),a,o)},onAnimationProgress:n.onProgress,onAnimationComplete:r});Z.addAnimation(e,i,o,a)}else e.draw(),r(new J({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,o=this;if(o.clear(),$.isNullOrUndef(t)&&(t=1),o.transition(t),!(o.width<=0||o.height<=0)&&!1!==Ee.notify(o,"beforeDraw",[t])){for(n=o._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(o.chartArea);for(o.drawDatasets(t);e<n.length;++e)n[e].draw(o.chartArea);o._drawTooltip(t),Ee.notify(o,"afterDraw",[t])}},transition:function(t){for(var e=this,n=0,o=(e.data.datasets||[]).length;n<o;++n)e.isDatasetVisible(n)&&e.getDatasetMeta(n).controller.transition(t);e.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,o=this,a=[];for(e=0,n=(o.data.datasets||[]).length;e<n;++e)t&&!o.isDatasetVisible(e)||a.push(o.getDatasetMeta(e));return a.sort(Je("order","index")),a},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n,o=this;if(!1!==Ee.notify(o,"beforeDatasetsDraw",[t])){for(n=(e=o._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)o.drawDataset(e[n],t);Ee.notify(o,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Ee.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Ee.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this,n=e.tooltip,o={tooltip:n,easingValue:t};!1!==Ee.notify(e,"beforeTooltipDraw",[o])&&(n.draw(),Ee.notify(e,"afterTooltipDraw",[o]))},getElementAtEvent:function(t){return oe.modes.single(this,t)},getElementsAtEvent:function(t){return oe.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return oe.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var o=oe.modes[e];return"function"==typeof o?o(this,t,n):[]},getDatasetAtEvent:function(t){return oe.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this,n=e.data.datasets[t];n._meta||(n._meta={});var o=n._meta[e.id];return o||(o=n._meta[e.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n.order||0,index:t}),o},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],o=n._meta&&n._meta[e];o&&(o.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,o=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);o&&(n.unbindEvents(),$.canvas.clear(n),Pe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ee.notify(n,"destroy"),delete Ze.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ue({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};$.each(t.options.events,(function(o){Pe.addEventListener(t,o,n),e[o]=n})),t.options.responsive&&(n=function(){t.resize()},Pe.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,$.each(e,(function(e,n){Pe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var o,a,r,i=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(o=t[a])&&this.getDatasetMeta(o._datasetIndex).controller[i+"HoverStyle"](o);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+i+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Ee.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var o=e.handleEvent(t);n&&(o=n._start?n.handleEvent(t):o|n.handleEvent(t)),Ee.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):o&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,o=n.options||{},a=o.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),$.callback(o.onHover||o.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||o.onClick&&o.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!$.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Ze.instances={};var Qe=Ze;Ze.Controller=Ze,Ze.types={},$.configMerge=Ge,$.scaleMerge=Ye;function tn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function en(t){this.options=t||{}}$.extend(en.prototype,{formats:tn,parse:tn,format:tn,add:tn,diff:tn,startOf:tn,endOf:tn,_create:function(t){return t}}),en.override=function(t){$.extend(en.prototype,t)};var nn={_date:en},on={formatters:{values:function(t){return $.isArray(t)?t:""+t},linear:function(t,e,n){var o=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(o)>1&&t!==Math.floor(t)&&(o=t-Math.floor(t));var a=$.log10(Math.abs(o)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var i=$.log10(Math.abs(t)),s=Math.floor(i)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var o=t/Math.pow(10,Math.floor($.log10(t)));return 0===t?"0":1===o||2===o||5===o||0===e||e===n.length-1?t.toExponential():""}}},an=$.isArray,rn=$.isNullOrUndef,sn=$.valueOrDefault,ln=$.valueAtIndexOrDefault;function dn(t,e,n){var o,a=t.getTicks().length,r=Math.min(e,a-1),i=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel,d=1e-6;if(!(n&&(o=1===a?Math.max(i-s,l-i):0===e?(t.getPixelForTick(1)-i)/2:(i-t.getPixelForTick(r-1))/2,(i+=r<e?o:-o)<s-d||i>l+d)))return i}function un(t,e,n,o){var a,r,i,s,l,d,u,c,h,f,p,g,m,b=n.length,y=[],v=[],x=[],w=0,_=0;for(a=0;a<b;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=d=l.string,u=o[d]=o[d]||{data:{},gc:[]},c=l.lineHeight,h=f=0,rn(s)||an(s)){if(an(s))for(r=0,i=s.length;r<i;++r)p=s[r],rn(p)||an(p)||(h=$.measureText(t,u.data,u.gc,h,p),f+=c)}else h=$.measureText(t,u.data,u.gc,h,s),f=c;y.push(h),v.push(f),x.push(c/2),w=Math.max(h,w),_=Math.max(f,_)}function T(t){return{width:y[t]||0,height:v[t]||0,offset:x[t]||0}}return function(t,e){$.each(t,(function(t){var n,o=t.gc,a=o.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[o[n]];o.splice(0,a)}}))}(o,b),g=y.indexOf(w),m=v.indexOf(_),{first:T(0),last:T(b-1),widest:T(g),highest:T(m)}}function cn(t){return t.drawTicks?t.tickMarkLength:0}function hn(t){var e,n;return t.display?(e=$.options._parseFont(t),n=$.options.toPadding(t.padding),e.lineHeight+n.height):0}function fn(t,e){return $.extend($.options._parseFont({fontFamily:sn(e.fontFamily,t.fontFamily),fontSize:sn(e.fontSize,t.fontSize),fontStyle:sn(e.fontStyle,t.fontStyle),lineHeight:sn(e.lineHeight,t.lineHeight)}),{color:$.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function pn(t){var e=fn(t,t.minor);return{minor:e,major:t.major.enabled?fn(t,t.major):e}}function gn(t){var e,n,o,a=[];for(n=0,o=t.length;n<o;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function mn(t,e,n,o){var a,r,i,s,l=sn(n,0),d=Math.min(sn(o,t.length),t.length),u=0;for(e=Math.ceil(e),o&&(e=(a=o-n)/Math.floor(a/e)),s=l;s<0;)u++,s=Math.round(l+u*e);for(r=Math.max(l,0);r<d;r++)i=t[r],r===s?(i._index=r,u++,s=Math.round(l+u*e)):delete i.label}N._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:on.formatters.values,minor:{},major:{}}});var bn=K.extend({zeroLineIndex:0,getPadding:function(){var t=this;return{left:t.paddingLeft||0,top:t.paddingTop||0,right:t.paddingRight||0,bottom:t.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){$.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var o,a,r,i,s,l=this,d=l.options.ticks,u=d.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=$.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),i=l.buildTicks()||[],(!(i=l.afterBuildTicks(i)||i)||!i.length)&&l.ticks)for(i=[],o=0,a=l.ticks.length;o<a;++o)i.push({value:l.ticks[o],major:!1});return l._ticks=i,s=u<i.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],o=t.length/e,a=0,r=t.length;a<r;a+=o)n.push(t[Math.floor(a)]);return n}(i,u):i),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=d.display&&(d.autoSkip||"auto"===d.source)?l._autoSkip(i):i,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,o=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,o=!o),n._startPixel=t,n._endPixel=e,n._reversePixels=o,n._length=e-t},afterUpdate:function(){$.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){$.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){$.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){$.callback(this.options.beforeDataLimits,[this])},determineDataLimits:$.noop,afterDataLimits:function(){$.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){$.callback(this.options.beforeBuildTicks,[this])},buildTicks:$.noop,afterBuildTicks:function(t){var e=this;return an(t)&&t.length?$.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=$.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){$.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){$.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){$.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,o,a,r,i,s=this,l=s.options,d=l.ticks,u=s.getTicks().length,c=d.minRotation||0,h=d.maxRotation,f=c;!s._isVisible()||!d.display||c>=h||u<=1||!s.isHorizontal()?s.labelRotation=c:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,o=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/u:o/(u-1))&&(a=o/(u-(l.offset?.5:1)),r=s.maxHeight-cn(l.gridLines)-d.padding-hn(l.scaleLabel),i=Math.sqrt(e*e+n*n),f=$.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/i,1))-Math.asin(n/i))),f=Math.max(c,Math.min(h,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){$.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){$.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,o=t.options,a=o.ticks,r=o.scaleLabel,i=o.gridLines,s=t._isVisible(),l="bottom"===o.position,d=t.isHorizontal();if(d?e.width=t.maxWidth:s&&(e.width=cn(i)+hn(r)),d?s&&(e.height=cn(i)+hn(r)):e.height=t.maxHeight,a.display&&s){var u=pn(a),c=t._getLabelSizes(),h=c.first,f=c.last,p=c.widest,g=c.highest,m=.4*u.minor.lineHeight,b=a.padding;if(d){var y=0!==t.labelRotation,v=$.toRadians(t.labelRotation),x=Math.cos(v),w=Math.sin(v),_=w*p.width+x*(g.height-(y?g.offset:0))+(y?0:m);e.height=Math.min(t.maxHeight,e.height+_+b);var T,M,S=t.getPixelForTick(0)-t.left,k=t.right-t.getPixelForTick(t.getTicks().length-1);y?(T=l?x*h.width+w*h.offset:w*(h.height-h.offset),M=l?w*(f.height-f.offset):x*f.width+w*f.offset):(T=h.width/2,M=f.width/2),t.paddingLeft=Math.max((T-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-k)*t.width/(t.width-k),0)+3}else{var D=a.mirror?0:p.width+b+m;e.width=Math.min(t.maxWidth,e.width+D),t.paddingTop=h.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),d?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){$.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(rn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,o,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,o=t.length;n<o;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=un(t.ctx,pn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,o,a;return an(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),o=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),o=t,a=t),{min:o,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:$.noop,getPixelForValue:$.noop,getValueForPixel:$.noop,getPixelForTick:function(t){var e=this,n=e.options.offset,o=e._ticks.length,a=1/Math.max(o-(n?0:1),1);return t<0||t>o-1?null:e.getPixelForDecimal(t*a+(n?a/2:0))},getPixelForDecimal:function(t){var e=this;return e._reversePixels&&(t=1-t),e._startPixel+t*e._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,n=t.max;return t.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0},_autoSkip:function(t){var e,n,o,a,r=this,i=r.options.ticks,s=r._length,l=i.maxTicksLimit||s/r._tickSize()+1,d=i.major.enabled?function(t){var e,n,o=[];for(e=0,n=t.length;e<n;e++)t[e].major&&o.push(e);return o}(t):[],u=d.length,c=d[0],h=d[u-1];if(u>l)return function(t,e,n){var o,a,r=0,i=e[0];for(n=Math.ceil(n),o=0;o<t.length;o++)a=t[o],o===i?(a._index=o,i=e[++r*n]):delete a.label}(t,d,u/l),gn(t);if(o=function(t,e,n,o){var a,r,i,s,l=function(t){var e,n,o=t.length;if(o<2)return!1;for(n=t[0],e=1;e<o;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),d=(e.length-1)/o;if(!l)return Math.max(d,1);for(i=0,s=(a=$.math._factorize(l)).length-1;i<s;i++)if((r=a[i])>d)return r;return Math.max(d,1)}(d,t,0,l),u>0){for(e=0,n=u-1;e<n;e++)mn(t,o,d[e],d[e+1]);return a=u>1?(h-c)/(u-1):null,mn(t,o,$.isNullOrUndef(a)?0:c-a,c),mn(t,o,h,$.isNullOrUndef(a)?t.length:h+a),gn(t)}return mn(t,o),gn(t)},_tickSize:function(){var t=this,e=t.options.ticks,n=$.toRadians(t.labelRotation),o=Math.abs(Math.cos(n)),a=Math.abs(Math.sin(n)),r=t._getLabelSizes(),i=e.autoSkipPadding||0,s=r?r.widest.width+i:0,l=r?r.highest.height+i:0;return t.isHorizontal()?l*o>s*a?s/o:l/a:l*a<s*o?l/o:s/a},_isVisible:function(){var t,e,n,o=this,a=o.chart,r=o.options.display;if("auto"!==r)return!!r;for(t=0,e=a.data.datasets.length;t<e;++t)if(a.isDatasetVisible(t)&&((n=a.getDatasetMeta(t)).xAxisID===o.id||n.yAxisID===o.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,o,a,r,i,s,l,d,u,c,h,f,p,g,m,b,y=this,v=y.chart,x=y.options,w=x.gridLines,_=x.position,T=w.offsetGridLines,M=y.isHorizontal(),S=y._ticksToDraw,k=S.length+(T?1:0),D=cn(w),R=[],A=w.drawBorder?ln(w.lineWidth,0,0):0,F=A/2,C=$._alignPixel,P=function(t){return C(v,t,A)};for("top"===_?(e=P(y.bottom),s=y.bottom-D,d=e-F,c=P(t.top)+F,f=t.bottom):"bottom"===_?(e=P(y.top),c=t.top,f=P(t.bottom)-F,s=e+F,d=y.top+D):"left"===_?(e=P(y.right),i=y.right-D,l=e-F,u=P(t.left)+F,h=t.right):(e=P(y.left),u=t.left,h=P(t.right)-F,i=e+F,l=y.left+D),n=0;n<k;++n)o=S[n]||{},rn(o.label)&&n<S.length||(n===y.zeroLineIndex&&x.offset===T?(p=w.zeroLineWidth,g=w.zeroLineColor,m=w.zeroLineBorderDash||[],b=w.zeroLineBorderDashOffset||0):(p=ln(w.lineWidth,n,1),g=ln(w.color,n,"rgba(0,0,0,0.1)"),m=w.borderDash||[],b=w.borderDashOffset||0),void 0!==(a=dn(y,o._index||n,T))&&(r=C(v,a,p),M?i=l=u=h=r:s=d=c=f=r,R.push({tx1:i,ty1:s,tx2:l,ty2:d,x1:u,y1:c,x2:h,y2:f,width:p,color:g,borderDash:m,borderDashOffset:b})));return R.ticksLength=k,R.borderValue=e,R},_computeLabelItems:function(){var t,e,n,o,a,r,i,s,l,d,u,c,h=this,f=h.options,p=f.ticks,g=f.position,m=p.mirror,b=h.isHorizontal(),y=h._ticksToDraw,v=pn(p),x=p.padding,w=cn(f.gridLines),_=-$.toRadians(h.labelRotation),T=[];for("top"===g?(r=h.bottom-w-x,i=_?"left":"center"):"bottom"===g?(r=h.top+w+x,i=_?"right":"center"):"left"===g?(a=h.right-(m?0:w)-x,i=m?"left":"right"):(a=h.left+(m?0:w)+x,i=m?"right":"left"),t=0,e=y.length;t<e;++t)o=(n=y[t]).label,rn(o)||(s=h.getPixelForTick(n._index||t)+p.labelOffset,d=(l=n.major?v.major:v.minor).lineHeight,u=an(o)?o.length:1,b?(a=s,c="top"===g?((_?1:.5)-u)*d:(_?0:.5)*d):(r=s,c=(1-u)*d/2),T.push({x:a,y:r,rotation:_,label:o,font:l,textOffset:c,textAlign:i}));return T},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var o,a,r,i,s,l=e.ctx,d=e.chart,u=$._alignPixel,c=n.drawBorder?ln(n.lineWidth,0,0):0,h=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,i=h.length;r<i;++r)o=(s=h[r]).width,a=s.color,o&&a&&(l.save(),l.lineWidth=o,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(c){var f,p,g,m,b=c,y=ln(n.lineWidth,h.ticksLength-1,1),v=h.borderValue;e.isHorizontal()?(f=u(d,e.left,b)-b/2,p=u(d,e.right,y)+y/2,g=m=v):(g=u(d,e.top,b)-b/2,m=u(d,e.bottom,y)+y/2,f=p=v),l.lineWidth=c,l.strokeStyle=ln(n.color,0),l.beginPath(),l.moveTo(f,g),l.lineTo(p,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,o,a,r,i,s,l,d=t.ctx,u=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,o=u.length;e<o;++e){if(i=(r=u[e]).font,d.save(),d.translate(r.x,r.y),d.rotate(r.rotation),d.font=i.string,d.fillStyle=i.color,d.textBaseline="middle",d.textAlign=r.textAlign,s=r.label,l=r.textOffset,an(s))for(n=0,a=s.length;n<a;++n)d.fillText(""+s[n],0,l),l+=i.lineHeight;else d.fillText(s,0,l);d.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,o=n.scaleLabel;if(o.display){var a,r,i=sn(o.fontColor,N.global.defaultFontColor),s=$.options._parseFont(o),l=$.options.toPadding(o.padding),d=s.lineHeight/2,u=n.position,c=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===u?t.bottom-d-l.bottom:t.top+d+l.top;else{var h="left"===u;a=h?t.left+d+l.top:t.right-d-l.top,r=t.top+t.height/2,c=h?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(c),e.textAlign="center",e.textBaseline="middle",e.fillStyle=i,e.font=s.string,e.fillText(o.labelString,0,0),e.restore()}},draw:function(t){var e=this;e._isVisible()&&(e._drawGrid(t),e._drawTitle(),e._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,o=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==o&&t.draw===t._draw?[{z:o,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(o){return(!t||o.type===t)&&(n?o.xAxisID===e.id:o.yAxisID===e.id)}))}});bn.prototype._draw=bn.prototype.draw;var yn=bn,vn=$.isNullOrUndef,xn=yn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),o=e.options.ticks,a=o.min,r=o.max,i=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(i=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=i,e.maxIndex=s,e.min=n[i],e.max=n[s]},buildTicks:function(){var t=this,e=t._getLabels(),n=t.minIndex,o=t.maxIndex;t.ticks=0===n&&o===e.length-1?e:e.slice(n,o+1)},getLabelForIndex:function(t,e){var n=this,o=n.chart;return o.getDatasetMeta(e).controller._getValueScaleId()===n.id?n.getRightValue(o.data.datasets[e].data[t]):n._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;yn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var o,a,r,i=this;return vn(e)||vn(n)||(t=i.chart.data.datasets[n].data[e]),vn(t)||(o=i.isHorizontal()?t.x:t.y),(void 0!==o||void 0!==t&&isNaN(e))&&(a=i._getLabels(),t=$.valueOrDefault(o,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),i.getPixelForDecimal((e-i._startValue)/i._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=this,n=Math.round(e._startValue+e.getDecimalForPixel(t)*e._valueRange);return Math.min(Math.max(n,0),e.ticks.length-1)},getBasePixel:function(){return this.bottom}}),wn={position:"bottom"};xn._defaults=wn;var Tn=$.noop,Mn=$.isNullOrUndef;var Sn=yn.extend({getRightValue:function(t){return"string"==typeof t?+t:yn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=$.sign(t.min),o=$.sign(t.max);n<0&&o<0?t.max=0:n>0&&o>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this,n=e.options.ticks,o=n.stepSize,a=n.maxTicksLimit;return o?t=Math.ceil(e.max/o)-Math.floor(e.min/o)+1:(t=e._computeTickLimit(),a=a||11),a&&(t=Math.min(a,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Tn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:$.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,o,a,r,i=[],s=t.stepSize,l=s||1,d=t.maxTicks-1,u=t.min,c=t.max,h=t.precision,f=e.min,p=e.max,g=$.niceNum((p-f)/d/l)*l;if(g<1e-14&&Mn(u)&&Mn(c))return[f,p];(r=Math.ceil(p/g)-Math.floor(f/g))>d&&(g=$.niceNum(r*g/d/l)*l),s||Mn(h)?n=Math.pow(10,$._decimalPlaces(g)):(n=Math.pow(10,h),g=Math.ceil(g*n)/n),o=Math.floor(f/g)*g,a=Math.ceil(p/g)*g,s&&(!Mn(u)&&$.almostWhole(u/g,g/1e3)&&(o=u),!Mn(c)&&$.almostWhole(c/g,g/1e3)&&(a=c)),r=(a-o)/g,r=$.almostEquals(r,Math.round(r),g/1e3)?Math.round(r):Math.ceil(r),o=Math.round(o*n)/n,a=Math.round(a*n)/n,i.push(Mn(u)?o:u);for(var m=1;m<r;++m)i.push(Math.round((o+m*g)*n)/n);return i.push(Mn(c)?a:c),i}(o,t);t.handleDirectionalChanges(),t.max=$.max(a),t.min=$.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),yn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),o=e.min,a=e.max;yn.prototype._configure.call(e),e.options.offset&&n.length&&(o-=t=(a-o)/Math.max(n.length-1,1)/2,a+=t),e._startValue=o,e._endValue=a,e._valueRange=a-o}}),kn={position:"left",ticks:{callback:on.formatters.linear}};function Dn(t,e,n,o){var a,r,i=t.options,s=function(t,e,n){var o=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[o]&&(t[o]={pos:[],neg:[]}),t[o]}(e,i.stacked,n),l=s.pos,d=s.neg,u=o.length;for(a=0;a<u;++a)r=t._parseValue(o[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,d[a]=d[a]||0,i.relativePoints?l[a]=100:r.min<0||r.max<0?d[a]+=r.min:l[a]+=r.max)}function Rn(t,e,n){var o,a,r=n.length;for(o=0;o<r;++o)a=t._parseValue(n[o]),isNaN(a.min)||isNaN(a.max)||e.data[o].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var An=Sn.extend({determineDataLimits:function(){var t,e,n,o,a=this,r=a.options,i=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,d={},u=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<u;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<u;++t)n=i[(e=s[t]).index].data,l?Dn(a,d,e,n):Rn(a,e,n);$.each(d,(function(t){o=t.pos.concat(t.neg),a.min=Math.min(a.min,$.min(o)),a.max=Math.max(a.max,$.max(o))})),a.min=$.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=$.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t,e=this;return e.isHorizontal()?Math.ceil(e.width/40):(t=$.options._parseFont(e.options.ticks),Math.ceil(e.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this;return e.getPixelForDecimal((+e.getRightValue(t)-e._startValue)/e._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Fn=kn;An._defaults=Fn;var Cn=$.valueOrDefault,Pn=$.math.log10;var En={position:"left",ticks:{callback:on.formatters.logarithmic}};function On(t,e){return $.isFinite(t)&&t>=0?t:e}var Ln=yn.extend({determineDataLimits:function(){var t,e,n,o,a,r,i=this,s=i.options,l=i.chart,d=l.data.datasets,u=i.isHorizontal();function c(t){return u?t.xAxisID===i.id:t.yAxisID===i.id}i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,i.minNotZero=Number.POSITIVE_INFINITY;var h=s.stacked;if(void 0===h)for(t=0;t<d.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e)&&void 0!==e.stack){h=!0;break}if(s.stacked||h){var f={};for(t=0;t<d.length;t++){var p=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&c(e))for(void 0===f[p]&&(f[p]=[]),a=0,r=(o=d[t].data).length;a<r;a++){var g=f[p];n=i._parseValue(o[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(g[a]=g[a]||0,g[a]+=n.max)}}$.each(f,(function(t){if(t.length>0){var e=$.min(t),n=$.max(t);i.min=Math.min(i.min,e),i.max=Math.max(i.max,n)}}))}else for(t=0;t<d.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&c(e))for(a=0,r=(o=d[t].data).length;a<r;a++)n=i._parseValue(o[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(i.min=Math.min(n.min,i.min),i.max=Math.max(n.max,i.max),0!==n.min&&(i.minNotZero=Math.min(n.min,i.minNotZero)));i.min=$.isFinite(i.min)?i.min:null,i.max=$.isFinite(i.max)?i.max:null,i.minNotZero=$.isFinite(i.minNotZero)?i.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=On(e.min,t.min),t.max=On(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Pn(t.min))-1),t.max=Math.pow(10,Math.floor(Pn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Pn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Pn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Pn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),o={min:On(e.min),max:On(e.max)},a=t.ticks=function(t,e){var n,o,a=[],r=Cn(t.min,Math.pow(10,Math.floor(Pn(e.min)))),i=Math.floor(Pn(e.max)),s=Math.ceil(e.max/Math.pow(10,i));0===r?(n=Math.floor(Pn(e.minNotZero)),o=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=o*Math.pow(10,n)):(n=Math.floor(Pn(r)),o=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10==++o&&(o=1,l=++n>=0?1:l),r=Math.round(o*Math.pow(10,n)*l)/l}while(n<i||n===i&&o<s);var d=Cn(t.max,r);return a.push(d),a}(o,t);t.max=$.max(a),t.min=$.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),yn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Pn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;yn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Cn(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=Pn(e),t._valueOffset=n,t._valueRange=(Pn(t.max)-Pn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Pn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),In=En;Ln._defaults=In;var Nn=$.valueOrDefault,Bn=$.valueAtIndexOrDefault,Wn=$.options.resolve,zn={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:on.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Vn(t){var e=t.ticks;return e.display&&t.display?Nn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function $n(t,e,n,o,a){return t===o||t===a?{start:e-n/2,end:e+n/2}:t<o||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Hn(t,e,n,o){var a,r,i=n.y+o/2;if($.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,i),i+=o;else t.fillText(e,n.x,i)}function Un(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function qn(t){return $.isNumber(t)?t:0}var Yn=Sn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Vn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;$.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var i=e.getDatasetMeta(r);$.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||i.data[a].hidden||(n=Math.min(r,n),o=Math.max(r,o))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=o===Number.NEGATIVE_INFINITY?0:o,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Vn(this.options))},convertTicksToLabels:function(){var t=this;Sn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=$.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this,e=t.options;e.display&&e.pointLabels.display?function(t){var e,n,o,a=$.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},i={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,d,u=t.chart.data.labels.length;for(e=0;e<u;e++){o=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,d=t.pointLabels[e],n=$.isArray(d)?{w:$.longestText(s,s.font,d),h:d.length*l}:{w:s.measureText(d).width,h:l},t._pointLabelSizes[e]=n;var c=t.getIndexAngle(e),h=$.toDegrees(c)%360,f=$n(h,o.x,n.w,0,180),p=$n(h,o.y,n.h,90,270);f.start<r.l&&(r.l=f.start,i.l=c),f.end>r.r&&(r.r=f.end,i.r=c),p.start<r.t&&(r.t=p.start,i.t=c),p.end>r.b&&(r.b=p.end,i.b=c)}t.setReductions(t.drawingArea,r,i)}(t):t.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var o=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-o.width,0)/Math.sin(n.r),i=-e.t/Math.cos(n.t),s=-Math.max(e.b-(o.height-o.paddingTop),0)/Math.cos(n.b);a=qn(a),r=qn(r),i=qn(i),s=qn(s),o.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(i+s)/2)),o.setCenterPoint(a,r,i,s)},setCenterPoint:function(t,e,n,o){var a=this,r=a.width-e-a.drawingArea,i=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-o-a.drawingArea;a.xCenter=Math.floor((i+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if($.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this,o=n.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(o)*e+n.xCenter,y:Math.sin(o)*e+n.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this,n=e.min,o=e.max;return e.getPointPositionForValue(t||0,e.beginAtZero?0:n<0&&o<0?o:n>0&&o>0?n:0)},_drawGrid:function(){var t,e,n,o=this,a=o.ctx,r=o.options,i=r.gridLines,s=r.angleLines,l=Nn(s.lineWidth,i.lineWidth),d=Nn(s.color,i.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,o=n.pointLabels,a=Vn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),i=$.options._parseFont(o);e.save(),e.font=i.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,d=t.getPointPosition(s,r+l+5),u=Bn(o.fontColor,s,N.global.defaultFontColor);e.fillStyle=u;var c=t.getIndexAngle(s),h=$.toDegrees(c);e.textAlign=jn(h),Un(h,t._pointLabelSizes[s],d),Hn(e,t.pointLabels[s],d,i.lineHeight)}e.restore()}(o),i.display&&$.each(o.ticks,(function(t,n){0!==n&&(e=o.getDistanceFromCenterForValue(o.ticksAsNumbers[n]),function(t,e,n,o){var a,r=t.ctx,i=e.circular,s=t.chart.data.labels.length,l=Bn(e.color,o-1),d=Bn(e.lineWidth,o-1);if((i||s)&&l&&d){if(r.save(),r.strokeStyle=l,r.lineWidth=d,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),i)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var u=1;u<s;u++)a=t.getPointPosition(u,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(o,i,e,n))})),s.display&&l&&d){for(a.save(),a.lineWidth=l,a.strokeStyle=d,a.setLineDash&&(a.setLineDash(Wn([s.borderDash,i.borderDash,[]])),a.lineDashOffset=Wn([s.borderDashOffset,i.borderDashOffset,0])),t=o.chart.data.labels.length-1;t>=0;t--)e=o.getDistanceFromCenterForValue(r.ticks.reverse?o.min:o.max),n=o.getPointPosition(t,e),a.beginPath(),a.moveTo(o.xCenter,o.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var o,a,r=t.getIndexAngle(0),i=$.options._parseFont(n),s=Nn(n.fontColor,N.global.defaultFontColor);e.save(),e.font=i.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",$.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(o=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-o-i.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,i.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-o))})),e.restore()}},_drawTitle:$.noop}),Gn=zn;Yn._defaults=Gn;var Kn=$._deprecated,Xn=$.options.resolve,Jn=$.valueOrDefault,Zn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,to={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}},eo=Object.keys(to);function no(t,e){return t-e}function oo(t){return $.valueOrDefault(t.time.min,t.ticks.min)}function ao(t){return $.valueOrDefault(t.time.max,t.ticks.max)}function ro(t,e,n,o){var a=function(t,e,n){for(var o,a,r,i=0,s=t.length-1;i>=0&&i<=s;){if(a=t[(o=i+s>>1)-1]||null,r=t[o],!a)return{lo:null,hi:r};if(r[e]<n)i=o+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=o-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],i=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=i[e]-r[e],l=s?(n-r[e])/s:0,d=(i[o]-r[o])*l;return r[o]+d}function io(t,e){var n=t._adapter,o=t.options.time,a=o.parser,r=a||o.format,i=e;return"function"==typeof a&&(i=a(i)),$.isFinite(i)||(i="string"==typeof r?n.parse(i,r):n.parse(i)),null!==i?+i:(a||"function"!=typeof r||(i=r(e),$.isFinite(i)||(i=n.parse(i))),i)}function so(t,e){if($.isNullOrUndef(e))return null;var n=t.options.time,o=io(t,t.getRightValue(e));return null===o||n.round&&(o=+t._adapter.startOf(o,n.round)),o}function lo(t,e,n,o){var a,r,i,s=eo.length;for(a=eo.indexOf(t);a<s-1;++a)if(i=(r=to[eo[a]]).steps?r.steps:Qn,r.common&&Math.ceil((n-e)/(i*r.size))<=o)return eo[a];return eo[s-1]}function uo(t,e,n){var o,a,r=[],i={},s=e.length;for(o=0;o<s;++o)i[a=e[o]]=o,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,o){var a,r,i=t._adapter,s=+i.startOf(e[0].value,o),l=e[e.length-1].value;for(a=s;a<=l;a=+i.add(a,1,o))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,i,n):r}var co=yn.extend({initialize:function(){this.mergeTicksOptions(),yn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),o=t._adapter=new nn._date(e.adapters.date);return Kn("time scale",n.format,"time.format","time.parser"),Kn("time scale",n.min,"time.min","ticks.min"),Kn("time scale",n.max,"time.max","ticks.max"),$.mergeIf(n.displayFormats,o.formats()),yn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),yn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,o,a,r,i,s=this,l=s.chart,d=s._adapter,u=s.options,c=u.time.unit||"day",h=Qn,f=Zn,p=[],g=[],m=[],b=s._getLabels();for(t=0,n=b.length;t<n;++t)m.push(so(s,b[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,$.isObject(a[0]))for(g[t]=[],e=0,o=a.length;e<o;++e)r=so(s,a[e]),p.push(r),g[t][e]=r;else g[t]=m.slice(0),i||(p=p.concat(m),i=!0);else g[t]=[];m.length&&(h=Math.min(h,m[0]),f=Math.max(f,m[m.length-1])),p.length&&(p=n>1?function(t){var e,n,o,a={},r=[];for(e=0,n=t.length;e<n;++e)a[o=t[e]]||(a[o]=!0,r.push(o));return r}(p).sort(no):p.sort(no),h=Math.min(h,p[0]),f=Math.max(f,p[p.length-1])),h=so(s,oo(u))||h,f=so(s,ao(u))||f,h=h===Qn?+d.startOf(Date.now(),c):h,f=f===Zn?+d.endOf(Date.now(),c)+1:f,s.min=Math.min(h,f),s.max=Math.max(h+1,f),s._table=[],s._timestamps={data:p,datasets:g,labels:m}},buildTicks:function(){var t,e,n,o=this,a=o.min,r=o.max,i=o.options,s=i.ticks,l=i.time,d=o._timestamps,u=[],c=o.getLabelCapacity(a),h=s.source,f=i.distribution;for(d="data"===h||"auto"===h&&"series"===f?d.data:"labels"===h?d.labels:function(t,e,n,o){var a,r=t._adapter,i=t.options,s=i.time,l=s.unit||lo(s.minUnit,e,n,o),d=Xn([s.stepSize,s.unitStepSize,1]),u="week"===l&&s.isoWeekday,c=e,h=[];if(u&&(c=+r.startOf(c,"isoWeek",u)),c=+r.startOf(c,u?"day":l),r.diff(n,e,l)>1e5*d)throw e+" and "+n+" are too far apart with stepSize of "+d+" "+l;for(a=c;a<n;a=+r.add(a,d,l))h.push(a);return a!==n&&"ticks"!==i.bounds||h.push(a),h}(o,a,r,c),"ticks"===i.bounds&&d.length&&(a=d[0],r=d[d.length-1]),a=so(o,oo(i))||a,r=so(o,ao(i))||r,t=0,e=d.length;t<e;++t)(n=d[t])>=a&&n<=r&&u.push(n);return o.min=a,o.max=r,o._unit=l.unit||(s.autoSkip?lo(l.minUnit,o.min,o.max,c):function(t,e,n,o,a){var r,i;for(r=eo.length-1;r>=eo.indexOf(n);r--)if(i=eo[r],to[i].common&&t._adapter.diff(a,o,i)>=e-1)return i;return eo[n?eo.indexOf(n):0]}(o,u.length,l.minUnit,o.min,o.max)),o._majorUnit=s.major.enabled&&"year"!==o._unit?function(t){for(var e=eo.indexOf(t)+1,n=eo.length;e<n;++e)if(to[eo[e]].common)return eo[e]}(o._unit):void 0,o._table=function(t,e,n,o){if("linear"===o||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,i,s,l,d=[],u=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&u.push(s);for(u.push(n),a=0,r=u.length;a<r;++a)l=u[a+1],i=u[a-1],s=u[a],void 0!==i&&void 0!==l&&Math.round((l+i)/2)===s||d.push({time:s,pos:a/(r-1)});return d}(o._timestamps.data,a,r,f),o._offsets=function(t,e,n,o,a){var r,i,s=0,l=0;return a.offset&&e.length&&(r=ro(t,"time",e[0],"pos"),s=1===e.length?1-r:(ro(t,"time",e[1],"pos")-r)/2,i=ro(t,"time",e[e.length-1],"pos"),l=1===e.length?i:(i-ro(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(o._table,u,0,0,i),s.reverse&&u.reverse(),uo(o,u,o._majorUnit)},getLabelForIndex:function(t,e){var n=this,o=n._adapter,a=n.chart.data,r=n.options.time,i=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return $.isObject(s)&&(i=n.getRightValue(s)),r.tooltipFormat?o.format(io(n,i),r.tooltipFormat):"string"==typeof i?i:o.format(io(n,i),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,o){var a=this,r=a._adapter,i=a.options,s=i.time.displayFormats,l=s[a._unit],d=a._majorUnit,u=s[d],c=n[e],h=i.ticks,f=d&&u&&c&&c.major,p=r.format(t,o||(f?u:l)),g=f?h.major:h.minor,m=Xn([g.callback,g.userCallback,h.callback,h.userCallback]);return m?m(p,e,n):p},convertTicksToLabels:function(t){var e,n,o=[];for(e=0,n=t.length;e<n;++e)o.push(this.tickFormatFunction(t[e].value,e,t));return o},getPixelForOffset:function(t){var e=this,n=e._offsets,o=ro(e._table,"time",t,"pos");return e.getPixelForDecimal((n.start+o)*n.factor)},getPixelForValue:function(t,e,n){var o=this,a=null;if(void 0!==e&&void 0!==n&&(a=o._timestamps.datasets[n][e]),null===a&&(a=so(o,t)),null!==a)return o.getPixelForOffset(a)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this,n=e._offsets,o=e.getDecimalForPixel(t)/n.factor-n.end,a=ro(e._table,"pos",o,"time");return e._adapter._create(a)},_getLabelSize:function(t){var e=this,n=e.options.ticks,o=e.ctx.measureText(t).width,a=$.toRadians(e.isHorizontal()?n.maxRotation:n.minRotation),r=Math.cos(a),i=Math.sin(a),s=Jn(n.fontSize,N.global.defaultFontSize);return{w:o*r+s*i,h:o*i+s*r}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,o=n.displayFormats,a=o[n.unit]||o.millisecond,r=e.tickFormatFunction(t,0,uo(e,[t],e._majorUnit),a),i=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/i.w:e.height/i.h);return e.options.offset&&s--,s>0?s:1}}),ho={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}}};co._defaults=ho;var fo={category:xn,linear:An,logarithmic:Ln,radialLinear:Yn,time:co},po={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"};nn._date.override("function"==typeof t?{_id:"moment",formats:function(){return po},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,o){return t(e).add(n,o).valueOf()},diff:function(e,n,o){return t(e).diff(t(n),o)},startOf:function(e,n,o){return e=t(e),"isoWeek"===n?e.isoWeekday(o).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var go={dataset:function(t){var e=t.fill,n=t.chart,o=n.getDatasetMeta(e),a=o&&n.isDatasetVisible(e)&&o.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,o=e?e.y:null;return $.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===o?t.y:o}}}};function mo(t,e,n){var o,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(o=parseFloat(r,10),isFinite(o)&&Math.floor(o)===o)return"-"!==r[0]&&"+"!==r[0]||(o=e+o),!(o===e||o<0||o>=n)&&o;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function bo(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,o,a,r,i=t.el._scale,s=i.options,l=i.chart.data.labels.length,d=t.fill,u=[];if(!l)return null;for(e=s.ticks.reverse?i.max:i.min,n=s.ticks.reverse?i.min:i.max,o=i.getPointPositionForValue(0,e),a=0;a<l;++a)r="start"===d||"end"===d?i.getPointPositionForValue(a,"start"===d?e:n):i.getBasePosition(a),s.gridLines.circular&&(r.cx=o.x,r.cy=o.y,r.angle=i.getIndexAngle(a)-Math.PI/2),u.push(r);return u}(t):function(t){var e,n=t.el._model||{},o=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?o.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?o.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:o.getBasePixel&&(r=o.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if($.isFinite(r))return{x:(e=o.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function yo(t,e,n){var o,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(o=t[a]))return!1;if(o.visible)return a;r.push(a),a=o.fill}return!1}function vo(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),go[n](t))}function xo(t){return t&&!t.skip}function wo(t,e,n,o,a){var r,i,s,l;if(o&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<o;++r)$.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)$.canvas.lineTo(t,n[r],n[r-1],!0);else for(i=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-i,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(i,s,l,n[r].angle,n[r-1].angle,!0)}}function _o(t,e,n,o,a,r){var i,s,l,d,u,c,h,f,p=e.length,g=o.spanGaps,m=[],b=[],y=0,v=0;for(t.beginPath(),i=0,s=p;i<s;++i)u=n(d=e[l=i%p]._view,l,o),c=xo(d),h=xo(u),r&&void 0===f&&c&&(s=p+(f=i+1)),c&&h?(y=m.push(d),v=b.push(u)):y&&v&&(g?(c&&m.push(d),h&&b.push(u)):(wo(t,m,b,y,v),y=v=0,m=[],b=[]));wo(t,m,b,y,v),t.closePath(),t.fillStyle=a,t.fill()}var To={id:"filler",afterDatasetsUpdate:function(t,e){var n,o,a,r,i=(t.data.datasets||[]).length,s=e.propagate,l=[];for(o=0;o<i;++o)r=null,(a=(n=t.getDatasetMeta(o)).dataset)&&a._model&&a instanceof _t.Line&&(r={visible:t.isDatasetVisible(o),fill:mo(a,o,i),chart:t,el:a}),n.$filler=r,l.push(r);for(o=0;o<i;++o)(r=l[o])&&(r.fill=yo(l,o,s),r.boundary=bo(r),r.mapper=vo(r))},beforeDatasetsDraw:function(t){var e,n,o,a,r,i,s,l=t._getSortedVisibleDatasetMetas(),d=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(o=e.el)._view,r=o._children||[],i=e.mapper,s=a.backgroundColor||N.global.defaultColor,i&&s&&r.length&&($.canvas.clipArea(d,t.chartArea),_o(d,r,i,a,s,o._loop),$.canvas.unclipArea(d)))}},Mo=$.rtl.getRtlAdapter,So=$.noop,ko=$.valueOrDefault;function Do(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,o=this.chart,a=o.getDatasetMeta(n);a.hidden=null===a.hidden?!o.data.datasets[n].hidden:null,o.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},o=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(o?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,o,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(o=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&o.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Ro=K.extend({initialize:function(t){var e=this;$.extend(e,t),e.legendHitBoxes=[],e._hoveredItem=null,e.doughnutMode=!1},beforeUpdate:So,update:function(t,e,n){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=e,o.margins=n,o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeBuildLabels(),o.buildLabels(),o.afterBuildLabels(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:So,beforeSetDimensions:So,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:So,beforeBuildLabels:So,buildLabels:function(){var t=this,e=t.options.labels||{},n=$.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:So,beforeFit:So,fit:function(){var t=this,e=t.options,n=e.labels,o=e.display,a=t.ctx,r=$.options._parseFont(n),i=r.size,s=t.legendHitBoxes=[],l=t.minSize,d=t.isHorizontal();if(d?(l.width=t.maxWidth,l.height=o?10:0):(l.width=o?10:0,l.height=t.maxHeight),o){if(a.font=r.string,d){var u=t.lineWidths=[0],c=0;a.textAlign="left",a.textBaseline="middle",$.each(t.legendItems,(function(t,e){var o=Do(n,i)+i/2+a.measureText(t.text).width;(0===e||u[u.length-1]+o+2*n.padding>l.width)&&(c+=i+n.padding,u[u.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:o,height:i},u[u.length-1]+=o+n.padding})),l.height+=c}else{var h=n.padding,f=t.columnWidths=[],p=t.columnHeights=[],g=n.padding,m=0,b=0;$.each(t.legendItems,(function(t,e){var o=Do(n,i)+i/2+a.measureText(t.text).width;e>0&&b+i+2*h>l.height&&(g+=m+n.padding,f.push(m),p.push(b),m=0,b=0),m=Math.max(m,o),b+=i+h,s[e]={left:0,top:0,width:o,height:i}})),g+=m,f.push(m),p.push(b),l.width+=g}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:So,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,o=N.global,a=o.defaultColor,r=o.elements.line,i=t.height,s=t.columnHeights,l=t.width,d=t.lineWidths;if(e.display){var u,c=Mo(e.rtl,t.left,t.minSize.width),h=t.ctx,f=ko(n.fontColor,o.defaultFontColor),p=$.options._parseFont(n),g=p.size;h.textAlign=c.textAlign("left"),h.textBaseline="middle",h.lineWidth=.5,h.strokeStyle=f,h.fillStyle=f,h.font=p.string;var m=Do(n,g),b=t.legendHitBoxes,y=function(t,o){switch(e.align){case"start":return n.padding;case"end":return t-o;default:return(t-o+n.padding)/2}},v=t.isHorizontal();u=v?{x:t.left+y(l,d[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+y(i,s[0]),line:0},$.rtl.overrideTextDirection(t.ctx,e.textDirection);var x=g+n.padding;$.each(t.legendItems,(function(e,o){var f=h.measureText(e.text).width,p=m+g/2+f,w=u.x,_=u.y;c.setWidth(t.minSize.width),v?o>0&&w+p+n.padding>t.left+t.minSize.width&&(_=u.y+=x,u.line++,w=u.x=t.left+y(l,d[u.line])):o>0&&_+x>t.top+t.minSize.height&&(w=u.x=w+t.columnWidths[u.line]+n.padding,u.line++,_=u.y=t.top+y(i,s[u.line]));var T=c.x(w);(function(t,e,o){if(!(isNaN(m)||m<=0)){h.save();var i=ko(o.lineWidth,r.borderWidth);if(h.fillStyle=ko(o.fillStyle,a),h.lineCap=ko(o.lineCap,r.borderCapStyle),h.lineDashOffset=ko(o.lineDashOffset,r.borderDashOffset),h.lineJoin=ko(o.lineJoin,r.borderJoinStyle),h.lineWidth=i,h.strokeStyle=ko(o.strokeStyle,a),h.setLineDash&&h.setLineDash(ko(o.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=c.xPlus(t,m/2),d=e+g/2;$.canvas.drawPoint(h,o.pointStyle,s,l,d,o.rotation)}else h.fillRect(c.leftForLtr(t,m),e,m,g),0!==i&&h.strokeRect(c.leftForLtr(t,m),e,m,g);h.restore()}})(T,_,e),b[o].left=c.leftForLtr(T,b[o].width),b[o].top=_,function(t,e,n,o){var a=g/2,r=c.xPlus(t,m+a),i=e+a;h.fillText(n.text,r,i),n.hidden&&(h.beginPath(),h.lineWidth=2,h.moveTo(r,i),h.lineTo(c.xPlus(r,o),i),h.stroke())}(T,_,e,f),v?u.x+=p+n.padding:u.y+=x})),$.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,o,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(o=a[n]).left&&t<=o.left+o.width&&e>=o.top&&e<=o.top+o.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,o=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!o.onHover&&!o.onLeave)return}else{if("click"!==a)return;if(!o.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&o.onClick&&o.onClick.call(n,t.native,e):(o.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&o.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),o.onHover&&e&&o.onHover.call(n,t.native,e))}});function Ao(t,e){var n=new Ro({ctx:t.ctx,options:e,chart:t});fe.configure(t,n,e),fe.addBox(t,n),t.legend=n}var Fo={id:"legend",_element:Ro,beforeInit:function(t){var e=t.options.legend;e&&Ao(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?($.mergeIf(e,N.global.legend),n?(fe.configure(t,n,e),n.options=e):Ao(t,e)):n&&(fe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Co=$.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Po=K.extend({initialize:function(t){$.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Co,update:function(t,e,n){var o=this;return o.beforeUpdate(),o.maxWidth=t,o.maxHeight=e,o.margins=n,o.beforeSetDimensions(),o.setDimensions(),o.afterSetDimensions(),o.beforeBuildLabels(),o.buildLabels(),o.afterBuildLabels(),o.beforeFit(),o.fit(),o.afterFit(),o.afterUpdate(),o.minSize},afterUpdate:Co,beforeSetDimensions:Co,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Co,beforeBuildLabels:Co,buildLabels:Co,afterBuildLabels:Co,beforeFit:Co,fit:function(){var t,e=this,n=e.options,o=e.minSize={},a=e.isHorizontal();n.display?(t=($.isArray(n.text)?n.text.length:1)*$.options._parseFont(n).lineHeight+2*n.padding,e.width=o.width=a?e.maxWidth:t,e.height=o.height=a?t:e.maxHeight):e.width=o.width=e.height=o.height=0},afterFit:Co,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var o,a,r,i=$.options._parseFont(n),s=i.lineHeight,l=s/2+n.padding,d=0,u=t.top,c=t.left,h=t.bottom,f=t.right;e.fillStyle=$.valueOrDefault(n.fontColor,N.global.defaultFontColor),e.font=i.string,t.isHorizontal()?(a=c+(f-c)/2,r=u+l,o=f-c):(a="left"===n.position?c+l:f-l,r=u+(h-u)/2,o=h-u,d=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(d),e.textAlign="center",e.textBaseline="middle";var p=n.text;if($.isArray(p))for(var g=0,m=0;m<p.length;++m)e.fillText(p[m],0,g,o),g+=s;else e.fillText(p,0,0,o);e.restore()}}});function Eo(t,e){var n=new Po({ctx:t.ctx,options:e,chart:t});fe.configure(t,n,e),fe.addBox(t,n),t.titleBlock=n}var Oo={},Lo=To,Io=Fo,No={id:"title",_element:Po,beforeInit:function(t){var e=t.options.title;e&&Eo(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?($.mergeIf(e,N.global.title),n?(fe.configure(t,n,e),n.options=e):Eo(t,e)):n&&(fe.removeBox(t,n),delete t.titleBlock)}};for(var Bo in Oo.filler=Lo,Oo.legend=Io,Oo.title=No,Qe.helpers=$,function(){function t(t,e,n){var o;return"string"==typeof t?(o=parseInt(t,10),-1!==t.indexOf("%")&&(o=o/100*e.parentNode[n])):o=t,o}function e(t){return null!=t&&"none"!==t}function n(n,o,a){var r=document.defaultView,i=$._getParentNode(n),s=r.getComputedStyle(n)[o],l=r.getComputedStyle(i)[o],d=e(s),u=e(l),c=Number.POSITIVE_INFINITY;return d||u?Math.min(d?t(s,n,a):c,u?t(l,i,a):c):"none"}$.where=function(t,e){if($.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return $.each(t,(function(t){e(t)&&n.push(t)})),n},$.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var o=0,a=t.length;o<a;++o)if(e.call(n,t[o],o,t))return o;return-1},$.findNextWhere=function(t,e,n){$.isNullOrUndef(n)&&(n=-1);for(var o=n+1;o<t.length;o++){var a=t[o];if(e(a))return a}},$.findPreviousWhere=function(t,e,n){$.isNullOrUndef(n)&&(n=t.length);for(var o=n-1;o>=0;o--){var a=t[o];if(e(a))return a}},$.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},$.almostEquals=function(t,e,n){return Math.abs(t-e)<n},$.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},$.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},$.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},$.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0==(t=+t)||isNaN(t)?t:t>0?1:-1},$.toRadians=function(t){return t*(Math.PI/180)},$.toDegrees=function(t){return t*(180/Math.PI)},$._decimalPlaces=function(t){if($.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},$.getAngleFromPoint=function(t,e){var n=e.x-t.x,o=e.y-t.y,a=Math.sqrt(n*n+o*o),r=Math.atan2(o,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},$.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},$.aliasPixel=function(t){return t%2==0?0:.5},$._alignPixel=function(t,e,n){var o=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*o)/o+a},$.splineCurve=function(t,e,n,o){var a=t.skip?e:t,r=e,i=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(i.x-r.x,2)+Math.pow(i.y-r.y,2)),d=s/(s+l),u=l/(s+l),c=o*(d=isNaN(d)?0:d),h=o*(u=isNaN(u)?0:u);return{previous:{x:r.x-c*(i.x-a.x),y:r.y-c*(i.y-a.y)},next:{x:r.x+h*(i.x-a.x),y:r.y+h*(i.y-a.y)}}},$.EPSILON=Number.EPSILON||1e-14,$.splineCurveMonotone=function(t){var e,n,o,a,r,i,s,l,d,u=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),c=u.length;for(e=0;e<c;++e)if(!(o=u[e]).model.skip){if(n=e>0?u[e-1]:null,(a=e<c-1?u[e+1]:null)&&!a.model.skip){var h=a.model.x-o.model.x;o.deltaK=0!==h?(a.model.y-o.model.y)/h:0}!n||n.model.skip?o.mK=o.deltaK:!a||a.model.skip?o.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(o.deltaK)?o.mK=0:o.mK=(n.deltaK+o.deltaK)/2}for(e=0;e<c-1;++e)o=u[e],a=u[e+1],o.model.skip||a.model.skip||($.almostEquals(o.deltaK,0,this.EPSILON)?o.mK=a.mK=0:(r=o.mK/o.deltaK,i=a.mK/o.deltaK,(l=Math.pow(r,2)+Math.pow(i,2))<=9||(s=3/Math.sqrt(l),o.mK=r*s*o.deltaK,a.mK=i*s*o.deltaK)));for(e=0;e<c;++e)(o=u[e]).model.skip||(n=e>0?u[e-1]:null,a=e<c-1?u[e+1]:null,n&&!n.model.skip&&(d=(o.model.x-n.model.x)/3,o.model.controlPointPreviousX=o.model.x-d,o.model.controlPointPreviousY=o.model.y-d*o.mK),a&&!a.model.skip&&(d=(a.model.x-o.model.x)/3,o.model.controlPointNextX=o.model.x+d,o.model.controlPointNextY=o.model.y+d*o.mK))},$.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},$.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},$.niceNum=function(t,e){var n=Math.floor($.log10(t)),o=t/Math.pow(10,n);return(e?o<1.5?1:o<3?2:o<7?5:10:o<=1?1:o<=2?2:o<=5?5:10)*Math.pow(10,n)},$.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},$.getRelativePosition=function(t,e){var n,o,a=t.originalEvent||t,r=t.target||t.srcElement,i=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,o=s[0].clientY):(n=a.clientX,o=a.clientY);var l=parseFloat($.getStyle(r,"padding-left")),d=parseFloat($.getStyle(r,"padding-top")),u=parseFloat($.getStyle(r,"padding-right")),c=parseFloat($.getStyle(r,"padding-bottom")),h=i.right-i.left-l-u,f=i.bottom-i.top-d-c;return{x:n=Math.round((n-i.left-l)/h*r.width/e.currentDevicePixelRatio),y:o=Math.round((o-i.top-d)/f*r.height/e.currentDevicePixelRatio)}},$.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},$.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},$._calculatePadding=function(t,e,n){return(e=$.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},$._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},$.getMaximumWidth=function(t){var e=$._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,o=n-$._calculatePadding(e,"padding-left",n)-$._calculatePadding(e,"padding-right",n),a=$.getConstraintWidth(t);return isNaN(a)?o:Math.min(o,a)},$.getMaximumHeight=function(t){var e=$._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,o=n-$._calculatePadding(e,"padding-top",n)-$._calculatePadding(e,"padding-bottom",n),a=$.getConstraintHeight(t);return isNaN(a)?o:Math.min(o,a)},$.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},$.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var o=t.canvas,a=t.height,r=t.width;o.height=a*n,o.width=r*n,t.ctx.scale(n,n),o.style.height||o.style.width||(o.style.height=a+"px",o.style.width=r+"px")}},$.fontString=function(t,e,n){return e+" "+t+"px "+n},$.longestText=function(t,e,n,o){var a=(o=o||{}).data=o.data||{},r=o.garbageCollect=o.garbageCollect||[];o.font!==e&&(a=o.data={},r=o.garbageCollect=[],o.font=e),t.font=e;var i,s,l,d,u,c=0,h=n.length;for(i=0;i<h;i++)if(null!=(d=n[i])&&!0!==$.isArray(d))c=$.measureText(t,a,r,c,d);else if($.isArray(d))for(s=0,l=d.length;s<l;s++)null==(u=d[s])||$.isArray(u)||(c=$.measureText(t,a,r,c,u));var f=r.length/2;if(f>n.length){for(i=0;i<f;i++)delete a[r[i]];r.splice(0,f)}return c},$.measureText=function(t,e,n,o,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>o&&(o=r),o},$.numberOfLabelLines=function(t){var e=1;return $.each(t,(function(t){$.isArray(t)&&t.length>e&&(e=t.length)})),e},$.color=w?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),w(t)}:function(t){return console.error("Color.js not found!"),t},$.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:$.color(t).saturate(.5).darken(.1).rgbString()}}(),Qe._adapters=nn,Qe.Animation=J,Qe.animationService=Z,Qe.controllers=Xt,Qe.DatasetController=ot,Qe.defaults=N,Qe.Element=K,Qe.elements=_t,Qe.Interaction=oe,Qe.layouts=fe,Qe.platform=Pe,Qe.plugins=Ee,Qe.Scale=yn,Qe.scaleService=Oe,Qe.Ticks=on,Qe.Tooltip=Ue,Qe.helpers.each(fo,(function(t,e){Qe.scaleService.registerScaleType(e,t,t._defaults)})),Oo)Oo.hasOwnProperty(Bo)&&Qe.plugins.register(Oo[Bo]);Qe.platform.initialize();var Wo=Qe;return"undefined"!=typeof window&&(window.Chart=Qe),Qe.Chart=Qe,Qe.Legend=Oo.legend._element,Qe.Title=Oo.title._element,Qe.pluginService=Qe.plugins,Qe.PluginBase=Qe.Element.extend({}),Qe.canvasHelpers=Qe.helpers.canvas,Qe.layoutService=Qe.layouts,Qe.LinearScaleBase=Sn,Qe.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){Qe[t]=function(e,n){return new Qe(e,Qe.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Wo}(function(){try{return n(76154)}catch(t){}}())},2694:(t,e,n)=>{"use strict";var o=n(6925);function a(){}function r(){}r.resetWarningCache=a,t.exports=function(){function t(t,e,n,a,r,i){if(i!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:r,resetWarningCache:a};return n.PropTypes=n,n}},5556:(t,e,n)=>{t.exports=n(2694)()},6925:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5338:(t,e,n)=>{"use strict";var o=n(75795);e.H=o.createRoot,o.hydrateRoot},75795:t=>{"use strict";t.exports=window.ReactDOM},76154:t=>{"use strict";t.exports=window.moment}},e={};function n(o){var a=e[o];if(void 0!==a)return a.exports;var r=e[o]={exports:{}};return t[o].call(r.exports,r,r.exports,n),r.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t={};n.r(t),n.d(t,{hasBrowserEnv:()=>Mt,hasStandardBrowserEnv:()=>kt,hasStandardBrowserWebWorkerEnv:()=>Dt,navigator:()=>St,origin:()=>Rt});const e=window.React;var o=n(5338),a=n(76154),r=n.n(a);const i=window.wp.i18n,s=(0,e.createContext)(),l=()=>(0,e.useContext)(s);var d=n(5556),u=n.n(d);const c=({gap:t,visible:n,children:o})=>{const a={display:n?"grid":"none",gridGap:t};return(0,e.createElement)("div",{className:"givewp-grid",style:a},o)};c.propTypes={gap:u().string,visible:u().bool,children:u().node.isRequired},c.defaultProps={gap:"30px",visible:!0,children:null};const h=c,f=({width:t,title:n,children:o})=>(0,e.createElement)("div",{className:"givewp-card",style:{gridColumn:"span "+t}},n&&(0,e.createElement)("div",{className:"title"},n),(0,e.createElement)("div",{className:"content"},o));f.propTypes={width:u().number,title:u().string,children:u().node.isRequired},f.defaultProps={width:4,title:null,children:null};const p=f;function g(t,e){return function(){return t.apply(e,arguments)}}const{toString:m}=Object.prototype,{getPrototypeOf:b}=Object,y=(v=Object.create(null),t=>{const e=m.call(t);return v[e]||(v[e]=e.slice(8,-1).toLowerCase())});var v;const x=t=>(t=t.toLowerCase(),e=>y(e)===t),w=t=>e=>typeof e===t,{isArray:_}=Array,T=w("undefined"),M=x("ArrayBuffer"),S=w("string"),k=w("function"),D=w("number"),R=t=>null!==t&&"object"==typeof t,A=t=>{if("object"!==y(t))return!1;const e=b(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},F=x("Date"),C=x("File"),P=x("Blob"),E=x("FileList"),O=x("URLSearchParams"),[L,I,N,B]=["ReadableStream","Request","Response","Headers"].map(x);function W(t,e,{allOwnKeys:n=!1}={}){if(null==t)return;let o,a;if("object"!=typeof t&&(t=[t]),_(t))for(o=0,a=t.length;o<a;o++)e.call(null,t[o],o,t);else{const a=n?Object.getOwnPropertyNames(t):Object.keys(t),r=a.length;let i;for(o=0;o<r;o++)i=a[o],e.call(null,t[i],i,t)}}function z(t,e){e=e.toLowerCase();const n=Object.keys(t);let o,a=n.length;for(;a-- >0;)if(o=n[a],e===o.toLowerCase())return o;return null}const V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,$=t=>!T(t)&&t!==V,j=(H="undefined"!=typeof Uint8Array&&b(Uint8Array),t=>H&&t instanceof H);var H;const U=x("HTMLFormElement"),q=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Y=x("RegExp"),G=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),o={};W(n,((n,a)=>{let r;!1!==(r=e(n,a,t))&&(o[a]=r||n)})),Object.defineProperties(t,o)},K="abcdefghijklmnopqrstuvwxyz",X="0123456789",J={DIGIT:X,ALPHA:K,ALPHA_DIGIT:K+K.toUpperCase()+X},Z=x("AsyncFunction"),Q=(tt="function"==typeof setImmediate,et=k(V.postMessage),tt?setImmediate:et?(nt=`axios@${Math.random()}`,ot=[],V.addEventListener("message",(({source:t,data:e})=>{t===V&&e===nt&&ot.length&&ot.shift()()}),!1),t=>{ot.push(t),V.postMessage(nt,"*")}):t=>setTimeout(t));var tt,et,nt,ot;const at="undefined"!=typeof queueMicrotask?queueMicrotask.bind(V):"undefined"!=typeof process&&process.nextTick||Q,rt={isArray:_,isArrayBuffer:M,isBuffer:function(t){return null!==t&&!T(t)&&null!==t.constructor&&!T(t.constructor)&&k(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||k(t.append)&&("formdata"===(e=y(t))||"object"===e&&k(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&M(t.buffer),e},isString:S,isNumber:D,isBoolean:t=>!0===t||!1===t,isObject:R,isPlainObject:A,isReadableStream:L,isRequest:I,isResponse:N,isHeaders:B,isUndefined:T,isDate:F,isFile:C,isBlob:P,isRegExp:Y,isFunction:k,isStream:t=>R(t)&&k(t.pipe),isURLSearchParams:O,isTypedArray:j,isFileList:E,forEach:W,merge:function t(){const{caseless:e}=$(this)&&this||{},n={},o=(o,a)=>{const r=e&&z(n,a)||a;A(n[r])&&A(o)?n[r]=t(n[r],o):A(o)?n[r]=t({},o):_(o)?n[r]=o.slice():n[r]=o};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&W(arguments[t],o);return n},extend:(t,e,n,{allOwnKeys:o}={})=>(W(e,((e,o)=>{n&&k(e)?t[o]=g(e,n):t[o]=e}),{allOwnKeys:o}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,n,o)=>{t.prototype=Object.create(e.prototype,o),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},toFlatObject:(t,e,n,o)=>{let a,r,i;const s={};if(e=e||{},null==t)return e;do{for(a=Object.getOwnPropertyNames(t),r=a.length;r-- >0;)i=a[r],o&&!o(i,t,e)||s[i]||(e[i]=t[i],s[i]=!0);t=!1!==n&&b(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:y,kindOfTest:x,endsWith:(t,e,n)=>{t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;const o=t.indexOf(e,n);return-1!==o&&o===n},toArray:t=>{if(!t)return null;if(_(t))return t;let e=t.length;if(!D(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},forEachEntry:(t,e)=>{const n=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=n.next())&&!o.done;){const n=o.value;e.call(t,n[0],n[1])}},matchAll:(t,e)=>{let n;const o=[];for(;null!==(n=t.exec(e));)o.push(n);return o},isHTMLForm:U,hasOwnProperty:q,hasOwnProp:q,reduceDescriptors:G,freezeMethods:t=>{G(t,((e,n)=>{if(k(t)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const o=t[n];k(o)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(t,e)=>{const n={},o=t=>{t.forEach((t=>{n[t]=!0}))};return _(t)?o(t):o(String(t).split(e)),n},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,n){return e.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:z,global:V,isContextDefined:$,ALPHABET:J,generateString:(t=16,e=J.ALPHA_DIGIT)=>{let n="";const{length:o}=e;for(;t--;)n+=e[Math.random()*o|0];return n},isSpecCompliantForm:function(t){return!!(t&&k(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),n=(t,o)=>{if(R(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[o]=t;const a=_(t)?[]:{};return W(t,((t,e)=>{const r=n(t,o+1);!T(r)&&(a[e]=r)})),e[o]=void 0,a}}return t};return n(t,0)},isAsyncFn:Z,isThenable:t=>t&&(R(t)||k(t))&&k(t.then)&&k(t.catch),setImmediate:Q,asap:at};function it(t,e,n,o,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),o&&(this.request=o),a&&(this.response=a,this.status=a.status?a.status:null)}rt.inherits(it,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:rt.toJSONObject(this.config),code:this.code,status:this.status}}});const st=it.prototype,lt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{lt[t]={value:t}})),Object.defineProperties(it,lt),Object.defineProperty(st,"isAxiosError",{value:!0}),it.from=(t,e,n,o,a,r)=>{const i=Object.create(st);return rt.toFlatObject(t,i,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),it.call(i,t.message,e,n,o,a),i.cause=t,i.name=t.name,r&&Object.assign(i,r),i};const dt=it;function ut(t){return rt.isPlainObject(t)||rt.isArray(t)}function ct(t){return rt.endsWith(t,"[]")?t.slice(0,-2):t}function ht(t,e,n){return t?t.concat(e).map((function(t,e){return t=ct(t),!n&&e?"["+t+"]":t})).join(n?".":""):e}const ft=rt.toFlatObject(rt,{},null,(function(t){return/^is[A-Z]/.test(t)})),pt=function(t,e,n){if(!rt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const o=(n=rt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!rt.isUndefined(e[t])}))).metaTokens,a=n.visitor||d,r=n.dots,i=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&rt.isSpecCompliantForm(e);if(!rt.isFunction(a))throw new TypeError("visitor must be a function");function l(t){if(null===t)return"";if(rt.isDate(t))return t.toISOString();if(!s&&rt.isBlob(t))throw new dt("Blob is not supported. Use a Buffer instead.");return rt.isArrayBuffer(t)||rt.isTypedArray(t)?s&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function d(t,n,a){let s=t;if(t&&!a&&"object"==typeof t)if(rt.endsWith(n,"{}"))n=o?n:n.slice(0,-2),t=JSON.stringify(t);else if(rt.isArray(t)&&function(t){return rt.isArray(t)&&!t.some(ut)}(t)||(rt.isFileList(t)||rt.endsWith(n,"[]"))&&(s=rt.toArray(t)))return n=ct(n),s.forEach((function(t,o){!rt.isUndefined(t)&&null!==t&&e.append(!0===i?ht([n],o,r):null===i?n:n+"[]",l(t))})),!1;return!!ut(t)||(e.append(ht(a,n,r),l(t)),!1)}const u=[],c=Object.assign(ft,{defaultVisitor:d,convertValue:l,isVisitable:ut});if(!rt.isObject(t))throw new TypeError("data must be an object");return function t(n,o){if(!rt.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+o.join("."));u.push(n),rt.forEach(n,(function(n,r){!0===(!(rt.isUndefined(n)||null===n)&&a.call(e,n,rt.isString(r)?r.trim():r,o,c))&&t(n,o?o.concat(r):[r])})),u.pop()}}(t),e};function gt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function mt(t,e){this._pairs=[],t&&pt(t,this,e)}const bt=mt.prototype;bt.append=function(t,e){this._pairs.push([t,e])},bt.toString=function(t){const e=t?function(e){return t.call(this,e,gt)}:gt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const yt=mt;function vt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function xt(t,e,n){if(!e)return t;const o=n&&n.encode||vt;rt.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let r;if(r=a?a(e,n):rt.isURLSearchParams(e)?e.toString():new yt(e,n).toString(o),r){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+r}return t}const wt=class{constructor(){this.handlers=[]}use(t,e,n){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){rt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},_t={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Tt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:yt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},Mt="undefined"!=typeof window&&"undefined"!=typeof document,St="object"==typeof navigator&&navigator||void 0,kt=Mt&&(!St||["ReactNative","NativeScript","NS"].indexOf(St.product)<0),Dt="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Rt=Mt&&window.location.href||"http://localhost",At={...t,...Tt},Ft=function(t){function e(t,n,o,a){let r=t[a++];if("__proto__"===r)return!0;const i=Number.isFinite(+r),s=a>=t.length;return r=!r&&rt.isArray(o)?o.length:r,s?(rt.hasOwnProp(o,r)?o[r]=[o[r],n]:o[r]=n,!i):(o[r]&&rt.isObject(o[r])||(o[r]=[]),e(t,n,o[r],a)&&rt.isArray(o[r])&&(o[r]=function(t){const e={},n=Object.keys(t);let o;const a=n.length;let r;for(o=0;o<a;o++)r=n[o],e[r]=t[r];return e}(o[r])),!i)}if(rt.isFormData(t)&&rt.isFunction(t.entries)){const n={};return rt.forEachEntry(t,((t,o)=>{e(function(t){return rt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),o,n,0)})),n}return null},Ct={transitional:_t,adapter:["xhr","http","fetch"],transformRequest:[function(t,e){const n=e.getContentType()||"",o=n.indexOf("application/json")>-1,a=rt.isObject(t);if(a&&rt.isHTMLForm(t)&&(t=new FormData(t)),rt.isFormData(t))return o?JSON.stringify(Ft(t)):t;if(rt.isArrayBuffer(t)||rt.isBuffer(t)||rt.isStream(t)||rt.isFile(t)||rt.isBlob(t)||rt.isReadableStream(t))return t;if(rt.isArrayBufferView(t))return t.buffer;if(rt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let r;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return pt(t,new At.classes.URLSearchParams,Object.assign({visitor:function(t,e,n,o){return At.isNode&&rt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((r=rt.isFileList(t))||n.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return pt(r?{"files[]":t}:t,e&&new e,this.formSerializer)}}return a||o?(e.setContentType("application/json",!1),function(t){if(rt.isString(t))try{return(0,JSON.parse)(t),rt.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||Ct.transitional,n=e&&e.forcedJSONParsing,o="json"===this.responseType;if(rt.isResponse(t)||rt.isReadableStream(t))return t;if(t&&rt.isString(t)&&(n&&!this.responseType||o)){const n=!(e&&e.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(t){if(n){if("SyntaxError"===t.name)throw dt.from(t,dt.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:At.classes.FormData,Blob:At.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};rt.forEach(["delete","get","head","post","put","patch"],(t=>{Ct.headers[t]={}}));const Pt=Ct,Et=rt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ot=Symbol("internals");function Lt(t){return t&&String(t).trim().toLowerCase()}function It(t){return!1===t||null==t?t:rt.isArray(t)?t.map(It):String(t)}function Nt(t,e,n,o,a){return rt.isFunction(o)?o.call(this,e,n):(a&&(e=n),rt.isString(e)?rt.isString(o)?-1!==e.indexOf(o):rt.isRegExp(o)?o.test(e):void 0:void 0)}class Bt{constructor(t){t&&this.set(t)}set(t,e,n){const o=this;function a(t,e,n){const a=Lt(e);if(!a)throw new Error("header name must be a non-empty string");const r=rt.findKey(o,a);(!r||void 0===o[r]||!0===n||void 0===n&&!1!==o[r])&&(o[r||e]=It(t))}const r=(t,e)=>rt.forEach(t,((t,n)=>a(t,n,e)));if(rt.isPlainObject(t)||t instanceof this.constructor)r(t,e);else if(rt.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim()))r((t=>{const e={};let n,o,a;return t&&t.split("\n").forEach((function(t){a=t.indexOf(":"),n=t.substring(0,a).trim().toLowerCase(),o=t.substring(a+1).trim(),!n||e[n]&&Et[n]||("set-cookie"===n?e[n]?e[n].push(o):e[n]=[o]:e[n]=e[n]?e[n]+", "+o:o)})),e})(t),e);else if(rt.isHeaders(t))for(const[e,o]of t.entries())a(o,e,n);else null!=t&&a(e,t,n);return this}get(t,e){if(t=Lt(t)){const n=rt.findKey(this,t);if(n){const t=this[n];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(t);)e[o[1]]=o[2];return e}(t);if(rt.isFunction(e))return e.call(this,t,n);if(rt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=Lt(t)){const n=rt.findKey(this,t);return!(!n||void 0===this[n]||e&&!Nt(0,this[n],n,e))}return!1}delete(t,e){const n=this;let o=!1;function a(t){if(t=Lt(t)){const a=rt.findKey(n,t);!a||e&&!Nt(0,n[a],a,e)||(delete n[a],o=!0)}}return rt.isArray(t)?t.forEach(a):a(t),o}clear(t){const e=Object.keys(this);let n=e.length,o=!1;for(;n--;){const a=e[n];t&&!Nt(0,this[a],a,t,!0)||(delete this[a],o=!0)}return o}normalize(t){const e=this,n={};return rt.forEach(this,((o,a)=>{const r=rt.findKey(n,a);if(r)return e[r]=It(o),void delete e[a];const i=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,n)=>e.toUpperCase()+n))}(a):String(a).trim();i!==a&&delete e[a],e[i]=It(o),n[i]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return rt.forEach(this,((n,o)=>{null!=n&&!1!==n&&(e[o]=t&&rt.isArray(n)?n.join(", "):n)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const n=new this(t);return e.forEach((t=>n.set(t))),n}static accessor(t){const e=(this[Ot]=this[Ot]={accessors:{}}).accessors,n=this.prototype;function o(t){const o=Lt(t);e[o]||(function(t,e){const n=rt.toCamelCase(" "+e);["get","set","has"].forEach((o=>{Object.defineProperty(t,o+n,{value:function(t,n,a){return this[o].call(this,e,t,n,a)},configurable:!0})}))}(n,t),e[o]=!0)}return rt.isArray(t)?t.forEach(o):o(t),this}}Bt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),rt.reduceDescriptors(Bt.prototype,(({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[n]=t}}})),rt.freezeMethods(Bt);const Wt=Bt;function zt(t,e){const n=this||Pt,o=e||n,a=Wt.from(o.headers);let r=o.data;return rt.forEach(t,(function(t){r=t.call(n,r,a.normalize(),e?e.status:void 0)})),a.normalize(),r}function Vt(t){return!(!t||!t.__CANCEL__)}function $t(t,e,n){dt.call(this,null==t?"canceled":t,dt.ERR_CANCELED,e,n),this.name="CanceledError"}rt.inherits($t,dt,{__CANCEL__:!0});const jt=$t;function Ht(t,e,n){const o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(new dt("Request failed with status code "+n.status,[dt.ERR_BAD_REQUEST,dt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}const Ut=(t,e,n=3)=>{let o=0;const a=function(t,e){t=t||10;const n=new Array(t),o=new Array(t);let a,r=0,i=0;return e=void 0!==e?e:1e3,function(s){const l=Date.now(),d=o[i];a||(a=l),n[r]=s,o[r]=l;let u=i,c=0;for(;u!==r;)c+=n[u++],u%=t;if(r=(r+1)%t,r===i&&(i=(i+1)%t),l-a<e)return;const h=d&&l-d;return h?Math.round(1e3*c/h):void 0}}(50,250);return function(t,e){let n,o,a=0,r=1e3/e;const i=(e,r=Date.now())=>{a=r,n=null,o&&(clearTimeout(o),o=null),t.apply(null,e)};return[(...t)=>{const e=Date.now(),s=e-a;s>=r?i(t,e):(n=t,o||(o=setTimeout((()=>{o=null,i(n)}),r-s)))},()=>n&&i(n)]}((n=>{const r=n.loaded,i=n.lengthComputable?n.total:void 0,s=r-o,l=a(s);o=r,t({loaded:r,total:i,progress:i?r/i:void 0,bytes:s,rate:l||void 0,estimated:l&&i&&r<=i?(i-r)/l:void 0,event:n,lengthComputable:null!=i,[e?"download":"upload"]:!0})}),n)},qt=(t,e)=>{const n=null!=t;return[o=>e[0]({lengthComputable:n,total:t,loaded:o}),e[1]]},Yt=t=>(...e)=>rt.asap((()=>t(...e))),Gt=At.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,At.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(At.origin),At.navigator&&/(msie|trident)/i.test(At.navigator.userAgent)):()=>!0,Kt=At.hasStandardBrowserEnv?{write(t,e,n,o,a,r){const i=[t+"="+encodeURIComponent(e)];rt.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),rt.isString(o)&&i.push("path="+o),rt.isString(a)&&i.push("domain="+a),!0===r&&i.push("secure"),document.cookie=i.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Xt(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Jt=t=>t instanceof Wt?{...t}:t;function Zt(t,e){e=e||{};const n={};function o(t,e,n,o){return rt.isPlainObject(t)&&rt.isPlainObject(e)?rt.merge.call({caseless:o},t,e):rt.isPlainObject(e)?rt.merge({},e):rt.isArray(e)?e.slice():e}function a(t,e,n,a){return rt.isUndefined(e)?rt.isUndefined(t)?void 0:o(void 0,t,0,a):o(t,e,0,a)}function r(t,e){if(!rt.isUndefined(e))return o(void 0,e)}function i(t,e){return rt.isUndefined(e)?rt.isUndefined(t)?void 0:o(void 0,t):o(void 0,e)}function s(n,a,r){return r in e?o(n,a):r in t?o(void 0,n):void 0}const l={url:r,method:r,data:r,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s,headers:(t,e,n)=>a(Jt(t),Jt(e),0,!0)};return rt.forEach(Object.keys(Object.assign({},t,e)),(function(o){const r=l[o]||a,i=r(t[o],e[o],o);rt.isUndefined(i)&&r!==s||(n[o]=i)})),n}const Qt=t=>{const e=Zt({},t);let n,{data:o,withXSRFToken:a,xsrfHeaderName:r,xsrfCookieName:i,headers:s,auth:l}=e;if(e.headers=s=Wt.from(s),e.url=xt(Xt(e.baseURL,e.url),t.params,t.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),rt.isFormData(o))if(At.hasStandardBrowserEnv||At.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[t,...e]=n?n.split(";").map((t=>t.trim())).filter(Boolean):[];s.setContentType([t||"multipart/form-data",...e].join("; "))}if(At.hasStandardBrowserEnv&&(a&&rt.isFunction(a)&&(a=a(e)),a||!1!==a&&Gt(e.url))){const t=r&&i&&Kt.read(i);t&&s.set(r,t)}return e},te="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,n){const o=Qt(t);let a=o.data;const r=Wt.from(o.headers).normalize();let i,s,l,d,u,{responseType:c,onUploadProgress:h,onDownloadProgress:f}=o;function p(){d&&d(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(i),o.signal&&o.signal.removeEventListener("abort",i)}let g=new XMLHttpRequest;function m(){if(!g)return;const o=Wt.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());Ht((function(t){e(t),p()}),(function(t){n(t),p()}),{data:c&&"text"!==c&&"json"!==c?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:o,config:t,request:g}),g=null}g.open(o.method.toUpperCase(),o.url,!0),g.timeout=o.timeout,"onloadend"in g?g.onloadend=m:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(m)},g.onabort=function(){g&&(n(new dt("Request aborted",dt.ECONNABORTED,t,g)),g=null)},g.onerror=function(){n(new dt("Network Error",dt.ERR_NETWORK,t,g)),g=null},g.ontimeout=function(){let e=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const a=o.transitional||_t;o.timeoutErrorMessage&&(e=o.timeoutErrorMessage),n(new dt(e,a.clarifyTimeoutError?dt.ETIMEDOUT:dt.ECONNABORTED,t,g)),g=null},void 0===a&&r.setContentType(null),"setRequestHeader"in g&&rt.forEach(r.toJSON(),(function(t,e){g.setRequestHeader(e,t)})),rt.isUndefined(o.withCredentials)||(g.withCredentials=!!o.withCredentials),c&&"json"!==c&&(g.responseType=o.responseType),f&&([l,u]=Ut(f,!0),g.addEventListener("progress",l)),h&&g.upload&&([s,d]=Ut(h),g.upload.addEventListener("progress",s),g.upload.addEventListener("loadend",d)),(o.cancelToken||o.signal)&&(i=e=>{g&&(n(!e||e.type?new jt(null,t,g):e),g.abort(),g=null)},o.cancelToken&&o.cancelToken.subscribe(i),o.signal&&(o.signal.aborted?i():o.signal.addEventListener("abort",i)));const b=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(o.url);b&&-1===At.protocols.indexOf(b)?n(new dt("Unsupported protocol "+b+":",dt.ERR_BAD_REQUEST,t)):g.send(a||null)}))},ee=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let n,o=new AbortController;const a=function(t){if(!n){n=!0,i();const e=t instanceof Error?t:this.reason;o.abort(e instanceof dt?e:new jt(e instanceof Error?e.message:e))}};let r=e&&setTimeout((()=>{r=null,a(new dt(`timeout ${e} of ms exceeded`,dt.ETIMEDOUT))}),e);const i=()=>{t&&(r&&clearTimeout(r),r=null,t.forEach((t=>{t.unsubscribe?t.unsubscribe(a):t.removeEventListener("abort",a)})),t=null)};t.forEach((t=>t.addEventListener("abort",a)));const{signal:s}=o;return s.unsubscribe=()=>rt.asap(i),s}},ne=function*(t,e){let n=t.byteLength;if(!e||n<e)return void(yield t);let o,a=0;for(;a<n;)o=a+e,yield t.slice(a,o),a=o},oe=(t,e,n,o)=>{const a=async function*(t,e){for await(const n of async function*(t){if(t[Symbol.asyncIterator])return void(yield*t);const e=t.getReader();try{for(;;){const{done:t,value:n}=await e.read();if(t)break;yield n}}finally{await e.cancel()}}(t))yield*ne(n,e)}(t,e);let r,i=0,s=t=>{r||(r=!0,o&&o(t))};return new ReadableStream({async pull(t){try{const{done:e,value:o}=await a.next();if(e)return s(),void t.close();let r=o.byteLength;if(n){let t=i+=r;n(t)}t.enqueue(new Uint8Array(o))}catch(t){throw s(t),t}},cancel:t=>(s(t),a.return())},{highWaterMark:2})},ae="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,re=ae&&"function"==typeof ReadableStream,ie=ae&&("function"==typeof TextEncoder?(se=new TextEncoder,t=>se.encode(t)):async t=>new Uint8Array(await new Response(t).arrayBuffer()));var se;const le=(t,...e)=>{try{return!!t(...e)}catch(t){return!1}},de=re&&le((()=>{let t=!1;const e=new Request(At.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e})),ue=re&&le((()=>rt.isReadableStream(new Response("").body))),ce={stream:ue&&(t=>t.body)};var he;ae&&(he=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!ce[t]&&(ce[t]=rt.isFunction(he[t])?e=>e[t]():(e,n)=>{throw new dt(`Response type '${t}' is not supported`,dt.ERR_NOT_SUPPORT,n)})})));const fe={http:null,xhr:te,fetch:ae&&(async t=>{let{url:e,method:n,data:o,signal:a,cancelToken:r,timeout:i,onDownloadProgress:s,onUploadProgress:l,responseType:d,headers:u,withCredentials:c="same-origin",fetchOptions:h}=Qt(t);d=d?(d+"").toLowerCase():"text";let f,p=ee([a,r&&r.toAbortSignal()],i);const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let m;try{if(l&&de&&"get"!==n&&"head"!==n&&0!==(m=await(async(t,e)=>{const n=rt.toFiniteNumber(t.getContentLength());return null==n?(async t=>{if(null==t)return 0;if(rt.isBlob(t))return t.size;if(rt.isSpecCompliantForm(t)){const e=new Request(At.origin,{method:"POST",body:t});return(await e.arrayBuffer()).byteLength}return rt.isArrayBufferView(t)||rt.isArrayBuffer(t)?t.byteLength:(rt.isURLSearchParams(t)&&(t+=""),rt.isString(t)?(await ie(t)).byteLength:void 0)})(e):n})(u,o))){let t,n=new Request(e,{method:"POST",body:o,duplex:"half"});if(rt.isFormData(o)&&(t=n.headers.get("content-type"))&&u.setContentType(t),n.body){const[t,e]=qt(m,Ut(Yt(l)));o=oe(n.body,65536,t,e)}}rt.isString(c)||(c=c?"include":"omit");const a="credentials"in Request.prototype;f=new Request(e,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:a?c:void 0});let r=await fetch(f);const i=ue&&("stream"===d||"response"===d);if(ue&&(s||i&&g)){const t={};["status","statusText","headers"].forEach((e=>{t[e]=r[e]}));const e=rt.toFiniteNumber(r.headers.get("content-length")),[n,o]=s&&qt(e,Ut(Yt(s),!0))||[];r=new Response(oe(r.body,65536,n,(()=>{o&&o(),g&&g()})),t)}d=d||"text";let b=await ce[rt.findKey(ce,d)||"text"](r,t);return!i&&g&&g(),await new Promise(((e,n)=>{Ht(e,n,{data:b,headers:Wt.from(r.headers),status:r.status,statusText:r.statusText,config:t,request:f})}))}catch(e){if(g&&g(),e&&"TypeError"===e.name&&/fetch/i.test(e.message))throw Object.assign(new dt("Network Error",dt.ERR_NETWORK,t,f),{cause:e.cause||e});throw dt.from(e,e&&e.code,t,f)}})};rt.forEach(fe,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const pe=t=>`- ${t}`,ge=t=>rt.isFunction(t)||null===t||!1===t,me=t=>{t=rt.isArray(t)?t:[t];const{length:e}=t;let n,o;const a={};for(let r=0;r<e;r++){let e;if(n=t[r],o=n,!ge(n)&&(o=fe[(e=String(n)).toLowerCase()],void 0===o))throw new dt(`Unknown adapter '${e}'`);if(o)break;a[e||"#"+r]=o}if(!o){const t=Object.entries(a).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let n=e?t.length>1?"since :\n"+t.map(pe).join("\n"):" "+pe(t[0]):"as no adapter specified";throw new dt("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return o};function be(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new jt(null,t)}function ye(t){return be(t),t.headers=Wt.from(t.headers),t.data=zt.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),me(t.adapter||Pt.adapter)(t).then((function(e){return be(t),e.data=zt.call(t,t.transformResponse,e),e.headers=Wt.from(e.headers),e}),(function(e){return Vt(e)||(be(t),e&&e.response&&(e.response.data=zt.call(t,t.transformResponse,e.response),e.response.headers=Wt.from(e.response.headers))),Promise.reject(e)}))}const ve={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{ve[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}}));const xe={};ve.transitional=function(t,e,n){function o(t,e){return"[Axios v1.7.9] Transitional option '"+t+"'"+e+(n?". "+n:"")}return(n,a,r)=>{if(!1===t)throw new dt(o(a," has been removed"+(e?" in "+e:"")),dt.ERR_DEPRECATED);return e&&!xe[a]&&(xe[a]=!0,console.warn(o(a," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(n,a,r)}},ve.spelling=function(t){return(e,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};const we={assertOptions:function(t,e,n){if("object"!=typeof t)throw new dt("options must be an object",dt.ERR_BAD_OPTION_VALUE);const o=Object.keys(t);let a=o.length;for(;a-- >0;){const r=o[a],i=e[r];if(i){const e=t[r],n=void 0===e||i(e,r,t);if(!0!==n)throw new dt("option "+r+" must be "+n,dt.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new dt("Unknown option "+r,dt.ERR_BAD_OPTION)}},validators:ve},_e=we.validators;class Te{constructor(t){this.defaults=t,this.interceptors={request:new wt,response:new wt}}async request(t,e){try{return await this._request(t,e)}catch(t){if(t instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const n=e.stack?e.stack.replace(/^.+\n/,""):"";try{t.stack?n&&!String(t.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(t.stack+="\n"+n):t.stack=n}catch(t){}}throw t}}_request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Zt(this.defaults,e);const{transitional:n,paramsSerializer:o,headers:a}=e;void 0!==n&&we.assertOptions(n,{silentJSONParsing:_e.transitional(_e.boolean),forcedJSONParsing:_e.transitional(_e.boolean),clarifyTimeoutError:_e.transitional(_e.boolean)},!1),null!=o&&(rt.isFunction(o)?e.paramsSerializer={serialize:o}:we.assertOptions(o,{encode:_e.function,serialize:_e.function},!0)),we.assertOptions(e,{baseUrl:_e.spelling("baseURL"),withXsrfToken:_e.spelling("withXSRFToken")},!0),e.method=(e.method||this.defaults.method||"get").toLowerCase();let r=a&&rt.merge(a.common,a[e.method]);a&&rt.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete a[t]})),e.headers=Wt.concat(r,a);const i=[];let s=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(s=s&&t.synchronous,i.unshift(t.fulfilled,t.rejected))}));const l=[];let d;this.interceptors.response.forEach((function(t){l.push(t.fulfilled,t.rejected)}));let u,c=0;if(!s){const t=[ye.bind(this),void 0];for(t.unshift.apply(t,i),t.push.apply(t,l),u=t.length,d=Promise.resolve(e);c<u;)d=d.then(t[c++],t[c++]);return d}u=i.length;let h=e;for(c=0;c<u;){const t=i[c++],e=i[c++];try{h=t(h)}catch(t){e.call(this,t);break}}try{d=ye.call(this,h)}catch(t){return Promise.reject(t)}for(c=0,u=l.length;c<u;)d=d.then(l[c++],l[c++]);return d}getUri(t){return xt(Xt((t=Zt(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}rt.forEach(["delete","get","head","options"],(function(t){Te.prototype[t]=function(e,n){return this.request(Zt(n||{},{method:t,url:e,data:(n||{}).data}))}})),rt.forEach(["post","put","patch"],(function(t){function e(e){return function(n,o,a){return this.request(Zt(a||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:n,data:o}))}}Te.prototype[t]=e(),Te.prototype[t+"Form"]=e(!0)}));const Me=Te;class Se{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const n=this;this.promise.then((t=>{if(!n._listeners)return;let e=n._listeners.length;for(;e-- >0;)n._listeners[e](t);n._listeners=null})),this.promise.then=t=>{let e;const o=new Promise((t=>{n.subscribe(t),e=t})).then(t);return o.cancel=function(){n.unsubscribe(e)},o},t((function(t,o,a){n.reason||(n.reason=new jt(t,o,a),e(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}toAbortSignal(){const t=new AbortController,e=e=>{t.abort(e)};return this.subscribe(e),t.signal.unsubscribe=()=>this.unsubscribe(e),t.signal}static source(){let t;return{token:new Se((function(e){t=e})),cancel:t}}}const ke=Se,De={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(De).forEach((([t,e])=>{De[e]=t}));const Re=De,Ae=function t(e){const n=new Me(e),o=g(Me.prototype.request,n);return rt.extend(o,Me.prototype,n,{allOwnKeys:!0}),rt.extend(o,n,null,{allOwnKeys:!0}),o.create=function(n){return t(Zt(e,n))},o}(Pt);Ae.Axios=Me,Ae.CanceledError=jt,Ae.CancelToken=ke,Ae.isCancel=Vt,Ae.VERSION="1.7.9",Ae.toFormData=pt,Ae.AxiosError=dt,Ae.Cancel=Ae.CanceledError,Ae.all=function(t){return Promise.all(t)},Ae.spread=function(t){return function(e){return t.apply(null,e)}},Ae.isAxiosError=function(t){return rt.isObject(t)&&!0===t.isAxiosError},Ae.mergeConfig=Zt,Ae.AxiosHeaders=Wt,Ae.formToJSON=t=>Ft(rt.isHTMLForm(t)?new FormData(t):t),Ae.getAdapter=me,Ae.HttpStatusCode=Re,Ae.default=Ae;const Fe=Ae,Ce=t=>({type:"SET_RANGE",payload:{range:t}}),Pe=t=>window.giveReportsData[t],Ee=t=>{const[{period:n,currency:o,testMode:a},r]=l(),[i,s]=(0,e.useState)(null),[d,u]=(0,e.useState)(!1),c=Fe.CancelToken.source();return(0,e.useEffect)((()=>{n.startDate&&n.endDate&&(!0===d&&c.cancel("Operation canceled by the user."),u(!0),Fe.get(wpApiSettings.root+"give-api/v2/reports/"+t,{cancelToken:c.token,params:{start:n.startDate.format("YYYY-MM-DD"),end:n.endDate.format("YYYY-MM-DD"),currency:o,testMode:a},headers:{"X-WP-Nonce":wpApiSettings.nonce}}).then((function(e){const n=e.data.status;if(r((t=>({type:"SET_GIVE_STATUS",payload:t}))(n)),"no_donations_found"===n){const e=(t=>{switch(t){case"income":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-25 00:00:00",y:223},{x:"2020-02-26 00:00:00",y:5},{x:"2020-02-27 00:00:00",y:376},{x:"2020-02-28 00:00:00",y:25},{x:"2020-02-29 00:00:00",y:0},{x:"2020-03-01 00:00:00",y:250},{x:"2020-03-02 00:00:00",y:41}],tooltips:[{title:"$0",body:"0 Donors",footer:"Monday"},{title:"$223.00",body:"1 Donors",footer:"Tuesday"},{title:"$5.00",body:"1 Donors",footer:"Wednesday"},{title:"$376.00",body:"2 Donors",footer:"Thursday"},{title:"$25.00",body:"1 Donors",footer:"Friday"},{title:"$0",body:"0 Donors",footer:"Saturday"},{title:"$250.00",body:"1 Donors",footer:"Sunday"},{title:"$41.00",body:"1 Donors",footer:"Monday"}]}]};case"total-income":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:223},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:5},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:250},{x:"2020-02-27 15:00:00",y:126},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:25},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:250},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:41},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"$0",body:"Total Revenue",footer:"Sun 9pm - Mon 12am"},{title:"$0",body:"Total Revenue",footer:"Mon 12am - Mon 3am"},{title:"$0",body:"Total Revenue",footer:"Mon 3am - Mon 6am"},{title:"$0",body:"Total Revenue",footer:"Mon 6am - Mon 9am"},{title:"$0",body:"Total Revenue",footer:"Mon 9am - Mon 12pm"},{title:"$0",body:"Total Revenue",footer:"Mon 12pm - Mon 3pm"},{title:"$0",body:"Total Revenue",footer:"Mon 3pm - Mon 6pm"},{title:"$0",body:"Total Revenue",footer:"Mon 6pm - Mon 9pm"},{title:"$0",body:"Total Revenue",footer:"Mon 9pm - Tue 12am"},{title:"$0",body:"Total Revenue",footer:"Tue 12am - Tue 3am"},{title:"$0",body:"Total Revenue",footer:"Tue 3am - Tue 6am"},{title:"$0",body:"Total Revenue",footer:"Tue 6am - Tue 9am"},{title:"$223.00",body:"Total Revenue",footer:"Tue 9am - Tue 12pm"},{title:"$0",body:"Total Revenue",footer:"Tue 12pm - Tue 3pm"},{title:"$0",body:"Total Revenue",footer:"Tue 3pm - Tue 6pm"},{title:"$0",body:"Total Revenue",footer:"Tue 6pm - Tue 9pm"},{title:"$0",body:"Total Revenue",footer:"Tue 9pm - Wed 12am"},{title:"$0",body:"Total Revenue",footer:"Wed 12am - Wed 3am"},{title:"$0",body:"Total Revenue",footer:"Wed 3am - Wed 6am"},{title:"$0",body:"Total Revenue",footer:"Wed 6am - Wed 9am"},{title:"$5.00",body:"Total Revenue",footer:"Wed 9am - Wed 12pm"},{title:"$0",body:"Total Revenue",footer:"Wed 12pm - Wed 3pm"},{title:"$0",body:"Total Revenue",footer:"Wed 3pm - Wed 6pm"},{title:"$0",body:"Total Revenue",footer:"Wed 6pm - Wed 9pm"},{title:"$0",body:"Total Revenue",footer:"Wed 9pm - Thu 12am"},{title:"$0",body:"Total Revenue",footer:"Thu 12am - Thu 3am"},{title:"$0",body:"Total Revenue",footer:"Thu 3am - Thu 6am"},{title:"$0",body:"Total Revenue",footer:"Thu 6am - Thu 9am"},{title:"$250.00",body:"Total Revenue",footer:"Thu 9am - Thu 12pm"},{title:"$126.00",body:"Total Revenue",footer:"Thu 12pm - Thu 3pm"},{title:"$0",body:"Total Revenue",footer:"Thu 3pm - Thu 6pm"},{title:"$0",body:"Total Revenue",footer:"Thu 6pm - Thu 9pm"},{title:"$0",body:"Total Revenue",footer:"Thu 9pm - Fri 12am"},{title:"$0",body:"Total Revenue",footer:"Fri 12am - Fri 3am"},{title:"$0",body:"Total Revenue",footer:"Fri 3am - Fri 6am"},{title:"$0",body:"Total Revenue",footer:"Fri 6am - Fri 9am"},{title:"$25.00",body:"Total Revenue",footer:"Fri 9am - Fri 12pm"},{title:"$0",body:"Total Revenue",footer:"Fri 12pm - Fri 3pm"},{title:"$0",body:"Total Revenue",footer:"Fri 3pm - Fri 6pm"},{title:"$0",body:"Total Revenue",footer:"Fri 6pm - Fri 9pm"},{title:"$0",body:"Total Revenue",footer:"Fri 9pm - Sat 12am"},{title:"$0",body:"Total Revenue",footer:"Sat 12am - Sat 3am"},{title:"$0",body:"Total Revenue",footer:"Sat 3am - Sat 6am"},{title:"$0",body:"Total Revenue",footer:"Sat 6am - Sat 9am"},{title:"$0",body:"Total Revenue",footer:"Sat 9am - Sat 12pm"},{title:"$0",body:"Total Revenue",footer:"Sat 12pm - Sat 3pm"},{title:"$0",body:"Total Revenue",footer:"Sat 3pm - Sat 6pm"},{title:"$0",body:"Total Revenue",footer:"Sat 6pm - Sat 9pm"},{title:"$0",body:"Total Revenue",footer:"Sat 9pm - Sun 12am"},{title:"$0",body:"Total Revenue",footer:"Sun 12am - Sun 3am"},{title:"$0",body:"Total Revenue",footer:"Sun 3am - Sun 6am"},{title:"$0",body:"Total Revenue",footer:"Sun 6am - Sun 9am"},{title:"$250.00",body:"Total Revenue",footer:"Sun 9am - Sun 12pm"},{title:"$0",body:"Total Revenue",footer:"Sun 12pm - Sun 3pm"},{title:"$0",body:"Total Revenue",footer:"Sun 3pm - Sun 6pm"},{title:"$0",body:"Total Revenue",footer:"Sun 6pm - Sun 9pm"},{title:"$0",body:"Total Revenue",footer:"Sun 9pm - Mon 12am"},{title:"$0",body:"Total Revenue",footer:"Mon 12am - Mon 3am"},{title:"$0",body:"Total Revenue",footer:"Mon 3am - Mon 6am"},{title:"$0",body:"Total Revenue",footer:"Mon 6am - Mon 9am"},{title:"$41.00",body:"Total Revenue",footer:"Mon 9am - Mon 12pm"},{title:"$0",body:"Total Revenue",footer:"Mon 12pm - Mon 3pm"},{title:"$0",body:"Total Revenue",footer:"Mon 3pm - Mon 6pm"},{title:"$0",body:"Total Revenue",footer:"Mon 6pm - Mon 9pm"},{title:"$0",body:"Total Revenue",footer:"Mon 9pm - Tue 12am"}],trend:7.1,info:"VS previous 7 days",highlight:"$920.00"}]};case"total-donors":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:1},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:1},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:1},{x:"2020-02-27 15:00:00",y:1},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:1},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:1},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:1},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"0 Donors",body:"Total Donors",footer:"Sun 9pm - Mon 12am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12am - Mon 3am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3am - Mon 6am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6am - Mon 9am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 9am - Mon 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12pm - Mon 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3pm - Mon 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6pm - Mon 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 9pm - Tue 12am"},{title:"0 Donors",body:"Total Donors",footer:"Tue 12am - Tue 3am"},{title:"0 Donors",body:"Total Donors",footer:"Tue 3am - Tue 6am"},{title:"0 Donors",body:"Total Donors",footer:"Tue 6am - Tue 9am"},{title:"1 Donors",body:"Total Donors",footer:"Tue 9am - Tue 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 12pm - Tue 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 3pm - Tue 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 6pm - Tue 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Tue 9pm - Wed 12am"},{title:"0 Donors",body:"Total Donors",footer:"Wed 12am - Wed 3am"},{title:"0 Donors",body:"Total Donors",footer:"Wed 3am - Wed 6am"},{title:"0 Donors",body:"Total Donors",footer:"Wed 6am - Wed 9am"},{title:"1 Donors",body:"Total Donors",footer:"Wed 9am - Wed 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 12pm - Wed 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 3pm - Wed 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 6pm - Wed 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Wed 9pm - Thu 12am"},{title:"0 Donors",body:"Total Donors",footer:"Thu 12am - Thu 3am"},{title:"0 Donors",body:"Total Donors",footer:"Thu 3am - Thu 6am"},{title:"0 Donors",body:"Total Donors",footer:"Thu 6am - Thu 9am"},{title:"1 Donors",body:"Total Donors",footer:"Thu 9am - Thu 12pm"},{title:"1 Donors",body:"Total Donors",footer:"Thu 12pm - Thu 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Thu 3pm - Thu 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Thu 6pm - Thu 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Thu 9pm - Fri 12am"},{title:"0 Donors",body:"Total Donors",footer:"Fri 12am - Fri 3am"},{title:"0 Donors",body:"Total Donors",footer:"Fri 3am - Fri 6am"},{title:"0 Donors",body:"Total Donors",footer:"Fri 6am - Fri 9am"},{title:"1 Donors",body:"Total Donors",footer:"Fri 9am - Fri 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 12pm - Fri 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 3pm - Fri 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 6pm - Fri 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Fri 9pm - Sat 12am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 12am - Sat 3am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 3am - Sat 6am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 6am - Sat 9am"},{title:"0 Donors",body:"Total Donors",footer:"Sat 9am - Sat 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 12pm - Sat 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 3pm - Sat 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 6pm - Sat 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Sat 9pm - Sun 12am"},{title:"0 Donors",body:"Total Donors",footer:"Sun 12am - Sun 3am"},{title:"0 Donors",body:"Total Donors",footer:"Sun 3am - Sun 6am"},{title:"0 Donors",body:"Total Donors",footer:"Sun 6am - Sun 9am"},{title:"1 Donors",body:"Total Donors",footer:"Sun 9am - Sun 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 12pm - Sun 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 3pm - Sun 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 6pm - Sun 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Sun 9pm - Mon 12am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12am - Mon 3am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3am - Mon 6am"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6am - Mon 9am"},{title:"1 Donors",body:"Total Donors",footer:"Mon 9am - Mon 12pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 12pm - Mon 3pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 3pm - Mon 6pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 6pm - Mon 9pm"},{title:"0 Donors",body:"Total Donors",footer:"Mon 9pm - Tue 12am"}],trend:-12.5,info:"VS previous 7 days",highlight:7}]};case"average-donation":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:223},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:5},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:250},{x:"2020-02-27 15:00:00",y:126},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:25},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:250},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:41},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"$0",body:"Avg Donation",footer:"Feb 23, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 24, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 24, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$223.00",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 25, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 25, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$5.00",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 26, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 26, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$250.00",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$126.00",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 27, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 27, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$25.00",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 28, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 28, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Feb 29, 2020"},{title:"$0",body:"Avg Donation",footer:"Feb 29, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$250.00",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 1, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 1, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$41.00",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 2, 2020"},{title:"$0",body:"Avg Donation",footer:"Mar 2, 2020 - Mar 3, 2020"}],trend:22.4,info:"VS previous 7 days",highlight:"$131.43"}]};case"total-refunds":return{datasets:[{data:[{x:"2020-02-24 00:00:00",y:0},{x:"2020-02-24 03:00:00",y:0},{x:"2020-02-24 06:00:00",y:0},{x:"2020-02-24 09:00:00",y:0},{x:"2020-02-24 12:00:00",y:0},{x:"2020-02-24 15:00:00",y:0},{x:"2020-02-24 18:00:00",y:0},{x:"2020-02-24 21:00:00",y:0},{x:"2020-02-25 00:00:00",y:0},{x:"2020-02-25 03:00:00",y:0},{x:"2020-02-25 06:00:00",y:0},{x:"2020-02-25 09:00:00",y:0},{x:"2020-02-25 12:00:00",y:0},{x:"2020-02-25 15:00:00",y:0},{x:"2020-02-25 18:00:00",y:0},{x:"2020-02-25 21:00:00",y:0},{x:"2020-02-26 00:00:00",y:0},{x:"2020-02-26 03:00:00",y:0},{x:"2020-02-26 06:00:00",y:0},{x:"2020-02-26 09:00:00",y:0},{x:"2020-02-26 12:00:00",y:0},{x:"2020-02-26 15:00:00",y:0},{x:"2020-02-26 18:00:00",y:0},{x:"2020-02-26 21:00:00",y:0},{x:"2020-02-27 00:00:00",y:0},{x:"2020-02-27 03:00:00",y:0},{x:"2020-02-27 06:00:00",y:0},{x:"2020-02-27 09:00:00",y:0},{x:"2020-02-27 12:00:00",y:0},{x:"2020-02-27 15:00:00",y:0},{x:"2020-02-27 18:00:00",y:0},{x:"2020-02-27 21:00:00",y:0},{x:"2020-02-28 00:00:00",y:0},{x:"2020-02-28 03:00:00",y:0},{x:"2020-02-28 06:00:00",y:0},{x:"2020-02-28 09:00:00",y:0},{x:"2020-02-28 12:00:00",y:0},{x:"2020-02-28 15:00:00",y:0},{x:"2020-02-28 18:00:00",y:0},{x:"2020-02-28 21:00:00",y:0},{x:"2020-02-29 00:00:00",y:0},{x:"2020-02-29 03:00:00",y:0},{x:"2020-02-29 06:00:00",y:0},{x:"2020-02-29 09:00:00",y:0},{x:"2020-02-29 12:00:00",y:0},{x:"2020-02-29 15:00:00",y:0},{x:"2020-02-29 18:00:00",y:0},{x:"2020-02-29 21:00:00",y:0},{x:"2020-03-01 00:00:00",y:0},{x:"2020-03-01 03:00:00",y:0},{x:"2020-03-01 06:00:00",y:0},{x:"2020-03-01 09:00:00",y:0},{x:"2020-03-01 12:00:00",y:0},{x:"2020-03-01 15:00:00",y:0},{x:"2020-03-01 18:00:00",y:0},{x:"2020-03-01 21:00:00",y:0},{x:"2020-03-02 00:00:00",y:0},{x:"2020-03-02 03:00:00",y:0},{x:"2020-03-02 06:00:00",y:0},{x:"2020-03-02 09:00:00",y:0},{x:"2020-03-02 12:00:00",y:0},{x:"2020-03-02 15:00:00",y:0},{x:"2020-03-02 18:00:00",y:0},{x:"2020-03-02 21:00:00",y:0},{x:"2020-03-03 00:00:00",y:0}],tooltips:[{title:"0 Refunds",body:"Total Refunds",footer:"Sun 9pm - Mon 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12am - Mon 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3am - Mon 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6am - Mon 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9am - Mon 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12pm - Mon 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3pm - Mon 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6pm - Mon 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9pm - Tue 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 12am - Tue 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 3am - Tue 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 6am - Tue 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 9am - Tue 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 12pm - Tue 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 3pm - Tue 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 6pm - Tue 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Tue 9pm - Wed 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 12am - Wed 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 3am - Wed 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 6am - Wed 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 9am - Wed 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 12pm - Wed 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 3pm - Wed 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 6pm - Wed 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Wed 9pm - Thu 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 12am - Thu 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 3am - Thu 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 6am - Thu 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 9am - Thu 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 12pm - Thu 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 3pm - Thu 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 6pm - Thu 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Thu 9pm - Fri 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 12am - Fri 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 3am - Fri 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 6am - Fri 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 9am - Fri 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 12pm - Fri 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 3pm - Fri 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 6pm - Fri 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Fri 9pm - Sat 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 12am - Sat 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 3am - Sat 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 6am - Sat 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 9am - Sat 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 12pm - Sat 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 3pm - Sat 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 6pm - Sat 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sat 9pm - Sun 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 12am - Sun 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 3am - Sun 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 6am - Sun 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 9am - Sun 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 12pm - Sun 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 3pm - Sun 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 6pm - Sun 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Sun 9pm - Mon 12am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12am - Mon 3am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3am - Mon 6am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6am - Mon 9am"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9am - Mon 12pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 12pm - Mon 3pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 3pm - Mon 6pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 6pm - Mon 9pm"},{title:"0 Refunds",body:"Total Refunds",footer:"Mon 9pm - Tue 12am"}],trend:0,info:"VS previous 7 days",highlight:0}]};case"payment-methods":return{labels:["Stripe - Credit Card","Offline Donation","PayPal Standard","Test Donation","Stripe - Checkout"],datasets:[{data:[417,255,248,0,0],tooltips:[{title:"$417.00",body:"7 Payments",footer:"Stripe - Credit Card"},{title:"$255.00",body:"7 Payments",footer:"Offline Donation"},{title:"$248.00",body:"7 Payments",footer:"PayPal Standard"},{title:"$0",body:"7 Payments",footer:"Test Donation"},{title:"$0",body:"7 Payments",footer:"Stripe - Checkout"}]}]};case"payment-statuses":return{labels:["Completed","Pending","Refunded","Abandoned"],datasets:[{data:[7,0,0,0],tooltips:[{title:"7 Payments",body:"Completed",footer:""},{title:"0 Payments",body:"Pending",footer:""},{title:"0 Payments",body:"Refunded",footer:""},{title:"0 Payments",body:"Abandoned",footer:""}]}]};case"form-performance":return{forms:null,datasets:[{data:[500,379,41],tooltips:[{title:"$500.00",body:"2 Donations",footer:"Save the Rainforest"},{title:"$379.00",body:"4 Donations",footer:"Homeless Outreach Fund"},{title:"$41.00",body:"1 Donations",footer:"Support the Veterans Choir"}],labels:["Save the Rainforest","Homeless Outreach Fund","Support the Veterans Choir"]}]};case"recent-donations":return[{type:"donation",donation:{ID:2189},status:"completed",amount:"$41.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2189",time:"2020-03-02 11:21:00",donor:{name:"Philippine Ferraraccio",id:"2096"},source:"Support the Veterans Choir"},{type:"donation",donation:{ID:2188},status:"completed",amount:"$250.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2188",time:"2020-03-01 11:21:00",donor:{name:"Sheridan Frowd",id:"2095"},source:"Save the Rainforest"},{type:"donation",donation:{ID:2187},status:"completed",amount:"$25.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2187",time:"2020-02-28 11:21:00",donor:{name:"Loraine Swettenham",id:"2094"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2186},status:"completed",amount:"$126.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2186",time:"2020-02-27 12:21:00",donor:{name:"Les Leddie",id:"2082"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2185},status:"completed",amount:"$250.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2185",time:"2020-02-27 11:21:00",donor:{name:"Flint Cruikshanks",id:"2093"},source:"Save the Rainforest"},{type:"donation",donation:{ID:2184},status:"completed",amount:"$5.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2184",time:"2020-02-26 11:21:00",donor:{name:"Dunn Layman",id:"2092"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2183},status:"completed",amount:"$223.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2183",time:"2020-02-25 11:21:00",donor:{name:"Barrie Hartop",id:"2091"},source:"Homeless Outreach Fund"},{type:"donation",donation:{ID:2182},status:"cancelled",amount:"$25.00",url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-payment-history&view=view-payment-details&id=2182",time:"2020-02-24 11:21:00",donor:{name:"Teressa Corrado",id:"2090"},source:"Help Feed America"}];case"top-donors":return[{type:"donor",earnings:250,total:"$250.00",donations:1,count:"1 Donation",name:"Sheridan Frowd",email:"sfrowd86@usgs.gov",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1795"},{type:"donor",earnings:250,total:"$250.00",donations:1,count:"1 Donation",name:"Flint Cruikshanks",email:"fcruikshanks84@unesco.org",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1793"},{type:"donor",earnings:223,total:"$223.00",donations:1,count:"1 Donation",name:"Barrie Hartop",email:"bhartop82@goo.ne.jp",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1791"},{type:"donor",earnings:126,total:"$126.00",donations:1,count:"1 Donation",name:"Les Leddie",email:"lleddie7t@zdnet.com",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1782"},{type:"donor",earnings:41,total:"$41.00",donations:1,count:"1 Donation",name:"Philippine Ferraraccio",email:"pferraraccio87@dailymail.co.uk",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1796"},{type:"donor",earnings:25,total:"$25.00",donations:1,count:"1 Donation",name:"Loraine Swettenham",email:"lswettenham85@opera.com",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1794"},{type:"donor",earnings:5,total:"$5.00",donations:1,count:"1 Donation",name:"Dunn Layman",email:"dlayman83@phoca.cz",image:null,url:"https://give.local/wp-admin/edit.php?post_type=give_forms&page=give-donors&view=overview&id=1792"}];case"income-breakdown":return[{Date:"February 24, 2020",Donors:0,Donations:"$0",Refunds:0,Net:"$0"},{Date:"February 25, 2020",Donors:0,Donations:"$0",Refunds:0,Net:"$0"},{Date:"February 26, 2020",Donors:1,Donations:"$223.00",Refunds:0,Net:"$223.00"},{Date:"February 27, 2020",Donors:1,Donations:"$5.00",Refunds:0,Net:"$5.00"},{Date:"February 28, 2020",Donors:2,Donations:"$376.00",Refunds:0,Net:"$376.00"},{Date:"February 29, 2020",Donors:1,Donations:"$25.00",Refunds:0,Net:"$25.00"},{Date:"March 1, 2020",Donors:0,Donations:"$0",Refunds:0,Net:"$0"},{Date:"March 2, 2020",Donors:1,Donations:"$250.00",Refunds:0,Net:"$250.00"},{Date:"March 3, 2020",Donors:1,Donations:"$41.00",Refunds:0,Net:"$41.00"}];default:return null}})(t);s(e)}else s(e.data.data);"income"===t&&r({type:"SET_PAGE_LOADED",payload:!0}),u(!1)})).catch((function(){u(!1)})))}),[n,o,a,t]),[i,d]};var Oe=n(62477),Le=n.n(Oe);const Ie="#9EA3A8",Ne=1,Be=[5,10],We=!0,ze={id:"crosshair",afterInit:function(t){if(0===t.config.options.scales.xAxes.length)return;const e=t.config.options.scales.xAxes[0].type;"linear"!==e&&"time"!==e||(t.crosshair={enabled:!1,x:null})},getXScale:function(t){return t.data.datasets.length?t.scales[t.getDatasetMeta(0).xAxisID]:null},getYScale:function(t){return t.scales[t.getDatasetMeta(0).yAxisID]},afterEvent:function(t,e){if(0===t.config.options.scales.xAxes.length)return;const n=t.config.options.scales.xAxes[0].type;if("linear"!==n&&"time"!==n)return;const o=this.getXScale(t);if(o){if(t.crosshair.enabled="mouseout"!==e.type&&e.x>o.getPixelForValue(o.min)&&e.x<o.getPixelForValue(o.max),!t.crosshair.enabled)return e.x>o.getPixelForValue(o.max)&&t.update(),!0;t.crosshair.x=e.x,t.draw()}},afterDraw:function(t){if(t.crosshair.enabled)return this.drawTracePoints(t),this.drawTraceLine(t),!0;{const t=document.getElementById("givewp-chartjs-tooltip");t&&(t.style.opacity=0,t.style.display="none")}},drawTraceLine:function(t){const e=this.getYScale(t),n=this.getXScale(t);let o=t.crosshair.x;const a=!1===t.config.options.hover.intersect;We&&a&&t.active.length&&(o=t.active[0]._view.x);const r=Ne,i=Ie,s=Be;t.ctx.beginPath(),t.ctx.setLineDash(s),t.ctx.moveTo(o,e.getPixelForValue(e.max)),t.ctx.lineWidth=r,t.ctx.strokeStyle=i,t.ctx.lineTo(o,e.getPixelForValue(e.min)),t.ctx.stroke(),t.ctx.setLineDash([]),t.ctx.beginPath(),t.ctx.fillStyle="rgba(35, 36, 37, 0.05)";const l=n.getPixelForValue(n.min),d=n.getPixelForValue(n.max);let u,c;o-70<l?(u=l,c=o-l+70):o+70>d?(u=o-70,c=d-o+70):(u=o-70,c=140);const h=e.getPixelForValue(e.max),f=e.getPixelForValue(e.min)-e.getPixelForValue(e.max);t.ctx.rect(u,h,c,f),t.ctx.fill()},drawTracePoints:function(t){for(let e=0;e<t.data.datasets.length;e++){const n=t.data.datasets[e],o=t.getDatasetMeta(e),a=t.scales[o.yAxisID];!o.hidden&&n.interpolate&&(t.ctx.beginPath(),t.ctx.arc(t.crosshair.x,a.getPixelForValue(n.interpolatedValue),3,0,2*Math.PI,!1),t.ctx.fillStyle="white",t.ctx.lineWidth=2,t.ctx.strokeStyle=n.borderColor,t.ctx.fill(),t.ctx.stroke())}}},Ve=ze,$e=({data:t,chartRef:n})=>{const o=t.datasets[0].data.length>0?t.datasets[0].data.reduce(((t,e)=>parseInt(t)+parseInt(e))):0,[a,r]=(0,e.useState)([]),i=t.datasets[0].data.map(((i,s)=>{const l=a.includes(s)?" inactive":"",d=function(t){return["#69B868","#556E79","#9EA3A8","#4BB5D7","#F49420","#D75A4B","#914BD7"][t]}(s),u=Math.round(i/o*100),c=isNaN(u)?"0%":u+"%",h=t.datasets[0].tooltips[s];return(0,e.createElement)("div",{className:"item"+l,key:s,onClick:()=>((t,e)=>{const o=a.slice(0);if(n.data.datasets[0].data[t]===e)n.data.datasets[0].data[t]=null,o.push(t),r(o);else{n.data.datasets[0].data[t]=e;const a=o.indexOf(t);o.splice(a,1),r(o)}n.update()})(s,i)},(0,e.createElement)("div",{className:"bar",style:{background:d}}),(0,e.createElement)("p",{className:"label"},h.footer),(0,e.createElement)("p",{className:"data"},h.title),(0,e.createElement)("p",{className:"percent"},c))}));return(0,e.createElement)("div",{className:"givewp-legend"},i)};$e.propTypes={data:u().object.isRequired,chartRef:u().object.isRequired},$e.defaultProps={data:null,chartRef:null};const je=$e,He=({type:t,aspectRatio:n,data:o,showLegend:a})=>{const r=(0,e.createRef)(),i=function(t,e){const n=function(t,e){const n=e.labels?e.labels.slice(0):null,o=e.datasets.map(((e,n)=>{const o=function(t,e,n){const o=["#69B868","#556E79","#9EA3A8","#4BB5D7","#F49420","#D75A4B","#914BD7"],a={backgroundColor:o,borderColor:o,borderWidth:0};switch(t){case"line":a.backgroundColor=[o[n]+"44"],a.borderColor=[o[n]],a.borderWidth=3;break;case"pie":case"doughnut":a.borderColor=["rgb(244, 244, 244)"],a.borderWidth=3}return a}(t,e.data,n);return{data:e.data.slice(0),yAxisID:`y-axis-${n}`,backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderWidth:o.borderWidth}}));return{labels:n,datasets:o}}(t,e),o="line"!==t&&"bar"!==t,a={type:t,data:n,options:{hover:{intersect:o},legend:{display:!1},layout:{padding:16},scales:{xAxes:[],yAxes:[]},elements:{point:{radius:4,hitRadius:2,hoverRadius:6,backgroundColor:"#69B868"}},tooltips:{enabled:!1,mode:"index",intersect:o,custom:function(t){let n=document.getElementById("givewp-chartjs-tooltip");if(n||(n=document.createElement("div"),n.id="givewp-chartjs-tooltip",n.innerHTML='<div class="givewp-tooltip-header"></div><div class="givewp-tooltip-body"><bold></b><br></div><div class="givewp-tooltip-caret"></div>',document.body.appendChild(n)),0===t.opacity)return n.style.opacity=0,void(n.style.display="none");n.classList.remove("above","below","no-transform"),t.yAlign?n.classList.add(t.yAlign):n.classList.add("no-transform");const o=this._chart.canvas.getBoundingClientRect();n.style.opacity=1,n.style.display="block",n.style.position="absolute",n.style.left=o.left+t.caretX+"px",n.style.top=o.top+window.pageYOffset+t.caretY-(n.offsetHeight+6)+"px",n.style.pointerEvents="none";const a=e.datasets[t.dataPoints[0].datasetIndex].tooltips[t.dataPoints[0].index];n.innerHTML=`<div class="givewp-tooltip-header">${a.title}</div><div class="givewp-tooltip-body"><bold>${a.body}</b><br>${a.footer}</div><div class="givewp-tooltip-caret"></div>`}}}};if("line"===t||"bar"===t){const n=e.datasets.map(((e,n)=>{let o;switch(typeof e.data[0]){case"object":{const n=1.1*Math.max(...e.data.map((t=>t.y)),0);switch(t){case"line":o=n>100?n:100;break;case"bar":o=n>10?n:10}break}default:{const n=1.1*Math.max(...e.data.map((t=>t)),0);switch(t){case"line":o=n>100?n:100;break;case"bar":o=n>10?n:10}break}}return{gridLines:{color:"#D8D8D8"},id:`y-axis-${n}`,ticks:{suggestedMax:o,beginAtZero:!0}}}));if(a.options.scales={yAxes:n,xAxes:[]},"line"===t){const t=e.datasets[0].data.length<16?"data":"auto",n=parseInt(e.datasets[0].data[0].x)===(new Date).getFullYear()?"MMM D":"MMM D, YYYY";a.options.scales.xAxes=[{gridLines:{display:!1},type:"time",time:{displayFormats:{hour:"ddd ha",day:n}},ticks:{maxTicksLimit:10,source:t}}],a.plugins=[Ve]}}return a}(t,o),s=100*n,[l,d]=(0,e.useState)(null);(0,e.useEffect)((()=>{const t=r.current.getContext("2d"),n=new(Le())(t,i);return a&&d((0,e.createElement)(je,{data:o,chartRef:n})),function(){n.destroy()}}),[s,o]);let u="#F4F4F4";return!1===a&&(u="#FFF"),(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"givewp-chart-canvas",style:{background:u}},(0,e.createElement)("canvas",{width:100,height:s,ref:r})),l)};He.propTypes={type:u().string,aspectRatio:u().number,data:u().object.isRequired,showLegend:u().bool},He.defaultProps={type:"bar",aspectRatio:.6,data:null,showLegend:!1};const Ue=He,qe=()=>(0,e.createElement)("div",{className:"givewp-spinner"}),Ye=({title:t,type:n,aspectRatio:o,endpoint:a,showLegend:r,headerElements:i})=>{const[s,l]=Ee(a);return(0,e.createElement)(e.Fragment,null,t&&(0,e.createElement)("div",{className:"givewp-chart-title"},(0,e.createElement)("span",{className:"givewp-chart-title-text"},t),l&&(0,e.createElement)(qe,null),i&&i),s?(0,e.createElement)(Ue,{type:n,aspectRatio:o,data:s,showLegend:r}):(0,e.createElement)("div",{style:{width:"100%",height:"295px"}}))};Ye.propTypes={type:u().string.isRequired,aspectRatio:u().number,endpoint:u().string.isRequired,showLegend:u().bool},Ye.defaultProps={type:null,aspectRatio:.6,endpoint:null,showLegend:!1};const Ge=Ye;function Ke(t){return t.datasets[0].trend}const Xe=({title:t,body:n,position:o})=>{const a=o?{top:o.y,left:o.x}:null;return(0,e.createElement)("div",{className:"givewp-tooltip",style:a},t&&(0,e.createElement)("div",{className:"givewp-tooltip__header"},t),(0,e.createElement)("div",{className:"givewp-tooltip__body"},n),(0,e.createElement)("div",{className:"givewp-tooltip__footer"}),(0,e.createElement)("div",{className:"givewp-tooltip__caret"}))},Je=({title:t,data:n})=>{const o=(0,e.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 13C10.3137 13 13 10.3137 13 7C13 3.68629 10.3137 1 7 1C3.68629 1 1 3.68629 1 7C1 10.3137 3.68629 13 7 13Z",fill:"#69B868",fillOpacity:"0.3"}),(0,e.createElement)("mask",{id:"maskUp","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"4",width:"8",height:"5"},(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 4.6665L3.5 8.1665L4.3225 8.989L7 6.31734L9.6775 8.989L10.5 8.1665L7 4.6665Z",fill:"white"})),(0,e.createElement)("g",{mask:"url(#maskUp)"},(0,e.createElement)("rect",{x:"-7.5835",y:"-7.5835",width:"29.1667",height:"29.1667",fill:"#69B868"}))),a=(0,e.createElement)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 13C10.3137 13 13 10.3137 13 7C13 3.68629 10.3137 1 7 1C3.68629 1 1 3.68629 1 7C1 10.3137 3.68629 13 7 13Z",fill:"#D75A4B",fillOpacity:"0.3"}),(0,e.createElement)("mask",{id:"maskDown","mask-type":"alpha",maskUnits:"userSpaceOnUse",x:"3",y:"5",width:"8",height:"5"},(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.6775 5.01074L7 7.68241L4.3225 5.01074L3.5 5.83324L7 9.33324L10.5 5.83324L9.6775 5.01074Z",fill:"white"})),(0,e.createElement)("g",{mask:"url(#maskDown)"},(0,e.createElement)("rect",{x:"-7.5835",y:"-7.5835",width:"29.1667",height:"29.1667",fill:"#D75A4B"}))),[r,i]=(0,e.useState)(null),[s,l]=(0,e.useState)(null),[d,u]=(0,e.useState)(null),[c,h]=(0,e.useState)(!1),[f,p]=(0,e.useState)(null),[g,m]=(0,e.useState)({x:0,y:0}),[b,y]=(0,e.useState)(!1),v=(0,e.createRef)(),x=function(t){const e=function(t){return{labels:t.labels,datasets:t.datasets.map((t=>({data:t.data,backgroundColor:"#FFFFFF",borderColor:"#DDDDDD"})))}}(t),n={type:"line",data:e,options:{hover:{intersect:!1},plugins:{crosshair:!1},layout:{padding:4},legend:{display:!1},scales:{yAxes:[{display:!1}],xAxes:[{display:!1,type:"time"}]},tooltips:{enabled:!1,mode:"index",intersect:!1,custom:function(e){let n=document.getElementById("givewp-mini-chartjs-tooltip");if(n||(n=document.createElement("div"),n.id="givewp-mini-chartjs-tooltip",n.innerHTML='<div class="givewp-tooltip-header"></div><div class="givewp-tooltip-body"><bold></b><br></div><div class="givewp-tooltip-caret"></div>',document.body.appendChild(n)),0===e.opacity)return n.style.opacity=0,void(n.style.display="none");n.classList.remove("above","below","no-transform"),e.yAlign?n.classList.add(e.yAlign):n.classList.add("no-transform");const o=this._chart.canvas.getBoundingClientRect();n.style.opacity=1,n.style.display="block",n.style.position="absolute",n.style.left=o.left+e.caretX+"px",n.style.top=o.top+window.pageYOffset+e.caretY-(n.offsetHeight+6)+"px",n.style.pointerEvents="none";const a=t.datasets[e.dataPoints[0].datasetIndex].tooltips[e.dataPoints[0].index];n.innerHTML=`<div class="givewp-mini-tooltip-header">${a.title}</div><div class="givewp-mini-tooltip-body"><bold>${a.body}</b><br>${a.footer}</div><div class="givewp-mini-tooltip-caret"></div>`}},elements:{point:{radius:0,hitRadius:3,hoverRadius:4,backgroundColor:"#555555"}}}};return n}(n),w=(0,e.createRef)();return(0,e.useEffect)((()=>{const t=function(t){return t.datasets[0].highlight}(n),r=0===Ke(n)?0:function(t){const e=Math.floor(t).toString().length;return t.toFixed(Math.max(0,Math.min(2,3-e)))}(Ke(n)),s=function(t){return t.datasets[0].info}(n);let d;switch(!0){case r<0:d=(0,e.createElement)(e.Fragment,null,a,(0,e.createElement)("span",{style:{color:"#D75A4B"}},`${Math.abs(r)}%`));break;case r>0:d=(0,e.createElement)(e.Fragment,null,o,(0,e.createElement)("span",{style:{color:"#69B868"}},`${Math.abs(r)}%`));break;default:d=(0,e.createElement)(e.Fragment,null,(0,e.createElement)("span",{style:{color:"#82878c"}},`${Math.abs(r)}%`))}i(t),p(s),l(r),u(d);const c=v.current.getContext("2d"),h=new(Le())(c,x);return function(){h.destroy()}}),[n]),(0,e.useLayoutEffect)((()=>{function t(){const t=w.current,e=t.getBoundingClientRect(),n=t.closest(".givewp-card").getBoundingClientRect(),o=e.width>.5*n.width;y(o)}return window.addEventListener("resize",t),t(),function(){window.removeEventListener("resize",t)}})),(0,e.createElement)("div",{className:"givewp-mini-chart"},(0,e.createElement)("div",{className:"header"},(0,e.createElement)("div",{className:"title"},t),"NaN"!==s&&(0,e.createElement)("div",{className:"indicator",onMouseEnter:t=>{const e=t.target.classList.contains("indicator")?t.target:t.target.closest(".indicator"),n=e.getBoundingClientRect();m({x:e.offsetLeft+n.width/2,y:e.offsetTop}),h(!0)},onMouseLeave:()=>{h(!1)}},c&&(0,e.createElement)(Xe,{body:f,position:g}),d)),(0,e.createElement)("div",{className:b?"content stacked":"content"},(0,e.createElement)("div",{className:"amount",ref:w},r&&r),(0,e.createElement)("div",{className:"chart"},(0,e.createElement)("canvas",{width:100,height:40,ref:v}))))};Je.propTypes={title:u().string.isRequired,data:u().object.isRequired},Je.defaultProps={title:null,data:null};const Ze=Je,Qe=()=>(0,e.createElement)("div",{className:"givewp-loading-overlay"},(0,e.createElement)(qe,null)),tn=({title:t,endpoint:n})=>{const[o,a]=Ee(n);return(0,e.createElement)(e.Fragment,null,a&&(0,e.createElement)(Qe,null),o?(0,e.createElement)(Ze,{title:t,data:o}):(0,e.createElement)("div",{style:{width:"100%",height:"95px"}}))};tn.propTypes={title:u().string.isRequired,endpoint:u().string.isRequired},tn.defaultProps={title:null,endpoint:null};const en=tn,nn=()=>(0,e.createElement)("div",{className:"givewp-loading-notice"},(0,e.createElement)("div",{className:"givewp-loading-notice__card"},(0,e.createElement)(qe,null),(0,e.createElement)("h2",null,(0,i.__)("Loading your latest","give"),(0,e.createElement)("br",null),(0,i.__)("donation activity","give")))),on=()=>{const[{period:t},n]=l();return(0,e.createElement)("div",{className:"givewp-mini-period-selector"},(0,e.createElement)("div",{className:"group"},(0,e.createElement)("button",{className:"day"===t.range?"selected":null,onClick:()=>n(Ce("day"))},(0,i.__)("Day","give")),(0,e.createElement)("button",{className:"week"===t.range?"selected":null,onClick:()=>n(Ce("week"))},(0,i.__)("Week","give")),(0,e.createElement)("button",{className:"month"===t.range?"selected":null,onClick:()=>n(Ce("month"))},(0,i.__)("Month","give"))))};function an(){return window.giveReportsWidget}function rn({hideWidgetBanner:t}){const n=an().banner;return(0,e.createElement)("div",{id:`givewp-sale-banner-${n.id}`,className:"givewp-reports-widget-banner"},(0,e.createElement)("div",{className:"givewp-reports-widget-banner__header"},(0,e.createElement)("h1",{className:"givewp-reports-widget-banner__header__main"},(0,i.__)("Make it yours.","give")),(0,e.createElement)("h2",{className:"givewp-reports-widget-banner__header__secondary"},(0,i.__)("Save 40% on all GiveWP products","give"))),(0,e.createElement)("a",{className:"givewp-reports-widget-banner__cta",href:n.actionUrl,target:"_blank",rel:"noopener noreferrer"},n.actionText),(0,e.createElement)("button",{onClick:()=>{t(n.id)},type:"button","aria-label":(0,i.__)("Dismiss","give"),"aria-controls":`givewp-sale-banner-${n.id}`,className:"givewp-reports-widget-banner__dismiss"},(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15px",height:"14px",viewBox:"0 0 20 19",fill:"none"},(0,e.createElement)("line",{x1:"1.35355",y1:"0.646447",x2:"19.3535",y2:"18.6464",stroke:"#F9FAF9"}),(0,e.createElement)("line",{y1:"-0.5",x2:"25.4558",y2:"-0.5",transform:"matrix(0.707107 -0.707106 0.707107 0.707106 1 19)",stroke:"#F9FAF9"}))))}function sn(){const[{assetsUrl:t}]=l();return(0,e.createElement)("div",{className:"givewp-reports-widget-overlay"},(0,e.createElement)("div",{className:"givewp-reports-widget-overlay-content"},(0,e.createElement)("h3",{className:"givewp-reports-widget-overlay-content-title"},(0,i.__)("Get a quick view of your donation activity","give")),(0,e.createElement)("p",null,(0,i.__)("You don't have any donations yet","give")),(0,e.createElement)("p",null,(0,i.__)("Boost your fundraising by over 30% with our improved recurring add-on and start collecting donations effortlessly on your website.","give")),(0,e.createElement)("a",{href:" https://docs.givewp.com/recurring-dash",target:"_blank"},(0,e.createElement)("img",{src:`${t}/images/admin/white-external-icon.svg`,alt:"external link"}),(0,i.__)("Get more donations","give"))))}const ln={period:{startDate:r()().subtract(7,"days"),endDate:r()(),range:"week"},pageLoaded:!1,giveStatus:null,currency:Pe("currency"),testMode:Pe("testMode"),assetsUrl:Pe("assetsUrl")},dn=document.getElementById("givewp-reports-widget");dn&&(0,o.H)(dn).render((0,e.createElement)((({reducer:t,initialState:n,children:o})=>(0,e.createElement)(s.Provider,{value:(0,e.useReducer)(t,n)},o)),{initialState:ln,reducer:(t,e)=>{switch(e.type){case"SET_DATES":return{...t,period:{startDate:r()(e.payload.startDate).hour(0),endDate:r()(e.payload.endDate).hour(23),range:"custom"}};case"SET_RANGE":let n,o=t.period.endDate;switch(e.payload.range){case"day":o=r()(t.period.endDate),n=r()(o).subtract(1,"days");break;case"week":n=r()(t.period.endDate).subtract(7,"days");break;case"month":n=r()(t.period.endDate).subtract(1,"months");break;case"year":n=r()(t.period.endDate).subtract(1,"years");break;case"alltime":const e=Pe("allTimeStart");n=r()(e),o=r()()}return{...t,period:{...t.period,startDate:n,endDate:o,range:e.payload.range}};case"SET_GIVE_STATUS":return{...t,giveStatus:e.payload};case"SET_PAGE_LOADED":return{...t,pageLoaded:e.payload};case"TOGGLE_SETTINGS_PANEL":return{...t,settingsPanelToggled:!t.settingsPanelToggled};case"SET_CURRENCY":return{...t,currency:e.payload};case"TOGGLE_TEST_MODE":return{...t,testMode:!t.testMode};default:return t}}},(0,e.createElement)((()=>{const[{giveStatus:t,pageLoaded:n,widgetBanner:o}]=l(),{hideWidgetBanner:a,isVisible:r}=(()=>{const t=an(),[n,o]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{o(!!t?.banner)}),[t?.banner]),{isVisible:n,hideWidgetBanner:async e=>{const n=new FormData;n.append("id",e);try{await fetch(`${t.apiRoot}/hide`,{method:"POST",headers:{"X-WP-Nonce":t.apiNonce},body:n}),o(!1)}catch(t){console.error("Error hiding banner:",t)}}}})();return(0,e.createElement)("div",{className:"givewp-reports-widget-container"},r&&(0,e.createElement)(rn,{hideWidgetBanner:a}),"no_donations_found"===t&&(0,e.createElement)(sn,null),!1===n&&(0,e.createElement)(nn,null),(0,e.createElement)(h,{gap:"12px",visible:n},(0,e.createElement)(p,{width:12},(0,e.createElement)(Ge,{title:(0,i.__)("Overview","give"),headerElements:(0,e.createElement)(on,null),type:"line",aspectRatio:.8,endpoint:"income",showLegend:!1})),(0,e.createElement)(p,{width:6},(0,e.createElement)(en,{title:(0,i.__)("Total Revenue","give"),endpoint:"total-income"})),(0,e.createElement)(p,{width:6},(0,e.createElement)(en,{title:(0,i.__)("Avg. Donation","give"),endpoint:"average-donation"})),(0,e.createElement)(p,{width:6},(0,e.createElement)(en,{title:(0,i.__)("Total Donors","give"),endpoint:"total-donors"})),(0,e.createElement)(p,{width:6},(0,e.createElement)(en,{title:(0,i.__)("Total Refunds","give"),endpoint:"total-refunds"}))))}),null)))})()})();