From 3b9c6db95602b38912a9b7eaa5e8bbac8cffb6df Mon Sep 17 00:00:00 2001 From: DmitryBaranovskiy Date: Fri, 7 May 2010 09:56:18 +1000 Subject: [PATCH] =?utf8?q?1.4.0=20=E2=80=A2=20Touch=20events=20support=20?= =?utf8?q?=E2=80=A2=20rgba=20support=20=E2=80=A2=20new=20method=20drag=20?= =?utf8?q?=E2=80=A2=20document.onmousemove=20=3D=20f=20=E2=86=92=20Raphael?= =?utf8?q?.mousemove(f)=20=E2=80=A2=20resetScale=20method=20=E2=80=A2=20sc?= =?utf8?q?aling=20text=20will=20change=20it=20position,=20but=20not=20size?= =?utf8?q?=20=E2=80=A2=20sets=20now=20have=20type=20=E2=80=9Cset=E2=80=9D?= =?utf8?q?=20=E2=80=A2=20rect=20in=20VML=20doesn=E2=80=99t=20recreate=20it?= =?utf8?q?self=20on=20change=20of=20the=20R=20=E2=80=A2=20pathes=20are=20n?= =?utf8?q?ot=20rounded=20to=20the=20nearby=20pixels=20anymore=20=E2=80=A2?= =?utf8?q?=20Various=20small=20bug=20fixes=20and=20improvements=20?= =?utf8?q?=E2=80=A2=20added=20preventDefault=20and=20stopPropagation=20to?= =?utf8?q?=20event=20object?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- raphael-min.js | 110 +------------------------------------------------ 1 file changed, 2 insertions(+), 108 deletions(-) diff --git a/raphael-min.js b/raphael-min.js index ed0dcb3..6f1629d 100644 --- a/raphael-min.js +++ b/raphael-min.js @@ -1,113 +1,7 @@ /* - * Raphael 1.4.0 - JavaScript Vector Library + * Raphael 1.4 - JavaScript Vector Library * * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com) * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. */ -Raphael=function(){function m(){if(m.is(arguments[0],W)){for(var a=arguments[0],b=za[K](m,a.splice(0,3+m.is(a[0],P))),c=b.set(),d=0,f=a[o];d

";if(ha.childNodes[o]!=2)return m.type=null;ha=null}m.svg=!(m.vml=m.type=="VML");G[p]=m[p];m._id=0;m._oid=0;m.fn={};m.is=function(a,b){b=ca.call(b);return b=="object"&&a===Object(a)||b=="undefined"&&typeof a==b||b=="null"&&a==null||ca.call(mb.call(a).slice(8,-1))==b};m.setWindow=function(a){X=a;C=X.document};function qa(a){if(m.vml){var b=/^\s+|\s+$/g;qa=T(function(d){var f;d=(d+s)[I](b,s);try{var e=new X.ActiveXObject("htmlfile"); -e.write("");e.close();f=e.body}catch(h){f=X.createPopup().document.body}e=f.createTextRange();try{f.style.color=d;var g=e.queryCommandValue("ForeColor");g=(g&255)<<16|g&65280|(g&16711680)>>>16;return"#"+("000000"+g[O](16)).slice(-6)}catch(i){return"none"}})}else{var c=C.createElement("i");c.title="Rapha\u00ebl Colour Picker";c.style.display="none";C.body[w](c);qa=T(function(d){c.style.color=d;return C.defaultView.getComputedStyle(c,s).getPropertyValue("color")})}return qa(a)}function ob(){return"hsb("+ -[this.h,this.s,this.b]+")"}function pb(){return this.hex}m.hsb2rgb=T(function(a,b,c){if(m.is(a,"object")&&"h"in a&&"s"in a&&"b"in a){c=a.b;b=a.s;a=a.h}var d;if(c==0)return{r:0,g:0,b:0,hex:"#000"};if(a>1||b>1||c>1){a/=255;b/=255;c/=255}d=~~(a*6);a=a*6-d;var f=c*(1-b),e=c*(1-b*a),h=c*(1-b*(1-a));a=[c,e,f,f,h,c,c][d];b=[h,c,c,e,f,f,h][d];d=[f,f,h,c,c,e,f][d];a*=255;b*=255;d*=255;c={r:a,g:b,b:d,toString:pb};a=(~~a)[O](16);b=(~~b)[O](16);d=(~~d)[O](16);a=a[I](ga,"0");b=b[I](ga,"0");d=d[I](ga,"0");c.hex= -"#"+a+b+d;return c},m);m.rgb2hsb=T(function(a,b,c){if(m.is(a,"object")&&"r"in a&&"g"in a&&"b"in a){c=a.b;b=a.g;a=a.r}if(m.is(a,fa)){var d=m.getRGB(a);a=d.r;b=d.g;c=d.b}if(a>1||b>1||c>1){a/=255;b/=255;c/=255}var f=Y(a,b,c),e=Z(a,b,c);d=f;if(e==f)return{h:0,s:0,b:f};else{var h=f-e;e=h/f;a=a==f?(b-c)/h:b==f?2+(c-a)/h:4+(a-b)/h;a/=6;a<0&&a++;a>1&&a--}return{h:a,s:e,b:d,toString:ob}},m);var qb=/,?([achlmqrstvxz]),?/gi,ra=/\s*,\s*/,rb={hs:1,rg:1};m._path2string=function(){return this.join(",")[I](qb,"$1")}; -function T(a,b,c){function d(){var f=Array[p].slice.call(arguments,0),e=f[R]("\u25ba"),h=d.cache=d.cache||{},g=d.count=d.count||[];if(h[B](e))return c?c(h[e]):h[e];g[o]>=1000&&delete h[g.shift()];g[E](e);h[e]=a[K](b,f);return c?c(h[e]):h[e]}return d}m.getRGB=T(function(a){if(!a||(a+=s).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1};if(a=="none")return{r:-1,g:-1,b:-1,hex:"none"};!(rb[B](a.substring(0,2))||a.charAt()=="#")&&(a=qa(a));var b,c,d,f,e;if(a=a.match(nb)){if(a[2]){d=da(a[2].substring(5), -16);c=da(a[2].substring(3,5),16);b=da(a[2].substring(1,3),16)}if(a[3]){d=da((e=a[3].charAt(3))+e,16);c=da((e=a[3].charAt(2))+e,16);b=da((e=a[3].charAt(1))+e,16)}if(a[4]){a=a[4][H](ra);b=z(a[0]);c=z(a[1]);d=z(a[2]);f=z(a[3])}if(a[5]){a=a[5][H](ra);b=z(a[0])*2.55;c=z(a[1])*2.55;d=z(a[2])*2.55;f=z(a[3])}if(a[6]){a=a[6][H](ra);b=z(a[0]);c=z(a[1]);d=z(a[2]);return m.hsb2rgb(b,c,d)}if(a[7]){a=a[7][H](ra);b=z(a[0])*2.55;c=z(a[1])*2.55;d=z(a[2])*2.55;return m.hsb2rgb(b,c,d)}a={r:b,g:c,b:d};b=(~~b)[O](16); -c=(~~c)[O](16);d=(~~d)[O](16);b=b[I](ga,"0");c=c[I](ga,"0");d=d[I](ga,"0");a.hex="#"+b+c+d;isFinite(z(f))&&(a.o=f);return a}return{r:-1,g:-1,b:-1,hex:"none",error:1}},m);m.getColor=function(a){a=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75};var b=this.hsb2rgb(a.h,a.s,a.b);a.h+=0.075;if(a.h>1){a.h=0;a.s-=0.2;a.s<=0&&(this.getColor.start={h:0,s:1,b:a.b})}return b.hex};m.getColor.reset=function(){delete this.start};var sb=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig, -tb=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;m.parsePathString=T(function(a){if(!a)return null;var b={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[];if(m.is(a,W)&&m.is(a[0],W))c=sa(a);c[o]||(a+s)[I](sb,function(d,f,e){var h=[];d=ca.call(f);e[I](tb,function(g,i){i&&h[E](+i)});if(d=="m"&&h[o]>2){c[E]([f][N](h.splice(0,2)));d="l";f=f=="m"?"l":"L"}for(;h[o]>=b[d];){c[E]([f][N](h.splice(0,b[d])));if(!b[d])break}});c[O]=m._path2string;return c});m.findDotsAtSegment=function(a,b,c,d,f,e,h,g,i){var j=1-i,k= -D(j,3)*a+D(j,2)*3*i*c+j*3*i*i*f+D(i,3)*h;j=D(j,3)*b+D(j,2)*3*i*d+j*3*i*i*e+D(i,3)*g;var n=a+2*i*(c-a)+i*i*(f-2*c+a),r=b+2*i*(d-b)+i*i*(e-2*d+b),q=c+2*i*(f-c)+i*i*(h-2*f+c),l=d+2*i*(e-d)+i*i*(g-2*e+d);a=(1-i)*a+i*c;b=(1-i)*b+i*d;f=(1-i)*f+i*h;e=(1-i)*e+i*g;g=90-x.atan((n-q)/(r-l))*180/x.PI;(n>q||r1){A=x.sqrt(A);c=A*c;d=A*d}A=c*c;var L=d*d;A=(e==h?-1:1)*x.sqrt(x.abs((A*L-A*y*y-L*l*l)/(A*y*y+L*l*l)));e=A*c*y/d+(a+g)/2;var A= -A*-d*l/c+(b+i)/2,y=x.asin(((b-A)/d).toFixed(7));l=x.asin(((i-A)/d).toFixed(7));y=al)y-=k*2;if(!h&&l>y)l-=k*2}k=l-y;if(x.abs(k)>n){q=l;k=g;L=i;l=y+n*(h&&l>y?1:-1);g=e+c*x.cos(l);i=A+d*x.sin(l);q=Na(g,i,c,d,f,0,h,k,L,[l,q,e,A])}k=l-y;f=x.cos(y);e=x.sin(y);h=x.cos(l);l=x.sin(l);k=x.tan(k/4);c=4/3*c*k;k=4/3*d*k;d=[a,b];a=[a+c*e,b-k*f];b=[g+c*l,i-k*h];g=[g,i];a[0]=2*d[0]-a[0];a[1]=2*d[1]-a[1];if(j)return[a,b,g][N](q);else{q=[a,b,g][N](q)[R]()[H](","); -j=[];g=0;for(i=q[o];g1000000000000&&(n=0.5);x.abs(i)>1000000000000&&(i=0.5);if(n>0&&n<1){n=ma(a,b,c,d,f,e,h,g,n);q[E](n.x);r[E](n.y)}if(i> -0&&i<1){n=ma(a,b,c,d,f,e,h,g,i);q[E](n.x);r[E](n.y)}i=e-2*d+b-(g-2*e+d);j=2*(d-b)-2*(e-d);k=b-d;n=(-j+x.sqrt(j*j-4*i*k))/2/i;i=(-j-x.sqrt(j*j-4*i*k))/2/i;x.abs(n)>1000000000000&&(n=0.5);x.abs(i)>1000000000000&&(i=0.5);if(n>0&&n<1){n=ma(a,b,c,d,f,e,h,g,n);q[E](n.x);r[E](n.y)}if(i>0&&i<1){n=ma(a,b,c,d,f,e,h,g,i);q[E](n.x);r[E](n.y)}return{min:{x:Z[K](0,q),y:Z[K](0,r)},max:{x:Y[K](0,q),y:Y[K](0,r)}}}),ta=T(function(a,b){var c=la(a),d=b&&la(b);a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null};b={x:0,y:0, -bx:0,by:0,X:0,Y:0,qx:null,qy:null};function f(q,l){var u;if(!q)return["C",l.x,l.y,l.x,l.y,l.x,l.y];!(q[0]in{T:1,Q:1})&&(l.qx=l.qy=null);switch(q[0]){case "M":l.X=q[1];l.Y=q[2];break;case "A":q=["C"][N](Na[K](0,[l.x,l.y][N](q.slice(1))));break;case "S":u=l.x+(l.x-(l.bx||l.x));l=l.y+(l.y-(l.by||l.y));q=["C",u,l][N](q.slice(1));break;case "T":l.qx=l.x+(l.x-(l.qx||l.x));l.qy=l.y+(l.y-(l.qy||l.y));q=["C"][N](Ma(l.x,l.y,l.qx,l.qy,q[1],q[2]));break;case "Q":l.qx=q[1];l.qy=q[2];q=["C"][N](Ma(l.x,l.y,q[1], -q[2],q[3],q[4]));break;case "L":q=["C"][N](va(l.x,l.y,q[1],q[2]));break;case "H":q=["C"][N](va(l.x,l.y,q[1],l.y));break;case "V":q=["C"][N](va(l.x,l.y,l.x,q[1]));break;case "Z":q=["C"][N](va(l.x,l.y,l.X,l.Y));break}return q}function e(q,l){if(q[l][o]>7){q[l].shift();for(var u=q[l];u[o];)q.splice(l++,0,["C"][N](u.splice(0,6)));q.splice(l,1);i=Y(c[o],d&&d[o]||0)}}function h(q,l,u,L,A){if(q&&l&&q[A][0]=="M"&&l[A][0]!="M"){l.splice(A,0,["M",L.x,L.y]);u.bx=0;u.by=0;u.x=q[A][1];u.y=q[A][2];i=Y(c[o],d&& -d[o]||0)}}for(var g=0,i=Y(c[o],d&&d[o]||0);g0.5)*2-1;D(f-0.5,2)+D(e-0.5,2)>0.25&&(e=x.sqrt(0.25-D(f-0.5,2))*k+0.5)&&e!=0.5&&(e=e.toFixed(5)-1.0E-5*k)}return s});b=b[H](/\s*\-\s*/);if(d=="linear"){var g=b.shift();g=-z(g);if(isNaN(g))return null;g=[0,0,x.cos(g*x.PI/180),x.sin(g*x.PI/180)];var i=1/(Y(x.abs(g[2]),x.abs(g[3]))||1);g[2]*=i;g[3]*=i;if(g[2]<0){g[0]=-g[2];g[2]=0}if(g[3]<0){g[1]=-g[3];g[3]=0}}b=Oa(b);if(!b)return null; -i=a.getAttribute(ba);(i=i.match(/^url\(#(.*)\)$/))&&c.defs.removeChild(C.getElementById(i[1]));i=v(d+"Gradient");i.id="r"+(m._id++)[O](36);v(i,d=="radial"?{fx:f,fy:e}:{x1:g[0],y1:g[1],x2:g[2],y2:g[3]});c.defs[w](i);c=0;for(g=b[o];cb.height&&(b.height=e.y+e.height-b.y);e.x+e.width-b.x>b.width&&(b.width=e.x+e.width-b.x)}}a&&this.hide();return b};t[p].attr=function(a,b){if(this.removed)return this;if(a==null){a={};for(var c in this.attrs)if(this.attrs[B](c))a[c]=this.attrs[c];this._.rt.deg&&(a.rotation=this.rotate());(this._.sx!=1||this._.sy!= -1)&&(a.scale=this.scale());a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient;return a}if(b==null&&m.is(a,fa)){if(a=="translation")return xa.call(this);if(a=="rotation")return this.rotate();if(a=="scale")return this.scale();if(a==ba&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[a]}if(b==null&&m.is(a,W)){b={};c=0;for(var d=a.length;c1&&(a=1);f.opacity=a}b.fill&&(f.on=true);if(f.on==null||b.fill=="none")f.on=false;if(f.on&&b.fill)if(a=b.fill.match(Ka)){f.src=a[1];f.type="tile"}else{f.color=m.getRGB(b.fill).hex;f.src=s;f.type="solid";if(m.getRGB(b.fill).error&&(h.type in{circle:1,ellipse:1}||(b.fill+s).charAt()!="r")&&na(h,b.fill)){d.fill="none";d.gradient=b.fill}}e&&c[w](f);f=c.getElementsByTagName("stroke")&& -c.getElementsByTagName("stroke")[0];e=false;!f&&(e=f=M("stroke"));if(b.stroke&&b.stroke!="none"||b["stroke-width"]||b["stroke-opacity"]!=null||b["stroke-dasharray"]||b["stroke-miterlimit"]||b["stroke-linejoin"]||b["stroke-linecap"])f.on=true;(b.stroke=="none"||f.on==null||b.stroke==0||b["stroke-width"]==0)&&(f.on=false);a=m.getRGB(b.stroke);f.on&&b.stroke&&(f.color=a.hex);a=((+d["stroke-opacity"]+1||2)-1)*((+d.opacity+1||2)-1)*((+a.o+1||2)-1);g=(z(b["stroke-width"])||1)*0.75;a<0&&(a=0);a>1&&(a=1); -b["stroke-width"]==null&&(g=d["stroke-width"]);b["stroke-width"]&&(f.weight=g);g&&g<1&&(a*=g)&&(f.weight=1);f.opacity=a;b["stroke-linejoin"]&&(f.joinstyle=b["stroke-linejoin"]||"miter");f.miterlimit=b["stroke-miterlimit"]||8;b["stroke-linecap"]&&(f.endcap=b["stroke-linecap"]=="butt"?"flat":b["stroke-linecap"]=="square"?"square":"round");if(b["stroke-dasharray"]){a={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot", -"--..":"longdashdotdot"};f.dashstyle=a[B](b["stroke-dasharray"])?a[b["stroke-dasharray"]]:s}e&&c[w](f)}if(h.type=="text"){f=h.paper.span.style;d.font&&(f.font=d.font);d["font-family"]&&(f.fontFamily=d["font-family"]);d["font-size"]&&(f.fontSize=d["font-size"]);d["font-weight"]&&(f.fontWeight=d["font-weight"]);d["font-style"]&&(f.fontStyle=d["font-style"]);h.node.string&&(h.paper.span.innerHTML=(h.node.string+s)[I](/"));h.W=d.w=h.paper.span.offsetWidth;h.H= -d.h=h.paper.span.offsetHeight;h.X=d.x;h.Y=d.y+F(h.H/2);switch(d["text-anchor"]){case "start":h.node.style["v-text-align"]="left";h.bbx=F(h.W/2);break;case "end":h.node.style["v-text-align"]="right";h.bbx=-F(h.W/2);break;default:h.node.style["v-text-align"]="center";break}}};na=function(a,b){a.attrs=a.attrs||{};var c="linear",d=".5 .5";a.attrs.gradient=b;b=(b+s)[I](Va,function(i,j,k){c="radial";if(j&&k){j=z(j);k=z(k);D(j-0.5,2)+D(k-0.5,2)>0.25&&(k=x.sqrt(0.25-D(j-0.5,2))*((k>0.5)*2-1)+0.5);d=j+Q+k}return s}); -b=b[H](/\s*\-\s*/);if(c=="linear"){var f=b.shift();f=-z(f);if(isNaN(f))return null}var e=Oa(b);if(!e)return null;a=a.shape||a.node;b=a.getElementsByTagName(ba)[0]||M(ba);!b.parentNode&&a.appendChild(b);if(e[o]){b.on=true;b.method="none";b.color=e[0].color;b.color2=e[e[o]-1].color;a=[];for(var h=0,g=e[o];h')}}catch(Db){M=function(a){return C.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}za= -function(){var a=Pa[K](0,arguments),b=a.container,c=a.height,d=a.width,f=a.x;a=a.y;if(!b)throw new Error("VML container not found.");var e=new G,h=e.canvas=C.createElement("div"),g=h.style;f=f||0;a=a||0;d=d||512;c=c||342;d==+d&&(d+="px");c==+c&&(c+="px");e.width=1000;e.height=1000;e.coordsize=ka*1000+Q+ka*1000;e.coordorigin="0 0";e.span=C.createElement("span");e.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";h[w](e.span);g.cssText= -m.format("width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",d,c);if(b==1){C.body[w](h);g.left=f+"px";g.top=a+"px"}else b.firstChild?b.insertBefore(h,b.firstChild):b[w](h);Ba.call(e,e,m.fn);return e};G[p].clear=function(){this.canvas.innerHTML=s;this.span=C.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[w](this.span);this.bottom=this.top=null};G[p].remove= -function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=Ua(a);return true}}G[p].safari=/^Apple|^Google/.test(X.navigator.vendor)&&(!(X.navigator.userAgent.indexOf("Version/4.0")+1)||X.navigator.platform.slice(0,2)=="iP")?function(){var a=this.rect(-99,-99,this.width+99,this.height+99);X.setTimeout(function(){a.remove()})}:function(){};var eb=function(){if(C.addEventListener)return function(a,b,c,d){function f(e){if(e.touches)for(var h=0,g=e.touches.length;h1&&(a=Array[p].splice.call(arguments,0,arguments[o]));return new $(a)};G[p].setSize=cb;G[p].top=G[p].bottom=null;G[p].raphael=m;function fb(){return this.x+Q+this.y}t[p].resetScale=function(){if(this.removed)return this;this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};t[p].scale=function(a,b,c,d){if(this.removed)return this;if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:fb};b=b||a;!+b&&(b=a);var f,e,h=this.attrs;if(a!=0){var g=this.getBBox(), -i=g.x+g.width/2,j=g.y+g.height/2;f=a/this._.sx;e=b/this._.sy;c=+c||c==0?c:i;d=+d||d==0?d:j;g=~~(a/x.abs(a));var k=~~(b/x.abs(b)),n=this.node.style,r=c+(i-c)*f;j=d+(j-d)*e;switch(this.type){case "rect":case "image":var q=h.width*g*f,l=h.height*k*e;this.attr({height:l,r:h.r*Z(g*f,k*e),width:q,x:r-q/2,y:j-l/2});break;case "circle":case "ellipse":this.attr({rx:h.rx*g*f,ry:h.ry*k*e,r:h.r*Z(g*f,k*e),cx:r,cy:j});break;case "text":this.attr({x:r,y:j});break;case "path":i=La(h.path);for(var u=true,L=0,A=i[o];L< -A;L++){var y=i[L],J=oa.call(y[0]);if(!(J=="M"&&u)){u=false;if(J=="A"){y[i[L][o]-2]*=f;y[i[L][o]-1]*=e;y[1]*=g*f;y[2]*=k*e;y[5]=+!(g+k?!+y[5]:+y[5])}else if(J=="H"){J=1;for(var ea=y[o];J=i)return r;k=r}});function Da(a,b){return function(c, -d,f){c=ta(c);for(var e,h,g,i,j="",k={},n=0,r=0,q=c.length;rd){if(b&&!k.start){e=gb(e,h,g[1],g[2],g[3],g[4],g[5],g[6],d-n);j+=["C",e.start.x,e.start.y,e.m.x,e.m.y,e.x,e.y];if(f)return j;k.start=j;j=["M",e.x,e.y+"C",e.n.x,e.n.y,e.end.x,e.end.y,g[5],g[6]][R]();n+=i;e=+g[5];h=+g[6];continue}if(!a&&!b){e=gb(e,h,g[1],g[2],g[3],g[4],g[5],g[6],d-n);return{x:e.x,y:e.y,alpha:e.alpha}}}n+=i;e=+g[5];h=+g[6]}j+=g}k.end= -j;e=a?n:b?k:m.findDotsAtSegment(e,h,g[1],g[2],g[3],g[4],g[5],g[6],1);e.alpha&&(e={x:e.x,y:e.y,alpha:e.alpha});return e}}var Bb=T(function(a,b,c,d,f,e,h,g){for(var i={x:0,y:0},j=0,k=0;k<1.01;k+=0.01){var n=ma(a,b,c,d,f,e,h,g,k);k&&(j+=D(D(i.x-n.x,2)+D(i.y-n.y,2),0.5));i=n}return j}),hb=Da(1),ya=Da(),Ea=Da(0,1);t[p].getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return hb(this.attrs.path)}};t[p].getPointAtLength=function(a){if(this.type== -"path")return ya(this.attrs.path,a)};t[p].getSubpath=function(a,b){if(this.type=="path"){if(x.abs(this.getTotalLength()-b)<1.0E-6)return Ea(this.attrs.path,a).end;b=Ea(this.attrs.path,b,1);return a?Ea(b,a).end:b}};m.easing_formulas={linear:function(a){return a},"<":function(a){return D(a,3)},">":function(a){return D(a-1,3)+1},"<>":function(a){a*=2;if(a<1)return D(a,3)/2;a-=2;return(D(a,3)+2)/2},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a* -a*((b+1)*a+b)+1},elastic:function(a){if(a==0||a==1)return a;var b=0.3,c=b/4;return D(2,-10*a)*x.sin((a-c)*2*x.PI/b)+1},bounce:function(a){var b=7.5625,c=2.75;if(a<1/c)a=b*a*a;else if(a<2/c){a-=1.5/c;a=b*a*a+0.75}else if(a<2.5/c){a-=2.25/c;a=b*a*a+0.9375}else{a-=2.625/c;a=b*a*a+0.984375}return a}};var S={length:0};function ib(){var a=+new Date;for(var b in S)if(b!="length"&&S[B](b)){var c=S[b];if(c.stop||c.el.removed){delete S[b];S[o]--}else{var d=a-c.start,f=c.ms,e=c.easing,h=c.from,g=c.diff,i=c.to, -j=c.t,k=c.prev||0,n=c.el,r=c.callback,q={},l;if(d

";if(ap.childNodes[o]!=2){return az.type=null;}ap=null;}az.svg=!(az.vml=az.type=="VML");bf[bk]=az[bk];az._id=0;az._oid=0;az.fn={};az.is=function(e,d){d=bm.call(d);return(d=="object"&&e===Object(e))||(d=="undefined"&&typeof e==d)||(d=="null"&&e==null)||bm.call(aJ.call(e).slice(8,-1))==d;};az.setWindow=function(d){aG=d;V=aG.document;};var aV=function(e){if(az.vml){var d=/^\s+|\s+$/g;aV=at(function(R){var S;R=(R+aF)[ba](d,aF);try{var bn=new aG.ActiveXObject("htmlfile");bn.write("");bn.close();S=bn.body;}catch(bp){S=aG.createPopup().document.body;}var i=S.createTextRange();try{S.style.color=R;var bo=i.queryCommandValue("ForeColor");bo=((bo&255)<<16)|(bo&65280)|((bo&16711680)>>>16);return"#"+("000000"+bo[aO](16)).slice(-6);}catch(bp){return"none";}});}else{var E=V.createElement("i");E.title="Rapha\xebl Colour Picker";E.style.display="none";V.body[a4](E);aV=at(function(i){E.style.color=i;return V.defaultView.getComputedStyle(E,aF).getPropertyValue("color");});}return aV(e);};var au=function(){return"hsb("+[this.h,this.s,this.b]+")";},y=function(){return this.hex;};az.hsb2rgb=at(function(bq,bo,bu){if(az.is(bq,"object")&&"h" in bq&&"s" in bq&&"b" in bq){bu=bq.b;bo=bq.s;bq=bq.h;}var R,S,bv;if(bu==0){return{r:0,g:0,b:0,hex:"#000"};}if(bq>1||bo>1||bu>1){bq/=255;bo/=255;bu/=255;}var bn=~~(bq*6),br=(bq*6)-bn,E=bu*(1-bo),e=bu*(1-(bo*br)),bw=bu*(1-(bo*(1-br)));R=[bu,e,E,E,bw,bu,bu][bn];S=[bw,bu,bu,e,E,E,bw][bn];bv=[E,E,bw,bu,bu,e,E][bn];R*=255;S*=255;bv*=255;var bs={r:R,g:S,b:bv,toString:y},d=(~~R)[aO](16),bp=(~~S)[aO](16),bt=(~~bv)[aO](16);d=d[ba](bg,"0");bp=bp[ba](bg,"0");bt=bt[ba](bg,"0");bs.hex="#"+d+bp+bt;return bs;},az);az.rgb2hsb=at(function(d,e,bo){if(az.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){bo=d.b;e=d.g;d=d.r;}if(az.is(d,aa)){var bq=az.getRGB(d);d=bq.r;e=bq.g;bo=bq.b;}if(d>1||e>1||bo>1){d/=255;e/=255;bo/=255;}var bn=h(d,e,bo),i=a2(d,e,bo),R,E,S=bn;if(i==bn){return{h:0,s:0,b:bn};}else{var bp=(bn-i);E=bp/bn;if(d==bn){R=(e-bo)/bp;}else{if(e==bn){R=2+((bo-d)/bp);}else{R=4+((d-e)/bp);}}R/=6;R<0&&R++;R>1&&R--;}return{h:R,s:E,b:S,toString:au};},az);var aW=/,?([achlmqrstvxz]),?/gi,aY=/\s*,\s*/,j={hs:1,rg:1};az._path2string=function(){return this.join(",")[ba](aW,"$1");};function at(E,e,d){function i(){var R=Array[bk].slice.call(arguments,0),bn=R[aM]("\u25ba"),S=i.cache=i.cache||{},bo=i.count=i.count||[];if(S[ab](bn)){return d?d(S[bn]):S[bn];}bo[o]>=1000&&delete S[bo.shift()];bo[f](bn);S[bn]=E[bi](e,R);return d?d(S[bn]):S[bn];}return i;}az.getRGB=at(function(e){if(!e||!!((e=e+aF).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1};}if(e=="none"){return{r:-1,g:-1,b:-1,hex:"none"};}!(j[ab](e.substring(0,2))||e.charAt()=="#")&&(e=aV(e));var bn,i,E,bq,S,br,bo=e.match(C);if(bo){if(bo[2]){bq=N(bo[2].substring(5),16);E=N(bo[2].substring(3,5),16);i=N(bo[2].substring(1,3),16);}if(bo[3]){bq=N((br=bo[3].charAt(3))+br,16);E=N((br=bo[3].charAt(2))+br,16);i=N((br=bo[3].charAt(1))+br,16);}if(bo[4]){bo=bo[4][F](aY);i=ae(bo[0]);E=ae(bo[1]);bq=ae(bo[2]);S=ae(bo[3]);}if(bo[5]){bo=bo[5][F](aY);i=ae(bo[0])*2.55;E=ae(bo[1])*2.55;bq=ae(bo[2])*2.55;S=ae(bo[3]);}if(bo[6]){bo=bo[6][F](aY);i=ae(bo[0]);E=ae(bo[1]);bq=ae(bo[2]);return az.hsb2rgb(i,E,bq);}if(bo[7]){bo=bo[7][F](aY);i=ae(bo[0])*2.55;E=ae(bo[1])*2.55;bq=ae(bo[2])*2.55;return az.hsb2rgb(i,E,bq);}bo={r:i,g:E,b:bq};var d=(~~i)[aO](16),R=(~~E)[aO](16),bp=(~~bq)[aO](16);d=d[ba](bg,"0");R=R[ba](bg,"0");bp=bp[ba](bg,"0");bo.hex="#"+d+R+bp;isFinite(ae(S))&&(bo.o=S);return bo;}return{r:-1,g:-1,b:-1,hex:"none",error:1};},az);az.getColor=function(e){var i=this.getColor.start=this.getColor.start||{h:0,s:1,b:e||.75},d=this.hsb2rgb(i.h,i.s,i.b);i.h+=.075;if(i.h>1){i.h=0;i.s-=.2;i.s<=0&&(this.getColor.start={h:0,s:1,b:i.b});}return d.hex;};az.getColor.reset=function(){delete this.start;};var aH=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,ax=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig;az.parsePathString=at(function(d){if(!d){return null;}var i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=[];if(az.is(d,aU)&&az.is(d[0],aU)){e=aI(d);}if(!e[o]){(d+aF)[ba](aH,function(R,E,bo){var bn=[],S=bm.call(E);bo[ba](ax,function(bq,bp){bp&&bn[f](+bp);});if(S=="m"&&bn[o]>2){e[f]([E][bd](bn.splice(0,2)));S="l";E=E=="m"?"l":"L";}while(bn[o]>=i[S]){e[f]([E][bd](bn.splice(0,i[S])));if(!i[S]){break;}}});}e[aO]=az._path2string;return e;});az.findDotsAtSegment=function(e,d,bB,bz,bn,R,bp,bo,bv){var bt=1-bv,bs=a5(bt,3)*e+a5(bt,2)*3*bv*bB+bt*3*bv*bv*bn+a5(bv,3)*bp,bq=a5(bt,3)*d+a5(bt,2)*3*bv*bz+bt*3*bv*bv*R+a5(bv,3)*bo,bx=e+2*bv*(bB-e)+bv*bv*(bn-2*bB+e),bw=d+2*bv*(bz-d)+bv*bv*(R-2*bz+d),bA=bB+2*bv*(bn-bB)+bv*bv*(bp-2*bn+bB),by=bz+2*bv*(R-bz)+bv*bv*(bo-2*R+bz),bu=(1-bv)*e+bv*bB,br=(1-bv)*d+bv*bz,E=(1-bv)*bn+bv*bp,i=(1-bv)*R+bv*bo,S=(90-aj.atan((bx-bA)/(bw-by))*180/aj.PI);(bx>bA||bw1){bV=aj.sqrt(bV);bF=bV*bF;bD=bV*bD;}var E=bF*bF,bO=bD*bD,bQ=(br==S?-1:1)*aj.sqrt(aj.abs((E*bO-E*bK*bK-bO*bL*bL)/(E*bK*bK+bO*bL*bL))),bA=bQ*bF*bK/bD+(bw+bv)/2,bz=bQ*-bD*bL/bF+(b1+b0)/2,bq=aj.asin(((b1-bz)/bD).toFixed(7)),bp=aj.asin(((b0-bz)/bD).toFixed(7));bq=bwbp){bq=bq-R*2;}if(!S&&bp>bq){bp=bp-R*2;}}else{bq=by[0];bp=by[1];bA=by[2];bz=by[3];}var bu=bp-bq;if(aj.abs(bu)>bC){var bB=bp,bE=bv,bs=b0;bp=bq+bC*(S&&bp>bq?1:-1);bv=bA+bF*aj.cos(bp);b0=bz+bD*aj.sin(bp);bJ=U(bv,b0,bF,bD,bx,0,S,bE,bs,[bp,bB,bA,bz]);}bu=bp-bq;var bo=aj.cos(bq),bZ=aj.sin(bq),bn=aj.cos(bp),bY=aj.sin(bp),bM=aj.tan(bu/4),bP=4/3*bF*bM,bN=4/3*bD*bM,bW=[bw,b1],bU=[bw+bP*bZ,b1-bN*bo],bT=[bv+bP*bY,b0-bN*bn],bR=[bv,b0];bU[0]=2*bW[0]-bU[0];bU[1]=2*bW[1]-bU[1];if(by){return[bU,bT,bR][bd](bJ);}else{bJ=[bU,bT,bR][bd](bJ)[aM]()[F](",");var bH=[];for(var bS=0,bI=bJ[o];bS1e12&&(bn=.5);aj.abs(S)>1e12&&(S=.5);if(bn>0&&bn<1){e=X(i,d,R,E,bw,bv,bs,bp,bn);bt[f](e.x);bq[f](e.y);}if(S>0&&S<1){e=X(i,d,R,E,bw,bv,bs,bp,S);bt[f](e.x);bq[f](e.y);}bu=(bv-2*E+d)-(bp-2*bv+E);br=2*(E-d)-2*(bv-E);bo=d-E;bn=(-br+aj.sqrt(br*br-4*bu*bo))/2/bu;S=(-br-aj.sqrt(br*br-4*bu*bo))/2/bu;aj.abs(bn)>1e12&&(bn=.5);aj.abs(S)>1e12&&(S=.5);if(bn>0&&bn<1){e=X(i,d,R,E,bw,bv,bs,bp,bn);bt[f](e.x);bq[f](e.y);}if(S>0&&S<1){e=X(i,d,R,E,bw,bv,bs,bp,S);bt[f](e.x);bq[f](e.y);}return{min:{x:a2[bi](0,bt),y:a2[bi](0,bq)},max:{x:h[bi](0,bt),y:h[bi](0,bq)}};}),O=at(function(bw,br){var R=v(bw),bs=br&&v(br),bt={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},d={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},bn=function(bx,by){var i,bz;if(!bx){return["C",by.x,by.y,by.x,by.y,by.x,by.y];}!(bx[0] in {T:1,Q:1})&&(by.qx=by.qy=null);switch(bx[0]){case"M":by.X=bx[1];by.Y=bx[2];break;case"A":bx=["C"][bd](U[bi](0,[by.x,by.y][bd](bx.slice(1))));break;case"S":i=by.x+(by.x-(by.bx||by.x));bz=by.y+(by.y-(by.by||by.y));bx=["C",i,bz][bd](bx.slice(1));break;case"T":by.qx=by.x+(by.x-(by.qx||by.x));by.qy=by.y+(by.y-(by.qy||by.y));bx=["C"][bd](a3(by.x,by.y,by.qx,by.qy,bx[1],bx[2]));break;case"Q":by.qx=bx[1];by.qy=bx[2];bx=["C"][bd](a3(by.x,by.y,bx[1],bx[2],bx[3],bx[4]));break;case"L":bx=["C"][bd](bj(by.x,by.y,bx[1],bx[2]));break;case"H":bx=["C"][bd](bj(by.x,by.y,bx[1],by.y));break;case"V":bx=["C"][bd](bj(by.x,by.y,by.x,bx[1]));break;case"Z":bx=["C"][bd](bj(by.x,by.y,by.X,by.Y));break;}return bx;},e=function(bx,by){if(bx[by][o]>7){bx[by].shift();var bz=bx[by];while(bz[o]){bx.splice(by++,0,["C"][bd](bz.splice(0,6)));}bx.splice(by,1);bu=h(R[o],bs&&bs[o]||0);}},E=function(bB,bA,by,bx,bz){if(bB&&bA&&bB[bz][0]=="M"&&bA[bz][0]!="M"){bA.splice(bz,0,["M",bx.x,bx.y]);by.bx=0;by.by=0;by.x=bB[bz][1];by.y=bB[bz][2];bu=h(R[o],bs&&bs[o]||0);}};for(var bp=0,bu=h(R[o],bs&&bs[o]||0);bp.5)*2-1);a5(bp-.5,2)+a5(bn-.5,2)>.25&&(bn=aj.sqrt(.25-a5(bp-.5,2))*by+.5)&&bn!=.5&&(bn=bn.toFixed(5)-1e-5*by);}return aF;});bv=bv[F](/\s*\-\s*/);if(bs=="linear"){var bo=bv.shift();bo=-ae(bo);if(isNaN(bo)){return null;}var S=[0,0,aj.cos(bo*aj.PI/180),aj.sin(bo*aj.PI/180)],bu=1/(h(aj.abs(S[2]),aj.abs(S[3]))||1);S[2]*=bu;S[3]*=bu;if(S[2]<0){S[0]=-S[2];S[2]=0;}if(S[3]<0){S[1]=-S[3];S[3]=0;}}var br=t(bv);if(!br){return null;}var e=R.getAttribute(aR);e=e.match(/^url\(#(.*)\)$/);e&&d.defs.removeChild(V.getElementById(e[1]));var E=a1(bs+"Gradient");E.id="r"+(az._id++)[aO](36);a1(E,bs=="radial"?{fx:bp,fy:bn}:{x1:S[0],y1:S[1],x2:S[2],y2:S[3]});d.defs[a4](E);for(var bq=0,bw=br[o];bqbo.height)&&(bo.height=bn.y+bn.height-bo.y);(bn.x+bn.width-bo.x>bo.width)&&(bo.width=bn.x+bn.width-bo.x);}}E&&this.hide();return bo;};aK[bk].attr=function(E,bo){if(this.removed){return this;}if(E==null){var S={};for(var R in this.attrs){if(this.attrs[ab](R)){S[R]=this.attrs[R];}}this._.rt.deg&&(S.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(S.scale=this.scale());S.gradient&&S.fill=="none"&&(S.fill=S.gradient)&&delete S.gradient;return S;}if(bo==null&&az.is(E,aa)){if(E=="translation"){return x.call(this);}if(E=="rotation"){return this.rotate();}if(E=="scale"){return this.scale();}if(E==aR&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient;}return this.attrs[E];}if(bo==null&&az.is(E,aU)){var d={};for(var e=0,bn=E.length;e1&&(e=1);bv.opacity=e;}bx.fill&&(bv.on=true);if(bv.on==null||bx.fill=="none"){bv.on=false;}if(bv.on&&bx.fill){var i=bx.fill.match(c);if(i){bv.src=i[1];bv.type="tile";}else{bv.color=az.getRGB(bx.fill).hex;bv.src=aF;bv.type="solid";if(az.getRGB(bx.fill).error&&(bC.type in {circle:1,ellipse:1}||(bx.fill+aF).charAt()!="r")&&b(bC,bx.fill)){by.fill="none";by.gradient=bx.fill;}}}bz&&bu[a4](bv);var R=(bu.getElementsByTagName("stroke")&&bu.getElementsByTagName("stroke")[0]),bA=false;!R&&(bA=R=aq("stroke"));if((bx.stroke&&bx.stroke!="none")||bx["stroke-width"]||bx["stroke-opacity"]!=null||bx["stroke-dasharray"]||bx["stroke-miterlimit"]||bx["stroke-linejoin"]||bx["stroke-linecap"]){R.on=true;}(bx.stroke=="none"||R.on==null||bx.stroke==0||bx["stroke-width"]==0)&&(R.on=false);var bt=az.getRGB(bx.stroke);R.on&&bx.stroke&&(R.color=bt.hex);e=((+by["stroke-opacity"]+1||2)-1)*((+by.opacity+1||2)-1)*((+bt.o+1||2)-1);var br=(ae(bx["stroke-width"])||1)*.75;e<0&&(e=0);e>1&&(e=1);bx["stroke-width"]==null&&(br=by["stroke-width"]);bx["stroke-width"]&&(R.weight=br);br&&br<1&&(e*=br)&&(R.weight=1);R.opacity=e;bx["stroke-linejoin"]&&(R.joinstyle=bx["stroke-linejoin"]||"miter");R.miterlimit=bx["stroke-miterlimit"]||8;bx["stroke-linecap"]&&(R.endcap=bx["stroke-linecap"]=="butt"?"flat":bx["stroke-linecap"]=="square"?"square":"round");if(bx["stroke-dasharray"]){var bs={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};R.dashstyle=bs[ab](bx["stroke-dasharray"])?bs[bx["stroke-dasharray"]]:aF;}bA&&bu[a4](R);}if(bC.type=="text"){bn=bC.paper.span.style;by.font&&(bn.font=by.font);by["font-family"]&&(bn.fontFamily=by["font-family"]);by["font-size"]&&(bn.fontSize=by["font-size"]);by["font-weight"]&&(bn.fontWeight=by["font-weight"]);by["font-style"]&&(bn.fontStyle=by["font-style"]);bC.node.string&&(bC.paper.span.innerHTML=(bC.node.string+aF)[ba](/"));bC.W=by.w=bC.paper.span.offsetWidth;bC.H=by.h=bC.paper.span.offsetHeight;bC.X=by.x;bC.Y=by.y+Y(bC.H/2);switch(by["text-anchor"]){case"start":bC.node.style["v-text-align"]="left";bC.bbx=Y(bC.W/2);break;case"end":bC.node.style["v-text-align"]="right";bC.bbx=-Y(bC.W/2);break;default:bC.node.style["v-text-align"]="center";break;}}};b=function(d,bo){d.attrs=d.attrs||{};var bp=d.attrs,br,S="linear",bn=".5 .5";d.attrs.gradient=bo;bo=(bo+aF)[ba](aE,function(bt,bu,i){S="radial";if(bu&&i){bu=ae(bu);i=ae(i);a5(bu-.5,2)+a5(i-.5,2)>.25&&(i=aj.sqrt(.25-a5(bu-.5,2))*((i>.5)*2-1)+.5);bn=bu+ay+i;}return aF;});bo=bo[F](/\s*\-\s*/);if(S=="linear"){var e=bo.shift();e=-ae(e);if(isNaN(e)){return null;}}var R=t(bo);if(!R){return null;}d=d.shape||d.node;br=d.getElementsByTagName(aR)[0]||aq(aR);!br.parentNode&&d.appendChild(br);if(R[o]){br.on=true;br.method="none";br.color=R[0].color;br.color2=R[R[o]-1].color;var bs=[];for(var E=0,bq=R[o];E');};}catch(ao){aq=function(d){return V.createElement("<"+d+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">');};}B=function(){var i=aA[bi](0,arguments),d=i.container,bp=i.height,bq,e=i.width,bo=i.x,bn=i.y;if(!d){throw new Error("VML container not found.");}var R=new bf,S=R.canvas=V.createElement("div"),E=S.style;bo=bo||0;bn=bn||0;e=e||512;bp=bp||342;e==+e&&(e+="px");bp==+bp&&(bp+="px");R.width=1e3;R.height=1e3;R.coordsize=r*1e3+ay+r*1e3;R.coordorigin="0 0";R.span=V.createElement("span");R.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";S[a4](R.span);E.cssText=az.format("width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,bp);if(d==1){V.body[a4](S);E.left=bo+"px";E.top=bn+"px";E.position="absolute";}else{if(d.firstChild){d.insertBefore(S,d.firstChild);}else{d[a4](S);}}aZ.call(R,R,az.fn);return R;};bf[bk].clear=function(){this.canvas.innerHTML=aF;this.span=V.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[a4](this.span);this.bottom=this.top=null;};bf[bk].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var d in this){this[d]=w(d);}return true;};}if((/^Apple|^Google/).test(aG.navigator.vendor)&&(!(aG.navigator.userAgent.indexOf("Version/4.0")+1)||aG.navigator.platform.slice(0,2)=="iP")){bf[bk].safari=function(){var d=this.rect(-99,-99,this.width+99,this.height+99);aG.setTimeout(function(){d.remove();});};}else{bf[bk].safari=function(){};}var K=function(){this.returnValue=false;},aQ=function(){this.cancelBubble=true;},an=(function(){if(V.addEventListener){return function(R,i,e,d){var E=function(bp){if(P){for(var bn=0,bo=bp.targetTouches.length;bn1&&(d=Array[bk].splice.call(arguments,0,arguments[o]));return new ac(d);};bf[bk].setSize=bh;bf[bk].top=bf[bk].bottom=null;bf[bk].raphael=az;function z(){return this.x+ay+this.y;}aK[bk].resetScale=function(){if(this.removed){return this;}this._.sx=1;this._.sy=1;this.attrs.scale="1 1";};aK[bk].scale=function(bt,bs,E,e){if(this.removed){return this;}if(bt==null&&bs==null){return{x:this._.sx,y:this._.sy,toString:z};}bs=bs||bt;!+bs&&(bs=bt);var bx,bv,bw,bu,bJ=this.attrs;if(bt!=0){var br=this.getBBox(),bo=br.x+br.width/2,R=br.y+br.height/2,bI=bt/this._.sx,bH=bs/this._.sy;E=(+E||E==0)?E:bo;e=(+e||e==0)?e:R;var bq=~~(bt/aj.abs(bt)),bn=~~(bs/aj.abs(bs)),bA=this.node.style,bL=E+(bo-E)*bI,bK=e+(R-e)*bH;switch(this.type){case"rect":case"image":var bp=bJ.width*bq*bI,bz=bJ.height*bn*bH;this.attr({height:bz,r:bJ.r*a2(bq*bI,bn*bH),width:bp,x:bL-bp/2,y:bK-bz/2});break;case"circle":case"ellipse":this.attr({rx:bJ.rx*bq*bI,ry:bJ.ry*bn*bH,r:bJ.r*a2(bq*bI,bn*bH),cx:bL,cy:bK});break;case"text":this.attr({x:bL,y:bK});break;case"path":var bC=am(bJ.path),bD=true;for(var bF=0,by=bC[o];bF=R){return e;}S=e;}}),aP=function(d,e){return function(bw,S,bn){bw=O(bw);var bs,br,E,bo,R="",bv={},bt,bq=0;for(var bp=0,bu=bw.length;bpS){if(e&&!bv.start){bt=g(bs,br,E[1],E[2],E[3],E[4],E[5],E[6],S-bq);R+=["C",bt.start.x,bt.start.y,bt.m.x,bt.m.y,bt.x,bt.y];if(bn){return R;}bv.start=R;R=["M",bt.x,bt.y+"C",bt.n.x,bt.n.y,bt.end.x,bt.end.y,E[5],E[6]][aM]();bq+=bo;bs=+E[5];br=+E[6];continue;}if(!d&&!e){bt=g(bs,br,E[1],E[2],E[3],E[4],E[5],E[6],S-bq);return{x:bt.x,y:bt.y,alpha:bt.alpha};}}bq+=bo;bs=+E[5];br=+E[6];}R+=E;}bv.end=R;bt=d?bq:e?bv:az.findDotsAtSegment(bs,br,E[1],E[2],E[3],E[4],E[5],E[6],1);bt.alpha&&(bt={x:bt.x,y:bt.y,alpha:bt.alpha});return bt;};},q=at(function(E,d,bn,S,bt,bs,br,bq){var R={x:0,y:0},bp=0;for(var bo=0;bo<1.01;bo+=.01){var e=X(E,d,bn,S,bt,bs,br,bq,bo);bo&&(bp+=a5(a5(R.x-e.x,2)+a5(R.y-e.y,2),.5));R=e;}return bp;});var aB=aP(1),I=aP(),T=aP(0,1);aK[bk].getTotalLength=function(){if(this.type!="path"){return;}if(this.node.getTotalLength){return this.node.getTotalLength();}return aB(this.attrs.path);};aK[bk].getPointAtLength=function(d){if(this.type!="path"){return;}return I(this.attrs.path,d);};aK[bk].getSubpath=function(i,e){if(this.type!="path"){return;}if(aj.abs(this.getTotalLength()-e)<1e-6){return T(this.attrs.path,i).end;}var d=T(this.attrs.path,e,1);return i?T(d,i).end:d;};az.easing_formulas={linear:function(d){return d;},"<":function(d){return a5(d,3);},">":function(d){return a5(d-1,3)+1;},"<>":function(d){d=d*2;if(d<1){return a5(d,3)/2;}d-=2;return(a5(d,3)+2)/2;},backIn:function(e){var d=1.70158;return e*e*((d+1)*e-d);},backOut:function(e){e=e-1;var d=1.70158;return e*e*((d+1)*e+d)+1;},elastic:function(i){if(i==0||i==1){return i;}var e=.3,d=e/4;return a5(2,-10*i)*aj.sin((i-d)*(2*aj.PI)/e)+1;},bounce:function(E){var e=7.5625,i=2.75,d;if(E<(1/i)){d=e*E*E;}else{if(E<(2/i)){E-=(1.5/i);d=e*E*E+.75;}else{if(E<(2.5/i)){E-=(2.25/i);d=e*E*E+.9375;}else{E-=(2.625/i);d=e*E*E+.984375;}}}return d;}};var Q={length:0},bc=function(){var bp=+new Date;for(var bB in Q){if(bB!="length"&&Q[ab](bB)){var bG=Q[bB];if(bG.stop||bG.el.removed){delete Q[bB];Q[o]--;continue;}var bn=bp-bG.start,by=bG.ms,bx=bG.easing,bC=bG.from,bu=bG.diff,E=bG.to,bt=bG.t,bw=bG.prev||0,bo=bG.el,R=bG.callback,bv={},d;if(bn