mivita/resources/assets/vendor/libs/flot/flot.js
2018-10-29 09:39:31 +01:00

1 line
No EOL
52 KiB
JavaScript
Executable file

!function(e,t){var i=function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=278)}({273:function(e,t){!function(e){var t={tooltip:{show:!1,cssClass:"flotTip",content:"%s | X: %x | Y: %y",xDateFormat:null,yDateFormat:null,monthNames:null,dayNames:null,shifts:{x:10,y:20},defaultTheme:!0,snap:!0,lines:!1,clickTips:!1,onHover:function(e,t){},$compat:!1}};t.tooltipOpts=t.tooltip;var i=function(e){this.tipPosition={x:0,y:0},this.init(e)};i.prototype.init=function(t){var i=this,o=e.plot.plugins.length;if(this.plotPlugins=[],o)for(var n=0;n<o;n++)this.plotPlugins.push(e.plot.plugins[n].name);function r(e){var i={};i.x=e.pageX,i.y=e.pageY,t.setTooltipPosition(i)}function a(o,n,r){i.clickmode?(e(t.getPlaceholder()).bind("plothover",s),t.hideTooltip(),i.clickmode=!1):(s(o,n,r),i.getDomElement().is(":visible")&&(e(t.getPlaceholder()).unbind("plothover",s),i.clickmode=!0))}function s(o,n,r){var a=function(e,t,i,o){return Math.sqrt((i-e)*(i-e)+(o-t)*(o-t))};if(r)t.showTooltip(r,i.tooltipOptions.snap?r:n);else if(i.plotOptions.series.lines.show&&!0===i.tooltipOptions.lines){var s=i.plotOptions.grid.mouseActiveRadius,l={distance:s+1},c=n;e.each(t.getData(),function(e,o){for(var r=0,s=-1,p=1;p<o.data.length;p++)o.data[p-1][0]<=n.x&&o.data[p][0]>=n.x&&(r=p-1,s=p);if(-1!==s){var h={x:o.data[r][0],y:o.data[r][1]},u={x:o.data[s][0],y:o.data[s][1]},d=function(e,t,i,o,n,r,s){if(!s||(s=function(e,t,i,o,n,r){if(void 0!==i)return{x:i,y:t};if(void 0!==o)return{x:e,y:o};var a,s=-1/((r-o)/(n-i));return{x:a=(n*(e*s-t+o)+i*(e*-s+t-r))/(s*(n-i)+o-r),y:s*a-s*e+t}}(e,t,i,o,n,r)).x>=Math.min(i,n)&&s.x<=Math.max(i,n)&&s.y>=Math.min(o,r)&&s.y<=Math.max(o,r)){var l=o-r,c=n-i,p=i*r-o*n;return Math.abs(l*e+c*t+p)/Math.sqrt(l*l+c*c)}var h=a(e,t,i,o),u=a(e,t,n,r);return h>u?u:h}(o.xaxis.p2c(n.x),o.yaxis.p2c(n.y),o.xaxis.p2c(h.x),o.yaxis.p2c(h.y),o.xaxis.p2c(u.x),o.yaxis.p2c(u.y),!1);if(d<l.distance){var f=a(h.x,h.y,n.x,n.y)<a(n.x,n.y,u.x,u.y)?r:s,g=(o.datapoints.pointsize,[n.x,h.y+(u.y-h.y)*((n.x-h.x)/(u.x-h.x))]),m={datapoint:g,dataIndex:f,series:o,seriesIndex:e};l={distance:d,item:m},i.tooltipOptions.snap&&(c={pageX:o.xaxis.p2c(g[0]),pageY:o.yaxis.p2c(g[1])})}}else t.hideTooltip()}),l.distance<s+1?t.showTooltip(l.item,c):t.hideTooltip()}else t.hideTooltip()}t.hooks.bindEvents.push(function(t,o){i.plotOptions=t.getOptions(),"boolean"==typeof i.plotOptions.tooltip&&(i.plotOptions.tooltipOpts.show=i.plotOptions.tooltip,i.plotOptions.tooltip=i.plotOptions.tooltipOpts,delete i.plotOptions.tooltipOpts),!1!==i.plotOptions.tooltip.show&&void 0!==i.plotOptions.tooltip.show&&(i.tooltipOptions=i.plotOptions.tooltip,i.tooltipOptions.$compat?(i.wfunc="width",i.hfunc="height"):(i.wfunc="innerWidth",i.hfunc="innerHeight"),i.getDomElement(),e(t.getPlaceholder()).bind("plothover",s),i.tooltipOptions.clickTips&&e(t.getPlaceholder()).bind("plotclick",a),i.clickmode=!1,e(o).bind("mousemove",r))}),t.hooks.shutdown.push(function(t,i){e(t.getPlaceholder()).unbind("plothover",s),e(t.getPlaceholder()).unbind("plotclick",a),t.removeTooltip(),e(i).unbind("mousemove",r)}),t.setTooltipPosition=function(t){var o=i.getDomElement(),n=o.outerWidth()+i.tooltipOptions.shifts.x,r=o.outerHeight()+i.tooltipOptions.shifts.y;t.x-e(window).scrollLeft()>e(window)[i.wfunc]()-n&&(t.x-=n,t.x=Math.max(t.x,0)),t.y-e(window).scrollTop()>e(window)[i.hfunc]()-r&&(t.y-=r),isNaN(t.x)?i.tipPosition.x=i.tipPosition.xPrev:(i.tipPosition.x=t.x,i.tipPosition.xPrev=t.x),isNaN(t.y)?i.tipPosition.y=i.tipPosition.yPrev:(i.tipPosition.y=t.y,i.tipPosition.yPrev=t.y)},t.showTooltip=function(e,o,n){var r=i.getDomElement(),a=i.stringFormat(i.tooltipOptions.content,e);""!==a&&(r.html(a),t.setTooltipPosition({x:i.tipPosition.x,y:i.tipPosition.y}),r.css({left:i.tipPosition.x+i.tooltipOptions.shifts.x,top:i.tipPosition.y+i.tooltipOptions.shifts.y}).show(),"function"==typeof i.tooltipOptions.onHover&&i.tooltipOptions.onHover(e,r))},t.hideTooltip=function(){i.getDomElement().hide().html("")},t.removeTooltip=function(){i.getDomElement().remove()}},i.prototype.getDomElement=function(){var t=e("<div>");return this.tooltipOptions&&this.tooltipOptions.cssClass&&0===(t=e("."+this.tooltipOptions.cssClass)).length&&((t=e("<div />").addClass(this.tooltipOptions.cssClass)).appendTo("body").hide().css({position:"absolute"}),this.tooltipOptions.defaultTheme&&t.css({background:"#fff","z-index":"1040",padding:"0.4em 0.6em","border-radius":"0.5em","font-size":"0.8em",border:"1px solid #111",display:"none","white-space":"nowrap"})),t},i.prototype.stringFormat=function(e,t){var i,o,n,r,a,s=/%s/,l=/%c/,c=/%lx/,p=/%ly/,h=/%x\.{0,1}(\d{0,})/,u=/%y\.{0,1}(\d{0,})/;if(void 0!==t.series.threshold?(i=t.datapoint[0],o=t.datapoint[1],n=t.datapoint[2]):void 0!==t.series.curvedLines?(i=t.datapoint[0],o=t.datapoint[1]):void 0!==t.series.lines&&t.series.lines.steps?(i=t.series.datapoints.points[2*t.dataIndex],o=t.series.datapoints.points[2*t.dataIndex+1],n=""):(i=t.series.data[t.dataIndex][0],o=t.series.data[t.dataIndex][1],n=t.series.data[t.dataIndex][2]),null===t.series.label&&t.series.originSeries&&(t.series.label=t.series.originSeries.label),"function"==typeof e&&(e=e(t.series.label,i,o,t)),"boolean"==typeof e&&!e)return"";if(n&&(e=e.replace("%ct",n)),void 0!==t.series.percent?r=t.series.percent:void 0!==t.series.percents&&(r=t.series.percents[t.dataIndex]),"number"==typeof r&&(e=this.adjustValPrecision(/%p\.{0,1}(\d{0,})/,e,r)),t.series.hasOwnProperty("pie")&&void 0!==t.series.data[0][1]&&(a=t.series.data[0][1]),"number"==typeof a&&(e=e.replace("%n",a)),e=void 0!==t.series.label?e.replace(s,t.series.label):e.replace(s,""),e=void 0!==t.series.color?e.replace(l,t.series.color):e.replace(l,""),e=this.hasAxisLabel("xaxis",t)?e.replace(c,t.series.xaxis.options.axisLabel):e.replace(c,""),e=this.hasAxisLabel("yaxis",t)?e.replace(p,t.series.yaxis.options.axisLabel):e.replace(p,""),this.isTimeMode("xaxis",t)&&this.isXDateFormat(t)&&(e=e.replace(h,this.timestampToDate(i,this.tooltipOptions.xDateFormat,t.series.xaxis.options))),this.isTimeMode("yaxis",t)&&this.isYDateFormat(t)&&(e=e.replace(u,this.timestampToDate(o,this.tooltipOptions.yDateFormat,t.series.yaxis.options))),"number"==typeof i&&(e=this.adjustValPrecision(h,e,i)),"number"==typeof o&&(e=this.adjustValPrecision(u,e,o)),void 0!==t.series.xaxis.ticks){var d;d=this.hasRotatedXAxisTicks(t)?"rotatedTicks":"ticks";var f=t.dataIndex+t.seriesIndex;for(var g in t.series.xaxis[d])if(t.series.xaxis[d].hasOwnProperty(f)&&!this.isTimeMode("xaxis",t)){var m=this.isCategoriesMode("xaxis",t)?t.series.xaxis[d][f].label:t.series.xaxis[d][f].v;m===i&&(e=e.replace(h,t.series.xaxis[d][f].label.replace(/\$/g,"$$$$")))}}if(void 0!==t.series.yaxis.ticks)for(var x in t.series.yaxis.ticks)if(t.series.yaxis.ticks.hasOwnProperty(x)){var v=this.isCategoriesMode("yaxis",t)?t.series.yaxis.ticks[x].label:t.series.yaxis.ticks[x].v;v===o&&(e=e.replace(u,t.series.yaxis.ticks[x].label.replace(/\$/g,"$$$$")))}return void 0!==t.series.xaxis.tickFormatter&&(e=e.replace("%x",t.series.xaxis.tickFormatter(i,t.series.xaxis).replace(/\$/g,"$$"))),void 0!==t.series.yaxis.tickFormatter&&(e=e.replace("%y",t.series.yaxis.tickFormatter(o,t.series.yaxis).replace(/\$/g,"$$"))),e},i.prototype.isTimeMode=function(e,t){return void 0!==t.series[e].options.mode&&"time"===t.series[e].options.mode},i.prototype.isXDateFormat=function(e){return void 0!==this.tooltipOptions.xDateFormat&&null!==this.tooltipOptions.xDateFormat},i.prototype.isYDateFormat=function(e){return void 0!==this.tooltipOptions.yDateFormat&&null!==this.tooltipOptions.yDateFormat},i.prototype.isCategoriesMode=function(e,t){return void 0!==t.series[e].options.mode&&"categories"===t.series[e].options.mode},i.prototype.timestampToDate=function(t,i,o){var n=e.plot.dateGenerator(t,o);return e.plot.formatDate(n,i,this.tooltipOptions.monthNames,this.tooltipOptions.dayNames)},i.prototype.adjustValPrecision=function(e,t,i){var o,n=t.match(e);return null!==n&&""!==RegExp.$1&&(o=RegExp.$1,i=i.toFixed(o),t=t.replace(e,i)),t},i.prototype.hasAxisLabel=function(t,i){return-1!==e.inArray("axisLabels",this.plotPlugins)&&void 0!==i.series[t].options.axisLabel&&i.series[t].options.axisLabel.length>0},i.prototype.hasRotatedXAxisTicks=function(t){return-1!==e.inArray("tickRotor",this.plotPlugins)&&void 0!==t.series.xaxis.rotatedTicks},e.plot.plugins.push({init:function(e){new i(e)},options:t,name:"tooltip",version:"0.8.5"})}(jQuery)},274:function(e,t){var i,o,n,r,a,s,l,c,p,h,u;i=jQuery,o=window,a=i([]),s=i.resize=i.extend(i.resize,{}),l="setTimeout",p=(c="resize")+"-special-event",u="throttleWindow",s[h="delay"]=250,s[u]=!0,i.event.special[c]={setup:function(){if(!s[u]&&this[l])return!1;var e=i(this);a=a.add(e),i.data(this,p,{w:e.width(),h:e.height()}),1===a.length&&function e(){r=o[l](function(){a.each(function(){var e=i(this),t=e.width(),o=e.height(),n=i.data(this,p);t===n.w&&o===n.h||e.trigger(c,[n.w=t,n.h=o])}),e()},s[h])}()},teardown:function(){if(!s[u]&&this[l])return!1;var e=i(this);a=a.not(e),e.removeData(p),a.length||clearTimeout(r)},add:function(e){if(!s[u]&&this[l])return!1;var t;function o(e,o,r){var a=i(this),s=i.data(this,p);s.w=o!==n?o:a.width(),s.h=r!==n?r:a.height(),t.apply(this,arguments)}if(i.isFunction(e))return t=e,o;t=e.handler,e.handler=o}},function(e){e.plot.plugins.push({init:function(e){function t(){var t=e.getPlaceholder();0!=t.width()&&0!=t.height()&&(e.resize(),e.setupGrid(),e.draw())}e.hooks.bindEvents.push(function(e,i){e.getPlaceholder().resize(t)}),e.hooks.shutdown.push(function(e,i){e.getPlaceholder().unbind("resize",t)})},options:{},name:"resize",version:"1.0"})}(jQuery)},275:function(e,t){!function(e){function t(e,t,i,o){var n="categories"==t.xaxis.options.mode,r="categories"==t.yaxis.options.mode;if(n||r){var a=o.format;if(!a){var s=t;if((a=[]).push({x:!0,number:!0,required:!0}),a.push({y:!0,number:!0,required:!0}),s.bars.show||s.lines.show&&s.lines.fill){var l=!!(s.bars.show&&s.bars.zero||s.lines.show&&s.lines.zero);a.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:l}),s.bars.horizontal&&(delete a[a.length-1].y,a[a.length-1].x=!0)}o.format=a}for(var c=0;c<a.length;++c)a[c].x&&n&&(a[c].number=!1),a[c].y&&r&&(a[c].number=!1)}}function i(e){var t=[];for(var i in e.categories){var o=e.categories[i];o>=e.min&&o<=e.max&&t.push([o,i])}return t.sort(function(e,t){return e[0]-t[0]}),t}function o(t,o,n){if("categories"==t[o].options.mode){if(!t[o].categories){var r={},a=t[o].options.categories||{};if(e.isArray(a))for(var s=0;s<a.length;++s)r[a[s]]=s;else for(var l in a)r[l]=a[l];t[o].categories=r}t[o].options.ticks||(t[o].options.ticks=i),function(e,t,i){for(var o=e.points,n=e.pointsize,r=e.format,a=t.charAt(0),s=function(e){var t=-1;for(var i in e)e[i]>t&&(t=e[i]);return t+1}(i),l=0;l<o.length;l+=n)if(null!=o[l])for(var c=0;c<n;++c){var p=o[l+c];null!=p&&r[c][a]&&(p in i||(i[p]=s,++s),o[l+c]=i[p])}}(n,o,t[o].categories)}}function n(e,t,i){o(t,"xaxis",i),o(t,"yaxis",i)}e.plot.plugins.push({init:function(e){e.hooks.processRawData.push(t),e.hooks.processDatapoints.push(n)},options:{xaxis:{categories:null},yaxis:{categories:null}},name:"categories",version:"1.0"})}(jQuery)},276:function(e,t){var i,o,n,r;i=jQuery,o=10,n=.95,r={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,t){return"<div style='font-size:x-small;text-align:center;padding:2px;color:"+t.color+";'>"+e+"<br/>"+Math.round(t.percent)+"%</div>"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}},i.plot.plugins.push({init:function(e){var t=null,a=null,s=null,l=null,c=null,p=!1,h=null,u=[];function d(e,o,n){p||(p=!0,t=e.getCanvas(),a=i(t).parent(),r=e.getOptions(),e.setData(function(e){for(var t=0,o=0,n=0,a=r.series.pie.combine.color,s=[],l=0;l<e.length;++l){var c=e[l].data;i.isArray(c)?i.isNumeric(c[1])?c[1]=+c[1]:c[1]=0:c=i.isNumeric(c)?[1,+c]:[1,0],e[l].data=[c]}for(var l=0;l<e.length;++l)t+=e[l].data[0][1];for(var l=0;l<e.length;++l){var c=e[l].data[0][1];c/t<=r.series.pie.combine.threshold&&(o+=c,n++,a||(a=e[l].color))}for(var l=0;l<e.length;++l){var c=e[l].data[0][1];(n<2||c/t>r.series.pie.combine.threshold)&&s.push({data:[[1,c]],color:e[l].color,label:e[l].label,angle:c*Math.PI*2/t,percent:c/(t/100)})}return n>1&&s.push({data:[[1,o]],color:a,label:r.series.pie.combine.label,angle:o*Math.PI*2/t,percent:o/(t/100)}),s}(e.getData())))}function f(e,t){if(a){var u=e.getPlaceholder().width(),d=e.getPlaceholder().height(),f=a.children().filter(".legend").children().width()||0;h=t,p=!1,s=Math.min(u,d/r.series.pie.tilt)/2,c=d/2+r.series.pie.offset.top,l=u/2,"auto"==r.series.pie.offset.left?r.legend.position.match("w")?l+=f/2:l-=f/2:l+=r.series.pie.offset.left,l<s?l=s:l>u-s&&(l=u-s);var m=e.getData(),x=0;do{x>0&&(s*=n),x+=1,v(),r.series.pie.tilt<=.8&&b()}while(!y()&&x<o);x>=o&&(v(),a.prepend("<div class='error'>Could not draw pie with labels contained inside canvas</div>")),e.setSeries&&e.insertLegend&&(e.setSeries(m),e.insertLegend())}function v(){h.clearRect(0,0,u,d),a.children().filter(".pieLabel, .pieLabelBackground").remove()}function b(){var e=r.series.pie.shadow.left,t=r.series.pie.shadow.top,i=r.series.pie.shadow.alpha,o=r.series.pie.radius>1?r.series.pie.radius:s*r.series.pie.radius;if(!(o>=u/2-e||o*r.series.pie.tilt>=d/2-t||o<=10)){h.save(),h.translate(e,t),h.globalAlpha=i,h.fillStyle="#000",h.translate(l,c),h.scale(1,r.series.pie.tilt);for(var n=1;n<=10;n++)h.beginPath(),h.arc(0,0,o,0,2*Math.PI,!1),h.fill(),o-=n;h.restore()}}function y(){var e=Math.PI*r.series.pie.startAngle,t=r.series.pie.radius>1?r.series.pie.radius:s*r.series.pie.radius;h.save(),h.translate(l,c),h.scale(1,r.series.pie.tilt),h.save();for(var o=e,n=0;n<m.length;++n)m[n].startAngle=o,p(m[n].angle,m[n].color,!0);if(h.restore(),r.series.pie.stroke.width>0){h.save(),h.lineWidth=r.series.pie.stroke.width,o=e;for(var n=0;n<m.length;++n)p(m[n].angle,r.series.pie.stroke.color,!1);h.restore()}return g(h),h.restore(),!r.series.pie.label.show||function(){for(var t=e,o=r.series.pie.label.radius>1?r.series.pie.label.radius:s*r.series.pie.label.radius,n=0;n<m.length;++n){if(m[n].percent>=100*r.series.pie.label.threshold&&!p(m[n],t,n))return!1;t+=m[n].angle}return!0;function p(e,t,n){if(0==e.data[0][1])return!0;var s,p=r.legend.labelFormatter,h=r.series.pie.label.formatter;s=p?p(e.label,e):e.label,h&&(s=h(s,e));var f=(t+e.angle+t)/2,g=l+Math.round(Math.cos(f)*o),m=c+Math.round(Math.sin(f)*o)*r.series.pie.tilt,x="<span class='pieLabel' id='pieLabel"+n+"' style='position:absolute;top:"+m+"px;left:"+g+"px;'>"+s+"</span>";a.append(x);var v=a.children("#pieLabel"+n),b=m-v.height()/2,y=g-v.width()/2;if(v.css("top",b),v.css("left",y),0-b>0||0-y>0||d-(b+v.height())<0||u-(y+v.width())<0)return!1;if(0!=r.series.pie.label.background.opacity){var k=r.series.pie.label.background.color;null==k&&(k=e.color);var w="top:"+b+"px;left:"+y+"px;";i("<div class='pieLabelBackground' style='position:absolute;width:"+v.width()+"px;height:"+v.height()+"px;"+w+"background-color:"+k+";'></div>").css("opacity",r.series.pie.label.background.opacity).insertBefore(v)}return!0}}();function p(e,i,n){e<=0||isNaN(e)||(n?h.fillStyle=i:(h.strokeStyle=i,h.lineJoin="round"),h.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&h.moveTo(0,0),h.arc(0,0,t,o,o+e/2,!1),h.arc(0,0,t,o+e/2,o+e,!1),h.closePath(),o+=e,n?h.fill():h.stroke())}}}function g(e){if(r.series.pie.innerRadius>0){e.save();var t=r.series.pie.innerRadius>1?r.series.pie.innerRadius:s*r.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=r.series.pie.stroke.color,e.arc(0,0,t,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=r.series.pie.stroke.color,e.arc(0,0,t,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function m(e,t){for(var i=!1,o=-1,n=e.length,r=n-1;++o<n;r=o)(e[o][1]<=t[1]&&t[1]<e[r][1]||e[r][1]<=t[1]&&t[1]<e[o][1])&&t[0]<(e[r][0]-e[o][0])*(t[1]-e[o][1])/(e[r][1]-e[o][1])+e[o][0]&&(i=!i);return i}function x(e){b("plothover",e)}function v(e){b("plotclick",e)}function b(t,i){var o=e.offset(),n=parseInt(i.pageX-o.left),p=parseInt(i.pageY-o.top),d=function(t,i){for(var o,n,r=e.getData(),a=e.getOptions(),p=a.series.pie.radius>1?a.series.pie.radius:s*a.series.pie.radius,u=0;u<r.length;++u){var d=r[u];if(d.pie.show){if(h.save(),h.beginPath(),h.moveTo(0,0),h.arc(0,0,p,d.startAngle,d.startAngle+d.angle/2,!1),h.arc(0,0,p,d.startAngle+d.angle/2,d.startAngle+d.angle,!1),h.closePath(),o=t-l,n=i-c,h.isPointInPath){if(h.isPointInPath(t-l,i-c))return h.restore(),{datapoint:[d.percent,d.data],dataIndex:0,series:d,seriesIndex:u}}else{var f=p*Math.cos(d.startAngle),g=p*Math.sin(d.startAngle),x=p*Math.cos(d.startAngle+d.angle/4),v=p*Math.sin(d.startAngle+d.angle/4),b=p*Math.cos(d.startAngle+d.angle/2),y=p*Math.sin(d.startAngle+d.angle/2),k=p*Math.cos(d.startAngle+d.angle/1.5),w=p*Math.sin(d.startAngle+d.angle/1.5),M=p*Math.cos(d.startAngle+d.angle),T=p*Math.sin(d.startAngle+d.angle),P=[[0,0],[f,g],[x,v],[b,y],[k,w],[M,T]],O=[o,n];if(m(P,O))return h.restore(),{datapoint:[d.percent,d.data],dataIndex:0,series:d,seriesIndex:u}}h.restore()}}return null}(n,p);if(r.grid.autoHighlight)for(var f=0;f<u.length;++f){var g=u[f];g.auto!=t||d&&g.series==d.series||y(g.series)}d&&function(t,i){var o=k(t);-1==o?(u.push({series:t,auto:i}),e.triggerRedrawOverlay()):i||(u[o].auto=!1)}(d.series,t);var x={pageX:i.pageX,pageY:i.pageY};a.trigger(t,[x,d])}function y(t){null==t&&(u=[],e.triggerRedrawOverlay());var i=k(t);-1!=i&&(u.splice(i,1),e.triggerRedrawOverlay())}function k(e){for(var t=0;t<u.length;++t){var i=u[t];if(i.series==e)return t}return-1}e.hooks.processOptions.push(function(e,t){t.series.pie.show&&(t.grid.show=!1,"auto"==t.series.pie.label.show&&(t.legend.show?t.series.pie.label.show=!1:t.series.pie.label.show=!0),"auto"==t.series.pie.radius&&(t.series.pie.label.show?t.series.pie.radius=.75:t.series.pie.radius=1),t.series.pie.tilt>1?t.series.pie.tilt=1:t.series.pie.tilt<0&&(t.series.pie.tilt=0))}),e.hooks.bindEvents.push(function(e,t){var i=e.getOptions();i.series.pie.show&&(i.grid.hoverable&&t.unbind("mousemove").mousemove(x),i.grid.clickable&&t.unbind("click").click(v))}),e.hooks.processDatapoints.push(function(e,t,i,o){var n=e.getOptions();n.series.pie.show&&d(e,t,i)}),e.hooks.drawOverlay.push(function(e,t){var i=e.getOptions();i.series.pie.show&&function(e,t){var i=e.getOptions(),o=i.series.pie.radius>1?i.series.pie.radius:s*i.series.pie.radius;t.save(),t.translate(l,c),t.scale(1,i.series.pie.tilt);for(var n=0;n<u.length;++n)r(u[n].series);function r(e){e.angle<=0||isNaN(e.angle)||(t.fillStyle="rgba(255, 255, 255, "+i.series.pie.highlight.opacity+")",t.beginPath(),Math.abs(e.angle-2*Math.PI)>1e-9&&t.moveTo(0,0),t.arc(0,0,o,e.startAngle,e.startAngle+e.angle/2,!1),t.arc(0,0,o,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),t.closePath(),t.fill())}g(t),t.restore()}(e,t)}),e.hooks.draw.push(function(e,t){var i=e.getOptions();i.series.pie.show&&f(e,t)})},options:r,name:"pie",version:"1.1"})},277:function(e,t){!function(e){e.color={},e.color.make=function(t,i,o,n){var r={};return r.r=t||0,r.g=i||0,r.b=o||0,r.a=null!=n?n:1,r.add=function(e,t){for(var i=0;i<e.length;++i)r[e.charAt(i)]+=t;return r.normalize()},r.scale=function(e,t){for(var i=0;i<e.length;++i)r[e.charAt(i)]*=t;return r.normalize()},r.toString=function(){return r.a>=1?"rgb("+[r.r,r.g,r.b].join(",")+")":"rgba("+[r.r,r.g,r.b,r.a].join(",")+")"},r.normalize=function(){function e(e,t,i){return t<e?e:t>i?i:t}return r.r=e(0,parseInt(r.r),255),r.g=e(0,parseInt(r.g),255),r.b=e(0,parseInt(r.b),255),r.a=e(0,r.a,1),r},r.clone=function(){return e.color.make(r.r,r.b,r.g,r.a)},r.normalize()},e.color.extract=function(t,i){var o;do{if(""!=(o=t.css(i).toLowerCase())&&"transparent"!=o)break;t=t.parent()}while(!e.nodeName(t.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),e.color.parse(o)},e.color.parse=function(i){var o,n=e.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(i))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(i))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(i))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(i))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(i))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var r=e.trim(i).toLowerCase();return"transparent"==r?n(255,255,255,0):(o=t[r]||[0,0,0],n(o[0],o[1],o[2]))};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],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],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(e){function t(t,i,o,n){var r,a,s,l=[],c={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,timezone:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null,monthNames:null,timeformat:null,twelveHourClock:!1},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},p=null,h=null,u=null,d=null,f=null,g=[],m=[],x={left:0,right:0,top:0,bottom:0},v=0,b=0,y=0,k=0,w={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},M=this;function T(e,t){t=[M].concat(t);for(var i=0;i<e.length;++i)e[i].apply(this,t)}function P(t){l=function(t){for(var i=[],o=0;o<t.length;++o){var n=e.extend(!0,{},c.series);null!=t[o].data?(n.data=t[o].data,delete t[o].data,e.extend(!0,n,t[o]),t[o].data=n.data):n.data=t[o],i.push(n)}return i}(t),function(){var t,i=l.length,o=-1;for(t=0;t<l.length;++t){var n=l[t].color;null!=n&&(i--,"number"==typeof n&&n>o&&(o=n))}i<=o&&(i=o+1);var r,a=[],s=c.colors,p=s.length,h=0;for(t=0;t<i;t++)r=e.color.parse(s[t%p]||"#666"),t%p==0&&t&&(h=h>=0?h<.5?-h-.2:0:-h),a[t]=r.scale("rgb",1+h);var u,d=0;for(t=0;t<l.length;++t){if(null==(u=l[t]).color?(u.color=a[d].toString(),++d):"number"==typeof u.color&&(u.color=a[u.color].toString()),null==u.lines.show){var f,x=!0;for(f in u)if(u[f]&&u[f].show){x=!1;break}x&&(u.lines.show=!0)}null==u.lines.zero&&(u.lines.zero=!!u.lines.fill),u.xaxis=z(g,O(u,"x")),u.yaxis=z(m,O(u,"y"))}}(),function(){var t,i,o,n,r,a,s,c,p,h,u,d,f=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,m=Number.MAX_VALUE;function x(e,t,i){t<e.datamin&&t!=-m&&(e.datamin=t),i>e.datamax&&i!=m&&(e.datamax=i)}for(e.each(S(),function(e,t){t.datamin=f,t.datamax=g,t.used=!1}),t=0;t<l.length;++t)(r=l[t]).datapoints={points:[]},T(w.processRawData,[r,r.data,r.datapoints]);for(t=0;t<l.length;++t){if(r=l[t],u=r.data,!(d=r.datapoints.format)){if((d=[]).push({x:!0,number:!0,required:!0}),d.push({y:!0,number:!0,required:!0}),r.bars.show||r.lines.show&&r.lines.fill){var v=!!(r.bars.show&&r.bars.zero||r.lines.show&&r.lines.zero);d.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:v}),r.bars.horizontal&&(delete d[d.length-1].y,d[d.length-1].x=!0)}r.datapoints.format=d}if(null==r.datapoints.pointsize){r.datapoints.pointsize=d.length,s=r.datapoints.pointsize,a=r.datapoints.points;var b=r.lines.show&&r.lines.steps;for(r.xaxis.used=r.yaxis.used=!0,i=o=0;i<u.length;++i,o+=s){var y=null==(h=u[i]);if(!y)for(n=0;n<s;++n)c=h[n],(p=d[n])&&(p.number&&null!=c&&(c=+c,isNaN(c)?c=null:c==1/0?c=m:c==-1/0&&(c=-m)),null==c&&(p.required&&(y=!0),null!=p.defaultValue&&(c=p.defaultValue))),a[o+n]=c;if(y)for(n=0;n<s;++n)null!=(c=a[o+n])&&((p=d[n]).x&&x(r.xaxis,c,c),p.y&&x(r.yaxis,c,c)),a[o+n]=null;else if(b&&o>0&&null!=a[o-s]&&a[o-s]!=a[o]&&a[o-s+1]!=a[o+1]){for(n=0;n<s;++n)a[o+s+n]=a[o+n];a[o+1]=a[o-s+1],o+=s}}}}for(t=0;t<l.length;++t)r=l[t],T(w.processDatapoints,[r,r.datapoints]);for(t=0;t<l.length;++t){r=l[t],a=r.datapoints.points,s=r.datapoints.pointsize,d=r.datapoints.format;var k=f,M=f,P=g,O=g;for(i=0;i<a.length;i+=s)if(null!=a[i])for(n=0;n<s;++n)c=a[i+n],(p=d[n])&&!1!==p.autoscale&&c!=m&&c!=-m&&(p.x&&(c<k&&(k=c),c>P&&(P=c)),p.y&&(c<M&&(M=c),c>O&&(O=c)));if(r.bars.show){var C;switch(r.bars.align){case"left":C=0;break;case"right":C=-r.bars.barWidth;break;case"center":C=-r.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+r.bars.align)}r.bars.horizontal?(M+=C,O+=C+r.bars.barWidth):(k+=C,P+=C+r.bars.barWidth)}x(r.xaxis,k,P),x(r.yaxis,M,O)}e.each(S(),function(e,t){t.datamin==f&&(t.datamin=null),t.datamax==g&&(t.datamax=null)})}()}function O(e,t){var i=e[t+"axis"];return"object"==typeof i&&(i=i.n),"number"!=typeof i&&(i=1),i}function S(){return e.grep(g.concat(m),function(e){return e})}function C(e){var t,i,o={};for(t=0;t<g.length;++t)(i=g[t])&&i.used&&(o["x"+i.n]=i.c2p(e.left));for(t=0;t<m.length;++t)(i=m[t])&&i.used&&(o["y"+i.n]=i.c2p(e.top));return void 0!==o.x1&&(o.x=o.x1),void 0!==o.y1&&(o.y=o.y1),o}function z(t,i){return t[i-1]||(t[i-1]={n:i,direction:t==g?"x":"y",options:e.extend(!0,{},t==g?c.xaxis:c.yaxis)}),t[i-1]}function A(e){var t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}function I(i){var o=document.createElement("canvas");if(o.className=i,e(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(t),!o.getContext){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");o=window.G_vmlCanvasManager.initElement(o)}var n=o.getContext("2d"),r=A(n);return o.width=v*r,o.height=b*r,o.style.width=v+"px",o.style.height=b+"px",n.save(),n.scale(r,r),o}function W(){if(v=t.width(),b=t.height(),v<=0||b<=0)throw new Error("Invalid dimensions for plot, width = "+v+", height = "+b)}function D(e){var t=e.getContext("2d"),i=A(t);e.style.width!=v&&(e.width=v*i,e.style.width=v+"px"),e.style.height!=b&&(e.height=b*i,e.style.height=b+"px"),t.restore(),t.save(),t.scale(i,i)}function F(t){var i,o=t.labelWidth,n=t.labelHeight,r=t.options.position,a=t.options.tickLength,s=c.grid.axisMargin,l=c.grid.labelMargin,p="x"==t.direction?g:m,h=e.grep(p,function(e){return e&&e.options.position==r&&e.reserveSpace});if(e.inArray(t,h)==h.length-1&&(s=0),null==a){var u=e.grep(p,function(e){return e&&e.reserveSpace});i=0==e.inArray(t,u),a=i?"full":5}isNaN(+a)||(l+=+a),"x"==t.direction?(n+=l,"bottom"==r?(x.bottom+=n+s,t.box={top:b-x.bottom,height:n}):(t.box={top:x.top+s,height:n},x.top+=n+s)):(o+=l,"left"==r?(t.box={left:x.left+s,width:o},x.left+=o+s):(x.right+=o+s,t.box={left:v-x.right,width:o})),t.position=r,t.tickLength=a,t.box.padding=l,t.innermost=i}function N(){var i,o=S(),n=c.grid.show;for(var r in x){var a=c.grid.margin||0;x[r]="number"==typeof a?a:a[r]||0}for(var r in T(w.processOffset,[x]),x)"object"==typeof c.grid.borderWidth?x[r]+=n?c.grid.borderWidth[r]:0:x[r]+=n?c.grid.borderWidth:0;if(e.each(o,function(e,t){t.show=t.options.show,null==t.show&&(t.show=t.used),t.reserveSpace=t.show||t.options.reserveSpace,function(e){var t=e.options,i=+(null!=t.min?t.min:e.datamin),o=+(null!=t.max?t.max:e.datamax),n=o-i;if(0==n){var r=0==o?1:.01;null==t.min&&(i-=r),null!=t.max&&null==t.min||(o+=r)}else{var a=t.autoscaleMargin;null!=a&&(null==t.min&&(i-=n*a)<0&&null!=e.datamin&&e.datamin>=0&&(i=0),null==t.max&&(o+=n*a)>0&&null!=e.datamax&&e.datamax<=0&&(o=0))}e.min=i,e.max=o}(t)}),n){var s={style:t.css("font-style"),size:Math.round(.8*(+t.css("font-size").replace("px","")||13)),variant:t.css("font-variant"),weight:t.css("font-weight"),family:t.css("font-family")},p=e.grep(o,function(e){return e.reserveSpace});for(e.each(p,function(t,i){!function(t){var i,o=t.options;if(i="number"==typeof o.ticks&&o.ticks>0?o.ticks:.3*Math.sqrt("x"==t.direction?v:b),t.delta=(t.max-t.min)/i,"time"==o.mode&&!t.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(t.tickGenerator||(t.tickGenerator=function(e){var t=o.tickDecimals,i=-Math.floor(Math.log(e.delta)/Math.LN10);null!=t&&i>t&&(i=t);var n,r,a,s,l,c=Math.pow(10,-i),p=e.delta/c,h=[],u=0,d=Number.NaN;p<1.5?n=1:p<3?(n=2,p>2.25&&(null==t||i+1<=t)&&(n=2.5,++i)):n=p<7.5?5:10,n*=c,null!=o.minTickSize&&n<o.minTickSize&&(n=o.minTickSize),e.tickDecimals=Math.max(0,null!=t?t:i),e.tickSize=o.tickSize||n,s=e.min,l=e.tickSize,r=l*Math.floor(s/l);do{a=d,d=r+u*e.tickSize,h.push(d),++u}while(d<e.max&&d!=a);return h},t.tickFormatter=function(e,t){var i=t.tickDecimals?Math.pow(10,t.tickDecimals):1,o=""+Math.round(e*i)/i;if(null!=t.tickDecimals){var n=o.indexOf("."),r=-1==n?0:o.length-n-1;if(r<t.tickDecimals)return(r?o:o+".")+(""+i).substr(1,t.tickDecimals-r)}return o}),e.isFunction(o.tickFormatter)&&(t.tickFormatter=function(e,t){return""+o.tickFormatter(e,t)}),null!=o.alignTicksWithAxis){var n=("x"==t.direction?g:m)[o.alignTicksWithAxis-1];if(n&&n.used&&n!=t){var r=t.tickGenerator(t);if(r.length>0&&(null==o.min&&(t.min=Math.min(t.min,r[0])),null==o.max&&r.length>1&&(t.max=Math.max(t.max,r[r.length-1]))),t.tickGenerator=function(e){var t,i,o=[];for(i=0;i<n.ticks.length;++i)t=(n.ticks[i].v-n.min)/(n.max-n.min),t=e.min+t*(e.max-e.min),o.push(t);return o},!t.mode&&null==o.tickDecimals){var a=Math.max(0,1-Math.floor(Math.log(t.delta)/Math.LN10)),s=t.tickGenerator(t);s.length>1&&/\..*0$/.test((s[1]-s[0]).toFixed(a))||(t.tickDecimals=a)}}}}(i),function(t){var i,o,n=t.options.ticks,r=[];for(null==n||"number"==typeof n&&n>0?r=t.tickGenerator(t):n&&(r=e.isFunction(n)?n(t):n),t.ticks=[],i=0;i<r.length;++i){var a=null,s=r[i];"object"==typeof s?(o=+s[0],s.length>1&&(a=s[1])):o=+s,null==a&&(a=t.tickFormatter(o,t)),isNaN(o)||t.ticks.push({v:o,label:a})}}(i),function(e,t){e.options.autoscaleMargin&&t.length>0&&(null==e.options.min&&(e.min=Math.min(e.min,t[0].v)),null==e.options.max&&t.length>1&&(e.max=Math.max(e.max,t[t.length-1].v)))}(i,i.ticks),i.font=e.extend({},s,i.options.font),function(e){var t=e.options,i=e.ticks||[],o=t.labelWidth||0,n=t.labelHeight||0,r=e.font;d.save(),d.font=r.style+" "+r.variant+" "+r.weight+" "+r.size+"px '"+r.family+"'";for(var a=0;a<i.length;++a){var s=i[a];if(s.lines=[],s.width=s.height=0,s.label){for(var l=(s.label+"").replace(/<br ?\/?>|\r\n|\r/g,"\n").split("\n"),c=0;c<l.length;++c){var p={text:l[c]},h=d.measureText(p.text);p.width=h.width,p.height=null!=h.height?h.height:r.size,p.height+=Math.round(.15*r.size),s.width=Math.max(p.width,s.width),s.height+=p.height,s.lines.push(p)}null==t.labelWidth&&(o=Math.max(o,s.width)),null==t.labelHeight&&(n=Math.max(n,s.height))}}d.restore(),e.labelWidth=Math.ceil(o),e.labelHeight=Math.ceil(n)}(i)}),i=p.length-1;i>=0;--i)F(p[i]);!function(){var t,i=c.grid.minBorderMargin,o={x:0,y:0};if(null==i)for(i=0,t=0;t<l.length;++t)i=Math.max(i,2*(l[t].points.radius+l[t].points.lineWidth/2));o.x=o.y=Math.ceil(i),e.each(S(),function(e,t){var i=t.direction;t.reserveSpace&&(o[i]=Math.ceil(Math.max(o[i],("x"==i?t.labelWidth:t.labelHeight)/2)))}),x.left=Math.max(o.x,x.left),x.right=Math.max(o.x,x.right),x.top=Math.max(o.y,x.top),x.bottom=Math.max(o.y,x.bottom)}(),e.each(p,function(e,t){!function(e){"x"==e.direction?(e.box.left=x.left-e.labelWidth/2,e.box.width=v-x.left-x.right+e.labelWidth):(e.box.top=x.top-e.labelHeight/2,e.box.height=b-x.bottom-x.top+e.labelHeight)}(t)})}y=v-x.left-x.right,k=b-x.bottom-x.top,e.each(o,function(e,t){!function(e){function t(e){return e}var i,o,n=e.options.transform||t,r=e.options.inverseTransform;"x"==e.direction?(i=e.scale=y/Math.abs(n(e.max)-n(e.min)),o=Math.min(n(e.max),n(e.min))):(i=-(i=e.scale=k/Math.abs(n(e.max)-n(e.min))),o=Math.max(n(e.max),n(e.min))),e.p2c=n==t?function(e){return(e-o)*i}:function(e){return(n(e)-o)*i},e.c2p=r?function(e){return r(o+e/i)}:function(e){return o+e/i}}(t)}),function(){if(t.find(".legend").remove(),c.legend.show){for(var i,o,n=[],r=[],a=!1,s=c.legend.labelFormatter,p=0;p<l.length;++p)(i=l[p]).label&&(o=s?s(i.label,i):i.label)&&r.push({label:o,color:i.color});if(c.legend.sorted)if(e.isFunction(c.legend.sorted))r.sort(c.legend.sorted);else if("reverse"==c.legend.sorted)r.reverse();else{var h="descending"!=c.legend.sorted;r.sort(function(e,t){return e.label==t.label?0:e.label<t.label!=h?1:-1})}for(var p=0;p<r.length;++p){var u=r[p];p%c.legend.noColumns==0&&(a&&n.push("</tr>"),n.push("<tr>"),a=!0),n.push('<td class="legendColorBox"><div style="border:1px solid '+c.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+u.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+u.label+"</td>")}if(a&&n.push("</tr>"),0!=n.length){var d='<table style="font-size:smaller;color:'+c.grid.color+'">'+n.join("")+"</table>";if(null!=c.legend.container)e(c.legend.container).html(d);else{var f="",g=c.legend.position,m=c.legend.margin;null==m[0]&&(m=[m,m]),"n"==g.charAt(0)?f+="top:"+(m[1]+x.top)+"px;":"s"==g.charAt(0)&&(f+="bottom:"+(m[1]+x.bottom)+"px;"),"e"==g.charAt(1)?f+="right:"+(m[0]+x.right)+"px;":"w"==g.charAt(1)&&(f+="left:"+(m[0]+x.left)+"px;");var v=e('<div class="legend">'+d.replace('style="','style="position:absolute;'+f+";")+"</div>").appendTo(t);if(0!=c.legend.backgroundOpacity){var b=c.legend.backgroundColor;null==b&&((b=(b=c.grid.backgroundColor)&&"string"==typeof b?e.color.parse(b):e.color.extract(v,"background-color")).a=1,b=b.toString());var y=v.children();e('<div style="position:absolute;width:'+y.width()+"px;height:"+y.height()+"px;"+f+"background-color:"+b+';"> </div>').prependTo(v).css("opacity",c.legend.backgroundOpacity)}}}}}()}function L(){d.clearRect(0,0,v,b),T(w.drawBackground,[d]);var e=c.grid;e.show&&e.backgroundColor&&(d.save(),d.translate(x.left,x.top),d.fillStyle=ie(c.grid.backgroundColor,k,0,"rgba(255, 255, 255, 0)"),d.fillRect(0,0,y,k),d.restore()),e.show&&!e.aboveData&&(E(),j());for(var t=0;t<l.length;++t)T(w.drawSeries,[d,l[t]]),$(l[t]);T(w.draw,[d]),e.show&&e.aboveData&&(E(),j())}function R(e,t){for(var i,o,n,r,a=S(),s=0;s<a.length;++s)if((i=a[s]).direction==t&&(r=t+i.n+"axis",e[r]||1!=i.n||(r=t+"axis"),e[r])){o=e[r].from,n=e[r].to;break}if(e[r]||(i="x"==t?g[0]:m[0],o=e[t+"1"],n=e[t+"2"]),null!=o&&null!=n&&o>n){var l=o;o=n,n=l}return{from:o,to:n,axis:i}}function E(){var t,i,o,n;d.save(),d.translate(x.left,x.top);var r=c.grid.markings;if(r)for(e.isFunction(r)&&((i=M.getAxes()).xmin=i.xaxis.min,i.xmax=i.xaxis.max,i.ymin=i.yaxis.min,i.ymax=i.yaxis.max,r=r(i)),t=0;t<r.length;++t){var a=r[t],s=R(a,"x"),l=R(a,"y");null==s.from&&(s.from=s.axis.min),null==s.to&&(s.to=s.axis.max),null==l.from&&(l.from=l.axis.min),null==l.to&&(l.to=l.axis.max),s.to<s.axis.min||s.from>s.axis.max||l.to<l.axis.min||l.from>l.axis.max||(s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max),l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from==s.to&&l.from==l.to||(s.from=s.axis.p2c(s.from),s.to=s.axis.p2c(s.to),l.from=l.axis.p2c(l.from),l.to=l.axis.p2c(l.to),s.from==s.to||l.from==l.to?(d.beginPath(),d.strokeStyle=a.color||c.grid.markingsColor,d.lineWidth=a.lineWidth||c.grid.markingsLineWidth,d.moveTo(s.from,l.from),d.lineTo(s.to,l.to),d.stroke()):(d.fillStyle=a.color||c.grid.markingsColor,d.fillRect(s.from,l.to,s.to-s.from,l.from-l.to))))}i=S(),o=c.grid.borderWidth;for(var p=0;p<i.length;++p){var h,u,f,g,m=i[p],v=m.box,b=m.tickLength;if(m.show&&0!=m.ticks.length){for(d.strokeStyle=m.options.tickColor||e.color.parse(m.options.color).scale("a",.22).toString(),d.lineWidth=1,"x"==m.direction?(h=0,u="full"==b?"top"==m.position?0:k:v.top-x.top+("top"==m.position?v.height:0)):(u=0,h="full"==b?"left"==m.position?0:y:v.left-x.left+("left"==m.position?v.width:0)),m.innermost||(d.beginPath(),f=g=0,"x"==m.direction?f=y:g=k,1==d.lineWidth&&(h=Math.floor(h)+.5,u=Math.floor(u)+.5),d.moveTo(h,u),d.lineTo(h+f,u+g),d.stroke()),d.beginPath(),t=0;t<m.ticks.length;++t){var w=m.ticks[t].v;f=g=0,isNaN(w)||w<m.min||w>m.max||"full"==b&&("object"==typeof o&&o[m.position]>0||o>0)&&(w==m.min||w==m.max)||("x"==m.direction?(h=m.p2c(w),g="full"==b?-k:b,"top"==m.position&&(g=-g)):(u=m.p2c(w),f="full"==b?-y:b,"left"==m.position&&(f=-f)),1==d.lineWidth&&("x"==m.direction?h=Math.floor(h)+.5:u=Math.floor(u)+.5),d.moveTo(h,u),d.lineTo(h+f,u+g))}d.stroke()}}o&&(n=c.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(d.strokeStyle=n.top,d.lineWidth=o.top,d.beginPath(),d.moveTo(0-o.left,0-o.top/2),d.lineTo(y,0-o.top/2),d.stroke()),o.right>0&&(d.strokeStyle=n.right,d.lineWidth=o.right,d.beginPath(),d.moveTo(y+o.right/2,0-o.top),d.lineTo(y+o.right/2,k),d.stroke()),o.bottom>0&&(d.strokeStyle=n.bottom,d.lineWidth=o.bottom,d.beginPath(),d.moveTo(y+o.right,k+o.bottom/2),d.lineTo(0,k+o.bottom/2),d.stroke()),o.left>0&&(d.strokeStyle=n.left,d.lineWidth=o.left,d.beginPath(),d.moveTo(0-o.left/2,k+o.bottom),d.lineTo(0-o.left/2,0),d.stroke())):(d.lineWidth=o,d.strokeStyle=c.grid.borderColor,d.strokeRect(-o/2,-o/2,y+o,k+o))),d.restore()}function j(){d.save(),e.each(S(),function(e,t){if(t.show&&0!=t.ticks.length){var i=t.box,o=t.font;d.fillStyle=t.options.color,d.font=o.style+" "+o.variant+" "+o.weight+" "+o.size+"px "+o.family,d.textAlign="start",d.textBaseline="middle";for(var n=0;n<t.ticks.length;++n){var r=t.ticks[n];if(!(!r.label||r.v<t.min||r.v>t.max))for(var a,s,l,c=0,p=0;p<r.lines.length;++p)l=r.lines[p],"x"==t.direction?(a=x.left+t.p2c(r.v)-l.width/2,s="bottom"==t.position?i.top+i.padding:i.top+i.height-i.padding-r.height):(s=x.top+t.p2c(r.v)-r.height/2,a="left"==t.position?i.left+i.width-i.padding-l.width:i.left+i.padding),s+=l.height/2+c,c+=l.height,window.opera&&window.opera.version().split(".")[0]<12&&(a=Math.floor(a),s=Math.ceil(s-2)),d.fillText(l.text,a,s)}}}),d.restore()}function $(e){e.lines.show&&function(e){function t(e,t,i,o,n){var r=e.points,a=e.pointsize,s=null,l=null;d.beginPath();for(var c=a;c<r.length;c+=a){var p=r[c-a],h=r[c-a+1],u=r[c],f=r[c+1];if(null!=p&&null!=u){if(h<=f&&h<n.min){if(f<n.min)continue;p=(n.min-h)/(f-h)*(u-p)+p,h=n.min}else if(f<=h&&f<n.min){if(h<n.min)continue;u=(n.min-h)/(f-h)*(u-p)+p,f=n.min}if(h>=f&&h>n.max){if(f>n.max)continue;p=(n.max-h)/(f-h)*(u-p)+p,h=n.max}else if(f>=h&&f>n.max){if(h>n.max)continue;u=(n.max-h)/(f-h)*(u-p)+p,f=n.max}if(p<=u&&p<o.min){if(u<o.min)continue;h=(o.min-p)/(u-p)*(f-h)+h,p=o.min}else if(u<=p&&u<o.min){if(p<o.min)continue;f=(o.min-p)/(u-p)*(f-h)+h,u=o.min}if(p>=u&&p>o.max){if(u>o.max)continue;h=(o.max-p)/(u-p)*(f-h)+h,p=o.max}else if(u>=p&&u>o.max){if(p>o.max)continue;f=(o.max-p)/(u-p)*(f-h)+h,u=o.max}p==s&&h==l||d.moveTo(o.p2c(p)+t,n.p2c(h)+i),s=u,l=f,d.lineTo(o.p2c(u)+t,n.p2c(f)+i)}}d.stroke()}d.save(),d.translate(x.left,x.top),d.lineJoin="round";var i=e.lines.lineWidth,o=e.shadowSize;if(i>0&&o>0){d.lineWidth=o,d.strokeStyle="rgba(0,0,0,0.1)";var n=Math.PI/18;t(e.datapoints,Math.sin(n)*(i/2+o/2),Math.cos(n)*(i/2+o/2),e.xaxis,e.yaxis),d.lineWidth=o/2,t(e.datapoints,Math.sin(n)*(i/2+o/4),Math.cos(n)*(i/2+o/4),e.xaxis,e.yaxis)}d.lineWidth=i,d.strokeStyle=e.color;var r=B(e.lines,e.color,0,k);r&&(d.fillStyle=r,function(e,t,i){for(var o=e.points,n=e.pointsize,r=Math.min(Math.max(0,i.min),i.max),a=0,s=!1,l=1,c=0,p=0;!(n>0&&a>o.length+n);){var h=o[(a+=n)-n],u=o[a-n+l],f=o[a],g=o[a+l];if(s){if(n>0&&null!=h&&null==f){p=a,n=-n,l=2;continue}if(n<0&&a==c+n){d.fill(),s=!1,l=1,a=c=p+(n=-n);continue}}if(null!=h&&null!=f){if(h<=f&&h<t.min){if(f<t.min)continue;u=(t.min-h)/(f-h)*(g-u)+u,h=t.min}else if(f<=h&&f<t.min){if(h<t.min)continue;g=(t.min-h)/(f-h)*(g-u)+u,f=t.min}if(h>=f&&h>t.max){if(f>t.max)continue;u=(t.max-h)/(f-h)*(g-u)+u,h=t.max}else if(f>=h&&f>t.max){if(h>t.max)continue;g=(t.max-h)/(f-h)*(g-u)+u,f=t.max}if(s||(d.beginPath(),d.moveTo(t.p2c(h),i.p2c(r)),s=!0),u>=i.max&&g>=i.max)d.lineTo(t.p2c(h),i.p2c(i.max)),d.lineTo(t.p2c(f),i.p2c(i.max));else if(u<=i.min&&g<=i.min)d.lineTo(t.p2c(h),i.p2c(i.min)),d.lineTo(t.p2c(f),i.p2c(i.min));else{var m=h,x=f;u<=g&&u<i.min&&g>=i.min?(h=(i.min-u)/(g-u)*(f-h)+h,u=i.min):g<=u&&g<i.min&&u>=i.min&&(f=(i.min-u)/(g-u)*(f-h)+h,g=i.min),u>=g&&u>i.max&&g<=i.max?(h=(i.max-u)/(g-u)*(f-h)+h,u=i.max):g>=u&&g>i.max&&u<=i.max&&(f=(i.max-u)/(g-u)*(f-h)+h,g=i.max),h!=m&&d.lineTo(t.p2c(m),i.p2c(u)),d.lineTo(t.p2c(h),i.p2c(u)),d.lineTo(t.p2c(f),i.p2c(g)),f!=x&&(d.lineTo(t.p2c(f),i.p2c(g)),d.lineTo(t.p2c(x),i.p2c(g)))}}}}(e.datapoints,e.xaxis,e.yaxis)),i>0&&t(e.datapoints,0,0,e.xaxis,e.yaxis),d.restore()}(e),e.bars.show&&function(e){var t;switch(d.save(),d.translate(x.left,x.top),d.lineWidth=e.bars.lineWidth,d.strokeStyle=e.color,e.bars.align){case"left":t=0;break;case"right":t=-e.bars.barWidth;break;case"center":t=-e.bars.barWidth/2;break;default:throw new Error("Invalid bar alignment: "+e.bars.align)}var i=e.bars.fill?function(t,i){return B(e.bars,e.color,t,i)}:null;(function(t,i,o,n,r,a,s){for(var l=t.points,c=t.pointsize,p=0;p<l.length;p+=c)null!=l[p]&&X(l[p],l[p+1],l[p+2],i,o,n,r,a,s,d,e.bars.horizontal,e.bars.lineWidth)})(e.datapoints,t,t+e.bars.barWidth,0,i,e.xaxis,e.yaxis),d.restore()}(e),e.points.show&&function(e){function t(e,t,i,o,n,r,a,s){for(var l=e.points,c=e.pointsize,p=0;p<l.length;p+=c){var h=l[p],u=l[p+1];null==h||h<r.min||h>r.max||u<a.min||u>a.max||(d.beginPath(),h=r.p2c(h),u=a.p2c(u)+o,"circle"==s?d.arc(h,u,t,0,n?Math.PI:2*Math.PI,!1):s(d,h,u,t,n),d.closePath(),i&&(d.fillStyle=i,d.fill()),d.stroke())}}d.save(),d.translate(x.left,x.top);var i=e.points.lineWidth,o=e.shadowSize,n=e.points.radius,r=e.points.symbol;if(0==i&&(i=1e-4),i>0&&o>0){var a=o/2;d.lineWidth=a,d.strokeStyle="rgba(0,0,0,0.1)",t(e.datapoints,n,null,a+a/2,!0,e.xaxis,e.yaxis,r),d.strokeStyle="rgba(0,0,0,0.2)",t(e.datapoints,n,null,a/2,!0,e.xaxis,e.yaxis,r)}d.lineWidth=i,d.strokeStyle=e.color,t(e.datapoints,n,B(e.points,e.color),0,!1,e.xaxis,e.yaxis,r),d.restore()}(e)}function X(e,t,i,o,n,r,a,s,l,c,p,h){var u,d,f,g,m,x,v,b,y;p?(b=x=v=!0,m=!1,g=t+o,f=t+n,(d=e)<(u=i)&&(y=d,d=u,u=y,m=!0,x=!1)):(m=x=v=!0,b=!1,u=e+o,d=e+n,(g=t)<(f=i)&&(y=g,g=f,f=y,b=!0,v=!1)),d<s.min||u>s.max||g<l.min||f>l.max||(u<s.min&&(u=s.min,m=!1),d>s.max&&(d=s.max,x=!1),f<l.min&&(f=l.min,b=!1),g>l.max&&(g=l.max,v=!1),u=s.p2c(u),f=l.p2c(f),d=s.p2c(d),g=l.p2c(g),a&&(c.beginPath(),c.moveTo(u,f),c.lineTo(u,g),c.lineTo(d,g),c.lineTo(d,f),c.fillStyle=a(f,g),c.fill()),h>0&&(m||x||v||b)&&(c.beginPath(),c.moveTo(u,f+r),m?c.lineTo(u,g+r):c.moveTo(u,g+r),v?c.lineTo(d,g+r):c.moveTo(d,g+r),x?c.lineTo(d,f+r):c.moveTo(d,f+r),b?c.lineTo(u,f+r):c.moveTo(u,f+r),c.stroke()))}function B(t,i,o,n){var r=t.fill;if(!r)return null;if(t.fillColor)return ie(t.fillColor,o,n,i);var a=e.color.parse(i);return a.a="number"==typeof r?r:.4,a.normalize(),a.toString()}M.setData=P,M.setupGrid=N,M.draw=L,M.getPlaceholder=function(){return t},M.getCanvas=function(){return p},M.getPlotOffset=function(){return x},M.width=function(){return y},M.height=function(){return k},M.offset=function(){var e=u.offset();return e.left+=x.left,e.top+=x.top,e},M.getData=function(){return l},M.getAxes=function(){var t={};return e.each(g.concat(m),function(e,i){i&&(t[i.direction+(1!=i.n?i.n:"")+"axis"]=i)}),t},M.getXAxes=function(){return g},M.getYAxes=function(){return m},M.c2p=C,M.p2c=function(e){var t,i,o,n={};for(t=0;t<g.length;++t)if((i=g[t])&&i.used&&(o="x"+i.n,null==e[o]&&1==i.n&&(o="x"),null!=e[o])){n.left=i.p2c(e[o]);break}for(t=0;t<m.length;++t)if((i=m[t])&&i.used&&(o="y"+i.n,null==e[o]&&1==i.n&&(o="y"),null!=e[o])){n.top=i.p2c(e[o]);break}return n},M.getOptions=function(){return c},M.highlight=J,M.unhighlight=K,M.triggerRedrawOverlay=Q,M.pointOffset=function(e){return{left:parseInt(g[O(e,"x")-1].p2c(+e.x)+x.left,10),top:parseInt(m[O(e,"y")-1].p2c(+e.y)+x.top,10)}},M.shutdown=function(){Y&&clearTimeout(Y),u.unbind("mousemove",G),u.unbind("mouseleave",V),u.unbind("click",_),T(w.shutdown,[u])},M.resize=function(){W(),D(p),D(h)},M.hooks=w,function(){for(var t=0;t<n.length;++t){var i=n[t];i.init(M),i.options&&e.extend(!0,c,i.options)}}(),function(t){var i;for(e.extend(!0,c,t),null==c.xaxis.color&&(c.xaxis.color=c.grid.color),null==c.yaxis.color&&(c.yaxis.color=c.grid.color),null==c.xaxis.tickColor&&(c.xaxis.tickColor=c.grid.tickColor),null==c.yaxis.tickColor&&(c.yaxis.tickColor=c.grid.tickColor),null==c.grid.borderColor&&(c.grid.borderColor=c.grid.color),null==c.grid.tickColor&&(c.grid.tickColor=e.color.parse(c.grid.color).scale("a",.22).toString()),i=0;i<Math.max(1,c.xaxes.length);++i)c.xaxes[i]=e.extend(!0,{},c.xaxis,c.xaxes[i]);for(i=0;i<Math.max(1,c.yaxes.length);++i)c.yaxes[i]=e.extend(!0,{},c.yaxis,c.yaxes[i]);for(c.xaxis.noTicks&&null==c.xaxis.ticks&&(c.xaxis.ticks=c.xaxis.noTicks),c.yaxis.noTicks&&null==c.yaxis.ticks&&(c.yaxis.ticks=c.yaxis.noTicks),c.x2axis&&(c.xaxes[1]=e.extend(!0,{},c.xaxis,c.x2axis),c.xaxes[1].position="top"),c.y2axis&&(c.yaxes[1]=e.extend(!0,{},c.yaxis,c.y2axis),c.yaxes[1].position="right"),c.grid.coloredAreas&&(c.grid.markings=c.grid.coloredAreas),c.grid.coloredAreasColor&&(c.grid.markingsColor=c.grid.coloredAreasColor),c.lines&&e.extend(!0,c.series.lines,c.lines),c.points&&e.extend(!0,c.series.points,c.points),c.bars&&e.extend(!0,c.series.bars,c.bars),null!=c.shadowSize&&(c.series.shadowSize=c.shadowSize),null!=c.highlightColor&&(c.series.highlightColor=c.highlightColor),i=0;i<c.xaxes.length;++i)z(g,i+1).options=c.xaxes[i];for(i=0;i<c.yaxes.length;++i)z(m,i+1).options=c.yaxes[i];for(var o in w)c.hooks[o]&&c.hooks[o].length&&(w[o]=w[o].concat(c.hooks[o]));T(w.processOptions,[c])}(o),a=t.children("canvas.flot-base"),s=t.children("canvas.flot-overlay"),0==a.length||0==s?(t.html(""),t.css({padding:0}),"static"==t.css("position")&&t.css("position","relative"),W(),p=I("flot-base"),h=I("flot-overlay"),r=!1):(p=a.get(0),h=s.get(0),r=!0),d=p.getContext("2d"),f=h.getContext("2d"),u=e(h),r&&(t.data("plot").shutdown(),M.resize(),f.clearRect(0,0,v,b),u.unbind(),t.children().not([p,h]).remove()),t.data("plot",M),P(i),N(),L(),c.grid.hoverable&&(u.mousemove(G),u.bind("mouseleave",V)),c.grid.clickable&&u.click(_),T(w.bindEvents,[u]);var H=[],Y=null;function G(e){c.grid.hoverable&&q("plothover",e,function(e){return 0!=e.hoverable})}function V(e){c.grid.hoverable&&q("plothover",e,function(e){return!1})}function _(e){q("plotclick",e,function(e){return 0!=e.clickable})}function q(e,i,o){var n=u.offset(),r=i.pageX-n.left-x.left,a=i.pageY-n.top-x.top,s=C({left:r,top:a});s.pageX=i.pageX,s.pageY=i.pageY;var p=function(e,t,i){var o,n,r,a=c.grid.mouseActiveRadius,s=a*a+1,p=null;for(o=l.length-1;o>=0;--o)if(i(l[o])){var h=l[o],u=h.xaxis,d=h.yaxis,f=h.datapoints.points,g=u.c2p(e),m=d.c2p(t),x=a/u.scale,v=a/d.scale;if(r=h.datapoints.pointsize,u.options.inverseTransform&&(x=Number.MAX_VALUE),d.options.inverseTransform&&(v=Number.MAX_VALUE),h.lines.show||h.points.show)for(n=0;n<f.length;n+=r){var b=f[n],y=f[n+1];if(null!=b&&!(b-g>x||b-g<-x||y-m>v||y-m<-v)){var k=Math.abs(u.p2c(b)-e),w=Math.abs(d.p2c(y)-t),M=k*k+w*w;M<s&&(s=M,p=[o,n/r])}}if(h.bars.show&&!p){var T="left"==h.bars.align?0:-h.bars.barWidth/2,P=T+h.bars.barWidth;for(n=0;n<f.length;n+=r){var b=f[n],y=f[n+1],O=f[n+2];null!=b&&(l[o].bars.horizontal?g<=Math.max(O,b)&&g>=Math.min(O,b)&&m>=y+T&&m<=y+P:g>=b+T&&g<=b+P&&m>=Math.min(O,y)&&m<=Math.max(O,y))&&(p=[o,n/r])}}}return p?(o=p[0],n=p[1],r=l[o].datapoints.pointsize,{datapoint:l[o].datapoints.points.slice(n*r,(n+1)*r),dataIndex:n,series:l[o],seriesIndex:o}):null}(r,a,o);if(p&&(p.pageX=parseInt(p.series.xaxis.p2c(p.datapoint[0])+n.left+x.left,10),p.pageY=parseInt(p.series.yaxis.p2c(p.datapoint[1])+n.top+x.top,10)),c.grid.autoHighlight){for(var h=0;h<H.length;++h){var d=H[h];d.auto!=e||p&&d.series==p.series&&d.point[0]==p.datapoint[0]&&d.point[1]==p.datapoint[1]||K(d.series,d.point)}p&&J(p.series,p.datapoint,e)}t.trigger(e,[s,p])}function Q(){var e=c.interaction.redrawOverlayInterval;-1!=e?Y||(Y=setTimeout(U,e)):U()}function U(){var e,t;for(Y=null,f.save(),f.clearRect(0,0,v,b),f.translate(x.left,x.top),e=0;e<H.length;++e)(t=H[e]).series.bars.show?te(t.series,t.point):ee(t.series,t.point);f.restore(),T(w.drawOverlay,[f])}function J(e,t,i){if("number"==typeof e&&(e=l[e]),"number"==typeof t){var o=e.datapoints.pointsize;t=e.datapoints.points.slice(o*t,o*(t+1))}var n=Z(e,t);-1==n?(H.push({series:e,point:t,auto:i}),Q()):i||(H[n].auto=!1)}function K(e,t){null==e&&null==t&&(H=[],Q()),"number"==typeof e&&(e=l[e]),"number"==typeof t&&(t=e.data[t]);var i=Z(e,t);-1!=i&&(H.splice(i,1),Q())}function Z(e,t){for(var i=0;i<H.length;++i){var o=H[i];if(o.series==e&&o.point[0]==t[0]&&o.point[1]==t[1])return i}return-1}function ee(t,i){var o=i[0],n=i[1],r=t.xaxis,a=t.yaxis,s="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString();if(!(o<r.min||o>r.max||n<a.min||n>a.max)){var l=t.points.radius+t.points.lineWidth/2;f.lineWidth=l,f.strokeStyle=s;var c=1.5*l;o=r.p2c(o),n=a.p2c(n),f.beginPath(),"circle"==t.points.symbol?f.arc(o,n,c,0,2*Math.PI,!1):t.points.symbol(f,o,n,c,!1),f.closePath(),f.stroke()}}function te(t,i){var o="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),n=o,r="left"==t.bars.align?0:-t.bars.barWidth/2;f.lineWidth=t.bars.lineWidth,f.strokeStyle=o,X(i[0],i[1],i[2]||0,r,r+t.bars.barWidth,0,function(){return n},t.xaxis,t.yaxis,f,t.bars.horizontal,t.bars.lineWidth)}function ie(t,i,o,n){if("string"==typeof t)return t;for(var r=d.createLinearGradient(0,o,0,i),a=0,s=t.colors.length;a<s;++a){var l=t.colors[a];if("string"!=typeof l){var c=e.color.parse(n);null!=l.brightness&&(c=c.scale("rgb",l.brightness)),null!=l.opacity&&(c.a*=l.opacity),l=c.toString()}r.addColorStop(a/(s-1),l)}return r}}e.plot=function(i,o,n){var r=new t(e(i),o,n,e.plot.plugins);return r},e.plot.version="0.8-alpha",e.plot.plugins=[],e.fn.plot=function(t,i){return this.each(function(){e.plot(this,t,i)})}}(jQuery)},278:function(e,t,i){i(277),i(276),i(275),i(274),i(273)}});if("object"==typeof i){var o=["object"==typeof module&&"object"==typeof module.exports?module.exports:null,"undefined"!=typeof window?window:null,e&&e!==window?e:null];for(var n in i)o[0]&&(o[0][n]=i[n]),o[1]&&"__esModule"!==n&&(o[1][n]=i[n]),o[2]&&(o[2][n]=i[n])}}(this);