(function(c){var u=/[\.\/]/,t=function(){},W=function(c,u){return c-u},E,M,Y={n:{}},A=function(c,u){var t=M,o=Array.prototype.slice.call(arguments,2),m=A.listeners(c),P=0,x,z=[],J={},X=[],G=E;E=c;for(var q=M=0,Q=m.length;qm[q].zIndex&&(J[m[q].zIndex]=m[q]));for(z.sort(W);0>z[P];)if(x=J[z[P++]],X.push(x.apply(u,o)),M)return M=t,X;for(q=0;qn;n+=2){var r=[{x:+a[n-2],y:+a[n-1]},{x:+a[n], y:+a[n+1]},{x:+a[n+2],y:+a[n+3]},{x:+a[n+4],y:+a[n+5]}];e?n?c-4==n?r[3]={x:+a[0],y:+a[1]}:c-2==n&&(r[2]={x:+a[0],y:+a[1]},r[3]={x:+a[2],y:+a[3]}):r[0]={x:+a[c-2],y:+a[c-1]}:c-4==n?r[3]=r[2]:n||(r[0]={x:+a[n],y:+a[n+1]});k.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return k}function M(a,e,k,n,c,r,b,d,f){null==f&&(f=1);for(var f=(1f?0:f)/2,i=[-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699, -0.9041,0.9041,-0.9816,0.9816],g=[0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],h=0,l=0;12>l;l++)var j=f*i[l]+f,p=j*(j*(-3*a+9*k-9*c+3*b)+6*a-12*k+6*c)-3*a+3*k,j=j*(j*(-3*e+9*n-9*r+3*d)+6*e-12*n+6*r)-3*e+3*n,h=h+g[l]*s.sqrt(p*p+j*j);return f*h}function Y(a,e,k,n,c,r,b,f,d){if(!(0>d||M(a,e,k,n,c,r,b,f)S(G.x-O.x)?"y":"x",J=0.001>S(x.x-q.x)?"y":"x",z;z=O.x;var I=O.y,V=G.x,K=G.y,N=q.x,P=q.y,Q=x.x,R=x.y;if(y(z,V)y(N,Q)||y(I,K)y(P,R))z=void 0;else{var W=(z*K-I*V)*(N-Q)-(z-V)*(N*R-P*Q),X=(z* K-I*V)*(P-R)-(I-K)*(N*R-P*Q),U=(z-V)*(P-R)-(I-K)*(N-Q);if(U){var W=W/U,X=X/U,U=+W.toFixed(2),Y=+X.toFixed(2);z=U<+C(z,V).toFixed(2)||U>+y(z,V).toFixed(2)||U<+C(N,Q).toFixed(2)||U>+y(N,Q).toFixed(2)||Y<+C(I,K).toFixed(2)||Y>+y(I,K).toFixed(2)||Y<+C(P,R).toFixed(2)||Y>+y(P,R).toFixed(2)?void 0:{x:W,y:X}}else z=void 0}z&&D[z.x.toFixed(4)]!=z.y.toFixed(4)&&(D[z.x.toFixed(4)]=z.y.toFixed(4),O=O.t+S((z[H]-O[H])/(G[H]-O[H]))*(G.t-O.t),q=q.t+S((z[J]-q[J])/(x[J]-q[J]))*(x.t-q.t),0<=O&&(1>=O&&0<=q&&1>=q)&& (w?E++:E.push({x:z.x,y:z.y,t1:O,t2:q})))}w=E}else w=w?0:[];if(k)l+=w;else{t=0;for(u=w.length;tn;n++){c=((i*r+d)*r+f)*r-a;if(S(c)< e)return r;k=(3*i*r+2*d)*r+f;if(1.0E-6>S(k))break;r-=c/k}k=0;n=1;r=a;if(rn)return n;for(;kc?k=r:n=r;r=(n-k)/2+k}return r}var f=3*e,d=3*(n-e)-f,i=1-f-d,g=3*k,h=3*(c-k)-g,j=1-g-h;return function(a,e){var k=b(a,e);return((j*k+h)*k+g)*k}(a,1/(200*r))}function o(a,e){var k=[],n={};this.ms=e;this.times=1;if(a){for(var c in a)a[G](c)&&(n[K(c)]=a[c],k.push(K(c)));k.sort(Wa)}this.anim=n;this.top=k[k.length-1];this.percents=k}function m(a,e,k,n,b, r){var k=K(k),d,g,h,j,s,v,p=a.ms,T={},y={},m={};if(n){v=0;for(B=H.length;vn*a.top){k=a.percents[v];s=a.percents[v-1]||0;p=p/a.top*(k-s);j=a.percents[v+1];d=a.anim[k];break}else n&&e.attr(a.anim[a.percents[v]]);if(d){if(g)g.initstatus=n,g.start=new Date-g.ms*n;else{for(var w in d)if(d[G](w)&&(ra[G](w)|| e.paper.customAttributes[G](w)))switch(T[w]=e.attr(w),null==T[w]&&(T[w]=Xa[w]),y[w]=d[w],ra[w]){case O:m[w]=(y[w]-T[w])/p;break;case "colour":T[w]=c.getRGB(T[w]);v=c.getRGB(y[w]);m[w]={r:(v.r-T[w].r)/p,g:(v.g-T[w].g)/p,b:(v.b-T[w].b)/p};break;case "path":v=ja(T[w],y[w]);o=v[1];T[w]=v[0];m[w]=[];v=0;for(B=T[w].length;v';ma=xa.firstChild;ma.style.behavior="url(#default#VML)";if(!(ma&&"object"==typeof ma.adj))return c.type="";xa=null}c.svg=!(c.vml="VML"==c.type);c._Paper=aa;c.fn=D=aa.prototype=c.prototype;c._id=0;c._oid=0;c.is=function(a,e){e=p.call(e);return"finite"==e?!cb[G](+a):"array"==e?a instanceof Array:"null"==e&&null===a||e==typeof a&&null!==a||"object"==e&&a===Object(a)||"array"==e&&Array.isArray&&Array.isArray(a)||ab.call(a).slice(8,-1).toLowerCase()== e};c.angle=function(a,e,k,n,b,r){return null==b?(a-=k,e-=n,!a&&!e?0:(180*s.atan2(-e,-a)/L+540)%360):c.angle(a,e,b,r)-c.angle(k,n,b,r)};c.rad=function(a){return a%360*L/180};c.deg=function(a){return 180*a/L%360};c.snapTo=function(a,e,k){k=c.is(k,"finite")?k:10;if(c.is(a,V))for(var n=a.length;n--;){if(S(a[n]-e)<=k)return a[n]}else{a=+a;n=e%a;if(na-k)return e-n+a}return e};c.createUUID=function(a,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,e).toUpperCase()}}(/[xy]/g, function(a){var e=16*s.random()|0;return("x"==a?e:e&3|8).toString(16)});c.setWindow=function(a){eve("raphael.setWindow",c,q.win,a);q.win=a;q.doc=q.win.document;c._engine.initWin&&c._engine.initWin(q.win)};var na=function(a){if(c.vml){var e=/^\s+|\s+$/g,k;try{var n=new ActiveXObject("htmlfile");n.write("");n.close();k=n.body}catch(b){k=createPopup().document.body}var r=k.createTextRange();na=t(function(a){try{k.style.color=f(a).replace(e,"");var n=r.queryCommandValue("ForeColor");return"#"+("000000"+ ((n&255)<<16|n&65280|(n&16711680)>>>16).toString(16)).slice(-6)}catch(c){return"none"}})}else{var d=q.doc.createElement("i");d.title="Rapha\u00ebl Colour Picker";d.style.display="none";q.doc.body.appendChild(d);na=t(function(a){d.style.color=a;return q.doc.defaultView.getComputedStyle(d,"").getPropertyValue("color")})}return na(a)},ib=function(){return"hsb("+[this.h,this.s,this.b]+")"},jb=function(){return"hsl("+[this.h,this.s,this.l]+")"},La=function(){return this.hex},Ma=function(a,e,k){null==e&& (c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a)&&(k=a.b,e=a.g,a=a.r);null==e&&c.is(a,"string")&&(k=c.getRGB(a),a=k.r,e=k.g,k=k.b);if(1k?k:1-k);e=b*(1-S(a%2-1));k=c=r=k-b/2;a=~~a;k+=[b,e,0,0,e,b][a];c+=[e,b,b,e,0,0][a];r+=[0,0,e,b,b,e][a];return Na(k,c,r,n)};c.rgb2hsb=function(a,e,k){var k=Ma(a,e,k),a=k[0],e=k[1],k=k[2],n,c;n=y(a,e,k);c=n-C(a,e,k);return{h:60*(((0==c?0:n==a?(e-k)/c:n==e?(k-a)/c+2:(a-e)/c+4)+360)%6)/360,s:0==c?0:c/n,b:n,toString:ib}};c.rgb2hsl=function(a, e,k){var k=Ma(a,e,k),a=k[0],e=k[1],k=k[2],n,c,r;c=y(a,e,k);n=C(a,e,k);r=c-n;n=(c+n)/2;return{h:60*(((0==r?0:c==a?(e-k)/r:c==e?(k-a)/r+2:(a-e)/r+4)+360)%6)/360,s:0==r?0:0.5>n?r/(2*n):r/(2-2*n),l:n,toString:jb}};c._path2string=function(){return this.join(",").replace(eb,"$1")};c._preload=function(a,e){var k=q.doc.createElement("img");k.style.cssText="position:absolute;left:-9999em;top:-9999em";k.onload=function(){e.call(this);this.onload=null;q.doc.body.removeChild(this)};k.onerror=function(){q.doc.body.removeChild(this)}; q.doc.body.appendChild(k);k.src=a};c.getRGB=t(function(a){if(!a||(a=f(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:W};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:W};!(db[G](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=na(a));var e,k,n,b,r;if(a=a.match(bb)){a[2]&&(n=da(a[2].substring(5),16),k=da(a[2].substring(3,5),16),e=da(a[2].substring(1,3),16));a[3]&&(n=da((r=a[3].charAt(3))+r,16),k=da((r=a[3].charAt(2))+r,16),e=da((r=a[3].charAt(1))+r,16));a[4]&&(r= a[4][i](ua),e=K(r[0]),"%"==r[0].slice(-1)&&(e*=2.55),k=K(r[1]),"%"==r[1].slice(-1)&&(k*=2.55),n=K(r[2]),"%"==r[2].slice(-1)&&(n*=2.55),"rgba"==a[1].toLowerCase().slice(0,4)&&(b=K(r[3])),r[3]&&"%"==r[3].slice(-1)&&(b/=100));if(a[5])return r=a[5][i](ua),e=K(r[0]),"%"==r[0].slice(-1)&&(e*=2.55),k=K(r[1]),"%"==r[1].slice(-1)&&(k*=2.55),n=K(r[2]),"%"==r[2].slice(-1)&&(n*=2.55),("deg"==r[0].slice(-3)||"\u00b0"==r[0].slice(-1))&&(e/=360),"hsba"==a[1].toLowerCase().slice(0,4)&&(b=K(r[3])),r[3]&&"%"==r[3].slice(-1)&& (b/=100),c.hsb2rgb(e,k,n,b);if(a[6])return r=a[6][i](ua),e=K(r[0]),"%"==r[0].slice(-1)&&(e*=2.55),k=K(r[1]),"%"==r[1].slice(-1)&&(k*=2.55),n=K(r[2]),"%"==r[2].slice(-1)&&(n*=2.55),("deg"==r[0].slice(-3)||"\u00b0"==r[0].slice(-1))&&(e/=360),"hsla"==a[1].toLowerCase().slice(0,4)&&(b=K(r[3])),r[3]&&"%"==r[3].slice(-1)&&(b/=100),c.hsl2rgb(e,k,n,b);a={r:e,g:k,b:n,toString:W};a.hex="#"+(16777216|n|k<<8|e<<16).toString(16).slice(1);c.is(b,"finite")&&(a.opacity=b);return a}return{r:-1,g:-1,b:-1,hex:"none", error:1,toString:W}},c);c.hsb=t(function(a,e,k){return c.hsb2rgb(a,e,k).hex});c.hsl=t(function(a,e,k){return c.hsl2rgb(a,e,k).hex});c.rgb=t(function(a,e,k){return"#"+(16777216|k|e<<8|a<<16).toString(16).slice(1)});c.getColor=function(a){var a=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75},e=this.hsb2rgb(a.h,a.s,a.b);a.h+=0.075;1=a.s&&(this.getColor.start={h:0,s:1,b:a.b}));return e.hex};c.getColor.reset=function(){delete this.start};c.parsePathString=function(a){if(!a)return null; var e=ea(a);if(e.arr)return $(e.arr);var k={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];c.is(a,V)&&c.is(a[0],V)&&(n=$(a));n.length||f(a).replace(fb,function(a,e,c){var b=[],a=e.toLowerCase();c.replace(Ja,function(a,e){e&&b.push(+e)});"m"==a&&2=k[a]&&!(n.push([e][l](b.splice(0,k[a]))),!k[a]););});n.toString=c._path2string;e.arr=$(n);return n};c.parseTransformString=t(function(a){if(!a)return null; var e=[];c.is(a,V)&&c.is(a[0],V)&&(e=$(a));e.length||f(a).replace(gb,function(a,n,c){var b=[];p.call(n);c.replace(Ja,function(a,e){e&&b.push(+e)});e.push([n][l](b))});e.toString=c._path2string;return e});var ea=function(a){var e=ea.ps=ea.ps||{};e[a]?e[a].sleep=100:e[a]={sleep:100};setTimeout(function(){for(var k in e)e[G](k)&&k!=a&&(e[k].sleep--,!e[k].sleep&&delete e[k])});return e[a]};c.findDotsAtSegment=function(a,e,k,n,c,b,d,f,i){var g=1-i,h=F(g,3),j=F(g,2),l=i*i,p=l*i,y=h*a+3*j*i*k+3*g*i*i*c+ p*d,h=h*e+3*j*i*n+3*g*i*i*b+p*f,j=a+2*i*(k-a)+l*(c-2*k+a),p=e+2*i*(n-e)+l*(b-2*n+e),m=k+2*i*(c-k)+l*(d-2*c+k),l=n+2*i*(b-n)+l*(f-2*b+n),a=g*a+i*k,e=g*e+i*n,c=g*c+i*d,b=g*b+i*f,f=90-180*s.atan2(j-m,p-l)/L;(j>m||p=a.x&&e<=a.x2&&k>=a.y&&k<=a.y2};c.isBBoxIntersect=function(a,e){var k=c.isPointInsideBBox;return k(e,a.x,a.y)||k(e,a.x2,a.y)||k(e,a.x,a.y2)||k(e,a.x2,a.y2)||k(a,e.x,e.y)||k(a,e.x2,e.y)||k(a,e.x,e.y2)||k(a,e.x2,e.y2)||(a.xe.x||e.xa.x)&&(a.ye.y||e.ya.y)};c.pathIntersection=function(a,e){return A(a,e)};c.pathIntersectionNumber=function(a,e){return A(a,e,1)};c.isPointInsidePath=function(a,e,k){var n=c.pathBBox(a);return c.isPointInsideBBox(n, e,k)&&1==A(a,[["M",e,k],["H",n.x2+10]],1)%2};c._removedFactory=function(a){return function(){eve("raphael.log",null,"Rapha\u00ebl: you are calling to method \u201c"+a+"\u201d of removed object",a)}};var ya=c.pathBBox=function(a){var e=ea(a);if(e.bbox)return e.bbox;if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var a=ja(a),k=0,n=0,c=[],b=[],f,i=0,g=a.length;iB&&(B=2*L+B);0>m&&(m=2*L+m);f&&B>m&&(B-=2*L);!f&&m>B&&(m-=2*L)}if(S(m-B)>j){var p=m,q=d,w=h;m=B+j*(f&&m>B?1:-1);d=c+k*s.cos(m);h=o+n*s.sin(m);p=Ra(d,h,k,n,b,0,f,q,w,[m,p,c,o])}c=m-B;b=s.cos(B);j=s.sin(B); f=s.cos(m);m=s.sin(m);c=s.tan(c/4);k=4/3*k*c;c*=4/3*n;n=[a,e];a=[a+k*j,e-c*b];e=[d+k*m,h-c*f];d=[d,h];a[0]=2*n[0]-a[0];a[1]=2*n[1]-a[1];if(g)return[a,e,d][l](p);p=[a,e,d][l](p).join()[i](",");g=[];d=0;for(h=p.length;dl&&(l=oa(a,e,k,n,b,c,f,i,l),m.push(l.x),p.push(l.y));0h&&(l=oa(a,e,k,n,b,c,f,i,h),m.push(l.x),p.push(l.y));h=c-2*n+e-(i-2*c+n);g=2*(n-e)-2*(c-n);j=e-n;l=(-g+s.sqrt(g*g-4*h*j))/2/h;h=(-g-s.sqrt(g*g-4*h*j))/2/h;"1e12"l&&(l=oa(a,e,k,n,b,c,f,i,l),m.push(l.x),p.push(l.y));0h&&(l=oa(a,e,k,n,b,c,f,i,h),m.push(l.x),p.push(l.y));return{min:{x:C[d](0, m),y:C[d](0,p)},max:{x:y[d](0,m),y:y[d](0,p)}}}),ja=c._path2curve=t(function(a,e){var k=!e&&ea(a);if(!e&&k.curve)return $(k.curve);var n=Pa(a),b=e&&Pa(e),c={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},f={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i=function(a,e){var k,b;if(!a)return["C",e.x,e.y,e.x,e.y,e.x,e.y];!(a[0]in{T:1,Q:1})&&(e.qx=e.qy=null);switch(a[0]){case "M":e.X=a[1];e.Y=a[2];break;case "A":a=["C"][l](Ra[d](0,[e.x,e.y][l](a.slice(1))));break;case "S":k=e.x+(e.x-(e.bx||e.x));b=e.y+(e.y-(e.by|| e.y));a=["C",k,b][l](a.slice(1));break;case "T":e.qx=e.x+(e.x-(e.qx||e.x));e.qy=e.y+(e.y-(e.qy||e.y));a=["C"][l](Qa(e.x,e.y,e.qx,e.qy,a[1],a[2]));break;case "Q":e.qx=a[1];e.qy=a[2];a=["C"][l](Qa(e.x,e.y,a[1],a[2],a[3],a[4]));break;case "L":a=["C"][l]([e.x,e.y,a[1],a[2],a[1],a[2]]);break;case "H":a=["C"][l]([e.x,e.y,a[1],e.y,a[1],e.y]);break;case "V":a=["C"][l]([e.x,e.y,e.x,a[1],e.x,a[1]]);break;case "Z":a=["C"][l]([e.x,e.y,e.X,e.Y,e.X,e.Y])}return a},h=function(a,e){if(7a;a++)for(k=0;3>k;k++){for(b=c=0;3>b;b++)c+=i[a][b]*e[b][k];d[a][k]=c}this.a=d[0][0];this.b=d[1][0];this.c=d[0][1];this.d=d[1][1];this.e=d[0][2];this.f=d[1][2]};a.invert=function(){var a=this.a*this.d-this.b*this.c;return new R(this.d/a,-this.b/a,-this.c/a,this.a/a,(this.c*this.f- this.d*this.e)/a,(this.b*this.e-this.a*this.f)/a)};a.clone=function(){return new R(this.a,this.b,this.c,this.d,this.e,this.f)};a.translate=function(a,e){this.add(1,0,0,1,a,e)};a.scale=function(a,e,k,b){null==e&&(e=a);(k||b)&&this.add(1,0,0,1,k,b);this.add(a,0,0,e,0,0);(k||b)&&this.add(1,0,0,1,-k,-b)};a.rotate=function(a,e,k){var a=c.rad(a),e=e||0,k=k||0,b=+s.cos(a).toFixed(9),a=+s.sin(a).toFixed(9);this.add(b,a,-a,b,e,k);this.add(1,0,0,1,-e,-k)};a.x=function(a,e){return a*this.a+e*this.c+this.e}; a.y=function(a,e){return a*this.b+e*this.d+this.f};a.get=function(a){return+this[f.fromCharCode(97+a)].toFixed(4)};a.toString=function(){return c.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()};a.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')"}; a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]};a.split=function(){var a={};a.dx=this.e;a.dy=this.f;var b=[[this.a,this.c],[this.b,this.d]];a.scalex=s.sqrt(e(b[0]));k(b[0]);a.shear=b[0][0]*b[1][0]+b[0][1]*b[1][1];b[1]=[b[1][0]-b[0][0]*a.shear,b[1][1]-b[0][1]*a.shear];a.scaley=s.sqrt(e(b[1]));k(b[1]);a.shear/=a.scaley;var f=-b[0][1],b=b[1][1];0>b?(a.rotate=c.deg(s.acos(b)),0>f&&(a.rotate=360-a.rotate)):a.rotate=c.deg(s.asin(f));a.isSimple=!+a.shear.toFixed(9)&&(a.scalex.toFixed(9)== a.scaley.toFixed(9)||!a.rotate);a.isSuperSimple=!+a.shear.toFixed(9)&&a.scalex.toFixed(9)==a.scaley.toFixed(9)&&!a.rotate;a.noRotation=!+a.shear.toFixed(9)&&!a.rotate;return a};a.toTransformString=function(a){a=a||this[i]();return a.isSimple?(a.scalex=+a.scalex.toFixed(4),a.scaley=+a.scaley.toFixed(4),a.rotate=+a.rotate.toFixed(4),(a.dx||a.dy?"t"+[a.dx,a.dy]:"")+(1!=a.scalex||1!=a.scaley?"s"+[a.scalex,a.scaley,0,0]:"")+(a.rotate?"r"+[a.rotate,0,0]:"")):"m"+[this.get(0),this.get(1),this.get(2),this.get(3), this.get(4),this.get(5)]}})(R.prototype);var qa=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);D.safari="Apple Computer, Inc."==navigator.vendor&&(qa&&4>qa[1]||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&qa&&8>qa[1]?function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:hb;for(var mb=function(){this.returnValue=!1},nb=function(){return this.originalEvent.preventDefault()}, ob=function(){this.cancelBubble=!0},pb=function(){return this.originalEvent.stopPropagation()},qb=function(){if(q.doc.addEventListener)return function(a,e,b,c){var f=j&&h[e]?h[e]:e,d=function(f){var d=f.clientX+(q.doc.documentElement.scrollLeft||q.doc.body.scrollLeft),i=f.clientY+(q.doc.documentElement.scrollTop||q.doc.body.scrollTop);if(j&&h[G](e))for(var g=0,r=f.targetTouches&&f.targetTouches.length;gf){if(e&&!l.start){i=Ba(i,h,g[1],g[2],g[3],g[4],g[5],g[6],f-m);p+=["C"+i.start.x,i.start.y,i.m.x,i.m.y,i.x,i.y];if(d)return p;l.start=p;p=["M"+i.x,i.y+"C"+i.n.x,i.n.y,i.end.x,i.end.y,g[5],g[6]].join(); m+=j;i=+g[5];h=+g[6];continue}if(!a&&!e)return i=Ba(i,h,g[1],g[2],g[3],g[4],g[5],g[6],f-m),{x:i.x,y:i.y,alpha:i.alpha}}m+=j;i=+g[5];h=+g[6]}p+=g.shift()+g}l.end=p;i=a?m:e?l:c.findDotsAtSegment(i,h,g[0],g[1],g[2],g[3],g[4],g[5],1);i.alpha&&(i={x:i.x,y:i.y,alpha:i.alpha});return i}},Ua=Ca(1),Va=Ca(),Da=Ca(0,1);c.getTotalLength=Ua;c.getPointAtLength=Va;c.getSubpath=function(a,e,b){if(1.0E-6>this.getTotalLength(a)-b)return Da(a,e).end;a=Da(a,b,1);return e?Da(a,e).end:a};I.getTotalLength=function(){if("path"== this.type)return this.node.getTotalLength?this.node.getTotalLength():Ua(this.attrs.path)};I.getPointAtLength=function(a){if("path"==this.type)return Va(this.attrs.path,a)};I.getSubpath=function(a,e){if("path"==this.type)return c.getSubpath(this.attrs.path,a,e)};var Z=c.easing_formulas={linear:function(a){return a},"<":function(a){return F(a,1.7)},">":function(a){return F(a,0.48)},"<>":function(a){var e=0.48-a/1.04,b=s.sqrt(0.1734+e*e),a=b-e,a=F(S(a),1/3)*(0>a?-1:1),e=-b-e,e=F(S(e),1/3)*(0>e?-1:1), a=a+e+0.5;return 3*(1-a)*a*a+a*a*a},backIn:function(a){return a*a*(2.70158*a-1.70158)},backOut:function(a){a-=1;return a*a*(2.70158*a+1.70158)+1},elastic:function(a){return a==!!a?a:F(2,-10*a)*s.sin((a-0.075)*2*L/0.3)+1},bounce:function(a){a<1/2.75?a*=7.5625*a:a<2/2.75?(a-=1.5/2.75,a=7.5625*a*a+0.75):a<2.5/2.75?(a-=2.25/2.75,a=7.5625*a*a+0.9375):(a-=2.625/2.75,a=7.5625*a*a+0.984375);return a}};Z.easeIn=Z["ease-in"]=Z["<"];Z.easeOut=Z["ease-out"]=Z[">"];Z.easeInOut=Z["ease-in-out"]=Z["<>"];Z["back-in"]= Z.backIn;Z["back-out"]=Z.backOut;var H=[],Ha=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},sa=function(){for(var a=+new Date,e=0;ed))if(da?0:a};I.animateWith= function(a,e,b,f,d,i){if(this.removed)return i&&i.call(this),this;b=b instanceof o?b:c.animation(b,f,d,i);m(b,this,b.percents[0],null,this.attr());b=0;for(f=H.length;ba?y(this.length+a,0):a,b=y(0,C(this.length-a,b)),c=[],d=[],i=[],g;for(g=2;go[2]&&(o[0]=-o[2],o[2]=0);0>o[3]&&(o[1]=-o[3],o[3]=0)}var q=c._parseDots(l);if(!q)return null;b=b.replace(/[\(\)\s,\xb0#]/g,"_");d.gradient&&b!=d.gradient.id&&(h.defs.removeChild(d.gradient),delete d.gradient);if(!d.gradient){s=m(j+"Gradient",{id:b});d.gradient=s; m(s,"radial"==j?{fx:f,fy:i}:{x1:o[0],y1:o[1],x2:o[2],y2:o[3],gradientTransform:d.matrix.invert()});h.defs.appendChild(s);h=0;for(o=q.length;hc*d?-1:1);j&&(h=X(j,g,h),g=h.dx,h=h.dy);0>c&&(u+="x");0>d&&(u+=" y")&&(t=-1);q.flip=u;b.coordorigin=g*-x+" "+h*-z;if(o||l.fillsize)g=(g=b.getElementsByTagName("fill"))&&g[0],b.removeChild(g),o&&(h=X(j,m.x(o[0],o[1]),m.y(o[0],o[1])),g.position=h.dx*t+" "+h.dy*t),l.fillsize&&(g.size=l.fillsize[0]*A(c)+" "+l.fillsize[1]*A(d)),b.appendChild(g);q.visibility="visible"}};c.toString=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\u00ebl "+ this.version};var q=function(b,c,d){for(var c=u(c).toLowerCase().split("-"),d=d?"end":"start",g=c.length,h="classic",j="medium",l="medium";g--;)switch(c[g]){case "block":case "classic":case "oval":case "diamond":case "open":case "none":h=c[g];break;case "wide":case "narrow":l=c[g];break;case "long":case "short":j=c[g]}b=b.node.getElementsByTagName("stroke")[0];b[d+"arrow"]=h;b[d+"arrowlength"]=j;b[d+"arrowwidth"]=l},Q=function(b,f){b.attrs=b.attrs||{};var i=b.node,g=b.attrs,h=i.style,j=x[b.type]&& (f.x!=g.x||f.y!=g.y||f.width!=g.width||f.height!=g.height||f.cx!=g.cx||f.cy!=g.cy||f.rx!=g.rx||f.ry!=g.ry||f.r!=g.r),l=z[b.type]&&(g.cx!=f.cx||g.cy!=f.cy||g.r!=f.r||g.rx!=f.rx||g.ry!=f.ry),m;for(m in f)f.hasOwnProperty(m)&&(g[m]=f[m]);j&&(g.path=c._getPath[b.type](b),b._.dirty=1);f.href&&(i.href=f.href);f.title&&(i.title=f.title);f.target&&(i.target=f.target);f.cursor&&(h.cursor=f.cursor);"blur"in f&&b.blur(f.blur);if(f.path&&"path"==b.type||j)i.path=J(~u(g.path).toLowerCase().indexOf("r")?c._pathToAbsolute(g.path): g.path),"image"==b.type&&(b._.fillpos=[g.x,g.y],b._.fillsize=[g.width,g.height],G(b,1,1,0,0,0));"transform"in f&&b.transform(f.transform);l&&(h=+g.cx,j=+g.cy,l=+g.rx||+g.r||0,m=+g.ry||+g.r||0,i.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",E(21600*(h-l)),E(21600*(j-m)),E(21600*(h+l)),E(21600*(j+m)),E(21600*h)));if("clip-rect"in f&&(h=u(f["clip-rect"]).split(R),4==h.length&&(h[2]=+h[2]+ +h[0],h[3]=+h[3]+ +h[1],j=i.clipRect||c._g.doc.createElement("div"),l=j.style,l.clip=c.format("rect({1}px {2}px {3}px {0}px)", h),i.clipRect||(l.position="absolute",l.top=0,l.left=0,l.width=b.paper.width+"px",l.height=b.paper.height+"px",i.parentNode.insertBefore(j,i),j.appendChild(i),i.clipRect=j)),!f["clip-rect"]))i.clipRect&&(i.clipRect.style.clip="auto");b.textpath&&(h=b.textpath.style,f.font&&(h.font=f.font),f["font-family"]&&(h.fontFamily='"'+f["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,"")+'"'),f["font-size"]&&(h.fontSize=f["font-size"]),f["font-weight"]&&(h.fontWeight=f["font-weight"]),f["font-style"]&& (h.fontStyle=f["font-style"]));"arrow-start"in f&&q(b,f["arrow-start"]);"arrow-end"in f&&q(b,f["arrow-end"],1);if(null!=f.opacity||null!=f["stroke-width"]||null!=f.fill||null!=f.src||null!=f.stroke||null!=f["stroke-width"]||null!=f["stroke-opacity"]||null!=f["fill-opacity"]||null!=f["stroke-dasharray"]||null!=f["stroke-miterlimit"]||null!=f["stroke-linejoin"]||null!=f["stroke-linecap"]){h=(h=i.getElementsByTagName("fill"))&&h[0];!h&&(h=d("fill"));"image"==b.type&&f.src&&(h.src=f.src);f.fill&&(h.on= !0);if(null==h.on||"none"==f.fill||null===f.fill)h.on=!1;if(h.on&&f.fill)if(j=u(f.fill).match(c._ISURL))h.parentNode==i&&i.removeChild(h),h.rotate=!0,h.src=j[1],h.type="tile",l=b.getBBox(1),h.position=l.x+" "+l.y,b._.fillpos=[l.x,l.y],c._preload(j[1],function(){b._.fillsize=[this.offsetWidth,this.offsetHeight]});else if(h.color=c.getRGB(f.fill).hex,h.src="",h.type="solid",c.getRGB(f.fill).error&&(b.type in{circle:1,ellipse:1}||"r"!=u(f.fill).charAt())&&N(b,f.fill,h))g.fill="none",g.gradient=f.fill, h.rotate=!1;if("fill-opacity"in f||"opacity"in f)l=((+g["fill-opacity"]+1||2)-1)*((+g.opacity+1||2)-1)*((+c.getRGB(f.fill).o+1||2)-1),l=Y(M(l,0),1),h.opacity=l,h.src&&(h.color="none");i.appendChild(h);h=i.getElementsByTagName("stroke")&&i.getElementsByTagName("stroke")[0];j=!1;!h&&(j=h=d("stroke"));if(f.stroke&&"none"!=f.stroke||f["stroke-width"]||null!=f["stroke-opacity"]||f["stroke-dasharray"]||f["stroke-miterlimit"]||f["stroke-linejoin"]||f["stroke-linecap"])h.on=!0;("none"==f.stroke||null===f.stroke|| null==h.on||0==f.stroke||0==f["stroke-width"])&&(h.on=!1);l=c.getRGB(f.stroke);h.on&&f.stroke&&(h.color=l.hex);l=((+g["stroke-opacity"]+1||2)-1)*((+g.opacity+1||2)-1)*((+l.o+1||2)-1);m=0.75*(t(f["stroke-width"])||1);l=Y(M(l,0),1);null==f["stroke-width"]&&(m=g["stroke-width"]);f["stroke-width"]&&(h.weight=m);m&&1>m&&(l*=m)&&(h.weight=1);h.opacity=l;f["stroke-linejoin"]&&(h.joinstyle=f["stroke-linejoin"]||"miter");h.miterlimit=f["stroke-miterlimit"]||8;f["stroke-linecap"]&&(h.endcap="butt"==f["stroke-linecap"]? "flat":"square"==f["stroke-linecap"]?"square":"round");f["stroke-dasharray"]&&(l={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"},h.dashstyle=l.hasOwnProperty(f["stroke-dasharray"])?l[f["stroke-dasharray"]]:"");j&&i.appendChild(h)}if("text"==b.type){b.paper.canvas.style.display="";i=b.paper.span;j=g.font&&g.font.match(/\d+(?:\.\d*)?(?=px)/);h=i.style;g.font&&(h.font=g.font); g["font-family"]&&(h.fontFamily=g["font-family"]);g["font-weight"]&&(h.fontWeight=g["font-weight"]);g["font-style"]&&(h.fontStyle=g["font-style"]);j=t(g["font-size"]||j&&j[0])||10;h.fontSize=100*j+"px";b.textpath.string&&(i.innerHTML=u(b.textpath.string).replace(/"));i=i.getBoundingClientRect();b.W=g.w=(i.right-i.left)/100;b.H=g.h=(i.bottom-i.top)/100;b.X=g.x;b.Y=g.y+b.H/2;("x"in f||"y"in f)&&(b.path.v=c.format("m{0},{1}l{2},{1}",E(21600*g.x), E(21600*g.y),E(21600*g.x)+1));i="x y text font font-family font-weight font-style font-size".split(" ");h=0;for(j=i.length;h')}}catch(i){d=function(b){return c.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}};c._engine.initWin(c._g.win);c._engine.create=function(){var b=c._getContainer.apply(0,arguments),d=b.container,i=b.height,g=b.width,h=b.x,b=b.y;if(!d)throw Error("VML container not found."); var j=new c._Paper,l=j.canvas=c._g.doc.createElement("div"),m=l.style,h=h||0,b=b||0,g=g||512,i=i||342;j.width=g;j.height=i;g==+g&&(g+="px");i==+i&&(i+="px");j.coordsize="21600000 21600000";j.coordorigin="0 0";j.span=c._g.doc.createElement("span");j.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";l.appendChild(j.span);m.cssText=c.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", g,i);1==d?(c._g.doc.body.appendChild(l),m.left=h+"px",m.top=b+"px",m.position="absolute"):d.firstChild?d.insertBefore(l,d.firstChild):d.appendChild(l);j.renderfix=function(){};return j};c.prototype.clear=function(){c.eve("raphael.clear",this);this.canvas.innerHTML="";this.span=c._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};c.prototype.remove= function(){c.eve("raphael.remove",this);this.canvas.parentNode.removeChild(this.canvas);for(var b in this)this[b]="function"==typeof this[b]?c._removedFactory(b):null;return!0};var l=c.st,j;for(j in D)D.hasOwnProperty(j)&&!l.hasOwnProperty(j)&&(l[j]=function(b){return function(){var c=arguments;return this.forEach(function(d){d[b].apply(d,c)})}}(j))}(window.Raphael);