/*! @license Copyright 2014 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */
!function(t){"use strict";for(vare,a,i={},r=function(){},n="memory".split(","),o="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=n.pop();)t[e]=t[e]||i;for(;a=o.pop();)t[a]=t[a]||r}(this.console=this.console||{}),function(){"use strict";CanvasRenderingContext2D.prototype.installPattern=function(t){if("undefined"!=typeofthis.isPatternInstalled)throw"Must un-install old line pattern before installing a new one.";this.isPatternInstalled=!0;vare=[0,0],a=[],i=this.beginPath,r=this.lineTo,n=this.moveTo,o=this.stroke;this.uninstallPattern=function(){this.beginPath=i,this.lineTo=r,this.moveTo=n,this.stroke=o,this.uninstallPattern=void0,this.isPatternInstalled=void0},this.beginPath=function(){a=[],i.call(this)},this.moveTo=function(t,e){a.push([[t,e]]),n.call(this,t,e)},this.lineTo=function(t,e){vari=a[a.length-1];i.push([t,e])},this.stroke=function(){if(0===a.length)returnvoido.call(this);for(vari=0;i<a.length;i++)for(vars=a[i],l=s[0][0],h=s[0][1],p=1;p<s.length;p++){varg=s[p][0],d=s[p][1];this.save();varu=g-l,c=d-h,y=Math.sqrt(u*u+c*c),_=Math.atan2(c,u);this.translate(l,h),n.call(this,0,0),this.rotate(_);for(varv=e[0],f=0;y>f;){varx=t[v];f+=e[1]?e[1]:x,f>y?(e=[v,f-y],f=y):e=[(v+1)%t.length,0],v%2===0?r.call(this,f,0):n.call(this,f,0),v=(v+1)%t.length}this.restore(),l=g,h=d}o.call(this),a=[]}},CanvasRenderingContext2D.prototype.uninstallPattern=function(){throw"Must install a line pattern before uninstalling it."}}();varDygraphOptions=function(){returnfunction(){"use strict";vart=function(t){this.dygraph_=t,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get("highlightSeriesOpts")||{},this.reparseSeries()};t.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},t.axisToIndex_=function(e){if("string"==typeofe){if(t.AXIS_STRING_MAPPINGS_.hasOwnProperty(e))returnt.AXIS_STRING_MAPPINGS_[e];throw"Unknown axis : "+e}if("number"==typeofe){if(0===e||1===e)returne;throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(e)throw"Unknown axis : "+e;return0},t.prototype.reparseSeries=function(){vare=this.get("labels");if(e){this.labels_=e.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};vara=!this.user_.series;if(a){for(vari=0,r=0;r<this.labels_.length;r++){varn=this.labels_[r],o=this.user_[n]||{},s=0,l=o.axis;"object"==typeofl&&(s=++i,this.yAxes_[s]={series:[n],options:l}),l||this.yAxes_[0].series.push(n),this.series_[n]={idx:r,yAxis:s,options:o}}for(varr=0;r<this.labels_.length;r++){varn=this.labels_[r],o=this.series_[n].options,l=o.axis;if("string"==typeofl){if(!this.series_.hasOwnProperty(l))returnvoidconsole.error("Series "+n+" wants to share a y-axis with series "+l+", which does not define its own axis.");vars=this.series_[l].yAxis;this.series_[n].yAxis=s,this.yAxes_[s].series.push(n)}}}elsefor(varr=0;r<this.labels_.length;r++){varn=this.labels_[r],o=this.user_.series[n]||{},s=t.axisToIndex_(o.axis);this.series_[n]={idx:r,yAxis:s,options:o},this.yAxes_[s]?this.yAxes_[s].series.push(n):this.yAxes_[s]={series:[n],options:{}}}varh=this.user_.axes||{};Dygraph.update(this.yAxes_[0].options,h.y||{}),this.yAxes_.length>1&&Dygraph.update(this.yAxes_[1].options,h.y2||{}),Dygraph.update(this.xAxis_.options,h.x||{})}},t.prototype.get=function(t){vare=this.getGlobalUser_(t);returnnull!==e?e:this.getGlobalDefault_(t)},t.prototype.getGlobalUser_=function(t){returnthis.user_.hasOwnProperty(t)?this.user_[t]:null},t.prototype.getGlobalDefault_=function(t){returnthis.global_.hasOwnProperty(t)?this.global_[t]:Dygraph.DEFAULT_ATTRS.hasOwnProperty(t)?Dygraph.DEFAULT_ATTRS[t]:null},t.prototype.getForAxis=function(t,e){vara,i;if("number"==typeofe)a=e,i=0===a?"y":"y2";else{if("y1"==e&&(e="y"),"y"==e)a=0;elseif("y2"==e)a=1;else{if("x"!=e)throw"Unknown axis "+e;a=-1}i=e}varr=-1==a?this.xAxis_:this.
vare=document.documentElement,a=document.body;returnt.clientX+(e.scrollLeft||a.scrollLeft)-(e.clientLeft||0)},Dygraph.pageY=function(t){if(t.pageY)return!t.pageY||t.pageY<0?0:t.pageY;vare=document.documentElement,a=document.body;returnt.clientY+(e.scrollTop||a.scrollTop)-(e.clientTop||0)},Dygraph.dragGetX_=function(t,e){returnDygraph.pageX(t)-e.px},Dygraph.dragGetY_=function(t,e){returnDygraph.pageY(t)-e.py},Dygraph.isOK=function(t){return!!t&&!isNaN(t)},Dygraph.isValidPoint=function(t,e){returnt?null===t.yval?!1:null===t.x||void0===t.x?!1:null===t.y||void0===t.y?!1:isNaN(t.x)||!e&&isNaN(t.y)?!1:!0:!1},Dygraph.floatFormat=function(t,e){vara=Math.min(Math.max(1,e||2),21);returnMath.abs(t)<.001&&0!==t?t.toExponential(a-1):t.toPrecision(a)},Dygraph.zeropad=function(t){return10>t?"0"+t:""+t},Dygraph.DateAccessorsLocal={getFullYear:function(t){returnt.getFullYear()},getMonth:function(t){returnt.getMonth()},getDate:function(t){returnt.getDate()},getHours:function(t){returnt.getHours()},getMinutes:function(t){returnt.getMinutes()},getSeconds:function(t){returnt.getSeconds()},getMilliseconds:function(t){returnt.getMilliseconds()},getDay:function(t){returnt.getDay()},makeDate:function(t,e,a,i,r,n,o){returnnewDate(t,e,a,i,r,n,o)}},Dygraph.DateAccessorsUTC={getFullYear:function(t){returnt.getUTCFullYear()},getMonth:function(t){returnt.getUTCMonth()},getDate:function(t){returnt.getUTCDate()},getHours:function(t){returnt.getUTCHours()},getMinutes:function(t){returnt.getUTCMinutes()},getSeconds:function(t){returnt.getUTCSeconds()},getMilliseconds:function(t){returnt.getUTCMilliseconds()},getDay:function(t){returnt.getUTCDay()},makeDate:function(t,e,a,i,r,n,o){returnnewDate(Date.UTC(t,e,a,i,r,n,o))}},Dygraph.hmsString_=function(t,e,a){vari=Dygraph.zeropad,r=i(t)+":"+i(e);returna&&(r+=":"+i(a)),r},Dygraph.dateString_=function(t,e){vara=Dygraph.zeropad,i=e?Dygraph.DateAccessorsUTC:Dygraph.DateAccessorsLocal,r=newDate(t),n=i.getFullYear(r),o=i.getMonth(r),s=i.getDate(r),l=i.getHours(r),h=i.getMinutes(r),p=i.getSeconds(r),g=""+n,d=a(o+1),u=a(s),c=3600*l+60*h+p,y=g+"/"+d+"/"+u;returnc&&(y+=" "+Dygraph.hmsString_(l,h,p)),y},Dygraph.round_=function(t,e){vara=Math.pow(10,e);returnMath.round(t*a)/a},Dygraph.binarySearch=function(t,e,a,i,r){if((null===i||void0===i||null===r||void0===r)&&(i=0,r=e.length-1),i>r)return-1;(null===a||void0===a)&&(a=0);varn,o=function(t){returnt>=0&&t<e.length},s=parseInt((i+r)/2,10),l=e[s];returnl==t?s:l>t?a>0&&(n=s-1,o(n)&&e[n]<t)?s:Dygraph.binarySearch(t,e,a,i,s-1):t>l?0>a&&(n=s+1,o(n)&&e[n]>t)?s:Dygraph.binarySearch(t,e,a,s+1,r):-1},Dygraph.dateParser=function(t){vare,a;if((-1==t.search("-")||-1!=t.search("T")||-1!=t.search("Z"))&&(a=Dygraph.dateStrToMillis(t),a&&!isNaN(a)))returna;if(-1!=t.search("-")){for(e=t.replace("-","/","g");-1!=e.search("-");)e=e.replace("-","/");a=Dygraph.dateStrToMillis(e)}else8==t.length?(e=t.substr(0,4)+"/"+t.substr(4,2)+"/"+t.substr(6,2),a=Dygraph.dateStrToMillis(e)):a=Dygraph.dateStrToMillis(t);return(!a||isNaN(a))&&console.error("Couldn't parse "+t+" as a date"),a},Dygraph.dateStrToMillis=function(t){returnnewDate(t).getTime()},Dygraph.update=function(t,e){if("undefined"!=typeofe&&null!==e)for(varaine)e.hasOwnProperty(a)&&(t[a]=e[a]);returnt},Dygraph.updateDeep=function(t,e){functiona(t){return"object"==typeofNode?tinstanceofNode:"object"==typeoft&&"number"==typeoft.nodeType&&"string"==typeoft.nodeName}if("undefined"!=typeofe&&null!==e)for(variine)e.hasOwnProperty(i)&&(null===e[i]?t[i]=null:Dygraph.isArrayLike(e[i])?t[i]=e[i].slice():a(e[i])?t[i]=e[i]:"object"==typeofe[i]?(("object"!=typeoft[i]||null===t[i])&&(t[i]={}),Dygraph.updateDeep(t[i],e[i])):t[i]=e[i]);returnt},Dygraph.isArrayLike=function(t){vare=typeoft;return"object"!=e&&("function"!=e||"function"!=typeoft.item)||null===t||"number"!=typeoft.length||3===t.nodeType?!1:!0},Dygraph.isDateLike=function(t){return"object"!=typeoft||null===t||"function"!=typeoft.getTime?!1:!0},Dygraph.clone=function(t){for(vare=[],a=0;a<t.length;a++)e.push(Dygraph.isArra