Chart.js/dist/Chart.bundle.min.js

15 lines
182 KiB
JavaScript
Raw Normal View History

/*!
* Chart.js
* http://chartjs.org/
2016-06-15 01:32:24 +02:00
* Version: 2.1.6
*
* Copyright 2016 Nick Downie
* Released under the MIT license
* https://github.com/chartjs/Chart.js/blob/master/LICENSE.md
*/
2016-06-15 01:32:24 +02:00
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Chart=t()}}(function(){var t;return function e(t,n,i){function a(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){var n=t[o][1][e];return a(n?n:e)},d,d.exports,e,t,n,i)}return n[o].exports}for(var r="function"==typeof require&&require,o=0;o<i.length;o++)a(i[o]);return a}({1:[function(t,e,n){function i(t){if(t){var e=/^#([a-fA-F0-9]{3})$/,n=/^#([a-fA-F0-9]{6})$/,i=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,a=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,r=/(\w+)/,o=[0,0,0],s=1,l=t.match(e);if(l){l=l[1];for(var u=0;u<o.length;u++)o[u]=parseInt(l[u]+l[u],16)}else if(l=t.match(n)){l=l[1];for(var u=0;u<o.length;u++)o[u]=parseInt(l.slice(2*u,2*u+2),16)}else if(l=t.match(i)){for(var u=0;u<o.length;u++)o[u]=parseInt(l[u+1]);s=parseFloat(l[4])}else if(l=t.match(a)){for(var u=0;u<o.length;u++)o[u]=Math.round(2.55*parseFloat(l[u+1]));s=parseFloat(l[4])}else if(l=t.match(r)){if("transparent"==l[1])return[0,0,0,0];if(o=x[l[1]],!o)return}for(var u=0;u<o.length;u++)o[u]=b(o[u],0,255);return s=s||0==s?b(s,0,1):1,o[3]=s,o}}function a(t){if(t){var e=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var i=parseFloat(n[4]),a=b(parseInt(n[1]),0,360),r=b(parseFloat(n[2]),0,100),o=b(parseFloat(n[3]),0,100),s=b(isNaN(i)?1:i,0,1);return[a,r,o,s]}}}function r(t){if(t){var e=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,n=t.match(e);if(n){var i=parseFloat(n[4]),a=b(parseInt(n[1]),0,360),r=b(parseFloat(n[2]),0,100),o=b(parseFloat(n[3]),0,100),s=b(isNaN(i)?1:i,0,1);return[a,r,o,s]}}}function o(t){var e=i(t);return e&&e.slice(0,3)}function s(t){var e=a(t);return e&&e.slice(0,3)}function l(t){var e=i(t);return e?e[3]:(e=a(t))?e[3]:(e=r(t))?e[3]:void 0}function u(t){return"#"+y(t[0])+y(t[1])+y(t[2])}function d(t,e){return 1>e||t[3]&&t[3]<1?c(t,e):"rgb("+t[0]+", "+t[1]+", "+t[2]+")"}function c(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function h(t,e){if(1>e||t[3]&&t[3]<1)return f(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"}function f(t,e){var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgba("+n+"%, "+i+"%, "+a+"%, "+(e||t[3]||1)+")"}function g(t,e){return 1>e||t[3]&&t[3]<1?p(t,e):"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"}function p(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){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"}function v(t){return k[t.slice(0,3)]}function b(t,e,n){return Math.min(Math.max(e,t),n)}function y(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var x=t(5);e.exports={getRgba:i,getHsla:a,getRgb:o,getHsl:s,getHwb:r,getAlpha:l,hexString:u,rgbString:d,rgbaString:c,percentString:h,percentaString:f,hslString:g,hslaString:p,hwbString:m,keyword:v};var k={};for(var _ in x)k[x[_]]=_},{5:5}],2:[function(t,e,n){var i=t(4),a=t(1),r=function(t){if(t instanceof r)return t;if(!(this instanceof r))return new r(t);this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1};var e;if("string"==typeof t)if(e=a.getRgba(t))this.setValues("rgb",e);else if(e=a.getHsla(t))this.setValues("hsl",e);else{if(!(e=a.getHwb(t)))throw new Error('Unable to parse color from string "'+t+'"');this.setValues("hwb",e)}else if("object"
t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function ut(e){return null!=e?(lt(this,e),t.updateOffset(this,!0),this):H(this,"Month")}function dt(){return it(this.year(),this.month())}function ct(t){return this._monthsParseExact?(s(this,"_monthsRegex")||ft.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex}function ht(t){return this._monthsParseExact?(s(this,"_monthsRegex")||ft.call(this),t?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex}function ft(){function t(t,e){return e.length-t.length}var e,n,i=[],a=[],r=[];for(e=0;12>e;e++)n=u([2e3,e]),i.push(this.monthsShort(n,"")),a.push(this.months(n,"")),r.push(this.months(n,"")),r.push(this.monthsShort(n,""));for(i.sort(t),a.sort(t),r.sort(t),e=0;12>e;e++)i[e]=K(i[e]),a[e]=K(a[e]),r[e]=K(r[e]);this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function gt(t){var e,n=t._a;return n&&-2===c(t).overflow&&(e=n[Ni]<0||n[Ni]>11?Ni:n[Ei]<1||n[Ei]>it(n[Hi],n[Ni])?Ei:n[Ui]<0||n[Ui]>24||24===n[Ui]&&(0!==n[ji]||0!==n[Gi]||0!==n[qi])?Ui:n[ji]<0||n[ji]>59?ji:n[Gi]<0||n[Gi]>59?Gi:n[qi]<0||n[qi]>999?qi:-1,c(t)._overflowDayOfYear&&(Hi>e||e>Ei)&&(e=Ei),c(t)._overflowWeeks&&-1===e&&(e=Zi),c(t)._overflowWeekday&&-1===e&&(e=Ji),c(t).overflow=e),t}function pt(t){var e,n,i,a,r,o,s=t._i,l=ea.exec(s)||na.exec(s);if(l){for(c(t).iso=!0,e=0,n=aa.length;n>e;e++)if(aa[e][1].exec(l[1])){a=aa[e][0],i=aa[e][2]!==!1;break}if(null==a)return void(t._isValid=!1);if(l[3]){for(e=0,n=ra.length;n>e;e++)if(ra[e][1].exec(l[3])){r=(l[2]||" ")+ra[e][0];break}if(null==r)return void(t._isValid=!1)}if(!i&&null!=r)return void(t._isValid=!1);if(l[4]){if(!ia.exec(l[4]))return void(t._isValid=!1);o="Z"}t._f=a+(r||"")+(o||""),Ft(t)}else t._isValid=!1}function mt(e){var n=oa.exec(e._i);return null!==n?void(e._d=new Date(+n[1])):(pt(e),void(e._isValid===!1&&(delete e._isValid,t.createFromInputFallback(e))))}function vt(t,e,n,i,a,r,o){var s=new Date(t,e,n,i,a,r,o);return 100>t&&t>=0&&isFinite(s.getFullYear())&&s.setFullYear(t),s}function bt(t){var e=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t),e}function yt(t){return xt(t)?366:365}function xt(t){return t%4===0&&t%100!==0||t%400===0}function kt(){return xt(this.year())}function _t(t,e,n){var i=7+e-n,a=(7+bt(t,0,i).getUTCDay()-e)%7;return-a+i-1}function wt(t,e,n,i,a){var r,o,s=(7+n-i)%7,l=_t(t,i,a),u=1+7*(e-1)+s+l;return 0>=u?(r=t-1,o=yt(r)+u):u>yt(t)?(r=t+1,o=u-yt(t)):(r=t,o=u),{year:r,dayOfYear:o}}function St(t,e,n){var i,a,r=_t(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return 1>o?(a=t.year()-1,i=o+Mt(a,e,n)):o>Mt(t.year(),e,n)?(i=o-Mt(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Mt(t,e,n){var i=_t(t,e,n),a=_t(t+1,e,n);return(yt(t)-i+a)/7}function Dt(t,e,n){return null!=t?t:null!=e?e:n}function Ct(e){var n=new Date(t.now());return e._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function Tt(t){var e,n,i,a,r=[];if(!t._d){for(i=Ct(t),t._w&&null==t._a[Ei]&&null==t._a[Ni]&&Pt(t),t._dayOfYear&&(a=Dt(t._a[Hi],i[Hi]),t._dayOfYear>yt(a)&&(c(t)._overflowDayOfYear=!0),n=bt(a,0,t._dayOfYear),t._a[Ni]=n.getUTCMonth(),t._a[Ei]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=r[e]=i[e];for(;7>e;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ui]&&0===t._a[ji]&&0===t._a[Gi]&&0===t._a[qi]&&(t._nextDay=!0,t._a[Ui]=0),t._d=(t._useUTC?bt:vt).apply(null,r),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ui]=24)}}function Pt(t){var e,n,i,a,r,o,s,l;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(r=1,o=4,n=Dt(e.GG,t._a[Hi],St(Yt(),1,4).year),i=Dt(e.W,1),a=Dt(e.E,1),(1>a||a>7)&&(l=!0)):(r=t._locale._week.dow,o=t._locale._week.doy,n=Dt(e.gg,t._a[Hi],St(Yt(),r,o).year),i=Dt(e.w,1),nu
c(n).bigHour=!0}),tt("hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[Ui]=y(t.substr(0,i)),e[ji]=y(t.substr(i,2)),e[Gi]=y(t.substr(a)),c(n).bigHour=!0}),tt("Hmm",function(t,e,n){var i=t.length-2;e[Ui]=y(t.substr(0,i)),e[ji]=y(t.substr(i))}),tt("Hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[Ui]=y(t.substr(0,i)),e[ji]=y(t.substr(i,2)),e[Gi]=y(t.substr(a))});var Ma=/[ap]\.?m?\.?/i,Da=z("Hours",!0);j("m",["mm",2],0,"minute"),L("minute","m"),X("m",Ci),X("mm",Ci,wi),tt(["m","mm"],ji);var Ca=z("Minutes",!1);j("s",["ss",2],0,"second"),L("second","s"),X("s",Ci),X("ss",Ci,wi),tt(["s","ss"],Gi);var Ta=z("Seconds",!1);j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),L("millisecond","ms"),X("S",Fi,_i),X("SS",Fi,wi),X("SSS",Fi,Si);var Pa;for(Pa="SSSS";Pa.length<=9;Pa+="S")X(Pa,Oi);for(Pa="S";Pa.length<=9;Pa+="S")tt(Pa,wn);var Fa=z("Milliseconds",!1);j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName");var Aa=m.prototype;Aa.add=ga,Aa.calendar=he,Aa.clone=fe,Aa.diff=xe,Aa.endOf=Ie,Aa.format=Se,Aa.from=Me,Aa.fromNow=De,Aa.to=Ce,Aa.toNow=Te,Aa.get=E,Aa.invalidAt=He,Aa.isAfter=ge,Aa.isBefore=pe,Aa.isBetween=me,Aa.isSame=ve,Aa.isSameOrAfter=be,Aa.isSameOrBefore=ye,Aa.isValid=Be,Aa.lang=ma,Aa.locale=Pe,Aa.localeData=Fe,Aa.max=ua,Aa.min=la,Aa.parsingFlags=ze,Aa.set=E,Aa.startOf=Ae,Aa.subtract=pa,Aa.toArray=Ve,Aa.toObject=Le,Aa.toDate=We,Aa.toISOString=we,Aa.toJSON=Ye,Aa.toString=_e,Aa.unix=Re,Aa.valueOf=Oe,Aa.creationData=Ne,Aa.year=sa,Aa.isLeapYear=kt,Aa.weekYear=Ue,Aa.isoWeekYear=je,Aa.quarter=Aa.quarters=Xe,Aa.month=ut,Aa.daysInMonth=dt,Aa.week=Aa.weeks=tn,Aa.isoWeek=Aa.isoWeeks=en,Aa.weeksInYear=qe,Aa.isoWeeksInYear=Ge,Aa.date=ba,Aa.day=Aa.days=un,Aa.weekday=dn,Aa.isoWeekday=cn,Aa.dayOfYear=mn,Aa.hour=Aa.hours=Da,Aa.minute=Aa.minutes=Ca,Aa.second=Aa.seconds=Ta,Aa.millisecond=Aa.milliseconds=Fa,Aa.utcOffset=Zt,Aa.utc=Xt,Aa.local=Qt,Aa.parseZone=$t,Aa.hasAlignedHourOffset=Kt,Aa.isDST=te,Aa.isDSTShifted=ee,Aa.isLocal=ne,Aa.isUtcOffset=ie,Aa.isUtc=ae,Aa.isUTC=ae,Aa.zoneAbbr=Sn,Aa.zoneName=Mn,Aa.dates=_("dates accessor is deprecated. Use date instead.",ba),Aa.months=_("months accessor is deprecated. Use month instead",ut),Aa.years=_("years accessor is deprecated. Use year instead",sa),Aa.zone=_("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Jt);var Ia=Aa,Oa={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Ra={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Wa="Invalid date",Va="%d",La=/\d{1,2}/,Ya={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},Ba=T.prototype;Ba._calendar=Oa,Ba.calendar=Tn,Ba._longDateFormat=Ra,Ba.longDateFormat=Pn,Ba._invalidDate=Wa,Ba.invalidDate=Fn,Ba._ordinal=Va,Ba.ordinal=An,Ba._ordinalParse=La,Ba.preparse=In,Ba.postformat=In,Ba._relativeTime=Ya,Ba.relativeTime=On,Ba.pastFuture=Rn,Ba.set=D,Ba.months=at,Ba._months=Qi,Ba.monthsShort=rt,Ba._monthsShort=$i,Ba.monthsParse=st,Ba._monthsRegex=ta,Ba.monthsRegex=ht,Ba._monthsShortRegex=Ki,Ba.monthsShortRegex=ct,Ba.week=Qe,Ba._week=va,Ba.firstDayOfYear=Ke,Ba.firstDayOfWeek=$e,Ba.weekdays=an,Ba._weekdays=ya,Ba.weekdaysMin=on,Ba._weekdaysMin=ka,Ba.weekdaysShort=rn,Ba._weekdaysShort=xa,Ba.weekdaysParse=ln,Ba._weekdaysRegex=_a,Ba.weekdaysRegex=hn,Ba._weekdaysShortRegex=wa,Ba.weekdaysShortRegex=fn,Ba._weekdaysMinRegex=Sa,Ba.weekdaysMinRegex=gn,Ba.isPM=kn,Ba
_model:{tension:o.tension?o.tension:e.getValueOrDefault(s.lineTension,l.tension),backgroundColor:o.backgroundColor?o.backgroundColor:s.backgroundColor||l.backgroundColor,borderWidth:o.borderWidth?o.borderWidth:s.borderWidth||l.borderWidth,borderColor:o.borderColor?o.borderColor:s.borderColor||l.borderColor,fill:o.fill?o.fill:void 0!==s.fill?s.fill:l.fill,borderCapStyle:o.borderCapStyle?o.borderCapStyle:s.borderCapStyle||l.borderCapStyle,borderDash:o.borderDash?o.borderDash:s.borderDash||l.borderDash,borderDashOffset:o.borderDashOffset?o.borderDashOffset:s.borderDashOffset||l.borderDashOffset,borderJoinStyle:o.borderJoinStyle?o.borderJoinStyle:s.borderJoinStyle||l.borderJoinStyle,scaleTop:u.top,scaleBottom:u.bottom,scaleZero:u.getBasePosition()}}),i.dataset.pivot(),e.each(r,function(e,i){n.updateElement(e,i,t)},n),n.updateBezierControlPoints()},updateElement:function(t,n,i){var a=this,r=t.custom||{},o=a.getDataset(),s=a.chart.scale,l=a.chart.options.elements.point,u=s.getPointPositionForValue(n,o.data[n]);e.extend(t,{_datasetIndex:a.index,_index:n,_scale:s,_model:{x:i?s.xCenter:u.x,y:i?s.yCenter:u.y,tension:r.tension?r.tension:e.getValueOrDefault(o.tension,a.chart.options.elements.line.tension),radius:r.radius?r.radius:e.getValueAtIndexOrDefault(o.pointRadius,n,l.radius),backgroundColor:r.backgroundColor?r.backgroundColor:e.getValueAtIndexOrDefault(o.pointBackgroundColor,n,l.backgroundColor),borderColor:r.borderColor?r.borderColor:e.getValueAtIndexOrDefault(o.pointBorderColor,n,l.borderColor),borderWidth:r.borderWidth?r.borderWidth:e.getValueAtIndexOrDefault(o.pointBorderWidth,n,l.borderWidth),pointStyle:r.pointStyle?r.pointStyle:e.getValueAtIndexOrDefault(o.pointStyle,n,l.pointStyle),hitRadius:r.hitRadius?r.hitRadius:e.getValueAtIndexOrDefault(o.hitRadius,n,l.hitRadius)}}),t._model.skip=r.skip?r.skip:isNaN(t._model.x)||isNaN(t._model.y)},updateBezierControlPoints:function(){var t=this.chart.chartArea,n=this.getMeta();e.each(n.data,function(i,a){var r=i._model,o=e.splineCurve(e.previousItem(n.data,a,!0)._model,r,e.nextItem(n.data,a,!0)._model,r.tension);r.controlPointPreviousX=Math.max(Math.min(o.previous.x,t.right),t.left),r.controlPointPreviousY=Math.max(Math.min(o.previous.y,t.bottom),t.top),r.controlPointNextX=Math.max(Math.min(o.next.x,t.right),t.left),r.controlPointNextY=Math.max(Math.min(o.next.y,t.bottom),t.top),i.pivot()})},draw:function(t){var n=this.getMeta(),i=t||1;e.each(n.data,function(t,e){t.transition(i)}),n.dataset.transition(i).draw(),e.each(n.data,function(t){t.draw()})},setHoverStyle:function(t){var n=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},a=t._index,r=t._model;r.radius=i.hoverRadius?i.hoverRadius:e.getValueAtIndexOrDefault(n.pointHoverRadius,a,this.chart.options.elements.point.hoverRadius),r.backgroundColor=i.hoverBackgroundColor?i.hoverBackgroundColor:e.getValueAtIndexOrDefault(n.pointHoverBackgroundColor,a,e.getHoverColor(r.backgroundColor)),r.borderColor=i.hoverBorderColor?i.hoverBorderColor:e.getValueAtIndexOrDefault(n.pointHoverBorderColor,a,e.getHoverColor(r.borderColor)),r.borderWidth=i.hoverBorderWidth?i.hoverBorderWidth:e.getValueAtIndexOrDefault(n.pointHoverBorderWidth,a,r.borderWidth)},removeHoverStyle:function(t){var n=this.chart.data.datasets[t._datasetIndex],i=t.custom||{},a=t._index,r=t._model,o=this.chart.options.elements.point;r.radius=i.radius?i.radius:e.getValueAtIndexOrDefault(n.radius,a,o.radius),r.backgroundColor=i.backgroundColor?i.backgroundColor:e.getValueAtIndexOrDefault(n.pointBackgroundColor,a,o.backgroundColor),r.borderColor=i.borderColor?i.borderColor:e.getValueAtIndexOrDefault(n.pointBorderColor,a,o.borderColor),r.borderWidth=i.borderWidth?i.borderWidth:e.getValueAtIndexOrDefault(n.pointBorderWidth,a,o.borderWidth)}})}},{}],21:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers;t.defaults.global.animation={duration:1e3,easing:"easeOutQuart",onProgress:e.noop,onComplete:e.noop},t.Animation=t.Element.extend({currentStep:null,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),t.animationService={frameDura
t.boxes&&t.boxes.splice(t.boxes.indexOf(e),1)},update:function(t,n,i){function a(t){var e,n=t.isHorizontal();n?(e=t.update(t.options.fullWidth?p:k,x),_-=e.height):(e=t.update(y,b),k-=e.width),w.push({horizontal:n,minSize:e,box:t})}function r(t){var n=e.findNextWhere(w,function(e){return e.box===t});if(n)if(t.isHorizontal()){var i={left:S,right:M,top:0,bottom:0};t.update(t.options.fullWidth?p:k,m/2,i)}else t.update(n.minSize.width,_)}function o(t){var n=e.findNextWhere(w,function(e){return e.box===t}),i={left:0,right:0,top:D,bottom:C};n&&t.update(n.minSize.width,_,i)}function s(t){t.isHorizontal()?(t.left=t.options.fullWidth?l:S,t.right=t.options.fullWidth?n-l:S+k,t.top=A,t.bottom=A+t.height,A=t.bottom):(t.left=F,t.right=F+t.width,t.top=D,t.bottom=D+_,F=t.right)}if(t){var l=0,u=0,d=e.where(t.boxes,function(t){return"left"===t.options.position}),c=e.where(t.boxes,function(t){return"right"===t.options.position}),h=e.where(t.boxes,function(t){return"top"===t.options.position}),f=e.where(t.boxes,function(t){return"bottom"===t.options.position}),g=e.where(t.boxes,function(t){return"chartArea"===t.options.position});h.sort(function(t,e){return(e.options.fullWidth?1:0)-(t.options.fullWidth?1:0)}),f.sort(function(t,e){return(t.options.fullWidth?1:0)-(e.options.fullWidth?1:0)});var p=n-2*l,m=i-2*u,v=p/2,b=m/2,y=(n-v)/(d.length+c.length),x=(i-b)/(h.length+f.length),k=p,_=m,w=[];e.each(d.concat(c,h,f),a);var S=l,M=l,D=u,C=u;e.each(d.concat(c),r),e.each(d,function(t){S+=t.width}),e.each(c,function(t){M+=t.width}),e.each(h.concat(f),r),e.each(h,function(t){D+=t.height}),e.each(f,function(t){C+=t.height}),e.each(d.concat(c),o),S=l,M=l,D=u,C=u,e.each(d,function(t){S+=t.width}),e.each(c,function(t){M+=t.width}),e.each(h,function(t){D+=t.height}),e.each(f,function(t){C+=t.height});var T=i-D-C,P=n-S-M;(P!==k||T!==_)&&(e.each(d,function(t){t.height=T}),e.each(c,function(t){t.height=T}),e.each(h,function(t){t.options.fullWidth||(t.width=P)}),e.each(f,function(t){t.options.fullWidth||(t.width=P)}),_=T,k=P);var F=l,A=u;e.each(d.concat(h),s),F+=k,A+=_,e.each(c,s),e.each(f,s),t.chartArea={left:S,top:D,right:S+k,bottom:D+_},e.each(g,function(e){e.left=t.chartArea.left,e.top=t.chartArea.top,e.right=t.chartArea.right,e.bottom=t.chartArea.bottom,e.update(k,_)})}}}}},{}],28:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers,n=e.noop;t.defaults.global.legend={display:!0,position:"top",fullWidth:!0,reverse:!1,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},labels:{boxWidth:40,padding:10,generateLabels:function(t){var n=t.data;return e.isArray(n.datasets)?n.datasets.map(function(n,i){return{text:n.label,fillStyle:e.isArray(n.backgroundColor)?n.backgroundColor[0]:n.backgroundColor,hidden:!t.isDatasetVisible(i),lineCap:n.borderCapStyle,lineDash:n.borderDash,lineDashOffset:n.borderDashOffset,lineJoin:n.borderJoinStyle,lineWidth:n.borderWidth,strokeStyle:n.borderColor,datasetIndex:i}},this):[]}}},t.Legend=t.Element.extend({initialize:function(t){e.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:n,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:n,beforeSetDimensions:n,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:n,beforeBuildLabels:n,buildLabels:function(){var t=this;t.legendItems=t.options.labels.generateLabels.call(t,t.chart),t.options.reverse&&t.legendItems.reverse()},afterBuildLabels:n,beforeFit:n,fit:function(){var n=this,i=n.options,a=i.labels,r=i.display,o=n.ctx,s=t.defaults.global,l=e.getValueOrDefault,u=l(a.fontSize,s.defaultFontSize),d=l(a.fontStyle,s.d
r.save(),i._children.length>0&&a.fill&&(r.beginPath(),e.each(i._children,function(t,n){var o=e.previousItem(i._children,n),s=e.nextItem(i._children,n);0===n?(i._loop?r.moveTo(a.scaleZero.x,a.scaleZero.y):r.moveTo(t._view.x,a.scaleZero),t._view.skip?i._loop||r.moveTo(s._view.x,i._view.scaleZero):r.lineTo(t._view.x,t._view.y)):i.lineToNextPoint(o,t,s,function(t,e,n){i._loop?r.lineTo(i._view.scaleZero.x,i._view.scaleZero.y):(r.lineTo(t._view.x,i._view.scaleZero),r.moveTo(n._view.x,i._view.scaleZero))},function(t,e){r.lineTo(e._view.x,e._view.y)})},i),i._loop?t(!0):(r.lineTo(i._children[i._children.length-1]._view.x,a.scaleZero),r.lineTo(i._children[0]._view.x,a.scaleZero)),r.fillStyle=a.backgroundColor||n.defaultColor,r.closePath(),r.fill());var l=n.elements.line;r.lineCap=a.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||l.borderDash),r.lineDashOffset=a.borderDashOffset||l.borderDashOffset,r.lineJoin=a.borderJoinStyle||l.borderJoinStyle,r.lineWidth=a.borderWidth||l.borderWidth,r.strokeStyle=a.borderColor||n.defaultColor,r.beginPath(),e.each(i._children,function(t,n){var a=e.previousItem(i._children,n),o=e.nextItem(i._children,n);0===n?r.moveTo(t._view.x,t._view.y):i.lineToNextPoint(a,t,o,function(t,e,n){r.moveTo(n._view.x,n._view.y)},function(t,e){r.moveTo(e._view.x,e._view.y)})},i),i._loop&&i._children.length>0&&t(),r.stroke(),r.restore()}})}},{}],36:[function(t,e,n){"use strict";e.exports=function(t){var e=t.helpers,n=t.defaults.global,i=n.defaultColor;n.elements.point={radius:3,pointStyle:"circle",backgroundColor:i,borderWidth:1,borderColor:i,hitRadius:1,hoverRadius:4,hoverBorderWidth:1},t.elements.Point=t.Element.extend({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):!1},inLabelRange:function(t){var e=this._view;return e?Math.pow(t-e.x,2)<Math.pow(e.radius+e.hitRadius,2):!1},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(){var t,a,r,o,s,l,u=this._view,d=this._chart.ctx,c=u.pointStyle,h=u.radius,f=u.x,g=u.y;if(!u.skip){if("object"==typeof c&&(t=c.toString(),"[object HTMLImageElement]"===t||"[object HTMLCanvasElement]"===t))return void d.drawImage(c,f-c.width/2,g-c.height/2);if(!(isNaN(h)||0>=h)){switch(d.strokeStyle=u.borderColor||i,d.lineWidth=e.getValueOrDefault(u.borderWidth,n.elements.point.borderWidth),d.fillStyle=u.backgroundColor||i,c){default:d.beginPath(),d.arc(f,g,h,0,2*Math.PI),d.closePath(),d.fill();break;case"triangle":d.beginPath(),a=3*h/Math.sqrt(3),s=a*Math.sqrt(3)/2,d.moveTo(f-a/2,g+s/3),d.lineTo(f+a/2,g+s/3),d.lineTo(f,g-2*s/3),d.closePath(),d.fill();break;case"rect":l=1/Math.SQRT2*h,d.fillRect(f-l,g-l,2*l,2*l),d.strokeRect(f-l,g-l,2*l,2*l);break;case"rectRot":l=1/Math.SQRT2*h,d.beginPath(),d.moveTo(f-l,g),d.lineTo(f,g+l),d.lineTo(f+l,g),d.lineTo(f,g-l),d.closePath(),d.fill();break;case"cross":d.beginPath(),d.moveTo(f,g+h),d.lineTo(f,g-h),d.moveTo(f-h,g),d.lineTo(f+h,g),d.closePath();break;case"crossRot":d.beginPath(),r=Math.cos(Math.PI/4)*h,o=Math.sin(Math.PI/4)*h,d.moveTo(f-r,g-o),d.lineTo(f+r,g+o),d.moveTo(f-r,g+o),d.lineTo(f+r,g-o),d.closePath();break;case"star":d.beginPath(),d.moveTo(f,g+h),d.lineTo(f,g-h),d.moveTo(f-h,g),d.lineTo(f+h,g),r=Math.cos(Math.PI/4)*h,o=Math.sin(Math.PI/4)*h,d.moveTo(f-r,g-o),d.lineTo(f+r,g+o),d.moveTo(f-r,g+o),d.lineTo(f+r,g-o),d.closePath();break;case"line":d.beginPath(),d.moveTo(f-h,g),d.lineTo(f+h,g),d.closePath();break;case"dash":d.beginPath(),d.moveTo(f,g),d.lineTo(f+h,g),d.closePath()}d.stroke()}}}})}},{}],37:[function(t,e,n){"use strict";e.exports=function(t){var e=(t.helpers,t.defaults.global);e.elements.rectangle={backgroundColor:e.defaultColor,borderWidth:0,borderColor:e.defaultColor,borderSkipped:"bottom"},t.elements.Rectangle=t.Element.extend({draw:function(){function t(t){return l[(d+t)%4]}var e=this._chart.ctx,n=this._view,i=n.width/2,a=n.x-i,r=n.x+i,o=n.base-(n.base-n.y),s=n.borderWidth/2;n.borderWidth&&(a+=s,r-=s,o+=s),e.beginPath(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lin