=t.length?null:t[e.fillBetween]:null}(t,e.getData());if(n){for(var o,a,r,s,l,c,u,h,p=i.pointsize,d=i.points,f=n.datapoints.pointsize,g=n.datapoints.points,m=[],v=t.lines.show,x=2=d.length);){if(u=m.length,null==d[w]){for(h=0;h
=g.length){if(!v)for(h=0;h
=e.min&&n<=e.max&&t.push([n,i])}return t.sort((function(e,t){return e[0]-t[0]})),t}function n(t,n,o){if("categories"===t[n].options.mode){if(!t[n].categories){var a={},r=t[n].options.categories||{};if(e.isArray(r))for(var s=0;st&&(t=e[i]);return t+1}(i),l=0;l=g.length);){if(p=x.length,null==g[S]){for(d=0;d=v.length){if(!b)for(d=0;dt)&&(o=e,c=f,u=g,h=(n=i).offset(),p={left:0,top:0},m=a(o)/c.prevDistance,v=a(o),p.left=l(o,"pinch").x-h.left,p.top=l(o,"pinch").y-h.top,n.zoom({center:p,amount:m,axes:u.touchedAxis}),c.prevDistance=v,f.zoomEnable=!0),d=null}),1e3/60))},end:function(e){d&&(clearTimeout(d),d=null),b(e),f.prevDistance=null}},p={recenterPlot:function(t){t&&t.detail&&"touchstart"===t.detail.type&&function(t,i,o,a){var r,s,l,c,u;(l=i,c=a,void 0!==(u=(s=t).getTouchedAxis(l.detail.firstTouch.x,l.detail.firstTouch.y))[0]&&(c.prevTouchedAxis=u[0].direction),void 0!==(u=s.getTouchedAxis(l.detail.secondTouch.x,l.detail.secondTouch.y))[0]&&(c.touchedAxis=u,c.currentTouchedAxis=u[0].direction),n(c)&&(c.touchedAxis=null,c.prevTouchedAxis="none",c.currentTouchedAxis="none"),"x"===a.currentTouchedAxis&&"x"===a.prevTouchedAxis||"y"===a.currentTouchedAxis&&"y"===a.prevTouchedAxis||"none"===a.currentTouchedAxis&&"none"===a.prevTouchedAxis)&&(t.recenter({axes:a.touchedAxis}),r=a.touchedAxis?new e.Event("re-center",{detail:{axisTouched:a.touchedAxis}}):new e.Event("re-center",{detail:i}),t.getPlaceholder().trigger(r))}(i,t,0,g)}},!0!==c.pan.enableTouch&&!0!==c.zoom.enableTouch||(i.hooks.bindEvents.push((function(e,t){var i=e.getOptions();i.zoom.interactive&&i.zoom.enableTouch&&(t[0].addEventListener("pinchstart",h.start,!1),t[0].addEventListener("pinchdrag",h.drag,!1),t[0].addEventListener("pinchend",h.end,!1)),i.pan.interactive&&i.pan.enableTouch&&(t[0].addEventListener("panstart",u.start,!1),t[0].addEventListener("pandrag",u.drag,!1),t[0].addEventListener("panend",u.end,!1)),i.recenter.interactive&&i.recenter.enableTouch&&t[0].addEventListener("doubletap",p.recenterPlot,!1)})),i.hooks.shutdown.push((function(e,t){t[0].removeEventListener("panstart",u.start),t[0].removeEventListener("pandrag",u.drag),t[0].removeEventListener("panend",u.end),t[0].removeEventListener("pinchstart",h.start),t[0].removeEventListener("pinchdrag",h.drag),t[0].removeEventListener("pinchend",h.end),t[0].removeEventListener("doubletap",p.recenterPlot)})))}function n(e){return!e.touchedAxis||0===e.touchedAxis.length}function o(e,t,i,n){var o,a=l(e,t);switch(n.navigationConstraint){case"unconstrained":n.touchedAxis=null,i.prevTapPosition={x:i.prevPanPosition.x,y:i.prevPanPosition.y},i.prevPanPosition={x:a.x,y:a.y};break;case"axisConstrained":o=n.touchedAxis[0].direction,n.currentTouchedAxis=o,i.prevTapPosition[o]=i.prevPanPosition[o],i.prevPanPosition[o]=a[o]}}function a(e){var t,i,n,o,a=e.detail.touches[0],r=e.detail.touches[1];return t=a.pageX,i=a.pageY,n=r.pageX,o=r.pageY,Math.sqrt((t-n)*(t-n)+(i-o)*(i-o))}function r(e,t,i,n){var o=l(e,t);switch(n.navigationConstraint){case"unconstrained":i.prevPanPosition.x=o.x,i.prevPanPosition.y=o.y;break;case"axisConstrained":i.prevPanPosition[n.currentTouchedAxis]=o[n.currentTouchedAxis]}}function s(e,t,i){var n=l(e,t);return{x:n.x-i.prevPanPosition.x,y:n.y-i.prevPanPosition.y}}function l(e,t){return"pinch"===t?{x:(e.detail.touches[0].pageX+e.detail.touches[1].pageX)/2,y:(e.detail.touches[0].pageY+e.detail.touches[1].pageY)/2}:{x:e.detail.touches[0].pageX,y:e.detail.touches[0].pageY}}e.plot.plugins.push({init:function(e){e.hooks.processOptions.push(i)},options:{zoom:{enableTouch:!1},pan:{enableTouch:!1,touchMode:"manual"},recenter:{enableTouch:!0}},name:"navigateTouch",version:"0.3"})}(jQuery),function(e){var t=e.plot.browser,i="hover";e.plot.plugins.push({init:function(n){var o,a=[];function r(e){var t=n.getOptions(),o=new CustomEvent("mouseevent");return o.pageX=e.detail.changedTouches[0].pageX,o.pageY=e.detail.changedTouches[0].pageY,o.clientX=e.detail.changedTouches[0].clientX,o.clientY=e.detail.changedTouches[0].clientY,t.grid.hoverable&&s(o,i,30),!1}function s(e,t,i){var o=n.getData();if(void 0!==e&&0s.max||rl.max)){var u=t.points.radius+t.points.lineWidth/2;n.lineWidth=u,n.strokeStyle=c;var h=1.5*u;a=s.p2c(a),r=l.p2c(r),n.beginPath();var p=t.points.symbol;"circle"===p?n.arc(a,r,h,0,2*Math.PI,!1):"string"==typeof p&&o.drawSymbol&&o.drawSymbol[p]&&o.drawSymbol[p](n,a,r,h,!1),n.closePath(),n.stroke()}}function y(t,i,n){var o,a="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),r=a,s=t.bars.barWidth[0]||t.bars.barWidth;switch(t.bars.align){case"left":o=0;break;case"right":o=-s;break;default:o=-s/2}n.lineWidth=t.bars.lineWidth,n.strokeStyle=a;var l=t.bars.fillTowards||0,c=l>t.yaxis.min?Math.min(t.yaxis.max,l):t.yaxis.min;e.plot.drawSeries.drawBar(i[0],i[1],i[2]||c,o,o+s,(function(){return r}),t.xaxis,t.yaxis,n,t.bars.horizontal,t.bars.lineWidth)}n.hooks.bindEvents.push((function(e,t){var i=e.getOptions();(i.grid.hoverable||i.grid.clickable)&&(t[0].addEventListener("touchevent",h,!1),t[0].addEventListener("tap",r,!1)),i.grid.clickable&&t.bind("click",u),i.grid.hoverable&&(t.bind("mousemove",l),t.bind("mouseleave",c))})),n.hooks.shutdown.push((function(e,t){t[0].removeEventListener("tap",r),t[0].removeEventListener("touchevent",h),t.unbind("mousemove",l),t.unbind("mouseleave",c),t.unbind("click",u),a=[]})),n.hooks.processOptions.push((function(e,t){e.highlight=d,e.unhighlight=f,(t.grid.hoverable||t.grid.clickable)&&(e.hooks.drawOverlay.push(x),e.hooks.processDatapoints.push(m),e.hooks.setupGrid.push(v)),o=e.getPlaceholder()[0].lastMouseMoveEvent}))},options:{grid:{hoverable:!1,clickable:!1}},name:"hover",version:"0.1"})}(jQuery),function(e){function t(e,t){var i,n={twoTouches:!1,currentTapStart:{x:0,y:0},currentTapEnd:{x:0,y:0},prevTap:{x:0,y:0},currentTap:{x:0,y:0},interceptedLongTap:!1,isUnsupportedGesture:!1,prevTapTime:null,tapStartTime:null,longTapTriggerId:null};function o(t){var o=e.getOptions();(o.pan.active||o.zoom.active)&&(3<=t.touches.length?n.isUnsupportedGesture=!0:n.isUnsupportedGesture=!1,i.dispatchEvent(new CustomEvent("touchevent",{detail:t})),g(t)?a(t,"pinch"):(a(t,"pan"),f(t)||(function(e){var t=(new Date).getTime(),i=t-n.prevTapTime;return 0<=i&&i<500&&d(n.prevTap.x,n.prevTap.y,n.currentTap.x,n.currentTap.y)<20?(e.firstTouch=n.prevTap,e.secondTouch=n.currentTap,!0):(n.prevTapTime=t,!1)}(t)&&a(t,"doubleTap"),a(t,"tap"),a(t,"longTap"))))}function a(e,t){switch(t){case"pan":r[e.type](e);break;case"pinch":s[e.type](e);break;case"doubleTap":l.onDoubleTap(e);break;case"longTap":c[e.type](e);break;case"tap":u[e.type](e)}}var r={touchstart:function(e){var t;n.prevTap={x:n.currentTap.x,y:n.currentTap.y},h(e),t=e,n.tapStartTime=(new Date).getTime(),n.interceptedLongTap=!1,n.currentTapStart={x:t.touches[0].pageX,y:t.touches[0].pageY},n.currentTapEnd={x:t.touches[0].pageX,y:t.touches[0].pageY},i.dispatchEvent(new CustomEvent("panstart",{detail:e}))},touchmove:function(e){var t;p(e),h(e),t=e,n.currentTapEnd={x:t.touches[0].pageX,y:t.touches[0].pageY},n.isUnsupportedGesture||i.dispatchEvent(new CustomEvent("pandrag",{detail:e}))},touchend:function(e){var t;p(e),f(e)?(i.dispatchEvent(new CustomEvent("pinchend",{detail:e})),i.dispatchEvent(new CustomEvent("panstart",{detail:e}))):(t=e).touches&&0===t.touches.length&&i.dispatchEvent(new CustomEvent("panend",{detail:e}))}},s={touchstart:function(e){i.dispatchEvent(new CustomEvent("pinchstart",{detail:e}))},touchmove:function(e){p(e),n.twoTouches=g(e),n.isUnsupportedGesture||i.dispatchEvent(new CustomEvent("pinchdrag",{detail:e}))},touchend:function(e){p(e)}},l={onDoubleTap:function(e){p(e),i.dispatchEvent(new CustomEvent("doubletap",{detail:e}))}},c={touchstart:function(e){c.waitForLongTap(e)},touchmove:function(e){},touchend:function(e){n.longTapTriggerId&&(clearTimeout(n.longTapTriggerId),n.longTapTriggerId=null)},isLongTap:function(e){return 1500<=(new Date).getTime()-n.tapStartTime&&!n.interceptedLongTap&&d(n.currentTapStart.x,n.currentTapStart.y,n.currentTapEnd.x,n.currentTapEnd.y)<20&&(n.interceptedLongTap=!0)},waitForLongTap:function(e){n.longTapTriggerId||(n.longTapTriggerId=setTimeout((function(){c.isLongTap(e)&&i.dispatchEvent(new CustomEvent("longtap",{detail:e})),n.longTapTriggerId=null}),1500))}},u={touchstart:function(e){n.tapStartTime=(new Date).getTime()},touchmove:function(e){},touchend:function(e){u.isTap(e)&&(i.dispatchEvent(new CustomEvent("tap",{detail:e})),p(e))},isTap:function(e){return(new Date).getTime()-n.tapStartTime<=125&&d(n.currentTapStart.x,n.currentTapStart.y,n.currentTapEnd.x,n.currentTapEnd.y)<20}};function h(e){n.currentTap={x:e.touches[0].pageX,y:e.touches[0].pageY}}function p(t){n.isUnsupportedGesture||(t.preventDefault(),e.getOptions().propagateSupportedGesture||t.stopPropagation())}function d(e,t,i,n){return Math.sqrt((e-i)*(e-i)+(t-n)*(t-n))}function f(e){return n.twoTouches&&1===e.touches.length}function g(t){return!!(t.touches&&2<=t.touches.length&&t.touches[0].target===e.getEventHolder()&&t.touches[1].target===e.getEventHolder())}(!0===t.pan.enableTouch||t.zoom.enableTouch)&&(e.hooks.bindEvents.push((function(e,t){i=t[0],t[0].addEventListener("touchstart",o,!1),t[0].addEventListener("touchmove",o,!1),t[0].addEventListener("touchend",o,!1)})),e.hooks.shutdown.push((function(e,t){t[0].removeEventListener("touchstart",o),t[0].removeEventListener("touchmove",o),t[0].removeEventListener("touchend",o),n.longTapTriggerId&&(clearTimeout(n.longTapTriggerId),n.longTapTriggerId=null)})))}jQuery.plot.plugins.push({init:function(e){e.hooks.processOptions.push(t)},options:{propagateSupportedGesture:!1},name:"navigateTouch",version:"0.3"})}(),function(e){var t=e.plot.saturated.floorInBase,i=function(e,t){var i=new e(t),n=i.setTime.bind(i);i.update=function(e){e=Math.round(1e3*e)/1e3,n(e),this.microseconds=1e3*(e-Math.floor(e))};var o=i.getTime.bind(i);return i.getTime=function(){return o()+this.microseconds/1e3},i.setTime=function(e){this.update(e)},i.getMicroseconds=function(){return this.microseconds},i.setMicroseconds=function(e){var t=o()+e/1e3;this.update(t)},i.setUTCMicroseconds=function(e){this.setMicroseconds(e)},i.getUTCMicroseconds=function(){return this.getMicroseconds()},i.microseconds=null,i.microEpoch=null,i.update(t),i};function n(e,t,i,n){if("function"==typeof e.strftime)return e.strftime(t);var o,a=function(e,t){return t=""+(null==t?"0":t),1===(e=""+e).length?t+e:e},r=function(e,t,i){var n,o=1e3*e+t;if(i<6&&0=p);++f);var g=d[f][0],m=d[f][1];if("year"===m){if(null!==n.minTickSize&&void 0!==n.minTickSize&&"year"===n.minTickSize[1])g=Math.floor(n.minTickSize[0]);else{var v=parseFloat("1e"+Math.floor(Math.log(e.delta/i.year)/Math.LN10)),x=e.delta/i.year/v;g=x<1.5?1:x<3?2:x<7.5?5:10,g*=v}g<1&&(g=1)}e.tickSize=n.tickSize||[g,m];var b=e.tickSize[0],y=b*i[m=e.tickSize[1]];"microsecond"===m?c.setMicroseconds(t(c.getMicroseconds(),b)):"millisecond"===m?c.setMilliseconds(t(c.getMilliseconds(),b)):"second"===m?c.setSeconds(t(c.getSeconds(),b)):"minute"===m?c.setMinutes(t(c.getMinutes(),b)):"hour"===m?c.setHours(t(c.getHours(),b)):"month"===m?c.setMonth(t(c.getMonth(),b)):"quarter"===m?c.setMonth(3*t(c.getMonth()/3,b)):"year"===m&&c.setFullYear(t(c.getFullYear(),b)),y>=i.millisecond&&c.setMicroseconds(0),y>=i.second&&c.setMilliseconds(0),y>=i.minute&&c.setSeconds(0),y>=i.hour&&c.setMinutes(0),y>=i.day&&c.setHours(0),y>=4*i.day&&c.setDate(1),y>=2*i.month&&c.setMonth(t(c.getMonth(),3)),y>=2*i.quarter&&c.setMonth(t(c.getMonth(),6)),y>=i.year&&c.setMonth(0);var w,k,T=0,M=Number.NaN;do{if(k=M,w=c.getTime(),M=n&&"seconds"===n.timeBase?w/1e3:n&&"microseconds"===n.timeBase?1e3*w:w,o.push(M),"month"===m||"quarter"===m)if(b<1){c.setDate(1);var S=c.getTime();c.setMonth(c.getMonth()+("quarter"===m?3:1));var P=c.getTime();c.setTime(M+T*i.hour+(P-S)*b),T=c.getHours(),c.setHours(0)}else c.setMonth(c.getMonth()+b*("quarter"===m?3:1));else"year"===m?c.setFullYear(c.getFullYear()+b):"seconds"===n.timeBase?c.setTime(1e3*(M+y)):"microseconds"===n.timeBase?c.setTime((M+y)/1e3):c.setTime(M+y)}while(M=e&&Math.abs(i.second.y-i.first.y)>=e}t.clearSelection=f,t.setSelection=function(e,n){var o;"y"===h(t)?(i.first.x=0,i.second.x=t.width()):(o=g(e,"x"),i.first.x=o.axis.p2c(o.from),i.second.x=o.axis.p2c(o.to)),"x"===h(t)?(i.first.y=0,i.second.y=t.height()):(o=g(e,"y"),i.first.y=o.axis.p2c(o.from),i.second.y=o.axis.p2c(o.to)),i.show=!0,t.triggerRedrawOverlay(),!n&&m()&&c()},t.getSelection=l,t.hooks.bindEvents.push((function(e,t){null!=e.getOptions().selection.mode&&(e.addEventHandler("dragstart",r,t,0),e.addEventHandler("drag",a,t,0),e.addEventHandler("dragend",s,t,0))})),t.hooks.drawOverlay.push((function(t,n){if(i.show&&m()){var o=t.getPlotOffset(),a=t.getOptions();n.save(),n.translate(o.left,o.top);var r=e.color.parse(a.selection.color),s=a.selection.visualization,l=a.selection.displaySelectionDecorations,c=1;"fill"===s&&(c=.8),n.strokeStyle=r.scale("a",c).toString(),n.lineWidth=1,n.lineJoin=a.selection.shape,n.fillStyle=r.scale("a",.4).toString();var u=Math.min(i.first.x,i.second.x)+.5,p=u,d=Math.min(i.first.y,i.second.y)+.5,f=d,g=Math.abs(i.second.x-i.first.x)-1,v=Math.abs(i.second.y-i.first.y)-1;"x"===h(t)&&(v+=d,d=0),"y"===h(t)&&(g+=u,u=0),"fill"===s?(n.fillRect(u,d,g,v),n.strokeRect(u,d,g,v)):(n.fillRect(0,0,t.width(),t.height()),n.clearRect(u,d,g,v),l&&(x=n,b=u,y=d,w=g,k=v,T=p,M=f,S=h(t),P=Math.max(0,Math.min(15,w/2-2,k/2-2)),x.fillStyle="#ffffff","xy"===S&&(x.beginPath(),x.moveTo(b,y+P),x.lineTo(b-3,y+P),x.lineTo(b-3,y-3),x.lineTo(b+P,y-3),x.lineTo(b+P,y),x.lineTo(b,y),x.closePath(),x.moveTo(b,y+k-P),x.lineTo(b-3,y+k-P),x.lineTo(b-3,y+k+3),x.lineTo(b+P,y+k+3),x.lineTo(b+P,y+k),x.lineTo(b,y+k),x.closePath(),x.moveTo(b+w,y+P),x.lineTo(b+w+3,y+P),x.lineTo(b+w+3,y-3),x.lineTo(b+w-P,y-3),x.lineTo(b+w-P,y),x.lineTo(b+w,y),x.closePath(),x.moveTo(b+w,y+k-P),x.lineTo(b+w+3,y+k-P),x.lineTo(b+w+3,y+k+3),x.lineTo(b+w-P,y+k+3),x.lineTo(b+w-P,y+k),x.lineTo(b+w,y+k),x.closePath(),x.stroke(),x.fill()),b=T,y=M,"x"===S&&(x.beginPath(),x.moveTo(b,y+15),x.lineTo(b,y-15),x.lineTo(b-3,y-15),x.lineTo(b-3,y+15),x.closePath(),x.moveTo(b+w,y+15),x.lineTo(b+w,y-15),x.lineTo(b+w+3,y-15),x.lineTo(b+w+3,y+15),x.closePath(),x.stroke(),x.fill()),"y"===S&&(x.beginPath(),x.moveTo(b-15,y),x.lineTo(b+15,y),x.lineTo(b+15,y-3),x.lineTo(b-15,y-3),x.closePath(),x.moveTo(b-15,y+k),x.lineTo(b+15,y+k),x.lineTo(b+15,y+k+3),x.lineTo(b-15,y+k+3),x.closePath(),x.stroke(),x.fill()))),n.restore()}var x,b,y,w,k,T,M,S,P})),t.hooks.shutdown.push((function(e,t){t.unbind("dragstart",r),t.unbind("drag",a),t.unbind("dragend",s)}))},options:{selection:{mode:null,visualization:"focus",displaySelectionDecorations:!0,color:"#888888",shape:"round",minSize:5}},name:"selection",version:"1.1"})}(jQuery),function(e){var t=1,i=e.plot.browser,n=i.getPixelRatio;function o(e,o){var u=e.filter(a);t=n(o.getContext("2d"));var h,p=u.map((function(e){var t,n,o=new Image;return new Promise((n=e,(t=o).sourceDescription='',t.sourceComponent=n,function(e,o){var a,c,u,h,p,d,f,g,m,v,x,b;t.onload=function(i){t.successfullyLoaded=!0,e(t)},t.onabort=function(i){t.successfullyLoaded=!1,console.log("Can't generate temp image from "+t.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",t.sourceComponent),e(t)},t.onerror=function(i){t.successfullyLoaded=!1,console.log("Can't generate temp image from "+t.sourceDescription+". It is possible that it is missing some properties or its content is not supported by this browser. Source component:",t.sourceComponent),e(t)},c=t,"CANVAS"===(a=n).tagName&&(u=a,c.src=u.toDataURL("image/png")),"svg"===a.tagName&&(h=a,p=c,i.isSafari()||i.isMobileSafari()?(d=h,f=p,v=l(v=s(r(document),d)),m=function(e){for(var t="",i=new Uint8Array(e),n=0;ne[c].genLeft&&(a=e[c].genLeft),r>e[c].genTop&&(r=e[c].genTop);for(c=1;c',"",i.innerHTML,""].join("\n")}function l(e){var t="";return e.match(/^