(function(){function i(e){var t=-1,n=e.length,r=[];while(++t=0?e.substring(t):(t=e.length,""),r=[];while(t>0)r.push(e.substring(t-=3,t+3));return r.reverse().join(",")+n}function S(e,t){return{scale:Math.pow(10,(8-t)*3),symbol:e}}function k(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function L(e){return function(t){return 1-e(1-t)}}function A(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function O(e){return e}function M(e){return function(t){return Math.pow(t,e)}}function _(e){return 1-Math.cos(e*Math.PI/2)}function D(e){return Math.pow(2,10*(e-1))}function P(e){return 1-Math.sqrt(1-e*e)}function H(e,t){var n;return arguments.length<2&&(t=.45),arguments.length<1?(e=1,n=t/4):n=t/(2*Math.PI)*Math.asin(1/e),function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*Math.PI/t)}}function B(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function j(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function F(){d3.event.stopPropagation(),d3.event.preventDefault()}function q(e){return e=="transform"?d3.interpolateTransform:d3.interpolate}function R(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function U(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function z(e,t,n){return new W(e,t,n)}function W(e,t,n){this.r=e,this.g=t,this.b=n}function X(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function V(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(J(u[0]),J(u[1]),J(u[2]))}}return(a=K[e])?t(a.r,a.g,a.b):(e!=null&&e.charAt(0)==="#"&&(e.length===4?(r=e.charAt(1),r+=r,i=e.charAt(2),i+=i,s=e.charAt(3),s+=s):e.length===7&&(r=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7)),r=parseInt(r,16),i=parseInt(i,16),s=parseInt(s,16)),t(r,i,s))}function $(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;return s?(u=a<.5?s/(i+r):s/(2-i-r),e==i?o=(t-n)/s+(t360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}function o(e){return Math.round(s(e)*255)}var r,i;return e%=360,e<0&&(e+=360),t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,i=n<=.5?n*(1+t):n+t-n*t,r=2*n-i,z(o(e+120),o(e),o(e-120))}function et(e){return u(e,rt),e}function it(e){return function(){return tt(e,this)}}function st(e){return function(){return nt(e,this)}}function ut(e,t){function s(){if(t=this.classList)return t.add(e);var t=this.className,r=t.baseVal!=null,i=r?t.baseVal:t;n.lastIndex=0,n.test(i)||(i=h(i+" "+e),r?t.baseVal=i:this.className=i)}function o(){if(t=this.classList)return t.remove(e);var t=this.className,r=t.baseVal!=null,i=r?t.baseVal:t;i=h(i.replace(n," ")),r?t.baseVal=i:this.className=i}function u(){(t.apply(this,arguments)?s:o).call(this)}var n=new RegExp("(^|\\s+)"+d3.requote(e)+"(\\s+|$)","g");if(arguments.length<2){var r=this.node();if(i=r.classList)return i.contains(e);var i=r.className;return n.lastIndex=0,n.test(i.baseVal!=null?i.baseVal:i)}return this.each(typeof t=="function"?u:t?s:o)}function at(e){return{__data__:e}}function ft(e){return arguments.length||(e=d3.ascending),function(t,n){return e(t&&t.__data__,n&&n.__data__)}}function ct(e){return u(e,ht),e}function pt(e,t,n){u(e,gt);var r={},i=d3.dispatch("start","end"),s=wt;return e.id=t,e.time=n,e.tween=function(t,n){return arguments.length<2?r[t]:(n==null?delete r[t]:r[t]=n,e)},e.ease=function(t){return arguments.length?(s=typeof t=="function"?t:d3.ease.apply(d3,arguments),e):s},e.each=function(t,n){return arguments.length<2?Et.call(e,t):(i.on(t,n),e)},d3.timer(function(o){return e.each(function(u,a,f){function v(e){if(d.active>t)return g();d.active=t;for(var s in r)(s=r[s].call(c,u,a))&&l.push(s);return i.start.call(c,u,a),m(e)||d3.timer(m,0,n),1}function m(e){if(d.active!==t)return g();var n=(e-h)/p,r=s(n),o=l.length;while(o>0)l[--o].call(c,r);if(n>=1)return g(),bt=t,i.end.call(c,u,a),bt=0,1}function g(){return--d.count||delete c.__transition__,1}var l=[],c=this,h=e[f][a].delay,p=e[f][a].duration,d=c.__transition__||(c.__transition__={active:0,count:0});++d.count,h<=o?v(o):d3.timer(v,h,n)}),1},0,n),e}function vt(e,t,n){return n!=""&&dt}function mt(e,t){function r(e,r,i){var s=t.call(this,e,r);return s==null?i!=""&&dt:i!=s&&n(i,s)}function i(e,r,i){return i!=t&&n(i,t)}var n=q(e);return typeof t=="function"?r:t==null?vt:(t+="",i)}function Et(e){for(var t=0,n=this.length;t=n.delay&&(n.flush=n.callback(e)),n=n.next;var r=Ct()-t;r>24?(isFinite(r)&&(clearTimeout(Tt),Tt=setTimeout(Nt,r)),xt=0):(xt=1,kt(Nt))}function Ct(){var e=null,t=St,n=Infinity;while(t)t.flush?t=e?e.next=t.next:St=t.next:(n=Math.min(n,t.then+t.delay),t=(e=t).next);return n}function Lt(e){var t=[e.a,e.b],n=[e.c,e.d],r=Ot(t),i=At(t,n),s=Ot(Mt(n,t,-i));this.translate=[e.e,e.f],this.rotate=Math.atan2(e.b,e.a)*Dt,this.scale=[r,s||0],this.skew=s?i/s*Dt:0}function At(e,t){return e[0]*t[0]+e[1]*t[1]}function Ot(e){var t=Math.sqrt(At(e,e));return e[0]/=t,e[1]/=t,t}function Mt(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function Pt(){}function Ht(e){var t=e[0],n=e[e.length-1];return t0;f--)i.push(n(s)*f)}else{for(;sa;o--);i=i.slice(s,o)}return i},r.tickFormat=function(e,i){arguments.length<2&&(i=$t);if(arguments.length<1)return i;var s=e/r.ticks().length,o=t===Kt?(u=-1e-15,Math.floor):(u=1e-15,Math.ceil),u;return function(e){return e/n(o(t(e)+u))1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f9&&(s=n*3/Math.sqrt(s),o[u]=s*r,o[u+1]=s*i));u=-1;while(++u<=a)s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),t.push([s||0,o[u]*s||0]);return t}function jn(e){return e.length<3?gn(e):e[0]+xn(e,Bn(e))}function Fn(e){var t,n=-1,r=e.length,i,s;while(++n1){var r=Ht(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s0;)(f=+t[s]-a*u)>=r[0]&&i.push(f);for(--s,a=0;++at?1:e>=t?0:NaN},d3.descending=function(e,t){return te?1:t>=e?0:NaN},d3.mean=function(e,t){var n=e.length,r,i=0,s=-1,o=0;if(arguments.length===1)while(++s1&&(e=e.map(t)),e=e.filter(f),e.length?d3.quantile(e.sort(d3.ascending),.5):undefined},d3.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++ns&&(i=s)}else{while(++ns&&(i=s)}return i},d3.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++ni&&(i=s)}else{while(++ni&&(i=s)}return i},d3.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++ns&&(i=s),os&&(i=s),o1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}}},d3.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1)while(++s>1;e[i]>1;t0&&(i=s);return i},d3.last=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n=t.length)return i?i.call(e,n):r?n.sort(r):n;var u=-1,a=n.length,f=t[o++],l,c,h={};while(++u=t.length)return e;var i=[],s=n[r++],u;for(u in e)i.push({key:u,values:o(e[u],r)});return s&&i.sort(function(e,t){return s(e.key,t.key)}),i}var e={},t=[],n=[],r,i;return e.map=function(e){return s(e,0)},e.entries=function(e){return o(s(e,0),0)},e.key=function(n){return t.push(n),e},e.sortKeys=function(r){return n[t.length-1]=r,e},e.sortValues=function(t){return r=t,e},e.rollup=function(t){return i=t,e},e},d3.keys=function(e){var t=[];for(var n in e)t.push(n);return t},d3.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},d3.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},d3.permute=function(e,t){var n=[],r=-1,i=t.length;while(++rt)r.push(s);else while((s=e+n*++i)0&&(r=e.substring(n+1),e=e.substring(0,n)),this[e].on(r,t)},d3.format=function(e){var t=m.exec(e),n=t[1]||" ",r=t[3]||"",i=t[5],s=+t[6],o=t[7],u=t[8],a=t[9],f=1,l="",c=!1;u&&(u=+u.substring(1)),i&&(n="0",o&&(s-=Math.floor((s-1)/4)));switch(a){case"n":o=!0,a="g";break;case"%":f=100,l="%",a="f";break;case"p":f=100,l="%",a="r";break;case"d":c=!0,u=0;break;case"s":f=-1,a="r"}return a=="r"&&!u&&(a="g"),a=g[a]||b,function(e){if(c&&e%1)return"";var t=e<0&&(e=-e)?"\u2212":r;if(f<0){var h=d3.formatPrefix(e,u);e*=h.scale,l=h.symbol}else e*=f;e=a(e,u);if(i){var p=e.length+t.length;p=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,g={g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return d3.round(e,t=y(e,t)).toFixed(Math.max(0,Math.min(20,t)))}},E=["y","z","a","f","p","n","\u03bc","m","","k","M","G","T","P","E","Z","Y"].map(S);d3.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=d3.round(e,y(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,Math.floor((n<=0?n+1:n-1)/3)*3))),E[8+n/3]};var x=M(2),T=M(3),N={linear:function(){return O},poly:M,quad:function(){return x},cubic:function(){return T},sin:function(){return _},exp:function(){return D},circle:function(){return P},elastic:H,back:B,bounce:function(){return j}},C={"in":function(e){return e},out:L,"in-out":A,"out-in":function(e){return A(L(e))}};d3.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return k(C[r](N[n].apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.interpolate=function(e,t){var n=d3.interpolators.length,r;while(--n>=0&&!(r=d3.interpolators[n](e,t)));return r},d3.interpolateNumber=function(e,t){return t-=e,function(n){return e+t*n}},d3.interpolateRound=function(e,t){return t-=e,function(n){return Math.round(e+t*n)}},d3.interpolateString=function(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;I.lastIndex=0;for(r=0;n=I.exec(t);++r)n.index&&u.push(t.substring(s,o=n.index)),a.push({i:u.length,x:n[0]}),u.push(null),s=I.lastIndex;s1){while(++i0&&(e=e.substring(0,i)),arguments.length<2?(i=this.node()[r])&&i._:this.each(function(i,s){function u(e){var n=d3.event;d3.event=e;try{t.call(o,o.__data__,s)}finally{d3.event=n}}var o=this;o[r]&&o.removeEventListener(e,o[r],n),t&&o.addEventListener(e,o[r]=u,n),u._=t})},rt.each=function(e){for(var t=-1,n=this.length;++t=un?i?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+i+"A"+i+","+i+" 0 1,0 0,"+ -i+"A"+i+","+i+" 0 1,0 0,"+i+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":i?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+i*h+","+i*p+"A"+i+","+i+" 0 "+f+",0 "+i*l+","+i*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var e=an,t=fn,n=ln,r=cn;return i.innerRadius=function(t){return arguments.length?(e=d3.functor(t),i):e},i.outerRadius=function(e){return arguments.length?(t=d3.functor(e),i):t},i.startAngle=function(e){return arguments.length?(n=d3.functor(e),i):n},i.endAngle=function(e){return arguments.length?(r=d3.functor(e),i):r},i.centroid=function(){var i=(e.apply(this,arguments)+t.apply(this,arguments))/2,s=(n.apply(this,arguments)+r.apply(this,arguments))/2+on;return[Math.cos(s)*i,Math.sin(s)*i]},i};var on=-Math.PI/2,un=2*Math.PI-1e-6;d3.svg.line=function(){return hn(Object)};var mn={linear:gn,"step-before":yn,"step-after":bn,basis:Nn,"basis-open":Cn,"basis-closed":kn,bundle:Ln,cardinal:Sn,"cardinal-open":wn,"cardinal-closed":En,monotone:jn},On=[0,2/3,1/3,0],Mn=[0,1/3,2/3,0],_n=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var e=hn(Fn);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},yn.reverse=bn,bn.reverse=yn,d3.svg.area=function(){return In(Object)},d3.svg.area.radial=function(){var e=In(Fn);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},d3.svg.chord=function(){function s(n,r){var i=o(this,e,n,r),s=o(this,t,n,r);return"M"+i.p0+a(i.r,i.p1)+(u(i,s)?f(i.r,i.p1,i.r,i.p0):f(i.r,i.p1,s.r,s.p0)+a(s.r,s.p1)+f(s.r,s.p1,i.r,i.p0))+"Z"}function o(e,t,s,o){var u=t.call(e,s,o),a=n.call(e,u,o),f=r.call(e,u,o)+on,l=i.call(e,u,o)+on;return{r:a,a0:f,a1:l,p0:[a*Math.cos(f),a*Math.sin(f)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function u(e,t){return e.a0==t.a0&&e.a1==t.a1}function a(e,t){return"A"+e+","+e+" 0 0,1 "+t}function f(e,t,n,r){return"Q 0,0 "+r}var e=Un,t=zn,n=Wn,r=ln,i=cn;return s.radius=function(e){return arguments.length?(n=d3.functor(e),s):n},s.source=function(t){return arguments.length?(e=d3.functor(t),s):e},s.target=function(e){return arguments.length?(t=d3.functor(e),s):t},s.startAngle=function(e){return arguments.length?(r=d3.functor(e),s):r},s.endAngle=function(e){return arguments.length?(i=d3.functor(e),s):i},s},d3.svg.diagonal=function(){function r(r,i){var s=e.call(this,r,i),o=t.call(this,r,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(n),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var e=Un,t=zn,n=$n;return r.source=function(t){return arguments.length?(e=d3.functor(t),r):e},r.target=function(e){return arguments.length?(t=d3.functor(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},d3.svg.diagonal.radial=function(){var e=d3.svg.diagonal(),t=$n,n=e.projection;return e.projection=function(e){return arguments.length?n(Jn(t=e)):t},e},d3.svg.mouse=function(e){return Qn(e,d3.event)};var Kn=/WebKit/.test(navigator.userAgent)?-1:0;d3.svg.touches=function(e,t){return arguments.length<2&&(t=d3.event.touches),t?r(t).map(function(t){var n=Qn(e,t);return n.identifier=t.identifier,n}):[]},d3.svg.symbol=function(){function n(n,r){return(Zn[e.call(this,n,r)]||Zn.circle)(t.call(this,n,r))}var e=Yn,t=Gn;return n.type=function(t){return arguments.length?(e=d3.functor(t),n):e},n.size=function(e){return arguments.length?(t=d3.functor(e),n):t},n};var Zn={circle:function(e){var t=Math.sqrt(e/Math.PI);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"},cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*tr)),n=t*tr;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/er),n=t*er/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/er),n=t*er/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}};d3.svg.symbolTypes=d3.keys(Zn);var er=Math.sqrt(3),tr=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function f(f){f.each(function(l,c,h){var p=d3.select(this),d=f.delay?function(e){var t=bt;try{return bt=f.id,e.transition().delay(f[h][c].delay).duration(f[h][c].duration).ease(f.ease())}finally{bt=t}}:Object,v=e.ticks.apply(e,o),m=u==null?e.tickFormat.apply(e,o):u,g=ir(e,v,a),y=p.selectAll(".minor").data(g,String),b=y.enter().insert("svg:line","g").attr("class","tick minor").style("opacity",1e-6),w=d(y.exit()).style("opacity",1e-6).remove(),E=d(y).style("opacity",1),S=p.selectAll("g").data(v,String),x=S.enter().insert("svg:g","path").style("opacity",1e-6),T=d(S.exit()).style("opacity",1e-6).remove(),N=d(S).style("opacity",1),C,k=Ht(e.range()),L=p.selectAll(".domain").data([0]),A=L.enter().append("svg:path").attr("class","domain"),O=d(L),M=this.__chart__||e;this.__chart__=e.copy(),x.append("svg:line").attr("class","tick"),x.append("svg:text"),N.select("text").text(m);switch(t){case"bottom":C=nr,E.attr("x2",0).attr("y2",r),N.select("line").attr("x2",0).attr("y2",n),N.select("text").attr("x",0).attr("y",Math.max(n,0)+s).attr("dy",".71em").attr("text-anchor","middle"),O.attr("d","M"+k[0]+","+i+"V0H"+k[1]+"V"+i);break;case"top":C=nr,E.attr("x2",0).attr("y2",-r),N.select("line").attr("x2",0).attr("y2",-n),N.select("text").attr("x",0).attr("y",-(Math.max(n,0)+s)).attr("dy","0em").attr("text-anchor","middle"),O.attr("d","M"+k[0]+","+ -i+"V0H"+k[1]+"V"+ -i);break;case"left":C=rr,E.attr("x2",-r).attr("y2",0),N.select("line").attr("x2",-n).attr("y2",0),N.select("text").attr("x",-(Math.max(n,0)+s)).attr("y",0).attr("dy",".32em").attr("text-anchor","end"),O.attr("d","M"+ -i+","+k[0]+"H0V"+k[1]+"H"+ -i);break;case"right":C=rr,E.attr("x2",r).attr("y2",0),N.select("line").attr("x2",n).attr("y2",0),N.select("text").attr("x",Math.max(n,0)+s).attr("y",0).attr("dy",".32em").attr("text-anchor","start"),O.attr("d","M"+i+","+k[0]+"H0V"+k[1]+"H"+i)}x.call(C,M),N.call(C,e),T.call(C,e),b.call(C,M),E.call(C,e),w.call(C,e)})}var e=d3.scale.linear(),t="bottom",n=6,r=6,i=6,s=3,o=[10],u,a=0;return f.scale=function(t){return arguments.length?(e=t,f):e},f.orient=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return arguments.length?(o=arguments,f):o},f.tickFormat=function(e){return arguments.length?(u=e,f):u},f.tickSize=function(e,t,s){if(!arguments.length)return n;var o=arguments.length-1;return n=+e,r=o>1?+t:n,i=o>0?+arguments[o]:n,f},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.tickSubdivide=function(e){return arguments.length?(a=+e,f):a},f},d3.svg.brush=function(){function i(e){var o=t&&n?["n","e","s","w","nw","ne","se","sw"]:t?["e","w"]:n?["n","s"]:[];e.each(function(){var e=d3.select(this).on("mousedown.brush",s),u=e.selectAll(".background").data([,]),a=e.selectAll(".extent").data([,]),f=e.selectAll(".resize").data(o,String),l;u.enter().append("svg:rect").attr("class","background").style("visibility","hidden").style("pointer-events","all").style("cursor","crosshair"),a.enter().append("svg:rect").attr("class","extent").style("cursor","move"),f.enter().append("svg:rect").attr("class",function(e){return"resize "+e}).attr("width",6).attr("height",6).style("visibility","hidden").style("pointer-events",i.empty()?"none":"all").style("cursor",function(e){return Sr[e]}),f.exit().remove(),t&&(l=Ht(t.range()),u.attr("x",l[0]).attr("width",l[1]-l[0]),vr(e,r)),n&&(l=Ht(n.range()),u.attr("y",l[0]).attr("height",l[1]-l[0]),mr(e,r))})}function s(){var e=d3.select(d3.event.target);sr=i,ur=this,lr=r,dr=d3.svg.mouse(ur),(cr=e.classed("extent"))?(dr[0]=r[0][0]-dr[0],dr[1]=r[0][1]-dr[1]):e.classed("resize")?(hr=d3.event.target.__data__,dr[0]=r[+/w$/.test(hr)][0],dr[1]=r[+/^n/.test(hr)][1]):d3.event.altKey&&(pr=dr.slice()),ar=!/^(n|s)$/.test(hr)&&t,fr=!/^(e|w)$/.test(hr)&&n,or=o(this,arguments),or("brushstart"),br(),F()}function o(t,n){return function(r){var s=d3.event;try{d3.event={type:r,target:i},e[r].apply(t,n)}finally{d3.event=s}}}var e=d3.dispatch("brushstart","brush","brushend"),t,n,r=[[0,0],[0,0]];return i.x=function(e){return arguments.length?(t=e,i):t},i.y=function(e){return arguments.length?(n=e,i):n},i.extent=function(e){var s,o,u,a,f;return arguments.length?(t&&(s=e[0],o=e[1],n&&(s=s[0],o=o[0]),s=t(s),o=t(o),o