// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.0 - JavaScript Vector Library                          │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com)    │ \\
// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com)              │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\
// └────────────────────────────────────────────────────────────────────┘ \\
// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\
// │ Eve 0.3.4 - JavaScript Events Library                                                │ \\
// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\
// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/)          │ \\
// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\
// └──────────────────────────────────────────────────────────────────────────────────────┘ \\
(function(e){var t="0.3.4",n="hasOwnProperty",r=/[\.\/]/,i="*",s=function(){},o=function(e,t){return e-t},u,a,f={n:{}},l=function(e,t){var n=f,r=a,i=Array.prototype.slice.call(arguments,2),s=l.listeners(e),c=0,h=!1,p,d=[],v={},m=[],g=u,y=[];u=e,a=0;for(var b=0,w=s.length;b<w;b++)"zIndex"in s[b]&&(d.push(s[b].zIndex),s[b].zIndex<0&&(v[s[b].zIndex]=s[b]));d.sort(o);while(d[c]<0){p=v[d[c++]],m.push(p.apply(t,i));if(a)return a=r,m}for(b=0;b<w;b++){p=s[b];if("zIndex"in p)if(p.zIndex==d[c]){m.push(p.apply(t,i));if(a)break;do{c++,p=v[d[c]],p&&m.push(p.apply(t,i));if(a)break}while(p)}else v[p.zIndex]=p;else{m.push(p.apply(t,i));if(a)break}}return a=r,u=g,m.length?m:null};l.listeners=function(e){var t=e.split(r),n=f,s,o,u,a,l,c,h,p,d=[n],v=[];for(a=0,l=t.length;a<l;a++){p=[];for(c=0,h=d.length;c<h;c++){n=d[c].n,o=[n[t[a]],n[i]],u=2;while(u--)s=o[u],s&&(p.push(s),v=v.concat(s.f||[]))}d=p}return v},l.on=function(e,t){var n=e.split(r),i=f;for(var o=0,u=n.length;o<u;o++)i=i.n,!i[n[o]]&&(i[n[o]]={n:{}}),i=i[n[o]];i.f=i.f||[];for(o=0,u=i.f.length;o<u;o++)if(i.f[o]==t)return s;return i.f.push(t),function(e){+e==+e&&(t.zIndex=+e)}},l.stop=function(){a=1},l.nt=function(e){return e?(new RegExp("(?:\\.|\\/|^)"+e+"(?:\\.|\\/|$)")).test(u):u},l.off=l.unbind=function(e,t){var s=e.split(r),o,u,a,l,c,h,p,d=[f];for(l=0,c=s.length;l<c;l++)for(h=0;h<d.length;h+=a.length-2){a=[h,1],o=d[h].n;if(s[l]!=i)o[s[l]]&&a.push(o[s[l]]);else for(u in o)o[n](u)&&a.push(o[u]);d.splice.apply(d,a)}for(l=0,c=d.length;l<c;l++){o=d[l];while(o.n){if(t){if(o.f){for(h=0,p=o.f.length;h<p;h++)if(o.f[h]==t){o.f.splice(h,1);break}!o.f.length&&delete o.f}for(u in o.n)if(o.n[n](u)&&o.n[u].f){var v=o.n[u].f;for(h=0,p=v.length;h<p;h++)if(v[h]==t){v.splice(h,1);break}!v.length&&delete o.n[u].f}}else{delete o.f;for(u in o.n)o.n[n](u)&&o.n[u].f&&delete o.n[u].f}o=o.n}}},l.once=function(e,t){var n=function(){var r=t.apply(this,arguments);return l.unbind(e,n),r};return l.on(e,n)},l.version=t,l.toString=function(){return"You are running Eve "+t},typeof module!="undefined"&&module.exports?module.exports=l:typeof define!="undefined"?define("eve",[],function(){return l}):e.eve=l})(this),function(){function e(n){if(e.is(n,"function"))return t?n():eve.on("raphael.DOMload",n);if(e.is(n,O))return e._engine.create[h](e,n.splice(0,3+e.is(n[0],L))).add(n);var r=Array.prototype.slice.call(arguments,0);if(e.is(r[r.length-1],"function")){var i=r.pop();return t?i.call(e._engine.create[h](e,r)):eve.on("raphael.DOMload",function(){i.call(e._engine.create[h](e,r))})}return e._engine.create[h](e,arguments)}function ht(e){if(Object(e)!==e)return e;var t=new e.constructor;for(var n in e)e[o](n)&&(t[n]=ht(e[n]));return t}function wt(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return e.push(e.splice(n,1)[0])}function Et(e,t,n){function r(){var i=Array.prototype.slice.call(arguments,0),s=i.join("␀"),u=r.cache=r.cache||{},a=r.count=r.count||[];return u[o](s)?(wt(a,s),n?n(u[s]):u[s]):(a.length>=1e3&&delete u[a.shift()],a.push(s),u[s]=e[h](t,i),n?n(u[s]):u[s])}return r}function xt(){return this.hex}function Tt(e,t){var n=[];for(var r=0,i=e.length;i-2*!t>r;r+=2){var s=[{x:+e[r-2],y:+e[r-1]},{x:+e[r],y:+e[r+1]},{x:+e[r+2],y:+e[r+3]},{x:+e[r+4],y:+e[r+5]}];t?r?i-4==r?s[3]={x:+e[0],y:+e[1]}:i-2==r&&(s[2]={x:+e[0],y:+e[1]},s[3]={x:+e[2],y:+e[3]}):s[0]={x:+e[i-2],y:+e[i-1]}:i-4==r?s[3]=s[2]:r||(s[0]={x:+e[r],y:+e[r+1]}),n.push(["C",(-s[0].x+6*s[1].x+s[2].x)/6,(-s[0].y+6*s[1].y+s[2].y)/6,(s[1].x+6*s[2].x-s[3].x)/6,(s[1].y+6*s[2].y-s[3].y)/6,s[2].x,s[2].y])}return n}function Ct(e,t,n,r,i){var s=-3*t+9*n-9*r+3*i,o=e*s+6*t-12*n+6*r;return e*o-3*t+3*n}function kt(e,t,n,r,i,s,o,u,a){a==null&&(a=1),a=a>1?1:a<0?0:a;var f=a/2,l=12,c=[-0.1252,.1252,-0.3678,.3678,-0.5873,.5873,-0.7699,.7699,-0.9041,.9041,-0.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0;for(var d=0;d<l;d++){var v=f*c[d]+f,m=Ct(v,e,n,i,o),g=Ct(v,t,r,s,u),y=m*m+g*g;p+=h[d]*S.sqrt(y)}return f*p}function Lt(e,t,n,r,i,s,o,u,a){if(a<0||kt(e,t,n,r,i,s,o,u)<a)return;var f=1,l=f/2,c=f-l,h,p=.01;h=kt(e,t,n,r,i,s,o,u,c);while(N(h-a)>p)l/=2,c+=(h<a?1:-1)*l,h=kt(e,t,n,r,i,s,o,u,c);return c}function At(e,t,n,r,i,s,o,u){if(x(e,n)<T(i,o)||T(e,n)>x(i,o)||x(t,r)<T(s,u)||T(t,r)>x(s,u))return;var a=(e*r-t*n)*(i-o)-(e-n)*(i*u-s*o),f=(e*r-t*n)*(s-u)-(t-r)*(i*u-s*o),l=(e-n)*(s-u)-(t-r)*(i-o);if(!l)return;var c=a/l,h=f/l,p=+c.toFixed(2),d=+h.toFixed(2);if(p<+T(e,n).toFixed(2)||p>+x(e,n).toFixed(2)||p<+T(i,o).toFixed(2)||p>+x(i,o).toFixed(2)||d<+T(t,r).toFixed(2)||d>+x(t,r).toFixed(2)||d<+T(s,u).toFixed(2)||d>+x(s,u).toFixed(2))return;return{x:c,y:h}}function Ot(e,t){return _t(e,t)}function Mt(e,t){return _t(e,t,1)}function _t(t,n,r){var i=e.bezierBBox(t),s=e.bezierBBox(n);if(!e.isBBoxIntersect(i,s))return r?0:[];var o=kt.apply(0,t),u=kt.apply(0,n),a=~~(o/5),f=~~(u/5),l=[],c=[],h={},p=r?0:[];for(var d=0;d<a+1;d++){var v=e.findDotsAtSegment.apply(e,t.concat(d/a));l.push({x:v.x,y:v.y,t:d/a})}for(d=0;d<f+1;d++)v=e.findDotsAtSegment.apply(e,n.concat(d/f)),c.push({x:v.x,y:v.y,t:d/f});for(d=0;d<a;d++)for(var m=0;m<f;m++){var g=l[d],y=l[d+1],b=c[m],w=c[m+1],E=N(y.x-g.x)<.001?"y":"x",S=N(w.x-b.x)<.001?"y":"x",x=At(g.x,g.y,y.x,y.y,b.x,b.y,w.x,w.y);if(x){if(h[x.x.toFixed(4)]==x.y.toFixed(4))continue;h[x.x.toFixed(4)]=x.y.toFixed(4);var T=g.t+N((x[E]-g[E])/(y[E]-g[E]))*(y.t-g.t),C=b.t+N((x[S]-b[S])/(w[S]-b[S]))*(w.t-b.t);T>=0&&T<=1&&C>=0&&C<=1&&(r?p++:p.push({x:x.x,y:x.y,t1:T,t2:C}))}}return p}function Dt(t,n,r){t=e._path2curve(t),n=e._path2curve(n);var i,s,o,u,a,f,l,c,h,p,d=r?0:[];for(var v=0,m=t.length;v<m;v++){var g=t[v];if(g[0]=="M")i=a=g[1],s=f=g[2];else{g[0]=="C"?(h=[i,s].concat(g.slice(1)),i=h[6],s=h[7]):(h=[i,s,i,s,a,f,a,f],i=a,s=f);for(var y=0,b=n.length;y<b;y++){var w=n[y];if(w[0]=="M")o=l=w[1],u=c=w[2];else{w[0]=="C"?(p=[o,u].concat(w.slice(1)),o=p[6],u=p[7]):(p=[o,u,o,u,l,c,l,c],o=l,u=c);var E=_t(h,p,r);if(r)d+=E;else{for(var S=0,x=E.length;S<x;S++)E[S].segment1=v,E[S].segment2=y,E[S].bez1=h,E[S].bez2=p;d=d.concat(E)}}}}}return d}function tn(e,t,n,r,i,s){e!=null?(this.a=+e,this.b=+t,this.c=+n,this.d=+r,this.e=+i,this.f=+s):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function mn(){return this.x+m+this.y}function gn(){return this.x+m+this.y+m+this.width+" × "+this.height}function An(e,t,n,r,i,s){function h(e){return((a*e+u)*e+o)*e}function p(e,t){var n=d(e,t);return((c*n+l)*n+f)*n}function d(e,t){var n,r,i,s,f,l;for(i=e,l=0;l<8;l++){s=h(i)-e;if(N(s)<t)return i;f=(3*a*i+2*u)*i+o;if(N(f)<1e-6)break;i-=s/f}n=0,r=1,i=e;if(i<n)return n;if(i>r)return r;while(n<r){s=h(i);if(N(s-e)<t)return i;e>s?n=i:r=i,i=(r-n)/2+n}return i}var o=3*t,u=3*(r-t)-o,a=1-o-u,f=3*n,l=3*(i-n)-f,c=1-f-l;return p(e,1/(200*s))}function On(e,t){var n=[],r={};this.ms=t,this.times=1;if(e){for(var i in e)e[o](i)&&(r[U(i)]=e[i],n.push(U(i)));n.sort(rt)}this.anim=r,this.top=n[n.length-1],this.percents=n}function Mn(t,r,i,s,u,a){i=U(i);var f,l,c,h=[],d,v,m,b=t.ms,w={},E={},S={};if(s)for(T=0,N=Nn.length;T<N;T++){var x=Nn[T];if(x.el.id==r.id&&x.anim==t){x.percent!=i?(Nn.splice(T,1),c=1):l=x,r.attr(x.totalOrigin);break}}else s=+E;for(var T=0,N=t.percents.length;T<N;T++){if(t.percents[T]==i||t.percents[T]>s*t.top){i=t.percents[T],v=t.percents[T-1]||0,b=b/t.top*(i-v),d=t.percents[T+1],f=t.anim[i];break}s&&r.attr(t.anim[t.percents[T]])}if(!f)return;if(!l){for(var C in f)if(f[o](C))if(V[o](C)||r.paper.customAttributes[o](C)){w[C]=r.attr(C),w[C]==null&&(w[C]=X[C]),E[C]=f[C];switch(V[C]){case L:S[C]=(E[C]-w[C])/b;break;case"colour":w[C]=e.getRGB(w[C]);var k=e.getRGB(E[C]);S[C]={r:(k.r-w[C].r)/b,g:(k.g-w[C].g)/b,b:(k.b-w[C].b)/b};break;case"path":var A=zt(w[C],E[C]),O=A[1];w[C]=A[0],S[C]=[];for(T=0,N=w[C].length;T<N;T++){S[C][T]=[0];for(var M=1,_=w[C][T].length;M<_;M++)S[C][T][M]=(O[T][M]-w[C][T][M])/b}break;case"transform":var D=r._,P=en(D[C],E[C]);if(P){w[C]=P.from,E[C]=P.to,S[C]=[],S[C].real=!0;for(T=0,N=w[C].length;T<N;T++){S[C][T]=[w[C][T][0]];for(M=1,_=w[C][T].length;M<_;M++)S[C][T][M]=(E[C][T][M]-w[C][T][M])/b}}else{var H=r.matrix||new tn,B={_:{transform:D.transform},getBBox:function(){return r.getBBox(1)}};w[C]=[H.a,H.b,H.c,H.d,H.e,H.f],Yt(B,E[C]),E[C]=B._.transform,S[C]=[(B.matrix.a-H.a)/b,(B.matrix.b-H.b)/b,(B.matrix.c-H.c)/b,(B.matrix.d-H.d)/b,(B.matrix.e-H.e)/b,(B.matrix.f-H.f)/b]}break;case"csv":var j=g(f[C])[y](n),F=g(w[C])[y](n);if(C=="clip-rect"){w[C]=F,S[C]=[],T=F.length;while(T--)S[C][T]=(j[T]-w[C][T])/b}E[C]=j;break;default:j=[][p](f[C]),F=[][p](w[C]),S[C]=[],T=r.paper.customAttributes[C].length;while(T--)S[C][T]=((j[T]||0)-(F[T]||0))/b}}var q=f.easing,R=e.easing_formulas[q];if(!R){R=g(q).match(I);if(R&&R.length==5){var z=R;R=function(e){return An(e,+z[1],+z[2],+z[3],+z[4],b)}}else R=st}m=f.start||t.start||+(new Date),x={anim:t,percent:i,timestamp:m,start:m+(t.del||0),status:0,initstatus:s||0,stop:!1,ms:b,easing:R,from:w,diff:S,to:E,el:r,callback:f.callback,prev:v,next:d,repeat:a||t.times,origin:r.attr(),totalOrigin:u},Nn.push(x);if(s&&!l&&!c){x.stop=!0,x.start=new Date-b*s;if(Nn.length==1)return kn()}c&&(x.start=new Date-x.ms*s),Nn.length==1&&Cn(kn)}else l.initstatus=s,l.start=new Date-l.ms*s;eve("raphael.anim.start."+r.id,r,t)}function _n(e){for(var t=0;t<Nn.length;t++)Nn[t].el.paper==e&&Nn.splice(t--,1)}e.version="2.1.0",e.eve=eve;var t,n=/[, ]+/,r={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},i=/\{(\d+)\}/g,s="prototype",o="hasOwnProperty",u={doc:document,win:window},a={was:Object.prototype[o].call(u.win,"Raphael"),is:u.win.Raphael},f=function(){this.ca=this.customAttributes={}},l,c="appendChild",h="apply",p="concat",d="createTouch"in u.doc,v="",m=" ",g=String,y="split",b="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[y](m),w={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},E=g.prototype.toLowerCase,S=Math,x=S.max,T=S.min,N=S.abs,C=S.pow,k=S.PI,L="number",A="string",O="array",M="toString",_="fill",D=Object.prototype.toString,P={},H="push",B=e._ISURL=/^url\(['"]?([^\)]+?)['"]?\)$/i,j=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,F={NaN:1,Infinity:1,"-Infinity":1},I=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,q=S.round,R="setAttribute",U=parseFloat,z=parseInt,W=g.prototype.toUpperCase,X=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0},V=e._availableAnimAttrs={blur:L,"clip-rect":"csv",cx:L,cy:L,fill:"colour","fill-opacity":L,"font-size":L,height:L,opacity:L,path:"path",r:L,rx:L,ry:L,stroke:"colour","stroke-opacity":L,"stroke-width":L,transform:"transform",width:L,x:L,y:L},$=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]/g,J=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,K={hs:1,rg:1},Q=/,?([achlmqrstvxz]),?/gi,G=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,Y=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/ig,Z=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/ig,et=e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,tt={},nt=function(e,t){return e.key-t.key},rt=function(e,t){return U(e)-U(t)},it=function(){},st=function(e){return e},ot=e._rectPath=function(e,t,n,r,i){return i?[["M",e+i,t],["l",n-i*2,0],["a",i,i,0,0,1,i,i],["l",0,r-i*2],["a",i,i,0,0,1,-i,i],["l",i*2-n,0],["a",i,i,0,0,1,-i,-i],["l",0,i*2-r],["a",i,i,0,0,1,i,-i],["z"]]:[["M",e,t],["l",n,0],["l",0,r],["l",-n,0],["z"]]},ut=function(e,t,n,r){return r==null&&(r=n),[["M",e,t],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]]},at=e._getPath={path:function(e){return e.attr("path")},circle:function(e){var t=e.attrs;return ut(t.cx,t.cy,t.r)},ellipse:function(e){var t=e.attrs;return ut(t.cx,t.cy,t.rx,t.ry)},rect:function(e){var t=e.attrs;return ot(t.x,t.y,t.width,t.height,t.r)},image:function(e){var t=e.attrs;return ot(t.x,t.y,t.width,t.height)},text:function(e){var t=e._getBBox();return ot(t.x,t.y,t.width,t.height)}},ft=e.mapPath=function(e,t){if(!t)return e;var n,r,i,s,o,u,a;e=zt(e);for(i=0,o=e.length;i<o;i++){a=e[i];for(s=1,u=a.length;s<u;s+=2)n=t.x(a[s],a[s+1]),r=t.y(a[s],a[s+1]),a[s]=n,a[s+1]=r}return e};e._g=u,e.type=u.win.SVGAngle||u.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(e.type=="VML"){var lt=u.doc.createElement("div"),ct;lt.innerHTML='<v:shape adj="1"/>',ct=lt.firstChild,ct.style.behavior="url(#default#VML)";if(!ct||typeof ct.adj!="object")return e.type=v;lt=null}e.svg=!(e.vml=e.type=="VML"),e._Paper=f,e.fn=l=f.prototype=e.prototype,e._id=0,e._oid=0,e.is=function(e,t){return t=E.call(t),t=="finite"?!F[o](+e):t=="array"?e instanceof Array:t=="null"&&e===null||t==typeof e&&e!==null||t=="object"&&e===Object(e)||t=="array"&&Array.isArray&&Array.isArray(e)||D.call(e).slice(8,-1).toLowerCase()==t},e.angle=function(t,n,r,i,s,o){if(s==null){var u=t-r,a=n-i;return!u&&!a?0:(180+S.atan2(-a,-u)*180/k+360)%360}return e.angle(t,n,s,o)-e.angle(r,i,s,o)},e.rad=function(e){return e%360*k/180},e.deg=function(e){return e*180/k%360},e.snapTo=function(t,n,r){r=e.is(r,"finite")?r:10;if(e.is(t,O)){var i=t.length;while(i--)if(N(t[i]-n)<=r)return t[i]}else{t=+t;var s=n%t;if(s<r)return n-s;if(s>t-r)return n-s+t}return n};var pt=e.createUUID=function(e,t){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(e,t).toUpperCase()}}(/[xy]/g,function(e){var t=S.random()*16|0,n=e=="x"?t:t&3|8;return n.toString(16)});e.setWindow=function(t){eve("raphael.setWindow",e,u.win,t),u.win=t,u.doc=u.win.document,e._engine.initWin&&e._engine.initWin(u.win)};var dt=function(t){if(e.vml){var n=/^\s+|\s+$/g,r;try{var i=new ActiveXObject("htmlfile");i.write("<body>"),i.close(),r=i.body}catch(s){r=createPopup().document.body}var o=r.createTextRange();dt=Et(function(e){try{r.style.color=g(e).replace(n,v);var t=o.queryCommandValue("ForeColor");return t=(t&255)<<16|t&65280|(t&16711680)>>>16,"#"+("000000"+t.toString(16)).slice(-6)}catch(i){return"none"}})}else{var a=u.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",u.doc.body.appendChild(a),dt=Et(function(e){return a.style.color=e,u.doc.defaultView.getComputedStyle(a,v).getPropertyValue("color")})}return dt(t)},vt=function(){return"hsb("+[this.h,this.s,this.b]+")"},mt=function(){return"hsl("+[this.h,this.s,this.l]+")"},gt=function(){return this.hex},yt=function(t,n,r){n==null&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,n=t.g,t=t.r);if(n==null&&e.is(t,A)){var i=e.getRGB(t);t=i.r,n=i.g,r=i.b}if(t>1||n>1||r>1)t/=255,n/=255,r/=255;return[t,n,r]},bt=function(t,n,r,i){t*=255,n*=255,r*=255;var s={r:t,g:n,b:r,hex:e.rgb(t,n,r),toString:gt};return e.is(i,"finite")&&(s.opacity=i),s};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=gt,t},e.hsb2rgb=function(e,t,n,r){this.is(e,"object")&&"h"in e&&"s"in e&&"b"in e&&(n=e.b,t=e.s,e=e.h,r=e.o),e*=360;var i,s,o,u,a;return e=e%360/60,a=n*t,u=a*(1-N(e%2-1)),i=s=o=n-a,e=~~e,i+=[a,u,0,0,u,a][e],s+=[u,a,a,u,0,0][e],o+=[0,0,u,a,a,u][e],bt(i,s,o,r)},e.hsl2rgb=function(e,t,n,r){this.is(e,"object")&&"h"in e&&"s"in e&&"l"in e&&(n=e.l,t=e.s,e=e.h);if(e>1||t>1||n>1)e/=360,t/=100,n/=100;e*=360;var i,s,o,u,a;return e=e%360/60,a=2*t*(n<.5?n:1-n),u=a*(1-N(e%2-1)),i=s=o=n-a/2,e=~~e,i+=[a,u,0,0,u,a][e],s+=[u,a,a,u,0,0][e],o+=[0,0,u,a,a,u][e],bt(i,s,o,r)},e.rgb2hsb=function(e,t,n){n=yt(e,t,n),e=n[0],t=n[1],n=n[2];var r,i,s,o;return s=x(e,t,n),o=s-T(e,t,n),r=o==0?null:s==e?(t-n)/o:s==t?(n-e)/o+2:(e-t)/o+4,r=(r+360)%6*60/360,i=o==0?0:o/s,{h:r,s:i,b:s,toString:vt}},e.rgb2hsl=function(e,t,n){n=yt(e,t,n),e=n[0],t=n[1],n=n[2];var r,i,s,o,u,a;return o=x(e,t,n),u=T(e,t,n),a=o-u,r=a==0?null:o==e?(t-n)/a:o==t?(n-e)/a+2:(e-t)/a+4,r=(r+360)%6*60/360,s=(o+u)/2,i=a==0?0:s<.5?a/(2*s):a/(2-2*s),{h:r,s:i,l:s,toString:mt}},e._path2string=function(){return this.join(",").replace(Q,"$1")};var St=e._preload=function(e,t){var n=u.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){t.call(this),this.onload=null,u.doc.body.removeChild(this)},n.onerror=function(){u.doc.body.removeChild(this)},u.doc.body.appendChild(n),n.src=e};e.getRGB=Et(function(t){if(!t||!!((t=g(t)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:xt};if(t=="none")return{r:-1,g:-1,b:-1,hex:"none",toString:xt};!K[o](t.toLowerCase().substring(0,2))&&t.charAt()!="#"&&(t=dt(t));var n,r,i,s,u,a,f,l=t.match(j);return l?(l[2]&&(s=z(l[2].substring(5),16),i=z(l[2].substring(3,5),16),r=z(l[2].substring(1,3),16)),l[3]&&(s=z((a=l[3].charAt(3))+a,16),i=z((a=l[3].charAt(2))+a,16),r=z((a=l[3].charAt(1))+a,16)),l[4]&&(f=l[4][y](J),r=U(f[0]),f[0].slice(-1)=="%"&&(r*=2.55),i=U(f[1]),f[1].slice(-1)=="%"&&(i*=2.55),s=U(f[2]),f[2].slice(-1)=="%"&&(s*=2.55),l[1].toLowerCase().slice(0,4)=="rgba"&&(u=U(f[3])),f[3]&&f[3].slice(-1)=="%"&&(u/=100)),l[5]?(f=l[5][y](J),r=U(f[0]),f[0].slice(-1)=="%"&&(r*=2.55),i=U(f[1]),f[1].slice(-1)=="%"&&(i*=2.55),s=U(f[2]),f[2].slice(-1)=="%"&&(s*=2.55),(f[0].slice(-3)=="deg"||f[0].slice(-1)=="°")&&(r/=360),l[1].toLowerCase().slice(0,4)=="hsba"&&(u=U(f[3])),f[3]&&f[3].slice(-1)=="%"&&(u/=100),e.hsb2rgb(r,i,s,u)):l[6]?(f=l[6][y](J),r=U(f[0]),f[0].slice(-1)=="%"&&(r*=2.55),i=U(f[1]),f[1].slice(-1)=="%"&&(i*=2.55),s=U(f[2]),f[2].slice(-1)=="%"&&(s*=2.55),(f[0].slice(-3)=="deg"||f[0].slice(-1)=="°")&&(r/=360),l[1].toLowerCase().slice(0,4)=="hsla"&&(u=U(f[3])),f[3]&&f[3].slice(-1)=="%"&&(u/=100),e.hsl2rgb(r,i,s,u)):(l={r:r,g:i,b:s,toString:xt},l.hex="#"+(16777216|s|i<<8|r<<16).toString(16).slice(1),e.is(u,"finite")&&(l.opacity=u),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:xt}},e),e.hsb=Et(function(t,n,r){return e.hsb2rgb(t,n,r).hex}),e.hsl=Et(function(t,n,r){return e.hsl2rgb(t,n,r).hex}),e.rgb=Et(function(e,t,n){return"#"+(16777216|n|t<<8|e<<16).toString(16).slice(1)}),e.getColor=function(e){var t=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||.75},n=this.hsb2rgb(t.h,t.s,t.b);return t.h+=.075,t.h>1&&(t.h=0,t.s-=.2,t.s<=0&&(this.getColor.start={h:0,s:1,b:t.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=Nt(t);if(n.arr)return Ht(n.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return e.is(t,O)&&e.is(t[0],O)&&(i=Ht(t)),i.length||g(t).replace(G,function(e,t,n){var s=[],o=t.toLowerCase();n.replace(Z,function(e,t){t&&s.push(+t)}),o=="m"&&s.length>2&&(i.push([t][p](s.splice(0,2))),o="l",t=t=="m"?"l":"L");if(o=="r")i.push([t][p](s));else while(s.length>=r[o]){i.push([t][p](s.splice(0,r[o])));if(!r[o])break}}),i.toString=e._path2string,n.arr=Ht(i),i},e.parseTransformString=Et(function(t){if(!t)return null;var n={r:3,s:4,t:2,m:6},r=[];return e.is(t,O)&&e.is(t[0],O)&&(r=Ht(t)),r.length||g(t).replace(Y,function(e,t,n){var i=[],s=E.call(t);n.replace(Z,function(e,t){t&&i.push(+t)}),r.push([t][p](i))}),r.toString=e._path2string,r});var Nt=function(e){var t=Nt.ps=Nt.ps||{};return t[e]?t[e].sleep=100:t[e]={sleep:100},setTimeout(function(){for(var n in t)t[o](n)&&n!=e&&(t[n].sleep--,!t[n].sleep&&delete t[n])}),t[e]};e.findDotsAtSegment=function(e,t,n,r,i,s,o,u,a){var f=1-a,l=C(f,3),c=C(f,2),h=a*a,p=h*a,d=l*e+c*3*a*n+f*3*a*a*i+p*o,v=l*t+c*3*a*r+f*3*a*a*s+p*u,m=e+2*a*(n-e)+h*(i-2*n+e),g=t+2*a*(r-t)+h*(s-2*r+t),y=n+2*a*(i-n)+h*(o-2*i+n),b=r+2*a*(s-r)+h*(u-2*s+r),w=f*e+a*n,E=f*t+a*r,x=f*i+a*o,T=f*s+a*u,N=90-S.atan2(m-y,g-b)*180/k;return(m>y||g<b)&&(N+=180),{x:d,y:v,m:{x:m,y:g},n:{x:y,y:b},start:{x:w,y:E},end:{x:x,y:T},alpha:N}},e.bezierBBox=function(t,n,r,i,s,o,u,a){e.is(t,"array")||(t=[t,n,r,i,s,o,u,a]);var f=Ut.apply(null,t);return{x:f.min.x,y:f.min.y,x2:f.max.x,y2:f.max.y,width:f.max.x-f.min.x,height:f.max.y-f.min.y}},e.isPointInsideBBox=function(e,t,n){return t>=e.x&&t<=e.x2&&n>=e.y&&n<=e.y2},e.isBBoxIntersect=function(t,n){var r=e.isPointInsideBBox;return r(n,t.x,t.y)||r(n,t.x2,t.y)||r(n,t.x,t.y2)||r(n,t.x2,t.y2)||r(t,n.x,n.y)||r(t,n.x2,n.y)||r(t,n.x,n.y2)||r(t,n.x2,n.y2)||(t.x<n.x2&&t.x>n.x||n.x<t.x2&&n.x>t.x)&&(t.y<n.y2&&t.y>n.y||n.y<t.y2&&n.y>t.y)},e.pathIntersection=function(e,t){return Dt(e,t)},e.pathIntersectionNumber=function(e,t){return Dt(e,t,1)},e.isPointInsidePath=function(t,n,r){var i=e.pathBBox(t);return e.isPointInsideBBox(i,n,r)&&Dt(t,[["M",n,r],["H",i.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){eve("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Pt=e.pathBBox=function(e){var t=Nt(e);if(t.bbox)return t.bbox;if(!e)return{x:0,y:0,width:0,height:0,x2:0,y2:0};e=zt(e);var n=0,r=0,i=[],s=[],o;for(var u=0,a=e.length;u<a;u++){o=e[u];if(o[0]=="M")n=o[1],r=o[2],i.push(n),s.push(r);else{var f=Ut(n,r,o[1],o[2],o[3],o[4],o[5],o[6]);i=i[p](f.min.x,f.max.x),s=s[p](f.min.y,f.max.y),n=o[5],r=o[6]}}var l=T[h](0,i),c=T[h](0,s),d=x[h](0,i),v=x[h](0,s),m={x:l,y:c,x2:d,y2:v,width:d-l,height:v-c};return t.bbox=ht(m),m},Ht=function(t){var n=ht(t);return n.toString=e._path2string,n},Bt=e._pathToRelative=function(t){var n=Nt(t);if(n.rel)return Ht(n.rel);if(!e.is(t,O)||!e.is(t&&t[0],O))t=e.parsePathString(t);var r=[],i=0,s=0,o=0,u=0,a=0;t[0][0]=="M"&&(i=t[0][1],s=t[0][2],o=i,u=s,a++,r.push(["M",i,s]));for(var f=a,l=t.length;f<l;f++){var c=r[f]=[],h=t[f];if(h[0]!=E.call(h[0])){c[0]=E.call(h[0]);switch(c[0]){case"a":c[1]=h[1],c[2]=h[2],c[3]=h[3],c[4]=h[4],c[5]=h[5],c[6]=+(h[6]-i).toFixed(3),c[7]=+(h[7]-s).toFixed(3);break;case"v":c[1]=+(h[1]-s).toFixed(3);break;case"m":o=h[1],u=h[2];default:for(var p=1,d=h.length;p<d;p++)c[p]=+(h[p]-(p%2?i:s)).toFixed(3)}}else{c=r[f]=[],h[0]=="m"&&(o=h[1]+i,u=h[2]+s);for(var v=0,m=h.length;v<m;v++)r[f][v]=h[v]}var g=r[f].length;switch(r[f][0]){case"z":i=o,s=u;break;case"h":i+=+r[f][g-1];break;case"v":s+=+r[f][g-1];break;default:i+=+r[f][g-2],s+=+r[f][g-1]}}return r.toString=e._path2string,n.rel=Ht(r),r},jt=e._pathToAbsolute=function(t){var n=Nt(t);if(n.abs)return Ht(n.abs);if(!e.is(t,O)||!e.is(t&&t[0],O))t=e.parsePathString(t);if(!t||!t.length)return[["M",0,0]];var r=[],i=0,s=0,o=0,u=0,a=0;t[0][0]=="M"&&(i=+t[0][1],s=+t[0][2],o=i,u=s,a++,r[0]=["M",i,s]);var f=t.length==3&&t[0][0]=="M"&&t[1][0].toUpperCase()=="R"&&t[2][0].toUpperCase()=="Z";for(var l,c,h=a,d=t.length;h<d;h++){r.push(l=[]),c=t[h];if(c[0]!=W.call(c[0])){l[0]=W.call(c[0]);switch(l[0]){case"A":l[1]=c[1],l[2]=c[2],l[3]=c[3],l[4]=c[4],l[5]=c[5],l[6]=+(c[6]+i),l[7]=+(c[7]+s);break;case"V":l[1]=+c[1]+s;break;case"H":l[1]=+c[1]+i;break;case"R":var v=[i,s][p](c.slice(1));for(var m=2,g=v.length;m<g;m++)v[m]=+v[m]+i,v[++m]=+v[m]+s;r.pop(),r=r[p](Tt(v,f));break;case"M":o=+c[1]+i,u=+c[2]+s;default:for(m=1,g=c.length;m<g;m++)l[m]=+c[m]+(m%2?i:s)}}else if(c[0]=="R")v=[i,s][p](c.slice(1)),r.pop(),r=r[p](Tt(v,f)),l=["R"][p](c.slice(-2));else for(var y=0,b=c.length;y<b;y++)l[y]=c[y];switch(l[0]){case"Z":i=o,s=u;break;case"H":i=l[1];break;case"V":s=l[1];break;case"M":o=l[l.length-2],u=l[l.length-1];default:i=l[l.length-2],s=l[l.length-1]}}return r.toString=e._path2string,n.abs=Ht(r),r},Ft=function(e,t,n,r){return[e,t,n,r,n,r]},It=function(e,t,n,r,i,s){var o=1/3,u=2/3;return[o*e+u*n,o*t+u*r,o*i+u*n,o*s+u*r,i,s]},qt=function(e,t,n,r,i,s,o,u,a,f){var l=k*120/180,c=k/180*(+i||0),h=[],d,v=Et(function(e,t,n){var r=e*S.cos(n)-t*S.sin(n),i=e*S.sin(n)+t*S.cos(n);return{x:r,y:i}});if(!f){d=v(e,t,-c),e=d.x,t=d.y,d=v(u,a,-c),u=d.x,a=d.y;var m=S.cos(k/180*i),g=S.sin(k/180*i),b=(e-u)/2,w=(t-a)/2,E=b*b/(n*n)+w*w/(r*r);E>1&&(E=S.sqrt(E),n=E*n,r=E*r);var x=n*n,T=r*r,C=(s==o?-1:1)*S.sqrt(N((x*T-x*w*w-T*b*b)/(x*w*w+T*b*b))),L=C*n*w/r+(e+u)/2,A=C*-r*b/n+(t+a)/2,O=S.asin(((t-A)/r).toFixed(9)),M=S.asin(((a-A)/r).toFixed(9));O=e<L?k-O:O,M=u<L?k-M:M,O<0&&(O=k*2+O),M<0&&(M=k*2+M),o&&O>M&&(O-=k*2),!o&&M>O&&(M-=k*2)}else O=f[0],M=f[1],L=f[2],A=f[3];var _=M-O;if(N(_)>l){var D=M,P=u,H=a;M=O+l*(o&&M>O?1:-1),u=L+n*S.cos(M),a=A+r*S.sin(M),h=qt(u,a,n,r,i,0,o,P,H,[M,D,L,A])}_=M-O;var B=S.cos(O),j=S.sin(O),F=S.cos(M),I=S.sin(M),q=S.tan(_/4),R=4/3*n*q,U=4/3*r*q,z=[e,t],W=[e+R*j,t-U*B],X=[u+R*I,a-U*F],V=[u,a];W[0]=2*z[0]-W[0],W[1]=2*z[1]-W[1];if(f)return[W,X,V][p](h);h=[W,X,V][p](h).join()[y](",");var $=[];for(var J=0,K=h.length;J<K;J++)$[J]=J%2?v(h[J-1],h[J],c).y:v(h[J],h[J+1],c).x;return $},Rt=function(e,t,n,r,i,s,o,u,a){var f=1-a;return{x:C(f,3)*e+C(f,2)*3*a*n+f*3*a*a*i+C(a,3)*o,y:C(f,3)*t+C(f,2)*3*a*r+f*3*a*a*s+C(a,3)*u}},Ut=Et(function(e,t,n,r,i,s,o,u){var a=i-2*n+e-(o-2*i+n),f=2*(n-e)-2*(i-n),l=e-n,c=(-f+S.sqrt(f*f-4*a*l))/2/a,p=(-f-S.sqrt(f*f-4*a*l))/2/a,d=[t,u],v=[e,o],m;return N(c)>"1e12"&&(c=.5),N(p)>"1e12"&&(p=.5),c>0&&c<1&&(m=Rt(e,t,n,r,i,s,o,u,c),v.push(m.x),d.push(m.y)),p>0&&p<1&&(m=Rt(e,t,n,r,i,s,o,u,p),v.push(m.x),d.push(m.y)),a=s-2*r+t-(u-2*s+r),f=2*(r-t)-2*(s-r),l=t-r,c=(-f+S.sqrt(f*f-4*a*l))/2/a,p=(-f-S.sqrt(f*f-4*a*l))/2/a,N(c)>"1e12"&&(c=.5),N(p)>"1e12"&&(p=.5),c>0&&c<1&&(m=Rt(e,t,n,r,i,s,o,u,c),v.push(m.x),d.push(m.y)),p>0&&p<1&&(m=Rt(e,t,n,r,i,s,o,u,p),v.push(m.x),d.push(m.y)),{min:{x:T[h](0,v),y:T[h](0,d)},max:{x:x[h](0,v),y:x[h](0,d)}}}),zt=e._path2curve=Et(function(e,t){var n=!t&&Nt(e);if(!t&&n.curve)return Ht(n.curve);var r=jt(e),i=t&&jt(t),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=function(e,t){var n,r;if(!e)return["C",t.x,t.y,t.x,t.y,t.x,t.y];!(e[0]in{T:1,Q:1})&&(t.qx=t.qy=null);switch(e[0]){case"M":t.X=e[1],t.Y=e[2];break;case"A":e=["C"][p](qt[h](0,[t.x,t.y][p](e.slice(1))));break;case"S":n=t.x+(t.x-(t.bx||t.x)),r=t.y+(t.y-(t.by||t.y)),e=["C",n,r][p](e.slice(1));break;case"T":t.qx=t.x+(t.x-(t.qx||t.x)),t.qy=t.y+(t.y-(t.qy||t.y)),e=["C"][p](It(t.x,t.y,t.qx,t.qy,e[1],e[2]));break;case"Q":t.qx=e[1],t.qy=e[2],e=["C"][p](It(t.x,t.y,e[1],e[2],e[3],e[4]));break;case"L":e=["C"][p](Ft(t.x,t.y,e[1],e[2]));break;case"H":e=["C"][p](Ft(t.x,t.y,e[1],t.y));break;case"V":e=["C"][p](Ft(t.x,t.y,t.x,e[1]));break;case"Z":e=["C"][p](Ft(t.x,t.y,t.X,t.Y))}return e},a=function(e,t){if(e[t].length>7){e[t].shift();var n=e[t];while(n.length)e.splice(t++,0,["C"][p](n.splice(0,6)));e.splice(t,1),c=x(r.length,i&&i.length||0)}},f=function(e,t,n,s,o){e&&t&&e[o][0]=="M"&&t[o][0]!="M"&&(t.splice(o,0,["M",s.x,s.y]),n.bx=0,n.by=0,n.x=e[o][1],n.y=e[o][2],c=x(r.length,i&&i.length||0))};for(var l=0,c=x(r.length,i&&i.length||0);l<c;l++){r[l]=u(r[l],s),a(r,l),i&&(i[l]=u(i[l],o)),i&&a(i,l),f(r,i,s,o,l),f(i,r,o,s,l);var d=r[l],v=i&&i[l],m=d.length,g=i&&v.length;s.x=d[m-2],s.y=d[m-1],s.bx=U(d[m-4])||s.x,s.by=U(d[m-3])||s.y,o.bx=i&&(U(v[g-4])||o.x),o.by=i&&(U(v[g-3])||o.y),o.x=i&&v[g-2],o.y=i&&v[g-1]}return i||(n.curve=Ht(r)),i?[r,i]:r},null,Ht),Wt=e._parseDots=Et(function(t){var n=[];for(var r=0,i=t.length;r<i;r++){var s={},o=t[r].match(/^([^:]*):?([\d\.]*)/);s.color=e.getRGB(o[1]);if(s.color.error)return null;s.color=s.color.hex,o[2]&&(s.offset=o[2]+"%"),n.push(s)}for(r=1,i=n.length-1;r<i;r++)if(!n[r].offset){var u=U(n[r-1].offset||0),a=0;for(var f=r+1;f<i;f++)if(n[f].offset){a=n[f].offset;break}a||(a=100,f=i),a=U(a);var l=(a-u)/(f-r+1);for(;r<f;r++)u+=l,n[r].offset=u+"%"}return n}),Xt=e._tear=function(e,t){e==t.top&&(t.top=e.prev),e==t.bottom&&(t.bottom=e.next),e.next&&(e.next.prev=e.prev),e.prev&&(e.prev.next=e.next)},Vt=e._tofront=function(e,t){if(t.top===e)return;Xt(e,t),e.next=null,e.prev=t.top,t.top.next=e,t.top=e},$t=e._toback=function(e,t){if(t.bottom===e)return;Xt(e,t),e.next=t.bottom,e.prev=null,t.bottom.prev=e,t.bottom=e},Jt=e._insertafter=function(e,t,n){Xt(e,n),t==n.top&&(n.top=e),t.next&&(t.next.prev=e),e.next=t.next,e.prev=t,t.next=e},Kt=e._insertbefore=function(e,t,n){Xt(e,n),t==n.bottom&&(n.bottom=e),t.prev&&(t.prev.next=e),e.prev=t.prev,t.prev=e,e.next=t},Qt=e.toMatrix=function(e,t){var n=Pt(e),r={_:{transform:v},getBBox:function(){return n}};return Yt(r,t),r.matrix},Gt=e.transformPath=function(e,t){return ft(e,Qt(e,t))},Yt=e._extractTransform=function(t,n){if(n==null)return t._.transform;n=g(n).replace(/\.{3}|\u2026/g,t._.transform||v);var r=e.parseTransformString(n),i=0,s=0,o=0,u=1,a=1,f=t._,l=new tn;f.transform=r||[];if(r)for(var c=0,h=r.length;c<h;c++){var p=r[c],d=p.length,m=g(p[0]).toLowerCase(),y=p[0]!=m,b=y?l.invert():0,w,E,S,x,T;m=="t"&&d==3?y?(w=b.x(0,0),E=b.y(0,0),S=b.x(p[1],p[2]),x=b.y(p[1],p[2]),l.translate(S-w,x-E)):l.translate(p[1],p[2]):m=="r"?d==2?(T=T||t.getBBox(1),l.rotate(p[1],T.x+T.width/2,T.y+T.height/2),i+=p[1]):d==4&&(y?(S=b.x(p[2],p[3]),x=b.y(p[2],p[3]),l.rotate(p[1],S,x)):l.rotate(p[1],p[2],p[3]),i+=p[1]):m=="s"?d==2||d==3?(T=T||t.getBBox(1),l.scale(p[1],p[d-1],T.x+T.width/2,T.y+T.height/2),u*=p[1],a*=p[d-1]):d==5&&(y?(S=b.x(p[3],p[4]),x=b.y(p[3],p[4]),l.scale(p[1],p[2],S,x)):l.scale(p[1],p[2],p[3],p[4]),u*=p[1],a*=p[2]):m=="m"&&d==7&&l.add(p[1],p[2],p[3],p[4],p[5],p[6]),f.dirtyT=1,t.matrix=l}t.matrix=l,f.sx=u,f.sy=a,f.deg=i,f.dx=s=l.e,f.dy=o=l.f,u==1&&a==1&&!i&&f.bbox?(f.bbox.x+=+s,f.bbox.y+=+o):f.dirtyT=1},Zt=function(e){var t=e[0];switch(t.toLowerCase()){case"t":return[t,0,0];case"m":return[t,1,0,0,1,0,0];case"r":return e.length==4?[t,0,e[2],e[3]]:[t,0];case"s":return e.length==5?[t,1,1,e[3],e[4]]:e.length==3?
[t,1,1]:[t,1]}},en=e._equaliseTransform=function(t,n){n=g(n).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],n=e.parseTransformString(n)||[];var r=x(t.length,n.length),i=[],s=[],o=0,u,a,f,l;for(;o<r;o++){f=t[o]||Zt(n[o]),l=n[o]||Zt(f);if(f[0]!=l[0]||f[0].toLowerCase()=="r"&&(f[2]!=l[2]||f[3]!=l[3])||f[0].toLowerCase()=="s"&&(f[3]!=l[3]||f[4]!=l[4]))return;i[o]=[],s[o]=[];for(u=0,a=x(f.length,l.length);u<a;u++)u in f&&(i[o][u]=f[u]),u in l&&(s[o][u]=l[u])}return{from:i,to:s}};e._getContainer=function(t,n,r,i){var s;s=i==null&&!e.is(t,"object")?u.doc.getElementById(t):t;if(s==null)return;return s.tagName?n==null?{container:s,width:s.style.pixelWidth||s.offsetWidth,height:s.style.pixelHeight||s.offsetHeight}:{container:s,width:n,height:r}:{container:1,x:t,y:n,width:r,height:i}},e.pathToRelative=Bt,e._engine={},e.path2curve=zt,e.matrix=function(e,t,n,r,i,s){return new tn(e,t,n,r,i,s)},function(t){function n(e){return e[0]*e[0]+e[1]*e[1]}function r(e){var t=S.sqrt(n(e));e[0]&&(e[0]/=t),e[1]&&(e[1]/=t)}t.add=function(e,t,n,r,i,s){var o=[[],[],[]],u=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],a=[[e,n,i],[t,r,s],[0,0,1]],f,l,c,h;e&&e instanceof tn&&(a=[[e.a,e.c,e.e],[e.b,e.d,e.f],[0,0,1]]);for(f=0;f<3;f++)for(l=0;l<3;l++){h=0;for(c=0;c<3;c++)h+=u[f][c]*a[c][l];o[f][l]=h}this.a=o[0][0],this.b=o[1][0],this.c=o[0][1],this.d=o[1][1],this.e=o[0][2],this.f=o[1][2]},t.invert=function(){var e=this,t=e.a*e.d-e.b*e.c;return new tn(e.d/t,-e.b/t,-e.c/t,e.a/t,(e.c*e.f-e.d*e.e)/t,(e.b*e.e-e.a*e.f)/t)},t.clone=function(){return new tn(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(e,t){this.add(1,0,0,1,e,t)},t.scale=function(e,t,n,r){t==null&&(t=e),(n||r)&&this.add(1,0,0,1,n,r),this.add(e,0,0,t,0,0),(n||r)&&this.add(1,0,0,1,-n,-r)},t.rotate=function(t,n,r){t=e.rad(t),n=n||0,r=r||0;var i=+S.cos(t).toFixed(9),s=+S.sin(t).toFixed(9);this.add(i,s,-s,i,n,r),this.add(1,0,0,1,-n,-r)},t.x=function(e,t){return e*this.a+t*this.c+this.e},t.y=function(e,t){return e*this.b+t*this.d+this.f},t.get=function(e){return+this[g.fromCharCode(97+e)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var i=[[this.a,this.c],[this.b,this.d]];t.scalex=S.sqrt(n(i[0])),r(i[0]),t.shear=i[0][0]*i[1][0]+i[0][1]*i[1][1],i[1]=[i[1][0]-i[0][0]*t.shear,i[1][1]-i[0][1]*t.shear],t.scaley=S.sqrt(n(i[1])),r(i[1]),t.shear/=t.scaley;var s=-i[0][1],o=i[1][1];return o<0?(t.rotate=e.deg(S.acos(o)),s<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(S.asin(s)),t.isSimple=!+t.shear.toFixed(9)&&(t.scalex.toFixed(9)==t.scaley.toFixed(9)||!t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(e){var t=e||this[y]();return t.isSimple?(t.scalex=+t.scalex.toFixed(4),t.scaley=+t.scaley.toFixed(4),t.rotate=+t.rotate.toFixed(4),(t.dx||t.dy?"t"+[t.dx,t.dy]:v)+(t.scalex!=1||t.scaley!=1?"s"+[t.scalex,t.scaley,0,0]:v)+(t.rotate?"r"+[t.rotate,0,0]:v)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(tn.prototype);var nn=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);navigator.vendor=="Apple Computer, Inc."&&(nn&&nn[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&nn&&nn[1]<8?l.safari=function(){var e=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){e.remove()})}:l.safari=it;var rn=function(){this.returnValue=!1},sn=function(){return this.originalEvent.preventDefault()},on=function(){this.cancelBubble=!0},un=function(){return this.originalEvent.stopPropagation()},an=function(){if(u.doc.addEventListener)return function(e,t,n,r){var i=d&&w[t]?w[t]:t,s=function(i){var s=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,a=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,f=i.clientX+a,l=i.clientY+s;if(d&&w[o](t))for(var c=0,h=i.targetTouches&&i.targetTouches.length;c<h;c++)if(i.targetTouches[c].target==e){var p=i;i=i.targetTouches[c],i.originalEvent=p,i.preventDefault=sn,i.stopPropagation=un;break}return n.call(r,i,f,l)};return e.addEventListener(i,s,!1),function(){return e.removeEventListener(i,s,!1),!0}};if(u.doc.attachEvent)return function(e,t,n,r){var i=function(e){e=e||u.win.event;var t=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,i=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,s=e.clientX+i,o=e.clientY+t;return e.preventDefault=e.preventDefault||rn,e.stopPropagation=e.stopPropagation||on,n.call(r,e,s,o)};e.attachEvent("on"+t,i);var s=function(){return e.detachEvent("on"+t,i),!0};return s}}(),fn=[],ln=function(e){var t=e.clientX,n=e.clientY,r=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,i=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,s,o=fn.length;while(o--){s=fn[o];if(d){var a=e.touches.length,f;while(a--){f=e.touches[a];if(f.identifier==s.el._drag.id){t=f.clientX,n=f.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}}else e.preventDefault();var l=s.el.node,c,h=l.nextSibling,p=l.parentNode,v=l.style.display;u.win.opera&&p.removeChild(l),l.style.display="none",c=s.el.paper.getElementByPoint(t,n),l.style.display=v,u.win.opera&&(h?p.insertBefore(l,h):p.appendChild(l)),c&&eve("raphael.drag.over."+s.el.id,s.el,c),t+=i,n+=r,eve("raphael.drag.move."+s.el.id,s.move_scope||s.el,t-s.el._drag.x,n-s.el._drag.y,t,n,e)}},cn=function(t){e.unmousemove(ln).unmouseup(cn);var n=fn.length,r;while(n--)r=fn[n],r.el._drag={},eve("raphael.drag.end."+r.el.id,r.end_scope||r.start_scope||r.move_scope||r.el,t);fn=[]},hn=e.el={};for(var pn=b.length;pn--;)(function(t){e[t]=hn[t]=function(n,r){return e.is(n,"function")&&(this.events=this.events||[],this.events.push({name:t,f:n,unbind:an(this.shape||this.node||u.doc,t,n,r||this)})),this},e["un"+t]=hn["un"+t]=function(e){var n=this.events||[],r=n.length;while(r--)if(n[r].name==t&&n[r].f==e)return n[r].unbind(),n.splice(r,1),!n.length&&delete this.events,this;return this}})(b[pn]);hn.data=function(t,n){var r=tt[this.id]=tt[this.id]||{};if(arguments.length==1){if(e.is(t,"object")){for(var i in t)t[o](i)&&this.data(i,t[i]);return this}return eve("raphael.data.get."+this.id,this,r[t],t),r[t]}return r[t]=n,eve("raphael.data.set."+this.id,this,n,t),this},hn.removeData=function(e){return e==null?tt[this.id]={}:tt[this.id]&&delete tt[this.id][e],this},hn.hover=function(e,t,n,r){return this.mouseover(e,n).mouseout(t,r||n)},hn.unhover=function(e,t){return this.unmouseover(e).unmouseout(t)};var dn=[];hn.drag=function(t,n,r,i,s,o){function a(a){(a.originalEvent||a).preventDefault();var f=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,l=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft;this._drag.x=a.clientX+l,this._drag.y=a.clientY+f,this._drag.id=a.identifier,!fn.length&&e.mousemove(ln).mouseup(cn),fn.push({el:this,move_scope:i,start_scope:s,end_scope:o}),n&&eve.on("raphael.drag.start."+this.id,n),t&&eve.on("raphael.drag.move."+this.id,t),r&&eve.on("raphael.drag.end."+this.id,r),eve("raphael.drag.start."+this.id,s||i||this,a.clientX+l,a.clientY+f,a)}return this._drag={},dn.push({el:this,start:a}),this.mousedown(a),this},hn.onDragOver=function(e){e?eve.on("raphael.drag.over."+this.id,e):eve.unbind("raphael.drag.over."+this.id)},hn.undrag=function(){var t=dn.length;while(t--)dn[t].el==this&&(this.unmousedown(dn[t].start),dn.splice(t,1),eve.unbind("raphael.drag.*."+this.id));!dn.length&&e.unmousemove(ln).unmouseup(cn)},l.circle=function(t,n,r){var i=e._engine.circle(this,t||0,n||0,r||0);return this.__set__&&this.__set__.push(i),i},l.rect=function(t,n,r,i,s){var o=e._engine.rect(this,t||0,n||0,r||0,i||0,s||0);return this.__set__&&this.__set__.push(o),o},l.ellipse=function(t,n,r,i){var s=e._engine.ellipse(this,t||0,n||0,r||0,i||0);return this.__set__&&this.__set__.push(s),s},l.path=function(t){t&&!e.is(t,A)&&!e.is(t[0],O)&&(t+=v);var n=e._engine.path(e.format[h](e,arguments),this);return this.__set__&&this.__set__.push(n),n},l.image=function(t,n,r,i,s){var o=e._engine.image(this,t||"about:blank",n||0,r||0,i||0,s||0);return this.__set__&&this.__set__.push(o),o},l.text=function(t,n,r){var i=e._engine.text(this,t||0,n||0,g(r));return this.__set__&&this.__set__.push(i),i},l.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var n=new Dn(t);return this.__set__&&this.__set__.push(n),n},l.setStart=function(e){this.__set__=e||this.set()},l.setFinish=function(e){var t=this.__set__;return delete this.__set__,t},l.setSize=function(t,n){return e._engine.setSize.call(this,t,n)},l.setViewBox=function(t,n,r,i,s){return e._engine.setViewBox.call(this,t,n,r,i,s)},l.top=l.bottom=null,l.raphael=e;var vn=function(e){var t=e.getBoundingClientRect(),n=e.ownerDocument,r=n.body,i=n.documentElement,s=i.clientTop||r.clientTop||0,o=i.clientLeft||r.clientLeft||0,a=t.top+(u.win.pageYOffset||i.scrollTop||r.scrollTop)-s,f=t.left+(u.win.pageXOffset||i.scrollLeft||r.scrollLeft)-o;return{y:a,x:f}};l.getElementByPoint=function(e,t){var n=this,r=n.canvas,i=u.doc.elementFromPoint(e,t);if(u.win.opera&&i.tagName=="svg"){var s=vn(r),o=r.createSVGRect();o.x=e-s.x,o.y=t-s.y,o.width=o.height=1;var a=r.getIntersectionList(o,null);a.length&&(i=a[a.length-1])}if(!i)return null;while(i.parentNode&&i!=r.parentNode&&!i.raphael)i=i.parentNode;return i==n.canvas.parentNode&&(i=r),i=i&&i.raphael?n.getById(i.raphaelid):null,i},l.getById=function(e){var t=this.bottom;while(t){if(t.id==e)return t;t=t.next}return null},l.forEach=function(e,t){var n=this.bottom;while(n){if(e.call(t,n)===!1)return this;n=n.next}return this},l.getElementsByPoint=function(e,t){var n=this.set();return this.forEach(function(r){r.isPointInside(e,t)&&n.push(r)}),n},hn.isPointInside=function(t,n){var r=this.realPath=this.realPath||at[this.type](this);return e.isPointInsidePath(r,t,n)},hn.getBBox=function(e){if(this.removed)return{};var t=this._;if(e){if(t.dirty||!t.bboxwt)this.realPath=at[this.type](this),t.bboxwt=Pt(this.realPath),t.bboxwt.toString=gn,t.dirty=0;return t.bboxwt}if(t.dirty||t.dirtyT||!t.bbox){if(t.dirty||!this.realPath)t.bboxwt=0,this.realPath=at[this.type](this);t.bbox=Pt(ft(this.realPath,this.matrix)),t.bbox.toString=gn,t.dirty=t.dirtyT=0}return t.bbox},hn.clone=function(){if(this.removed)return null;var e=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(e),e},hn.glow=function(e){if(this.type=="text")return null;e=e||{};var t={width:(e.width||10)+(+this.attr("stroke-width")||1),fill:e.fill||!1,opacity:e.opacity||.5,offsetx:e.offsetx||0,offsety:e.offsety||0,color:e.color||"#000"},n=t.width/2,r=this.paper,i=r.set(),s=this.realPath||at[this.type](this);s=this.matrix?ft(s,this.matrix):s;for(var o=1;o<n+1;o++)i.push(r.path(s).attr({stroke:t.color,fill:t.fill?t.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(t.width/n*o).toFixed(3),opacity:+(t.opacity/n).toFixed(3)}));return i.insertBefore(this).translate(t.offsetx,t.offsety)};var yn={},bn=function(t,n,r,i,s,o,u,a,f){return f==null?kt(t,n,r,i,s,o,u,a):e.findDotsAtSegment(t,n,r,i,s,o,u,a,Lt(t,n,r,i,s,o,u,a,f))},wn=function(t,n){return function(r,i,s){r=zt(r);var o,u,a,f,l="",c={},h,p=0;for(var d=0,v=r.length;d<v;d++){a=r[d];if(a[0]=="M")o=+a[1],u=+a[2];else{f=bn(o,u,a[1],a[2],a[3],a[4],a[5],a[6]);if(p+f>i){if(n&&!c.start){h=bn(o,u,a[1],a[2],a[3],a[4],a[5],a[6],i-p),l+=["C"+h.start.x,h.start.y,h.m.x,h.m.y,h.x,h.y];if(s)return l;c.start=l,l=["M"+h.x,h.y+"C"+h.n.x,h.n.y,h.end.x,h.end.y,a[5],a[6]].join(),p+=f,o=+a[5],u=+a[6];continue}if(!t&&!n)return h=bn(o,u,a[1],a[2],a[3],a[4],a[5],a[6],i-p),{x:h.x,y:h.y,alpha:h.alpha}}p+=f,o=+a[5],u=+a[6]}l+=a.shift()+a}return c.end=l,h=t?p:n?c:e.findDotsAtSegment(o,u,a[0],a[1],a[2],a[3],a[4],a[5],1),h.alpha&&(h={x:h.x,y:h.y,alpha:h.alpha}),h}},En=wn(1),Sn=wn(),xn=wn(0,1);e.getTotalLength=En,e.getPointAtLength=Sn,e.getSubpath=function(e,t,n){if(this.getTotalLength(e)-n<1e-6)return xn(e,t).end;var r=xn(e,n,1);return t?xn(r,t).end:r},hn.getTotalLength=function(){if(this.type!="path")return;return this.node.getTotalLength?this.node.getTotalLength():En(this.attrs.path)},hn.getPointAtLength=function(e){if(this.type!="path")return;return Sn(this.attrs.path,e)},hn.getSubpath=function(t,n){if(this.type!="path")return;return e.getSubpath(this.attrs.path,t,n)};var Tn=e.easing_formulas={linear:function(e){return e},"<":function(e){return C(e,1.7)},">":function(e){return C(e,.48)},"<>":function(e){var t=.48-e/1.04,n=S.sqrt(.1734+t*t),r=n-t,i=C(N(r),1/3)*(r<0?-1:1),s=-n-t,o=C(N(s),1/3)*(s<0?-1:1),u=i+o+.5;return(1-u)*3*u*u+u*u*u},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){e-=1;var t=1.70158;return e*e*((t+1)*e+t)+1},elastic:function(e){return e==!!e?e:C(2,-10*e)*S.sin((e-.075)*2*k/.3)+1},bounce:function(e){var t=7.5625,n=2.75,r;return e<1/n?r=t*e*e:e<2/n?(e-=1.5/n,r=t*e*e+.75):e<2.5/n?(e-=2.25/n,r=t*e*e+.9375):(e-=2.625/n,r=t*e*e+.984375),r}};Tn.easeIn=Tn["ease-in"]=Tn["<"],Tn.easeOut=Tn["ease-out"]=Tn[">"],Tn.easeInOut=Tn["ease-in-out"]=Tn["<>"],Tn["back-in"]=Tn.backIn,Tn["back-out"]=Tn.backOut;var Nn=[],Cn=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,16)},kn=function(){var t=+(new Date),n=0;for(;n<Nn.length;n++){var r=Nn[n];if(r.el.removed||r.paused)continue;var i=t-r.start,s=r.ms,u=r.easing,a=r.from,f=r.diff,l=r.to,c=r.t,h=r.el,d={},v,g={},y;r.initstatus?(i=(r.initstatus*r.anim.top-r.prev)/(r.percent-r.prev)*s,r.status=r.initstatus,delete r.initstatus,r.stop&&Nn.splice(n--,1)):r.status=(r.prev+(r.percent-r.prev)*(i/s))/r.anim.top;if(i<0)continue;if(i<s){var b=u(i/s);for(var w in a)if(a[o](w)){switch(V[w]){case L:v=+a[w]+b*s*f[w];break;case"colour":v="rgb("+[Ln(q(a[w].r+b*s*f[w].r)),Ln(q(a[w].g+b*s*f[w].g)),Ln(q(a[w].b+b*s*f[w].b))].join(",")+")";break;case"path":v=[];for(var E=0,S=a[w].length;E<S;E++){v[E]=[a[w][E][0]];for(var x=1,T=a[w][E].length;x<T;x++)v[E][x]=+a[w][E][x]+b*s*f[w][E][x];v[E]=v[E].join(m)}v=v.join(m);break;case"transform":if(f[w].real){v=[];for(E=0,S=a[w].length;E<S;E++){v[E]=[a[w][E][0]];for(x=1,T=a[w][E].length;x<T;x++)v[E][x]=a[w][E][x]+b*s*f[w][E][x]}}else{var N=function(e){return+a[w][e]+b*s*f[w][e]};v=[["m",N(0),N(1),N(2),N(3),N(4),N(5)]]}break;case"csv":if(w=="clip-rect"){v=[],E=4;while(E--)v[E]=+a[w][E]+b*s*f[w][E]}break;default:var C=[][p](a[w]);v=[],E=h.paper.customAttributes[w].length;while(E--)v[E]=+C[E]+b*s*f[w][E]}d[w]=v}h.attr(d),function(e,t,n){setTimeout(function(){eve("raphael.anim.frame."+e,t,n)})}(h.id,h,r.anim)}else{(function(t,n,r){setTimeout(function(){eve("raphael.anim.frame."+n.id,n,r),eve("raphael.anim.finish."+n.id,n,r),e.is(t,"function")&&t.call(n)})})(r.callback,h,r.anim),h.attr(l),Nn.splice(n--,1);if(r.repeat>1&&!r.next){for(y in l)l[o](y)&&(g[y]=r.totalOrigin[y]);r.el.attr(g),Mn(r.anim,r.el,r.anim.percents[0],null,r.totalOrigin,r.repeat-1)}r.next&&!r.stop&&Mn(r.anim,r.el,r.next,null,r.totalOrigin,r.repeat)}}e.svg&&h&&h.paper&&h.paper.safari(),Nn.length&&Cn(kn)},Ln=function(e){return e>255?255:e<0?0:e};hn.animateWith=function(t,n,r,i,s,o){var u=this;if(u.removed)return o&&o.call(u),u;var a=r instanceof On?r:e.animation(r,i,s,o),f,l;Mn(a,u,a.percents[0],null,u.attr());for(var c=0,h=Nn.length;c<h;c++)if(Nn[c].anim==n&&Nn[c].el==t){Nn[h-1].start=Nn[c].start;break}return u},hn.onAnimation=function(e){return e?eve.on("raphael.anim.frame."+this.id,e):eve.unbind("raphael.anim.frame."+this.id),this},On.prototype.delay=function(e){var t=new On(this.anim,this.ms);return t.times=this.times,t.del=+e||0,t},On.prototype.repeat=function(e){var t=new On(this.anim,this.ms);return t.del=this.del,t.times=S.floor(x(e,0))||1,t},e.animation=function(t,n,r,i){if(t instanceof On)return t;if(e.is(r,"function")||!r)i=i||r||null,r=null;t=Object(t),n=+n||0;var s={},u,a;for(a in t)t[o](a)&&U(a)!=a&&U(a)+"%"!=a&&(u=!0,s[a]=t[a]);return u?(r&&(s.easing=r),i&&(s.callback=i),new On({100:s},n)):new On(t,n)},hn.animate=function(t,n,r,i){var s=this;if(s.removed)return i&&i.call(s),s;var o=t instanceof On?t:e.animation(t,n,r,i);return Mn(o,s,o.percents[0],null,s.attr()),s},hn.setTime=function(e,t){return e&&t!=null&&this.status(e,T(t,e.ms)/e.ms),this},hn.status=function(e,t){var n=[],r=0,i,s;if(t!=null)return Mn(e,this,-1,T(t,1)),this;i=Nn.length;for(;r<i;r++){s=Nn[r];if(s.el.id==this.id&&(!e||s.anim==e)){if(e)return s.status;n.push({anim:s.anim,status:s.status})}}return e?0:n},hn.pause=function(e){for(var t=0;t<Nn.length;t++)Nn[t].el.id==this.id&&(!e||Nn[t].anim==e)&&eve("raphael.anim.pause."+this.id,this,Nn[t].anim)!==!1&&(Nn[t].paused=!0);return this},hn.resume=function(e){for(var t=0;t<Nn.length;t++)if(Nn[t].el.id==this.id&&(!e||Nn[t].anim==e)){var n=Nn[t];eve("raphael.anim.resume."+this.id,this,n.anim)!==!1&&(delete n.paused,this.status(n.anim,n.status))}return this},hn.stop=function(e){for(var t=0;t<Nn.length;t++)Nn[t].el.id==this.id&&(!e||Nn[t].anim==e)&&eve("raphael.anim.stop."+this.id,this,Nn[t].anim)!==!1&&Nn.splice(t--,1);return this},eve.on("raphael.remove",_n),eve.on("raphael.clear",_n),hn.toString=function(){return"Raphaël’s object"};var Dn=function(e){this.items=[],this.length=0,this.type="set";if(e)for(var t=0,n=e.length;t<n;t++)e[t]&&(e[t].constructor==hn.constructor||e[t].constructor==Dn)&&(this[this.items.length]=this.items[this.items.length]=e[t],this.length++)},Pn=Dn.prototype;Pn.push=function(){var e,t;for(var n=0,r=arguments.length;n<r;n++)e=arguments[n],e&&(e.constructor==hn.constructor||e.constructor==Dn)&&(t=this.items.length,this[t]=this.items[t]=e,this.length++);return this},Pn.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},Pn.forEach=function(e,t){for(var n=0,r=this.items.length;n<r;n++)if(e.call(t,this.items[n],n)===!1)return this;return this};for(var Hn in hn)hn[o](Hn)&&(Pn[Hn]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e][h](n,t)})}}(Hn));Pn.attr=function(t,n){if(t&&e.is(t,O)&&e.is(t[0],"object"))for(var r=0,i=t.length;r<i;r++)this.items[r].attr(t[r]);else for(var s=0,o=this.items.length;s<o;s++)this.items[s].attr(t,n);return this},Pn.clear=function(){while(this.length)this.pop()},Pn.splice=function(e,t,n){e=e<0?x(this.length+e,0):e,t=x(0,T(this.length-e,t));var r=[],i=[],s=[],o;for(o=2;o<arguments.length;o++)s.push(arguments[o]);for(o=0;o<t;o++)i.push(this[e+o]);for(;o<this.length-e;o++)r.push(this[e+o]);var u=s.length;for(o=0;o<u+r.length;o++)this.items[e+o]=this[e+o]=o<u?s[o]:r[o-u];o=this.items.length=this.length-=t-u;while(this[o])delete this[o++];return new Dn(i)},Pn.exclude=function(e){for(var t=0,n=this.length;t<n;t++)if(this[t]==e)return this.splice(t,1),!0},Pn.animate=function(t,n,r,i){(e.is(r,"function")||!r)&&(i=r||null);var s=this.items.length,o=s,u,a=this,f;if(!s)return this;i&&(f=function(){!--s&&i.call(a)}),r=e.is(r,A)?r:f;var l=e.animation(t,n,r,f);u=this.items[--o].animate(l);while(o--)this.items[o]&&!this.items[o].removed&&this.items[o].animateWith(u,l,l);return this},Pn.insertAfter=function(e){var t=this.items.length;while(t--)this.items[t].insertAfter(e);return this},Pn.getBBox=function(){var e=[],t=[],n=[],r=[];for(var i=this.items.length;i--;)if(!this.items[i].removed){var s=this.items[i].getBBox();e.push(s.x),t.push(s.y),n.push(s.x+s.width),r.push(s.y+s.height)}return e=T[h](0,e),t=T[h](0,t),n=x[h](0,n),r=x[h](0,r),{x:e,y:t,x2:n,y2:r,width:n-e,height:r-t}},Pn.clone=function(e){e=new Dn;for(var t=0,n=this.items.length;t<n;t++)e.push(this.items[t].clone());return e},Pn.toString=function(){return"Raphaël‘s set"},e.registerFont=function(e){if(!e.face)return e;this.fonts=this.fonts||{};var t={w:e.w,face:{},glyphs:{}},n=e.face["font-family"];for(var r in e.face)e.face[o](r)&&(t.face[r]=e.face[r]);this.fonts[n]?this.fonts[n].push(t):this.fonts[n]=[t];if(!e.svg){t.face["units-per-em"]=z(e.face["units-per-em"],10);for(var i in e.glyphs)if(e.glyphs[o](i)){var s=e.glyphs[i];t.glyphs[i]={w:s.w,k:{},d:s.d&&"M"+s.d.replace(/[mlcxtrv]/g,function(e){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[e]||"M"})+"z"};if(s.k)for(var u in s.k)s[o](u)&&(t.glyphs[i].k[u]=s.k[u])}}return e},l.getFont=function(t,n,r,i){i=i||"normal",r=r||"normal",n=+n||{normal:400,bold:700,lighter:300,bolder:800}[n]||400;if(!e.fonts)return;var s=e.fonts[t];if(!s){var u=new RegExp("(^|\\s)"+t.replace(/[^\w\d\s+!~.:_-]/g,v)+"(\\s|$)","i");for(var a in e.fonts)if(e.fonts[o](a)&&u.test(a)){s=e.fonts[a];break}}var f;if(s)for(var l=0,c=s.length;l<c;l++){f=s[l];if(f.face["font-weight"]==n&&(f.face["font-style"]==r||!f.face["font-style"])&&f.face["font-stretch"]==i)break}return f},l.print=function(t,r,i,s,o,u,a){u=u||"middle",a=x(T(a||0,1),-1);var f=g(i)[y](v),l=0,c=0,h=v,p;e.is(s,i)&&(s=this.getFont(s));if(s){p=(o||16)/s.face["units-per-em"];var d=s.face.bbox[y](n),m=+d[0],b=d[3]-d[1],w=0,E=+d[1]+(u=="baseline"?b+ +s.face.descent:b/2);for(var S=0,N=f.length;S<N;S++){if(f[S]=="\n")l=0,k=0,c=0,w+=b;else{var C=c&&s.glyphs[f[S-1]]||{},k=s.glyphs[f[S]];l+=c?(C.w||s.w)+(C.k&&C.k[f[S]]||0)+s.w*a:0,c=1}k&&k.d&&(h+=e.transformPath(k.d,["t",l*p,w*p,"s",p,p,m,E,"t",(t-m)/p,(r-E)/p]))}}return this.path(h).attr({fill:"#000",stroke:"none"})},l.add=function(t){if(e.is(t,"array")){var n=this.set(),i=0,s=t.length,u;for(;i<s;i++)u=t[i]||{},r[o](u.type)&&n.push(this[u.type]().attr(u))}return n},e.format=function(t,n){var r=e.is(n,O)?[0][p](n):arguments;return t&&e.is(t,A)&&r.length-1&&(t=t.replace(i,function(e,t){return r[++t]==null?v:r[t]})),t||v},e.fullfill=function(){var e=/\{([^\}]+)\}/g,t=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,n=function(e,n,r){var i=r;return n.replace(t,function(e,t,n,r,s){t=t||r,i&&(t in i&&(i=i[t]),typeof i=="function"&&s&&(i=i()))}),i=(i==null||i==r?e:i)+"",i};return function(t,r){return String(t).replace(e,function(e,t){return n(e,t,r)})}}(),e.ninja=function(){return a.was?u.win.Raphael=a.is:delete Raphael,e},e.st=Pn,function(t,n,r){function i(){/in/.test(t.readyState)?setTimeout(i,9):e.eve("raphael.DOMload")}t.readyState==null&&t.addEventListener&&(t.addEventListener(n,r=function(){t.removeEventListener(n,r,!1),t.readyState="complete"},!1),t.readyState="loading"),i()}(document,"DOMContentLoaded"),a.was?u.win.Raphael=e:Raphael=e,eve.on("raphael.DOMload",function(){t=!0})}(),window.Raphael.svg&&function(e){var t="hasOwnProperty",n=String,r=parseFloat,i=parseInt,s=Math,o=s.max,u=s.abs,a=s.pow,f=/[, ]+/,l=e.eve,c="",h=" ",p="http://www.w3.org/1999/xlink",d={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},v={};e.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var m=function(r,i){if(i){typeof r=="string"&&(r=m(r));for(var s in i)i[t](s)&&(s.substring(0,6)=="xlink:"?r.setAttributeNS(p,s.substring(6),n(i[s])):r.setAttribute(s,n(i[s])))}else r=e._g.doc.createElementNS("http://www.w3.org/2000/svg",r),r.style&&(r.style.webkitTapHighlightColor="rgba(0,0,0,0)");return r},g=function(t,i){var f="linear",l=t.id+i,h=.5,p=.5,d=t.node,v=t.paper,g=d.style,y=e._g.doc.getElementById(l);if(!y){i=n(i).replace(e._radial_gradient,function(e,t,n){f="radial";if(t&&n){h=r(t),p=r(n);var i=(p>.5)*2-1;a(h-.5,2)+a(p-.5,2)>.25&&(p=s.sqrt(.25-a(h-.5,2))*i+.5)&&p!=.5&&(p=p.toFixed(5)-1e-5*i)}return c}),i=i.split(/\s*\-\s*/);if(f=="linear"){var b=i.shift();b=-r(b);if(isNaN(b))return null;var w=[0,0,s.cos(e.rad(b)),s.sin(e.rad(b))],E=1/(o(u(w[2]),u(w[3]))||1);w[2]*=E,w[3]*=E,w[2]<0&&(w[0]=-w[2],w[2]=0),w[3]<0&&(w[1]=-w[3],w[3]=0)}var S=e._parseDots(i);if(!S)return null;l=l.replace(/[\(\)\s,\xb0#]/g,"_"),t.gradient&&l!=t.gradient.id&&(v.defs.removeChild(t.gradient),delete t.gradient);if(!t.gradient){y=m(f+"Gradient",{id:l}),t.gradient=y,m(y,f=="radial"?{fx:h,fy:p}:{x1:w[0],y1:w[1],x2:w[2],y2:w[3],gradientTransform:t.matrix.invert()}),v.defs.appendChild(y);for(var x=0,T=S.length;x<T;x++)y.appendChild(m("stop",{offset:S[x].offset?S[x].offset:x?"100%":"0%","stop-color":S[x].color||"#fff"}))}}return m(d,{fill:"url(#"+l+")",opacity:1,"fill-opacity":1}),g.fill=c,g.opacity=1,g.fillOpacity=1,1},y=function(e){var t=e.getBBox(1);m(e.pattern,{patternTransform:e.matrix.invert()+" translate("+t.x+","+t.y+")"})},b=function(r,i,s){if(r.type=="path"){var o=n(i).toLowerCase().split("-"),u=r.paper,a=s?"end":"start",f=r.node,l=r.attrs,h=l["stroke-width"],p=o.length,g="classic",y,b,w,E,S,x=3,T=3,N=5;while(p--)switch(o[p]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":g=o[p];break;case"wide":T=5;break;case"narrow":T=2;break;case"long":x=5;break;case"short":x=2}g=="open"?(x+=2,T+=2,N+=2,w=1,E=s?4:1,S={fill:"none",stroke:l.stroke}):(E=w=x/2,S={fill:l.stroke,stroke:"none"}),r._.arrows?s?(r._.arrows.endPath&&v[r._.arrows.endPath]--,r._.arrows.endMarker&&v[r._.arrows.endMarker]--):(r._.arrows.startPath&&v[r._.arrows.startPath]--,r._.arrows.startMarker&&v[r._.arrows.startMarker]--):r._.arrows={};if(g!="none"){var C="raphael-marker-"+g,k="raphael-marker-"+a+g+x+T;e._g.doc.getElementById(C)?v[C]++:(u.defs.appendChild(m(m("path"),{"stroke-linecap":"round",d:d[g],id:C})),v[C]=1);var L=e._g.doc.getElementById(k),A;L?(v[k]++,A=L.getElementsByTagName("use")[0]):(L=m(m("marker"),{id:k,markerHeight:T,markerWidth:x,orient:"auto",refX:E,refY:T/2}),A=m(m("use"),{"xlink:href":"#"+C,transform:(s?"rotate(180 "+x/2+" "+T/2+") ":c)+"scale("+x/N+","+T/N+")","stroke-width":(1/((x/N+T/N)/2)).toFixed(4)}),L.appendChild(A),u.defs.appendChild(L),v[k]=1),m(A,S);var O=w*(g!="diamond"&&g!="oval");s?(y=r._.arrows.startdx*h||0,b=e.getTotalLength(l.path)-O*h):(y=O*h,b=e.getTotalLength(l.path)-(r._.arrows.enddx*h||0)),S={},S["marker-"+a]="url(#"+k+")";if(b||y)S.d=Raphael.getSubpath(l.path,y,b);m(f,S),r._.arrows[a+"Path"]=C,r._.arrows[a+"Marker"]=k,r._.arrows[a+"dx"]=O,r._.arrows[a+"Type"]=g,r._.arrows[a+"String"]=i}else s?(y=r._.arrows.startdx*h||0,b=e.getTotalLength(l.path)-y):(y=0,b=e.getTotalLength(l.path)-(r._.arrows.enddx*h||0)),r._.arrows[a+"Path"]&&m(f,{d:Raphael.getSubpath(l.path,y,b)}),delete r._.arrows[a+"Path"],delete r._.arrows[a+"Marker"],delete r._.arrows[a+"dx"],delete r._.arrows[a+"Type"],delete r._.arrows[a+"String"];for(S in v)if(v[t](S)&&!v[S]){var M=e._g.doc.getElementById(S);M&&M.parentNode.removeChild(M)}}},w={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},E=function(e,t,r){t=w[n(t).toLowerCase()];if(t){var i=e.attrs["stroke-width"]||"1",s={round:i,square:i,butt:0}[e.attrs["stroke-linecap"]||r["stroke-linecap"]]||0,o=[],u=t.length;while(u--)o[u]=t[u]*i+(u%2?1:-1)*s;m(e.node,{"stroke-dasharray":o.join(",")})}},S=function(r,s){var a=r.node,l=r.attrs,h=a.style.visibility;a.style.visibility="hidden";for(var d in s)if(s[t](d)){if(!e._availableAttrs[t](d))continue;var v=s[d];l[d]=v;switch(d){case"blur":r.blur(v);break;case"href":case"title":case"target":var w=a.parentNode;if(w.tagName.toLowerCase()!="a"){var S=m("a");w.insertBefore(S,a),S.appendChild(a),w=S}d=="target"?w.setAttributeNS(p,"show",v=="blank"?"new":v):w.setAttributeNS(p,d,v);break;case"cursor":a.style.cursor=v;break;case"transform":r.transform(v);break;case"arrow-start":b(r,v);break;case"arrow-end":b(r,v,1);break;case"clip-rect":var x=n(v).split(f);if(x.length==4){r.clip&&r.clip.parentNode.parentNode.removeChild(r.clip.parentNode);var N=m("clipPath"),C=m("rect");N.id=e.createUUID(),m(C,{x:x[0],y:x[1],width:x[2],height:x[3]}),N.appendChild(C),r.paper.defs.appendChild(N),m(a,{"clip-path":"url(#"+N.id+")"}),r.clip=C}if(!v){var k=a.getAttribute("clip-path");if(k){var L=e._g.doc.getElementById(k.replace(/(^url\(#|\)$)/g,c));L&&L.parentNode.removeChild(L),m(a,{"clip-path":c}),delete r.clip}}break;case"path":r.type=="path"&&(m(a,{d:v?l.path=e._pathToAbsolute(v):"M0,0"}),r._.dirty=1,r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1)));break;case"width":a.setAttribute(d,v),r._.dirty=1;if(!l.fx)break;d="x",v=l.x;case"x":l.fx&&(v=-l.x-(l.width||0));case"rx":if(d=="rx"&&r.type=="rect")break;case"cx":a.setAttribute(d,v),r.pattern&&y(r),r._.dirty=1;break;case"height":a.setAttribute(d,v),r._.dirty=1;if(!l.fy)break;d="y",v=l.y;case"y":l.fy&&(v=-l.y-(l.height||0));case"ry":if(d=="ry"&&r.type=="rect")break;case"cy":a.setAttribute(d,v),r.pattern&&y(r),r._.dirty=1;break;case"r":r.type=="rect"?m(a,{rx:v,ry:v}):a.setAttribute(d,v),r._.dirty=1;break;case"src":r.type=="image"&&a.setAttributeNS(p,"href",v);break;case"stroke-width":if(r._.sx!=1||r._.sy!=1)v/=o(u(r._.sx),u(r._.sy))||1;r.paper._vbSize&&(v*=r.paper._vbSize),a.setAttribute(d,v),l["stroke-dasharray"]&&E(r,l["stroke-dasharray"],s),r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1));break;case"stroke-dasharray":E(r,v,s);break;case"fill":var A=n(v).match(e._ISURL);if(A){N=m("pattern");var O=m("image");N.id=e.createUUID(),m(N,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),m(O,{x:0,y:0,"xlink:href":A[1]}),N.appendChild(O),function(t){e._preload(A[1],function(){var e=this.offsetWidth,n=this.offsetHeight;m(t,{width:e,height:n}),m(O,{width:e,height:n}),r.paper.safari()})}(N),r.paper.defs.appendChild(N),m(a,{fill:"url(#"+N.id+")"}),r.pattern=N,r.pattern&&y(r);break}var M=e.getRGB(v);if(!M.error)delete s.gradient,delete l.gradient,!e.is(l.opacity,"undefined")&&e.is(s.opacity,"undefined")&&m(a,{opacity:l.opacity}),!e.is(l["fill-opacity"],"undefined")&&e.is(s["fill-opacity"],"undefined")&&m(a,{"fill-opacity":l["fill-opacity"]});else if((r.type=="circle"||r.type=="ellipse"||n(v).charAt()!="r")&&g(r,v)){if("opacity"in l||"fill-opacity"in l){var _=e._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,c));if(_){var D=_.getElementsByTagName("stop");m(D[D.length-1],{"stop-opacity":("opacity"in l?l.opacity:1)*("fill-opacity"in l?l["fill-opacity"]:1)})}}l.gradient=v,l.fill="none";break}M[t]("opacity")&&m(a,{"fill-opacity":M.opacity>1?M.opacity/100:M.opacity});case"stroke":M=e.getRGB(v),a.setAttribute(d,M.hex),d=="stroke"&&M[t]("opacity")&&m(a,{"stroke-opacity":M.opacity>1?M.opacity/100:M.opacity}),d=="stroke"&&r._.arrows&&("startString"in r._.arrows&&b(r,r._.arrows.startString),"endString"in r._.arrows&&b(r,r._.arrows.endString,1));break;case"gradient":(r.type=="circle"||r.type=="ellipse"||n(v).charAt()!="r")&&g(r,v);break;case"opacity":l.gradient&&!l[t]("stroke-opacity")&&m(a,{"stroke-opacity":v>1?v/100:v});case"fill-opacity":if(l.gradient){_=e._g.doc.getElementById(a.getAttribute("fill").replace(/^url\(#|\)$/g,c)),_&&(D=_.getElementsByTagName("stop"),m(D[D.length-1],{"stop-opacity":v}));break};default:d=="font-size"&&(v=i(v,10)+"px");var P=d.replace(/(\-.)/g,function(e){return e.substring(1).toUpperCase()});a.style[P]=v,r._.dirty=1,a.setAttribute(d,v)}}T(r,s),a.style.visibility=h},x=1.2,T=function(r,s){if(r.type!="text"||!(s[t]("text")||s[t]("font")||s[t]("font-size")||s[t]("x")||s[t]("y")))return;var o=r.attrs,u=r.node,a=u.firstChild?i(e._g.doc.defaultView.getComputedStyle(u.firstChild,c).getPropertyValue("font-size"),10):10;if(s[t]("text")){o.text=s.text;while(u.firstChild)u.removeChild(u.firstChild);var f=n(s.text).split("\n"),l=[],h;for(var p=0,d=f.length;p<d;p++)h=m("tspan"),p&&m(h,{dy:a*x,x:o.x}),h.appendChild(e._g.doc.createTextNode(f[p])),u.appendChild(h),l[p]=h}else{l=u.getElementsByTagName("tspan");for(p=0,d=l.length;p<d;p++)p?m(l[p],{dy:a*x,x:o.x}):m(l[0],{dy:0})}m(u,{x:o.x,y:o.y}),r._.dirty=1;var v=r._getBBox(),g=o.y-(v.y+v.height/2);g&&e.is(g,"finite")&&m(l[0],{dy:g})},N=function(t,n){var r=0,i=0;this[0]=this.node=t,t.raphael=!0,this.id=e._oid++,t.raphaelid=this.id,this.matrix=e.matrix(),this.realPath=null,this.paper=n,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!n.bottom&&(n.bottom=this),this.prev=n.top,n.top&&(n.top.next=this),n.top=this,this.next=null},C=e.el;N.prototype=C,C.constructor=N,e._engine.path=function(e,t){var n=m("path");t.canvas&&t.canvas.appendChild(n);var r=new N(n,t);return r.type="path",S(r,{fill:"none",stroke:"#000",path:e}),r},C.rotate=function(e,t,i){if(this.removed)return this;e=n(e).split(f),e.length-1&&(t=r(
e[1]),i=r(e[2])),e=r(e[0]),i==null&&(t=i);if(t==null||i==null){var s=this.getBBox(1);t=s.x+s.width/2,i=s.y+s.height/2}return this.transform(this._.transform.concat([["r",e,t,i]])),this},C.scale=function(e,t,i,s){if(this.removed)return this;e=n(e).split(f),e.length-1&&(t=r(e[1]),i=r(e[2]),s=r(e[3])),e=r(e[0]),t==null&&(t=e),s==null&&(i=s);if(i==null||s==null)var o=this.getBBox(1);return i=i==null?o.x+o.width/2:i,s=s==null?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",e,t,i,s]])),this},C.translate=function(e,t){return this.removed?this:(e=n(e).split(f),e.length-1&&(t=r(e[1])),e=r(e[0])||0,t=+t||0,this.transform(this._.transform.concat([["t",e,t]])),this)},C.transform=function(n){var r=this._;if(n==null)return r.transform;e._extractTransform(this,n),this.clip&&m(this.clip,{transform:this.matrix.invert()}),this.pattern&&y(this),this.node&&m(this.node,{transform:this.matrix});if(r.sx!=1||r.sy!=1){var i=this.attrs[t]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":i})}return this},C.hide=function(){return!this.removed&&this.paper.safari(this.node.style.display="none"),this},C.show=function(){return!this.removed&&this.paper.safari(this.node.style.display=""),this},C.remove=function(){if(this.removed||!this.node.parentNode)return;var t=this.paper;t.__set__&&t.__set__.exclude(this),l.unbind("raphael.*.*."+this.id),this.gradient&&t.defs.removeChild(this.gradient),e._tear(this,t),this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(var n in this)this[n]=typeof this[n]=="function"?e._removedFactory(n):null;this.removed=!0},C._getBBox=function(){if(this.node.style.display=="none"){this.show();var e=!0}var t={};try{t=this.node.getBBox()}catch(n){}finally{t=t||{}}return e&&this.hide(),t},C.attr=function(n,r){if(this.removed)return this;if(n==null){var i={};for(var s in this.attrs)this.attrs[t](s)&&(i[s]=this.attrs[s]);return i.gradient&&i.fill=="none"&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(r==null&&e.is(n,"string")){if(n=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(n=="transform")return this._.transform;var o=n.split(f),u={};for(var a=0,c=o.length;a<c;a++)n=o[a],n in this.attrs?u[n]=this.attrs[n]:e.is(this.paper.customAttributes[n],"function")?u[n]=this.paper.customAttributes[n].def:u[n]=e._availableAttrs[n];return c-1?u:u[o[0]]}if(r==null&&e.is(n,"array")){u={};for(a=0,c=n.length;a<c;a++)u[n[a]]=this.attr(n[a]);return u}if(r!=null){var h={};h[n]=r}else n!=null&&e.is(n,"object")&&(h=n);for(var p in h)l("raphael.attr."+p+"."+this.id,this,h[p]);for(p in this.paper.customAttributes)if(this.paper.customAttributes[t](p)&&h[t](p)&&e.is(this.paper.customAttributes[p],"function")){var d=this.paper.customAttributes[p].apply(this,[].concat(h[p]));this.attrs[p]=h[p];for(var v in d)d[t](v)&&(h[v]=d[v])}return S(this,h),this},C.toFront=function(){if(this.removed)return this;this.node.parentNode.tagName.toLowerCase()=="a"?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var t=this.paper;return t.top!=this&&e._tofront(this,t),this},C.toBack=function(){if(this.removed)return this;var t=this.node.parentNode;t.tagName.toLowerCase()=="a"?t.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):t.firstChild!=this.node&&t.insertBefore(this.node,this.node.parentNode.firstChild),e._toback(this,this.paper);var n=this.paper;return this},C.insertAfter=function(t){if(this.removed)return this;var n=t.node||t[t.length-1].node;return n.nextSibling?n.parentNode.insertBefore(this.node,n.nextSibling):n.parentNode.appendChild(this.node),e._insertafter(this,t,this.paper),this},C.insertBefore=function(t){if(this.removed)return this;var n=t.node||t[0].node;return n.parentNode.insertBefore(this.node,n),e._insertbefore(this,t,this.paper),this},C.blur=function(t){var n=this;if(+t!==0){var r=m("filter"),i=m("feGaussianBlur");n.attrs.blur=t,r.id=e.createUUID(),m(i,{stdDeviation:+t||1.5}),r.appendChild(i),n.paper.defs.appendChild(r),n._blur=r,m(n.node,{filter:"url(#"+r.id+")"})}else n._blur&&(n._blur.parentNode.removeChild(n._blur),delete n._blur,delete n.attrs.blur),n.node.removeAttribute("filter")},e._engine.circle=function(e,t,n,r){var i=m("circle");e.canvas&&e.canvas.appendChild(i);var s=new N(i,e);return s.attrs={cx:t,cy:n,r:r,fill:"none",stroke:"#000"},s.type="circle",m(i,s.attrs),s},e._engine.rect=function(e,t,n,r,i,s){var o=m("rect");e.canvas&&e.canvas.appendChild(o);var u=new N(o,e);return u.attrs={x:t,y:n,width:r,height:i,r:s||0,rx:s||0,ry:s||0,fill:"none",stroke:"#000"},u.type="rect",m(o,u.attrs),u},e._engine.ellipse=function(e,t,n,r,i){var s=m("ellipse");e.canvas&&e.canvas.appendChild(s);var o=new N(s,e);return o.attrs={cx:t,cy:n,rx:r,ry:i,fill:"none",stroke:"#000"},o.type="ellipse",m(s,o.attrs),o},e._engine.image=function(e,t,n,r,i,s){var o=m("image");m(o,{x:n,y:r,width:i,height:s,preserveAspectRatio:"none"}),o.setAttributeNS(p,"href",t),e.canvas&&e.canvas.appendChild(o);var u=new N(o,e);return u.attrs={x:n,y:r,width:i,height:s,src:t},u.type="image",u},e._engine.text=function(t,n,r,i){var s=m("text");t.canvas&&t.canvas.appendChild(s);var o=new N(s,t);return o.attrs={x:n,y:r,"text-anchor":"middle",text:i,font:e._availableAttrs.font,stroke:"none",fill:"#000"},o.type="text",S(o,o.attrs),o},e._engine.setSize=function(e,t){return this.width=e||this.width,this.height=t||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},e._engine.create=function(){var t=e._getContainer.apply(0,arguments),n=t&&t.container,r=t.x,i=t.y,s=t.width,o=t.height;if(!n)throw new Error("SVG container not found.");var u=m("svg"),a="overflow:hidden;",f;return r=r||0,i=i||0,s=s||512,o=o||342,m(u,{height:o,version:1.1,width:s,xmlns:"http://www.w3.org/2000/svg"}),n==1?(u.style.cssText=a+"position:absolute;left:"+r+"px;top:"+i+"px",e._g.doc.body.appendChild(u),f=1):(u.style.cssText=a+"position:relative",n.firstChild?n.insertBefore(u,n.firstChild):n.appendChild(u)),n=new e._Paper,n.width=s,n.height=o,n.canvas=u,n.clear(),n._left=n._top=0,f&&(n.renderfix=function(){}),n.renderfix(),n},e._engine.setViewBox=function(e,t,n,r,i){l("raphael.setViewBox",this,this._viewBox,[e,t,n,r,i]);var s=o(n/this.width,r/this.height),u=this.top,a=i?"meet":"xMinYMin",f,c;e==null?(this._vbSize&&(s=1),delete this._vbSize,f="0 0 "+this.width+h+this.height):(this._vbSize=s,f=e+h+t+h+n+h+r),m(this.canvas,{viewBox:f,preserveAspectRatio:a});while(s&&u)c="stroke-width"in u.attrs?u.attrs["stroke-width"]:1,u.attr({"stroke-width":c}),u._.dirty=1,u._.dirtyT=1,u=u.prev;return this._viewBox=[e,t,n,r,!!i],this},e.prototype.renderfix=function(){var e=this.canvas,t=e.style,n;try{n=e.getScreenCTM()||e.createSVGMatrix()}catch(r){n=e.createSVGMatrix()}var i=-n.e%1,s=-n.f%1;if(i||s)i&&(this._left=(this._left+i)%1,t.left=this._left+"px"),s&&(this._top=(this._top+s)%1,t.top=this._top+"px")},e.prototype.clear=function(){e.eve("raphael.clear",this);var t=this.canvas;while(t.firstChild)t.removeChild(t.firstChild);this.bottom=this.top=null,(this.desc=m("desc")).appendChild(e._g.doc.createTextNode("Created with Raphaël "+e.version)),t.appendChild(this.desc),t.appendChild(this.defs=m("defs"))},e.prototype.remove=function(){l("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?e._removedFactory(t):null};var k=e.st;for(var L in C)C[t](L)&&!k[t](L)&&(k[L]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e].apply(n,t)})}}(L))}(window.Raphael),window.Raphael.vml&&function(e){var t="hasOwnProperty",n=String,r=parseFloat,i=Math,s=i.round,o=i.max,u=i.min,a=i.abs,f="fill",l=/[, ]+/,c=e.eve,h=" progid:DXImageTransform.Microsoft",p=" ",d="",v={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},m=/([clmz]),?([^clmz]*)/gi,g=/ progid:\S+Blur\([^\)]+\)/g,y=/-?[^,\s-]+/g,b="position:absolute;left:0;top:0;width:1px;height:1px",w=21600,E={path:1,rect:1,image:1},S={circle:1,ellipse:1},x=function(t){var r=/[ahqstv]/ig,i=e._pathToAbsolute;n(t).match(r)&&(i=e._path2curve),r=/[clmz]/g;if(i==e._pathToAbsolute&&!n(t).match(r)){var o=n(t).replace(m,function(e,t,n){var r=[],i=t.toLowerCase()=="m",o=v[t];return n.replace(y,function(e){i&&r.length==2&&(o+=r+v[t=="m"?"l":"L"],r=[]),r.push(s(e*w))}),o+r});return o}var u=i(t),a,f;o=[];for(var l=0,c=u.length;l<c;l++){a=u[l],f=u[l][0].toLowerCase(),f=="z"&&(f="x");for(var h=1,g=a.length;h<g;h++)f+=s(a[h]*w)+(h!=g-1?",":d);o.push(f)}return o.join(p)},T=function(t,n,r){var i=e.matrix();return i.rotate(-t,.5,.5),{dx:i.x(n,r),dy:i.y(n,r)}},N=function(e,t,n,r,i,s){var o=e._,u=e.matrix,l=o.fillpos,c=e.node,h=c.style,d=1,v="",m,g=w/t,y=w/n;h.visibility="hidden";if(!t||!n)return;c.coordsize=a(g)+p+a(y),h.rotation=s*(t*n<0?-1:1);if(s){var b=T(s,r,i);r=b.dx,i=b.dy}t<0&&(v+="x"),n<0&&(v+=" y")&&(d=-1),h.flip=v,c.coordorigin=r*-g+p+i*-y;if(l||o.fillsize){var E=c.getElementsByTagName(f);E=E&&E[0],c.removeChild(E),l&&(b=T(s,u.x(l[0],l[1]),u.y(l[0],l[1])),E.position=b.dx*d+p+b.dy*d),o.fillsize&&(E.size=o.fillsize[0]*a(t)+p+o.fillsize[1]*a(n)),c.appendChild(E)}h.visibility="visible"};e.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var C=function(e,t,r){var i=n(t).toLowerCase().split("-"),s=r?"end":"start",o=i.length,u="classic",a="medium",f="medium";while(o--)switch(i[o]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":u=i[o];break;case"wide":case"narrow":f=i[o];break;case"long":case"short":a=i[o]}var l=e.node.getElementsByTagName("stroke")[0];l[s+"arrow"]=u,l[s+"arrowlength"]=a,l[s+"arrowwidth"]=f},k=function(i,a){i.attrs=i.attrs||{};var c=i.node,h=i.attrs,v=c.style,m,g=E[i.type]&&(a.x!=h.x||a.y!=h.y||a.width!=h.width||a.height!=h.height||a.cx!=h.cx||a.cy!=h.cy||a.rx!=h.rx||a.ry!=h.ry||a.r!=h.r),y=S[i.type]&&(h.cx!=a.cx||h.cy!=a.cy||h.r!=a.r||h.rx!=a.rx||h.ry!=a.ry),b=i;for(var T in a)a[t](T)&&(h[T]=a[T]);g&&(h.path=e._getPath[i.type](i),i._.dirty=1),a.href&&(c.href=a.href),a.title&&(c.title=a.title),a.target&&(c.target=a.target),a.cursor&&(v.cursor=a.cursor),"blur"in a&&i.blur(a.blur);if(a.path&&i.type=="path"||g)c.path=x(~n(h.path).toLowerCase().indexOf("r")?e._pathToAbsolute(h.path):h.path),i.type=="image"&&(i._.fillpos=[h.x,h.y],i._.fillsize=[h.width,h.height],N(i,1,1,0,0,0));"transform"in a&&i.transform(a.transform);if(y){var k=+h.cx,A=+h.cy,O=+h.rx||+h.r||0,_=+h.ry||+h.r||0;c.path=e.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",s((k-O)*w),s((A-_)*w),s((k+O)*w),s((A+_)*w),s(k*w))}if("clip-rect"in a){var D=n(a["clip-rect"]).split(l);if(D.length==4){D[2]=+D[2]+ +D[0],D[3]=+D[3]+ +D[1];var P=c.clipRect||e._g.doc.createElement("div"),H=P.style;H.clip=e.format("rect({1}px {2}px {3}px {0}px)",D),c.clipRect||(H.position="absolute",H.top=0,H.left=0,H.width=i.paper.width+"px",H.height=i.paper.height+"px",c.parentNode.insertBefore(P,c),P.appendChild(c),c.clipRect=P)}a["clip-rect"]||c.clipRect&&(c.clipRect.style.clip="auto")}if(i.textpath){var B=i.textpath.style;a.font&&(B.font=a.font),a["font-family"]&&(B.fontFamily='"'+a["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,d)+'"'),a["font-size"]&&(B.fontSize=a["font-size"]),a["font-weight"]&&(B.fontWeight=a["font-weight"]),a["font-style"]&&(B.fontStyle=a["font-style"])}"arrow-start"in a&&C(b,a["arrow-start"]),"arrow-end"in a&&C(b,a["arrow-end"],1);if(a.opacity!=null||a["stroke-width"]!=null||a.fill!=null||a.src!=null||a.stroke!=null||a["stroke-width"]!=null||a["stroke-opacity"]!=null||a["fill-opacity"]!=null||a["stroke-dasharray"]!=null||a["stroke-miterlimit"]!=null||a["stroke-linejoin"]!=null||a["stroke-linecap"]!=null){var j=c.getElementsByTagName(f),F=!1;j=j&&j[0],!j&&(F=j=M(f)),i.type=="image"&&a.src&&(j.src=a.src),a.fill&&(j.on=!0);if(j.on==null||a.fill=="none"||a.fill===null)j.on=!1;if(j.on&&a.fill){var I=n(a.fill).match(e._ISURL);if(I){j.parentNode==c&&c.removeChild(j),j.rotate=!0,j.src=I[1],j.type="tile";var q=i.getBBox(1);j.position=q.x+p+q.y,i._.fillpos=[q.x,q.y],e._preload(I[1],function(){i._.fillsize=[this.offsetWidth,this.offsetHeight]})}else j.color=e.getRGB(a.fill).hex,j.src=d,j.type="solid",e.getRGB(a.fill).error&&(b.type in{circle:1,ellipse:1}||n(a.fill).charAt()!="r")&&L(b,a.fill,j)&&(h.fill="none",h.gradient=a.fill,j.rotate=!1)}if("fill-opacity"in a||"opacity"in a){var U=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+e.getRGB(a.fill).o+1||2)-1);U=u(o(U,0),1),j.opacity=U,j.src&&(j.color="none")}c.appendChild(j);var z=c.getElementsByTagName("stroke")&&c.getElementsByTagName("stroke")[0],W=!1;!z&&(W=z=M("stroke"));if(a.stroke&&a.stroke!="none"||a["stroke-width"]||a["stroke-opacity"]!=null||a["stroke-dasharray"]||a["stroke-miterlimit"]||a["stroke-linejoin"]||a["stroke-linecap"])z.on=!0;(a.stroke=="none"||a.stroke===null||z.on==null||a.stroke==0||a["stroke-width"]==0)&&(z.on=!1);var X=e.getRGB(a.stroke);z.on&&a.stroke&&(z.color=X.hex),U=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+X.o+1||2)-1);var V=(r(a["stroke-width"])||1)*.75;U=u(o(U,0),1),a["stroke-width"]==null&&(V=h["stroke-width"]),a["stroke-width"]&&(z.weight=V),V&&V<1&&(U*=V)&&(z.weight=1),z.opacity=U,a["stroke-linejoin"]&&(z.joinstyle=a["stroke-linejoin"]||"miter"),z.miterlimit=a["stroke-miterlimit"]||8,a["stroke-linecap"]&&(z.endcap=a["stroke-linecap"]=="butt"?"flat":a["stroke-linecap"]=="square"?"square":"round");if(a["stroke-dasharray"]){var $={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};z.dashstyle=$[t](a["stroke-dasharray"])?$[a["stroke-dasharray"]]:d}W&&c.appendChild(z)}if(b.type=="text"){b.paper.canvas.style.display=d;var J=b.paper.span,K=100,Q=h.font&&h.font.match(/\d+(?:\.\d*)?(?=px)/);v=J.style,h.font&&(v.font=h.font),h["font-family"]&&(v.fontFamily=h["font-family"]),h["font-weight"]&&(v.fontWeight=h["font-weight"]),h["font-style"]&&(v.fontStyle=h["font-style"]),Q=r(h["font-size"]||Q&&Q[0])||10,v.fontSize=Q*K+"px",b.textpath.string&&(J.innerHTML=n(b.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var G=J.getBoundingClientRect();b.W=h.w=(G.right-G.left)/K,b.H=h.h=(G.bottom-G.top)/K,b.X=h.x,b.Y=h.y+b.H/2,("x"in a||"y"in a)&&(b.path.v=e.format("m{0},{1}l{2},{1}",s(h.x*w),s(h.y*w),s(h.x*w)+1));var Y=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var Z=0,et=Y.length;Z<et;Z++)if(Y[Z]in a){b._.dirty=1;break}switch(h["text-anchor"]){case"start":b.textpath.style["v-text-align"]="left",b.bbx=b.W/2;break;case"end":b.textpath.style["v-text-align"]="right",b.bbx=-b.W/2;break;default:b.textpath.style["v-text-align"]="center",b.bbx=0}b.textpath.style["v-text-kern"]=!0}},L=function(t,s,o){t.attrs=t.attrs||{};var u=t.attrs,a=Math.pow,f,l,c="linear",h=".5 .5";t.attrs.gradient=s,s=n(s).replace(e._radial_gradient,function(e,t,n){return c="radial",t&&n&&(t=r(t),n=r(n),a(t-.5,2)+a(n-.5,2)>.25&&(n=i.sqrt(.25-a(t-.5,2))*((n>.5)*2-1)+.5),h=t+p+n),d}),s=s.split(/\s*\-\s*/);if(c=="linear"){var v=s.shift();v=-r(v);if(isNaN(v))return null}var m=e._parseDots(s);if(!m)return null;t=t.shape||t.node;if(m.length){t.removeChild(o),o.on=!0,o.method="none",o.color=m[0].color,o.color2=m[m.length-1].color;var g=[];for(var y=0,b=m.length;y<b;y++)m[y].offset&&g.push(m[y].offset+p+m[y].color);o.colors=g.length?g.join():"0% "+o.color,c=="radial"?(o.type="gradientTitle",o.focus="100%",o.focussize="0 0",o.focusposition=h,o.angle=0):(o.type="gradient",o.angle=(270-v)%360),t.appendChild(o)}return 1},A=function(t,n){this[0]=this.node=t,t.raphael=!0,this.id=e._oid++,t.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=n,this.matrix=e.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!n.bottom&&(n.bottom=this),this.prev=n.top,n.top&&(n.top.next=this),n.top=this,this.next=null},O=e.el;A.prototype=O,O.constructor=A,O.transform=function(t){if(t==null)return this._.transform;var r=this.paper._viewBoxShift,i=r?"s"+[r.scale,r.scale]+"-1-1t"+[r.dx,r.dy]:d,s;r&&(s=t=n(t).replace(/\.{3}|\u2026/g,this._.transform||d)),e._extractTransform(this,i+t);var o=this.matrix.clone(),u=this.skew,a=this.node,f,l=~n(this.attrs.fill).indexOf("-"),c=!n(this.attrs.fill).indexOf("url(");o.translate(-0.5,-0.5);if(c||l||this.type=="image"){u.matrix="1 0 0 1",u.offset="0 0",f=o.split();if(l&&f.noRotation||!f.isSimple){a.style.filter=o.toFilter();var h=this.getBBox(),v=this.getBBox(1),m=h.x-v.x,g=h.y-v.y;a.coordorigin=m*-w+p+g*-w,N(this,1,1,m,g,0)}else a.style.filter=d,N(this,f.scalex,f.scaley,f.dx,f.dy,f.rotate)}else a.style.filter=d,u.matrix=n(o),u.offset=o.offset();return s&&(this._.transform=s),this},O.rotate=function(e,t,i){if(this.removed)return this;if(e==null)return;e=n(e).split(l),e.length-1&&(t=r(e[1]),i=r(e[2])),e=r(e[0]),i==null&&(t=i);if(t==null||i==null){var s=this.getBBox(1);t=s.x+s.width/2,i=s.y+s.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",e,t,i]])),this},O.translate=function(e,t){return this.removed?this:(e=n(e).split(l),e.length-1&&(t=r(e[1])),e=r(e[0])||0,t=+t||0,this._.bbox&&(this._.bbox.x+=e,this._.bbox.y+=t),this.transform(this._.transform.concat([["t",e,t]])),this)},O.scale=function(e,t,i,s){if(this.removed)return this;e=n(e).split(l),e.length-1&&(t=r(e[1]),i=r(e[2]),s=r(e[3]),isNaN(i)&&(i=null),isNaN(s)&&(s=null)),e=r(e[0]),t==null&&(t=e),s==null&&(i=s);if(i==null||s==null)var o=this.getBBox(1);return i=i==null?o.x+o.width/2:i,s=s==null?o.y+o.height/2:s,this.transform(this._.transform.concat([["s",e,t,i,s]])),this._.dirtyT=1,this},O.hide=function(){return!this.removed&&(this.node.style.display="none"),this},O.show=function(){return!this.removed&&(this.node.style.display=d),this},O._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},O.remove=function(){if(this.removed||!this.node.parentNode)return;this.paper.__set__&&this.paper.__set__.exclude(this),e.eve.unbind("raphael.*.*."+this.id),e._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var t in this)this[t]=typeof this[t]=="function"?e._removedFactory(t):null;this.removed=!0},O.attr=function(n,r){if(this.removed)return this;if(n==null){var i={};for(var s in this.attrs)this.attrs[t](s)&&(i[s]=this.attrs[s]);return i.gradient&&i.fill=="none"&&(i.fill=i.gradient)&&delete i.gradient,i.transform=this._.transform,i}if(r==null&&e.is(n,"string")){if(n==f&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;var o=n.split(l),u={};for(var a=0,h=o.length;a<h;a++)n=o[a],n in this.attrs?u[n]=this.attrs[n]:e.is(this.paper.customAttributes[n],"function")?u[n]=this.paper.customAttributes[n].def:u[n]=e._availableAttrs[n];return h-1?u:u[o[0]]}if(this.attrs&&r==null&&e.is(n,"array")){u={};for(a=0,h=n.length;a<h;a++)u[n[a]]=this.attr(n[a]);return u}var p;r!=null&&(p={},p[n]=r),r==null&&e.is(n,"object")&&(p=n);for(var d in p)c("raphael.attr."+d+"."+this.id,this,p[d]);if(p){for(d in this.paper.customAttributes)if(this.paper.customAttributes[t](d)&&p[t](d)&&e.is(this.paper.customAttributes[d],"function")){var v=this.paper.customAttributes[d].apply(this,[].concat(p[d]));this.attrs[d]=p[d];for(var m in v)v[t](m)&&(p[m]=v[m])}p.text&&this.type=="text"&&(this.textpath.string=p.text),k(this,p)}return this},O.toFront=function(){return!this.removed&&this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&e._tofront(this,this.paper),this},O.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),e._toback(this,this.paper)),this)},O.insertAfter=function(t){return this.removed?this:(t.constructor==e.st.constructor&&(t=t[t.length-1]),t.node.nextSibling?t.node.parentNode.insertBefore(this.node,t.node.nextSibling):t.node.parentNode.appendChild(this.node),e._insertafter(this,t,this.paper),this)},O.insertBefore=function(t){return this.removed?this:(t.constructor==e.st.constructor&&(t=t[0]),t.node.parentNode.insertBefore(this.node,t.node),e._insertbefore(this,t,this.paper),this)},O.blur=function(t){var n=this.node.runtimeStyle,r=n.filter;r=r.replace(g,d),+t!==0?(this.attrs.blur=t,n.filter=r+p+h+".Blur(pixelradius="+(+t||1.5)+")",n.margin=e.format("-{0}px 0 0 -{0}px",s(+t||1.5))):(n.filter=r,n.margin=0,delete this.attrs.blur)},e._engine.path=function(e,t){var n=M("shape");n.style.cssText=b,n.coordsize=w+p+w,n.coordorigin=t.coordorigin;var r=new A(n,t),i={fill:"none",stroke:"#000"};e&&(i.path=e),r.type="path",r.path=[],r.Path=d,k(r,i),t.canvas.appendChild(n);var s=M("skew");return s.on=!0,n.appendChild(s),r.skew=s,r.transform(d),r},e._engine.rect=function(t,n,r,i,s,o){var u=e._rectPath(n,r,i,s,o),a=t.path(u),f=a.attrs;return a.X=f.x=n,a.Y=f.y=r,a.W=f.width=i,a.H=f.height=s,f.r=o,f.path=u,a.type="rect",a},e._engine.ellipse=function(e,t,n,r,i){var s=e.path(),o=s.attrs;return s.X=t-r,s.Y=n-i,s.W=r*2,s.H=i*2,s.type="ellipse",k(s,{cx:t,cy:n,rx:r,ry:i}),s},e._engine.circle=function(e,t,n,r){var i=e.path(),s=i.attrs;return i.X=t-r,i.Y=n-r,i.W=i.H=r*2,i.type="circle",k(i,{cx:t,cy:n,r:r}),i},e._engine.image=function(t,n,r,i,s,o){var u=e._rectPath(r,i,s,o),a=t.path(u).attr({stroke:"none"}),l=a.attrs,c=a.node,h=c.getElementsByTagName(f)[0];return l.src=n,a.X=l.x=r,a.Y=l.y=i,a.W=l.width=s,a.H=l.height=o,l.path=u,a.type="image",h.parentNode==c&&c.removeChild(h),h.rotate=!0,h.src=n,h.type="tile",a._.fillpos=[r,i],a._.fillsize=[s,o],c.appendChild(h),N(a,1,1,0,0,0),a},e._engine.text=function(t,r,i,o){var u=M("shape"),a=M("path"),f=M("textpath");r=r||0,i=i||0,o=o||"",a.v=e.format("m{0},{1}l{2},{1}",s(r*w),s(i*w),s(r*w)+1),a.textpathok=!0,f.string=n(o),f.on=!0,u.style.cssText=b,u.coordsize=w+p+w,u.coordorigin="0 0";var l=new A(u,t),c={fill:"#000",stroke:"none",font:e._availableAttrs.font,text:o};l.shape=u,l.path=a,l.textpath=f,l.type="text",l.attrs.text=n(o),l.attrs.x=r,l.attrs.y=i,l.attrs.w=1,l.attrs.h=1,k(l,c),u.appendChild(f),u.appendChild(a),t.canvas.appendChild(u);var h=M("skew");return h.on=!0,u.appendChild(h),l.skew=h,l.transform(d),l},e._engine.setSize=function(t,n){var r=this.canvas.style;return this.width=t,this.height=n,t==+t&&(t+="px"),n==+n&&(n+="px"),r.width=t,r.height=n,r.clip="rect(0 "+t+" "+n+" 0)",this._viewBox&&e._engine.setViewBox.apply(this,this._viewBox),this},e._engine.setViewBox=function(t,n,r,i,s){e.eve("raphael.setViewBox",this,this._viewBox,[t,n,r,i,s]);var u=this.width,a=this.height,f=1/o(r/u,i/a),l,c;return s&&(l=a/i,c=u/r,r*l<u&&(t-=(u-r*l)/2/l),i*c<a&&(n-=(a-i*c)/2/c)),this._viewBox=[t,n,r,i,!!s],this._viewBoxShift={dx:-t,dy:-n,scale:f},this.forEach(function(e){e.transform("...")}),this};var M;e._engine.initWin=function(e){var t=e.document;t.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!t.namespaces.rvml&&t.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),M=function(e){return t.createElement("<rvml:"+e+' class="rvml">')}}catch(n){M=function(e){return t.createElement("<"+e+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},e._engine.initWin(e._g.win),e._engine.create=function(){var t=e._getContainer.apply(0,arguments),n=t.container,r=t.height,i,s=t.width,o=t.x,u=t.y;if(!n)throw new Error("VML container not found.");var a=new e._Paper,f=a.canvas=e._g.doc.createElement("div"),l=f.style;return o=o||0,u=u||0,s=s||512,r=r||342,a.width=s,a.height=r,s==+s&&(s+="px"),r==+r&&(r+="px"),a.coordsize=w*1e3+p+w*1e3,a.coordorigin="0 0",a.span=e._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",f.appendChild(a.span),l.cssText=e.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",s,r),n==1?(e._g.doc.body.appendChild(f),l.left=o+"px",l.top=u+"px",l.position="absolute"):n.firstChild?n.insertBefore(f,n.firstChild):n.appendChild(f),a.renderfix=function(){},a},e.prototype.clear=function(){e.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=e._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},e.prototype.remove=function(){e.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var t in this)this[t]=typeof this[t]=="function"?e._removedFactory(t):null;return!0};var _=e.st;for(var D in O)O[t](D)&&!_[t](D)&&(_[D]=function(e){return function(){var t=arguments;return this.forEach(function(n){n[e].apply(n,t)})}}(D))}(window.Raphael),function(e,t){function G(e,t,n,r){n=n||[],t=t||v;var i,s,o,f,l=t.nodeType;if(l!==1&&l!==9)return[];if(!e||typeof e!="string")return n;o=u(t);if(!o&&!r)if(i=B.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&a(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return b.apply(n,y.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&J&&t.getElementsByClassName)return b.apply(n,y.call(t.getElementsByClassName(f),0)),n}return ft(e,t,n,r,o)}function Y(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function Z(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function et(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function tt(e,t,n,r){var i,o,u,a,f,l,c,h,p,m,g=!n&&t!==v,b=(g?"<s>":"")+e.replace(_,"$1<s>"),w=x[d][b];if(w)return r?0:y.call(w,0);f=e,l=[],h=0,p=s.preFilter,m=s.filter;while(f){if(!i||(o=D.exec(f)))o&&(f=f.slice(o[0].length),u.selector=c),l.push(u=[]),c="",g&&(f=" "+f);i=!1;if(o=P.exec(f))c+=o[0],f=f.slice(o[0].length),i=u.push({part:o.pop().replace(_," "),string:o[0],captures:o});for(a in m)(o=z[a].exec(f))&&(!p[a]||(o=p[a](o,t,n)))&&(c+=o[0],f=f.slice(o[0].length),i=u.push({part:a,string:o.shift(),captures:o}));if(!i)break}return c&&(u.selector=c),r?f.length:f?G.error(e):y.call(x(b,l),0)}function nt(e,t,i,s){var o=t.dir,u=g++;return e||(e=function(e){return e===i}),t.first?function(t){while(t=t[o])if(t.nodeType===1)return e(t)&&t}:s?function(t){while(t=t[o])if(t.nodeType===1&&e(t))return t}:function(t){var i,s=u+"."+n,a=s+"."+r;while(t=t[o])if(t.nodeType===1){if((i=t[d])===a)return t.sizset;if(typeof i=="string"&&i.indexOf(s)===0){if(t.sizset)return t}else{t[d]=a;if(e(t))return t.sizset=!0,t;t.sizset=!1}}}}function rt(e,t){return e?function(n){var r=t(n);return r&&e(r===!0?n:r)}:t}function it(e,t,n){var r,i,o=0;for(;r=e[o];o++)s.relative[r.part]?i=nt(i,s.relative[r.part],t,n):i=rt(i,s.filter[r.part].apply(null,r.captures.concat(t,n)));return i}function st(e){return function(t){var n,r=0;for(;n=e[r];r++)if(n(t))return!0;return!1}}function ot(e,t,n,r){var i=0,s=t.length;for(;i<s;i++)G(e,t[i],n,r)}function ut(e,t,n,r,i,o){var u,a=s.setFilters[t.toLowerCase()];return a||G.error(t),(e||!(u=i))&&ot(e||"*",r,u=[],i),u.length>0?a(u,n,o):[]}function at(e,n,r,i){var s,o,u,a,f,l,c,h,p,d,v,m,g,y=0,w=e.length,E=z.POS,S=new RegExp("^"+E.source+"(?!"+N+")","i"),x=function(){var e=1,n=arguments.length-2;for(;e<n;e++)arguments[e]===t&&(p[e]=t)};for(;y<w;y++){s=e[y],o="",h=i;for(u=0,a=s.length;u<a;u++){f=s[u],l=f.string;if(f.part==="PSEUDO"){E.exec(""),c=0;while(p=E.exec(l)){d=!0,v=E.lastIndex=p.index+p[0].length;if(v>c){o+=l.slice(c,p.index),c=v,m=[n],P.test(o)&&(h&&(m=h),h=i);if(g=I.test(o))o=o.slice(0,-5).replace(P,"$&*"),c++;p.length>1&&p[0].replace(S,x),h=ut(o,p[1],p[2],m,h,g)}o=""}}d||(o+=l),d=!1}o?P.test(o)?ot(o,h||[n],r,i):G(o,n,r,i?i.concat(h):h):b.apply(r,h)}return w===1?r:G.uniqueSort(r)}function ft(e,t,i,o,u){e=e.replace(_,"$1");var a,l,c,h,p,d,v,m,g,w,E=tt(e,t,u),S=t.nodeType;if(z.POS.test(e))return at(E,t,i,o);if(o)a=y.call(o,0);else if(E.length===1){if((d=y.call(E[0],0)).length>2&&(v=d[0]).part==="ID"&&S===9&&!u&&s.relative[d[1].part]){t=s.find.ID(v.captures[0].replace(U,""),t,u)[0];if(!t)return i;e=e.slice(d.shift().string.length)}g=(E=F.exec(d[0].string))&&!E.index&&t.parentNode||t,m="";for(p=d.length-1;p>=0;p--){v=d[p],w=v.part,m=v.string+m;if(s.relative[w])break;if(s.order.test(w)){a=s.find[w](v.captures[0].replace(U,""),g,u);if(a==null)continue;e=e.slice(0,e.length-m.length)+m.replace(z[w],""),e||b.apply(i,y.call(a,0));break}}}if(e){l=f(e,t,u),n=l.dirruns++,a==null&&(a=s.find.TAG("*",F.test(e)&&t.parentNode||t));for(p=0;h=a[p];p++)r=l.runs++,l(h)&&i.push(h)}return i}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),v=e.document,m=v.documentElement,g=0,y=[].slice,b=[].push,w=function(e,t){return e[d]=t||!0,e},E=function(){var e={},t=[];return w(function(n,r){return t.push(n)>s.cacheLength&&delete e[t.shift()],e[n]=r},e)},S=E(),x=E(),T=E(),N="[\\x20\\t\\r\\n\\f]",C="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",k=C.replace("w","w#"),L="([*^$|!~]?=)",A="\\["+N+"*("+C+")"+N+"*(?:"+L+N+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+k+")|)|)"+N+"*\\]",O=":("+C+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+A+")|[^:]|\\\\.)*|.*))\\)|)",M=":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)",_=new RegExp("^"+N+"+|((?:^|[^\\\\])(?:\\\\.)*)"+N+"+$","g"),D=new RegExp("^"+N+"*,"+N+"*"),P=new RegExp("^"+N+"*([\\x20\\t\\r\\n\\f>+~])"+N+"*"),H=new RegExp(O),B=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,j=/^:not/,F=/[\x20\t\r\n\f]*[+~]/,I=/:not\($/,q=/h\d/i,R=/input|select|textarea|button/i,U=/\\(?!\\)/g,z={ID:new RegExp("^#("+C+")"),CLASS:new RegExp("^\\.("+C+")"),NAME:new RegExp("^\\[name=['\"]?("+C+")['\"]?\\]"),TAG:new RegExp("^("+C.replace("w","w*")+")"),ATTR:new RegExp("^"+A),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),POS:new RegExp(M,"ig"),needsContext:new RegExp("^"+N+"*[>+~]|"+M,"i")},W=function(e){var t=v.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},X=W(function(e){return e.appendChild(v.createComment("")),!e.getElementsByTagName("*").length}),V=W(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),$=W(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),J=W(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),K=W(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",m.insertBefore(e,m.firstChild);var t=v.getElementsByName&&v.getElementsByName(d).length===2+v.getElementsByName(d+0).length;return i=!v.getElementById(d),m.removeChild(e),t});try{y.call(m.childNodes,0)[0].nodeType}catch(Q){y=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}G.matches=function(e,t){return G(e,null,null,t)},G.matchesSelector=function(e,t){return G(t,null,null,[e]).length>0},o=G.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},u=G.isXML=function(t){var n=t&&(t.ownerDocument||t).documentElement;return n?n.nodeName!=="HTML":!1},a=G.contains=m.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:m.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},G.attr=function(e,t){var n,r=u(e);return r||(t=t.toLowerCase()),s.attrHandle[t]?s.attrHandle[t](e):$||r?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},s=G.selectors={cacheLength:50,createPseudo:w,match:z,order:new RegExp("ID|TAG"+(K?"|NAME":"")+(J?"|CLASS":"")),attrHandle:V?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:i?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===
e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:X?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(U,""),e[3]=(e[4]||e[5]||"").replace(U,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||G.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&G.error(e[0]),e},PSEUDO:function(e,t,n){var r,i;if(z.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(r=e[4])H.test(r)&&(i=tt(r,t,n,!0))&&(i=r.indexOf(")",r.length-i)-r.length)&&(r=r.slice(0,i),e[0]=e[0].slice(0,i)),e[2]=r;return e.slice(0,3)}},filter:{ID:i?function(e){return e=e.replace(U,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace(U,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace(U,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=S[d][e];return t||(t=S(e,new RegExp("(^|"+N+")"+e+"("+N+"|$)"))),function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")}},ATTR:function(e,t,n){return t?function(r){var i=G.attr(r,e),s=i+"";if(i==null)return t==="!=";switch(t){case"=":return s===n;case"!=":return s!==n;case"^=":return n&&s.indexOf(n)===0;case"*=":return n&&s.indexOf(n)>-1;case"$=":return n&&s.substr(s.length-n.length)===n;case"~=":return(" "+s+" ").indexOf(n)>-1;case"|=":return s===n||s.substr(0,n.length+1)===n+"-"}}:function(t){return G.attr(t,e)!=null}},CHILD:function(e,t,n,r){if(e==="nth"){var i=g++;return function(e){var t,s,o=0,u=e;if(n===1&&r===0)return!0;t=e.parentNode;if(t&&(t[d]!==i||!e.sizset)){for(u=t.firstChild;u;u=u.nextSibling)if(u.nodeType===1){u.sizset=++o;if(u===e)break}t[d]=i}return s=e.sizset-r,n===0?s===0:s%n===0&&s/n>=0}}return function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t,n,r){var i,o=s.pseudos[e]||s.pseudos[e.toLowerCase()];return o||G.error("unsupported pseudo: "+e),o[d]?o(t,n,r):o.length>1?(i=[e,e,"",t],function(e){return o(e,0,i)}):o}},pseudos:{not:w(function(e,t,n){var r=f(e.replace(_,"$1"),t,n);return function(e){return!r(e)}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!s.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},contains:w(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),has:w(function(e){return function(t){return G(e,t).length>0}}),header:function(e){return q.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:Y("radio"),checkbox:Y("checkbox"),file:Y("file"),password:Y("password"),image:Y("image"),submit:Z("submit"),reset:Z("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return R.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&(!!e.type||!!e.href)},active:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t,n){return n?e.slice(1):[e[0]]},last:function(e,t,n){var r=e.pop();return n?e:[r]},even:function(e,t,n){var r=[],i=n?1:0,s=e.length;for(;i<s;i+=2)r.push(e[i]);return r},odd:function(e,t,n){var r=[],i=n?0:1,s=e.length;for(;i<s;i+=2)r.push(e[i]);return r},lt:function(e,t,n){return n?e.slice(+t):e.slice(0,+t)},gt:function(e,t,n){return n?e.slice(0,+t+1):e.slice(+t+1)},eq:function(e,t,n){var r=e.splice(+t,1);return n?e:r}}},l=m.compareDocumentPosition?function(e,t){return e===t?(c=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return c=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return et(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return et(i[f],s[f]);return f===n?et(e,s[f],-1):et(i[f],t,1)},[0,0].sort(l),h=!c,G.uniqueSort=function(e){var t,n=1;c=h,e.sort(l);if(c)for(;t=e[n];n++)t===e[n-1]&&e.splice(n--,1);return e},G.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},f=G.compile=function(e,t,n){var r,i,s,o=T[d][e];if(o&&o.context===t)return o;r=tt(e,t,n);for(i=0,s=r.length;i<s;i++)r[i]=it(r[i],t,n);return o=T(e,st(r)),o.context=t,o.runs=o.dirruns=0,o},v.querySelectorAll&&function(){var e,t=ft,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active",":focus"],o=m.matchesSelector||m.mozMatchesSelector||m.webkitMatchesSelector||m.oMatchesSelector||m.msMatchesSelector;W(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+N+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),W(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+N+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),ft=function(e,r,s,o,u){if(!o&&!u&&(!i||!i.test(e)))if(r.nodeType===9)try{return b.apply(s,y.call(r.querySelectorAll(e),0)),s}catch(a){}else if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){var f,l,c,h=r.getAttribute("id"),p=h||d,v=F.test(e)&&r.parentNode||r;h?p=p.replace(n,"\\$&"):r.setAttribute("id",p),f=tt(e,r,u),p="[id='"+p+"']";for(l=0,c=f.length;l<c;l++)f[l]=p+f[l].selector;try{return b.apply(s,y.call(v.querySelectorAll(f.join(",")),0)),s}catch(a){}finally{h||r.removeAttribute("id")}}return t(e,r,s,o,u)},o&&(W(function(t){e=o.call(t,"div");try{o.call(t,"[test!='']:sizzle"),s.push(z.PSEUDO.source,z.POS.source,"!=")}catch(n){}}),s=new RegExp(s.join("|")),G.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!u(t)&&!s.test(n)&&(!i||!i.test(n)))try{var a=o.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return G(n,null,null,[t]).length>0})}(),s.setFilters.nth=s.setFilters.eq,s.filters=s.pseudos,typeof define=="function"&&define.amd?define(function(){return G}):e.Sizzle=G}(window),Array.prototype.map||(Array.prototype.map=function(e,t){var n,r,i;if(this==null)throw new TypeError(" this is null or not defined");var s=Object(this),o=s.length>>>0;if({}.toString.call(e)!="[object Function]")throw new TypeError(e+" is not a function");t&&(n=t),r=new Array(o),i=0;while(i<o){var u,a;i in s&&(u=s[i],a=e.call(n,u,i,s),r[i]=a),i++}return r}),Array.prototype.forEach||(Array.prototype.forEach=function(e,t){var n,r;if(this==null)throw new TypeError(" this is null or not defined");var i=Object(this),s=i.length>>>0;if({}.toString.call(e)!="[object Function]")throw new TypeError(e+" is not a function");t&&(n=t),r=0;while(r<s){var o;r in i&&(o=i[r],e.call(n,o,r,i)),r++}}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){"use strict";if(this==null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(n===0)return-1;var r=0;arguments.length>0&&(r=Number(arguments[1]),r!=r?r=0:r!=0&&r!=Infinity&&r!=-Infinity&&(r=(r>0||-1)*Math.floor(Math.abs(r))));if(r>=n)return-1;var i=r>=0?r:Math.max(n-Math.abs(r),0);for(;i<n;i++)if(i in t&&t[i]===e)return i;return-1}),Array.prototype.filter||(Array.prototype.filter=function(e){"use strict";if(this==null)throw new TypeError;var t=Object(this),n=t.length>>>0;if(typeof e!="function")throw new TypeError;var r=[],i=arguments[1];for(var s=0;s<n;s++)if(s in t){var o=t[s];e.call(i,o,s,t)&&r.push(o)}return r}),Array.prototype.reduce||(Array.prototype.reduce=function(t){if(this===null||this===undefined)throw new TypeError("Object is null or undefined");var n=0,r=this.length>>0,i;if(typeof t!="function")throw new TypeError("First argument is not callable");if(arguments.length<2){if(r===0)throw new TypeError("Array length is 0 and no second argument");i=this[0],n=1}else i=arguments[1];while(n<r)n in this&&(i=t.call(undefined,i,this[n],n,this)),++n;return i}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),window.CSSStyleDeclaration=window.CSSStyleDeclaration||function(){},CSSStyleDeclaration.prototype.getProperty||(CSSStyleDeclaration.prototype.getProperty=function(e){return this.getAttribute(e)}),CSSStyleDeclaration.prototype.setProperty||(CSSStyleDeclaration.prototype.setProperty=function(e,t){return this.setAttribute(e,t)}),CSSStyleDeclaration.prototype.removeProperty||(CSSStyleDeclaration.prototype.removeProperty=function(e){return this.removeAttribute(e)}),document.createElementNS||(document.createElementNS=function(e,t){return document.createElement(t)}),window.JSON||(window.JSON={}),window.JSON.parse||(window.JSON.parse=function(){var e=/^[\],:{}\s]*$/,t=/(?:^|:|,)(?:\s*\[)+/g,n=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,r=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g;return function(i){return e.test(i.replace(n,"@").replace(r,"]").replace(t,""))?(new Function("return "+i))():null}}()),Object.create||(Object.create=function(e){function t(){}if(arguments.length>1)throw new Error("Object.create implementation only accepts the first parameter.");return t.prototype=e,new t}),function(){function r(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function s(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function o(e){return Array.prototype.slice.call(e)}function f(){}function h(e){return e}function p(){return this}function d(){return!0}function v(e){return typeof e=="function"?e:function(){return e}}function m(e,t,n){return function(){var r=n.apply(t,arguments);return arguments.length?e:r}}function g(e){return e!=null&&!isNaN(e)}function y(e){return e.length}function w(e){return e==null}function E(e){return e.trim().replace(/\s+/g," ")}function S(e){var t=1;while(e*t%1)t*=10;return t}function N(){}function C(e){function r(){var n=t,r=-1,i=n.length,s;while(++r<i)(s=n[r].on)&&s.apply(this,arguments);return e}var t=[],n=new f;return r.on=function(r,i){var s=n.get(r),o;return arguments.length<2?s&&s.on:(s&&(s.on=null,t=t.slice(0,o=t.indexOf(s)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function A(e,t){return t-(e?1+Math.floor(Math.log(e+Math.pow(10,1+Math.floor(Math.log(e)/Math.LN10)-t))/Math.LN10):1)}function O(e){return e+""}function M(e){var t=e.lastIndexOf("."),n=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 D(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function I(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function q(e){return function(t){return 1-e(1-t)}}function R(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function U(e){return e}function z(e){return function(t){return Math.pow(t,e)}}function W(e){return 1-Math.cos(e*Math.PI/2)}function X(e){return Math.pow(2,10*(e-1))}function V(e){return 1-Math.sqrt(1-e*e)}function $(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 J(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function K(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 Q(){d3.event.stopPropagation(),d3.event.preventDefault()}function G(){var e=d3.event,t;while(t=e.sourceEvent)e=t;return e}function Y(e){var t=new N,n=0,r=arguments.length;while(++n<r)t[arguments[n]]=C(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=d3.event;i.target=e,d3.event=i,t[i.type].apply(n,r)}finally{d3.event=s}}},t}function et(e){return e=="transform"?d3.interpolateTransform:d3.interpolate}function tt(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function nt(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function rt(e,t,n){return new it(e,t,n)}function it(e,t,n){this.r=e,this.g=t,this.b=n}function st(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ot(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(lt(u[0]),lt(u[1]),lt(u[2]))}}return(a=ct.get(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 ut(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+(t<n?6:0):t==i?o=(n-e)/s+2:o=(e-t)/s+4,o*=60):u=o=0,ht(o,u,a)}function at(e,t,n){e=ft(e),t=ft(t),n=ft(n);var r=kt((.4124564*e+.3575761*t+.1804375*n)/Et),i=kt((.2126729*e+.7151522*t+.072175*n)/St),s=kt((.0193339*e+.119192*t+.9503041*n)/xt);return yt(116*i-16,500*(r-i),200*(i-s))}function ft(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function lt(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function ht(e,t,n){return new pt(e,t,n)}function pt(e,t,n){this.h=e,this.s=t,this.l=n}function dt(e,t,n){function s(e){return e>360?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,rt(o(e+120),o(e),o(e-120))}function vt(e,t,n){return new mt(e,t,n)}function mt(e,t,n){this.h=e,this.c=t,this.l=n}function gt(e,t,n){return yt(n,Math.cos(e*=Math.PI/180)*t,Math.sin(e)*t)}function yt(e,t,n){return new bt(e,t,n)}function bt(e,t,n){this.l=e,this.a=t,this.b=n}function Tt(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=Ct(i)*Et,r=Ct(r)*St,s=Ct(s)*xt,rt(Lt(3.2404542*i-1.5371385*r-.4985314*s),Lt(-0.969266*i+1.8760108*r+.041556*s),Lt(.0556434*i-.2040259*r+1.0572252*s))}function Nt(e,t,n){return vt(Math.atan2(n,t)/Math.PI*180,Math.sqrt(t*t+n*n),e)}function Ct(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function kt(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function Lt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function At(e){return a(e,Ht),e}function Bt(e){return function(){return Dt(e,this)}}function jt(e){return function(){return Pt(e,this)}}function Ft(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function s(){this.setAttributeNS(e.space,e.local,t)}function o(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}function u(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=d3.ns.qualify(e),t==null?e.local?r:n:typeof t=="function"?e.local?u:o:e.local?s:i}function It(e){return new RegExp("(?:^|\\s+)"+d3.requote(e)+"(?:\\s+|$)","g")}function qt(e,t){function r(){var r=-1;while(++r<n)e[r](this,t)}function i(){var r=-1,i=t.apply(this,arguments);while(++r<n)e[r](this,i)}e=e.trim().split(/\s+/).map(Rt);var n=e.length;return typeof t=="function"?i:r}function Rt(e){var t=It(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.className,s=i.baseVal!=null,o=s?i.baseVal:i;r?(t.lastIndex=0,t.test(o)||(o=E(o+" "+e),s?i.baseVal=o:n.className=o)):o&&(o=E(o.replace(t," ")),s?i.baseVal=o:n.className=o)}}function Ut(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return t==null?r:typeof t=="function"?s:i}function zt(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}return t==null?n:typeof t=="function"?i:r}function Xt(e){return{__data__:e}}function Vt(e){return function(){return _t(this,e)}}function $t(e){return arguments.length||(e=d3.ascending),function(t,n){return e(t&&t.__data__,n&&n.__data__)}}function Jt(e,t,n){function s(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}function o(){function u(e){var n=d3.event;d3.event=e,o[0]=i.__data__;try{t.apply(i,o)}finally{d3.event=n}}var i=this,o=arguments;s.call(this),this.addEventListener(e,this[r]=u,u.$=n),u._=t}var r="__on"+e,i=e.indexOf(".");return i>0&&(e=e.substring(0,i)),t?o:s}function Kt(e,t){for(var n=0,r=e.length;n<r;n++)for(var i=e[n],s=0,o=i.length,u;s<o;s++)(u=i[s])&&t(u,s,n);return e}function Gt(e){return a(e,Yt),e}function Zt(e,t,n){a(e,en);var r=new f,i=d3.dispatch("start","end"),s=fn;return e.id=t,e.time=n,e.tween=function(t,n){return arguments.length<2?r.get(t):(n==null?r.remove(t):r.set(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?ln.call(e,t):(i.on(t,n),e)},d3.timer(function(o){return Kt(e,function(e,u,a){function d(s){return h.active>t?m():(h.active=t,r.forEach(function(t,n){(n=n.call(e,p,u))&&f.push(n)}),i.start.call(e,p,u),v(s)||d3.timer(v,0,n),1)}function v(n){if(h.active!==t)return m();var r=(n-l)/c,o=s(r),a=f.length;while(a>0)f[--a].call(e,o);if(r>=1)return m(),nn=t,i.end.call(e,p,u),nn=0,1}function m(){return--h.count||delete e.__transition__,1}var f=[],l=e.delay,c=e.duration,h=(e=e.node).__transition__||(e.__transition__={active:0,count:0}),p=e.__data__;++h.count,l<=o?d(o):d3.timer(d,l,n)})},0,n),e}function ln(e){var t=nn,n=fn,r=un,i=an;return nn=this.id,fn=this.ease(),Kt(this,function(t,n,r){un=t.delay,an=t.duration,e.call(t=t.node,t.__data__,n,r)}),nn=t,fn=n,un=r,an=i,this}function hn(e,t,n){return n!=""&&cn}function pn(e,t){return d3.tween(e,et(t))}function gn(){var e,t=Date.now(),n=dn;while(n)e=t-n.then,e>=n.delay&&(n.flush=n.callback(e)),n=n.next;var r=yn()-t;r>24?(isFinite(r)&&(clearTimeout(mn),mn=setTimeout(gn,r)),vn=0):(vn=1,bn(gn))}function yn(){var e=null,t=dn,n=Infinity;while(t)t.flush?t=e?e.next=t.next:dn=t.next:(n=Math.min(n,t.then+t.delay),t=(e=t).next);return n}function wn(e){var t=[e.a,e.b],n=[e.c,e.d],r=Sn(t),i=En(t,n),s=Sn(xn(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*Tn,this.translate=[e.e,e.f],this.scale=[r,s],this.skew=s?Math.atan2(i,s)*Tn:0}function En(e,t){return e[0]*t[0]+e[1]*t[1]}function Sn(e){var t=Math.sqrt(En(e,e));return t&&(e[0]/=t,e[1]/=t),t}function xn(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function kn(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Cn<0&&(window.scrollX||window.scrollY)){n=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=n[0][0].getScreenCTM();Cn=!i.f&&!i.e,n.remove()}return Cn?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Ln(){}function An(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function On(e){return e.rangeExtent?e.rangeExtent():An(e.range())}function Mn(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;s<i&&(o=n,n=r,r=o,o=i,i=s,s=o);if(t=t(s-i))e[n]=t.floor(i),e[r]=t.ceil(s);return e}function _n(){return Math}function Dn(e,t,n,r){function o(){var o=Math.min(e.length,t.length)>2?qn:In,a=r?nt:tt;return i=o(e,t,a,n),s=o(t,e,a,d3.interpolate),u}function u(e){return i(e)}var i,s;return u.invert=function(e){return s(e)},u.domain=function(t){return arguments.length?(e=t.map(Number),o()):e},u.range=function(e){return arguments.length?(t=e,o()):t},u.rangeRound=function(e){return u.range(e).interpolate(d3.interpolateRound)},u.clamp=function(e){return arguments.length?(r=e,o()):r},u.interpolate=function(e){return arguments.length?(n=e,o()):n},u.ticks=function(t){return jn(e,t)},u.tickFormat=function(t){return Fn(e,t)},u.nice=function(){return Mn(e,Hn),o()},u.copy=function(){return Dn(e,t,n,r)},o()}function Pn(e,t){return d3.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Hn(e){return e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1),e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Bn(e,t){var n=An(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return s<=.15?i*=10:s<=.35?i*=5:s<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+i*.5,n[2]=i,n}function jn(e,t){return d3.range.apply(d3,Bn(e,t))}function Fn(e,t){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Bn(e,t)[2])/Math.LN10+.01))+"f")}function In(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function qn(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());while(++o<=u)i.push(n(e[o-1],e[o])),s.push(r(t[o-1],t[o]));return function(t){var n=d3.bisect(e,t,1,u)-1;return s[n](i[n](t))}}function Rn(e,t){function r(n){return e(t(n))}var n=t.pow;return r.invert=function(t){return n(e.invert(t))},r.domain=function(i){return arguments.length?(t=i[0]<0?Wn:zn,n=t.pow,e.domain(i.map(t)),r):e.domain().map(n)},r.nice=function(){return e.domain(Mn(e.domain(),_n)),r},r.ticks=function(){var r=An(e.domain()),i=[];if(r.every(isFinite)){var s=Math.floor(r[0]),o=Math.ceil(r[1]),u=n(r[0]),a=n(r[1]);if(t===Wn){i.push(n(s));for(;s++<o;)for(var f=9;f>0;f--)i.push(n(s)*f)}else{for(;s<o;s++)for(var f=1;f<10;f++)i.push(n(s)*f);i.push(n(s))}for(s=0;i[s]<u;s++);for(o=i.length;i[o-1]>a;o--);i=i.slice(s,o)}return i},r.tickFormat=function(e,i){arguments.length<2&&(i=Un);if(arguments.length<1)return i;var s=Math.max(.1,e/r.ticks().length),o=t===Wn?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil),u;return function(e){return e/n(o(t(e)+u))<=s?i(e):""}},r.copy=function(){return Rn(e.copy(),t)},Pn(r,e)}function zn(e){return Math.log(e<0?0:e)/Math.LN10}function Wn(e){return-Math.log(e>0?0:-e)/Math.LN10}function Xn(e,t){function i(t){return e(n(t))}var n=Vn(t),r=Vn(1/t);return i.invert=function(t){return r(e.invert(t))},i.domain=function(t){return arguments.length?(e.domain(t.map(n)),i):e.domain().map(r)},i.ticks=function(e){return jn(i.domain(),e)},i.tickFormat=function(e){return Fn(i.domain(),e)},i.nice=function(){return i.domain(Mn(i.domain(),Hn))},i.exponent=function(e){if(!arguments.length)return t;var s=i.domain();return n=Vn(t=e),r=Vn(1/t),i.domain(s)},i.copy=function(){return Xn(e.copy(),t)},Pn(i,e)}function Vn(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $n(e,t){function s(t){return r[((n.get(t)||n.set(t,e.push(t)))-1)%r.length]}function o(t,n){return d3.range(e.length).map(function(e){return t+n*e})}var n,r,i;return s.domain=function(r){if(!arguments.length)return e;e=[],n=new f;var i=-1,o=r.length,u;while(++i<o)n.has(u=r[i])||n.set(u,e.push(u));return s[t.t].apply(s,t.a)},s.range=function(e){return arguments.length?(r=e,i=0,t={t:"range",a:arguments},s):r},s.rangePoints=function(n,u){arguments.length<2&&(u=0);var a=n[0],f=n[1],l=(f-a)/(Math.max(1,e.length-1)+u);return r=o(e.length<2?(a+f)/2:a+l*u/2,l),i=0,t={t:"rangePoints",a:arguments},s},s.rangeBands=function(n,u,a){arguments.length<2&&(u=0),arguments.length<3&&(a=u);var f=n[1]<n[0],l=n[f-0],c=n[1-f],h=(c-l)/(e.length-u+2*a);return r=o(l+h*a,h),f&&r.reverse(),i=h*(1-u),t={t:"rangeBands",a:arguments},s},s.rangeRoundBands=function(n,u,a){arguments.length<2&&(u=0),arguments.length<3&&(a=u);var f=n[1]<n[0],l=n[f-0],c=n[1-f],h=Math.floor((c-l)/(e.length-u+2*a)),p=c-l-(e.length-u)*h;return r=o(l+Math.round(p/2),h),f&&r.reverse(),i=Math.round(h*(1-u)),t={t:"rangeRoundBands",a:arguments},s},s.rangeBand=function(){return i},s.rangeExtent=function(){return An(t.a[0])},s.copy=function(){return $n(e,t)},s.domain(e)}function Yn(e,t){function r(){var r=0,s=e.length,o=t.length;n=[];while(++r<o)n[r-1]=d3.quantile(e,r/o);return i}function i(e){return isNaN(e=+e)?NaN:t[d3.bisect(n,e)]}var n;return i.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort(d3.ascending),r()):e},i.range=function(e){return arguments.length?(t=e,r()):t},i.quantiles=function(){return n},i.copy=function(){return Yn(e,t)},r()}function Zn(e,t,n){function s(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function o(){return r=n.length/(t-e),i=n.length-1,s}var r,i;return s.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],o()):[e,t]},s.range=function(e){return arguments.length?(n=e,o()):n},s.copy=function(){return Zn(e,t,n)},o()}function er(e,t){function n(n){return t[d3.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return er(e,t)},n}function tr(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return jn(e,t)},t.tickFormat=function(t){return Fn(e,t)},t.copy=function(){return tr(e)},t}function ir(e){return e.innerRadius}function sr(e){return e.outerRadius}function or(e){return e.startAngle}function ur(e){return e.endAngle}function ar(e){function u(s){function d(){u.push("M",i(e(a),o))}var u=[],a=[],f=-1,l=s.length,c,h=v(t),p=v(n);while(++f<l)r.call(this,c=s[f],f)?a.push([+h.call(this,c,f),+p.call(this,c,f)]):a.length&&(d(),a=[]);return a.length&&d(),u.length?u.join(""):null}var t=fr,n=lr,r=d,i=hr,s=i.key,o=.7;return u.x=function(e){return arguments.length?(t=e,u):t},u.y=function(e){return arguments.length?(n=e,u):n},u.defined=function(e){return arguments.length?(r=e,u):r},u.interpolate=function(e){return arguments.length?(typeof e=="function"?s=i=e:s=(i=cr.get(e)||hr).key,u):s},u.tension=function(e){return arguments.length?(o=e,u):o},u}function fr(e){return e[0]}function lr(e){return e[1]}function hr(e){return e.join("L")}function pr(e){return hr(e)+"Z"}function dr(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function vr(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function mr(e,t){return e.length<4?hr(e):e[1]+br(e.slice(1,e.length-1),wr(e,t))}function gr(e,t){return e.length<3?hr(e):e[0]+br((e.push(e[0]),e),wr([e[e.length-2]].concat(e,[e[1]]),t))}function yr(e,t,n){return e.length<3?hr(e):e[0]+br(e,wr(e,t))}function br(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return hr(e);var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;n&&(r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1],i=e[1],a=2);if(t.length>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;f<t.length;f++,a++)s=e[a],u=t[f],r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function wr(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a)i=s,s=o,o=e[u],n.push([r*(o[0]-i[0]),r*(o[1]-i[1])]);return n}function Er(e){if(e.length<3)return hr(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];Ar(a,o,u);while(++t<n)r=e[t],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),Ar(a,o,u);t=-1;while(++t<2)o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),Ar(a,o,u);return a.join("")}function Sr(e){if(e.length<4)return hr(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3)i=e[n],s.push(i[0]),o.push(i[1]);t.push(Nr(Lr,s)+","+Nr(Lr,o)),--n;while(++n<r)i=e[n],s.shift(),s.push(i[0]),o.shift(),o.push(i[1]),Ar(t,s,o);return t.join("")}function xr(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4)s=e[n%r],o.push(s[0]),u.push(s[1]);t=[Nr(Lr,o),",",Nr(Lr,u)],--n;while(++n<i)s=e[n%r],o.shift(),o.push(s[0]),u.shift(),u.push(s[1]),Ar(t,o,u);return t.join("")}function Tr(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n)a=e[u],f=u/n,a[0]=t*a[0]+(1-t)*(r+f*s),a[1]=t*a[1]+(1-t)*(i+f*o)}return Er(e)}function Nr(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Ar(e,t,n){e.push("C",Nr(Cr,t),",",Nr(Cr,n),",",Nr(kr,t),",",Nr(kr,n),",",Nr(Lr,t),",",Nr(Lr,n))}function Or(e,t){return(t[1]-e[1])/(t[0]-e[0])}function Mr(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Or(i,s);while(++t<n)r[t]=(o+(o=Or(i=s,s=e[t+1])))/2;return r[t]=o,r}function _r(e){var t=[],n,r,i,s,o=Mr(e),u=-1,a=e.length-1;while(++u<a)n=Or(e[u],e[u+1]),Math.abs(n)<1e-6?o[u]=o[u+1]=0:(r=o[u]/n,i=o[u+1]/n,s=r*r+i*i,s>9&&(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 Dr(e){return e.length<3?hr(e):e[0]+br(e,_r(e))}function Pr(e){var t,n=-1,r=e.length,i,s;while(++n<r)t=e[n],i=t[0],s=t[1]+nr,t[0]=i*Math.cos(s),t[1]=i*Math.sin(s);return e}function Hr(e){function c(u){function T(){c.push("M",o(e(p),l),f,a(e(h.reverse()),l),"Z")}var c=[],h=[],p=[],d=-1,m=u.length,g,y=v(t),b=v(r),w=t===n?function(){return S}:v(n),E=r===i?function(){return x}:v(i),S,x;while(++d<m)s.call(this,g=u[d],d)?(h.push([S=+y.call(this,g,d),x=+b.call(this,g,d)]),p.push([+w.call(this,g,d),+E.call(this,g,d)])):h.length&&(T(),h=[],p=[]);return h.length&&T(),c.length?c.join(""):null}var t=fr,n=fr,r=0,i=lr,s=d,o=hr,u=o.key,a=o,f="L",l=.7;return c.x=function(e){return arguments.length?(t=n=e,c):n},c.x0=function(e){return arguments.length?(t=e,c):t},c.x1=function(e){return arguments.length?(n=e,c):n},c.y=function(e){return arguments.length?(r=i=e,c):i},c.y0=function(e){return arguments.length?(r=e,c):r},c.y1=function(e){return arguments.length?(i=e,c):i},c.defined=function(e){return arguments.length?(s=e,c):s},c.interpolate=function(e){return arguments.length?(typeof e=="function"?u=o=e:u=(o=cr.get(e)||hr).key,a=o.reverse||o,f=o.closed?"M":"L",c):u},c.tension=function(e){return arguments.length?(l=e,c):l},c}function Br(e){return e.source}function jr(e){return e.target}function Fr(e){return e.radius}function Ir(e){return e.startAngle}function qr(e){return e.endAngle}function Rr(e){return[e.x,e.y]}function Ur(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+nr;return[n*Math.cos(r),n*Math.sin(r)]}}function zr(){return 64}function Wr(){return"circle"}function Xr(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"}function Kr(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function Qr(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Gr(e,t,n){i=[];if(n&&t.length>1){var r=An(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o)for(a=n;--a>0;)(f=+t[s]-a*u)>=r[0]&&i.push(f);for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];)i.push(f)}return i}function ei(e){this.element=e,this.props={}}function ti(e){return function(t){var n=this.data("lineAttrs");if(!n)return;if(arguments.length<1)return n[e];n[e]=parseInt(t,10),!isNaN(n.x1)&&!isNaN(n.y1)&&!isNaN(n.x2)&&!isNaN(n.y2)?this.attr("path","M"+n.x1+" "+n.y1+"L"+n.x2+" "+n.y2+"Z"):this.attr("path",null)}}function ni(e){var t=Raphael(e,0,0);return t.__attrs={width:0,height:0},t.shadowDom=document.createElement("svg"),t.shadowDom
.style.display="none",e.appendChild(t.shadowDom),t.ca.d=function(e){return{path:e}},t.ca.x1=ti("x1"),t.ca.x2=ti("x2"),t.ca.y1=ti("y1"),t.ca.y2=ti("y2"),t.nodeType=1,t.nodeName="object",t.style=new ei(t),t.r2d3Elements={},t}function oi(e){return e.replace(/translate\(/gi,"t").replace(/rotate\(/gi,"r").replace(/scale\(/gi,"s").replace(/[)]/g,"")}function fi(){ui||(ui=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var e=d3.event,t;try{ui.scrollTop=1e3,ui.dispatchEvent(e),t=1e3-ui.scrollTop}catch(n){t=e.wheelDelta||-e.detail*5}return t}function li(e){var t=e.source,n=e.target,r=hi(t,n),i=[t];while(t!==r)t=t.parent,i.push(t);var s=i.length;while(n!==r)i.splice(s,0,n),n=n.parent;return i}function ci(e){var t=[],n=e.parent;while(n!=null)t.push(e),e=n,n=n.parent;return t.push(e),t}function hi(e,t){if(e===t)return e;var n=ci(e),r=ci(t),i=n.pop(),s=r.pop(),o=null;while(i===s)o=i,i=n.pop(),s=r.pop();return o}function pi(e){e.fixed|=2}function di(e){e.fixed&=1}function vi(e){e.fixed|=4}function mi(e){e.fixed&=3}function gi(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;gi(a,t,n),e.charge+=a.charge,r+=a.charge*a.cx,i+=a.charge*a.cy}}if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var f=t*n[e.point.index];e.charge+=e.pointCharge=f,r+=f*e.point.x,i+=f*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function yi(e){return 20}function bi(e){return 1}function Ei(e){return e.x}function Si(e){return e.y}function xi(e,t,n){e.y0=t,e.y=n}function Ci(e){return d3.range(e.length)}function ki(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function Li(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t)(i=e[t][1])>r&&(n=t,r=i);return n}function Ai(e){return e.reduce(Oi,0)}function Oi(e,t){return e+t[1]}function Mi(e,t){return _i(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function _i(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function Di(e){return[d3.min(e),d3.max(e)]}function Pi(e,t){return d3.rebind(e,t,"sort","children","value"),e.links=Fi,e.nodes=function(t){return Ii=!0,(e.nodes=e)(t)},e}function Hi(e){return e.children}function Bi(e){return e.value}function ji(e,t){return t.value-e.value}function Fi(e){return d3.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function qi(e,t){return e.value-t.value}function Ri(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function Ui(e,t){e._pack_next=t,t._pack_prev=e}function zi(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function Wi(e){function p(e){n=Math.min(e.x-e.r,n),r=Math.max(e.x+e.r,r),i=Math.min(e.y-e.r,i),s=Math.max(e.y+e.r,s)}if(!(t=e.children)||!(h=t.length))return;var t,n=Infinity,r=-Infinity,i=Infinity,s=-Infinity,o,u,a,f,l,c,h;t.forEach(Xi),o=t[0],o.x=-o.r,o.y=0,p(o);if(h>1){u=t[1],u.x=u.r,u.y=0,p(u);if(h>2){a=t[2],Ji(o,u,a),p(a),Ri(o,a),o._pack_prev=a,Ri(a,u),u=o._pack_next;for(f=3;f<h;f++){Ji(o,u,a=t[f]);var d=0,v=1,m=1;for(l=u._pack_next;l!==u;l=l._pack_next,v++)if(zi(l,a)){d=1;break}if(d==1)for(c=o._pack_prev;c!==l._pack_prev;c=c._pack_prev,m++)if(zi(c,a))break;d?(v<m||v==m&&u.r<o.r?Ui(o,u=l):Ui(o=c,u),f--):(Ri(o,a),u=a,p(a))}}}var g=(n+r)/2,y=(i+s)/2,b=0;for(f=0;f<h;f++)a=t[f],a.x-=g,a.y-=y,b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y));e.r=b,t.forEach(Vi)}function Xi(e){e._pack_next=e._pack_prev=e}function Vi(e){delete e._pack_next,delete e._pack_prev}function $i(e,t,n,r){var i=e.children;e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)$i(i[s],t,n,r)}}function Ji(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o,r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s,n.y=e.y+a*s-f*i}else n.x=e.x+r,n.y=e.y}function Ki(e){return 1+d3.max(e,function(e){return e.y})}function Qi(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Gi(e){var t=e.children;return t&&t.length?Gi(t[0]):e}function Yi(e){var t=e.children,n;return t&&(n=t.length)?Yi(t[n-1]):e}function Zi(e,t){return e.parent==t.parent?1:2}function es(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function ts(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function ns(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i)t(r=ns(n[s],t),e)>0&&(e=r)}return e}function rs(e,t){return e.x-t.x}function is(e,t){return t.x-e.x}function ss(e,t){return e.depth-t.depth}function os(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a)s=i[u],n(s,o),o=s}t(e,r)}n(e,null)}function us(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0)s=r[i]._tree,s.prelim+=t,s.mod+=t,t+=s.shift+(n+=s.change)}function as(e,t,n){e=e._tree,t=t._tree;var r=n/(t.number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function fs(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function ls(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function cs(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),s<0&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function hs(e,t){function s(e,n){d3.text(e,t,function(e){n(e&&s.parse(e))})}function o(t){return t.map(u).join(e)}function u(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var n=new RegExp("\r\n|["+e+"\r\n]","g"),r=new RegExp('["'+e+"\n]"),i=e.charCodeAt(0);return s.parse=function(e){var t;return s.parseRows(e,function(e,n){if(n){var r={},i=-1,s=t.length;while(++i<s)r[t[i]]=e[i];return r}return t=e,null})},s.parseRows=function(e,t){function l(){if(n.lastIndex>=e.length)return s;if(f)return f=!1,r;var t=n.lastIndex;if(e.charCodeAt(t)===34){var o=t;while(o++<e.length)if(e.charCodeAt(o)===34){if(e.charCodeAt(o+1)!==34)break;o++}n.lastIndex=o+2;var u=e.charCodeAt(o+1);return u===13?(f=!0,e.charCodeAt(o+2)===10&&n.lastIndex++):u===10&&(f=!0),e.substring(t+1,o).replace(/""/g,'"')}var a=n.exec(e);return a?(f=a[0].charCodeAt(0)!==i,e.substring(t,a.index)):(n.lastIndex=e.length,e.substring(t))}var r={},s={},o=[],u=0,a,f;n.lastIndex=0;while((a=l())!==s){var c=[];while(a!==r&&a!==s)c.push(a),a=l();if(t&&!(c=t(c,u++)))continue;o.push(c)}return o},s.format=function(e){return e.map(o).join("\n")},s}function ds(e,t){return function(n){return n&&e.hasOwnProperty(n.type)?e[n.type](n):t}}function vs(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function ms(e,t){gs.hasOwnProperty(e.type)&&gs[e.type](e,t)}function ys(e,t){ms(e.geometry,t)}function bs(e,t){for(var n=e.features,r=0,i=n.length;r<i;r++)ms(n[r].geometry,t)}function ws(e,t){for(var n=e.geometries,r=0,i=n.length;r<i;r++)ms(n[r],t)}function Es(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Ss(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function xs(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r][0],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Ts(e,t){t.apply(null,e.coordinates)}function Ns(e,t){for(var n=e.coordinates[0],r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Cs(e){return e.source}function ks(e){return e.target}function Ls(){function d(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,o=n*i+t*l,u=n*s+t*c,a=n*r+t*f;return[Math.atan2(u,o)/ps,Math.atan2(a,Math.sqrt(o*o+u*u))/ps]}var e,t,n,r,i,s,o,u,a,f,l,c,h,p;return d.distance=function(){return h==null&&(p=1/Math.sin(h=Math.acos(Math.max(-1,Math.min(1,r*f+n*a*Math.cos(o-e)))))),h},d.source=function(o){var u=Math.cos(e=o[0]*ps),a=Math.sin(e);return n=Math.cos(t=o[1]*ps),r=Math.sin(t),i=n*u,s=n*a,h=null,d},d.target=function(e){var t=Math.cos(o=e[0]*ps),n=Math.sin(o);return a=Math.cos(u=e[1]*ps),f=Math.sin(u),l=a*t,c=a*n,h=null,d},d}function As(e,t){var n=Ls().source(e).target(t);return n.distance(),n}function _s(e){var t=0,n=0;for(;;){if(e(t,n))return[t,n];t===0?(t=n+1,n=0):(t-=1,n+=1)}}function Ds(e,t,n,r){var i,s,o,u,a,f,l;return i=r[e],s=i[0],o=i[1],i=r[t],u=i[0],a=i[1],i=r[n],f=i[0],l=i[1],(l-o)*(u-s)-(a-o)*(f-s)>0}function Ps(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function Hs(e,t,n,r){var i=e[0],s=t[0],o=n[0],u=r[0],a=e[1],f=t[1],l=n[1],c=r[1],h=i-o,p=s-i,d=u-o,v=a-l,m=f-a,g=c-l,y=(d*v-g*h)/(g*p-d*m);return[i+y*p,a+y*m]}function js(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e,t.r=e.r,e.r.l=t,e.r=t},leftBound:function(e){var t=r.leftEnd;do t=t.r;while(t!=r.rightEnd&&i.rightOf(t,e));return t=t.l,t},del:function(e){e.l.r=e.r,e.r.l=e.l,e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[Bs[e.side]]}},i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}},r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;return n.c=e.x*r+e.y*i+(r*r+i*i)*.5,s>o?(n.a=1,n.b=i/r,n.c/=r):(n.b=1,n.a=r/i,n.c/=i),n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r)return null;var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10)return null;var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;u.y<a.y||u.y==a.y&&u.x<a.x?(f=e,l=n):(f=t,l=r);var c=s>=l.region.r.x;return c&&f.side==="l"||!c&&f.side==="r"?null:{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l")return 1;if(!i&&e.side==="r")return 0;if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;!i&&n.b<0||i&&n.b>=0?a=u=s>=n.b*o:(a=t.x+t.y*n.b>n.c,n.b<0&&(a=!a),a||(u=1));if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b),n.b<0&&(a=!a)}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[Bs[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}},s={list:[],insert:function(e,t,n){e.vertex=t,e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x)continue;break}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t);n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t)if(n[t]==e)return n[t+1];return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init(),n.bottomSite=n.list.shift();var o=n.list.shift(),u,a,f,l,c,h,p,d,v,m,g,y,b;for(;;){s.empty()||(u=s.min());if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x))a=r.leftBound(o),f=r.right(a),p=r.rightRegion(a),y=i.bisect(p,o),h=r.createHalfEdge(y,"l"),r.insert(a,h),m=i.intersect(a,h),m&&(s.del(a),s.insert(a,m,i.distance(m,o))),a=h,h=r.createHalfEdge(y,"r"),r.insert(a,h),m=i.intersect(h,f),m&&s.insert(h,m,i.distance(m,o)),o=n.list.shift();else{if(!!s.empty())break;a=s.extractMin(),l=r.left(a),f=r.right(a),c=r.right(f),p=r.leftRegion(a),d=r.rightRegion(f),g=a.vertex,i.endPoint(a.edge,a.side,g),i.endPoint(f.edge,f.side,g),r.del(a),s.del(f),r.del(f),b="l",p.y>d.y&&(v=p,p=d,d=v,b="r"),y=i.bisect(p,d),h=r.createHalfEdge(y,b),r.insert(l,h),i.endPoint(y,Bs[b],g),m=i.intersect(l,h),m&&(s.del(l),s.insert(l,m,i.distance(m,p))),m=i.intersect(h,c),m&&s.insert(h,m,i.distance(m,p))}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a))t(a.edge)}function Fs(){return{leaf:!0,nodes:[],point:null}}function Is(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;a[0]&&Is(e,a[0],n,r,o,u),a[1]&&Is(e,a[1],o,r,i,u),a[2]&&Is(e,a[2],n,u,o,s),a[3]&&Is(e,a[3],o,u,i,s)}}function qs(e){return{x:e[0],y:e[1]}}function zs(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ys(e){return e.substring(0,3)}function Zs(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i==37){s=po[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function eo(e){return new RegExp("^(?:"+e.map(d3.requote).join("|")+")","i")}function to(e){var t=new f,n=-1,r=e.length;while(++n<r)t.set(e[n].toLowerCase(),n);return t}function vo(e,t,n){uo.lastIndex=0;var r=uo.exec(t.substring(n));return r?n+=r[0].length:-1}function mo(e,t,n){oo.lastIndex=0;var r=oo.exec(t.substring(n));return r?n+=r[0].length:-1}function go(e,t,n){lo.lastIndex=0;var r=lo.exec(t.substring(n));return r?(e.m=co.get(r[0].toLowerCase()),n+=r[0].length):-1}function yo(e,t,n){ao.lastIndex=0;var r=ao.exec(t.substring(n));return r?(e.m=fo.get(r[0].toLowerCase()),n+=r[0].length):-1}function bo(e,t,n){return Zs(e,ho.c.toString(),t,n)}function wo(e,t,n){return Zs(e,ho.x.toString(),t,n)}function Eo(e,t,n){return Zs(e,ho.X.toString(),t,n)}function So(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function xo(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+2));return r?(e.y=To(+r[0]),n+=r[0].length):-1}function To(e){return e+(e>68?1900:2e3)}function No(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function Co(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function ko(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function Lo(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function Ao(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function Oo(e,t,n){Mo.lastIndex=0;var r=Mo.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function _o(e,t,n){var r=Do.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function Po(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+no(r)+no(i)}function Bo(e){return e.toISOString()}function jo(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new Rs(n-1)),1),n}function s(e,n){return t(e=new Rs(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)while(o<r)n(o)%s||u.push(new Date(+o)),t(o,1);else while(o<r)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{Rs=zs;var r=new zs;return r._=e,o(r,t,n)}finally{Rs=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Fo(e);return a.floor=a,a.round=Fo(r),a.ceil=Fo(i),a.offset=Fo(s),a.range=u,e}function Fo(e){return function(t,n){try{Rs=zs;var r=new zs;return r._=t,e(r,n)._}finally{Rs=Date}}}function Io(e,t,n){function r(t){return e(t)}return r.invert=function(t){return Ro(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Ro)},r.nice=function(e){return r.domain(Mn(r.domain(),function(){return e}))},r.ticks=function(n,i){var s=qo(r.domain());if(typeof n!="function"){var o=s[1]-s[0],u=o/n,a=d3.bisect(Xo,u);if(a==Xo.length)return t.year(s,n);if(!a)return e.ticks(n).map(Ro);Math.log(u/Xo[a-1])<Math.log(Xo[a]/u)&&--a,n=t[a],i=n[1],n=n[0].range}return n(s[0],new Date(+s[1]+1),i)},r.tickFormat=function(){return n},r.copy=function(){return Io(e.copy(),t,n)},d3.rebind(r,e,"range","rangeRound","interpolate","clamp")}function qo(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Ro(e){return new Date(e)}function Uo(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function zo(e){var t=new Date(e,0,1);return t.setFullYear(e),t}function Wo(e){var t=e.getFullYear(),n=zo(t),r=zo(t+1);return t+(e-n)/(r-n)}function Zo(e){var t=new Date(Date.UTC(e,0,1));return t.setUTCFullYear(e),t}function eu(e){var t=e.getUTCFullYear(),n=Zo(t),r=Zo(t+1);return t+(e-n)/(r-n)}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(e){var t=CSSStyleDeclaration.prototype,n=t.setProperty;t.setProperty=function(e,t,r){n.call(this,e,t+"",r)}}d3={version:"2.10.1"};var i=o;try{i(document.documentElement.childNodes)[0].nodeType}catch(u){i=s}var a=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};d3.map=function(e){var t=new f;for(var n in e)t.set(n,e[n]);return t},r(f,{has:function(e){return l+e in this},get:function(e){return this[l+e]},set:function(e,t){return this[l+e]=t},remove:function(e){return e=l+e,e in this&&delete this[e]},keys:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===c&&e.call(this,t.substring(1),this[t])}});var l="\0",c=l.charCodeAt(0);d3.functor=v,d3.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=m(e,t,t[i]);return e},d3.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},d3.descending=function(e,t){return t<e?-1:t>e?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(++s<n)g(r=e[s])&&(i+=(r-i)/++o);else while(++s<n)g(r=t.call(e,e[s],s))&&(i+=(r-i)/++o);return o?i:undefined},d3.median=function(e,t){return arguments.length>1&&(e=e.map(t)),e=e.filter(g),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(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&i>s&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&i>s&&(i=s)}return i},d3.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&s>i&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&s>i&&(i=s)}return i},d3.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)(s=e[n])!=null&&(i>s&&(i=s),o<s&&(o=s))}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&(i>s&&(i=s),o<s&&(o=s))}return[i,o]},d3.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do n=Math.random()*2-1,r=Math.random()*2-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(e,t){var n=arguments.length;n<2&&(t=1),n<1&&(e=0);var r=d3.random.normal();return function(){return Math.exp(e+t*r())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}},d3.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1)while(++s<r)isNaN(i=+e[s])||(n+=i);else while(++s<r)isNaN(i=+t.call(e,e[s],s))||(n+=i);return n},d3.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=e[r-1],s=n-r;return s?i+s*(e[r]-i):i},d3.transpose=function(e){return d3.zip.apply(d3,e)},d3.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=d3.min(arguments,y),n=new Array(t);++e<t;)for(var r=-1,i,s=n[e]=new Array(i);++r<i;)s[r]=arguments[r][e];return n},d3.bisector=function(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;e.call(t,t[s],s)<n?r=s+1:i=s}return r},right:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;n<e.call(t,t[s],s)?i=s:r=s+1}return r}}};var b=d3.bisector(function(e){return e});d3.bisectLeft=b.left,d3.bisect=d3.bisectRight=b.right,d3.first=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])>0&&(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<r)t.call(e,i,s=e[n])<=0&&(i=s);return i},d3.nest=function(){function s(n,o){if(o>=t.length)return i?i.call(e,n):r?n.sort(r):n;var u=-1,a=n.length,l=t[o++],c,h,p=new f,d,v={};while(++u<a)(d=p.get(c=l(h=n[u])))?d.push(h):p.set(c,[h]);return p.forEach(function(e,t){v[e]=s(t,o)}),v}function o(e,r){if(r>=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(++r<i)n[r]=e[t[r]];return n},d3.merge=function(e){return Array.prototype.concat.apply([],e)},d3.split=function(e,t){var n=[],r=[],i,s=-1,o=e.length;arguments.length<2&&(t=w);while(++s<o)t.call(r,i=e[s],s)?r=[]:(r.length||n.push(r),r.push(i));return n},d3.range=function(e,t,n){arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0));if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=S(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r},d3.requote=function(e){return e.replace(x,"\\$&")};var x=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},d3.xhr=function(e,t,n){var r;try{r=new ActiveXObject("Msxml2.XMLHTTP")}catch(i){try{r=new ActiveXObject("Microsoft.XMLHTTP")}catch(i){}}arguments.length<3?(n=t,t=null):t&&r.overrideMimeType&&r.overrideMimeType(t),r.open("GET",e,!0),t&&r.setRequestHeader("Accept",t),r.onreadystatechange=function(){if(r.readyState===4){var e=r.status;n(!e&&r.response||e>=200&&e<300||e===304?r:null)}},r.send(null)},d3.text=function(e,t,n){function r(e){n(e&&e.responseText)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)},d3.json=function(e,t){d3.text(e,"application/json",function(e){t(e?JSON.parse(e):null)})},d3.html=function(e,t){d3.text(e,"text/html",function(e){if(e!=null){var n=document.createRange();n.selectNode(document.body),e=n.createContextualFragment(e)}t(e)})},d3.xml=function(e,t,n){function r(e){n(e&&e.responseXML)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)};var T={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:T,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),T.hasOwnProperty(n)?{space:T[n],local:e}:e}},d3.dispatch=function(){var e=new N,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=C(e);return e},N.prototype.on=function(e,t){var n=e.indexOf("."),r="";return n>0&&(r=e.substring(n+1),e=e.substring(0,n)),arguments.length<2?this[e].on(r):this[e].on(r,t)},d3.format=function(e){var t=k.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=L.get(a)||O,function(e){if(c&&e%1)return"";var t=e<0&&(e=-e)?"-":r;if(f<0){var h=d3.formatPrefix(e,u);e=h.scale(e),l=h.symbol}else e*=f;e=a(e,u);if(i){var p=e.length+t.length;p<s&&(e=(new Array(s-p+1)).join(n)+e),o&&(e=M(e)),e=t+e}else{o&&(e=M(e)),e=t+e;var p=e.length;p<s&&(e=(new Array(s-p+1)).join(n)+e)}return e+l}};var k=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,L=d3.map({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=A(e,t)).toFixed(Math.max(0,Math.min(20,t)))}}),_=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(D);d3.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=d3.round(e,A(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))),_[8+n/3]};var P=z(2),H=z(3),B=function(){return U},j=d3.map({linear:B,poly:z,quad:function(){return P},cubic:function(){return H},sin:function(){return W},exp:function(){return X},circle:function(){return V},elastic:$,back:J,bounce:function(){return K}}),F=d3.map({"in":U,out:q,"in-out":R,"out-in":function(e){return R(q(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 n=j.get(n)||B,r=F.get(r)||U,I(r(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;Z.lastIndex=0;for(r=0;n=Z.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=Z.lastIndex;s<t.length&&u.push(t.substring(s));for(r=0,f=a.length;(n=Z.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i)if(u[l.i+1]==null){u[l.i-1]+=l.x,u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1],u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}else if(u[l.i+1]==null)u[l.i]=l.x;else{u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}a.splice(r,1),f--,r--}else l.x=d3.interpolateNumber(parseFloat(n[0]),parseFloat(l.x))}while(r<f)l=a.pop(),u[l.i+1]==null?u[l.i]=l.x:(u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1)),f--;return u.length===1?u[0]==null?a[0].x:function(){return t}:function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}},d3.interpolateTransform=function(e,t){var n=[],r=[],i,s=d3.transform(e),o=d3.transform(t),u=s.translate,a=o.translate,f=s.rotate,l=o.rotate,c=s.skew,h=o.skew,p=s.scale,d=o.scale;return u[0]!=a[0]||u[1]!=a[1]?(n.push("translate(",null,",",null,")"),r.push({i:1,x:d3.interpolateNumber(u[0],a[0])},{i:3,x:d3.interpolateNumber(u[1],a[1])})):a[0]||a[1]?n.push("translate("+a+")"):n.push(""),f!=l?(f-l>180?l+=360:l-f>180&&(f+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(f,l)})):l&&n.push(n.pop()+"rotate("+l+")"),c!=h?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(c,h)}):h&&n.push(n.pop()+"skewX("+h+")"),p[0]!=d[0]||p[1]!=d[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:d3.interpolateNumber(p[0],d[0])},{i:i-2,x:d3.interpolateNumber(p[1],d[1])})):(d[0]!=1||d[1]!=1)&&n.push(n.pop()+"scale("+d+")"),i=r.length,function(e){var t=-1,s;while(++t<i)n[(s=r[t]).i]=s.x(e);return n.join("")}},d3.interpolateRgb=function(e,t){e=d3.rgb(e),t=d3.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+st(Math.round(n+s*e))+st(Math.round(r+o*e))+st(Math.round(i+u*e))}},d3.interpolateHsl=function(e,t){e=d3.hsl(e),t=d3.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return dt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateLab=function(e,t){e=d3.lab(e),t=d3.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return Tt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateHcl=function(e,t){e=d3.hcl(e),t=d3.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return gt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateArray=function(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(d3.interpolate(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}},d3.interpolateObject=function(e,t){var n={},r={},i;for(i in e)i in t?n[i]=et(i)(e[i],t[i]):r[i]=e[i];for(i in t)i in e||(r[i]=t[i]);return function(e){for(i in n)r[i]=n[i](e);return r}};var Z=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(e,t){return t instanceof Array&&d3.interpolateArray(e,t)},function(e,t){return(typeof e=="string"||typeof t=="string")&&d3.interpolateString(e+"",t+"")},function(e,t){return(typeof t=="string"?ct.has(t)||/^(#|rgb\(|hsl\()/.test(t):t instanceof it||t instanceof pt)&&d3.interpolateRgb(e,t)},function(e,t){return!isNaN(e=+e)&&!isNaN(t=+t)&&d3.interpolateNumber(e,t)}],d3.rgb=function(e,t,n){return arguments.length===1?e instanceof it?rt(e.r,e.g,e.b):ot(""+e,rt,dt):rt(~~e,~~t,~~n)},it.prototype.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return!t&&!n&&!r?rt(i,i,i):(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),rt(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e))))},it.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),rt(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))},it.prototype.hsl=function(){return ut(this.r,this.g,this.b)},it.prototype.toString=function(){return"#"+st(this.r)+st(this.g)+st(this.b)};var ct=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});ct.forEach(function(e,t){ct.set(e,ot(t,rt,dt))}),d3.hsl=function(e,t,n){return arguments.length===1?e instanceof pt?ht(e.h,e.s,e.l):ot(""+e,ut,ht):ht(+e,+t,+n)},pt.prototype.brighter=function(e){return e=
Math.pow(.7,arguments.length?e:1),ht(this.h,this.s,this.l/e)},pt.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),ht(this.h,this.s,e*this.l)},pt.prototype.rgb=function(){return dt(this.h,this.s,this.l)},pt.prototype.toString=function(){return this.rgb().toString()},d3.hcl=function(e,t,n){return arguments.length===1?e instanceof mt?vt(e.h,e.c,e.l):e instanceof bt?Nt(e.l,e.a,e.b):Nt((e=at((e=d3.rgb(e)).r,e.g,e.b)).l,e.a,e.b):vt(+e,+t,+n)},mt.prototype.brighter=function(e){return vt(this.h,this.c,Math.min(100,this.l+wt*(arguments.length?e:1)))},mt.prototype.darker=function(e){return vt(this.h,this.c,Math.max(0,this.l-wt*(arguments.length?e:1)))},mt.prototype.rgb=function(){return gt(this.h,this.c,this.l).rgb()},mt.prototype.toString=function(){return this.rgb()+""},d3.lab=function(e,t,n){return arguments.length===1?e instanceof bt?yt(e.l,e.a,e.b):e instanceof mt?gt(e.l,e.c,e.h):at((e=d3.rgb(e)).r,e.g,e.b):yt(+e,+t,+n)};var wt=18,Et=.95047,St=1,xt=1.08883;bt.prototype.brighter=function(e){return yt(Math.min(100,this.l+wt*(arguments.length?e:1)),this.a,this.b)},bt.prototype.darker=function(e){return yt(Math.max(0,this.l-wt*(arguments.length?e:1)),this.a,this.b)},bt.prototype.rgb=function(){return Tt(this.l,this.a,this.b)},bt.prototype.toString=function(){return this.rgb()+""};var Ot=document.documentElement,Mt=Ot.matchesSelector||Ot.webkitMatchesSelector||Ot.mozMatchesSelector||Ot.msMatchesSelector||Ot.oMatchesSelector,_t=Sizzle.matchesSelector,Dt=function(e,t){t.shadowDom&&(t=t.shadowDom);var n=Sizzle(e,t)[0]||null;return n&&n.r2d3&&(n=ri[n.r2d3id]),n},Pt=function(e,t){t.shadowDom&&(t=t.shadowDom);var n=Sizzle.uniqueSort(Sizzle(e,t)),r=[];for(var i=0;i<n.length;i++){var s=n[i];s&&s.r2d3&&(s=ri[s.r2d3id]),r.push(s)}return r},Ht=[];d3.selection=function(){return Qt},d3.selection.prototype=Ht,Ht.select=function(e){var t=[],n,r,i,s;typeof e!="function"&&(e=Bt(e));for(var o=-1,u=this.length;++o<u;){t.push(n=[]),n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;)(s=i[a])?(n.push(r=e.call(s,s.__data__,a)),r&&"__data__"in s&&(r.__data__=s.__data__)):n.push(null)}return At(t)},Ht.selectAll=function(e){var t=[],n,r;typeof e!="function"&&(e=jt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(r=u[a])t.push(n=i(e.call(r,r.__data__,a))),n.parentNode=r;return At(t)},Ht.attr=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node();return e=d3.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(Ft(t,e[t]));return this}return this.each(Ft(e,t))},Ht.classed=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return!1}else{t=n.className,t.baseVal!=null&&(t=t.baseVal);while(++i<r)if(!It(e[i]).test(t))return!1}return!0}for(t in e)this.each(qt(t,e[t]));return this}return this.each(qt(e,t))},Ht.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.each(Ut(n,e[n],t));return this}if(r<2)return window.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(Ut(e,t,n))},Ht.property=function(e,t){if(arguments.length<2){if(typeof e=="string")return this.node()[e];for(t in e)this.each(zt(t,e[t]));return this}return this.each(zt(e,t))},Ht.text=function(e){var t=this.node();return t&&t.paper?arguments.length<1?t.attr("text"):this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.attr("text",t==null?"":t)}:e==null?function(){this.attr("text","")}:function(){this.attr("text",e)}):arguments.length<1?this.node().textContent:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e})},Ht.html=function(e){return arguments.length<1?this.node().innerHTML:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e})};var Wt=function(){var e={},t=document.createElement("div");return t.style.display="none",function(n,r){t.parentNode!==document.body&&document.body.appendChild(t),e[r]===undefined&&(e[r]=document.createElementNS(n,r));var i;return t.innerHTML=e[r].outerHTML,t.removeChild(i=t.firstChild),i}}();Ht.append=function(e){function t(){return e.local==="svg"?ni(this):this.appendChild(Wt(this.namespaceURI,e))}function n(){return e.local==="svg"?ni(this):this.appendChild(Wt(e.space,e.local))}return e=d3.ns.qualify(e),this.select(e.local?n:t)},Ht.insert=function(e,t){function n(){return this.insertBefore(document.createElementNS(this.namespaceURI,e),Dt(t,this))}function r(){return this.insertBefore(document.createElementNS(e.space,e.local),Dt(t,this))}return e=d3.ns.qualify(e),this.select(e.local?r:n)},Ht.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},Ht.data=function(e,t){function o(e,n){var r,i=e.length,s=n.length,o=Math.min(i,s),c=Math.max(i,s),h=[],p=[],d=[],v,m;if(t){var g=new f,y=[],b,w=n.length;for(r=-1;++r<i;)b=t.call(v=e[r],v.__data__,r),g.has(b)?d[w++]=v:g.set(b,v),y.push(b);for(r=-1;++r<s;)b=t.call(n,m=n[r],r),g.has(b)?(h[r]=v=g.get(b),v.__data__=m,p[r]=d[r]=null):(p[r]=Xt(m),h[r]=d[r]=null),g.remove(b);for(r=-1;++r<i;)g.has(y[r])&&(d[r]=e[r])}else{for(r=-1;++r<o;)v=e[r],m=n[r],v?(v.__data__=m,h[r]=v,p[r]=d[r]=null):(p[r]=Xt(m),h[r]=d[r]=null);for(;r<s;++r)p[r]=Xt(n[r]),h[r]=d[r]=null;for(;r<c;++r)d[r]=e[r],p[r]=h[r]=null}p.update=h,p.parentNode=h.parentNode=d.parentNode=e.parentNode,u.push(p),a.push(h),l.push(d)}var n=-1,r=this.length,i,s;if(!arguments.length){e=new Array(r=(i=this[0]).length);while(++n<r)if(s=i[n])e[n]=s.__data__;return e}var u=Gt([]),a=At([]),l=At([]);if(typeof e=="function")while(++n<r)o(i=this[n],e.call(i,i.parentNode.__data__,n));else while(++n<r)o(i=this[n],e);return a.enter=function(){return u},a.exit=function(){return l},a},Ht.datum=Ht.map=function(e){return arguments.length<1?this.property("__data__"):this.property("__data__",e)},Ht.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=Vt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]),n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i,i.__data__,u)&&n.push(i)}return At(t)},Ht.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;)if(s=n[r])i&&i!==s.nextSibling&&i.parentNode.insertBefore(s,i),i=s;return this},Ht.sort=function(e){e=$t.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ht.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t=!1);for(n in e)this.each(Jt(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(Jt(e,t,n))},Ht.each=function(e){return Kt(this,function(t,n,r){e.call(t,t.__data__,n,r)})},Ht.call=function(e){return e.apply(this,(arguments[0]=this,arguments)),this},Ht.empty=function(){return!this.node()},Ht.node=function(e){for(var t=0,n=this.length;t<n;t++)for(var r=this[t],i=0,s=r.length;i<s;i++){var o=r[i];if(o)return o}return null},Ht.transition=function(){var e=[],t,n;for(var r=-1,i=this.length;++r<i;){e.push(t=[]);for(var s=this[r],o=-1,u=s.length;++o<u;)t.push((n=s[o])?{node:n,delay:un,duration:an}:null)}return Zt(e,nn||++tn,Date.now())};var Qt=At([[document]]);Qt[0].parentNode=Ot,d3.select=function(e){return typeof e=="string"?Qt.select(e):At([[e]])},d3.selectAll=function(e){return typeof e=="string"?Qt.selectAll(e):At([i(e)])};var Yt=[];d3.selection.enter=Gt,d3.selection.enter.prototype=Yt,Yt.append=Ht.append,Yt.insert=Ht.insert,Yt.empty=Ht.empty,Yt.node=Ht.node,Yt.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update,t.push(n=[]),n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;)(o=s[f])?(n.push(i[f]=r=e.call(s.parentNode,o.__data__,f)),r.__data__=o.__data__):n.push(null)}return At(t)};var en=[],tn=0,nn=0,rn=0,sn=250,on=d3.ease("cubic-in-out"),un=rn,an=sn,fn=on;en.call=Ht.call,d3.transition=function(e){return arguments.length?nn?e.transition():e:Qt.transition()},d3.transition.prototype=en,en.select=function(e){var t=[],n,r,i;typeof e!="function"&&(e=Bt(e));for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;)(i=u[a])&&(r=e.call(i.node,i.node.__data__,a))?("__data__"in i.node&&(r.__data__=i.node.__data__),n.push({node:r,delay:i.delay,duration:i.duration})):n.push(null)}return Zt(t,this.id,this.time).ease(this.ease())},en.selectAll=function(e){var t=[],n,r,i;typeof e!="function"&&(e=jt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(i=u[a]){r=e.call(i.node,i.node.__data__,a),t.push(n=[]);for(var l=-1,c=r.length;++l<c;)n.push({node:r[l],delay:i.delay,duration:i.duration})}return Zt(t,this.id,this.time).ease(this.ease())},en.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=Vt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i.node,i.node.__data__,u)&&n.push(i)}return Zt(t,this.id,this.time).ease(this.ease())},en.attr=function(e,t){if(arguments.length<2){for(t in e)this.attrTween(t,pn(e[t],t));return this}return this.attrTween(e,pn(t,e))},en.attrTween=function(e,t){function r(e,r){var i=t.call(this,e,r,this.getAttribute(n));return i===cn?(this.removeAttribute(n),null):i&&function(e){this.setAttribute(n,i(e))}}function i(e,r){var i=t.call(this,e,r,this.getAttributeNS(n.space,n.local));return i===cn?(this.removeAttributeNS(n.space,n.local),null):i&&function(e){this.setAttributeNS(n.space,n.local,i(e))}}var n=d3.ns.qualify(e);return this.tween("attr."+e,n.local?i:r)},en.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.styleTween(n,pn(e[n],n),t);return this}n=""}return this.styleTween(e,pn(t,e),n)},en.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,function(r,i){var s=t.call(this,r,i,window.getComputedStyle(this,null).getPropertyValue(e));return s===cn?(this.style.removeProperty(e),null):s&&function(t){this.style.setProperty(e,s(t),n)}})},en.text=function(e){return this.tween("text",function(t,n){this.textContent=typeof e=="function"?e.call(this,t,n):e})},en.remove=function(){return this.each("end.transition",function(){var e;!this.__transition__&&(e=this.parentNode)&&e.removeChild(this)})},en.delay=function(e){return Kt(this,typeof e=="function"?function(t,n,r){t.delay=e.call(t=t.node,t.__data__,n,r)|0}:(e|=0,function(t){t.delay=e}))},en.duration=function(e){return Kt(this,typeof e=="function"?function(t,n,r){t.duration=Math.max(1,e.call(t=t.node,t.__data__,n,r)|0)}:(e=Math.max(1,e|0),function(t){t.duration=e}))},en.transition=function(){return this.select(p)},d3.tween=function(e,t){function n(n,r,i){var s=e.call(this,n,r);return s==null?i!=""&&cn:i!=s&&t(i,s)}function r(n,r,i){return i!=e&&t(i,e)}return typeof e=="function"?n:e==null?hn:(e+="",r)};var cn={},dn=null,vn,mn;d3.timer=function(e,t,n){var r=!1,i,s=dn;if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}while(s){if(s.callback===e){s.then=n,s.delay=t,r=!0;break}i=s,s=s.next}r||(dn={callback:e,then:n,delay:t,next:dn}),vn||(mn=clearTimeout(mn),vn=1,bn(gn))},d3.timer.flush=function(){var e,t=Date.now(),n=dn;while(n)e=t-n.then,n.delay||(n.flush=n.callback(e)),n=n.next;yn()};var bn=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,17)};d3.transform=function(e){var t=Raphael(document.body,0,0);return(d3.transform=function(e){var n=t.circle().transform(e),r=n.matrix;return n.remove(),new wn(r||Nn)})(e)},wn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Tn=180/Math.PI,Nn={a:1,b:0,c:0,d:1,e:0,f:0};d3.mouse=function(e){return kn(e,G())};var Cn=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(e,t){return arguments.length<2&&(t=G().touches),t?i(t).map(function(t){var n=kn(e,t);return n.identifier=t.identifier,n}):[]},d3.scale={},d3.scale.linear=function(){return Dn([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return Rn(d3.scale.linear(),zn)};var Un=d3.format(".0e");zn.pow=function(e){return Math.pow(10,e)},Wn.pow=function(e){return-Math.pow(10,-e)},d3.scale.pow=function(){return Xn(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return $n([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Jn)},d3.scale.category20=function(){return d3.scale.ordinal().range(Kn)},d3.scale.category20b=function(){return d3.scale.ordinal().range(Qn)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Gn)};var Jn=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Kn=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],Qn=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Gn=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Yn([],[])},d3.scale.quantize=function(){return Zn(0,1,[0,1])},d3.scale.threshold=function(){return er([.5],[0,1])},d3.scale.identity=function(){return tr([0,1])},d3.svg={},d3.svg.arc=function(){function i(){var i=e.apply(this,arguments),s=t.apply(this,arguments),o=n.apply(this,arguments)+nr,u=r.apply(this,arguments)+nr,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<Math.PI?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=rr?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=ir,t=sr,n=or,r=ur;return i.innerRadius=function(t){return arguments.length?(e=v(t),i):e},i.outerRadius=function(e){return arguments.length?(t=v(e),i):t},i.startAngle=function(e){return arguments.length?(n=v(e),i):n},i.endAngle=function(e){return arguments.length?(r=v(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+nr;return[Math.cos(s)*i,Math.sin(s)*i]},i};var nr=-Math.PI/2,rr=2*Math.PI-1e-6;d3.svg.line=function(){return ar(h)};var cr=d3.map({linear:hr,"linear-closed":pr,"step-before":dr,"step-after":vr,basis:Er,"basis-open":Sr,"basis-closed":xr,bundle:Tr,cardinal:yr,"cardinal-open":mr,"cardinal-closed":gr,monotone:Dr});cr.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Cr=[0,2/3,1/3,0],kr=[0,1/3,2/3,0],Lr=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var e=ar(Pr);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},dr.reverse=vr,vr.reverse=dr,d3.svg.area=function(){return Hr(h)},d3.svg.area.radial=function(){var e=Hr(Pr);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,i.a1-i.a0)+(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,s.a1-s.a0)+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)+nr,l=i.call(e,u,o)+nr;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,n){return"A"+e+","+e+" 0 "+ +(n>Math.PI)+",1 "+t}function f(e,t,n,r){return"Q 0,0 "+r}var e=Br,t=jr,n=Fr,r=or,i=ur;return s.radius=function(e){return arguments.length?(n=v(e),s):n},s.source=function(t){return arguments.length?(e=v(t),s):e},s.target=function(e){return arguments.length?(t=v(e),s):t},s.startAngle=function(e){return arguments.length?(r=v(e),s):r},s.endAngle=function(e){return arguments.length?(i=v(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=Br,t=jr,n=Rr;return r.source=function(t){return arguments.length?(e=v(t),r):e},r.target=function(e){return arguments.length?(t=v(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=Rr,n=e.projection;return e.projection=function(e){return arguments.length?n(Ur(t=e)):t},e},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function n(n,r){return(Vr.get(e.call(this,n,r))||Xr)(t.call(this,n,r))}var e=Wr,t=zr;return n.type=function(t){return arguments.length?(e=v(t),n):e},n.size=function(e){return arguments.length?(t=v(e),n):t},n};var Vr=d3.map({circle:Xr,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*Jr)),n=t*Jr;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/$r),n=t*$r/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/$r),n=t*$r/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});d3.svg.symbolTypes=Vr.keys();var $r=Math.sqrt(3),Jr=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function l(l){l.each(function(){var l=d3.select(this),c=u==null?e.ticks?e.ticks.apply(e,o):e.domain():u,h=a==null?e.tickFormat?e.tickFormat.apply(e,o):String:a,p=Gr(e,c,f),d=l.selectAll(".minor").data(p,String),v=d.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),m=d3.transition(d.exit()).style("opacity",1e-6).remove(),g=d3.transition(d).style("opacity",1),y=l.selectAll("g").data(c,String),b=y.enter().insert("g","path").style("opacity",1e-6),w=d3.transition(y.exit()).style("opacity",1e-6).remove(),E=d3.transition(y).style("opacity",1),S,x=On(e),T=l.selectAll(".domain").data([0]),N=T.enter().append("path").attr("class","domain"),C=d3.transition(T),k=e.copy(),L=this.__chart__||k;this.__chart__=k,b.append("line").attr("class","tick"),b.append("text");var A=b.select("line"),O=E.select("line"),M=y.select("text").text(h),_=b.select("text"),D=E.select("text");switch(t){case"bottom":S=Kr,v.attr("y2",r),g.attr("x2",0).attr("y2",r),A.attr("y2",n),_.attr("y",Math.max(n,0)+s),O.attr("x2",0).attr("y2",n),D.attr("x",0).attr("y",Math.max(n,0)+s),M.attr("dy",".71em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+i+"V0H"+x[1]+"V"+i);break;case"top":S=Kr,v.attr("y2",-r),g.attr("x2",0).attr("y2",-r),A.attr("y2",-n),_.attr("y",-(Math.max(n,0)+s)),O.attr("x2",0).attr("y2",-n),D.attr("x",0).attr("y",-(Math.max(n,0)+s)),M.attr("dy","0em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+ -i+"V0H"+x[1]+"V"+ -i);break;case"left":S=Qr,v.attr("x2",-r),g.attr("x2",-r).attr("y2",0),A.attr("x2",-n),_.attr("x",-(Math.max(n,0)+s)),O.attr("x2",-n).attr("y2",0),D.attr("x",-(Math.max(n,0)+s)).attr("y",0),M.attr("dy",".32em").attr("text-anchor","end"),C.attr("d","M"+ -i+","+x[0]+"H0V"+x[1]+"H"+ -i);break;case"right":S=Qr,v.attr("x2",r),g.attr("x2",r).attr("y2",0),A.attr("x2",n),_.attr("x",Math.max(n,0)+s),O.attr("x2",n).attr("y2",0),D.attr("x",Math.max(n,0)+s).attr("y",0),M.attr("dy",".32em").attr("text-anchor","start"),C.attr("d","M"+i+","+x[0]+"H0V"+x[1]+"H"+i)}if(e.ticks)b.call(S,L),E.call(S,k),w.call(S,k),v.call(S,L),g.call(S,k),m.call(S,k);else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};b.call(S,H),E.call(S,H)}})}var e=d3.scale.linear(),t="bottom",n=6,r=6,i=6,s=3,o=[10],u=null,a,f=0;return l.scale=function(t){return arguments.length?(e=t,l):e},l.orient=function(e){return arguments.length?(t=e,l):t},l.ticks=function(){return arguments.length?(o=arguments,l):o},l.tickValues=function(e){return arguments.length?(u=e,l):u},l.tickFormat=function(e){return arguments.length?(a=e,l):a},l.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,l},l.tickPadding=function(e){return arguments.length?(s=+e,l):s},l.tickSubdivide=function(e){return arguments.length?(f=+e,l):f},l},d3.svg.brush=function(){function o(e){e.each(function(){var e=d3.select(this),i=e.selectAll(".background").data([0]),s=e.selectAll(".extent").data([0]),c=e.selectAll(".resize").data(r,String),h;e.style("pointer-events","all").on("mousedown.brush",l).on("touchstart.brush",l),i.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),s.enter().append("rect").attr("class","extent").style("cursor","move"),c.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Yr[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),c.style("display",o.empty()?"none":null),c.exit().remove(),t&&(h=On(t),i.attr("x",h[0]).attr("width",h[1]-h[0]),a(e)),n&&(h=On(n),i.attr("y",h[0]).attr("height",h[1]-h[0]),f(e)),u(e)})}function u(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+i[+/e$/.test(e)][0]+","+i[+/^s/.test(e)][1]+")"})}function a(e){e.select(".extent").attr("x",i[0][0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",i[1][0]-i[0][0])}function f(e){e.select(".extent").attr("y",i[0][1]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",i[1][1]-i[0][1])}function l(){function x(){var e=d3.event.changedTouches;return e?d3.touches(r,e)[0]:d3.mouse(r)}function T(){d3.event.keyCode==32&&(m||(g=null,y[0]-=i[1][0],y[1]-=i[1][1],m=2),Q())}function N(){d3.event.keyCode==32&&m==2&&(y[0]+=i[1][0],y[1]+=i[1][1],m=0,Q())}function C(){var e=x(),r=!1;b&&(e[0]+=b[0],e[1]+=b[1]),m||(d3.event.altKey?(g||(g=[(i[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2]),y[0]=i[+(e[0]<g[0])][0],y[1]=i[+(e[1]<g[1])][1]):g=null),d&&k(e,t,0)&&(a(h),r=!0),v&&k(e,n,1)&&(f(h),r=!0),r&&(u(h),c({type:"brush",mode:m?"move":"resize"}))}function k(e,t,n){var r=On(t),o=r[0],u=r[1],a=y[n],f=i[1][n]-i[0][n],l,c;m&&(o-=a,u-=f+a),l=Math.max(o,Math.min(u,e[n])),m?c=(l+=a)+f:(g&&(a=Math.max(o,Math.min(u,2*g[n]-l))),a<l?(c=l,l=a):c=a);if(i[0][n]!==l||i[1][n]!==c)return s=null,i[0][n]=l,i[1][n]=c,!0}function L(){C(),h.style("pointer-events","all").selectAll(".resize").style("display",o.empty()?"none":null),d3.select("body").style("cursor",null),w.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),c({type:"brushend"}),Q()}var r=this,l=d3.select(d3.event.target),c=e.of(r,arguments),h=d3.select(r),p=l.datum(),d=!/^(n|s)$/.test(p)&&t,v=!/^(e|w)$/.test(p)&&n,m=l.classed("extent"),g,y=x(),b,w=d3.select(window).on("mousemove.brush",C).on("mouseup.brush",L).on("touchmove.brush",C).on("touchend.brush",L).on("keydown.brush",T).on("keyup.brush",N);if(m)y[0]=i[0][0]-y[0],y[1]=i[0][1]-y[1];else if(p){var E=+/w$/.test(p),S=+/^n/.test(p);b=[i[1-E][0]-y[0],i[1-S][1]-y[1]],y[0]=i[E][0],y[1]=i[S][1]}else d3.event.altKey&&(g=y.slice());h.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",l.style("cursor")),c({type:"brushstart"}),C(),Q()}var e=Y(o,"brushstart","brush","brushend"),t=null,n=null,r=Zr[0],i=[[0,0],[0,0]],s;return o.x=function(e){return arguments.length?(t=e,r=Zr[!t<<1|!n],o):t},o.y=function(e){return arguments.length?(n=e,r=Zr[!t<<1|!n],o):n},o.extent=function(e){var r,u,a,f,l;return arguments.length?(s=[[0,0],[0,0]],t&&(r=e[0],u=e[1],n&&(r=r[0],u=u[0]),s[0][0]=r,s[1][0]=u,t.invert&&(r=t(r),u=t(u)),u<r&&(l=r,r=u,u=l),i[0][0]=r|0,i[1][0]=u|0),n&&(a=e[0],f=e[1],t&&(a=a[1],f=f[1]),s[0][1]=a,s[1][1]=f,n.invert&&(a=n(a),f=n(f)),f<a&&(l=a,a=f,f=l),i[0][1]=a|0,i[1][1]=f|0),o):(e=s||i,t&&(r=e[0][0],u=e[1][0],s||(r=i[0][0],u=i[1][0],t.invert&&(r=t.invert(r),u=t.invert(u)),u<r&&(l=r,r=u,u=l))),n&&(a=e[0][1],f=e[1][1],s||(a=i[0][1],f=i[1][1],n.invert&&(a=n.invert(a),f=n.invert(f)),f<a&&(l=a,a=f,f=l))),t&&n?[[r,a],[u,f]]:t?[r,u]:n&&[a,f])},o.clear=function(){return s=null,i[0][0]=i[0][1]=i[1][0]=i[1][1]=0,o},o.empty=function(){return t&&i[0][0]===i[1][0]||n&&i[0][1]===i[1][1]},d3.rebind(o,e,"on")};var Yr={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zr=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];ei.prototype.setProperty=function(e,t){t===""||t===null||t===undefined?delete this.props[e]:this.props[e]=t,this.element.updateStyle(e)},ei.prototype.removeProperty=function(e){delete this.props[e],this.element.updateStyle(e)},ei.prototype.getPropertyValue=function(e){return this.props[e]},function(e){typeof e=="undefined"&&(e=function(e,t){return this.el=e,this.getPropertyValue=function(t){var n=/(\-([a-z]){1})/g;return t=="float"&&(t="styleFloat"),n.test(t)&&(t=t.replace(n,function(){return arguments[2].toUpperCase()})),e.currentStyle[t]?e.currentStyle[t]:null},this}),window.getComputedStyle=function(t){return t&&t.paper?{getPropertyValue:function(e){return t.attr(e)}}:e.apply(window,arguments)}}(window.getComputedStyle),function(){var e="circle ellipse line polygon polyline rect g svg image path text".split(" ");if(Raphael.svg)return;for(var t=0;t<e.length;t++)document.createElement(e[t])}(),Raphael.fn.removeChild=function(e){e.shadowDom.parentNode.removeChild(e.shadowDom),e.remove()},Raphael.fn.line=function(){var e=this.path();return e.data("lineAttrs",{x1:0,y1:0,x2:0,y2:0}),e},Raphael.fn.img=function(){return this.image()},Raphael.fn.g=function(){return this.set()},Raphael.fn.getAttribute=function(e){return this.__attrs[e]},Raphael.fn.setAttribute=function(e,t){this.__attrs[e]=t,(e==="height"||e==="width")&&this.setSize(this.__attrs.width,this.__attrs.height),e=="class"&&(this.shadowDom.className=t)},Raphael.fn.getElementsByClassName=function(e){return this.getR2D3Elements(Sizzle(e,this.shadowDom))},Raphael.fn.getElementsByTagName=function(e){return this.getR2D3Elements(this.shadowDom.getElementsByTagName(e))},Raphael.fn.appendChild=function(e){var t=this.buildElement(e);return t&&(this.shadowDom.appendChild(e),t.updateStyle()),t},Raphael.fn.buildElement=function(e){var t=e&&e.nodeName,n=t?this[t.toLowerCase()]():null;return n&&(n.shadowDom=e,n.parentNode=this,n.shadowDom.r2d3=!0,n.shadowDom.r2d3id=ii(),n.paper=this,n.tagName=t.toLowerCase(),n.style=new ei(n),ri[n.shadowDom.r2d3id]=n),n},Raphael.fn.updateStyle=function(){var e=this.getR2D3Elements(this.shadowDom.childNodes);for(var t=0;t<e.length;t++)e[t].updateStyle()},Raphael.fn.getR2D3Elements=function(e){var t=[];for(var n=0;n<e.length;n++){var r=ri[e[n].id];r&&t.push(r)}return t};var ri={},ii=function(){var e=0;return function(){return e++}}();Raphael.el.appendChild=function(){return this},Raphael.el.addEventListener=function(e,t){var n=this;t._callback=function(e){t.apply(n,[e])},this.node.attachEvent&&this.node.attachEvent("on"+e,t._callback)},Raphael.el.removeEventListener=function(e,t){this.node.detachEvent&&this.node.detachEvent("on"+e,t._callback||t)},Raphael.el.setAttribute=function(e,t){if(e==="class"){this.className=t,this.shadowDom.className=t,this.updateStyle();return}if(e==="id"){this.shadowDom.id=t,this.updateStyle();return}e==="href"&&this.type==="image"&&(e="src");var n=this.attributes();t===""||t===null||t===undefined?this.removeAttribute(e):(n[e]=t,this.updateStyle(e))},Raphael.el.raphaelInsertBefore=Raphael.el.insertBefore,Raphael.el.insertBefore=function(e,t){var n=e.paper?e:this.paper.buildElement(e);return n.raphaelInsertBefore(t),t.shadowDom.parentNode.insertBefore(n.shadowDom,t.shadowDom),n.updateStyle(),n},Raphael.el.setAttributeNS=function(e,t,n){e==="xlink"&&t==="href"&&this.type==="image"&&this.setAttribute("src",n),this.setAttribute(t,n)},Raphael.el.removeAttribute=function(){var e=this.attributes();delete e[name],this.updateStyle(name)},Raphael.el.getAttribute=function(e){return e==="class"?this.shadowDom.className:e==="id"?this.shadowDom.id:(e==="href"&&this.type==="image"&&(e="src"),this.data("attributes")[e])},Raphael.el.attributes=function(){var e=this.data("attributes")||{};return this.data("attributes",e),e},Raphael.el.currentStyle=function(){return this.shadowDom.currentStyle||{}},Raphael.el.updateStyle=function(e){function t(){for(var e=0;e<arguments.length;e++){var t=arguments[e];if(t!==null&&typeof t!="undefined")return t}}var n=this.attributes(),r=this.style.props,i=this.currentStyle(),s="arrow-end cursor fill fill-opacity font font-family font-size font-weight opacity r rx ry stroke stroke-dasharay stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor".split(" ");if(arguments.length<1){for(var o=0;o<s.length;o++)this.updateStyle(s[o]);this.updateStyle("transform")}if(e==="transform"){var u=[n.transform||""],a=this;while(a.parentNode)a=a.parentNode,u.push(a.getAttribute("transform")||"");this.attr("transform",u.reverse().join(""))}else if(s.indexOf(e)<0)this.attr(e,n[e]);else{var f=t(r[e],i[e],n[e]);if(f==null||f==undefined){var a=this;while(a.parentNode){a=a.parentNode,f=t(a.style.getPropertyValue(e),a.getAttribute(e));if(f!=null&&f!=undefined)break}}this.attr(e,f)}return!0},Raphael.st.getElementsByClassName=Raphael.fn.getElementsByClassName,Raphael.st.getElementsByTagName=Raphael.fn.getElementsByTagName,Raphael.st.appendChild=function(e){if(this.tagName==="g"){var t=null;return e.paper?t=e:t=this.paper.buildElement(e),t&&(t.parentNode=this,this.shadowDom.appendChild(e),this.items.push(t),t.updateStyle()),t}},Raphael.st.insertBefore=function(e,t){var n=arguments;if(this.tagName==="g"){if(this.items.length)for(var r=0,i=this.items.length;r<i;r++)if(t&&this.items[r].shadowDom.r2d3id===t.shadowDom.r2d3id)return this.items[r].insertBefore(e,t);return this.appendChild.apply(this,n)}},Raphael.st.removeChild=function(e){e.shadowDom.parentNode.removeChild(e.shadowDom),e.remove()},Raphael.st.setAttribute=function(e,t){if(e==="class"){this.className=t,this.shadowDom.className=t,this.updateStyle();return}this.attrs=this.attrs||{},this.attrs[e]=t,this.updateStyle(e)},Raphael.st.getAttribute=function(e){return this.attrs=this.attrs||{},this.attrs[e]},Raphael.st.setAttributeNS=function(e,t,n){this.setAttribute(t,n)},Raphael.st.removeAttribute=function(e){this.attrs=this.attrs||{},this.attrs[e]&&delete this.attrs[e]},Raphael.st.updateStyle=function(e){if(!e||e==="transform"){var t=this.shadowDom.childNodes;for(var n=0;n<t.length;n++){var r=ri[t[n].r2d3id];r&&r.updateStyle(e)}}};var si=Raphael.parseTransformString;Raphael.parseTransformString=function(e){return/translate|rotate|scale/i.test(e)&&(e=oi(e)),si(e)},d3.behavior={},d3.behavior.drag=function(){function n(){this.on("mousedown.drag",r).on("touchstart.drag",r)}function r(){function l(){var e=n.parentNode;return s?d3.touches(e).filter(function(e){return e.identifier===s})[0]:d3.mouse(e)}function c(){if(!n.parentNode)return h();var e=l(),t=e[0]-u[0],i=e[1]-u[1];a|=t|i,u=e,Q(),r({type:"drag",x:e[0]+o[0],y:e[1]+o[1],dx:t,dy:i})}function h(){r({type:"dragend"}),a&&(Q(),d3.event.target===i&&f.on("click.drag",p,!0)),f.on(s?"touchmove.drag-"+s:"mousemove.drag",null).on(s?"touchend.drag-"+s:"mouseup.drag",null)}function p(){Q(),f.on("click.drag",null)}var n=this,r=e.of(n,arguments),i=d3.event.target,s=d3.event.touches&&d3.event.changedTouches[0].identifier,o,u=l(),a=0,f=d3.select(window).on(s?"touchmove.drag-"+s:"mousemove.drag",c).on(s?"touchend.drag-"+s:"mouseup.drag",h,!0);t?(o=t.apply(n,arguments),o=[o.x-u[0],o.y-u[1]]):o=[0,0],s||Q(),r({type:"dragstart"})}var e=Y(n,"drag","dragstart","dragend"),t=null;return n.origin=function(e){return arguments.length?(t=e,n):t},d3.rebind(n,e,"on")},d3.behavior.zoom=function(){function c(){this.on("mousedown.zoom",g).on("mousewheel.zoom",y).on("mousemove.zoom",b).on("DOMMouseScroll.zoom",y).on("dblclick.zoom",w).on("touchstart.zoom"
,E).on("touchmove.zoom",S).on("touchend.zoom",E)}function h(t){return[(t[0]-e[0])/n,(t[1]-e[1])/n]}function p(t){return[t[0]*n+e[0],t[1]*n+e[1]]}function d(e){n=Math.max(i[0],Math.min(i[1],e))}function v(t,n){n=p(n),e[0]+=t[0]-n[0],e[1]+=t[1]-n[1]}function m(t){u&&u.domain(o.range().map(function(t){return(t-e[0])/n}).map(o.invert)),f&&f.domain(a.range().map(function(t){return(t-e[1])/n}).map(a.invert)),d3.event.preventDefault(),t({type:"zoom",scale:n,translate:e})}function g(){function u(){r=1,v(d3.mouse(e),o),m(t)}function a(){r&&Q(),i.on("mousemove.zoom",null).on("mouseup.zoom",null),r&&d3.event.target===n&&i.on("click.zoom",f,!0)}function f(){Q(),i.on("click.zoom",null)}var e=this,t=s.of(e,arguments),n=d3.event.target,r=0,i=d3.select(window).on("mousemove.zoom",u).on("mouseup.zoom",a),o=h(d3.mouse(e));window.focus(),Q()}function y(){t||(t=h(d3.mouse(this))),d(Math.pow(2,fi()*.002)*n),v(d3.mouse(this),t),m(s.of(this,arguments))}function b(){t=null}function w(){var e=d3.mouse(this),t=h(e);d(d3.event.shiftKey?n/2:n*2),v(e,t),m(s.of(this,arguments))}function E(){var e=d3.touches(this),i=Date.now();r=n,t={},e.forEach(function(e){t[e.identifier]=h(e)}),Q();if(e.length===1){if(i-l<500){var o=e[0],u=h(e[0]);d(n*2),v(o,u),m(s.of(this,arguments))}l=i}}function S(){var e=d3.touches(this),n=e[0],i=t[n.identifier];if(o=e[1]){var o,u=t[o.identifier];n=[(n[0]+o[0])/2,(n[1]+o[1])/2],i=[(i[0]+u[0])/2,(i[1]+u[1])/2],d(d3.event.scale*r)}v(n,i),l=null,m(s.of(this,arguments))}var e=[0,0],t,n=1,r,i=ai,s=Y(c,"zoom"),o,u,a,f,l;return c.translate=function(t){return arguments.length?(e=t.map(Number),c):e},c.scale=function(e){return arguments.length?(n=+e,c):n},c.scaleExtent=function(e){return arguments.length?(i=e==null?ai:e.map(Number),c):i},c.x=function(e){return arguments.length?(u=e,o=e.copy(),c):u},c.y=function(e){return arguments.length?(f=e,a=e.copy(),c):f},d3.rebind(c,s,"on")};var ui,ai=[0,Infinity];d3.layout={},d3.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(li(e[n]));return t}},d3.layout.chord=function(){function f(){var e={},f=[],c=d3.range(i),h=[],p,d,v,m,g;t=[],n=[],p=0,m=-1;while(++m<i){d=0,g=-1;while(++g<i)d+=r[m][g];f.push(d),h.push(d3.range(i)),p+=d}o&&c.sort(function(e,t){return o(f[e],f[t])}),u&&h.forEach(function(e,t){e.sort(function(e,n){return u(r[t][e],r[t][n])})}),p=(2*Math.PI-s*i)/p,d=0,m=-1;while(++m<i){v=d,g=-1;while(++g<i){var y=c[m],b=h[y][g],w=r[y][b],E=d,S=d+=w*p;e[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:S,value:w}}n[y]={index:y,startAngle:v,endAngle:d,value:(d-v)/p},d+=s}m=-1;while(++m<i){g=m-1;while(++g<i){var x=e[m+"-"+g],T=e[g+"-"+m];(x.value||T.value)&&t.push(x.value<T.value?{source:T,target:x}:{source:x,target:T})}}a&&l()}function l(){t.sort(function(e,t){return a((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var e={},t,n,r,i,s=0,o,u,a;return e.matrix=function(s){return arguments.length?(i=(r=s)&&r.length,t=n=null,e):r},e.padding=function(r){return arguments.length?(s=r,t=n=null,e):s},e.sortGroups=function(r){return arguments.length?(o=r,t=n=null,e):o},e.sortSubgroups=function(n){return arguments.length?(u=n,t=null,e):u},e.sortChords=function(n){return arguments.length?(a=n,t&&l(),e):a},e.chords=function(){return t||f(),t},e.groups=function(){return n||f(),n},e},d3.layout.force=function(){function b(e){return function(t,n,r,i,s){if(t.point!==e){var o=t.cx-e.x,u=t.cy-e.y,a=1/Math.sqrt(o*o+u*u);if((i-n)*a<l){var f=t.charge*a*a;return e.px-=o*f,e.py-=u*f,!0}if(t.point&&isFinite(a)){var f=t.pointCharge*a*a;e.px-=o*f,e.py-=u*f}}return!t.charge}}function w(t){t.px=d3.event.x,t.py=d3.event.y,e.resume()}var e={},t=d3.dispatch("start","tick","end"),n=[1,1],r,i,s=.9,o=yi,u=bi,a=-30,f=.1,l=.8,c,p=[],d=[],m,g,y;return e.tick=function(){if((i*=.99)<.005)return t.end({type:"end",alpha:i=0}),!0;var e=p.length,r=d.length,o,u,l,c,h,v,w,E,S;for(u=0;u<r;++u){l=d[u],c=l.source,h=l.target,E=h.x-c.x,S=h.y-c.y;if(v=E*E+S*S)v=i*g[u]*((v=Math.sqrt(v))-m[u])/v,E*=v,S*=v,h.x-=E*(w=c.weight/(h.weight+c.weight)),h.y-=S*w,c.x+=E*(w=1-w),c.y+=S*w}if(w=i*f){E=n[0]/2,S=n[1]/2,u=-1;if(w)while(++u<e)l=p[u],l.x+=(E-l.x)*w,l.y+=(S-l.y)*w}if(a){gi(o=d3.geom.quadtree(p),i,y),u=-1;while(++u<e)(l=p[u]).fixed||o.visit(b(l))}u=-1;while(++u<e)l=p[u],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*s,l.y-=(l.py-(l.py=l.y))*s);t.tick({type:"tick",alpha:i})},e.nodes=function(t){return arguments.length?(p=t,e):p},e.links=function(t){return arguments.length?(d=t,e):d},e.size=function(t){return arguments.length?(n=t,e):n},e.linkDistance=function(t){return arguments.length?(o=v(t),e):o},e.distance=e.linkDistance,e.linkStrength=function(t){return arguments.length?(u=v(t),e):u},e.friction=function(t){return arguments.length?(s=t,e):s},e.charge=function(t){return arguments.length?(a=typeof t=="function"?t:+t,e):a},e.gravity=function(t){return arguments.length?(f=t,e):f},e.theta=function(t){return arguments.length?(l=t,e):l},e.alpha=function(n){return arguments.length?(i?n>0?i=n:i=0:n>0&&(t.start({type:"start",alpha:i=n}),d3.timer(e.tick)),e):i},e.start=function(){function v(e,n){var r=b(t),i=-1,s=r.length,o;while(++i<s)if(!isNaN(o=r[i][e]))return o;return Math.random()*n}function b(){if(!c){c=[];for(r=0;r<i;++r)c[r]=[];for(r=0;r<s;++r){var e=d[r];c[e.source.index].push(e.target),c[e.target.index].push(e.source)}}return c[t]}var t,r,i=p.length,s=d.length,f=n[0],l=n[1],c,h;for(t=0;t<i;++t)(h=p[t]).index=t,h.weight=0;m=[],g=[];for(t=0;t<s;++t)h=d[t],typeof h.source=="number"&&(h.source=p[h.source]),typeof h.target=="number"&&(h.target=p[h.target]),m[t]=o.call(this,h,t),g[t]=u.call(this,h,t),++h.source.weight,++h.target.weight;for(t=0;t<i;++t)h=p[t],isNaN(h.x)&&(h.x=v("x",f)),isNaN(h.y)&&(h.y=v("y",l)),isNaN(h.px)&&(h.px=h.x),isNaN(h.py)&&(h.py=h.y);y=[];if(typeof a=="function")for(t=0;t<i;++t)y[t]=+a.call(this,p[t],t);else for(t=0;t<i;++t)y[t]=a;return e.resume()},e.resume=function(){return e.alpha(.1)},e.stop=function(){return e.alpha(0)},e.drag=function(){r||(r=d3.behavior.drag().origin(h).on("dragstart",pi).on("drag",w).on("dragend",di)),this.on("mouseover.force",vi).on("mouseout.force",mi).call(r)},d3.rebind(e,t,"on")},d3.layout.partition=function(){function n(e,t,r,i){var s=e.children;e.x=t,e.y=e.depth*i,e.dx=r,e.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;r=e.value?r/e.value:0;while(++o<u)n(a=s[o],t,f=a.value*r,i),t+=f}}function r(e){var t=e.children,n=0;if(t&&(s=t.length)){var i=-1,s;while(++i<s)n=Math.max(n,r(t[i]))}return 1+n}function i(i,s){var o=e.call(this,i,s);return n(o[0],0,t[0],t[1]/r(o[0])),o}var e=d3.layout.hierarchy(),t=[1,1];return i.size=function(e){return arguments.length?(t=e,i):t},Pi(i,e)},d3.layout.pie=function(){function i(s,o){var u=s.map(function(t,n){return+e.call(i,t,n)}),a=+(typeof n=="function"?n.apply(this,arguments):n),f=((typeof r=="function"?r.apply(this,arguments):r)-n)/d3.sum(u),l=d3.range(s.length);t!=null&&l.sort(t===wi?function(e,t){return u[t]-u[e]}:function(e,n){return t(s[e],s[n])});var c=[];return l.forEach(function(e){var t;c[e]={data:s[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}}),c}var e=Number,t=wi,n=0,r=2*Math.PI;return i.value=function(t){return arguments.length?(e=t,i):e},i.sort=function(e){return arguments.length?(t=e,i):t},i.startAngle=function(e){return arguments.length?(n=e,i):n},i.endAngle=function(e){return arguments.length?(r=e,i):r},i};var wi={};d3.layout.stack=function(){function o(u,a){var f=u.map(function(t,n){return e.call(o,t,n)}),l=f.map(function(e,t){return e.map(function(e,t){return[i.call(o,e,t),s.call(o,e,t)]})}),c=t.call(o,l,a);f=d3.permute(f,c),l=d3.permute(l,c);var h=n.call(o,l,a),p=f.length,d=f[0].length,v,m,g;for(m=0;m<d;++m){r.call(o,f[0][m],g=h[m],l[0][m][1]);for(v=1;v<p;++v)r.call(o,f[v][m],g+=l[v-1][m][1],l[v][m][1])}return u}var e=h,t=Ci,n=ki,r=xi,i=Ei,s=Si;return o.values=function(t){return arguments.length?(e=t,o):e},o.order=function(e){return arguments.length?(t=typeof e=="function"?e:Ti.get(e)||Ci,o):t},o.offset=function(e){return arguments.length?(n=typeof e=="function"?e:Ni.get(e)||ki,o):n},o.x=function(e){return arguments.length?(i=e,o):i},o.y=function(e){return arguments.length?(s=e,o):s},o.out=function(e){return arguments.length?(r=e,o):r},o};var Ti=d3.map({"inside-out":function(e){var t=e.length,n,r,i=e.map(Li),s=e.map(Ai),o=d3.range(t).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(n=0;n<t;++n)r=o[n],u<a?(u+=s[r],f.push(r)):(a+=s[r],l.push(r));return l.reverse().concat(f)},reverse:function(e){return d3.range(e.length).reverse()},"default":Ci}),Ni=d3.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];u>i&&(i=u),r.push(u)}for(o=0;o<n;++o)a[o]=(i-r[o])/2;return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i=0,s,o,u,a,f,l,c,h,p,d=[];d[0]=h=p=0;for(o=1;o<r;++o){for(s=0,a=0;s<t;++s)a+=e[s][o][1];for(s=0,f=0,c=n[o][0]-n[o-1][0];s<t;++s){for(u=0,l=(e[s][o][1]-e[s][o-1][1])/(2*c);u<s;++u)l+=(e[u][o][1]-e[u][o-1][1])/c;f+=l*e[s][o][1]}d[o]=h-=a?f/a*c:0,h<p&&(p=h)}for(o=0;o<r;++o)d[o]-=p;return d},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:ki});d3.layout.histogram=function(){function i(i,s){var o=[],u=i.map(t,this),a=n.call(this,u,s),f=r.call(this,a,u,s),l,s=-1,c=u.length,h=f.length-1,p=e?1:1/c,d;while(++s<h)l=o[s]=[],l.dx=f[s+1]-(l.x=f[s]),l.y=0;if(h>0){s=-1;while(++s<c)d=u[s],d>=a[0]&&d<=a[1]&&(l=o[d3.bisect(f,d,1,h)-1],l.y+=p,l.push(i[s]))}return o}var e=!0,t=Number,n=Di,r=Mi;return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=v(e),i):n},i.bins=function(e){return arguments.length?(r=typeof e=="number"?function(t){return _i(t,e)}:v(e),i):r},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},d3.layout.hierarchy=function(){function r(i,o,u){var a=t.call(s,i,o),f=Ii?i:{data:i};f.depth=o,u.push(f);if(a&&(c=a.length)){var l=-1,c,h=f.children=[],p=0,d=o+1,v;while(++l<c)v=r(a[l],d,u),v.parent=f,h.push(v),p+=v.value;e&&h.sort(e),n&&(f.value=p)}else n&&(f.value=+n.call(s,i,o)||0);return f}function i(e,t){var r=e.children,o=0;if(r&&(a=r.length)){var u=-1,a,f=t+1;while(++u<a)o+=i(r[u],f)}else n&&(o=+n.call(s,Ii?e:e.data,t)||0);return n&&(e.value=o),o}function s(e){var t=[];return r(e,0,t),t}var e=ji,t=Hi,n=Bi;return s.sort=function(t){return arguments.length?(e=t,s):e},s.children=function(e){return arguments.length?(t=e,s):t},s.value=function(e){return arguments.length?(n=e,s):n},s.revalue=function(e){return i(e,0),e},s};var Ii=!1;d3.layout.pack=function(){function r(r,i){var s=e.call(this,r,i),o=s[0];o.x=0,o.y=0,os(o,function(e){e.r=Math.sqrt(e.value)}),os(o,Wi);var u=n[0],a=n[1],f=Math.max(2*o.r/u,2*o.r/a);if(t>0){var l=t*f/2;os(o,function(e){e.r+=l}),os(o,Wi),os(o,function(e){e.r-=l}),f=Math.max(2*o.r/u,2*o.r/a)}return $i(o,u/2,a/2,1/f),s}var e=d3.layout.hierarchy().sort(qi),t=0,n=[1,1];return r.size=function(e){return arguments.length?(n=e,r):n},r.padding=function(e){return arguments.length?(t=+e,r):t},Pi(r,e)},d3.layout.cluster=function(){function r(r,i){var s=e.call(this,r,i),o=s[0],u,a=0,f,l;os(o,function(e){var n=e.children;n&&n.length?(e.x=Qi(n),e.y=Ki(n)):(e.x=u?a+=t(e,u):0,e.y=0,u=e)});var c=Gi(o),h=Yi(o),p=c.x-t(c,h)/2,d=h.x+t(h,c)/2;return os(o,function(e){e.x=(e.x-p)/(d-p)*n[0],e.y=(1-(o.y?e.y/o.y:1))*n[1]}),s}var e=d3.layout.hierarchy().sort(null).value(null),t=Zi,n=[1,1];return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(e){return arguments.length?(n=e,r):n},Pi(r,e)},d3.layout.tree=function(){function r(r,i){function u(e,n){var r=e.children,i=e._tree;if(r&&(s=r.length)){var s,o=r[0],a,l=o,c,h=-1;while(++h<s)c=r[h],u(c,a),l=f(c,a,l),a=c;us(e);var p=.5*(o._tree.prelim+c._tree.prelim);n?(i.prelim=n._tree.prelim+t(e,n),i.mod=i.prelim-p):i.prelim=p}else n&&(i.prelim=n._tree.prelim+t(e,n))}function a(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i)a(n[r],t)}}function f(e,n,r){if(n){var i=e,s=e,o=n,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=ts(o),i=es(i),o&&i)u=es(u),s=ts(s),s._tree.ancestor=e,h=o._tree.prelim+l-i._tree.prelim-a+t(o,i),h>0&&(as(fs(o,e,r),e,h),a+=h,f+=h),l+=o._tree.mod,a+=i._tree.mod,c+=u._tree.mod,f+=s._tree.mod;o&&!ts(s)&&(s._tree.thread=o,s._tree.mod+=l-f),i&&!es(u)&&(u._tree.thread=i,u._tree.mod+=a-c,r=e)}return r}var s=e.call(this,r,i),o=s[0];os(o,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),u(o),a(o,-o._tree.prelim);var l=ns(o,is),c=ns(o,rs),h=ns(o,ss),p=l.x-t(l,c)/2,d=c.x+t(c,l)/2,v=h.depth||1;return os(o,function(e){e.x=(e.x-p)/(d-p)*n[0],e.y=e.depth/v*n[1],delete e._tree}),s}var e=d3.layout.hierarchy().sort(null).value(null),t=Zi,n=[1,1];return r.separation=function(e){return arguments.length?(t=e,r):t},r.size=function(e){return arguments.length?(n=e,r):n},Pi(r,e)},d3.layout.treemap=function(){function a(e,t){var n=-1,r=e.length,i,s;while(++n<r)s=(i=e[n]).value*(t<0?0:t),i.area=isNaN(s)||s<=0?0:s}function f(e){var t=e.children;if(t&&t.length){var n=i(e),r=[],s=t.slice(),o,u=Infinity,l,p=Math.min(n.dx,n.dy),d;a(s,n.dx*n.dy/e.value),r.area=0;while((d=s.length)>0)r.push(o=s[d-1]),r.area+=o.area,(l=c(r,p))<=u?(s.pop(),u=l):(r.area-=r.pop().area,h(r,p,n,!1),p=Math.min(n.dx,n.dy),r.length=r.area=0,u=Infinity);r.length&&(h(r,p,n,!0),r.length=r.area=0),t.forEach(f)}}function l(e){var t=e.children;if(t&&t.length){var n=i(e),r=t.slice(),s,o=[];a(r,n.dx*n.dy/e.value),o.area=0;while(s=r.pop())o.push(s),o.area+=s.area,s.z!=null&&(h(o,s.z?n.dx:n.dy,n,!r.length),o.length=o.area=0);t.forEach(l)}}function c(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,a=e.length;while(++o<a){if(!(r=e[o].area))continue;r<s&&(s=r),r>i&&(i=r)}return n*=n,t*=t,n?Math.max(t*i*u/n,n/(t*s*u)):Infinity}function h(e,n,r,i){var s=-1,o=e.length,u=r.x,a=r.y,f=n?t(e.area/n):0,l;if(n==r.dx){if(i||f>r.dy)f=r.dy;while(++s<o)l=e[s],l.x=u,l.y=a,l.dy=f,u+=l.dx=Math.min(r.x+r.dx-u,f?t(l.area/f):0);l.z=!0,l.dx+=r.x+r.dx-u,r.y+=f,r.dy-=f}else{if(i||f>r.dx)f=r.dx;while(++s<o)l=e[s],l.x=u,l.y=a,l.dx=f,a+=l.dy=Math.min(r.y+r.dy-a,f?t(l.area/f):0);l.z=!1,l.dy+=r.y+r.dy-a,r.x+=f,r.dx-=f}}function p(t){var r=o||e(t),i=r[0];return i.x=0,i.y=0,i.dx=n[0],i.dy=n[1],o&&e.revalue(i),a([i],i.dx*i.dy/i.value),(o?l:f)(i),s&&(o=r),r}var e=d3.layout.hierarchy(),t=Math.round,n=[1,1],r=null,i=ls,s=!1,o,u=.5*(1+Math.sqrt(5));return p.size=function(e){return arguments.length?(n=e,p):n},p.padding=function(e){function t(t){var n=e.call(p,t,t.depth);return n==null?ls(t):cs(t,typeof n=="number"?[n,n,n,n]:n)}function n(t){return cs(t,e)}if(!arguments.length)return r;var s;return i=(r=e)==null?ls:(s=typeof e)==="function"?t:s==="number"?(e=[e,e,e,e],n):n,p},p.round=function(e){return arguments.length?(t=e?Math.round:Number,p):t!=Number},p.sticky=function(e){return arguments.length?(s=e,o=null,p):s},p.ratio=function(e){return arguments.length?(u=e,p):u},Pi(p,e)},d3.csv=hs(",","text/csv"),d3.tsv=hs("	","text/tab-separated-values"),d3.geo={};var ps=Math.PI/180;d3.geo.azimuthal=function(){function a(t){var s=t[0]*ps-i,a=t[1]*ps,f=Math.cos(s),l=Math.sin(s),c=Math.cos(a),h=Math.sin(a),p=e!=="orthographic"?u*h+o*c*f:null,d,v=e==="stereographic"?1/(1+p):e==="gnomonic"?1/p:e==="equidistant"?(d=Math.acos(p),d?d/Math.sin(d):0):e==="equalarea"?Math.sqrt(2/(1+p)):1,m=v*c*l,g=v*(u*c*f-o*h);return[n*m+r[0],n*g+r[1]]}var e="orthographic",t,n=200,r=[480,250],i,s,o,u;return a.invert=function(t){var s=(t[0]-r[0])/n,a=(t[1]-r[1])/n,f=Math.sqrt(s*s+a*a),l=e==="stereographic"?2*Math.atan(f):e==="gnomonic"?Math.atan(f):e==="equidistant"?f:e==="equalarea"?2*Math.asin(.5*f):Math.asin(f),c=Math.sin(l),h=Math.cos(l);return[(i+Math.atan2(s*c,f*o*h+a*u*c))/ps,Math.asin(h*u-(f?a*c*o/f:0))/ps]},a.mode=function(t){return arguments.length?(e=t+"",a):e},a.origin=function(e){return arguments.length?(t=e,i=t[0]*ps,s=t[1]*ps,o=Math.cos(s),u=Math.sin(s),a):t},a.scale=function(e){return arguments.length?(n=+e,a):n},a.translate=function(e){return arguments.length?(r=[+e[0],+e[1]],a):r},a.origin([0,0])},d3.geo.albers=function(){function a(e){var t=s*(ps*e[0]-i),a=Math.sqrt(o-2*s*Math.sin(ps*e[1]))/s;return[n*a*Math.sin(t)+r[0],n*(a*Math.cos(t)-u)+r[1]]}function f(){var n=ps*t[0],r=ps*t[1],f=ps*e[1],l=Math.sin(n),c=Math.cos(n);return i=ps*e[0],s=.5*(l+Math.sin(r)),o=c*c+2*s*l,u=Math.sqrt(o-2*s*Math.sin(f))/s,a}var e=[-98,38],t=[29.5,45.5],n=1e3,r=[480,250],i,s,o,u;return a.invert=function(e){var t=(e[0]-r[0])/n,a=(e[1]-r[1])/n,f=u+a,l=Math.atan2(t,f),c=Math.sqrt(t*t+f*f);return[(i+l/s)/ps,Math.asin((o-c*c*s*s)/(2*s))/ps]},a.origin=function(t){return arguments.length?(e=[+t[0],+t[1]],f()):e},a.parallels=function(e){return arguments.length?(t=[+e[0],+e[1]],f()):t},a.scale=function(e){return arguments.length?(n=+e,a):n},a.translate=function(e){return arguments.length?(r=[+e[0],+e[1]],a):r},f()},d3.geo.albersUsa=function(){function i(i){var s=i[0],o=i[1];return(o>50?t:s<-140?n:o<21?r:e)(i)}var e=d3.geo.albers(),t=d3.geo.albers().origin([-160,60]).parallels([55,65]),n=d3.geo.albers().origin([-160,20]).parallels([8,18]),r=d3.geo.albers().origin([-60,10]).parallels([8,18]);return i.scale=function(s){return arguments.length?(e.scale(s),t.scale(s*.6),n.scale(s),r.scale(s*1.5),i.translate(e.translate())):e.scale()},i.translate=function(s){if(!arguments.length)return e.translate();var o=e.scale()/1e3,u=s[0],a=s[1];return e.translate(s),t.translate([u-400*o,a+170*o]),n.translate([u-190*o,a+200*o]),r.translate([u+580*o,a+430*o]),i},i.scale(e.scale())},d3.geo.bonne=function(){function o(o){var u=o[0]*ps-n,a=o[1]*ps-r;if(i){var f=s+i-a,l=u*Math.cos(a)/f;u=f*Math.sin(l),a=f*Math.cos(l)-s}else u*=Math.cos(a),a*=-1;return[e*u+t[0],e*a+t[1]]}var e=200,t=[480,250],n,r,i,s;return o.invert=function(r){var o=(r[0]-t[0])/e,u=(r[1]-t[1])/e;if(i){var a=s+u,f=Math.sqrt(o*o+a*a);u=s+i-f,o=n+f*Math.atan2(o,a)/Math.cos(u)}else u*=-1,o/=Math.cos(u);return[o/ps,u/ps]},o.parallel=function(e){return arguments.length?(s=1/Math.tan(i=e*ps),o):i/ps},o.origin=function(e){return arguments.length?(n=e[0]*ps,r=e[1]*ps,o):[n/ps,r/ps]},o.scale=function(t){return arguments.length?(e=+t,o):e},o.translate=function(e){return arguments.length?(t=[+e[0],+e[1]],o):t},o.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function n(n){var r=n[0]/360,i=-n[1]/360;return[e*r+t[0],e*i+t[1]]}var e=500,t=[480,250];return n.invert=function(n){var r=(n[0]-t[0])/e,i=(n[1]-t[1])/e;return[360*r,-360*i]},n.scale=function(t){return arguments.length?(e=+t,n):e},n.translate=function(e){return arguments.length?(t=[+e[0],+e[1]],n):t},n},d3.geo.mercator=function(){function n(n){var r=n[0]/360,i=-(Math.log(Math.tan(Math.PI/4+n[1]*ps/2))/ps)/360;return[e*r+t[0],e*Math.max(-0.5,Math.min(.5,i))+t[1]]}var e=500,t=[480,250];return n.invert=function(n){var r=(n[0]-t[0])/e,i=(n[1]-t[1])/e;return[360*r,2*Math.atan(Math.exp(-360*i*ps))/ps-90]},n.scale=function(t){return arguments.length?(e=+t,n):e},n.translate=function(e){return arguments.length?(t=[+e[0],+e[1]],n):t},n},d3.geo.path=function(){function i(n,i){typeof e=="function"&&(t=vs(e.apply(this,arguments))),o(n);var s=r.length?r.join(""):null;return r=[],s}function s(e){return n(e).join(",")}function a(e){var t=c(e[0]),n=0,r=e.length;while(++n<r)t-=c(e[n]);return t}function f(e){var t=d3.geom.polygon(e[0].map(n)),r=t.area(),i=t.centroid(r<0?(r*=-1,1):-1),s=i[0],o=i[1],u=r,a=0,f=e.length;while(++a<f)t=d3.geom.polygon(e[a].map(n)),r=t.area(),i=t.centroid(r<0?(r*=-1,1):-1),s-=i[0],o-=i[1],u-=r;return[s,o,6*u]}function c(e){return Math.abs(d3.geom.polygon(e.map(n)).area())}var e=4.5,t=vs(e),n=d3.geo.albersUsa(),r=[],o=ds({FeatureCollection:function(e){var t=e.features,n=-1,i=t.length;while(++n<i)r.push(o(t[n].geometry))},Feature:function(e){o(e.geometry)},Point:function(e){r.push("M",s(e.coordinates),t)},MultiPoint:function(e){var n=e.coordinates,i=-1,o=n.length;while(++i<o)r.push("M",s(n[i]),t)},LineString:function(e){var t=e.coordinates,n=-1,i=t.length;r.push("M");while(++n<i)r.push(s(t[n]),"L");r.pop()},MultiLineString:function(e){var t=e.coordinates,n=-1,i=t.length,o,u,a;while(++n<i){o=t[n],u=-1,a=o.length,r.push("M");while(++u<a)r.push(s(o[u]),"L");r.pop()}},Polygon:function(e){var t=e.coordinates,n=-1,i=t.length,o,u,a;while(++n<i){o=t[n],u=-1;if((a=o.length-1)>0){r.push("M");while(++u<a)r.push(s(o[u]),"L");r[r.length-1]="Z"}}},MultiPolygon:function(e){var t=e.coordinates,n=-1,i=t.length,o,u,a,f,l,c;while(++n<i){o=t[n],u=-1,a=o.length;while(++u<a){f=o[u],l=-1;if((c=f.length-1)>0){r.push("M");while(++l<c)r.push(s(f[l]),"L");r[r.length-1]="Z"}}}},GeometryCollection:function(e){var t=e.geometries,n=-1,i=t.length;while(++n<i)r.push(o(t[n]))}}),u=i.area=ds({FeatureCollection:function(e){var t=0,n=e.features,r=-1,i=n.length;while(++r<i)t+=u(n[r]);return t},Feature:function(e){return u(e.geometry)},Polygon:function(e){return a(e.coordinates)},MultiPolygon:function(e){var t=0,n=e.coordinates,r=-1,i=n.length;while(++r<i)t+=a(n[r]);return t},GeometryCollection:function(e){var t=0,n=e.geometries,r=-1,i=n.length;while(++r<i)t+=u(n[r]);return t}},0),l=i.centroid=ds({Feature:function(e){return l(e.geometry)},Polygon:function(e){var t=f(e.coordinates);return[t[0]/t[2],t[1]/t[2]]},MultiPolygon:function(e){var t=0,n=e.coordinates,r,i=0,s=0,o=0,u=-1,a=n.length;while(++u<a)r=f(n[u]),i+=r[0],s+=r[1],o+=r[2];return[i/o,s/o]}});return i.projection=function(e){return n=e,i},i.pointRadius=function(n){return typeof n=="function"?e=n:(e=+n,t=vs(e)),i},i},d3.geo.bounds=function(e){var t=Infinity,n=Infinity,r=-Infinity,i=-Infinity;return ms(e,function(e,s){e<t&&(t=e),e>r&&(r=e),s<n&&(n=s),s>i&&(i=s)}),[[t,n],[r,i]]};var gs={Feature:ys,FeatureCollection:bs,GeometryCollection:ws,LineString:Es,MultiLineString:Ss,MultiPoint:Es,MultiPolygon:xs,Point:Ts,Polygon:Ns};d3.geo.circle=function(){function i(){}function s(e){return r.distance(e)<n}function u(e){var t=-1,i=e.length,s=[],o,u,f,l,c;while(++t<i)c=r.distance(f=e[t]),c<n?(u&&s.push(As(u,f)((l-n)/(l-c))),s.push(f),o=u=null):(u=f,!o&&s.length&&(s.push(As(s[s.length-1],u)((n-l)/(c-l))),o=u)),l=c;return o=e[0],u=s[0],u&&f[0]===o[0]&&f[1]===o[1]&&(f[0]!==u[0]||f[1]!==u[1])&&s.push(u),a(s)}function a(e){var t=0,n=e.length,i,s,o=n?[e[0]]:e,u,a=r.source();while(++t<n){u=r.source(e[t-1])(e[t]).coordinates;for(i=0,s=u.length;++i<s;)o.push(u[i])}return r.source(a),o}var e=[0,0],t=89.99,n=t*ps,r=d3.geo.greatArc().source(e).target(h);i.clip=function(t){return typeof e=="function"&&r.source(e.apply(this,arguments)),o(t)||null};var o=ds({FeatureCollection:function(e){var t=e.features.map(o).filter(h);return t&&(e=Object.create(e),e.features=t,e)},Feature:function(e){var t=o(e.geometry);return t&&(e=Object.create(e),e.geometry=t,e)},Point:function(e){return s(e.coordinates)&&e},MultiPoint:function(e){var t=e.coordinates.filter(s);return t.length&&{type:e.type,coordinates:t}},LineString:function(e){var t=u(e.coordinates);return t.length&&(e=Object.create(e),e.coordinates=t,e)},MultiLineString:function(e){var t=e.coordinates.map(u).filter(function(e){return e.length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},Polygon:function(e){var t=e.coordinates.map(u);return t[0].length&&(e=Object.create(e),e.coordinates=t,e)},MultiPolygon:function(e){var t=e.coordinates.map(function(e){return e.map(u)}).filter(function(e){return e[0].length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},GeometryCollection:function(e){var t=e.geometries.map(o).filter(h);return t.length&&(e=Object.create(e),e.geometries=t,e)}});return i.origin=function(t){return arguments.length?(e=t,typeof e!="function"&&r.source(e),i):e},i.angle=function(e){return arguments.length?(n=(t=+e)*ps,i):t},d3.rebind(i,r,"precision")},d3.geo.greatArc=function(){function o(){var e=o.distance.apply(this,arguments),n=0,u=i/e,a=[t];while((n+=u)<1)a.push(s(n));return a.push(r),{type:"LineString",coordinates:a}}var e=Cs,t,n=ks,r,i=6*ps,s=Ls();return o.distance=function(){return typeof e=="function"&&s.source(t=e.apply(this,arguments)),typeof n=="function"&&s.target(r=n.apply(this,arguments)),s.distance()},o.source=function(n){return arguments.length?(e=n,typeof e!="function"&&s.source(t=e),o):e},o.target=function(e){return arguments.length?(n=e,typeof n!="function"&&s.target(r=n),o):n},o.precision=function(e){return arguments.length?(i=e*ps,o):i/ps},o},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(e,t){var n=t||_s(e),r=[],i=n[0],s=n[1],o=0,u=0,a=NaN,f=NaN,l=0;do l=0,e(i-1,s-1)&&(l+=1),e(i,s-1)&&(l+=2),e(i-1,s)&&(l+=4),e(i,s)&&(l+=8),l===6?(o=f===-1?-1:1,u=0):l===9?(o=0,u=a===1?-1:1):(o=Os[l],u=Ms[l]),o!=a&&u!=f&&(r.push([i,s]),a=o,f=u),i+=o,s+=u;while(n[0]!=i||n[1]!=s);return r};var Os=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,NaN],Ms=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,NaN];d3.geom.hull=function(e){if(e.length<3)return[];var t=e.length,n=t-1,r=[],i=[],s,o,u=0,a,f,l,c,h,p,d,v;for(s=1;s<t;++s)e[s][1]<e[u][1]?u=s:e[s][1]==e[u][1]&&(u=e[s][0]<e[u][0]?s:u);for(s=0;s<t;++s){if(s===u)continue;f=e[s][1]-e[u][1],a=e[s][0]-e[u][0],r.push({angle:Math.atan2(f,a),index:s})}r.sort(function(e,t){return e.angle-t.angle}),d=r[0].angle,p=r[0].index,h=0;for(s=1;s<n;++s)o=r[s].index,d==r[s].angle?(a=e[p][0]-e[u][0],f=e[p][1]-e[u][1],l=e[o][0]-e[u][0],c=e[o][1]-e[u][1],a*a+f*f>=l*l+c*c?r[s].index=-1:(r[h].index=-1,d=r[s].angle,h=s,p=o)):(d=r[s].angle,h=s,p=o);i.push(u);for(s=0,o=0;s<2;++o)r[o].index!==-1&&(i.push(r[o].index),s++);v=i.length;for(;o<n;++o){if(r[o].index===-1)continue;while(!Ds(i[v-2],i[v-1],r[o].index,e))--v;i[v++]=r[o].index}var m=[];for(s=0;s<v;++s)m.push(e[i[s]]);return m},d3.geom.polygon=function(e){return e.area=function(){var t=0,n=e.length,r=e[n-1][0]*e[0][1],i=e[n-1][1]*e[0][0];while(++t<n)r+=e[t-1][0]*e[t][1],i+=e[t-1][1]*e[t][0];return(i-r)*.5},e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;arguments.length||(t=-1/(6*e.area()));while(++n<r)o=u,u=e[n],a=o[0]*u[1]-u[0]*o[1],i+=(o[0]+u[0])*a,s+=(o[1]+u[1])*a;return[i*t,s*t]},e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice(),t.length=0,a=e[r],f=n[(o=n.length)-1],s=-1;while(++s<o)l=n[s],Ps(l,u,a)?(Ps(f,u,a)||t.push(Hs(f,l,u,a)),t.push(l)):Ps(f,u,a)&&t.push(Hs(f,l,u,a)),f=l;u=a}return t},e},d3.geom.voronoi=function(e){var t=e.map(function(){return[]});return js(e,function(e){var n,r,i,s,o,u;e.a===1&&e.b>=0?(n=e.ep.r,r=e.ep.l):(n=e.ep.l,r=e.ep.r),e.a===1?(o=n?n.y:-1e6,i=e.c-e.b*o,u=r?r.y:1e6,s=e.c-e.b*u):(i=n?n.x:-1e6,o=e.c-e.a*i,s=r?r.x:1e6,u=e.c-e.a*s);var a=[i,o],f=[s,u];t[e.region.l.index].push(a,f),t[e.region.r.index].push(a,f)}),t.map(function(t,n){var r=e[n][0],i=e[n][1];return t.forEach(function(e){e.angle=Math.atan2(e[0]-r,e[1]-i)}),t.sort(function(e,t){return e.angle-t.angle}).filter(function(e,n){return!n||e.angle-t[n-1].angle>1e-10})})};var Bs={l:"r",r:"l"};d3.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];return js(e,function(n){t[n.region.l.index].push(e[n.region.r.index])}),t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)}),t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++)n.push([i,t[u],t[u+1]])}),n},d3.geom.quadtree=function(e,t,n,r,i){function l(e,t,n,r,i,s){if(isNaN(t.x)||isNaN(t.y))return;if(e.leaf){var o=e.point;o?Math.abs(o.x-t.x)+Math.abs(o.y-t.y)<.01?c(e,t,n,r,i,s):(e.point=null,c(e,o,n,r,i,s),c(e,t,n,r,i,s)):e.point=t}else c(e,t,n,r,i,s)}function c(e,t,n,r,i,s){var o=(n+i)*.5,u=(r+s)*.5,a=t.x>=o,f=t.y>=u,c=(f<<1)+a;e.leaf=!1,e=e.nodes[c]||(e.nodes[c]=Fs()),a?n=o:i=o,f?r=u:s=u,l(e,t,n,r,i,s)}var s,o=-1,u=e.length;u&&isNaN(e[0].x)&&(e=e.map(qs));if(arguments.length<5)if(arguments.length===3)i=r=n,n=t;else{t=n=Infinity,r=i=-Infinity;while(++o<u)s=e[o],s.x<t&&(t=s.x),s.y<n&&(n=s.y),s.x>r&&(r=s.x),s.y>i&&(i=s.y);var a=r-t,f=i-n;a>f?i=n+a:r=t+f}var h=Fs();return h.add=function(e){l(h,e,t,n,r,i)},h.visit=function(e){Is(e,h,t,n,r,i)},e.forEach(h.add),h},d3.time={};var Rs=Date,Us=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];zs.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Ws.setUTCDate.apply(this._,arguments)},setDay:function(){Ws.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ws.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ws.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ws.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ws.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ws.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ws.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ws.setTime.apply(this._,arguments)}};var Ws=Date.prototype,Xs="%a %b %e %H:%M:%S %Y",Vs="%m/%d/%y",$s="%H:%M:%S",Js=Us,Ks=Js.map(Ys),Qs=["January","February","March","April","May","June","July","August","September","October","November","December"],Gs=Qs.map(Ys);d3.time.format=function(e){function n(n){var r=[],i=-1,s=0,o,u;while(++i<t)e.charCodeAt(i)==37&&(r.push(e.substring(s,i),(u=ho[o=e.charAt(++i)])?u(n):o),s=i+1);return r.push(e.substring(s,i)),r.join("")}var t=e.length;return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Zs(n,e,t,0);if(r!=t.length)return null;"p"in n&&(n.H=n.H%12+n.p*12);var i=new Rs;return i.setFullYear(n.y,n.m,n.d),i.setHours(n.H,n.M,n.S,n.L),i},n.toString=function(){return e},n};var no=d3.format("02d"),ro=d3.format("03d"),io=d3.format("04d"),so=d3.format("2d"),oo=eo(Js),uo=eo(Ks),ao=eo(Qs),fo=to(Qs),lo=eo(Gs),co=to(Gs),ho={a:function(e){return Ks[e.getDay()]},A:function(e){return Js[e.getDay()]},b:function(e){return Gs[e.getMonth()]},B:function(e){return Qs[e.getMonth()]},c:d3.time.format(Xs),d:function(e){return no(e.getDate())},e:function(e){return so(e.getDate())},H:function(e){return no(e.getHours())},I:function(e){return no(e.getHours()%12||12)},j:function(e){return ro(1+d3.time.dayOfYear(e))},L:function(e){return ro(e.getMilliseconds())},m:function(e){return no(e.getMonth()+1)},M:function(e){return no(e.getMinutes())},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e){return no(e.getSeconds())},U:function(e){return no(d3.time.sundayOfYear(e))},w:function(e){return e.getDay()},W:function(e){return no(d3.time.mondayOfYear(e))},x:d3.time.format(Vs),X:d3.time.format($s),y:function(e){return no(e.getFullYear()%100)},Y:function(e){return io(e.getFullYear()%1e4)},Z:Po,"%":function(e){return"%"}},po={a:vo,A:mo,b:go,B:yo,c:bo,d:Co,e:Co,H:ko,I:ko,L:Oo,m:No,M:Lo,p:_o,S:Ao,x:wo,X:Eo,y:xo,Y:So},Mo=/^\s*\d+/,Do=d3.map({am:0,pm:1});d3.time.format.utc=function(e){function n(e){try{Rs=zs;var n=new Rs;return n._=e,t(n)}finally{Rs=Date}}var t=d3.time.format(e);return n.parse=function(e){try{Rs=zs;var n=t.parse(e);return n&&n._}finally{Rs=Date}},n.toString=t.toString,n};var Ho=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Bo:Ho,Bo.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Bo.toString=Ho.toString,d3.time.second=jo(function(e){return new Rs(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=jo(function(e){return new Rs(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=jo(function(e){var t=e.getTimezoneOffset()/60;return new Rs((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=jo(function(e){var t=new Rs(1970,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(e){var t=d3.time.year(e);return Math.floor((e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4
)/864e5)},Us.forEach(function(e,t){e=e.toLowerCase(),t=7-t;var n=d3.time[e]=jo(function(e){return(e=d3.time.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});d3.time[e+"s"]=n.range,d3.time[e+"s"].utc=n.utc.range,d3.time[e+"OfYear"]=function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=jo(function(e){return e=d3.time.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=jo(function(e){return e=d3.time.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Xo=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],$o=[[d3.time.format("%Y"),function(e){return!0}],[d3.time.format("%B"),function(e){return e.getMonth()}],[d3.time.format("%b %d"),function(e){return e.getDate()!=1}],[d3.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[d3.time.format("%I %p"),function(e){return e.getHours()}],[d3.time.format("%I:%M"),function(e){return e.getMinutes()}],[d3.time.format(":%S"),function(e){return e.getSeconds()}],[d3.time.format(".%L"),function(e){return e.getMilliseconds()}]],Jo=d3.scale.linear(),Ko=Uo($o);Vo.year=function(e,t){return Jo.domain(e.map(Wo)).ticks(t).map(zo)},d3.time.scale=function(){return Io(d3.scale.linear(),Vo,Ko)};var Qo=Vo.map(function(e){return[e[0].utc,e[1]]}),Go=[[d3.time.format.utc("%Y"),function(e){return!0}],[d3.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[d3.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[d3.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]],Yo=Uo(Go);Qo.year=function(e,t){return Jo.domain(e.map(eu)).ticks(t).map(Zo)},d3.time.scale.utc=function(){return Io(d3.scale.linear(),Qo,Yo)}}();