Fixed getContainer function, show and hide.
authorDmitry Baranovskiy <Dmitry@Baranovskiy.com>
Sun, 20 Mar 2011 22:00:47 +0000 (09:00 +1100)
committerDmitry Baranovskiy <Dmitry@Baranovskiy.com>
Sun, 20 Mar 2011 22:00:47 +0000 (09:00 +1100)
Documentation update.

raphael-min.js
raphael.js

index 1c2bd7e..2ddda5f 100644 (file)
@@ -5,4 +5,4 @@
  * Copyright (c) 2011 Sencha Labs (http://sencha.com)
  * Licensed under the MIT (http://raphaeljs.com/license.html) license.
  */
-(function(){function c$(c,d,e,g,h){e=P(e);var i,j,k,l=[],m,n,o,p=c.ms,r={},s={},t={};if(g)for(v=0,w=cU.length;v<w;v++){var u=cU[v];if(u.el.id==d.id&&u.anim==c){u.percent!=e?(cU.splice(v,1),k=1):j=u,d.attr(u.totalOrigin);break}}else g=0/0;for(var v=0,w=c.percents.length;v<w;v++){if(c.percents[v]==e||c.percents[v]>g*c.top){e=c.percents[v],n=c.percents[v-1]||0,p=p/c.top*(e-n),m=c.percents[v+1],i=c.anim[e];break}g&&d.attr(c.anim[c.percents[v]])}if(i){if(j)j.initstatus=g,j.start=new Date-j.ms*g;else{for(attr in i)if(i[f](attr))if(U[f](attr)||d.paper.customAttributes[f](attr)){r[attr]=d.attr(attr),r[attr]==null&&(r[attr]=T[attr]),s[attr]=i[attr];switch(U[attr]){case B:t[attr]=(s[attr]-r[attr])/p;break;case"colour":r[attr]=a.getRGB(r[attr]);var x=a.getRGB(s[attr]);t[attr]={r:(x.r-r[attr].r)/p,g:(x.g-r[attr].g)/p,b:(x.b-r[attr].b)/p};break;case"path":var y=bC(r[attr],s[attr]),z=y[1];r[attr]=y[0],t[attr]=[];for(v=0,w=r[attr].length;v<w;v++){t[attr][v]=[0];for(var A=1,C=r[attr][v].length;A<C;A++)t[attr][v][A]=(z[v][A]-r[attr][v][A])/p}break;case"transform":var D=d._,E=bO(D[attr],s[attr]);if(E){r[attr]=E.from,s[attr]=E.to,t[attr]=[],t[attr].real=!0;for(v=0,w=r[attr].length;v<w;v++){t[attr][v]=[r[attr][v][0]];for(A=1,C=r[attr][v].length;A<C;A++)t[attr][v][A]=(s[attr][v][A]-r[attr][v][A])/p}}else{var F=(d.matrix||new bP).m,G={_:{transform:D.transform},getBBox:function(){return d.getBBox()}};r[attr]=[F[0][0],F[1][0],F[0][1],F[1][1],F[0][2],F[1][2]],bM(G,s[attr]),s[attr]=G._.transform,t[attr]=[(G.matrix.m[0][0]-F[0][0])/p,(G.matrix.m[1][0]-F[1][0])/p,(G.matrix.m[0][1]-F[0][1])/p,(G.matrix.m[1][1]-F[1][1])/p,(G.matrix.m[0][2]-F[0][2])/p,(G.matrix.m[1][2]-F[1][2])/p]}break;case"csv":var H=q(i[attr]).split(b),I=q(r[attr]).split(b);if(attr=="clip-rect"){r[attr]=I,t[attr]=[],v=I.length;while(v--)t[attr][v]=(H[v]-r[attr][v])/p}s[attr]=H;break;default:H=[].concat(i[attr]),I=[].concat(r[attr]),t[attr]=[],v=d.paper.customAttributes[attr].length;while(v--)t[attr][v]=((H[v]||0)-(I[v]||0))/p}}var J=i.easing,K=a.easing_formulas[J];if(!K){K=q(J).match(M);if(K&&K.length==5){var L=K;K=function(a){return cY(a,+L[1],+L[2],+L[3],+L[4],p)}}else K=bd}o=i.start||c.start||+(new Date),u={anim:c,percent:e,timestamp:o,start:o+(c.del||0),status:0,initstatus:g||0,stop:!1,ms:p,easing:K,from:r,diff:t,to:s,el:d,callback:i.callback,prev:n,next:m,repeat:c.times,origin:d.attr(),totalOrigin:h},cU.push(u);if(g&&!j){u.stop=!0,u.start=new Date-p*g;if(cU.length==1)return cW()}cU.length==1&&cV(cW)}dc("anim.start."+d.id,d,c)}}function cZ(a,b){var c=[];this.anim=a,this.ms=b,this.times=1;if(this.anim){for(var d in this.anim)this.anim[f](d)&&c.push(+d);c.sort(bb)}this.top=c[c.length-1],this.percents=c}function cY(a,b,c,d,e,f){function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(y(f)<b)return e;j=(3*i*e+2*h)*e+g;if(y(j)<1e-6)break;e=e-f/j}c=0,d=1,e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(y(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cM(){return this.x+p+this.y+p+this.width+"×"+this.height}function cL(){return this.x+p+this.y}function bP(a,b,c,d,e,f){a!=null?this.m=[[a,c,e],[b,d,f],[0,0,1]]:this.m=[[1,0,0],[0,1,0],[0,0,1]]}function bs(a,b){var c=g.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top-9999em",c.onload=function(){b.call(this),this.onload=null,g.doc.body.removeChild(this)},c.onerror=function(){g.doc.body.removeChild(this)},g.doc.body.appendChild(c),c.src=a}function br(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),g=e.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[f](g))return c?c(h[g]):h[g];i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[l](b,e);return c?c(h[g]):h[g]}return d}function a(b){if(a.is(b,"function"))return dc.on("DOMload",b);if(a.is(b,D)){var d=b,e=cl[l](a,d.splice(0,3+a.is(d[0],B))),g=e.set(),h=0,i=d.length,j;for(;h<i;h++)j=d[h]||{},c[f](j.type)&&g.push(e[j.type]().attr(j));return g}return cl[l](a,arguments)}a.version="2.0.0";var b=/[, ]+/,c={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},d=/\{(\d+)\}/g,e="prototype",f="hasOwnProperty",g={doc:document,win:window},h={was:Object.prototype[f].call(g.win,"Raphael"),is:g.win.Raphael},i=function(){},j,k="appendChild",l="apply",m="concat",n="createTouch"in g.doc,o="",p=" ",q=String,r="split",s="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend".split(p),t={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},u=q.prototype.toLowerCase,v=Math,w=v.max,x=v.min,y=v.abs,z=v.pow,A=v.PI,B="number",C="string",D="array",E="toString",F="fill",G=Object.prototype.toString,H={},I="push",J=/^url\(['"]?([^\)]+?)['"]?\)$/i,K=/^\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,L={NaN:1,Infinity:1,"-Infinity":1},M=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,N=v.round,O="setAttribute",P=parseFloat,Q=parseInt,R=" progid:DXImageTransform.Microsoft",S=q.prototype.toUpperCase,T={"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/",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},U={blur:B,"clip-rect":"csv",cx:B,cy:B,fill:"colour","fill-opacity":B,"font-size":B,height:B,opacity:B,path:"path",r:B,rx:B,ry:B,stroke:"colour","stroke-opacity":B,"stroke-width":B,transform:"transform",width:B,x:B,y:B},V=/\s*,\s*/,W={hs:1,rg:1},X=/,?([achlmqrstvxz]),?/gi,Y=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,Z=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,$=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,_=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,ba=function(a,b){return a.key-b.key},bb=function(a,b){return a-b},bc=function(){},bd=function(a){return a},be=function(a,b,c,d,e){if(e)return[["M",a+e,b],["l",c-e*2,0],["a",e,e,0,0,1,e,e],["l",0,d-e*2],["a",e,e,0,0,1,-e,e],["l",e*2-c,0],["a",e,e,0,0,1,-e,-e],["l",0,e*2-d],["a",e,e,0,0,1,e,-e],["z"]];return[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},bf=function(a,b,c,d){d==null&&(d=c);return[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},bg={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return bf(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return bf(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return be(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return be(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return be(b.x,b.y,b.width,b.height)}},bh=function(a,b){if(!b)return a;var c,d,e,f,g;a=bC(a);for(e=0,ii=a.length;e<ii;e++){g=a[e];for(f=1,jj=g.length;f<jj;f+=2)c=b.x(g[f],g[f+1]),d=b.y(g[f],g[f+1]),g[f]=c,g[f+1]=d}return a};a.type=g.win.SVGAngle||g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bi=g.doc.createElement("div"),bj;bi.innerHTML='<v:shape adj="1"/>',bj=bi.firstChild,bj.style.behavior="url(#default#VML)";if(!bj||typeof bj.adj!="object")return a.type=o;bi=null}a.svg=!(a.vml=a.type=="VML"),j=i.prototype=a.prototype,j.customAttributes={},a._id=0,a._oid=0,a.fn={},a.is=function(a,b){b=u.call(b);if(b=="finite")return!L[f](+a);return b=="null"&&a===null||b==typeof a||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||G.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+v.atan2(-i,-h)*180/A+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*A/180},a.deg=function(a){return a*180/A%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,D)){var e=b.length;while(e--)if(y(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c};var bk=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=v.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){dc("setWindow",a,g.win,b),g.win=b,g.doc=g.win.document,cz&&cz(g.win)};var bl=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),d=e.body}catch(f){d=createPopup().document.body}var h=d.createTextRange();bl=br(function(a){try{d.style.color=q(a).replace(c,o);var b=h.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=g.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",g.doc.body.appendChild(i),bl=br(function(a){i.style.color=a;return g.doc.defaultView.getComputedStyle(i,o).getPropertyValue("color")})}return bl(b)},bm=function(){return"hsb("+[this.h,this.s,this.b]+")"},bn=function(){return"hsl("+[this.h,this.s,this.l]+")"},bo=function(){return this.hex},bp=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,C)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},bq=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:bo};a.is(e,"finite")&&(f.opacity=e);return f};a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-y(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bq(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-y(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bq(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bp(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=w(a,b,c),g=f-x(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=d%6*60,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bm}},a.rgb2hsl=function(a,b,c){c=bp(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=w(a,b,c),h=x(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=d%6*60,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bn}},a._path2string=function(){return this.join(",").replace(X,"$1")},a.getRGB=br(function(b){if(!b||!!((b=q(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none"};!W[f](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bl(b));var c,d,e,g,h,i,j,k=b.match(K);if(k){k[2]&&(g=Q(k[2].substring(5),16),e=Q(k[2].substring(3,5),16),d=Q(k[2].substring(1,3),16)),k[3]&&(g=Q((i=k[3].charAt(3))+i,16),e=Q((i=k[3].charAt(2))+i,16),d=Q((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4].split(V),d=P(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=P(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=P(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=P(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5].split(V),d=P(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=P(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=P(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=P(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,g,h)}if(k[6]){j=k[6].split(V),d=P(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=P(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=P(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=P(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,g,h)}k={r:d,g:e,b:g},k.hex="#"+(16777216|g|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1}},a),a.hsb=br(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=br(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=br(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=br(function(b){if(!b)return null;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},d=[];a.is(b,D)&&a.is(b[0],D)&&(d=bu(b)),d.length||q(b).replace(Y,function(a,b,e){var f=[],g=u.call(b);e.replace($,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(d.push([b][m](f.splice(0,2))),g="l",b=b=="m"?"l":"L");while(f.length>=c[g]){d.push([b][m](f.splice(0,c[g])));if(!c[g])break}}),d.toString=a._path2string;return d}),a.parseTransformString=br(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,D)&&a.is(b[0],D)&&(d=bu(b)),d.length||q(b).replace(Z,function(a,b,c){var e=[],f=u.call(b);c.replace($,function(a,b){b&&e.push(+b)}),d.push([f][m](e))}),d.toString=a._path2string;return d}),a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=z(j,3)*a+z(j,2)*3*i*c+j*3*i*i*e+z(i,3)*g,l=z(j,3)*b+z(j,2)*3*i*d+j*3*i*i*f+z(i,3)*h,m=a+2*i*(c-a)+i*i*(e-2*c+a),n=b+2*i*(d-b)+i*i*(f-2*d+b),o=c+2*i*(e-c)+i*i*(g-2*e+c),p=d+2*i*(f-d)+i*i*(h-2*f+d),q=(1-i)*a+i*c,r=(1-i)*b+i*d,s=(1-i)*e+i*g,t=(1-i)*f+i*h,u=90-v.atan2(m-o,n-p)*180/A;(m>o||n<p)&&(u+=180);return{x:k,y:l,m:{x:m,y:n},n:{x:o,y:p},start:{x:q,y:r},end:{x:s,y:t},alpha:u}};var bt=br(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=bC(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a.length;g<h;g++){f=a[g];if(f[0]=="M")b=f[1],c=f[2],d.push(b),e.push(c);else{var i=bB(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[m](i.min.x,i.max.x),e=e[m](i.min.y,i.max.y),b=f[5],c=f[6]}}var j=x[l](0,d),k=x[l](0,e);return{x:j,y:k,width:w[l](0,d)-j,height:w[l](0,e)-k}}),bu=function(b){var c=[];if(!a.is(b,D)||!a.is(b&&b[0],D))b=a.parsePathString(b);for(var d=0,e=b.length;d<e;d++){c[d]=[];for(var f=0,g=b[d].length;f<g;f++)c[d][f]=b[d][f]}c.toString=a._path2string;return c},bv=br(function(b){if(!a.is(b,D)||!a.is(b&&b[0],D))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=b[0][1],e=b[0][2],f=d,g=e,h++,c.push(["M",d,e]));for(var i=h,j=b.length;i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=u.call(l[0])){k[0]=u.call(l[0]);switch(k[0]){case"a":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]-d).toFixed(3),k[7]=+(l[7]-e).toFixed(3);break;case"v":k[1]=+(l[1]-e).toFixed(3);break;case"m":f=l[1],g=l[2];default:for(var m=1,n=l.length;m<n;m++)k[m]=+(l[m]-(m%2?d:e)).toFixed(3)}}else{k=c[i]=[],l[0]=="m"&&(f=l[1]+d,g=l[2]+e);for(var o=0,p=l.length;o<p;o++)c[i][o]=l[o]}var q=c[i].length;switch(c[i][0]){case"z":d=f,e=g;break;case"h":d+=+c[i][q-1];break;case"v":e+=+c[i][q-1];break;default:d+=+c[i][q-2],e+=+c[i][q-1]}}c.toString=a._path2string;return c},0,bu),bw=br(function(b){if(!a.is(b,D)||!a.is(b&&b[0],D))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=+b[0][1],e=+b[0][2],f=d,g=e,h++,c[0]=["M",d,e]);for(var i=h,j=b.length;i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=S.call(l[0])){k[0]=S.call(l[0]);switch(k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+d),k[7]=+(l[7]+e);break;case"V":k[1]=+l[1]+e;break;case"H":k[1]=+l[1]+d;break;case"M":f=+l[1]+d,g=+l[2]+e;default:for(var m=1,n=l.length;m<n;m++)k[m]=+l[m]+(m%2?d:e)}}else for(var o=0,p=l.length;o<p;o++)c[i][o]=l[o];switch(k[0]){case"Z":d=f,e=g;break;case"H":d=k[1];break;case"V":e=k[1];break;case"M":f=c[i][c[i].length-2],g=c[i][c[i].length-1];default:d=c[i][c[i].length-2],e=c[i][c[i].length-1]}}c.toString=a._path2string;return c},null,bu),bx=function(a,b,c,d){return[a,b,c,d,c,d]},by=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bz=function(a,b,c,d,e,f,g,h,i,j){var k=A*120/180,l=A/180*(+e||0),n=[],o,p=br(function(a,b,c){var d=a*v.cos(c)-b*v.sin(c),e=a*v.sin(c)+b*v.cos(c);return{x:d,y:e}});if(j)D=j[0],E=j[1],B=j[2],C=j[3];else{o=p(a,b,-l),a=o.x,b=o.y,o=p(h,i,-l),h=o.x,i=o.y;var q=v.cos(A/180*e),r=v.sin(A/180*e),s=(a-h)/2,t=(b-i)/2,u=s*s/(c*c)+t*t/(d*d);u>1&&(u=v.sqrt(u),c=u*c,d=u*d);var w=c*c,x=d*d,z=(f==g?-1:1)*v.sqrt(y((w*x-w*t*t-x*s*s)/(w*t*t+x*s*s))),B=z*c*t/d+(a+h)/2,C=z*-d*s/c+(b+i)/2,D=v.asin(((b-C)/d).toFixed(9)),E=v.asin(((i-C)/d).toFixed(9));D=a<B?A-D:D,E=h<B?A-E:E,D<0&&(D=A*2+D),E<0&&(E=A*2+E),g&&D>E&&(D=D-A*2),!g&&E>D&&(E=E-A*2)}var F=E-D;if(y(F)>k){var G=E,H=h,I=i;E=D+k*(g&&E>D?1:-1),h=B+c*v.cos(E),i=C+d*v.sin(E),n=bz(h,i,c,d,e,0,g,H,I,[E,G,B,C])}F=E-D;var J=v.cos(D),K=v.sin(D),L=v.cos(E),M=v.sin(E),N=v.tan(F/4),O=4/3*c*N,P=4/3*d*N,Q=[a,b],R=[a+O*K,b-P*J],S=[h+O*M,i-P*L],T=[h,i];R[0]=2*Q[0]-R[0],R[1]=2*Q[1]-R[1];if(j)return[R,S,T][m](n);n=[R,S,T][m](n).join().split(",");var U=[];for(var V=0,W=n.length;V<W;V++)U[V]=V%2?p(n[V-1],n[V],l).y:p(n[V],n[V+1],l).x;return U},bA=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:z(j,3)*a+z(j,2)*3*i*c+j*3*i*i*e+z(i,3)*g,y:z(j,3)*b+z(j,2)*3*i*d+j*3*i*i*f+z(i,3)*h}},bB=br(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,m=(-j+v.sqrt(j*j-4*i*k))/2/i,n=(-j-v.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;y(m)>"1e12"&&(m=.5),y(n)>"1e12"&&(n=.5),m>0&&m<1&&(q=bA(a,b,c,d,e,f,g,h,m),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bA(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,m=(-j+v.sqrt(j*j-4*i*k))/2/i,n=(-j-v.sqrt(j*j-4*i*k))/2/i,y(m)>"1e12"&&(m=.5),y(n)>"1e12"&&(n=.5),m>0&&m<1&&(q=bA(a,b,c,d,e,f,g,h,m),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bA(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:x[l](0,p),y:x[l](0,o)},max:{x:w[l](0,p),y:w[l](0,o)}}}),bC=br(function(a,b){var c=bw(a),d=b&&bw(b),e={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},g=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][m](bz[l](0,[b.x,b.y][m](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][m](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][m](by(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][m](by(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][m](bx(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][m](bx(b.x,b.y,a[1],b.y));break;case"V":a=["C"][m](bx(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][m](bx(b.x,b.y,b.X,b.Y))}return a},h=function(a,b){if(a[b].length>7){a[b].shift();var e=a[b];while(e.length)a.splice(b++,0,["C"][m](e.splice(0,6)));a.splice(b,1),k=w(c.length,d&&d.length||0)}},i=function(a,b,e,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],k=w(c.length,d&&d.length||0))};for(var j=0,k=w(c.length,d&&d.length||0);j<k;j++){c[j]=g(c[j],e),h(c,j),d&&(d[j]=g(d[j],f)),d&&h(d,j),i(c,d,e,f,j),i(d,c,f,e,j);var n=c[j],o=d&&d[j],p=n.length,q=d&&o.length;e.x=n[p-2],e.y=n[p-1],e.bx=P(n[p-4])||e.x,e.by=P(n[p-3])||e.y,f.bx=d&&(P(o[q-4])||f.x),f.by=d&&(P(o[q-3])||f.y),f.x=d&&o[q-2],f.y=d&&o[q-1]}return d?[c,d]:c},null,bu),bD=br(function(b){var c=[];for(var d=0,e=b.length;d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){var h=P(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=P(i);var k=(i-h)/(j-d+1);for(;d<j;d++)h+=k,c[d].offset=h+"%"}return c}),bE=function(b,c,d,e){var f;if(a.is(b,C)||a.is(b,"object")){f=e==null?g.doc.getElementById(b):b;if(f==null)return;if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d}}return{container:1,x:b,y:c,width:d,height:e}},bF=function(a,b){var c=this;for(var d in b)if(b[f](d)&&!(d in a))switch(typeof b[d]){case"function":(function(b){a[d]=a===c?b:function(){return b[l](c,arguments)}})(b[d]);break;case"object":a[d]=a[d]||{},bF.call(this,a[d],b[d]);break;default:a[d]=b[d]}},bG=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bH=function(a,b){b.top!==a&&(bG(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},bI=function(a,b){b.bottom!==a&&(bG(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},bJ=function(a,b,c){bG(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bK=function(a,b,c){bG(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bL=function(a){return function(){throw new Error("Raphaël: you are calling to method “"+a+"” of removed object")}},bM=function(b,c){if(c==null)return b._.transform;c=q(c).replace(/\.{3}|\u2026/g,b._.transform||o);var d=a.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=b._,k=new bP;j.transform=d||[];if(d)for(var l=0,m=d.length;l<m;l++){var n=d[l],p=n.length,r;n[0]=q(n[0]).toLowerCase(),n[0]=="t"&&p==3?k.translate(n[1],n[2]):n[0]=="r"?p==2?(r=r||b.getBBox(1),k.rotate(n[1],r.x+r.width/2,r.y+r.height/2),e+=n[1]):p==4&&(k.rotate(n[1],n[2],n[3]),e+=n[1]):n[0]=="s"?p==2||p==3?(r=r||b.getBBox(1),k.scale(n[1],n[p-1],r.x+r.width/2,r.y+r.height/2),h*=n[1],i*=n[p-1]):p==5&&(k.scale(n[1],n[2],n[3],n[4]),h*=n[1],i*=n[2]):n[0]=="m"&&p==7&&k.add(n[1],n[2],n[3],n[4],n[5],n[6]),j.dirtyT=1,b.matrix=k}b.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.m[0][2],j.dy=g=k.m[1][2],h==1&&i==1&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1},bN=function(a){switch(a[0]){case"t":return["t",0,0];case"m":return["m",1,0,0,1,0,0];case"r":return a.length==4?["r",0,a[2],a[3]]:["r",0];case"s":return a.length==5?["s",1,1,a[3],a[4]]:a.length==3?["s",1,1]:["s",1]}},bO=function(b,c){b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];var d=w(b.length,c.length),e=[],f=[],g=0,h,i,j,k;for(;g<d;g++){j=b[g]||bN(c[g]),k=c[g]||bN(j);if(j[0]!=k[0]||j[0]=="r"&&(j[2]!=k[2]||j[3]!=k[3])||j[0]=="s"&&(j[3]!=k[3]||j[4]!=k[4]))return;e[g]=[],f[g]=[];for(h=0,i=w(j.length,k.length);h<i;h++)h in j&&(e[g][h]=j[h]),h in k&&(f[g][h]=k[h])}return{from:e,to:f}};a.pathToRelative=bv,a.path2curve=bC;var bQ=bP.prototype;bQ.add=function(a,b,c,d,e,f){var g=[[],[],[]],h=[[a,c,e],[b,d,f],[0,0,1]],i,j,k,l;for(i=0;i<3;i++)for(j=0;j<3;j++){l=0;for(k=0;k<3;k++)l+=this.m[i][k]*h[k][j];g[i][j]=l}this.m=g},bQ.invert=function(){var a=this.m[0][0],b=this.m[1][0],c=this.m[0][1],d=this.m[1][1],e=this.m[0][2],f=this.m[1][2],g=a*d-b*c;return new bP(d/g,-b/g,-c/g,a/g,(c*f-d*e)/g,(b*e-a*f)/g)},bQ.clone=function(){var a=this.m[0][0],b=this.m[1][0],c=this.m[0][1],d=this.m[1][1],e=this.m[0][2],f=this.m[1][2];return new bP(a,b,c,d,e,f)},bQ.translate=function(a,b){this.add(1,0,0,1,a,b)},bQ.scale=function(a,b,c,d){b==null&&(b=a),this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),this.add(1,0,0,1,-c,-d)},bQ.rotate=function(b,c,d){b=a.rad(b);var e=+v.cos(b).toFixed(9),f=+v.sin(b).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},bQ.x=function(a,b){return a*this.m[0][0]+b*this.m[0][1]+this.m[0][2]},bQ.y=function(a,b){return a*this.m[1][0]+b*this.m[1][1]+this.m[1][2]},bQ.get=function(a,b){return+this.m[a][b].toFixed(4)},bQ.toString=function(){return a.svg?"matrix("+[this.get(0,0),this.get(1,0),this.get(0,1),this.get(1,1),this.get(0,2),this.get(1,2)].join()+")":[this.get(0,0),this.get(0,1),this.get(1,0),this.get(1,1),0,0].join()},bQ.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0,0)+", M12="+this.get(0,1)+", M21="+this.get(1,0)+", M22="+this.get(1,1)+", Dx="+this.get(0,2)+", Dy="+this.get(1,2)+", sizingmedthod='auto expand')"},bQ.offset=function(){return[this.m[0][2].toFixed(4),this.m[1][2].toFixed(4)]},a.Matrix=bP;if(a.svg){var bR="http://www.w3.org/1999/xlink",bS={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"},bT={};N=function(a){return+a+(~~a===a)*.5},a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var bU=function(a,b){if(b){typeof a=="string"&&(a=bU(a));for(var c in b)b[f](c)&&(c.substring(0,6)=="xlink:"?a.setAttributeNS(bR,c.substring(6),q(b[c])):a[O](c,q(b[c])))}else a=g.doc.createElementNS("http://www.w3.org/2000/svg",a),a.style&&(a.style.webkitTapHighlightColor="rgba(0,0,0,0)");return a},bV=function(a,b){var c=bU("path");b.canvas&&b.canvas.appendChild(c);var d=new cd(c,b);d.type="path",ca(d,{fill:"none",stroke:"#000",path:a});return d},bW={},bX=/^url\(#(.*)\)$/,bY=function(a,b){var c=a.getAttribute(F);c=c&&c.match(bX),c&&!--bW[c[1]]&&(delete bW[c[1]],b.defs.removeChild(g.doc.getElementById(c[1])))},bZ=function(b,c){var d="linear",e=b.id+c,f=.5,h=.5,i=b.node,j=b.paper,k=i.style,l=g.doc.getElementById(e);if(!l){c=q(c).replace(_,function(a,b,c){d="radial";if(b&&c){f=P(b),h=P(c);var e=(h>.5)*2-1;z(f-.5,2)+z(h-.5,2)>.25&&(h=v.sqrt(.25-z(f-.5,2))*e+.5)&&h!=.5&&(h=h.toFixed(5)-1e-5*e)}return o}),c=c.split(/\s*\-\s*/);if(d=="linear"){var m=c.shift();m=-P(m);if(isNaN(m))return null;var n=[0,0,v.cos(a.rad(m)),v.sin(a.rad(m))],p=1/(w(y(n[2]),y(n[3]))||1);n[2]*=p,n[3]*=p,n[2]<0&&(n[0]=-n[2],n[2]=0),n[3]<0&&(n[1]=-n[3],n[3]=0)}var r=bD(c);if(!r)return null;b.gradient&&(j.defs.removeChild(b.gradient),delete b.gradient),l=bU(d+"Gradient",{id:e}),b.gradient=l,bU(l,d=="radial"?{fx:f,fy:h}:{x1:n[0],y1:n[1],x2:n[2],y2:n[3],gradientTransform:b.matrix.invert()}),j.defs.appendChild(l);for(var s=0,t=r.length;s<t;s++)l.appendChild(bU("stop",{offset:r[s].offset?r[s].offset:s?"100%":"0%","stop-color":r[s].color||"#fff"}))}bU(i,{fill:"url(#"+e+")",opacity:1,"fill-opacity":1}),k.fill=o,k.opacity=1,k.fillOpacity=1;return 1},b$=function(a){var b=a.getBBox(1);bU(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},b_=function(b,c,d){if(b.type=="path"){var e=q(c).toLowerCase().split("-"),h=b.paper,i=d?"end":"start",j=b.node,k=b.attrs,l=k["stroke-width"],m=e.length,n="classic",o,r,s,t,u,v=3,w=3,x=5;while(m--)switch(e[m]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":n=e[m];break;case"wide":w=5;break;case"narrow":w=2;break;case"long":v=5;break;case"short":v=2}n=="open"?(v+=2,w+=2,x+=2,s=1,t=d?4:1,u={fill:"none",stroke:k.stroke}):(t=s=v/2,u={fill:k.stroke,stroke:"none"}),b._.arrows?d?(b._.arrows.endPath&&bT[b._.arrows.endPath]--,b._.arrows.endMarker&&bT[b._.arrows.endMarker]--):(b._.arrows.startPath&&bT[b._.arrows.startPath]--,b._.arrows.startMarker&&bT[b._.arrows.startMarker]--):b._.arrows={};if(n!="none"){var y="raphael-marker-"+n,z="raphael-marker-"+i+n+v+w;g.doc.getElementById(y)?bT[y]++:(h.defs.appendChild(bU(bU("path"),{"stroke-linecap":"round",d:bS[n],id:y})),bT[y]=1);var A=g.doc.getElementById(z),B;A?(bT[z]++,B=A.getElementsByTagName("use")[0]):(A=bU(bU("marker"),{id:z,markerHeight:w,markerWidth:v,orient:"auto",refX:t,refY:w/2}),B=bU(bU("use"),{"xlink:href":"#"+y,transform:(d?" rotate(180 "+v/2+" "+w/2+") ":p)+"scale("+v/x+","+w/x+")","stroke-width":1/((v/x+w/x)/2)}),A.appendChild(B),h.defs.appendChild(A),bT[z]=1),bU(B,u);var C=s*(n!="diamond"&&n!="oval");d?(o=b._.arrows.startdx*l||0,r=a.getTotalLength(k.path)-C*l):(o=C*l,r=a.getTotalLength(k.path)-(b._.arrows.enddx*l||0)),u={},u["marker-"+i]="url(#"+z+")";if(r||o)u.d=Raphael.getSubpath(k.path,o,r);bU(j,u),b._.arrows[i+"Path"]=y,b._.arrows[i+"Marker"]=z,b._.arrows[i+"dx"]=C,b._.arrows[i+"Type"]=n,b._.arrows[i+"String"]=c}else d?(o=b._.arrows.startdx*l||0,r=a.getTotalLength(k.path)-o):(o=0,r=a.getTotalLength(k.path)-(b._.arrows.enddx*l||0)),b._.arrows[i+"Path"]&&bU(j,{d:Raphael.getSubpath(k.path,o,r)}),delete b._.arrows[i+"Path"],delete b._.arrows[i+"Marker"],delete b._.arrows[i+"dx"],delete b._.arrows[i+"Type"],delete b._.arrows[i+"String"];for(u in bT)if(bT[f](u)&&!bT[u]){var D=g.doc.getElementById(u);D&&D.parentNode.removeChild(D)}}},ca=function(c,d){var e={"":[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]},h=c.node,i=c.attrs,j=function(a,b){b=e[u.call(b)];if(b){var c=a.attrs["stroke-width"]||"1",f=({round:c,square:c,butt:0})[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],i=b.length;while(i--)g[i]=b[i]*c+(i%2?1:-1)*f;bU(h,{"stroke-dasharray":g.join(",")})}};for(var k in d)if(d[f](k)){if(!T[f](k))continue;var l=d[k];i[k]=l;switch(k){case"blur":c.blur(l);break;case"href":case"title":case"target":var m=h.parentNode;if(u.call(m.tagName)!="a"){var n=bU("a");m.insertBefore(n,h),n.appendChild(h),m=n}k=="target"&&l=="blank"?m.setAttributeNS(bR,"show","new"):m.setAttributeNS(bR,k,l);break;case"cursor":h.style.cursor=l;break;case"transform":c.transform(l);break;case"arrow-start":b_(c,l);break;case"arrow-end":b_(c,l,1);break;case"clip-rect":var p=q(l).split(b);if(p.length==4){c.clip&&c.clip.parentNode.parentNode.removeChild(c.clip.parentNode);var r=bU("clipPath"),s=bU("rect");r.id=bk(),bU(s,{x:p[0],y:p[1],width:p[2],height:p[3]}),r.appendChild(s),c.paper.defs.appendChild(r),bU(h,{"clip-path":"url(#"+r.id+")"}),c.clip=s}if(!l){var t=g.doc.getElementById(h.getAttribute("clip-path").replace(/(^url\(#|\)$)/g,o));t&&t.parentNode.removeChild(t),bU(h,{"clip-path":o}),delete c.clip}break;case"path":c.type=="path"&&(bU(h,{d:l?i.path=bw(l):"M0,0"}),c._.dirty=1,c._.arrows&&("startString"in c._.arrows&&b_(c,c._.arrows.startString),"endString"in c._.arrows&&b_(c,c._.arrows.endString,1)));break;case"width":h[O](k,l),c._.dirty=1;if(i.fx)k="x",l=i.x;else break;case"x":i.fx&&(l=-i.x-(i.width||0));case"rx":if(k=="rx"&&c.type=="rect")break;case"cx":h[O](k,l),c.pattern&&b$(c),c._.dirty=1;break;case"height":h[O](k,l),c._.dirty=1;if(i.fy)k="y",l=i.y;else break;case"y":i.fy&&(l=-i.y-(i.height||0));case"ry":if(k=="ry"&&c.type=="rect")break;case"cy":h[O](k,l),c.pattern&&b$(c),c._.dirty=1;break;case"r":c.type=="rect"?bU(h,{rx:l,ry:l}):h[O](k,l),c._.dirty=1;break;case"src":c.type=="image"&&h.setAttributeNS(bR,"href",l);break;case"stroke-width":if(c._.sx!=1||c._.sy!=1)l/=w(y(c._.sx),y(c._.sy))||1;c.paper._vbSize&&(l*=c.paper._vbSize),h[O](k,l),i["stroke-dasharray"]&&j(c,i["stroke-dasharray"]),c._.arrows&&("startString"in c._.arrows&&b_(c,c._.arrows.startString),"endString"in c._.arrows&&b_(c,c._.arrows.endString,1));break;case"stroke-dasharray":j(c,l);break;case F:var v=q(l).match(J);if(v){r=bU("pattern");var x=bU("image");r.id=bk(),bU(r,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),bU(x,{x:0,y:0,"xlink:href":v[1]}),r.appendChild(x),function(a){bs(v[1],function(){var b=this.offsetWidth,d=this.offsetHeight;bU(a,{width:b,height:d}),bU(x,{width:b,height:d}),c.paper.safari()})}(r),c.paper.defs.appendChild(r),h.style.fill="url(#"+r.id+")",bU(h,{fill:"url(#"+r.id+")"}),c.pattern=r,c.pattern&&b$(c);break}var z=a.getRGB(l);if(z.error){if((c.type=="circle"||c.type=="ellipse"||q(l).charAt()!="r")&&bZ(c,l)){if("opacity"in i||"fill-opacity"in i){var A=g.doc.getElementById(h.getAttribute(F).replace(/^url\(#|\)$/g,o));if(A){var B=A.getElementsByTagName("stop");bU(B[B.length-1],{"stop-opacity":("opacity"in i?i.opacity:1)*("fill-opacity"in i?i["fill-opacity"]:1)})}}i.gradient=l,i.fill="none";break}}else delete d.gradient,delete i.gradient,!a.is(i.opacity,"undefined")&&a.is(d.opacity,"undefined")&&bU(h,{opacity:i.opacity}),!a.is(i["fill-opacity"],"undefined")&&a.is(d["fill-opacity"],"undefined")&&bU(h,{"fill-opacity":i["fill-opacity"]});z[f]("opacity")&&bU(h,{"fill-opacity":z.opacity>1?z.opacity/100:z.opacity});case"stroke":z=a.getRGB(l),h[O](k,z.hex),k=="stroke"&&z[f]("opacity")&&bU(h,{"stroke-opacity":z.opacity>1?z.opacity/100:z.opacity}),k=="stroke"&&c._.arrows&&("startString"in c._.arrows&&b_(c,c._.arrows.startString),"endString"in c._.arrows&&b_(c,c._.arrows.endString,1));break;case"gradient":(c.type=="circle"||c.type=="ellipse"||q(l).charAt()!="r")&&bZ(c,l);break;case"opacity":i.gradient&&!i[f]("stroke-opacity")&&bU(h,{"stroke-opacity":l>1?l/100:l});case"fill-opacity":if(i.gradient){A=g.doc.getElementById(h.getAttribute(F).replace(/^url\(#|\)$/g,o)),A&&(B=A.getElementsByTagName("stop"),bU(B[B.length-1],{"stop-opacity":l}));break};default:k=="font-size"&&(l=Q(l,10)+"px");var C=k.replace(/(\-.)/g,function(a){return S.call(a.substring(1))});h.style[C]=l,c._.dirty=1,h[O](k,l)}}cc(c,d)},cb=1.2,cc=function(b,c){if(b.type=="text"&&(c[f]("text")||c[f]("font")||c[f]("font-size")||c[f]("x")||c[f]("y"))){var d=b.attrs,e=b.node,h=e.firstChild?Q(g.doc.defaultView.getComputedStyle(e.firstChild,o).getPropertyValue("font-size"),10):10;if(c[f]("text")){d.text=c.text;while(e.firstChild)e.removeChild(e.firstChild);var i=q(c.text).split("\n"),j=[],k;for(var l=0,m=i.length;l<m;l++)i[l]&&(k=bU("tspan"),l&&bU(k,{dy:h*cb,x:d.x}),k.appendChild(g.doc.createTextNode(i[l])),e.appendChild(k),j[l]=k)}else{j=e.getElementsByTagName("tspan");for(l=0,m=j.length;l<m;l++)l&&bU(j[l],{dy:h*cb,x:d.x})}bU(e,{y:d.y}),b._.dirty=1;var n=b._getBBox(),p=d.y-(n.y+n.height/2);p&&a.is(p,"finite")&&bU(j[0],{dy:d.y+p})}},cd=function(b,c){var d=0,e=0;this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=new bP,this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},ce=cd.prototype;ce.rotate=function(a,c,d){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2])),a=P(a[0]),d==null&&(c=d);if(c==null||d==null){var e=this.getBBox(1);c=e.x+e.width/2,d=e.y+e.height/2}this.transform(this._.transform.concat([["r",a,c,d]]));return this},ce.scale=function(a,c,d,e){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2]),e=P(a[3])),a=P(a[0]),c==null&&(c=a),e==null&&(d=e);if(d==null||e==null)var f=this.getBBox(1);d=d==null?f.x+f.width/2:d,e=e==null?f.y+f.height/2:e,this.transform(this._.transform.concat([["s",a,c,d,e]]));return this},ce.translate=function(a,c){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1])),a=P(a[0])||0,c=+c||0,this.transform(this._.transform.concat([["t",a,c]]));return this},ce.transform=function(a){var b=this._;if(!a)return b.transform;bM(this,a),this.clip&&bU(this.clip,{transform:this.matrix.invert()}),this.pattern&&b$(this),this.node&&bU(this.node,{transform:this.matrix});if(b.sx!=1||b.sy!=1){var c=this.attrs[f]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":c})}return this},ce.hide=function(){!this.removed&&(this.node.style.display="none");return this},ce.show=function(){!this.removed&&(this.node.style.display="");return this},ce.remove=function(){if(!this.removed){dc.unbind("*.*."+this.id),bG(this,this.paper),this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=!0}},ce._getBBox=function(){if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}a&&this.hide();return b},ce.attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient,d.transform=this._.transform;return d}if(c==null&&a.is(b,C)){if(b==F&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(b=="transform")return this._.transform;return b in this.attrs?this.attrs[b]:a.is(this.paper.customAttributes[b],"function")?this.paper.customAttributes[b].def:T[b]}if(c==null&&a.is(b,D)){var g={};for(var h=0,i=b.length;h<i;h++)g[b[h]]=this.attr(b[h]);return g}if(c!=null){var j={};j[b]=c}else b!=null&&a.is(b,"object")&&(j=b);for(var k in this.paper.customAttributes)if(this.paper.customAttributes[f](k)&&j[f](k)&&a.is(this.paper.customAttributes[k],"function")){var l=this.paper.customAttributes[k].apply(this,[][m](j[k]));this.attrs[k]=j[k];for(var n in l)l[f](n)&&(j[n]=l[n])}ca(this,j);return this},ce.toFront=function(){if(this.removed)return this;this.node.parentNode.appendChild(this.node);var a=this.paper;a.top!=this&&bH(this,a);return this},ce.toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),bI(this,this.paper);var a=this.paper}return this},ce.insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode.appendChild(this.node),bJ(this,a,this.paper);return this},ce.insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;b.parentNode.insertBefore(this.node,b),bK(this,a,this.paper);return this},ce.blur=function(a){var b=this;if(+a!==0){var c=bU("filter"),d=bU("feGaussianBlur");b.attrs.blur=a,c.id=bk(),bU(d,{stdDeviation:+a||1.5}),c.appendChild(d),b.paper.defs.appendChild(c),b._blur=c,bU(b.node,{filter:"url(#"+c.id+")"})}else b._blur&&(b._blur.parentNode.removeChild(b._blur),delete b._blur,delete b.attrs.blur),b.node.removeAttribute("filter")};var cf=function(a,b,c,d){var e=bU("circle");a.canvas&&a.canvas.appendChild(e);var f=new cd(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",bU(e,f.attrs);return f},cg=function(a,b,c,d,e,f){var g=bU("rect");a.canvas&&a.canvas.appendChild(g);var h=new cd(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",bU(g,h.attrs);return h},ch=function(a,b,c,d,e){var f=bU("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new cd(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",bU(f,g.attrs);return g},ci=function(a,b,c,d,e,f){var g=bU("image");bU(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(bR,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new cd(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image";return h},cj=function(a,b,c,d){var e=bU("text");bU(e,{x:b,y:c,"text-anchor":"middle"}),a.canvas&&a.canvas.appendChild(e);var f=new cd(e,a);f.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:T.font,stroke:"none",fill:"#000"},f.type="text",ca(f,f.attrs);return f},ck=function(a,b){this.width=a||this.width,this.height=b||this.height,this.canvas[O]("width",this.width),this.canvas[O]("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox);return this},cl=function(){var b=bE[l](0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,h=b.height;if(!c)throw new Error("SVG container not found.");var j=bU("svg"),k="overflow:hidden;";d=d||0,e=e||0,f=f||512,h=h||342,bU(j,{height:h,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),c==1?(j.style.cssText=k+"position:absolute;left:"+d+"px;top:"+e+"px",g.doc.body.appendChild(j)):(j.style.cssText=k,c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j)),c=new i,c.width=f,c.height=h,c.canvas=j,bF.call(c,c,a.fn),c.clear();return c},cm=function(a,b,c,d,e){dc("setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=w(c/this.width,d/this.height),g=this.top,h=e?"meet":"xMinYMin",i,j;a==null?(this._vbSize&&(f=1),delete this._vbSize,i="0 0 "+this.width+p+this.height):(this._vbSize=f,i=a+p+b+p+c+p+d),bU(this.canvas,{viewBox:i,preserveAspectRatio:h});while(f&&g)j="stroke-width"in g.attrs?g.attrs["stroke-width"]:1,g.attr({"stroke-width":j}),g._.dirty=1,g._.dirtyT=1,g=g.prev;this._viewBox=[a,b,c,d,!!e];return this};j.clear=function(){dc("clear",this);var b=this.canvas;while(b.firstChild)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=bU("desc")).appendChild(g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=bU("defs"))},j.remove=function(){dc("remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bL(a)}}if(a.vml){var cn={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},co=/([clmz]),?([^clmz]*)/gi,cp=/ progid:\S+Blur\([^\)]+\)/g,cq=/-?[^,\s-]+/g,cr="position:absolute;left:0;top:0;width:1px;height:1px",cs=21600,ct={path:1,rect:1},cu={circle:1,ellipse:1},cv=function(a){var b=/[ahqstv]/ig,c=bw;q(a).match(b)&&(c=bC),b=/[clmz]/g;if(c==bw&&!q(a).match(b)){var d=q(a).replace(co,function(a,b,c){var d=[],e=u.call(b)=="m",f=cn[b];c.replace(cq,function(a){e&&d.length==2&&(f+=d+cn[b=="m"?"l":"L"],d=[]),d.push(N(a*cs))});return f+d});return d}var e=c(a),f,g;d=[];for(var h=0,i=e.length;h<i;h++){f=e[h],g=u.call(e[h][0]),g=="z"&&(g="x");for(var j=1,k=f.length;j<k;j++)g+=N(f[j]*cs)+(j!=k-1?",":o);d.push(g)}return d.join(p)},cw=function(a,b,c){var d=new bP;d.rotate(-a,.5,.5);return{dx:d.x(b,c),dy:d.y(b,c)}},cx=function(a){var b=a._,c=b.sx,d=b.sy,e=b.deg,f=b.dx,g=b.dy,h=b.fillpos,i=a.node,j=i.style,k=1,l=a.matrix,m="",n,o=cs/c,q=cs/d;j.visibility="hidden",i.coordsize=y(o)+p+y(q),j.rotation=e*(c*d<0?-1:1);if(e){var r=cw(e,f,g);f=r.dx,g=r.dy}c<0&&(m+="x"),d<0&&(m+=" y")&&(k=-1),j.flip=m,i.coordorigin=f*-o+p+g*-q;if(h||b.fillsize){var s=i.getElementsByTagName(F);s=s&&s[0],i.removeChild(s),h&&(r=cw(e,l.x(h[0],h[1]),l.y(h[0],h[1])),s.position=r.dx*k+p+r.dy*k),b.fillsize&&(s.size=b.fillsize[0]*y(c)+p+b.fillsize[1]*y(d)),i.appendChild(s)}j.visibility="visible"};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version},b_=function(a,b,c){var d=q(b).toLowerCase().split("-"),e=c?"end":"start",f=d.length,g="classic",h="medium",i="medium";while(f--)switch(d[f]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":g=d[f];break;case"wide":case"narrow":i=d[f];break;case"long":case"short":h=d[f]}var j=a.node.getElementsByTagName("stroke")[0];j[e+"arrow"]=g,j[e+"arrowlength"]=h,j[e+"arrowwidth"]=i},ca=function(c,d){c.paper.canvas.style.display="none",c.attrs=c.attrs||{};var e=c.node,h=c.attrs,i=e.style,j,k=ct[c.type]&&(d.x!=h.x||d.y!=h.y||d.width!=h.width||d.height!=h.height||d.cx!=h.cx||d.cy!=h.cy||d.rx!=h.rx||d.ry!=h.ry||d.r!=h.r),l=cu[c.type]&&(h.cx!=d.cx||h.cy!=d.cy||h.r!=d.r||h.rx!=d.rx||h.ry!=d.ry),m=c;for(var n in d)d[f](n)&&(h[n]=d[n]);k&&(h.path=bg[c.type](c),c._.dirty=1),d.href&&(e.href=d.href),d.title&&(e.title=d.title),d.target&&(e.target=d.target),d.cursor&&(i.cursor=d.cursor),"blur"in d&&c.blur(d.blur),"transform"in d&&c.transform(d.transform);if(d.path&&c.type=="path"||k)e.path=cv(h.path);if(l){var r=h.cx,s=h.cy,t=h.rx||h.r||0,u=h.ry||h.r||0;e.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",N((r-t)*cs),N((s-u)*cs),N((r+t)*cs),N((s+u)*cs),N(r*cs))}if("clip-rect"in d){var v=q(d["clip-rect"]).split(b);if(v.length==4){v[2]=+v[2]+ +v[0],v[3]=+v[3]+ +v[1];var y=e.clipRect||g.doc.createElement("div"),z=y.style,A=e.parentNode;z.clip=a.format("rect({1}px {2}px {3}px {0}px)",v),e.clipRect||(z.position="absolute",z.top=0,z.left=0,z.width=c.paper.width+"px",z.height=c.paper.height+"px",A.parentNode.insertBefore(y,A),y.appendChild(A),e.clipRect=y)}d["clip-rect"]||e.clipRect&&(e.clipRect.style.clip=o)}if(c.textpath){var B=c.textpath.style;d.font&&(B.font=d.font),d["font-family"]&&(B.fontFamily='"'+d["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),d["font-size"]&&(B.fontSize=d["font-size"]),d["font-weight"]&&(B.fontWeight=d["font-weight"]),d["font-style"]&&(B.fontStyle=d["font-style"])}"arrow-start"in d&&b_(m,d["arrow-start"]),"arrow-end"in d&&b_(m,d["arrow-end"],1);if(d.opacity!=null||d["stroke-width"]!=null||d.fill!=null||d.src!=null||d.stroke!=null||d["stroke-width"]!=null||d["stroke-opacity"]!=null||d["fill-opacity"]!=null||d["stroke-dasharray"]!=null||d["stroke-miterlimit"]!=null||d["stroke-linejoin"]!=null||d["stroke-linecap"]!=null){var C=e.getElementsByTagName(F),D=!1;C=C&&C[0],!C&&(D=C=cy(F)),c.type=="image"&&d.src&&(C.src=d.src);if("fill-opacity"in d||"opacity"in d){var E=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+a.getRGB(d.fill).o+1||2)-1);E=x(w(E,0),1),C.opacity=E}d.fill&&(C.on=!0);if(C.on==null||d.fill=="none"||d.fill===null)C.on=!1;if(C.on&&d.fill){var G=d.fill.match(J);if(G){C.parentNode==e&&e.removeChild(C),C.rotate=!0,C.src=G[1],C.type="tile";var H=c.getBBox(1);C.position=H.x+p+H.y,c._.fillpos=[H.x,H.y],bs(G[1],function(){c._.fillsize=[this.offsetWidth,this.offsetHeight]})}else C.color=a.getRGB(d.fill).hex,C.src=o,C.type="solid",a.getRGB(d.fill).error&&(m.type in{circle:1,ellipse:1}||q(d.fill).charAt()!="r")&&bZ(m,d.fill,C)&&(h.fill="none",h.gradient=d.fill,C.rotate=!1)}e.appendChild(C);var I=e.getElementsByTagName("stroke")&&e.getElementsByTagName("stroke")[0],K=!1;!I&&(K=I=cy("stroke"));if(d.stroke&&d.stroke!="none"||d["stroke-width"]||d["stroke-opacity"]!=null||d["stroke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])I.on=!0;(d.stroke=="none"||d.stroke===null||I.on==null||d.stroke==0||d["stroke-width"]==0)&&(I.on=!1);var L=a.getRGB(d.stroke);I.on&&d.stroke&&(I.color=L.hex),E=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+L.o+1||2)-1);var M=(P(d["stroke-width"])||1)*.75;E=x(w(E,0),1),d["stroke-width"]==null&&(M=h["stroke-width"]),d["stroke-width"]&&(I.weight=M),M&&M<1&&(E*=M)&&(I.weight=1),I.opacity=E,d["stroke-linejoin"]&&(I.joinstyle=d["stroke-linejoin"]||"miter"),I.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(I.endcap=d["stroke-linecap"]=="butt"?"flat":d["stroke-linecap"]=="square"?"square":"round");if(d["stroke-dasharray"]){var O={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};I.dashstyle=O[f](d["stroke-dasharray"])?O[d["stroke-dasharray"]]:o}K&&e.appendChild(I)}if(m.type=="text"){m.paper.canvas.style.display=o;var Q=m.paper.span,R=100,S=h.font&&h.font.match(/\d+(?:\.\d*)?(?=px)/);i=Q.style,h.font&&(i.font=h.font),h["font-family"]&&(i.fontFamily=h["font-family"]),h["font-weight"]&&(i.fontWeight=h["font-weight"]),h["font-style"]&&(i.fontStyle=h["font-style"]),S=P(S?S[0]:h["font-size"]),i.fontSize=S*R+"px",m.textpath.string&&(Q.innerHTML=q(m.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var T=Q.getBoundingClientRect();m.W=h.w=(T.right-T.left)/R,m.H=h.h=(T.bottom-T.top)/R,m.paper.canvas.style.display="none",m.X=h.x,m.Y=h.y+m.H/2,("x"in d||"y"in d)&&(m.path.v=a.format("m{0},{1}l{2},{1}",N(h.x*cs),N(h.y*cs),N(h.x*cs)+1));var U=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var V=0,W=U.length;V<W;V++)if(U[V]in d){m._.dirty=1;break}switch(h["text-anchor"]){case"start":m.textpath.style["v-text-align"]="left",m.bbx=m.W/2;break;case"end":m.textpath.style["v-text-align"]="right",m.bbx=-m.W/2;break;default:m.textpath.style["v-text-align"]="center",m.bbx=0}m.textpath.style["v-text-kern"]=!0}m.paper.canvas.style.display=o},bZ=function(a,b,c){a.attrs=a.attrs||{};var d=a.attrs,e="linear",f=".5 .5";a.attrs.gradient=b,b=q(b).replace(_,function(a,b,c){e="radial",b&&c&&(b=P(b),c=P(c),z(b-.5,2)+z(c-.5,2)>.25&&(c=v.sqrt(.25-z(b-.5,2))*((c>.5)*2-1)+.5),f=b+p+c);return o}),b=b.split(/\s*\-\s*/);if(e=="linear"){var g=b.shift();g=-P(g);if(isNaN(g))return null}var h=bD(b);if(!h)return null;a=a.shape||a.node;if(h.length){a.removeChild(c),c.on=!0,c.method="none",c.color=h[0].color,c.color2=h[h.length-1].color;var i=[];for(var j=0,k=h.length;j<k;j++)h[j].offset&&i.push(h[j].offset+p+h[j].color);c.colors&&(c.colors.value=i.length?i.join():"0% "+c.color),e=="radial"?(c.type="gradientTitle",c.focus="100%",c.focussize="0 0",c.focusposition=f,c.angle=0):(c.type="gradient",c.angle=(270-g)%360),a.appendChild(c)}return 1},cd=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=new bP,this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},ce=cd.prototype,ce.transform=function(a){if(a==null)return this._.transform;bM(this,a);var b=this.matrix.clone(),c=this.skew;b.translate(-.5,-.5);if(this.type=="image")if(q(a).indexOf("m")+1){this.node.style.filter=b.toFilter();var d=this.getBBox(),e=this.getBBox(1),f=b.invert(),g=f.x(d.x,d.y)-f.x(e.x,e.y),h=f.y(d.x,d.y)-f.y(e.x,e.y)}else this.node.style.filter=o,cx(this);else this.node.style.filter=o,c.matrix=b,c.offset=b.offset();return this},ce.rotate=function(a,c,d){if(this.removed)return this;if(a!=null){a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2])),a=P(a[0]),d==null&&(c=d);if(c==null||d==null){var e=this.getBBox(1);c=e.x+e.width/2,d=e.y+e.height/2}this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,c,d]]));return this}},ce.translate=function(a,c){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1])),a=P(a[0])||0,c=+c||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=c),this.transform(this._.transform.concat([["t",a,c]]));return this},ce.scale=function(a,c,d,e){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2]),e=P(a[3]),isNaN(d)&&(d=null),isNaN(e)&&(e=null)),a=P(a[0]),c==null&&(c=a),e==null&&(d=e);if(d==null||e==null)var f=this.getBBox(1);d=d==null?f.x+f.width/2:d,e=e==null?f.y+f.height/2:e,this.transform(this._.transform.concat([["s",a,c,d,e]])),this._.dirtyT=1;return this},ce.hide=function(){!this.removed&&(this.node.style.display="none");return this},ce.show=function(){!this.removed&&(this.node.style.display=o);return this},ce._getBBox=function(){if(this.removed)return{};return this.type=="text"?{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}:bt(this.attrs.path)},ce.remove=function(){if(!this.removed){dc.unbind("*.*."+this.id),bG(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)delete this[a];this.removed=!0}},ce.attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,"string")){if(b==F&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return b in this.attrs?this.attrs[b]:a.is(this.paper.customAttributes[b],"function")?this.paper.customAttributes[b].def:T[b]}if(this.attrs&&c==null&&a.is(b,D)){var g,h={};for(e=0,g=b.length;e<g;e++)h[b[e]]=this.attr(b[e]);return h}var i;c!=null&&(i={},i[b]=c),c==null&&a.is(b,"object")&&(i=b);for(var j in i)dc("attr."+j+"."+this.id,this,i[j]);if(i){for(j in this.paper.customAttributes)if(this.paper.customAttributes[f](j)&&i[f](j)&&a.is(this.paper.customAttributes[j],"function")){var k=this.paper.customAttributes[j].apply(this,[][m](i[j]));this.attrs[j]=i[j];for(var l in k)k[f](l)&&(i[l]=k[l])}i.text&&this.type=="text"&&(this.textpath.string=i.text),ca(this,i)}return this},ce.toFront=function(){!this.removed&&this.node.parentNode.appendChild(this.node),this.paper.top!=this&&bH(this,this.paper);return this},ce.toBack=function(){if(this.removed)return this;this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),bI(this,this.paper));return this},ce.insertAfter=function(a){if(this.removed)return this;a.constructor==c_&&(a=a[a.length-1]),a.node.nextSibling?a.node.parentNode.insertBefore(this.node,a.node.nextSibling):a.node.parentNode.appendChild(this.node),bJ(this,a,this.paper);return this},ce.insertBefore=function(a){if(this.removed)return this;a.constructor==c_&&(a=a[0]),a.node.parentNode.insertBefore(this.node,a.node),bK(this,a,this.paper);return this},ce.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(cp,o),+b!==0?(this.attrs.blur=b,c.filter=d+p+R+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",N(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},bV=function(a,b){var c=cy("shape");c.style.cssText=cr,c.coordsize=cs+p+cs,c.coordorigin=b.coordorigin;var d=new cd(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,ca(d,e),b.canvas.appendChild(c);var f=cy("skew");f.on=!0,c.appendChild(f),d.skew=f,d.transform(o);return d},cg=function(a,b,c,d,e,f){var g=be(b,c,d,e,f),h=a.path(g),i=h.attrs;h.X=i.x=b,h.Y=i.y=c,h.W=i.width=d,h.H=i.height=e,i.r=f,i.path=g,h.type="rect";return h},ch=function(a,b,c,d,e){var f=a.path(),g=f.attrs;f.X=b-d,f.Y=c-e,f.W=d*2,f.H=e*2,f.type="ellipse",ca(f,{cx:b,cy:c,rx:d,ry:e});return f},cf=function(a,b,c,d){var e=a.path(),f=e.attrs;e.X=b-d,e.Y=c-d,e.W=e.H=d*2,e.type="circle",ca(e,{cx:b,cy:c,r:d});return e},ci=function(a,b,c,d,e,f){var g=be(c,d,e,f),h=a.path(g).attr({stroke:"none"}),i=h.attrs,j=h.node,k=j.getElementsByTagName(F)[0];i.src=b,h.X=i.x=c,h.Y=i.y=d,h.W=i.width=e,h.H=i.height=f,i.path=g,h.type="image",k.parentNode==j&&j.removeChild(k),k.rotate=!0,k.src=b,k.type="tile",h._.fillpos=[c,d],h._.fillsize=[e,f],j.appendChild(k),cx(h);return h},cj=function(b,c,d,e){var f=cy("shape"),g=cy("path"),h=cy("textpath");c=c||0,d=d||0,e=e||"",g.v=a.format("m{0},{1}l{2},{1}",N(c*cs),N(d*cs),N(c*cs)+1),g.textpathok=!0,h.string=q(e),h.on=!0,f.style.cssText="position:absolute;left:0;top:0;width:1;height:1",f.coordsize=cs+p+cs,f.coordorigin="0 0";var i=new cd(f,b),j={fill:"#000",stroke:"none",font:T.font,text:e};i.shape=f,i.path=g,i.textpath=h,i.type="text",i.attrs.text=q(e),i.attrs.x=c,i.attrs.y=d,i.attrs.w=1,i.attrs.h=1,ca(i,j),f.appendChild(h),f.appendChild(g),b.canvas.appendChild(f);var k=cy("skew");k.on=!0,f.appendChild(k),i.skew=k,i.transform(o);return i},ck=function(a,b){var c=this.canvas.style;this.width=a,this.height=b,a==+a&&(a+="px"),b==+b&&(b+="px"),c.width=a,c.height=b,c.clip="rect(0 "+a+" "+b+" 0)",this._viewBox&&cm.apply(this,this._viewBox);return this},cm=function(a,b,c,d,e){dc("setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=this.width,g=this.height,h=1e3*w(c/f,d/g),i,j;e&&(i=g/d,j=f/c,c*i<f&&(a-=(f-c*i)/2/i),d*j<g&&(b-=(g-d*j)/2/j)),this._viewBox=[a,b,c,d,!!e],this.forEach(function(a){a.transform("+")});return this};var cy,cz=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),cy=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){cy=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}};cz(g.win),cl=function(){var b=bE[l](0,arguments),c=b.container,d=b.height,e,f=b.width,h=b.x,j=b.y;if(!c)throw new Error("VML container not found.");var k=new i,m=k.canvas=g.doc.createElement("div"),n=m.style;h=h||0,j=j||0,f=f||512,d=d||342,k.width=f,k.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),k.coordsize=cs*1e3+p+cs*1e3,k.coordorigin="0 0",k.span=g.doc.createElement("span"),k.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",m.appendChild(k.span),n.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(g.doc.body.appendChild(m),n.left=h+"px",n.top=j+"px",n.position="absolute"):c.firstChild?c.insertBefore(m,c.firstChild):c.appendChild(m),bF.call(k,k,a.fn);return k},j.clear=function(){dc("clear",this),this.canvas.innerHTML=o,this.span=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},j.remove=function(){dc("remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bL(a);return!0}}var cA=navigator.userAgent.match(/Version\/(.*?)\s/);navigator.vendor=="Apple Computer, Inc."&&(cA&&cA[1]<4||navigator.platform.slice(0,2)=="iP")?j.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:j.safari=bc;var cB=function(){this.returnValue=!1},cC=function(){return this.originalEvent.preventDefault()},cD=function(){this.cancelBubble=!0},cE=function(){return this.originalEvent.stopPropagation()},cF=function(){if(g.doc.addEventListener)return function(a,b,c,d){var e=n&&t[b]?t[b]:b,g=function(e){if(n&&t[f](b))for(var g=0,h=e.targetTouches&&e.targetTouches.length;g<h;g++)if(e.targetTouches[g].target==a){var i=e;e=e.targetTouches[g],e.originalEvent=i,e.preventDefault=cC,e.stopPropagation=cE;break}return c.call(d,e)};a.addEventListener(e,g,!1);return function(){a.removeEventListener(e,g,!1);return!0}};if(g.doc.attachEvent)return function(a,b,c,d){var e=function(a){a=a||g.win.event,a.preventDefault=a.preventDefault||cB,a.stopPropagation=a.stopPropagation||cD;return c.call(d,a)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return!0};return f}}(),cG=[],cH=function(a){var b=a.clientX,c=a.clientY,d=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,e=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft,f,h=cG.length;while(h--){f=cG[h];if(n){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX,c=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();var k=f.el.node,l,m=k.nextSibling,o=k.parentNode,p=k.style.display;g.win.opera&&o.removeChild(k),k.style.display="none",l=f.el.paper.getElementByPoint(b,c),k.style.display=p,g.win.opera&&(m?o.insertBefore(k,m):o.appendChild(k)),l&&dc("drag.over."+f.el.id,f.el,l),b+=e,c+=d,dc("drag.move."+f.el.id,f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},cI=function(b){a.unmousemove(cH).unmouseup(cI);var c=cG.length,d;while(c--)d=cG[c],d.el._drag={},dc("drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,b);cG=[]};for(var cJ=s.length;cJ--;)(function(b){a[b]=cd.prototype[b]=function(c,d){a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:cF(this.shape||this.node||g.doc,b,c,d||this)}));return this},a["un"+b]=cd.prototype["un"+b]=function(a){var c=this.events,d=c.length;while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind(),c.splice(d,1),!c.length&&delete this.events;return this}return this}})(s[cJ]);ce.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},ce.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)},ce.drag=function(b,c,d,e,f,h){function i(i){(i.originalEvent||i).preventDefault();var j=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,k=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!cG.length&&a.mousemove(cH).mouseup(cI),cG.push({el:this,move_scope:e,start_scope:f,end_scope:h}),c&&dc.on("drag.start."+this.id,c),b&&dc.on("drag.move."+this.id,b),d&&dc.on("drag.end."+this.id,d),dc("drag.start."+this.id,f||e||this,i.clientX+k,i.clientY+j,i)}this._drag={},this.mousedown(i);return this},ce.onDragOver=function(a){a?dc.on("drag.over."+this.id,a):dc.unbind("drag.over."+this.id)},ce.undrag=function(){var b=cG.length;while(b--)cG[b].el==this&&(a.unmousedown(cG[b].start),cG.splice(b++,1),dc.unbind("drag.*."+this.id));!cG.length&&a.unmousemove(cH).unmouseup(cI)},j.circle=function(a,b,c){return cf(this,a||0,b||0,c||0)},j.rect=function(a,b,c,d,e){return cg(this,a||0,b||0,c||0,d||0,e||0)},j.ellipse=function(a,b,c,d){return ch(this,a||0,b||0,c||0,d||0)},j.path=function(b){b&&!a.is(b,C)&&!a.is(b[0],D)&&(b+=o);return bV(a.format[l](a,arguments),this)},j.image=function(a,b,c,d,e){return ci(this,a||"about:blank",b||0,c||0,d||0,e||0)},j.text=function(a,b,c){return cj(this,a||0,b||0,q(c))},j.set=function(a){arguments.length>1&&(a=Array.prototype.splice.call(arguments,0,arguments.length));return new c_(a)},j.setSize=ck,j.setViewBox=cm,j.top=j.bottom=null,j.raphael=a;var cK=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,h=e.clientLeft||d.clientLeft||0,i=b.top+(g.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(g.win.pageXOffset||e.scrollLeft||d.scrollLeft)-h;return{y:i,x:j}};j.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=g.doc.elementFromPoint(a,b);if(g.win.opera&&e.tagName=="svg"){var f=cK(d),h=d.createSVGRect();h.x=a-f.x,h.y=b-f.y,h.width=h.height=1;var i=d.getIntersectionList(h,null);i.length&&(e=i[i.length-1])}if(!e)return null;while(e.parentNode&&e!=d.parentNode&&!e.raphael)e=e.parentNode;e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null;return e},j.getById=function(a){var b=this.bottom;while(b){if(b.id==a)return b;b=b.next}return null},j.forEach=function(a,b){var c=this.bottom;while(c){if(a.call(b,c)===!1)return this;c=c.next}return this},ce.getBBox=function(a){if(this.removed)return{};var b=this._;if(a){if(b.dirty||!b.bboxwt)this.realPath=bg[this.type](this),b.bboxwt=bt(this.realPath),b.bboxwt.toString=cM,b.dirty=0;return b.bboxwt}if(b.dirty||b.dirtyT||!b.bbox){if(b.dirty||!this.realPath)b.bboxwt=0,this.realPath=bg[this.type](this);b.bbox=bt(bh(this.realPath,this.matrix)),b.bbox.toString=cM,b.dirty=b.dirtyT=0}return b.bbox},ce.clone=function(){if(this.removed)return null;var a=this.attr();delete a.scale,delete a.translation;return this.paper[this.type]().attr(a)},ce.glow=function(a){if(this.type=="text")return null;a=a||{};var b={width:a.width||10,fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||bg[this.type](this);f=this.matrix?bh(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var cN={},cO=function(b,c,d,e,f,g,h,i,j){var k=0,l=100,m=[b,c,d,e,f,g,h,i].join(),n=cN[m],o,p;!n&&(cN[m]=n={data:[]}),n.timer&&clearTimeout(n.timer),n.timer=setTimeout(function(){delete cN[m]},2e3);if(j!=null&&!n.precision){var q=cO(b,c,d,e,f,g,h,i);n.precision=~~q*10,n.data=[]}l=n.precision||l;for(var r=0;r<l+1;r++){n.data[r*l]?p=n.data[r*l]:(p=a.findDotsAtSegment(b,c,d,e,f,g,h,i,r/l),n.data[r*l]=p),r&&(k+=z(z(o.x-p.x,2)+z(o.y-p.y,2),.5));if(j!=null&&k>=j)return p;o=p}if(j==null)return k},cP=function(b,c){return function(d,e,f){d=bC(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=cO(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cO(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cO(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},cQ=cP(1),cR=cP(),cS=cP(0,1);a.getTotalLength=cQ,a.getPointAtLength=cR,a.getSubpath=function(a,b,c){if(y(this.getTotalLength(a)-c)<1e-6)return cS(a,b).end;var d=cS(a,c,1);return b?cS(d,b).end:d},ce.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return cQ(this.attrs.path)}},ce.getPointAtLength=function(a){if(this.type=="path")return cR(this.attrs.path,a)},ce.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var cT=a.easing_formulas={linear:function(a){return a},"<":function(a){return z(a,1.7)},">":function(a){return z(a,.48)},"<>":function(a){var b=.48-a/1.04,c=v.sqrt(.1734+b*b),d=c-b,e=z(y(d),1/3)*(d<0?-1:1),f=-c-b,g=z(y(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return z(2,-10*a)*v.sin((a-.075)*(2*A)/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};cT.easeIn=cT["ease-in"]=cT["<"],cT.easeOut=cT["ease-out"]=cT[">"],cT.easeInOut=cT["ease-in-out"]=cT["<>"],cT["back-in"]=cT.backIn,cT["back-out"]=cT.backOut;var cU=[],cV=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cW=function(){var b=+(new Date),c=0;for(;c<cU.length;c++){var d=cU[c];if(d.el.removed||d.paused)continue;var e=b-d.start,g=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,n={},o;d.initstatus?(e=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*g,d.status=d.initstatus,delete d.initstatus,d.stop&&cU.splice(c--,1)):d.status=(d.prev+(d.percent-d.prev)*(e/g))/d.anim.top;if(e<0)continue;if(e<g){var q=h(e/g);for(var r in i)if(i[f](r)){switch(U[r]){case B:o=+i[r]+q*g*j[r];break;case"colour":o="rgb("+[cX(N(i[r].r+q*g*j[r].r)),cX(N(i[r].g+q*g*j[r].g)),cX(N(i[r].b+q*g*j[r].b))].join(",")+")";break;case"path":o=[];for(var s=0,t=i[r].length;s<t;s++){o[s]=[i[r][s][0]];for(var u=1,v=i[r][s].length;u<v;u++)o[s][u]=+i[r][s][u]+q*g*j[r][s][u];o[s]=o[s].join(p)}o=o.join(p);break;case"transform":if(j[r].real){o=[];for(s=0,t=i[r].length;s<t;s++){o[s]=[i[r][s][0]];for(u=1,v=i[r][s].length;u<v;u++)o[s][u]=i[r][s][u]+q*g*j[r][s][u]}}else{var w=function(a){return+i[r][a]+q*g*j[r][a]};o=[["m",w(0),w(1),w(2),w(3),w(4),w(5)]]}break;case"csv":if(r=="clip-rect"){o=[],s=4;while(s--)o[s]=+i[r][s]+q*g*j[r][s]}break;default:var x=[].concat(i[r]);o=[],s=m.paper.customAttributes[r].length;while(s--)o[s]=+x[s]+q*g*j[r][s]}n[r]=o}m.attr(n),function(a,b,c){setTimeout(function(){dc("anim.frame."+a,b,c)})}(m.id,m,d.anim)}else(function(b,c,d){setTimeout(function(){dc("anim.finish."+c.id,c,d),a.is(b,"function")&&b.call(c)})})(d.callback,m,d.anim),--d.repeat?(m.attr(d.origin),d.start=b):(m.attr(k),cU.splice(c--,1)),d.next&&!d.stop&&c$(d.anim,d.el,d.next,null,d.totalOrigin)}a.svg&&m&&m.paper&&m.paper.safari(),cU.length&&cV(cW)},cX=function(a){return w(x(a,255),0)};ce.animateWith=function(a,b,c,d,e){for(var f=0,g=cU.length;f<g;f++)if(cU[f].el.id==a.id){b.start=cU[f].timestamp;break}return this.animate(b,c,d,e)},ce.onAnimation=function(a){a?dc.on("anim.frame."+this.id,a):dc.unbind("anim.frame."+this.id);return this},cZ.prototype.delay=function(a){var b=new cZ(this.anim,this.ms);b.times=this.times,b.del=+a||0;return b},cZ.prototype.repeat=function(a){var b=new cZ(this.anim,this.ms);b.del=this.del,b.times=v.floor(w(a,0))||1;return b},a.animation=function(b,c,d,e){if(a.is(d,"function")||!d)e=e||d||null,d=null;b=Object(b),c=+c||0;var g={},h,i;for(i in b)b[f](i)&&P(i)!=i&&(h=!0,g[i]=b[i]);if(h){d&&(g.easing=d),e&&(g.callback=e);return new cZ({100:g},c)}return new cZ(b,c)},ce.animate=function(b,c,d,e){var f=this;if(f.removed){e&&e.call(f);return f}var g=b instanceof cZ?b:a.animation(b,c,d,e);c$(g,f,g.percents[0],null,f.attr());return f},ce.setTime=function(a,b){a&&b!=null&&this.status(a,x(b,a.ms)/a.ms);return this},ce.status=function(a,b){var c=[],d=0,e,f;if(b!=null){c$(a,this,-1,x(b,1));return this}e=cU.length;for(;d<e;d++){f=cU[d];if(f.el.id==this.id&&(!a||f.anim==a)){if(a)return f.status;c.push({anim:f.anim,status:f.status})}}if(a)return 0;return c},ce.pause=function(a){for(var b=0;b<cU.length;b++)cU[b].el.id==this.id&&(!a||cU[b].anim==a)&&(dc("anim.pause."+this.id,this,cU[b].anim)!==!1&&(cU[b].paused=!0));return this},ce.resume=function(a){for(var b=0;b<cU.length;b++)if(cU[b].el.id==this.id&&(!a||cU[b].anim==a)){var c=cU[b];dc("anim.resume."+this.id,this,c.anim)!==!1&&(delete c.paused,this.status(c.anim,c.status))}return this},ce.stop=function(a){for(var b=0;b<cU.length;b++)cU[b].el.id==this.id&&(!a||cU[b].anim==a)&&(dc("anim.stop."+this.id,this,cU[b].anim)!==!1&&cU.splice(b--,1));return this},ce.toString=function(){return"Raphaël’s object"};var c_=function(a){this.items=[],this.length=0,this.type="set";if(a)for(var b=0,c=a.length;b<c;b++)a[b]&&(a[b].constructor==cd||a[b].constructor==c_)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},da=c_.prototype;da.push=function(){var a,b;for(var c=0,d=arguments.length;c<d;c++)a=arguments[c],a&&(a.constructor==cd||a.constructor==c_)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},da.pop=function(){this.length&&delete this[this.length--];return this.items.pop()};for(var db in ce)ce[f](db)&&(da[db]=function(a){return function(){for(var b=0,c=this.items.length;b<c;b++)this.items[b][a][l](this.items[b],arguments);return this}}(db));da.attr=function(b,c){if(b&&a.is(b,D)&&a.is(b[0],"object"))for(var d=0,e=b.length;d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(b,c);return this},da.animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items.length,g=f,h,i=this,j;e&&(j=function(){!--f&&e.call(i)}),d=a.is(d,C)?d:j;var k=b instanceof cZ?b:a.animation(b,c,d,j);h=this.items[--g].animate(k);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,k);return this},da.insertAfter=function(a){var b=this.items.length;while(b--)this.items[b].insertAfter(a);return this},da.getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}a=x[l](0,a),b=x[l](0,b);return{x:a,y:b,width:w[l](0,c)-a,height:w[l](0,d)-b}},da.clone=function(a){a=new c_;for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},da.toString=function(){return"Raphaël‘s set"},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[f](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=Q(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[f](e)){var g=a.glyphs[e];b.glyphs[e]={w:g.w,k:{},d:g.d&&"M"+g.d.replace(/[mlcxtrv]/g,function(a){return({l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"})[a]||"M"})+"z"};if(g.k)for(var h in g.k)g[f](h)&&(b.glyphs[e].k[h]=g.k[h])}}return a},j.getFont=function(b,c,d,e){e=e||"normal",d=d||"normal",c=+c||({normal:400,bold:700,lighter:300,bolder:800})[c]||400;if(a.fonts){var g=a.fonts[b];if(!g){var h=new RegExp("(^|\\s)"+b.replace(/[^\w\d\s+!~.:_-]/g,o)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[f](i))if(h.test(i)){g=a.fonts[i];break}}var j;if(g)for(var k=0,l=g.length;k<l;k++){j=g[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j}},j.print=function(c,d,e,f,g,h,i){h=h||"middle",i=w(x(i||0,1),-1);var j=this.set(),k=q(e).split(o),l=0,m=o,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var p=f.face.bbox.split(b),r=+p[0],s=+p[1]+(h=="baseline"?p[3]-p[1]+ +f.face.descent:(p[3]-p[1])/2);for(var t=0,u=k.length;t<u;t++){var v=t&&f.glyphs[k[t-1]]||{},y=f.glyphs[k[t]];l+=t?(v.w||f.w)+(v.k&&v.k[k[t]]||0)+f.w*i:0,y&&y.d&&j.push(this.path(y.d).attr({fill:"#000",stroke:"none",transform:[["t",l,0]]}))}j.scale(n,n,r,s).translate(c-r,d-s)}return j},a.format=function(b,c){var e=a.is(c,D)?[0][m](c):arguments;b&&a.is(b,C)&&e.length-1&&(b=b.replace(d,function(a,b){return e[++b]==null?o:e[b]}));return b||o},a.ninja=function(){h.was?g.win.Raphael=h.is:delete Raphael;return a},a.el=ce,a.st=da,function(a,b,c){function d(){/in/.test(a.readyState)?setTimeout(d,9):dc("DOMload")}a.readyState==null&&a.addEventListener&&(a.addEventListener(b,c=function(){a.removeEventListener(b,c,!1),a.readyState="complete"},!1),a.readyState="loading"),d()}(document,"DOMContentLoaded"),h.was?g.win.Raphael=a:Raphael=a;var dc=a.eve=function(){var a="0.2.1",b="hasOwnProperty",c=/[\.\/]/,d="*",e={n:{}},f=function(a,b){var c=e,d=Array.prototype.slice.call(arguments,2),g=f.listeners(a),h=[];for(var i=0,j=g.length;i<j;i++)try{g[i].apply(b,d)}catch(k){h.push({error:k&&k.message||k,func:g[i]})}if(h.length)return h};f.listeners=function(a){var b=a.split(c),f=e,g,h,i,j,k,l,m,n,o=[f],p=[];for(j=0,k=b.length;j<k;j++){n=[];for(l=0,m=o.length;l<m;l++){f=o[l].n,h=[f[b[j]],f[d]],i=2;while(i--)g=h[i],g&&(n.push(g),p=p.concat(g.f||[]))}o=n}return p},f.on=function(a,b){var d=a.split(c),f=e;for(var g=0,h=d.length;g<h;g++)f=f.n,!f[d[g]]&&(f[d[g]]={n:{}}),f=f[d[g]];f.f=f.f||[];for(g=0,h=f.f.length;g<h;g++)if(f.f[g]==b)return!1;f.f.push(b)},f.unbind=function(a,f){var g=a.split(c),h,i,j,k=[e];for(var l=0,m=g.length;l<m;l++)for(var n=0;n<k.length;n+=j.length-2){j=[n,1],h=k[n].n;if(g[l]!=d)h[g[l]]&&j.push(h[g[l]]);else for(i in h)h[b](i)&&j.push(h[i]);k.splice.apply(k,j)}for(l=0,m=k.length;l<m;l++){h=k[l];while(h.n){if(f){if(h.f){for(l=0,m=h.f.length;l<m;l++)if(h.f[l]==f){h.f.splice(l,1);break}!h.f.length&&delete h.f}for(i in h.n)if(h.n[b](i)&&h.n[i].f){var o=h.n[i].f;for(l=0,m=o.length;l<m;l++)if(o[l]==f){o.splice(l,1);break}!o.length&&delete h.n[i].f}}else{delete h.f;for(i in h.n)h.n[b](i)&&h.n[i].f&&delete h.n[i].f}h=h.n}}return!0},f.version=a,f.toString=function(){return"You are running Eve "+a};return f}()})()
\ No newline at end of file
+(function(){function c$(c,d,e,g,h){e=P(e);var i,j,k,l=[],m,n,o,p=c.ms,r={},s={},t={};if(g)for(v=0,w=cU.length;v<w;v++){var u=cU[v];if(u.el.id==d.id&&u.anim==c){u.percent!=e?(cU.splice(v,1),k=1):j=u,d.attr(u.totalOrigin);break}}else g=NaN;for(var v=0,w=c.percents.length;v<w;v++){if(c.percents[v]==e||c.percents[v]>g*c.top){e=c.percents[v],n=c.percents[v-1]||0,p=p/c.top*(e-n),m=c.percents[v+1],i=c.anim[e];break}g&&d.attr(c.anim[c.percents[v]])}if(!!i){if(!j){for(attr in i)if(i[f](attr))if(U[f](attr)||d.paper.customAttributes[f](attr)){r[attr]=d.attr(attr),r[attr]==null&&(r[attr]=T[attr]),s[attr]=i[attr];switch(U[attr]){case B:t[attr]=(s[attr]-r[attr])/p;break;case"colour":r[attr]=a.getRGB(r[attr]);var x=a.getRGB(s[attr]);t[attr]={r:(x.r-r[attr].r)/p,g:(x.g-r[attr].g)/p,b:(x.b-r[attr].b)/p};break;case"path":var y=bC(r[attr],s[attr]),z=y[1];r[attr]=y[0],t[attr]=[];for(v=0,w=r[attr].length;v<w;v++){t[attr][v]=[0];for(var A=1,C=r[attr][v].length;A<C;A++)t[attr][v][A]=(z[v][A]-r[attr][v][A])/p}break;case"transform":var D=d._,E=bO(D[attr],s[attr]);if(E){r[attr]=E.from,s[attr]=E.to,t[attr]=[],t[attr].real=!0;for(v=0,w=r[attr].length;v<w;v++){t[attr][v]=[r[attr][v][0]];for(A=1,C=r[attr][v].length;A<C;A++)t[attr][v][A]=(s[attr][v][A]-r[attr][v][A])/p}}else{var F=(d.matrix||new bP).m,G={_:{transform:D.transform},getBBox:function(){return d.getBBox()}};r[attr]=[F[0][0],F[1][0],F[0][1],F[1][1],F[0][2],F[1][2]],bM(G,s[attr]),s[attr]=G._.transform,t[attr]=[(G.matrix.m[0][0]-F[0][0])/p,(G.matrix.m[1][0]-F[1][0])/p,(G.matrix.m[0][1]-F[0][1])/p,(G.matrix.m[1][1]-F[1][1])/p,(G.matrix.m[0][2]-F[0][2])/p,(G.matrix.m[1][2]-F[1][2])/p]}break;case"csv":var H=q(i[attr]).split(b),I=q(r[attr]).split(b);if(attr=="clip-rect"){r[attr]=I,t[attr]=[],v=I.length;while(v--)t[attr][v]=(H[v]-r[attr][v])/p}s[attr]=H;break;default:H=[].concat(i[attr]),I=[].concat(r[attr]),t[attr]=[],v=d.paper.customAttributes[attr].length;while(v--)t[attr][v]=((H[v]||0)-(I[v]||0))/p}}var J=i.easing,K=a.easing_formulas[J];if(!K){K=q(J).match(M);if(K&&K.length==5){var L=K;K=function(a){return cY(a,+L[1],+L[2],+L[3],+L[4],p)}}else K=bd}o=i.start||c.start||+(new Date),u={anim:c,percent:e,timestamp:o,start:o+(c.del||0),status:0,initstatus:g||0,stop:!1,ms:p,easing:K,from:r,diff:t,to:s,el:d,callback:i.callback,prev:n,next:m,repeat:c.times,origin:d.attr(),totalOrigin:h},cU.push(u);if(g&&!j){u.stop=!0,u.start=new Date-p*g;if(cU.length==1)return cW()}cU.length==1&&cV(cW)}else j.initstatus=g,j.start=new Date-j.ms*g;dc("anim.start."+d.id,d,c)}}function cZ(a,b){var c=[];this.anim=a,this.ms=b,this.times=1;if(this.anim){for(var d in this.anim)this.anim[f](d)&&c.push(+d);c.sort(bb)}this.top=c[c.length-1],this.percents=c}function cY(a,b,c,d,e,f){function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(y(f)<b)return e;j=(3*i*e+2*h)*e+g;if(y(j)<1e-6)break;e=e-f/j}c=0,d=1,e=a;if(e<c)return c;if(e>d)return d;while(c<d){f=m(e);if(y(f-a)<b)return e;a>f?c=e:d=e,e=(d-c)/2+c}return e}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function m(a){return((i*a+h)*a+g)*a}var g=3*b,h=3*(d-b)-g,i=1-g-h,j=3*c,k=3*(e-c)-j,l=1-j-k;return n(a,1/(200*f))}function cM(){return this.x+p+this.y+p+this.width+"×"+this.height}function cL(){return this.x+p+this.y}function bP(a,b,c,d,e,f){a!=null?this.m=[[a,c,e],[b,d,f],[0,0,1]]:this.m=[[1,0,0],[0,1,0],[0,0,1]]}function bs(a,b){var c=g.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top-9999em",c.onload=function(){b.call(this),this.onload=null,g.doc.body.removeChild(this)},c.onerror=function(){g.doc.body.removeChild(this)},g.doc.body.appendChild(c),c.src=a}function br(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),g=e.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];if(h[f](g))return c?c(h[g]):h[g];i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[l](b,e);return c?c(h[g]):h[g]}return d}function a(b){if(a.is(b,"function"))return dc.on("DOMload",b);if(a.is(b,D)){var d=b,e=cl[l](a,d.splice(0,3+a.is(d[0],B))),g=e.set(),h=0,i=d.length,j;for(;h<i;h++)j=d[h]||{},c[f](j.type)&&g.push(e[j.type]().attr(j));return g}return cl[l](a,arguments)}a.version="2.0.0";var b=/[, ]+/,c={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},d=/\{(\d+)\}/g,e="prototype",f="hasOwnProperty",g={doc:document,win:window},h={was:Object.prototype[f].call(g.win,"Raphael"),is:g.win.Raphael},i=function(){},j,k="appendChild",l="apply",m="concat",n="createTouch"in g.doc,o="",p=" ",q=String,r="split",s="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend".split(p),t={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},u=q.prototype.toLowerCase,v=Math,w=v.max,x=v.min,y=v.abs,z=v.pow,A=v.PI,B="number",C="string",D="array",E="toString",F="fill",G=Object.prototype.toString,H={},I="push",J=/^url\(['"]?([^\)]+?)['"]?\)$/i,K=/^\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,L={NaN:1,Infinity:1,"-Infinity":1},M=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,N=v.round,O="setAttribute",P=parseFloat,Q=parseInt,R=" progid:DXImageTransform.Microsoft",S=q.prototype.toUpperCase,T={"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/",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},U={blur:B,"clip-rect":"csv",cx:B,cy:B,fill:"colour","fill-opacity":B,"font-size":B,height:B,opacity:B,path:"path",r:B,rx:B,ry:B,stroke:"colour","stroke-opacity":B,"stroke-width":B,transform:"transform",width:B,x:B,y:B},V=/\s*,\s*/,W={hs:1,rg:1},X=/,?([achlmqrstvxz]),?/gi,Y=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,Z=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,$=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,_=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/,ba=function(a,b){return a.key-b.key},bb=function(a,b){return a-b},bc=function(){},bd=function(a){return a},be=function(a,b,c,d,e){if(e)return[["M",a+e,b],["l",c-e*2,0],["a",e,e,0,0,1,e,e],["l",0,d-e*2],["a",e,e,0,0,1,-e,e],["l",e*2-c,0],["a",e,e,0,0,1,-e,-e],["l",0,e*2-d],["a",e,e,0,0,1,e,-e],["z"]];return[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]]},bf=function(a,b,c,d){d==null&&(d=c);return[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]]},bg={path:function(a){return a.attr("path")},circle:function(a){var b=a.attrs;return bf(b.cx,b.cy,b.r)},ellipse:function(a){var b=a.attrs;return bf(b.cx,b.cy,b.rx,b.ry)},rect:function(a){var b=a.attrs;return be(b.x,b.y,b.width,b.height,b.r)},image:function(a){var b=a.attrs;return be(b.x,b.y,b.width,b.height)},text:function(a){var b=a._getBBox();return be(b.x,b.y,b.width,b.height)}},bh=function(a,b){if(!b)return a;var c,d,e,f,g;a=bC(a);for(e=0,ii=a.length;e<ii;e++){g=a[e];for(f=1,jj=g.length;f<jj;f+=2)c=b.x(g[f],g[f+1]),d=b.y(g[f],g[f+1]),g[f]=c,g[f+1]=d}return a};a.type=g.win.SVGAngle||g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var bi=g.doc.createElement("div"),bj;bi.innerHTML='<v:shape adj="1"/>',bj=bi.firstChild,bj.style.behavior="url(#default#VML)";if(!bj||typeof bj.adj!="object")return a.type=o;bi=null}a.svg=!(a.vml=a.type=="VML"),j=i.prototype=a.prototype,j.customAttributes={},a._id=0,a._oid=0,a.fn={},a.is=function(a,b){b=u.call(b);if(b=="finite")return!L[f](+a);return b=="null"&&a===null||b==typeof a||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||G.call(a).slice(8,-1).toLowerCase()==b},a.angle=function(b,c,d,e,f,g){if(f==null){var h=b-d,i=c-e;if(!h&&!i)return 0;return(180+v.atan2(-i,-h)*180/A+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)},a.rad=function(a){return a%360*A/180},a.deg=function(a){return a*180/A%360},a.snapTo=function(b,c,d){d=a.is(d,"finite")?d:10;if(a.is(b,D)){var e=b.length;while(e--)if(y(b[e]-c)<=d)return b[e]}else{b=+b;var f=c%b;if(f<d)return c-f;if(f>b-d)return c-f+b}return c};var bk=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=v.random()*16|0,c=a=="x"?b:b&3|8;return c.toString(16)});a.setWindow=function(b){dc("setWindow",a,g.win,b),g.win=b,g.doc=g.win.document,cz&&cz(g.win)};var bl=function(b){if(a.vml){var c=/^\s+|\s+$/g,d;try{var e=new ActiveXObject("htmlfile");e.write("<body>"),e.close(),d=e.body}catch(f){d=createPopup().document.body}var h=d.createTextRange();bl=br(function(a){try{d.style.color=q(a).replace(c,o);var b=h.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b.toString(16)).slice(-6)}catch(e){return"none"}})}else{var i=g.doc.createElement("i");i.title="Raphaël Colour Picker",i.style.display="none",g.doc.body.appendChild(i),bl=br(function(a){i.style.color=a;return g.doc.defaultView.getComputedStyle(i,o).getPropertyValue("color")})}return bl(b)},bm=function(){return"hsb("+[this.h,this.s,this.b]+")"},bn=function(){return"hsl("+[this.h,this.s,this.l]+")"},bo=function(){return this.hex},bp=function(b,c,d){c==null&&a.is(b,"object")&&"r"in b&&"g"in b&&"b"in b&&(d=b.b,c=b.g,b=b.r);if(c==null&&a.is(b,C)){var e=a.getRGB(b);b=e.r,c=e.g,d=e.b}if(b>1||c>1||d>1)b/=255,c/=255,d/=255;return[b,c,d]},bq=function(b,c,d,e){b*=255,c*=255,d*=255;var f={r:b,g:c,b:d,hex:a.rgb(b,c,d),toString:bo};a.is(e,"finite")&&(f.opacity=e);return f};a.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;a=a%360/60,i=c*b,h=i*(1-y(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bq(e,f,g,d)},a.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h);if(a>1||b>1||c>1)a/=360,b/=100,c/=100;a*=360;var e,f,g,h,i;a=a%360/60,i=2*b*(c<.5?c:1-c),h=i*(1-y(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a];return bq(e,f,g,d)},a.rgb2hsb=function(a,b,c){c=bp(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;f=w(a,b,c),g=f-x(a,b,c),d=g==0?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=d%6*60,e=g==0?0:g/f;return{h:d,s:e,b:f,toString:bm}},a.rgb2hsl=function(a,b,c){c=bp(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;g=w(a,b,c),h=x(a,b,c),i=g-h,d=i==0?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=d%6*60,f=(g+h)/2,e=i==0?0:f<.5?i/(2*f):i/(2-2*f);return{h:d,s:e,l:f,toString:bn}},a._path2string=function(){return this.join(",").replace(X,"$1")},a.getRGB=br(function(b){if(!b||!!((b=q(b)).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1};if(b=="none")return{r:-1,g:-1,b:-1,hex:"none"};!W[f](b.toLowerCase().substring(0,2))&&b.charAt()!="#"&&(b=bl(b));var c,d,e,g,h,i,j,k=b.match(K);if(k){k[2]&&(g=Q(k[2].substring(5),16),e=Q(k[2].substring(3,5),16),d=Q(k[2].substring(1,3),16)),k[3]&&(g=Q((i=k[3].charAt(3))+i,16),e=Q((i=k[3].charAt(2))+i,16),d=Q((i=k[3].charAt(1))+i,16)),k[4]&&(j=k[4].split(V),d=P(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=P(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=P(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),k[1].toLowerCase().slice(0,4)=="rgba"&&(h=P(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100));if(k[5]){j=k[5].split(V),d=P(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=P(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=P(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsba"&&(h=P(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsb2rgb(d,e,g,h)}if(k[6]){j=k[6].split(V),d=P(j[0]),j[0].slice(-1)=="%"&&(d*=2.55),e=P(j[1]),j[1].slice(-1)=="%"&&(e*=2.55),g=P(j[2]),j[2].slice(-1)=="%"&&(g*=2.55),(j[0].slice(-3)=="deg"||j[0].slice(-1)=="°")&&(d/=360),k[1].toLowerCase().slice(0,4)=="hsla"&&(h=P(j[3])),j[3]&&j[3].slice(-1)=="%"&&(h/=100);return a.hsl2rgb(d,e,g,h)}k={r:d,g:e,b:g},k.hex="#"+(16777216|g|e<<8|d<<16).toString(16).slice(1),a.is(h,"finite")&&(k.opacity=h);return k}return{r:-1,g:-1,b:-1,hex:"none",error:1}},a),a.hsb=br(function(b,c,d){return a.hsb2rgb(b,c,d).hex}),a.hsl=br(function(b,c,d){return a.hsl2rgb(b,c,d).hex}),a.rgb=br(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b}));return c.hex},a.getColor.reset=function(){delete this.start},a.parsePathString=br(function(b){if(!b)return null;var c={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},d=[];a.is(b,D)&&a.is(b[0],D)&&(d=bu(b)),d.length||q(b).replace(Y,function(a,b,e){var f=[],g=u.call(b);e.replace($,function(a,b){b&&f.push(+b)}),g=="m"&&f.length>2&&(d.push([b][m](f.splice(0,2))),g="l",b=b=="m"?"l":"L");while(f.length>=c[g]){d.push([b][m](f.splice(0,c[g])));if(!c[g])break}}),d.toString=a._path2string;return d}),a.parseTransformString=br(function(b){if(!b)return null;var c={r:3,s:4,t:2,m:6},d=[];a.is(b,D)&&a.is(b[0],D)&&(d=bu(b)),d.length||q(b).replace(Z,function(a,b,c){var e=[],f=u.call(b);c.replace($,function(a,b){b&&e.push(+b)}),d.push([f][m](e))}),d.toString=a._path2string;return d}),a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=z(j,3)*a+z(j,2)*3*i*c+j*3*i*i*e+z(i,3)*g,l=z(j,3)*b+z(j,2)*3*i*d+j*3*i*i*f+z(i,3)*h,m=a+2*i*(c-a)+i*i*(e-2*c+a),n=b+2*i*(d-b)+i*i*(f-2*d+b),o=c+2*i*(e-c)+i*i*(g-2*e+c),p=d+2*i*(f-d)+i*i*(h-2*f+d),q=(1-i)*a+i*c,r=(1-i)*b+i*d,s=(1-i)*e+i*g,t=(1-i)*f+i*h,u=90-v.atan2(m-o,n-p)*180/A;(m>o||n<p)&&(u+=180);return{x:k,y:l,m:{x:m,y:n},n:{x:o,y:p},start:{x:q,y:r},end:{x:s,y:t},alpha:u}};var bt=br(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=bC(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a.length;g<h;g++){f=a[g];if(f[0]=="M")b=f[1],c=f[2],d.push(b),e.push(c);else{var i=bB(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[m](i.min.x,i.max.x),e=e[m](i.min.y,i.max.y),b=f[5],c=f[6]}}var j=x[l](0,d),k=x[l](0,e);return{x:j,y:k,width:w[l](0,d)-j,height:w[l](0,e)-k}}),bu=function(b){var c=[];if(!a.is(b,D)||!a.is(b&&b[0],D))b=a.parsePathString(b);for(var d=0,e=b.length;d<e;d++){c[d]=[];for(var f=0,g=b[d].length;f<g;f++)c[d][f]=b[d][f]}c.toString=a._path2string;return c},bv=br(function(b){if(!a.is(b,D)||!a.is(b&&b[0],D))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=b[0][1],e=b[0][2],f=d,g=e,h++,c.push(["M",d,e]));for(var i=h,j=b.length;i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=u.call(l[0])){k[0]=u.call(l[0]);switch(k[0]){case"a":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]-d).toFixed(3),k[7]=+(l[7]-e).toFixed(3);break;case"v":k[1]=+(l[1]-e).toFixed(3);break;case"m":f=l[1],g=l[2];default:for(var m=1,n=l.length;m<n;m++)k[m]=+(l[m]-(m%2?d:e)).toFixed(3)}}else{k=c[i]=[],l[0]=="m"&&(f=l[1]+d,g=l[2]+e);for(var o=0,p=l.length;o<p;o++)c[i][o]=l[o]}var q=c[i].length;switch(c[i][0]){case"z":d=f,e=g;break;case"h":d+=+c[i][q-1];break;case"v":e+=+c[i][q-1];break;default:d+=+c[i][q-2],e+=+c[i][q-1]}}c.toString=a._path2string;return c},0,bu),bw=br(function(b){if(!a.is(b,D)||!a.is(b&&b[0],D))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;b[0][0]=="M"&&(d=+b[0][1],e=+b[0][2],f=d,g=e,h++,c[0]=["M",d,e]);for(var i=h,j=b.length;i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=S.call(l[0])){k[0]=S.call(l[0]);switch(k[0]){case"A":k[1]=l[1],k[2]=l[2],k[3]=l[3],k[4]=l[4],k[5]=l[5],k[6]=+(l[6]+d),k[7]=+(l[7]+e);break;case"V":k[1]=+l[1]+e;break;case"H":k[1]=+l[1]+d;break;case"M":f=+l[1]+d,g=+l[2]+e;default:for(var m=1,n=l.length;m<n;m++)k[m]=+l[m]+(m%2?d:e)}}else for(var o=0,p=l.length;o<p;o++)c[i][o]=l[o];switch(k[0]){case"Z":d=f,e=g;break;case"H":d=k[1];break;case"V":e=k[1];break;case"M":f=c[i][c[i].length-2],g=c[i][c[i].length-1];default:d=c[i][c[i].length-2],e=c[i][c[i].length-1]}}c.toString=a._path2string;return c},null,bu),bx=function(a,b,c,d){return[a,b,c,d,c,d]},by=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},bz=function(a,b,c,d,e,f,g,h,i,j){var k=A*120/180,l=A/180*(+e||0),n=[],o,p=br(function(a,b,c){var d=a*v.cos(c)-b*v.sin(c),e=a*v.sin(c)+b*v.cos(c);return{x:d,y:e}});if(!j){o=p(a,b,-l),a=o.x,b=o.y,o=p(h,i,-l),h=o.x,i=o.y;var q=v.cos(A/180*e),r=v.sin(A/180*e),s=(a-h)/2,t=(b-i)/2,u=s*s/(c*c)+t*t/(d*d);u>1&&(u=v.sqrt(u),c=u*c,d=u*d);var w=c*c,x=d*d,z=(f==g?-1:1)*v.sqrt(y((w*x-w*t*t-x*s*s)/(w*t*t+x*s*s))),B=z*c*t/d+(a+h)/2,C=z*-d*s/c+(b+i)/2,D=v.asin(((b-C)/d).toFixed(9)),E=v.asin(((i-C)/d).toFixed(9));D=a<B?A-D:D,E=h<B?A-E:E,D<0&&(D=A*2+D),E<0&&(E=A*2+E),g&&D>E&&(D=D-A*2),!g&&E>D&&(E=E-A*2)}else D=j[0],E=j[1],B=j[2],C=j[3];var F=E-D;if(y(F)>k){var G=E,H=h,I=i;E=D+k*(g&&E>D?1:-1),h=B+c*v.cos(E),i=C+d*v.sin(E),n=bz(h,i,c,d,e,0,g,H,I,[E,G,B,C])}F=E-D;var J=v.cos(D),K=v.sin(D),L=v.cos(E),M=v.sin(E),N=v.tan(F/4),O=4/3*c*N,P=4/3*d*N,Q=[a,b],R=[a+O*K,b-P*J],S=[h+O*M,i-P*L],T=[h,i];R[0]=2*Q[0]-R[0],R[1]=2*Q[1]-R[1];if(j)return[R,S,T][m](n);n=[R,S,T][m](n).join().split(",");var U=[];for(var V=0,W=n.length;V<W;V++)U[V]=V%2?p(n[V-1],n[V],l).y:p(n[V],n[V+1],l).x;return U},bA=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:z(j,3)*a+z(j,2)*3*i*c+j*3*i*i*e+z(i,3)*g,y:z(j,3)*b+z(j,2)*3*i*d+j*3*i*i*f+z(i,3)*h}},bB=br(function(a,b,c,d,e,f,g,h){var i=e-2*c+a-(g-2*e+c),j=2*(c-a)-2*(e-c),k=a-c,m=(-j+v.sqrt(j*j-4*i*k))/2/i,n=(-j-v.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;y(m)>"1e12"&&(m=.5),y(n)>"1e12"&&(n=.5),m>0&&m<1&&(q=bA(a,b,c,d,e,f,g,h,m),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bA(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y)),i=f-2*d+b-(h-2*f+d),j=2*(d-b)-2*(f-d),k=b-d,m=(-j+v.sqrt(j*j-4*i*k))/2/i,n=(-j-v.sqrt(j*j-4*i*k))/2/i,y(m)>"1e12"&&(m=.5),y(n)>"1e12"&&(n=.5),m>0&&m<1&&(q=bA(a,b,c,d,e,f,g,h,m),p.push(q.x),o.push(q.y)),n>0&&n<1&&(q=bA(a,b,c,d,e,f,g,h,n),p.push(q.x),o.push(q.y));return{min:{x:x[l](0,p),y:x[l](0,o)},max:{x:w[l](0,p),y:w[l](0,o)}}}),bC=br(function(a,b){var c=bw(a),d=b&&bw(b),e={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},g=function(a,b){var c,d;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null);switch(a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][m](bz[l](0,[b.x,b.y][m](a.slice(1))));break;case"S":c=b.x+(b.x-(b.bx||b.x)),d=b.y+(b.y-(b.by||b.y)),a=["C",c,d][m](a.slice(1));break;case"T":b.qx=b.x+(b.x-(b.qx||b.x)),b.qy=b.y+(b.y-(b.qy||b.y)),a=["C"][m](by(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][m](by(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][m](bx(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][m](bx(b.x,b.y,a[1],b.y));break;case"V":a=["C"][m](bx(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][m](bx(b.x,b.y,b.X,b.Y))}return a},h=function(a,b){if(a[b].length>7){a[b].shift();var e=a[b];while(e.length)a.splice(b++,0,["C"][m](e.splice(0,6)));a.splice(b,1),k=w(c.length,d&&d.length||0)}},i=function(a,b,e,f,g){a&&b&&a[g][0]=="M"&&b[g][0]!="M"&&(b.splice(g,0,["M",f.x,f.y]),e.bx=0,e.by=0,e.x=a[g][1],e.y=a[g][2],k=w(c.length,d&&d.length||0))};for(var j=0,k=w(c.length,d&&d.length||0);j<k;j++){c[j]=g(c[j],e),h(c,j),d&&(d[j]=g(d[j],f)),d&&h(d,j),i(c,d,e,f,j),i(d,c,f,e,j);var n=c[j],o=d&&d[j],p=n.length,q=d&&o.length;e.x=n[p-2],e.y=n[p-1],e.bx=P(n[p-4])||e.x,e.by=P(n[p-3])||e.y,f.bx=d&&(P(o[q-4])||f.x),f.by=d&&(P(o[q-3])||f.y),f.x=d&&o[q-2],f.y=d&&o[q-1]}return d?[c,d]:c},null,bu),bD=br(function(b){var c=[];for(var d=0,e=b.length;d<e;d++){var f={},g=b[d].match(/^([^:]*):?([\d\.]*)/);f.color=a.getRGB(g[1]);if(f.color.error)return null;f.color=f.color.hex,g[2]&&(f.offset=g[2]+"%"),c.push(f)}for(d=1,e=c.length-1;d<e;d++)if(!c[d].offset){var h=P(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++)if(c[j].offset){i=c[j].offset;break}i||(i=100,j=e),i=P(i);var k=(i-h)/(j-d+1);for(;d<j;d++)h+=k,c[d].offset=h+"%"}return c}),bE=function(b,c,d,e){var f;f=e==null&&!a.is(b,"object")?g.doc.getElementById(b):b;if(f!=null){if(f.tagName)return c==null?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:c,height:d};return{container:1,x:b,y:c,width:d,height:e}}},bF=function(a,b){var c=this;for(var d in b)if(b[f](d)&&!(d in a))switch(typeof b[d]){case"function":(function(b){a[d]=a===c?b:function(){return b[l](c,arguments)}})(b[d]);break;case"object":a[d]=a[d]||{},bF.call(this,a[d],b[d]);break;default:a[d]=b[d]}},bG=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)},bH=function(a,b){b.top!==a&&(bG(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},bI=function(a,b){b.bottom!==a&&(bG(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},bJ=function(a,b,c){bG(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bK=function(a,b,c){bG(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bL=function(a){return function(){throw new Error("Raphaël: you are calling to method “"+a+"” of removed object")}},bM=function(b,c){if(c==null)return b._.transform;c=q(c).replace(/\.{3}|\u2026/g,b._.transform||o);var d=a.parseTransformString(c),e=0,f=0,g=0,h=1,i=1,j=b._,k=new bP;j.transform=d||[];if(d)for(var l=0,m=d.length;l<m;l++){var n=d[l],p=n.length,r;n[0]=q(n[0]).toLowerCase(),n[0]=="t"&&p==3?k.translate(n[1],n[2]):n[0]=="r"?p==2?(r=r||b.getBBox(1),k.rotate(n[1],r.x+r.width/2,r.y+r.height/2),e+=n[1]):p==4&&(k.rotate(n[1],n[2],n[3]),e+=n[1]):n[0]=="s"?p==2||p==3?(r=r||b.getBBox(1),k.scale(n[1],n[p-1],r.x+r.width/2,r.y+r.height/2),h*=n[1],i*=n[p-1]):p==5&&(k.scale(n[1],n[2],n[3],n[4]),h*=n[1],i*=n[2]):n[0]=="m"&&p==7&&k.add(n[1],n[2],n[3],n[4],n[5],n[6]),j.dirtyT=1,b.matrix=k}b.matrix=k,j.sx=h,j.sy=i,j.deg=e,j.dx=f=k.m[0][2],j.dy=g=k.m[1][2],h==1&&i==1&&!e&&j.bbox?(j.bbox.x+=+f,j.bbox.y+=+g):j.dirtyT=1},bN=function(a){switch(a[0]){case"t":return["t",0,0];case"m":return["m",1,0,0,1,0,0];case"r":return a.length==4?["r",0,a[2],a[3]]:["r",0];case"s":return a.length==5?["s",1,1,a[3],a[4]]:a.length==3?["s",1,1]:["s",1]}},bO=function(b,c){b=a.parseTransformString(b)||[],c=a.parseTransformString(c)||[];var d=w(b.length,c.length),e=[],f=[],g=0,h,i,j,k;for(;g<d;g++){j=b[g]||bN(c[g]),k=c[g]||bN(j);if(j[0]!=k[0]||j[0]=="r"&&(j[2]!=k[2]||j[3]!=k[3])||j[0]=="s"&&(j[3]!=k[3]||j[4]!=k[4]))return;e[g]=[],f[g]=[];for(h=0,i=w(j.length,k.length);h<i;h++)h in j&&(e[g][h]=j[h]),h in k&&(f[g][h]=k[h])}return{from:e,to:f}};a.pathToRelative=bv,a.path2curve=bC;var bQ=bP.prototype;bQ.add=function(a,b,c,d,e,f){var g=[[],[],[]],h=[[a,c,e],[b,d,f],[0,0,1]],i,j,k,l;for(i=0;i<3;i++)for(j=0;j<3;j++){l=0;for(k=0;k<3;k++)l+=this.m[i][k]*h[k][j];g[i][j]=l}this.m=g},bQ.invert=function(){var a=this.m[0][0],b=this.m[1][0],c=this.m[0][1],d=this.m[1][1],e=this.m[0][2],f=this.m[1][2],g=a*d-b*c;return new bP(d/g,-b/g,-c/g,a/g,(c*f-d*e)/g,(b*e-a*f)/g)},bQ.clone=function(){var a=this.m[0][0],b=this.m[1][0],c=this.m[0][1],d=this.m[1][1],e=this.m[0][2],f=this.m[1][2];return new bP(a,b,c,d,e,f)},bQ.translate=function(a,b){this.add(1,0,0,1,a,b)},bQ.scale=function(a,b,c,d){b==null&&(b=a),this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),this.add(1,0,0,1,-c,-d)},bQ.rotate=function(b,c,d){b=a.rad(b);var e=+v.cos(b).toFixed(9),f=+v.sin(b).toFixed(9);this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},bQ.x=function(a,b){return a*this.m[0][0]+b*this.m[0][1]+this.m[0][2]},bQ.y=function(a,b){return a*this.m[1][0]+b*this.m[1][1]+this.m[1][2]},bQ.get=function(a,b){return+this.m[a][b].toFixed(4)},bQ.toString=function(){return a.svg?"matrix("+[this.get(0,0),this.get(1,0),this.get(0,1),this.get(1,1),this.get(0,2),this.get(1,2)].join()+")":[this.get(0,0),this.get(0,1),this.get(1,0),this.get(1,1),0,0].join()},bQ.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0,0)+", M12="+this.get(0,1)+", M21="+this.get(1,0)+", M22="+this.get(1,1)+", Dx="+this.get(0,2)+", Dy="+this.get(1,2)+", sizingmedthod='auto expand')"},bQ.offset=function(){return[this.m[0][2].toFixed(4),this.m[1][2].toFixed(4)]},a.Matrix=bP;if(a.svg){var bR="http://www.w3.org/1999/xlink",bS={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"},bT={};a.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var bU=function(a,b){if(b){typeof a=="string"&&(a=bU(a));for(var c in b)b[f](c)&&(c.substring(0,6)=="xlink:"?a.setAttributeNS(bR,c.substring(6),q(b[c])):a[O](c,q(b[c])))}else a=g.doc.createElementNS("http://www.w3.org/2000/svg",a),a.style&&(a.style.webkitTapHighlightColor="rgba(0,0,0,0)");return a},bV=function(a,b){var c=bU("path");b.canvas&&b.canvas.appendChild(c);var d=new cd(c,b);d.type="path",ca(d,{fill:"none",stroke:"#000",path:a});return d},bW={},bX=/^url\(#(.*)\)$/,bY=function(a,b){var c=a.getAttribute(F);c=c&&c.match(bX),c&&!--bW[c[1]]&&(delete bW[c[1]],b.defs.removeChild(g.doc.getElementById(c[1])))},bZ=function(b,c){var d="linear",e=b.id+c,f=.5,h=.5,i=b.node,j=b.paper,k=i.style,l=g.doc.getElementById(e);if(!l){c=q(c).replace(_,function(a,b,c){d="radial";if(b&&c){f=P(b),h=P(c);var e=(h>.5)*2-1;z(f-.5,2)+z(h-.5,2)>.25&&(h=v.sqrt(.25-z(f-.5,2))*e+.5)&&h!=.5&&(h=h.toFixed(5)-1e-5*e)}return o}),c=c.split(/\s*\-\s*/);if(d=="linear"){var m=c.shift();m=-P(m);if(isNaN(m))return null;var n=[0,0,v.cos(a.rad(m)),v.sin(a.rad(m))],p=1/(w(y(n[2]),y(n[3]))||1);n[2]*=p,n[3]*=p,n[2]<0&&(n[0]=-n[2],n[2]=0),n[3]<0&&(n[1]=-n[3],n[3]=0)}var r=bD(c);if(!r)return null;b.gradient&&(j.defs.removeChild(b.gradient),delete b.gradient),l=bU(d+"Gradient",{id:e}),b.gradient=l,bU(l,d=="radial"?{fx:f,fy:h}:{x1:n[0],y1:n[1],x2:n[2],y2:n[3],gradientTransform:b.matrix.invert()}),j.defs.appendChild(l);for(var s=0,t=r.length;s<t;s++)l.appendChild(bU("stop",{offset:r[s].offset?r[s].offset:s?"100%":"0%","stop-color":r[s].color||"#fff"}))}bU(i,{fill:"url(#"+e+")",opacity:1,"fill-opacity":1}),k.fill=o,k.opacity=1,k.fillOpacity=1;return 1},b$=function(a){var b=a.getBBox(1);bU(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},b_=function(b,c,d){if(b.type=="path"){var e=q(c).toLowerCase().split("-"),h=b.paper,i=d?"end":"start",j=b.node,k=b.attrs,l=k["stroke-width"],m=e.length,n="classic",o,r,s,t,u,v=3,w=3,x=5;while(m--)switch(e[m]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":n=e[m];break;case"wide":w=5;break;case"narrow":w=2;break;case"long":v=5;break;case"short":v=2}n=="open"?(v+=2,w+=2,x+=2,s=1,t=d?4:1,u={fill:"none",stroke:k.stroke}):(t=s=v/2,u={fill:k.stroke,stroke:"none"}),b._.arrows?d?(b._.arrows.endPath&&bT[b._.arrows.endPath]--,b._.arrows.endMarker&&bT[b._.arrows.endMarker]--):(b._.arrows.startPath&&bT[b._.arrows.startPath]--,b._.arrows.startMarker&&bT[b._.arrows.startMarker]--):b._.arrows={};if(n!="none"){var y="raphael-marker-"+n,z="raphael-marker-"+i+n+v+w;g.doc.getElementById(y)?bT[y]++:(h.defs.appendChild(bU(bU("path"),{"stroke-linecap":"round",d:bS[n],id:y})),bT[y]=1);var A=g.doc.getElementById(z),B;A?(bT[z]++,B=A.getElementsByTagName("use")[0]):(A=bU(bU("marker"),{id:z,markerHeight:w,markerWidth:v,orient:"auto",refX:t,refY:w/2}),B=bU(bU("use"),{"xlink:href":"#"+y,transform:(d?" rotate(180 "+v/2+" "+w/2+") ":p)+"scale("+v/x+","+w/x+")","stroke-width":1/((v/x+w/x)/2)}),A.appendChild(B),h.defs.appendChild(A),bT[z]=1),bU(B,u);var C=s*(n!="diamond"&&n!="oval");d?(o=b._.arrows.startdx*l||0,r=a.getTotalLength(k.path)-C*l):(o=C*l,r=a.getTotalLength(k.path)-(b._.arrows.enddx*l||0)),u={},u["marker-"+i]="url(#"+z+")";if(r||o)u.d=Raphael.getSubpath(k.path,o,r);bU(j,u),b._.arrows[i+"Path"]=y,b._.arrows[i+"Marker"]=z,b._.arrows[i+"dx"]=C,b._.arrows[i+"Type"]=n,b._.arrows[i+"String"]=c}else d?(o=b._.arrows.startdx*l||0,r=a.getTotalLength(k.path)-o):(o=0,r=a.getTotalLength(k.path)-(b._.arrows.enddx*l||0)),b._.arrows[i+"Path"]&&bU(j,{d:Raphael.getSubpath(k.path,o,r)}),delete b._.arrows[i+"Path"],delete b._.arrows[i+"Marker"],delete b._.arrows[i+"dx"],delete b._.arrows[i+"Type"],delete b._.arrows[i+"String"];for(u in bT)if(bT[f](u)&&!bT[u]){var D=g.doc.getElementById(u);D&&D.parentNode.removeChild(D)}}},ca=function(c,d){var e={"":[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]},h=c.node,i=c.attrs,j=function(a,b){b=e[u.call(b)];if(b){var c=a.attrs["stroke-width"]||"1",f=({round:c,square:c,butt:0})[a.attrs["stroke-linecap"]||d["stroke-linecap"]]||0,g=[],i=b.length;while(i--)g[i]=b[i]*c+(i%2?1:-1)*f;bU(h,{"stroke-dasharray":g.join(",")})}};for(var k in d)if(d[f](k)){if(!T[f](k))continue;var l=d[k];i[k]=l;switch(k){case"blur":c.blur(l);break;case"href":case"title":case"target":var m=h.parentNode;if(u.call(m.tagName)!="a"){var n=bU("a");m.insertBefore(n,h),n.appendChild(h),m=n}k=="target"&&l=="blank"?m.setAttributeNS(bR,"show","new"):m.setAttributeNS(bR,k,l);break;case"cursor":h.style.cursor=l;break;case"transform":c.transform(l);break;case"arrow-start":b_(c,l);break;case"arrow-end":b_(c,l,1);break;case"clip-rect":var p=q(l).split(b);if(p.length==4){c.clip&&c.clip.parentNode.parentNode.removeChild(c.clip.parentNode);var r=bU("clipPath"),s=bU("rect");r.id=bk(),bU(s,{x:p[0],y:p[1],width:p[2],height:p[3]}),r.appendChild(s),c.paper.defs.appendChild(r),bU(h,{"clip-path":"url(#"+r.id+")"}),c.clip=s}if(!l){var t=g.doc.getElementById(h.getAttribute("clip-path").replace(/(^url\(#|\)$)/g,o));t&&t.parentNode.removeChild(t),bU(h,{"clip-path":o}),delete c.clip}break;case"path":c.type=="path"&&(bU(h,{d:l?i.path=bw(l):"M0,0"}),c._.dirty=1,c._.arrows&&("startString"in c._.arrows&&b_(c,c._.arrows.startString),"endString"in c._.arrows&&b_(c,c._.arrows.endString,1)));break;case"width":h[O](k,l),c._.dirty=1;if(i.fx)k="x",l=i.x;else break;case"x":i.fx&&(l=-i.x-(i.width||0));case"rx":if(k=="rx"&&c.type=="rect")break;case"cx":h[O](k,l),c.pattern&&b$(c),c._.dirty=1;break;case"height":h[O](k,l),c._.dirty=1;if(i.fy)k="y",l=i.y;else break;case"y":i.fy&&(l=-i.y-(i.height||0));case"ry":if(k=="ry"&&c.type=="rect")break;case"cy":h[O](k,l),c.pattern&&b$(c),c._.dirty=1;break;case"r":c.type=="rect"?bU(h,{rx:l,ry:l}):h[O](k,l),c._.dirty=1;break;case"src":c.type=="image"&&h.setAttributeNS(bR,"href",l);break;case"stroke-width":if(c._.sx!=1||c._.sy!=1)l/=w(y(c._.sx),y(c._.sy))||1;c.paper._vbSize&&(l*=c.paper._vbSize),h[O](k,l),i["stroke-dasharray"]&&j(c,i["stroke-dasharray"]),c._.arrows&&("startString"in c._.arrows&&b_(c,c._.arrows.startString),"endString"in c._.arrows&&b_(c,c._.arrows.endString,1));break;case"stroke-dasharray":j(c,l);break;case F:var v=q(l).match(J);if(v){r=bU("pattern");var x=bU("image");r.id=bk(),bU(r,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),bU(x,{x:0,y:0,"xlink:href":v[1]}),r.appendChild(x),function(a){bs(v[1],function(){var b=this.offsetWidth,d=this.offsetHeight;bU(a,{width:b,height:d}),bU(x,{width:b,height:d}),c.paper.safari()})}(r),c.paper.defs.appendChild(r),h.style.fill="url(#"+r.id+")",bU(h,{fill:"url(#"+r.id+")"}),c.pattern=r,c.pattern&&b$(c);break}var z=a.getRGB(l);if(!z.error)delete d.gradient,delete i.gradient,!a.is(i.opacity,"undefined")&&a.is(d.opacity,"undefined")&&bU(h,{opacity:i.opacity}),!a.is(i["fill-opacity"],"undefined")&&a.is(d["fill-opacity"],"undefined")&&bU(h,{"fill-opacity":i["fill-opacity"]});else if((c.type=="circle"||c.type=="ellipse"||q(l).charAt()!="r")&&bZ(c,l)){if("opacity"in i||"fill-opacity"in i){var A=g.doc.getElementById(h.getAttribute(F).replace(/^url\(#|\)$/g,o));if(A){var B=A.getElementsByTagName("stop");bU(B[B.length-1],{"stop-opacity":("opacity"in i?i.opacity:1)*("fill-opacity"in i?i["fill-opacity"]:1)})}}i.gradient=l,i.fill="none";break}z[f]("opacity")&&bU(h,{"fill-opacity":z.opacity>1?z.opacity/100:z.opacity});case"stroke":z=a.getRGB(l),h[O](k,z.hex),k=="stroke"&&z[f]("opacity")&&bU(h,{"stroke-opacity":z.opacity>1?z.opacity/100:z.opacity}),k=="stroke"&&c._.arrows&&("startString"in c._.arrows&&b_(c,c._.arrows.startString),"endString"in c._.arrows&&b_(c,c._.arrows.endString,1));break;case"gradient":(c.type=="circle"||c.type=="ellipse"||q(l).charAt()!="r")&&bZ(c,l);break;case"opacity":i.gradient&&!i[f]("stroke-opacity")&&bU(h,{"stroke-opacity":l>1?l/100:l});case"fill-opacity":if(i.gradient){A=g.doc.getElementById(h.getAttribute(F).replace(/^url\(#|\)$/g,o)),A&&(B=A.getElementsByTagName("stop"),bU(B[B.length-1],{"stop-opacity":l}));break};default:k=="font-size"&&(l=Q(l,10)+"px");var C=k.replace(/(\-.)/g,function(a){return S.call(a.substring(1))});h.style[C]=l,c._.dirty=1,h[O](k,l)}}cc(c,d)},cb=1.2,cc=function(b,c){if(b.type=="text"&&!!(c[f]("text")||c[f]("font")||c[f]("font-size")||c[f]("x")||c[f]("y"))){var d=b.attrs,e=b.node,h=e.firstChild?Q(g.doc.defaultView.getComputedStyle(e.firstChild,o).getPropertyValue("font-size"),10):10;if(c[f]("text")){d.text=c.text;while(e.firstChild)e.removeChild(e.firstChild);var i=q(c.text).split("\n"),j=[],k;for(var l=0,m=i.length;l<m;l++)i[l]&&(k=bU("tspan"),l&&bU(k,{dy:h*cb,x:d.x}),k.appendChild(g.doc.createTextNode(i[l])),e.appendChild(k),j[l]=k)}else{j=e.getElementsByTagName("tspan");for(l=0,m=j.length;l<m;l++)l&&bU(j[l],{dy:h*cb,x:d.x})}bU(e,{y:d.y}),b._.dirty=1;var n=b._getBBox(),p=d.y-(n.y+n.height/2);p&&a.is(p,"finite")&&bU(j[0],{dy:d.y+p})}},cd=function(b,c){var d=0,e=0;this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.matrix=new bP,this.realPath=null,this.paper=c,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},ce=cd.prototype;ce.rotate=function(a,c,d){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2])),a=P(a[0]),d==null&&(c=d);if(c==null||d==null){var e=this.getBBox(1);c=e.x+e.width/2,d=e.y+e.height/2}this.transform(this._.transform.concat([["r",a,c,d]]));return this},ce.scale=function(a,c,d,e){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2]),e=P(a[3])),a=P(a[0]),c==null&&(c=a),e==null&&(d=e);if(d==null||e==null)var f=this.getBBox(1);d=d==null?f.x+f.width/2:d,e=e==null?f.y+f.height/2:e,this.transform(this._.transform.concat([["s",a,c,d,e]]));return this},ce.translate=function(a,c){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1])),a=P(a[0])||0,c=+c||0,this.transform(this._.transform.concat([["t",a,c]]));return this},ce.transform=function(a){var b=this._;if(!a)return b.transform;bM(this,a),this.clip&&bU(this.clip,{transform:this.matrix.invert()}),this.pattern&&b$(this),this.node&&bU(this.node,{transform:this.matrix});if(b.sx!=1||b.sy!=1){var c=this.attrs[f]("stroke-width")?this.attrs["stroke-width"]:1;this.attr({"stroke-width":c})}return this},ce.hide=function(){!this.removed&&this.paper.safari(this.node.style.display="none");return this},ce.show=function(){!this.removed&&this.paper.safari(this.node.style.display="");return this},ce.remove=function(){if(!this.removed){dc.unbind("*.*."+this.id),bG(this,this.paper),this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=!0}},ce._getBBox=function(){if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}a&&this.hide();return b},ce.attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient,d.transform=this._.transform;return d}if(c==null&&a.is(b,C)){if(b==F&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;if(b=="transform")return this._.transform;return b in this.attrs?this.attrs[b]:a.is(this.paper.customAttributes[b],"function")?this.paper.customAttributes[b].def:T[b]}if(c==null&&a.is(b,D)){var g={};for(var h=0,i=b.length;h<i;h++)g[b[h]]=this.attr(b[h]);return g}if(c!=null){var j={};j[b]=c}else b!=null&&a.is(b,"object")&&(j=b);for(var k in this.paper.customAttributes)if(this.paper.customAttributes[f](k)&&j[f](k)&&a.is(this.paper.customAttributes[k],"function")){var l=this.paper.customAttributes[k].apply(this,[][m](j[k]));this.attrs[k]=j[k];for(var n in l)l[f](n)&&(j[n]=l[n])}ca(this,j);return this},ce.toFront=function(){if(this.removed)return this;this.node.parentNode.appendChild(this.node);var a=this.paper;a.top!=this&&bH(this,a);return this},ce.toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),bI(this,this.paper);var a=this.paper}return this},ce.insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode.appendChild(this.node),bJ(this,a,this.paper);return this},ce.insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;b.parentNode.insertBefore(this.node,b),bK(this,a,this.paper);return this},ce.blur=function(a){var b=this;if(+a!==0){var c=bU("filter"),d=bU("feGaussianBlur");b.attrs.blur=a,c.id=bk(),bU(d,{stdDeviation:+a||1.5}),c.appendChild(d),b.paper.defs.appendChild(c),b._blur=c,bU(b.node,{filter:"url(#"+c.id+")"})}else b._blur&&(b._blur.parentNode.removeChild(b._blur),delete b._blur,delete b.attrs.blur),b.node.removeAttribute("filter")};var cf=function(a,b,c,d){var e=bU("circle");a.canvas&&a.canvas.appendChild(e);var f=new cd(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",bU(e,f.attrs);return f},cg=function(a,b,c,d,e,f){var g=bU("rect");a.canvas&&a.canvas.appendChild(g);var h=new cd(g,a);h.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},h.type="rect",bU(g,h.attrs);return h},ch=function(a,b,c,d,e){var f=bU("ellipse");a.canvas&&a.canvas.appendChild(f);var g=new cd(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",bU(f,g.attrs);return g},ci=function(a,b,c,d,e,f){var g=bU("image");bU(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(bR,"href",b),a.canvas&&a.canvas.appendChild(g);var h=new cd(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b},h.type="image";return h},cj=function(a,b,c,d){var e=bU("text");bU(e,{x:b,y:c,"text-anchor":"middle"}),a.canvas&&a.canvas.appendChild(e);var f=new cd(e,a);f.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:T.font,stroke:"none",fill:"#000"},f.type="text",ca(f,f.attrs);return f},ck=function(a,b){this.width=a||this.width,this.height=b||this.height,this.canvas[O]("width",this.width),this.canvas[O]("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox);return this},cl=function(){var b=bE[l](0,arguments),c=b&&b.container,d=b.x,e=b.y,f=b.width,h=b.height;if(!c)throw new Error("SVG container not found.");var j=bU("svg"),k="overflow:hidden;";d=d||0,e=e||0,f=f||512,h=h||342,bU(j,{height:h,version:1.1,width:f,xmlns:"http://www.w3.org/2000/svg"}),c==1?(j.style.cssText=k+"position:absolute;left:"+d+"px;top:"+e+"px",g.doc.body.appendChild(j)):(j.style.cssText=k,c.firstChild?c.insertBefore(j,c.firstChild):c.appendChild(j)),c=new i,c.width=f,c.height=h,c.canvas=j,bF.call(c,c,a.fn),c.clear();return c},cm=function(a,b,c,d,e){dc("setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=w(c/this.width,d/this.height),g=this.top,h=e?"meet":"xMinYMin",i,j;a==null?(this._vbSize&&(f=1),delete this._vbSize,i="0 0 "+this.width+p+this.height):(this._vbSize=f,i=a+p+b+p+c+p+d),bU(this.canvas,{viewBox:i,preserveAspectRatio:h});while(f&&g)j="stroke-width"in g.attrs?g.attrs["stroke-width"]:1,g.attr({"stroke-width":j}),g._.dirty=1,g._.dirtyT=1,g=g.prev;this._viewBox=[a,b,c,d,!!e];return this};j.clear=function(){dc("clear",this);var b=this.canvas;while(b.firstChild)b.removeChild(b.firstChild);this.bottom=this.top=null,(this.desc=bU("desc")).appendChild(g.doc.createTextNode("Created with Raphaël "+a.version)),b.appendChild(this.desc),b.appendChild(this.defs=bU("defs"))},j.remove=function(){dc("remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bL(a)}}if(a.vml){var cn={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},co=/([clmz]),?([^clmz]*)/gi,cp=/ progid:\S+Blur\([^\)]+\)/g,cq=/-?[^,\s-]+/g,cr="position:absolute;left:0;top:0;width:1px;height:1px",cs=21600,ct={path:1,rect:1},cu={circle:1,ellipse:1},cv=function(a){var b=/[ahqstv]/ig,c=bw;q(a).match(b)&&(c=bC),b=/[clmz]/g;if(c==bw&&!q(a).match(b)){var d=q(a).replace(co,function(a,b,c){var d=[],e=u.call(b)=="m",f=cn[b];c.replace(cq,function(a){e&&d.length==2&&(f+=d+cn[b=="m"?"l":"L"],d=[]),d.push(N(a*cs))});return f+d});return d}var e=c(a),f,g;d=[];for(var h=0,i=e.length;h<i;h++){f=e[h],g=u.call(e[h][0]),g=="z"&&(g="x");for(var j=1,k=f.length;j<k;j++)g+=N(f[j]*cs)+(j!=k-1?",":o);d.push(g)}return d.join(p)},cw=function(a,b,c){var d=new bP;d.rotate(-a,.5,.5);return{dx:d.x(b,c),dy:d.y(b,c)}},cx=function(a){var b=a._,c=b.sx,d=b.sy,e=b.deg,f=b.dx,g=b.dy,h=b.fillpos,i=a.node,j=i.style,k=1,l=a.matrix,m="",n,o=cs/c,q=cs/d;j.visibility="hidden",i.coordsize=y(o)+p+y(q),j.rotation=e*(c*d<0?-1:1);if(e){var r=cw(e,f,g);f=r.dx,g=r.dy}c<0&&(m+="x"),d<0&&(m+=" y")&&(k=-1),j.flip=m,i.coordorigin=f*-o+p+g*-q;if(h||b.fillsize){var s=i.getElementsByTagName(F);s=s&&s[0],i.removeChild(s),h&&(r=cw(e,l.x(h[0],h[1]),l.y(h[0],h[1])),s.position=r.dx*k+p+r.dy*k),b.fillsize&&(s.size=b.fillsize[0]*y(c)+p+b.fillsize[1]*y(d)),i.appendChild(s)}j.visibility="visible"};a.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version},b_=function(a,b,c){var d=q(b).toLowerCase().split("-"),e=c?"end":"start",f=d.length,g="classic",h="medium",i="medium";while(f--)switch(d[f]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":g=d[f];break;case"wide":case"narrow":i=d[f];break;case"long":case"short":h=d[f]}var j=a.node.getElementsByTagName("stroke")[0];j[e+"arrow"]=g,j[e+"arrowlength"]=h,j[e+"arrowwidth"]=i},ca=function(c,d){c.paper.canvas.style.display="none",c.attrs=c.attrs||{};var e=c.node,h=c.attrs,i=e.style,j,k=ct[c.type]&&(d.x!=h.x||d.y!=h.y||d.width!=h.width||d.height!=h.height||d.cx!=h.cx||d.cy!=h.cy||d.rx!=h.rx||d.ry!=h.ry||d.r!=h.r),l=cu[c.type]&&(h.cx!=d.cx||h.cy!=d.cy||h.r!=d.r||h.rx!=d.rx||h.ry!=d.ry),m=c;for(var n in d)d[f](n)&&(h[n]=d[n]);k&&(h.path=bg[c.type](c),c._.dirty=1),d.href&&(e.href=d.href),d.title&&(e.title=d.title),d.target&&(e.target=d.target),d.cursor&&(i.cursor=d.cursor),"blur"in d&&c.blur(d.blur),"transform"in d&&c.transform(d.transform);if(d.path&&c.type=="path"||k)e.path=cv(h.path);if(l){var r=h.cx,s=h.cy,t=h.rx||h.r||0,u=h.ry||h.r||0;e.path=a.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",N((r-t)*cs),N((s-u)*cs),N((r+t)*cs),N((s+u)*cs),N(r*cs))}if("clip-rect"in d){var v=q(d["clip-rect"]).split(b);if(v.length==4){v[2]=+v[2]+ +v[0],v[3]=+v[3]+ +v[1];var y=e.clipRect||g.doc.createElement("div"),z=y.style,A=e.parentNode;z.clip=a.format("rect({1}px {2}px {3}px {0}px)",v),e.clipRect||(z.position="absolute",z.top=0,z.left=0,z.width=c.paper.width+"px",z.height=c.paper.height+"px",A.parentNode.insertBefore(y,A),y.appendChild(A),e.clipRect=y)}d["clip-rect"]||e.clipRect&&(e.clipRect.style.clip=o)}if(c.textpath){var B=c.textpath.style;d.font&&(B.font=d.font),d["font-family"]&&(B.fontFamily='"'+d["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,o)+'"'),d["font-size"]&&(B.fontSize=d["font-size"]),d["font-weight"]&&(B.fontWeight=d["font-weight"]),d["font-style"]&&(B.fontStyle=d["font-style"])}"arrow-start"in d&&b_(m,d["arrow-start"]),"arrow-end"in d&&b_(m,d["arrow-end"],1);if(d.opacity!=null||d["stroke-width"]!=null||d.fill!=null||d.src!=null||d.stroke!=null||d["stroke-width"]!=null||d["stroke-opacity"]!=null||d["fill-opacity"]!=null||d["stroke-dasharray"]!=null||d["stroke-miterlimit"]!=null||d["stroke-linejoin"]!=null||d["stroke-linecap"]!=null){var C=e.getElementsByTagName(F),D=!1;C=C&&C[0],!C&&(D=C=cy(F)),c.type=="image"&&d.src&&(C.src=d.src);if("fill-opacity"in d||"opacity"in d){var E=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+a.getRGB(d.fill).o+1||2)-1);E=x(w(E,0),1),C.opacity=E}d.fill&&(C.on=!0);if(C.on==null||d.fill=="none"||d.fill===null)C.on=!1;if(C.on&&d.fill){var G=d.fill.match(J);if(G){C.parentNode==e&&e.removeChild(C),C.rotate=!0,C.src=G[1],C.type="tile";var H=c.getBBox(1);C.position=H.x+p+H.y,c._.fillpos=[H.x,H.y],bs(G[1],function(){c._.fillsize=[this.offsetWidth,this.offsetHeight]})}else C.color=a.getRGB(d.fill).hex,C.src=o,C.type="solid",a.getRGB(d.fill).error&&(m.type in{circle:1,ellipse:1}||q(d.fill).charAt()!="r")&&bZ(m,d.fill,C)&&(h.fill="none",h.gradient=d.fill,C.rotate=!1)}e.appendChild(C);var I=e.getElementsByTagName("stroke")&&e.getElementsByTagName("stroke")[0],K=!1;!I&&(K=I=cy("stroke"));if(d.stroke&&d.stroke!="none"||d["stroke-width"]||d["stroke-opacity"]!=null||d["stroke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])I.on=!0;(d.stroke=="none"||d.stroke===null||I.on==null||d.stroke==0||d["stroke-width"]==0)&&(I.on=!1);var L=a.getRGB(d.stroke);I.on&&d.stroke&&(I.color=L.hex),E=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+L.o+1||2)-1);var M=(P(d["stroke-width"])||1)*.75;E=x(w(E,0),1),d["stroke-width"]==null&&(M=h["stroke-width"]),d["stroke-width"]&&(I.weight=M),M&&M<1&&(E*=M)&&(I.weight=1),I.opacity=E,d["stroke-linejoin"]&&(I.joinstyle=d["stroke-linejoin"]||"miter"),I.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(I.endcap=d["stroke-linecap"]=="butt"?"flat":d["stroke-linecap"]=="square"?"square":"round");if(d["stroke-dasharray"]){var O={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};I.dashstyle=O[f](d["stroke-dasharray"])?O[d["stroke-dasharray"]]:o}K&&e.appendChild(I)}if(m.type=="text"){m.paper.canvas.style.display=o;var Q=m.paper.span,R=100,S=h.font&&h.font.match(/\d+(?:\.\d*)?(?=px)/);i=Q.style,h.font&&(i.font=h.font),h["font-family"]&&(i.fontFamily=h["font-family"]),h["font-weight"]&&(i.fontWeight=h["font-weight"]),h["font-style"]&&(i.fontStyle=h["font-style"]),S=P(S?S[0]:h["font-size"]),i.fontSize=S*R+"px",m.textpath.string&&(Q.innerHTML=q(m.textpath.string).replace(/</g,"&#60;").replace(/&/g,"&#38;").replace(/\n/g,"<br>"));var T=Q.getBoundingClientRect();m.W=h.w=(T.right-T.left)/R,m.H=h.h=(T.bottom-T.top)/R,m.paper.canvas.style.display="none",m.X=h.x,m.Y=h.y+m.H/2,("x"in d||"y"in d)&&(m.path.v=a.format("m{0},{1}l{2},{1}",N(h.x*cs),N(h.y*cs),N(h.x*cs)+1));var U=["x","y","text","font","font-family","font-weight","font-style","font-size"];for(var V=0,W=U.length;V<W;V++)if(U[V]in d){m._.dirty=1;break}switch(h["text-anchor"]){case"start":m.textpath.style["v-text-align"]="left",m.bbx=m.W/2;break;case"end":m.textpath.style["v-text-align"]="right",m.bbx=-m.W/2;break;default:m.textpath.style["v-text-align"]="center",m.bbx=0}m.textpath.style["v-text-kern"]=!0}m.paper.canvas.style.display=o},bZ=function(a,b,c){a.attrs=a.attrs||{};var d=a.attrs,e="linear",f=".5 .5";a.attrs.gradient=b,b=q(b).replace(_,function(a,b,c){e="radial",b&&c&&(b=P(b),c=P(c),z(b-.5,2)+z(c-.5,2)>.25&&(c=v.sqrt(.25-z(b-.5,2))*((c>.5)*2-1)+.5),f=b+p+c);return o}),b=b.split(/\s*\-\s*/);if(e=="linear"){var g=b.shift();g=-P(g);if(isNaN(g))return null}var h=bD(b);if(!h)return null;a=a.shape||a.node;if(h.length){a.removeChild(c),c.on=!0,c.method="none",c.color=h[0].color,c.color2=h[h.length-1].color;var i=[];for(var j=0,k=h.length;j<k;j++)h[j].offset&&i.push(h[j].offset+p+h[j].color);c.colors&&(c.colors.value=i.length?i.join():"0% "+c.color),e=="radial"?(c.type="gradientTitle",c.focus="100%",c.focussize="0 0",c.focusposition=f,c.angle=0):(c.type="gradient",c.angle=(270-g)%360),a.appendChild(c)}return 1},cd=function(b,c){this[0]=this.node=b,b.raphael=!0,this.id=a._oid++,b.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=c,this.matrix=new bP,this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null},ce=cd.prototype,ce.transform=function(a){if(a==null)return this._.transform;bM(this,a);var b=this.matrix.clone(),c=this.skew;b.translate(-0.5,-0.5);if(this.type=="image")if(q(a).indexOf("m")+1){this.node.style.filter=b.toFilter();var d=this.getBBox(),e=this.getBBox(1),f=b.invert(),g=f.x(d.x,d.y)-f.x(e.x,e.y),h=f.y(d.x,d.y)-f.y(e.x,e.y)}else this.node.style.filter=o,cx(this);else this.node.style.filter=o,c.matrix=b,c.offset=b.offset();return this},ce.rotate=function(a,c,d){if(this.removed)return this;if(a!=null){a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2])),a=P(a[0]),d==null&&(c=d);if(c==null||d==null){var e=this.getBBox(1);c=e.x+e.width/2,d=e.y+e.height/2}this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,c,d]]));return this}},ce.translate=function(a,c){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1])),a=P(a[0])||0,c=+c||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=c),this.transform(this._.transform.concat([["t",a,c]]));return this},ce.scale=function(a,c,d,e){if(this.removed)return this;a=q(a).split(b),a.length-1&&(c=P(a[1]),d=P(a[2]),e=P(a[3]),isNaN(d)&&(d=null),isNaN(e)&&(e=null)),a=P(a[0]),c==null&&(c=a),e==null&&(d=e);if(d==null||e==null)var f=this.getBBox(1);d=d==null?f.x+f.width/2:d,e=e==null?f.y+f.height/2:e,this.transform(this._.transform.concat([["s",a,c,d,e]])),this._.dirtyT=1;return this},ce.hide=function(){!this.removed&&(this.node.style.display="none");return this},ce.show=function(){!this.removed&&(this.node.style.display=o);return this},ce._getBBox=function(){if(this.removed)return{};return this.type=="text"?{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}:bt(this.attrs.path)},ce.remove=function(){if(!this.removed){dc.unbind("*.*."+this.id),bG(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)delete this[a];this.removed=!0}},ce.attr=function(b,c){if(this.removed)return this;if(b==null){var d={};for(var e in this.attrs)this.attrs[f](e)&&(d[e]=this.attrs[e]);d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,"string")){if(b==F&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return b in this.attrs?this.attrs[b]:a.is(this.paper.customAttributes[b],"function")?this.paper.customAttributes[b].def:T[b]}if(this.attrs&&c==null&&a.is(b,D)){var g,h={};for(e=0,g=b.length;e<g;e++)h[b[e]]=this.attr(b[e]);return h}var i;c!=null&&(i={},i[b]=c),c==null&&a.is(b,"object")&&(i=b);for(var j in i)dc("attr."+j+"."+this.id,this,i[j]);if(i){for(j in this.paper.customAttributes)if(this.paper.customAttributes[f](j)&&i[f](j)&&a.is(this.paper.customAttributes[j],"function")){var k=this.paper.customAttributes[j].apply(this,[][m](i[j]));this.attrs[j]=i[j];for(var l in k)k[f](l)&&(i[l]=k[l])}i.text&&this.type=="text"&&(this.textpath.string=i.text),ca(this,i)}return this},ce.toFront=function(){!this.removed&&this.node.parentNode.appendChild(this.node),this.paper.top!=this&&bH(this,this.paper);return this},ce.toBack=function(){if(this.removed)return this;this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),bI(this,this.paper));return this},ce.insertAfter=function(a){if(this.removed)return this;a.constructor==c_&&(a=a[a.length-1]),a.node.nextSibling?a.node.parentNode.insertBefore(this.node,a.node.nextSibling):a.node.parentNode.appendChild(this.node),bJ(this,a,this.paper);return this},ce.insertBefore=function(a){if(this.removed)return this;a.constructor==c_&&(a=a[0]),a.node.parentNode.insertBefore(this.node,a.node),bK(this,a,this.paper);return this},ce.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(cp,o),+b!==0?(this.attrs.blur=b,c.filter=d+p+R+".Blur(pixelradius="+(+b||1.5)+")",c.margin=a.format("-{0}px 0 0 -{0}px",N(+b||1.5))):(c.filter=d,c.margin=0,delete this.attrs.blur)},bV=function(a,b){var c=cy("shape");c.style.cssText=cr,c.coordsize=cs+p+cs,c.coordorigin=b.coordorigin;var d=new cd(c,b),e={fill:"none",stroke:"#000"};a&&(e.path=a),d.type="path",d.path=[],d.Path=o,ca(d,e),b.canvas.appendChild(c);var f=cy("skew");f.on=!0,c.appendChild(f),d.skew=f,d.transform(o);return d},cg=function(a,b,c,d,e,f){var g=be(b,c,d,e,f),h=a.path(g),i=h.attrs;h.X=i.x=b,h.Y=i.y=c,h.W=i.width=d,h.H=i.height=e,i.r=f,i.path=g,h.type="rect";return h},ch=function(a,b,c,d,e){var f=a.path(),g=f.attrs;f.X=b-d,f.Y=c-e,f.W=d*2,f.H=e*2,f.type="ellipse",ca(f,{cx:b,cy:c,rx:d,ry:e});return f},cf=function(a,b,c,d){var e=a.path(),f=e.attrs;e.X=b-d,e.Y=c-d,e.W=e.H=d*2,e.type="circle",ca(e,{cx:b,cy:c,r:d});return e},ci=function(a,b,c,d,e,f){var g=be(c,d,e,f),h=a.path(g).attr({stroke:"none"}),i=h.attrs,j=h.node,k=j.getElementsByTagName(F)[0];i.src=b,h.X=i.x=c,h.Y=i.y=d,h.W=i.width=e,h.H=i.height=f,i.path=g,h.type="image",k.parentNode==j&&j.removeChild(k),k.rotate=!0,k.src=b,k.type="tile",h._.fillpos=[c,d],h._.fillsize=[e,f],j.appendChild(k),cx(h);return h},cj=function(b,c,d,e){var f=cy("shape"),g=cy("path"),h=cy("textpath");c=c||0,d=d||0,e=e||"",g.v=a.format("m{0},{1}l{2},{1}",N(c*cs),N(d*cs),N(c*cs)+1),g.textpathok=!0,h.string=q(e),h.on=!0,f.style.cssText="position:absolute;left:0;top:0;width:1;height:1",f.coordsize=cs+p+cs,f.coordorigin="0 0";var i=new cd(f,b),j={fill:"#000",stroke:"none",font:T.font,text:e};i.shape=f,i.path=g,i.textpath=h,i.type="text",i.attrs.text=q(e),i.attrs.x=c,i.attrs.y=d,i.attrs.w=1,i.attrs.h=1,ca(i,j),f.appendChild(h),f.appendChild(g),b.canvas.appendChild(f);var k=cy("skew");k.on=!0,f.appendChild(k),i.skew=k,i.transform(o);return i},ck=function(a,b){var c=this.canvas.style;this.width=a,this.height=b,a==+a&&(a+="px"),b==+b&&(b+="px"),c.width=a,c.height=b,c.clip="rect(0 "+a+" "+b+" 0)",this._viewBox&&cm.apply(this,this._viewBox);return this},cm=function(a,b,c,d,e){dc("setViewBox",this,this._viewBox,[a,b,c,d,e]);var f=this.width,g=this.height,h=1e3*w(c/f,d/g),i,j;e&&(i=g/d,j=f/c,c*i<f&&(a-=(f-c*i)/2/i),d*j<g&&(b-=(g-d*j)/2/j)),this._viewBox=[a,b,c,d,!!e],this.forEach(function(a){a.transform("...")});return this};var cy,cz=function(a){var b=a.document;b.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!b.namespaces.rvml&&b.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),cy=function(a){return b.createElement("<rvml:"+a+' class="rvml">')}}catch(c){cy=function(a){return b.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}};cz(g.win),cl=function(){var b=bE[l](0,arguments),c=b.container,d=b.height,e,f=b.width,h=b.x,j=b.y;if(!c)throw new Error("VML container not found.");var k=new i,m=k.canvas=g.doc.createElement("div"),n=m.style;h=h||0,j=j||0,f=f||512,d=d||342,k.width=f,k.height=d,f==+f&&(f+="px"),d==+d&&(d+="px"),k.coordsize=cs*1e3+p+cs*1e3,k.coordorigin="0 0",k.span=g.doc.createElement("span"),k.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",m.appendChild(k.span),n.cssText=a.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",f,d),c==1?(g.doc.body.appendChild(m),n.left=h+"px",n.top=j+"px",n.position="absolute"):c.firstChild?c.insertBefore(m,c.firstChild):c.appendChild(m),bF.call(k,k,a.fn);return k},j.clear=function(){dc("clear",this),this.canvas.innerHTML=o,this.span=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},j.remove=function(){dc("remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bL(a);return!0}}var cA=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/);navigator.vendor=="Apple Computer, Inc."&&(cA&&cA[1]<4||navigator.platform.slice(0,2)=="iP")||navigator.vendor=="Google Inc."&&cA&&cA[1]<8?j.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:j.safari=bc;var cB=function(){this.returnValue=!1},cC=function(){return this.originalEvent.preventDefault()},cD=function(){this.cancelBubble=!0},cE=function(){return this.originalEvent.stopPropagation()},cF=function(){if(g.doc.addEventListener)return function(a,b,c,d){var e=n&&t[b]?t[b]:b,g=function(e){if(n&&t[f](b))for(var g=0,h=e.targetTouches&&e.targetTouches.length;g<h;g++)if(e.targetTouches[g].target==a){var i=e;e=e.targetTouches[g],e.originalEvent=i,e.preventDefault=cC,e.stopPropagation=cE;break}return c.call(d,e)};a.addEventListener(e,g,!1);return function(){a.removeEventListener(e,g,!1);return!0}};if(g.doc.attachEvent)return function(a,b,c,d){var e=function(a){a=a||g.win.event,a.preventDefault=a.preventDefault||cB,a.stopPropagation=a.stopPropagation||cD;return c.call(d,a)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return!0};return f}}(),cG=[],cH=function(a){var b=a.clientX,c=a.clientY,d=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,e=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft,f,h=cG.length;while(h--){f=cG[h];if(n){var i=a.touches.length,j;while(i--){j=a.touches[i];if(j.identifier==f.el._drag.id){b=j.clientX,c=j.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}}else a.preventDefault();var k=f.el.node,l,m=k.nextSibling,o=k.parentNode,p=k.style.display;g.win.opera&&o.removeChild(k),k.style.display="none",l=f.el.paper.getElementByPoint(b,c),k.style.display=p,g.win.opera&&(m?o.insertBefore(k,m):o.appendChild(k)),l&&dc("drag.over."+f.el.id,f.el,l),b+=e,c+=d,dc("drag.move."+f.el.id,f.move_scope||f.el,b-f.el._drag.x,c-f.el._drag.y,b,c,a)}},cI=function(b){a.unmousemove(cH).unmouseup(cI);var c=cG.length,d;while(c--)d=cG[c],d.el._drag={},dc("drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,b);cG=[]};for(var cJ=s.length;cJ--;)(function(b){a[b]=cd.prototype[b]=function(c,d){a.is(c,"function")&&(this.events=this.events||[],this.events.push({name:b,f:c,unbind:cF(this.shape||this.node||g.doc,b,c,d||this)}));return this},a["un"+b]=cd.prototype["un"+b]=function(a){var c=this.events,d=c.length;while(d--)if(c[d].name==b&&c[d].f==a){c[d].unbind(),c.splice(d,1),!c.length&&delete this.events;return this}return this}})(s[cJ]);ce.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},ce.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)},ce.drag=function(b,c,d,e,f,h){function i(i){(i.originalEvent||i).preventDefault();var j=g.doc.documentElement.scrollTop||g.doc.body.scrollTop,k=g.doc.documentElement.scrollLeft||g.doc.body.scrollLeft;this._drag.x=i.clientX+k,this._drag.y=i.clientY+j,this._drag.id=i.identifier,!cG.length&&a.mousemove(cH).mouseup(cI),cG.push({el:this,move_scope:e,start_scope:f,end_scope:h}),c&&dc.on("drag.start."+this.id,c),b&&dc.on("drag.move."+this.id,b),d&&dc.on("drag.end."+this.id,d),dc("drag.start."+this.id,f||e||this,i.clientX+k,i.clientY+j,i)}this._drag={},this.mousedown(i);return this},ce.onDragOver=function(a){a?dc.on("drag.over."+this.id,a):dc.unbind("drag.over."+this.id)},ce.undrag=function(){var b=cG.length;while(b--)cG[b].el==this&&(a.unmousedown(cG[b].start),cG.splice(b++,1),dc.unbind("drag.*."+this.id));!cG.length&&a.unmousemove(cH).unmouseup(cI)},j.circle=function(a,b,c){return cf(this,a||0,b||0,c||0)},j.rect=function(a,b,c,d,e){return cg(this,a||0,b||0,c||0,d||0,e||0)},j.ellipse=function(a,b,c,d){return ch(this,a||0,b||0,c||0,d||0)},j.path=function(b){b&&!a.is(b,C)&&!a.is(b[0],D)&&(b+=o);return bV(a.format[l](a,arguments),this)},j.image=function(a,b,c,d,e){return ci(this,a||"about:blank",b||0,c||0,d||0,e||0)},j.text=function(a,b,c){return cj(this,a||0,b||0,q(c))},j.set=function(a){arguments.length>1&&(a=Array.prototype.splice.call(arguments,0,arguments.length));return new c_(a)},j.setSize=ck,j.setViewBox=cm,j.top=j.bottom=null,j.raphael=a;var cK=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,h=e.clientLeft||d.clientLeft||0,i=b.top+(g.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(g.win.pageXOffset||e.scrollLeft||d.scrollLeft)-h;return{y:i,x:j}};j.getElementByPoint=function(a,b){var c=this,d=c.canvas,e=g.doc.elementFromPoint(a,b);if(g.win.opera&&e.tagName=="svg"){var f=cK(d),h=d.createSVGRect();h.x=a-f.x,h.y=b-f.y,h.width=h.height=1;var i=d.getIntersectionList(h,null);i.length&&(e=i[i.length-1])}if(!e)return null;while(e.parentNode&&e!=d.parentNode&&!e.raphael)e=e.parentNode;e==c.canvas.parentNode&&(e=d),e=e&&e.raphael?c.getById(e.raphaelid):null;return e},j.getById=function(a){var b=this.bottom;while(b){if(b.id==a)return b;b=b.next}return null},j.forEach=function(a,b){var c=this.bottom;while(c){if(a.call(b,c)===!1)return this;c=c.next}return this},ce.getBBox=function(a){if(this.removed)return{};var b=this._;if(a){if(b.dirty||!b.bboxwt)this.realPath=bg[this.type](this),b.bboxwt=bt(this.realPath),b.bboxwt.toString=cM,b.dirty=0;return b.bboxwt}if(b.dirty||b.dirtyT||!b.bbox){if(b.dirty||!this.realPath)b.bboxwt=0,this.realPath=bg[this.type](this);b.bbox=bt(bh(this.realPath,this.matrix)),b.bbox.toString=cM,b.dirty=b.dirtyT=0}return b.bbox},ce.clone=function(){if(this.removed)return null;var a=this.attr();delete a.scale,delete a.translation;return this.paper[this.type]().attr(a)},ce.glow=function(a){if(this.type=="text")return null;a=a||{};var b={width:a.width||10,fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},c=b.width/2,d=this.paper,e=d.set(),f=this.realPath||bg[this.type](this);f=this.matrix?bh(f,this.matrix):f;for(var g=1;g<c+1;g++)e.push(d.path(f).attr({stroke:b.color,fill:b.fill?b.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(b.width/c*g).toFixed(3),opacity:+(b.opacity/c).toFixed(3)}));return e.insertBefore(this).translate(b.offsetx,b.offsety)};var cN={},cO=function(b,c,d,e,f,g,h,i,j){var k=0,l=100,m=[b,c,d,e,f,g,h,i].join(),n=cN[m],o,p;!n&&(cN[m]=n={data:[]}),n.timer&&clearTimeout(n.timer),n.timer=setTimeout(function(){delete cN[m]},2e3);if(j!=null&&!n.precision){var q=cO(b,c,d,e,f,g,h,i);n.precision=~~q*10,n.data=[]}l=n.precision||l;for(var r=0;r<l+1;r++){n.data[r*l]?p=n.data[r*l]:(p=a.findDotsAtSegment(b,c,d,e,f,g,h,i,r/l),n.data[r*l]=p),r&&(k+=z(z(o.x-p.x,2)+z(o.y-p.y,2),.5));if(j!=null&&k>=j)return p;o=p}if(j==null)return k},cP=function(b,c){return function(d,e,f){d=bC(d);var g,h,i,j,k="",l={},m,n=0;for(var o=0,p=d.length;o<p;o++){i=d[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=cO(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cO(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n),k+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(f)return k;l.start=k,k=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,i[5],i[6]].join(),n+=j,g=+i[5],h=+i[6];continue}if(!b&&!c){m=cO(g,h,i[1],i[2],i[3],i[4],i[5],i[6],e-n);return{x:m.x,y:m.y,alpha:m.alpha}}}n+=j,g=+i[5],h=+i[6]}k+=i.shift()+i}l.end=k,m=b?n:c?l:a.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha});return m}},cQ=cP(1),cR=cP(),cS=cP(0,1);a.getTotalLength=cQ,a.getPointAtLength=cR,a.getSubpath=function(a,b,c){if(y(this.getTotalLength(a)-c)<1e-6)return cS(a,b).end;var d=cS(a,c,1);return b?cS(d,b).end:d},ce.getTotalLength=function(){if(this.type=="path"){if(this.node.getTotalLength)return this.node.getTotalLength();return cQ(this.attrs.path)}},ce.getPointAtLength=function(a){if(this.type=="path")return cR(this.attrs.path,a)},ce.getSubpath=function(b,c){if(this.type=="path")return a.getSubpath(this.attrs.path,b,c)};var cT=a.easing_formulas={linear:function(a){return a},"<":function(a){return z(a,1.7)},">":function(a){return z(a,.48)},"<>":function(a){var b=.48-a/1.04,c=v.sqrt(.1734+b*b),d=c-b,e=z(y(d),1/3)*(d<0?-1:1),f=-c-b,g=z(y(f),1/3)*(f<0?-1:1),h=e+g+.5;return(1-h)*3*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a=a-1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==!!a)return a;return z(2,-10*a)*v.sin((a-.075)*2*A/.3)+1},bounce:function(a){var b=7.5625,c=2.75,d;a<1/c?d=b*a*a:a<2/c?(a-=1.5/c,d=b*a*a+.75):a<2.5/c?(a-=2.25/c,d=b*a*a+.9375):(a-=2.625/c,d=b*a*a+.984375);return d}};cT.easeIn=cT["ease-in"]=cT["<"],cT.easeOut=cT["ease-out"]=cT[">"],cT.easeInOut=cT["ease-in-out"]=cT["<>"],cT["back-in"]=cT.backIn,cT["back-out"]=cT.backOut;var cU=[],cV=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,16)},cW=function(){var b=+(new Date),c=0;for(;c<cU.length;c++){var d=cU[c];if(d.el.removed||d.paused)continue;var e=b-d.start,g=d.ms,h=d.easing,i=d.from,j=d.diff,k=d.to,l=d.t,m=d.el,n={},o;d.initstatus?(e=(d.initstatus*d.anim.top-d.prev)/(d.percent-d.prev)*g,d.status=d.initstatus,delete d.initstatus,d.stop&&cU.splice(c--,1)):d.status=(d.prev+(d.percent-d.prev)*(e/g))/d.anim.top;if(e<0)continue;if(e<g){var q=h(e/g);for(var r in i)if(i[f](r)){switch(U[r]){case B:o=+i[r]+q*g*j[r];break;case"colour":o="rgb("+[cX(N(i[r].r+q*g*j[r].r)),cX(N(i[r].g+q*g*j[r].g)),cX(N(i[r].b+q*g*j[r].b))].join(",")+")";break;case"path":o=[];for(var s=0,t=i[r].length;s<t;s++){o[s]=[i[r][s][0]];for(var u=1,v=i[r][s].length;u<v;u++)o[s][u]=+i[r][s][u]+q*g*j[r][s][u];o[s]=o[s].join(p)}o=o.join(p);break;case"transform":if(j[r].real){o=[];for(s=0,t=i[r].length;s<t;s++){o[s]=[i[r][s][0]];for(u=1,v=i[r][s].length;u<v;u++)o[s][u]=i[r][s][u]+q*g*j[r][s][u]}}else{var w=function(a){return+i[r][a]+q*g*j[r][a]};o=[["m",w(0),w(1),w(2),w(3),w(4),w(5)]]}break;case"csv":if(r=="clip-rect"){o=[],s=4;while(s--)o[s]=+i[r][s]+q*g*j[r][s]}break;default:var x=[].concat(i[r]);o=[],s=m.paper.customAttributes[r].length;while(s--)o[s]=+x[s]+q*g*j[r][s]}n[r]=o}m.attr(n),function(a,b,c){setTimeout(function(){dc("anim.frame."+a,b,c)})}(m.id,m,d.anim)}else(function(b,c,d){setTimeout(function(){dc("anim.finish."+c.id,c,d),a.is(b,"function")&&b.call(c)})})(d.callback,m,d.anim),--d.repeat?(m.attr(d.origin),d.start=b):(m.attr(k),cU.splice(c--,1)),d.next&&!d.stop&&c$(d.anim,d.el,d.next,null,d.totalOrigin)}a.svg&&m&&m.paper&&m.paper.safari(),cU.length&&cV(cW)},cX=function(a){return w(x(a,255),0)};ce.animateWith=function(a,b,c,d,e){for(var f=0,g=cU.length;f<g;f++)if(cU[f].el.id==a.id){b.start=cU[f].timestamp;break}return this.animate(b,c,d,e)},ce.onAnimation=function(a){a?dc.on("anim.frame."+this.id,a):dc.unbind("anim.frame."+this.id);return this},cZ.prototype.delay=function(a){var b=new cZ(this.anim,this.ms);b.times=this.times,b.del=+a||0;return b},cZ.prototype.repeat=function(a){var b=new cZ(this.anim,this.ms);b.del=this.del,b.times=v.floor(w(a,0))||1;return b},a.animation=function(b,c,d,e){if(a.is(d,"function")||!d)e=e||d||null,d=null;b=Object(b),c=+c||0;var g={},h,i;for(i in b)b[f](i)&&P(i)!=i&&(h=!0,g[i]=b[i]);if(!h)return new cZ(b,c);d&&(g.easing=d),e&&(g.callback=e);return new cZ({100:g},c)},ce.animate=function(b,c,d,e){var f=this;if(f.removed){e&&e.call(f);return f}var g=b instanceof cZ?b:a.animation(b,c,d,e);c$(g,f,g.percents[0],null,f.attr());return f},ce.setTime=function(a,b){a&&b!=null&&this.status(a,x(b,a.ms)/a.ms);return this},ce.status=function(a,b){var c=[],d=0,e,f;if(b!=null){c$(a,this,-1,x(b,1));return this}e=cU.length;for(;d<e;d++){f=cU[d];if(f.el.id==this.id&&(!a||f.anim==a)){if(a)return f.status;c.push({anim:f.anim,status:f.status})}}if(a)return 0;return c},ce.pause=function(a){for(var b=0;b<cU.length;b++)cU[b].el.id==this.id&&(!a||cU[b].anim==a)&&dc("anim.pause."+this.id,this,cU[b].anim)!==!1&&(cU[b].paused=!0);return this},ce.resume=function(a){for(var b=0;b<cU.length;b++)if(cU[b].el.id==this.id&&(!a||cU[b].anim==a)){var c=cU[b];dc("anim.resume."+this.id,this,c.anim)!==!1&&(delete c.paused,this.status(c.anim,c.status))}return this},ce.stop=function(a){for(var b=0;b<cU.length;b++)cU[b].el.id==this.id&&(!a||cU[b].anim==a)&&dc("anim.stop."+this.id,this,cU[b].anim)!==!1&&cU.splice(b--,1);return this},ce.toString=function(){return"Raphaël’s object"};var c_=function(a){this.items=[],this.length=0,this.type="set";if(a)for(var b=0,c=a.length;b<c;b++)a[b]&&(a[b].constructor==cd||a[b].constructor==c_)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},da=c_.prototype;da.push=function(){var a,b;for(var c=0,d=arguments.length;c<d;c++)a=arguments[c],a&&(a.constructor==cd||a.constructor==c_)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},da.pop=function(){this.length&&delete this[this.length--];return this.items.pop()},da.forEach=function(a,b){for(var c=0,d=this.items.length;c<d;c++)if(a.call(b,this.items[c])===!1)return this;return this};for(var db in ce)ce[f](db)&&(da[db]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][l](c,b)})}}(db));da.attr=function(b,c){if(b&&a.is(b,D)&&a.is(b[0],"object"))for(var d=0,e=b.length;d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items.length;f<g;f++)this.items[f].attr(b,c);return this},da.animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items.length,g=f,h,i=this,j;e&&(j=function(){!--f&&e.call(i)}),d=a.is(d,C)?d:j;var k=b instanceof cZ?b:a.animation(b,c,d,j);h=this.items[--g].animate(k);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,k);return this},da.insertAfter=function(a){var b=this.items.length;while(b--)this.items[b].insertAfter(a);return this},da.getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items.length;e--;)if(!this.items[e].removed){var f=this.items[e].getBBox();a.push(f.x),b.push(f.y),c.push(f.x+f.width),d.push(f.y+f.height)}a=x[l](0,a),b=x[l](0,b);return{x:a,y:b,width:w[l](0,c)-a,height:w[l](0,d)-b}},da.clone=function(a){a=new c_;for(var b=0,c=this.items.length;b<c;b++)a.push(this.items[b].clone());return a},da.toString=function(){return"Raphaël‘s set"},a.registerFont=function(a){if(!a.face)return a;this.fonts=this.fonts||{};var b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(var d in a.face)a.face[f](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=Q(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[f](e)){var g=a.glyphs[e];b.glyphs[e]={w:g.w,k:{},d:g.d&&"M"+g.d.replace(/[mlcxtrv]/g,function(a){return({l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"})[a]||"M"})+"z"};if(g.k)for(var h in g.k)g[f](h)&&(b.glyphs[e].k[h]=g.k[h])}}return a},j.getFont=function(b,c,d,e){e=e||"normal",d=d||"normal",c=+c||({normal:400,bold:700,lighter:300,bolder:800})[c]||400;if(!!a.fonts){var g=a.fonts[b];if(!g){var h=new RegExp("(^|\\s)"+b.replace(/[^\w\d\s+!~.:_-]/g,o)+"(\\s|$)","i");for(var i in a.fonts)if(a.fonts[f](i)&&h.test(i)){g=a.fonts[i];break}}var j;if(g)for(var k=0,l=g.length;k<l;k++){j=g[k];if(j.face["font-weight"]==c&&(j.face["font-style"]==d||!j.face["font-style"])&&j.face["font-stretch"]==e)break}return j}},j.print=function(c,d,e,f,g,h,i){h=h||"middle",i=w(x(i||0,1),-1);var j=this.set(),k=q(e).split(o),l=0,m=o,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var p=f.face.bbox.split(b),r=+p[0],s=+p[1]+(h=="baseline"?p[3]-p[1]+ +f.face.descent:(p[3]-p[1])/2);for(var t=0,u=k.length;t<u;t++){var v=t&&f.glyphs[k[t-1]]||{},y=f.glyphs[k[t]];l+=t?(v.w||f.w)+(v.k&&v.k[k[t]]||0)+f.w*i:0,y&&y.d&&j.push(this.path(y.d).attr({fill:"#000",stroke:"none",transform:[["t",l,0]]}))}j.scale(n,n,r,s).translate(c-r,d-s)}return j},a.format=function(b,c){var e=a.is(c,D)?[0][m](c):arguments;b&&a.is(b,C)&&e.length-1&&(b=b.replace(d,function(a,b){return e[++b]==null?o:e[b]}));return b||o},a.ninja=function(){h.was?g.win.Raphael=h.is:delete Raphael;return a},a.el=ce,a.st=da,function(a,b,c){function d(){/in/.test(a.readyState)?setTimeout(d,9):dc("DOMload")}a.readyState==null&&a.addEventListener&&(a.addEventListener(b,c=function(){a.removeEventListener(b,c,!1),a.readyState="complete"},!1),a.readyState="loading"),d()}(document,"DOMContentLoaded"),h.was?g.win.Raphael=a:Raphael=a;var dc=a.eve=function(){var a="0.2.1",b="hasOwnProperty",c=/[\.\/]/,d="*",e={n:{}},f=function(a,b){var c=e,d=Array.prototype.slice.call(arguments,2),g=f.listeners(a),h=[];for(var i=0,j=g.length;i<j;i++)try{g[i].apply(b,d)}catch(k){h.push({error:k&&k.message||k,func:g[i]})}if(h.length)return h};f.listeners=function(a){var b=a.split(c),f=e,g,h,i,j,k,l,m,n,o=[f],p=[];for(j=0,k=b.length;j<k;j++){n=[];for(l=0,m=o.length;l<m;l++){f=o[l].n,h=[f[b[j]],f[d]],i=2;while(i--)g=h[i],g&&(n.push(g),p=p.concat(g.f||[]))}o=n}return p},f.on=function(a,b){var d=a.split(c),f=e;for(var g=0,h=d.length;g<h;g++)f=f.n,!f[d[g]]&&(f[d[g]]={n:{}}),f=f[d[g]];f.f=f.f||[];for(g=0,h=f.f.length;g<h;g++)if(f.f[g]==b)return!1;f.f.push(b)},f.unbind=function(a,f){var g=a.split(c),h,i,j,k=[e];for(var l=0,m=g.length;l<m;l++)for(var n=0;n<k.length;n+=j.length-2){j=[n,1],h=k[n].n;if(g[l]!=d)h[g[l]]&&j.push(h[g[l]]);else for(i in h)h[b](i)&&j.push(h[i]);k.splice.apply(k,j)}for(l=0,m=k.length;l<m;l++){h=k[l];while(h.n){if(f){if(h.f){for(l=0,m=h.f.length;l<m;l++)if(h.f[l]==f){h.f.splice(l,1);break}!h.f.length&&delete h.f}for(i in h.n)if(h.n[b](i)&&h.n[i].f){var o=h.n[i].f;for(l=0,m=o.length;l<m;l++)if(o[l]==f){o.splice(l,1);break}!o.length&&delete h.n[i].f}}else{delete h.f;for(i in h.n)h.n[b](i)&&h.n[i].f&&delete h.n[i].f}h=h.n}}return!0},f.version=a,f.toString=function(){return"You are running Eve "+a};return f}()})()
\ No newline at end of file
index e2bf833..05001d7 100644 (file)
     \*/
     R.svg = !(R.vml = R.type == "VML");
     paperproto = Paper.prototype = R.prototype;
+    /*\
+     * Paper.customAttributes
+     [ property (object) ]
+     **
+     * If you have a set of attributes that you would like to represent
+     * as a function of some number you can do it easily with custom attributes:
+     > Usage
+     | paper.customAttributes.hue = function (num) {
+     |     num = num % 1;
+     |     return {fill: "hsb(" + num + ", .75, 1)"};
+     | };
+     | // Custom attribute “hue” will change fill
+     | // to be given hue with fixed saturation and brightness.
+     | // Now you can use it like this:
+     | var c = paper.circle(10, 10, 10).attr({hue: .45});
+     | // or even like this:
+     | c.animate({hue: 1}, 1e3);
+     | 
+     | // You could also create custom attribute
+     | // with multiple parameters:
+     | paper.customAttributes.hsb = function (h, s, b) {
+     |     return {fill: "hsb(" + [h, s, b].join(",") + ")"};
+     | };
+     | c.attr({hsb: ".5 .8 1"});
+     | c.animate({hsb: "1 0 .5"}, 1e3);
+    \*/
     paperproto.customAttributes = {};
     R._id = 0;
     R._oid = 0;
      - s (number) saturation
      - v (number) value or brightness
      = (object) RGB object in format:
-     | {
-     |     r: // red,
-     |     g: // green,
-     |     b: // blue
-     |     hex: // color in HTML/CSS format: #••••••
-     | }
+     o {
+     o     r (number) red,
+     o     g (number) green,
+     o     b (number) blue,
+     o     hex (string) color in HTML/CSS format: #••••••
+     o }
     \*/
     R.hsb2rgb = function (h, s, v, o) {
         if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) {
      - s (number) saturation
      - l (number) luminosity
      = (object) RGB object in format:
-     | {
-     |     r: // red,
-     |     g: // green,
-     |     b: // blue
-     |     hex: // color in HTML/CSS format: #••••••
-     | }
+     o {
+     o     r (number) red,
+     o     g (number) green,
+     o     b (number) blue,
+     o     hex (string) color in HTML/CSS format: #••••••
+     o }
     \*/
     R.hsl2rgb = function (h, s, l, o) {
         if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) {
      - g (number) green
      - b (number) blue
      = (object) HSB object in format:
-     | {
-     |     h: // hue,
-     |     s: // saturation,
-     |     b: // brightness
-     | }
+     o {
+     o     h (number) hue
+     o     s (number) saturation
+     o     b (number) brightness
+     o }
     \*/
     R.rgb2hsb = function (r, g, b) {
         b = prepareRGB(r, g, b);
      - g (number) green
      - b (number) blue
      = (object) HSL object in format:
-     | {
-     |     h: // hue,
-     |     s: // saturation,
-     |     l: // luminosity
-     | }
+     o {
+     o     h (number) hue
+     o     s (number) saturation
+     o     l (number) luminosity
+     o }
     \*/
     R.rgb2hsl = function (r, g, b) {
         b = prepareRGB(r, g, b);
          <li>hsl(•••%, •••%, •••%) — same as hsb</li>
      </ul>
      = (object) RGB object in format:
-     | {
-     |     r: // red,
-     |     g: // green,
-     |     b: // blue
-     |     hex: // color in HTML/CSS format: #••••••,
-     |     error: // true if string can’t be parsed
-     | }
+     o {
+     o     r (number) red,
+     o     g (number) green,
+     o     b (number) blue
+     o     hex (string) color in HTML/CSS format: #••••••,
+     o     error (boolean) true if string can’t be parsed
+     o }
     \*/
     R.getRGB = cacher(function (colour) {
         if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) {
      - p2y (number) y of the second point of the curve
      - t (number) position on the curve (0..1)
      = (object) point information in format:
-     | {
-     |     x: // x coordinate of the point,
-     |     y: // y coordinate of the point,
-     |     m: {
-     |         x: // x coordinate of the left anchor,
-     |         y: // y coordinate of the left anchor
-     |     },
-     |     n: {
-     |         x: // x coordinate of the right anchor,
-     |         y: // y coordinate of the right anchor
-     |     },
-     |     start: {
-     |         x: // x coordinate of the start of the curve,
-     |         y: // y coordinate of the start of the curve
-     |     },
-     |     end: {
-     |         x: // x coordinate of the end of the curve,
-     |         y: // y coordinate of the end of the curve
-     |     },
-     |     alpha: // angle of the curve derivative at the point.
-     | }
+     o {
+     o     x: (number) x coordinate of the point
+     o     y: (number) y coordinate of the point
+     o     m: {
+     o         x: (number) x coordinate of the left anchor
+     o         y: (number) y coordinate of the left anchor
+     o     }
+     o     n: {
+     o         x: (number) x coordinate of the right anchor
+     o         y: (number) y coordinate of the right anchor
+     o     }
+     o     start: {
+     o         x: (number) x coordinate of the start of the curve
+     o         y: (number) y coordinate of the start of the curve
+     o     }
+     o     end: {
+     o         x: (number) x coordinate of the end of the curve
+     o         y: (number) y coordinate of the end of the curve
+     o     }
+     o     alpha: (number) angle of the curve derivative at the point
+     o }
     \*/
     R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
         var t1 = 1 - t,
         }),
         getContainer = function (x, y, w, h) {
             var container;
-            if (R.is(x, string) || R.is(x, "object")) {
-                container = h == null ? g.doc.getElementById(x) : x;
-                if (container == null) {
-                    return;
-                }
-                if (container.tagName) {
-                    if (y == null) {
-                        return {
-                            container: container,
-                            width: container.style.pixelWidth || container.offsetWidth,
-                            height: container.style.pixelHeight || container.offsetHeight
-                        };
-                    } else {
-                        return {container: container, width: y, height: w};
-                    }
+            container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;
+            if (container == null) {
+                return;
+            }
+            if (container.tagName) {
+                if (y == null) {
+                    return {
+                        container: container,
+                        width: container.style.pixelWidth || container.offsetWidth,
+                        height: container.style.pixelHeight || container.offsetHeight
+                    };
+                } else {
+                    return {container: container, width: y, height: w};
                 }
             }
             return {container: 1, x: x, y: y, width: w, height: h};
                 oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"
             },
             markerCounter = {};
-        round = function (num) {
-            return +num + (~~num === num) * .5;
-        };
         R.toString = function () {
             return  "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version;
         };
         Element = function (node, svg) {
             var X = 0,
                 Y = 0;
+            /*\
+             * Element.node
+             [ property (object) ]
+             **
+             * Gives you a reference to the DOM object, so you can assign event handlers or just mess around.
+             > Usage
+             | // draw a circle at coordinate 10,10 with radius of 10
+             | var c = paper.circle(10, 10, 10);
+             | c.node.onclick = function () {
+             |     c.attr("fill", "red");
+             | };
+            \*/
             this[0] = this.node = node;
+            /*\
+             * Element.raphael
+             [ property (object) ]
+             **
+             * Internal reference to @Raphael object. In case it is not available.
+             > Usage
+             | Raphael.el.red = function () {
+             |     var hsb = this.paper.raphael.rgb2hsb(this.attr("fill"));
+             |     hsb.h = 1;
+             |     this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex});
+             | }
+            \*/
             node.raphael = true;
+            /*\
+             * Element.id
+             [ property (number) ]
+             **
+             * Unique id of the element. Especially usesful when you want to listen to events of the element, 
+             * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.
+            \*/
             this.id = R._oid++;
             node.raphaelid = this.id;
             this.matrix = new Matrix;
             this.realPath = null;
+            /*\
+             * Element.paper
+             [ property (object) ]
+             **
+             * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.
+             > Usage
+             | Raphael.el.cross = function () {
+             |     this.attr({fill: "red"});
+             |     this.paper.path("M10,10L50,50M50,10L10,50")
+             |         .attr({stroke: "red"});
+             | }
+            \*/
             this.paper = svg;
             this.attrs = this.attrs || {};
             this._ = {
                 dirty: 1
             };
             !svg.bottom && (svg.bottom = this);
+            /*\
+             * Element.prev
+             [ property (object) ]
+             **
+             * Reference to the previous element in the hierarchy.
+            \*/
             this.prev = svg.top;
             svg.top && (svg.top.next = this);
             svg.top = this;
+            /*\
+             * Element.next
+             [ property (object) ]
+             **
+             * Reference to the next element in the hierarchy.
+            \*/
             this.next = null;
         },
         elproto = Element.prototype;
          * rotate 45° around centre and scale 1.5 times relative to centre”. As you see rotate and scale commands has origin
          * coordinates as a optional parameters.
          * Matrix accepts six parameters.
+         > Usage
+         | var el = paper.rect(10, 20, 300, 200);
+         | // translate 100, 100, rotate 45°, translate -100, 0
+         | el.transform("t100,100r45t-100,0");
+         | // if you want you can append or prepend transformations
+         | el.transform("...t50,50");
+         | el.transform("s2...");
+         | // or even wrap
+         | el.transform("t50,50...t-50-50");
+         | // to reset transformation call method with empty string
+         | el.transform("");
+         | // to get current value call it without parameters
+         | console.log(el.transform());
          > Parameters
          - tstr (string) #optional transformation string
          * If tstr isn’t specified
 
             return this;
         };
+        /*\
+         * Element.hide
+         [ method ]
+         **
+         * Makes element invisible. See @Element.show.
+         = (object) @Element
+        \*/
         elproto.hide = function () {
-            !this.removed && (this.node.style.display = "none");
+            !this.removed && this.paper.safari(this.node.style.display = "none");
             return this;
         };
+        /*\
+         * Element.show
+         [ method ]
+         **
+         * Makes element visible. See @Element.hide.
+         = (object) @Element
+        \*/
         elproto.show = function () {
-            !this.removed && (this.node.style.display = "");
+            !this.removed && this.paper.safari(this.node.style.display = "");
             return this;
         };
+        /*\
+         * Element.remove
+         [ method ]
+         **
+         * Removes element form the paper.
+        \*/
         elproto.remove = function () {
             if (this.removed) {
                 return;
             hide && this.hide();
             return bbox;
         };
+        /*\
+         * Element.attr
+         [ method ]
+         **
+         * Sets the attributes of the element.
+         > Parameters
+         - attrName (string) attribute’s name
+         - value (string) value
+         * or
+         - params (object) object of name/value pairs
+         * or
+         - attrName (string) attribute’s name
+         * or
+         - attrNames (array) in this case method returns array of current values for given attribute names
+         = (object) @Element if attrsName & value or params are passed in.
+         = (...) value of the attribute if only attrsName is passed in.
+         = (array) array of values of the attribute if attrsNames is passed in.
+         = (object) object of attributes if nothing is passed in.
+         > Possible parameters
+         # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p>
+         o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `midium`, length: `long`, `short`, `midium`.
+         o clip-rect (string) comma or space separated values: x, y, width and height
+         o cursor (string) CSS type of the cursor
+         o cx (number)
+         o cy (number)
+         o fill (string) colour, gradient or image
+         o fill-opacity (number)
+         o font (string)
+         o font-family (string)
+         o font-size (number) font size in pixels
+         o font-weight (string)
+         o height (number)
+         o href (string) URL, if specified element behaves as hyperlink
+         o opacity (number)
+         o path (string) SVG path string format
+         o r (number)
+         o rx (number)
+         o ry (number)
+         o src (string) image URL, only works for @Element.image element
+         o stroke (string) stroke colour
+         o stroke-dasharray (string) [“”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”]
+         o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”]
+         o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”]
+         o stroke-miterlimit (number)
+         o stroke-opacity (number)
+         o stroke-width (number) stroke width in pixels, default is '1'
+         o target (string) used with href
+         o text (string) contents of the text element. Use `\n` for multiline text
+         o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`”
+         o title (string) will create tooltip with a given text
+         o transform (string) see @Element.transform
+         o width (number)
+         o x (number)
+         o y (number)
+         > Gradients
+         * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90°
+         * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black.
+         *
+         * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” –
+         * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point
+         * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.
+         > Path String
+         # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>
+         > Colour Parsing
+         # <ul>
+         #     <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>
+         #     <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>
+         #     <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>
+         #     <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200,&nbsp;100,&nbsp;0)</code>”)</li>
+         #     <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%,&nbsp;175%,&nbsp;0%)</code>”)</li>
+         #     <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200,&nbsp;100,&nbsp;0, .5)</code>”)</li>
+         #     <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%,&nbsp;175%,&nbsp;0%, 50%)</code>”)</li>
+         #     <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5,&nbsp;0.25,&nbsp;1)</code>”)</li>
+         #     <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
+         #     <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>
+         #     <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li>
+         #     <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>
+         #     <li>hsla(•••, •••, •••) — same as above, but with opacity</li>
+         #     <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg,&nbsp;1,&nbsp;.5)</code>” or, if you want to go fancy, “<code>hsl(240°,&nbsp;1,&nbsp;.5)</code>”</li>
+         # </ul>
+        \*/
         elproto.attr = function (name, value) {
             if (this.removed) {
                 return this;
             setFillAndStroke(this, params);
             return this;
         };
+        /*\
+         * Element.toFront
+         [ method ]
+         **
+         * Moves the element so it is the closest to the viewer’s eyes, on top of other elements.
+         = (object) @Element
+        \*/
         elproto.toFront = function () {
             if (this.removed) {
                 return this;
             svg.top != this && tofront(this, svg);
             return this;
         };
+        /*\
+         * Element.toBack
+         [ method ]
+         **
+         * Moves the element so it is the furthest from the viewer’s eyes, behind other elements.
+         = (object) @Element
+        \*/
         elproto.toBack = function () {
             if (this.removed) {
                 return this;
             }
             return this;
         };
+        /*\
+         * Element.insertAfter
+         [ method ]
+         **
+         * Inserts current object after the given one.
+         = (object) @Element
+        \*/
         elproto.insertAfter = function (element) {
             if (this.removed) {
                 return this;
             insertafter(this, element, this.paper);
             return this;
         };
+        /*\
+         * Element.insertBefore
+         [ method ]
+         **
+         * Inserts current object before the given one.
+         = (object) @Element
+        \*/
         elproto.insertBefore = function (element) {
             if (this.removed) {
                 return this;
             this._viewBox = [x, y, w, h, !!fit];
             return this;
         };
+        /*\
+         * Paper.clear
+         [ method ]
+         **
+         * Clears the paper, i.e. removes all the elements.
+        \*/
         paperproto.clear = function () {
             eve("clear", this);
             var c = this.canvas;
             c.appendChild(this.desc);
             c.appendChild(this.defs = $("defs"));
         };
+        /*\
+         * Paper.remove
+         [ method ]
+         **
+         * Removes the paper from the DOM.
+        \*/
         paperproto.remove = function () {
             eve("remove", this);
             this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
             }
             this._viewBox = [x, y, w, h, !!fit];
             this.forEach(function (el) {
-                el.transform("+");
+                el.transform("...");
             });
-            // this.canvas.coordsize = size + S + size;
-            // this.canvas.coordorigin = x + S + y;
             return this;
         };
         var createNode,
     }
  
     // WebKit rendering bug workaround method
-    var version = navigator.userAgent.match(/Version\/(.*?)\s/);
-    if ((navigator.vendor == "Apple Computer, Inc.") && (version && version[1] < 4 || navigator.platform.slice(0, 2) == "iP")) {
+    var version = navigator.userAgent.match(/Version\/(.*?)\s/) || navigator.userAgent.match(/Chrome\/(\d+)/);
+    if ((navigator.vendor == "Apple Computer, Inc.") && (version && version[1] < 4 || navigator.platform.slice(0, 2) == "iP") ||
+        (navigator.vendor == "Google Inc." && version && version[1] < 8)) {
+        /*\
+         * Paper.safari
+         [ method ]
+         **
+         * Adds event handlers for hover for the element.
+         > Parameters
+         - f_in (function) handler for hover in
+         - f_out (function) handler for hover out
+         - icontext (object) #optional context for hover in handler
+         - ocontext (object) #optional context for hover out handler
+         = (object) @Element
+        \*/
         paperproto.safari = function () {
             var rect = this.rect(-99, -99, this.width + 99, this.height + 99).attr({stroke: "none"});
             setTimeout(function () {rect.remove();});
             };
         })(events[i]);
     }
+    /*\
+     * Element.hover
+     [ method ]
+     **
+     * Adds event handlers for hover for the element.
+     > Parameters
+     - f_in (function) handler for hover in
+     - f_out (function) handler for hover out
+     - icontext (object) #optional context for hover in handler
+     - ocontext (object) #optional context for hover out handler
+     = (object) @Element
+    \*/
     elproto.hover = function (f_in, f_out, scope_in, scope_out) {
         return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in);
     };
+    /*\
+     * Element.unhover
+     [ method ]
+     **
+     * Removes event handlers for hover for the element.
+     > Parameters
+     - f_in (function) handler for hover in
+     - f_out (function) handler for hover out
+     = (object) @Element
+    \*/
     elproto.unhover = function (f_in, f_out) {
         return this.unmouseover(f_in).unmouseout(f_out);
     };
+    /*\
+     * Element.drag
+     [ method ]
+     **
+     * Adds event handlers for drag of the element.
+     > Parameters
+     - onmove (function) handler for moving
+     - onstart (function) handler for drag start
+     - onend (function) handler for drag end
+     - mcontext (object) #optional context for moving handler
+     - scontext (object) #optional context for drag start handler
+     - econtext (object) #optional context for drag end handler
+     * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start, 
+     * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element 
+     * `drag.over.<id>` will be fired as well.
+     *
+     * Start event and start handler will be called in specified context or in context of the element with following parameters:
+     o x (number) x position of the mouse
+     o y (number) y position of the mouse
+     o event (object) DOM event object
+     * Move event and move handler will be called in specified context or in context of the element with following parameters:
+     o dx (number) shift by x from the start point
+     o dy (number) shift by y from the start point
+     o x (number) x position of the mouse
+     o y (number) y position of the mouse
+     o event (object) DOM event object
+     * End event and end handler will be called in specified context or in context of the element with following parameters:
+     o event (object) DOM event object
+     = (object) @Element
+    \*/
     elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) {
         function start(e) {
             (e.originalEvent || e).preventDefault();
         this.mousedown(start);
         return this;
     };
+    /*\
+     * Element.onDragOver
+     [ method ]
+     **
+     * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id).
+     > Parameters
+     - f (function) handler for event
+    \*/
     elproto.onDragOver = function (f) {
         f ? eve.on("drag.over." + this.id, f) : eve.unbind("drag.over." + this.id);
     };
+    /*\
+     * Element.undrag
+     [ method ]
+     **
+     * Removes all drag event handlers from given element.
+    \*/
     elproto.undrag = function () {
         var i = drag.length;
         while (i--) if (drag[i].el == this) {
      | st.attr({fill: "red"});
     \*/
     paperproto.setSize = setSize;
+    /*\
+     * Paper.setViewBox
+     [ method ]
+     **
+     * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by 
+     * specifying new boundaries.
+     **
+     > Parameters
+     **
+     x, y, w, h, fit
+     - x (number) new x position, default is `0`
+     - y (number) new y position, default is `0`
+     - w (number) new width of the canvas
+     - h (number) new height of the canvas
+     - fit (boolean) `true` if you want graphics to fit into new boundary box
+    \*/
     paperproto.setViewBox = setViewBox;
     /*\
      * Paper.top
      **
      - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`.
      = (object) Bounding box object:
-     | {
-     |     x: //top left corner x,
-     |     y: //top left corner y,
-     |     width: //width,
-     |     height: //height
-     | }
+     o {
+     o     x: (number) top left corner x
+     o     y: (number) top left corner y
+     o     width: (number) width
+     o     height: (number) height
+     o }
     \*/
     elproto.getBBox = function (isWithoutTransform) {
         if (this.removed) {
      *
      * Note: Glow is not connected to the elment. If you change element attributes it won’t adjust itself.
      **
-     = (object) set of elements that represents glow
+     = (object) @Paper.set of elements that represents glow
     \*/
     elproto.glow = function (glow) {
         if (this.type == "text") {
      - length (number)
      **
      = (object) representation of the point:
-     | {
-     |     x: //x coordinate,
-     |     y: //y coordinate,
-     |     alpha: //angle of derivative
-     | }
+     o {
+     o     x: (number) x coordinate
+     o     y: (number) y coordinate
+     o     alpha: (number) angle of derivative
+     o }
     \*/
     R.getPointAtLength = getPointAtLength;
     /*\
      - length (number)
      **
      = (object) representation of the point:
-     | {
-     |     x: //x coordinate,
-     |     y: //y coordinate,
-     |     alpha: //angle of derivative
-     | }
+     o {
+     o     x: (number) x coordinate
+     o     y: (number) y coordinate
+     o     alpha: (number) angle of derivative
+     o }
     \*/
     elproto.getPointAtLength = function (length) {
         if (this.type != "path") {return;}
         upto255 = function (color) {
             return mmax(mmin(color, 255), 0);
         };
+    /*\
+     * Element.animateWith
+     [ method ]
+     **
+     * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element.
+     **
+     > Parameters
+     **
+     - params (object) final attributes for the element, see also @Element.attr
+     - ms (number) number of milliseconds for animation to run
+     - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
+     - callback (function) #optional callback function. Will be called at the end of animation.
+     * or
+     - animation (object) animation object, see @Raphael.animation
+     **
+     = (object) original element
+    \*/
     elproto.animateWith = function (element, params, ms, easing, callback) {
         for (var i = 0, ii = animationElements.length; i < ii; i++) {
             if (animationElements[i].el.id == element.id) {
      **
      - params (object) final attributes for the element, see also @Element.attr
      - ms (number) number of milliseconds for animation to run
-     - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic-bezier(XX, XX, XX, XX)`
+     - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
      - callback (function) #optional callback function. Will be called at the end of animation.
      **
      = (object) @Animation
      **
      - params (object) final attributes for the element, see also @Element.attr
      - ms (number) number of milliseconds for animation to run
-     - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic-bezier(XX, XX, XX, XX)`
+     - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic&#x2010;bezier(XX,&#160;XX,&#160;XX,&#160;XX)`
      - callback (function) #optional callback function. Will be called at the end of animation.
      * or
      - animation (object) animation object, see @Raphael.animation
      - value (number) number of milliseconds from the beginning of the animation
      **
      = (object) original element if `value` is specified
+     * Note, that during animation following events are triggered:
+     *
+     * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`.
     \*/
     elproto.setTime = function (anim, value) {
         if (anim && value != null) {
      **
      = (number) status
      * or
-     = (array) status if `anim` is not specified in format:
-     | [{
-     |     anim: // animation object,
-     |     status: // status
-     | }, {
-     |     anim: // animation object,
-     |     status: // status
-     | }, ...]
+     = (array) status if `anim` is not specified. Array of objects in format:
+     o {
+     o     anim: (object) animation object
+     o     status: (number) status
+     o }
      * or
      = (object) original element if `value` is specified
     \*/
             return out;
         }
     };
+    /*\
+     * Element.pause
+     [ method ]
+     **
+     * Stops animation of the element with ability to resume it later on.
+     **
+     > Parameters
+     **
+     - anim (object) #optional animation object
+     **
+     = (object) original element
+    \*/
     elproto.pause = function (anim) {
         for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
             if (eve("anim.pause." + this.id, this, animationElements[i].anim) !== false) {
         }
         return this;
     };
+    /*\
+     * Element.resume
+     [ method ]
+     **
+     * Resumes animation if it was paused with @Element.pause method.
+     **
+     > Parameters
+     **
+     - anim (object) #optional animation object
+     **
+     = (object) original element
+    \*/
     elproto.resume = function (anim) {
         for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
             var e = animationElements[i];
         }
         return this;
     };
+    /*\
+     * Element.stop
+     [ method ]
+     **
+     * Stops animation of the element.
+     **
+     > Parameters
+     **
+     - anim (object) #optional animation object
+     **
+     = (object) original element
+    \*/
     elproto.stop = function (anim) {
         for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {
             if (eve("anim.stop." + this.id, this, animationElements[i].anim) !== false) {
         }
     },
     setproto = Set.prototype;
+    /*\
+     * Set.push
+     [ method ]
+     **
+     * Adds each argument to the current set.
+     = (object) original element
+    \*/
     setproto.push = function () {
         var item,
             len;
         }
         return this;
     };
+    /*\
+     * Set.pop
+     [ method ]
+     **
+     * Removes last element and returns it.
+     = (object) element
+    \*/
     setproto.pop = function () {
         this.length && delete this[this.length--];
         return this.items.pop();
     };
+    /*\
+     * Set.forEach
+     [ method ]
+     **
+     * Executes given function for each element in the set.
+     *
+     * If function returns `false` it will stop loop running.
+     **
+     > Parameters
+     **
+     - callback (function) function to run
+     - thisArg (object) context object for the callback
+     = (object) Set object
+    \*/
+    setproto.forEach = function (callback, thisArg) {
+        for (var i = 0, ii = this.items.length; i < ii; i++) {
+            if (callback.call(thisArg, this.items[i]) === false) {
+                return this;
+            }
+        }
+        return this;
+    };
     for (var method in elproto) if (elproto[has](method)) {
         setproto[method] = (function (methodname) {
             return function () {
-                for (var i = 0, ii = this.items.length; i < ii; i++) {
-                    this.items[i][methodname][apply](this.items[i], arguments);
-                }
-                return this;
+                var arg = arguments;
+                return this.forEach(function (el) {
+                    el[methodname][apply](el, arg);
+                });
             };
         })(method);
     }
         oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
         return R;
     };
+    /*\
+     * Raphael.el
+     [ property (object) ]
+     **
+     * You can add your own method to elements. This is usefull when you want to hack default functionality or
+     * want to wrap some common transformation or attributes in one method. In difference to canvas methods,
+     * you can redefine element method at any time. Expending element methods wouldn’t affect set
+     > Usage
+     | Raphael.el.red = function () {
+     |     this.attr({fill: "#f00"});
+     | };
+     | // then use it
+     | paper.circle(100, 100, 20).red();
+    \*/
     R.el = elproto;
     R.st = setproto;
     // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html