varRickshaw={namespace:function(a,b){varc=a.split("."),d=Rickshaw;for(vare=1,f=c.length;e<f;e++)currentPart=c[e],d[currentPart]=d[currentPart]||{},d=d[currentPart];returnd},keys:function(a){varb=[];for(varcina)b.push(c);returnb},extend:function(a,b){for(varcinb)a[c]=b[c];returna}};if(typeofmodule!="undefined"&&module.exports){vard3=require("d3");module.exports=Rickshaw}(function(a){functionj(a){returnb.call(a)===i}functionk(a,b){for(varcinb)b.hasOwnProperty(c)&&(a[c]=b[c]);returna}functionl(a){if(m(a)!==h)thrownewTypeError;varb=[];for(varcina)a.hasOwnProperty(c)&&b.push(c);returnb}functionm(a){switch(a){casenull:returnc;casevoid0:returnd}varb=typeofa;switch(b){case"boolean":returne;case"number":returnf;case"string":returng}returnh}functionn(a){returntypeofa=="undefined"}functionp(a){varb=a.toString().match(/^[\s\(]*function[^(]*\(([^)]*)\)/)[1].replace(/\/\/.*?[\r\n]|\/\*(?:.|[\r\n])*?\*\//g,"").replace(/\s+/g,"").split(",");returnb.length==1&&!b[0]?[]:b}functionq(a,b){varc=a;returnfunction(){vara=r([t(c,this)],arguments);returnb.apply(this,a)}}functionr(a,b){varc=a.length,d=b.length;while(d--)a[c+d]=b[d];returna}functions(a,b){returna=o.call(a,0),r(a,b)}functiont(a,b){if(arguments.length<2&&n(arguments[0]))returnthis;varc=a,d=o.call(arguments,2);returnfunction(){vara=s(d,arguments);returnc.apply(b,a)}}varb=Object.prototype.toString,c="Null",d="Undefined",e="Boolean",f="Number",g="String",h="Object",i="[object Function]",o=Array.prototype.slice,u=function(){},v=function(){functionb(){}functionc(){functiond(){this.initialize.apply(this,arguments)}vara=null,c=[].slice.apply(arguments);j(c[0])&&(a=c.shift()),k(d,v.Methods),d.superclass=a,d.subclasses=[];if(a){b.prototype=a.prototype,d.prototype=newb;try{a.subclasses.push(d)}catch(e){}}for(varf=0,g=c.length;f<g;f++)d.addMethods(c[f]);returnd.prototype.initialize||(d.prototype.initialize=u),d.prototype.constructor=d,d}functiond(b){varc=this.superclass&&this.superclass.prototype,d=l(b);a&&(b.toString!=Object.prototype.toString&&d.push("toString"),b.valueOf!=Object.prototype.valueOf&&d.push("valueOf"));for(vare=0,f=d.length;e<f;e++){varg=d[e],h=b[g];if(c&&j(h)&&p(h)[0]=="$super"){vari=h;h=q(function(a){returnfunction(){returnc[a].apply(this,arguments)}}(g),i),h.valueOf=t(i.valueOf,i),h.toString=t(i.toString,i)}this.prototype[g]=h}returnthis}vara=function(){for(varain{toString:1})if(a==="toString")return!1;return!0}();return{create:c,Methods:{addMethods:d}}}();a.exports?a.exports.Class=v:a.Class=v})(Rickshaw),Rickshaw.namespace("Rickshaw.Compat.ClassList"),Rickshaw.Compat.ClassList=function(){typeofdocument!="undefined"&&!("classList"indocument.createElement("a"))&&function(a){"use strict";varb="classList",c="prototype",d=(a.HTMLElement||a.Element)[c],e=Object,f=String[c].trim||function(){returnthis.replace(/^\s+|\s+$/g,"")},g=Array[c].indexOf||function(a){varb=0,c=this.length;for(;b<c;b++)if(binthis&&this[b]===a)returnb;return-1},h=function(a,b){this.name=a,this.code=DOMException[a],this.message=b},i=function(a,b){if(b==="")thrownewh("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(b))thrownewh("INVALID_CHARACTER_ERR","String contains an invalid character");returng.call(a,b)},j=function(a){varb=f.call(a.className),c=b?b.split(/\s+/):[],d=0,e=c.length;for(;d<e;d++)this.push(c[d]);this._updateClassName=function(){a.className=this.toString()}},k=j[c]=[],l=function(){returnnewj(this)};h[c]=Error[c],k.item=function(a){returnthis[a]||null},k.contains=function(a){returna+="",i(this,a)!==-1},k.add=function(a){a+="",i(this,a)===-1&&(this.push(a),this._updateClassName())},k.remove=function(a){a+="";varb=i(this,a);b!==-1&&(this.splice(b,1),this._updateClassName())},k.toggle=function(a){a+="",i(this,a)===-1?this.add(a):this.remove(a)},k.toString=function(){returnthis.join(" ")};if(e.defineProperty){varm={get:l,enumerable:!0,configurable:!0};try{e.defineProperty(d,b,m)}catch(n){n.number===-2146823252&&(m.enumerable=!1,e.defineProperty(d,b,m))}}elsee[c].__defineGet
this.seriesPathFactory()).attr("class","area"),this.stroke&&b.append("svg:path").attr("d",this.seriesStrokeFactory()).attr("class","line");varc=0;a.series.forEach(function(a){if(a.disabled)return;a.path=b[0][c++],this._styleSeries(a)},this)},_styleSeries:function(a){if(!a.path)return;d3.select(a.path).select(".area").attr("fill",a.color),this.stroke&&d3.select(a.path).select(".line").attr("fill","none").attr("stroke",a.stroke||d3.interpolateRgb(a.color,"black")(.125)).attr("stroke-width",this.strokeWidth),a.className&&a.path.setAttribute("class",a.className)}}),Rickshaw.namespace("Rickshaw.Graph.Renderer.ScatterPlot"),Rickshaw.Graph.Renderer.ScatterPlot=Rickshaw.Class.create(Rickshaw.Graph.Renderer,{name:"scatterplot",defaults:function($super){returnRickshaw.extend($super(),{unstack:!0,fill:!0,stroke:!1,padding:{top:.01,right:.01,bottom:.01,left:.01},dotSize:4})},initialize:function($super,a){$super(a)},render:function(){vara=this.graph;a.vis.selectAll("*").remove(),a.series.forEach(function(b){if(b.disabled)return;varc=a.vis.selectAll("path").data(b.stack).enter().append("svg:circle").attr("cx",function(b){returna.x(b.x)}).attr("cy",function(b){returna.y(b.y)}).attr("r",function(b){return"r"inb?b.r:a.renderer.dotSize});Array.prototype.forEach.call(c[0],function(a){a.setAttribute("fill",b.color)})},this)}}),Rickshaw.namespace("Rickshaw.Graph.Smoother"),Rickshaw.Graph.Smoother=function(a){this.graph=a.graph,this.element=a.element;varb=this;this.aggregationScale=1,this.element&&$(function(){$(b.element).slider({min:1,max:100,slide:function(a,c){b.setScale(c.value),b.graph.update()}})}),b.graph.stackData.hooks.data.push({name:"smoother",orderPosition:50,f:function(a){varc=[];returna.forEach(function(a){vard=[];while(a.length){vare=0,f=0,g=a.splice(0,b.aggregationScale);g.forEach(function(a){e+=a.x/g.length,f+=a.y/g.length}),d.push({x:e,y:f})}c.push(d)}),c}}),this.setScale=function(a){if(a<1)throw"scale out of range: "+a;this.aggregationScale=a,this.graph.update()}},Rickshaw.namespace("Rickshaw.Graph.Unstacker"),Rickshaw.Graph.Unstacker=function(a){this.graph=a.graph;varb=this;this.graph.stackData.hooks.after.push({name:"unstacker",f:function(a){returnb.graph.renderer.unstack?(a.forEach(function(a){a.forEach(function(a){a.y0=0})}),a):a}})},Rickshaw.namespace("Rickshaw.Series"),Rickshaw.Series=Rickshaw.Class.create(Array,{initialize:function(a,b,c){c=c||{},this.palette=newRickshaw.Color.Palette(b),this.timeBase=typeofc.timeBase=="undefined"?Math.floor((newDate).getTime()/1e3):c.timeBase;vard=typeofc.timeInterval=="undefined"?1e3:c.timeInterval;this.setTimeInterval(d),a&&typeofa=="object"&&ainstanceofArray&&a.forEach(function(a){this.addItem(a)},this)},addItem:function(a){if(typeofa.name=="undefined")throw"addItem() needs a name";a.color=a.color||this.palette.color(a.name),a.data=a.data||[],a.data.length==0&&this.length&&this.getIndex()>0?this[0].data.forEach(function(b){a.data.push({x:b.x,y:0})}):a.data.length==0&&a.data.push({x:this.timeBase-(this.timeInterval||0),y:0}),this.push(a),this.legend&&this.legend.addLine(this.itemByName(a.name))},addData:function(a){varb=this.getIndex();Rickshaw.keys(a).forEach(function(a){this.itemByName(a)||this.addItem({name:a})},this),this.forEach(function(c){c.data.push({x:(b*this.timeInterval||1)+this.timeBase,y:a[c.name]||0})},this)},getIndex:function(){returnthis[0]&&this[0].data&&this[0].data.length?this[0].data.length:0},itemByName:function(a){for(varb=0;b<this.length;b++)if(this[b].name==a)returnthis[b]},setTimeInterval:function(a){this.timeInterval=a/1e3},setTimeBase:function(a){this.timeBase=a},dump:function(){vara={timeBase:this.timeBase,timeInterval:this.timeInterval,items:[]};returnthis.forEach(function(b){varc={color:b.color,name:b.name,data:[]};b.data.forEach(function(a){c.data.push({x:a.x,y:a.y})}),a.items.push(c)}),a},load:function(a){a.timeInterval&&(this.timeInterval=a.timeInterval),a.timeBase&&(this.timeBase=a.timeBase),a.items&&a.items.forEach(function(a){this.push(a),this.legend&&this.legend.addLine(this.itemByName(a.name))},this)}}),Rickshaw