marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wik...@apache.org
Subject [3/52] [partial] code contribution, initial import of relevant modules of LMF-3.0.0-SNAPSHOT based on revision 4bf944319368 of the default branch at https://code.google.com/p/lmf/
Date Tue, 19 Feb 2013 12:52:02 GMT
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/src/main/resources/web/admin/js/lib/raphael-dracula.pack.min.js
----------------------------------------------------------------------
diff --git a/lmf-core/src/main/resources/web/admin/js/lib/raphael-dracula.pack.min.js b/lmf-core/src/main/resources/web/admin/js/lib/raphael-dracula.pack.min.js
new file mode 100644
index 0000000..1bf619e
--- /dev/null
+++ b/lmf-core/src/main/resources/web/admin/js/lib/raphael-dracula.pack.min.js
@@ -0,0 +1,7 @@
+/*
+ * Raphael 1.3.1 - JavaScript Vector Library
+ *
+ * Copyright (c) 2008 - 2009 Dmitry Baranovskiy (http://raphaeljs.com)
+ * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
+ */function log(a){console.log&&console.log(a)}Raphael=function(){function Q(a,b,c){function d(){var e=Array[r].slice.call(arguments,0),f=e[p]("►"),g=d.cache=d.cache||{},h=d.count=d.count||[];return g[o](f)?c?c(g[f]):g[f]:(h[q]>=1e3&&delete g[h.shift()],h[B](f),g[f]=a[i](b,e),c?c(g[f]):g[f])}return d}function bE(){return this.x+l+this.y}function bO(a){return function(b,c,d,e){var g={back:a};return f.is(d,"function")?e=d:g.rot=d,b&&b.constructor==br&&(b=b.attrs.path),b&&(g.along=b),this.animate(g,c,e)}}var a=/[, ]+/,b=/^(circle|rect|path|ellipse|text|image)$/,c=document,d=window,e={was:"Raphael"in d,is:d.Raphael},f=function(){if(f.is(arguments[0],"array")){var a=arguments[0],c=by[i](f,a.splice(0,3+f.is(a[0],w))),d=c.set();for(var e=0,g=a[q];e<g;e++){var h=a[e]||{};b.test(h.type)&&d[B](c[h.type]().attr(h))}return d}return by[i](f,arguments)},g=function(){},h="appendChild",i="apply",j="concat",k="",l=" ",m="split",n="click dblclick mousedown mousemove mouseout mouseover mouseup"[m](l
 ),o="hasOwnProperty",p="join",q="length",r="prototype",s=String[r].toLowerCase,t=Math,u=t.max,v=t.min,w="number",x="toString",y=Object[r][x],z={},A=t.pow,B="push",C=/^(?=[\da-f]$)/,D=/^url\(['"]?([^\)]+)['"]?\)$/i,E=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgb\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|rgb\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hs[bl]\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hs[bl]\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,F=t.round,G="setAttribute",H=parseFloat,I=parseInt,J=String[r].toUpperCase,K={"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,rotation:0,rx:0,ry:0,scale:"1 1",src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,targe
 t:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},L={along:"along","clip-rect":"csv",cx:w,cy:w,fill:"colour","fill-opacity":w,"font-size":w,height:w,opacity:w,path:"path",r:w,rotation:"csv",rx:w,ry:w,scale:"csv",stroke:"colour","stroke-opacity":w,"stroke-width":w,translation:"csv",width:w,x:w,y:w},M="replace";f.version="1.3.1",f.type=d.SVGAngle||c.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(f.type=="VML"){var N=document.createElement("div");N.innerHTML="<!--[if vml]><br><br><![endif]-->";if(N.childNodes[q]!=2)return null}f.svg=!(f.vml=f.type=="VML"),g[r]=f[r],f._id=0,f._oid=0,f.fn={},f.is=function(a,b){return b=s.call(b),(b=="object"||b=="undefined")&&typeof a==b||a==null&&b=="null"||s.call(y.call(a).slice(8,-1))==b},f.setWindow=function(a){d=a,c=d.document};var O=function(a){if(f.vml){var b=/^\s+|\s+$/g;O=Q(function(a){var c;a=(a+k)[M](b,k);try{var d=new ActiveXObject("htmlfile");d.write("<bo
 dy>"),d.close(),c=d.body}catch(e){c=createPopup().document.body}var f=c.createTextRange();try{c.style.color=a;var g=f.queryCommandValue("ForeColor");return g=(g&255)<<16|g&65280|(g&16711680)>>>16,"#"+("000000"+g[x](16)).slice(-6)}catch(e){return"none"}})}else{var d=c.createElement("i");d.title="Raphaël Colour Picker",d.style.display="none",c.body[h](d),O=Q(function(a){return d.style.color=a,c.defaultView.getComputedStyle(d,k).getPropertyValue("color")})}return O(a)};f.hsb2rgb=Q(function(a,b,c){f.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h);var d,e,g;if(c==0)return{r:0,g:0,b:0,hex:"#000"};if(a>1||b>1||c>1)a/=255,b/=255,c/=255;var h=~~(a*6),i=a*6-h,j=c*(1-b),k=c*(1-b*i),l=c*(1-b*(1-i));d=[c,k,j,j,l,c,c][h],e=[l,c,c,k,j,j,l][h],g=[j,j,l,c,c,k,j][h],d*=255,e*=255,g*=255;var m={r:d,g:e,b:g},n=(~~d)[x](16),o=(~~e)[x](16),p=(~~g)[x](16);return n=n[M](C,"0"),o=o[M](C,"0"),p=p[M](C,"0"),m.hex="#"+n+o+p,m},f),f.rgb2hsb=Q(function(a,b,c){f.is(a,"object")&&"r"in a&&"g"in a&&"
 b"in a&&(c=a.b,b=a.g,a=a.r);if(f.is(a,"string")){var d=f.getRGB(a);a=d.r,b=d.g,c=d.b}if(a>1||b>1||c>1)a/=255,b/=255,c/=255;var e=u(a,b,c),g=v(a,b,c),h,i,j=e;if(g==e)return{h:0,s:0,b:e};var k=e-g;return i=k/e,a==e?h=(b-c)/k:b==e?h=2+(c-a)/k:h=4+(a-b)/k,h/=6,h<0&&h++,h>1&&h--,{h:h,s:i,b:j}},f);var P=/,?([achlmqrstvxz]),?/gi;f._path2string=function(){return this.join(",")[M](P,"$1")},f.getRGB=Q(function(a){if(!a||!!((a+=k).indexOf("-")+1))return{r:-1,g:-1,b:-1,hex:"none",error:1};if(a=="none")return{r:-1,g:-1,b:-1,hex:"none"};!{hs:1,rg:1}[o](a.substring(0,2))&&a.charAt()!="#"&&(a=O(a));var b,c,d,e,g,h=a.match(E);if(h){h[2]&&(e=I(h[2].substring(5),16),d=I(h[2].substring(3,5),16),c=I(h[2].substring(1,3),16)),h[3]&&(e=I((g=h[3].charAt(3))+g,16),d=I((g=h[3].charAt(2))+g,16),c=I((g=h[3].charAt(1))+g,16)),h[4]&&(h=h[4][m](/\s*,\s*/),c=H(h[0]),d=H(h[1]),e=H(h[2])),h[5]&&(h=h[5][m](/\s*,\s*/),c=H(h[0])*2.55,d=H(h[1])*2.55,e=H(h[2])*2.55);if(h[6])return h=h[6][m](/\s*,\s*/),c=H(h[0]),d=H(h[1]),
 e=H(h[2]),f.hsb2rgb(c,d,e);if(h[7])return h=h[7][m](/\s*,\s*/),c=H(h[0])*2.55,d=H(h[1])*2.55,e=H(h[2])*2.55,f.hsb2rgb(c,d,e);h={r:c,g:d,b:e};var i=(~~c)[x](16),j=(~~d)[x](16),l=(~~e)[x](16);return i=i[M](C,"0"),j=j[M](C,"0"),l=l[M](C,"0"),h.hex="#"+i+j+l,h}return{r:-1,g:-1,b:-1,hex:"none",error:1}},f),f.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);return 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})),c.hex},f.getColor.reset=function(){delete this.start},f.parsePathString=Q(function(a){if(!a)return null;var b={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},c=[];return f.is(a,"array")&&f.is(a[0],"array")&&(c=S(a)),c[q]||(a+k)[M](/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,function(a,d,e){var f=[],g=s.call(d);e[M](/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,function(a,b){b&&f[B](+b)});while(f[q]>=b[g]){c[B]([d][j](f.splice(0,b[g])));if(!b[g])break}}),c[x]=f._path2string,c}),f.
 findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,l=A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(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,u=(1-i)*f+i*h,v=90-t.atan((m-o)/(n-p))*180/t.PI;return(m>o||n<p)&&(v+=180),{x:k,y:l,m:{x:m,y:n},n:{x:o,y:p},start:{x:q,y:r},end:{x:s,y:u},alpha:v}};var R=Q(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=$(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a[q];g<h;g++){f=a[g];if(f[0]=="M")b=f[1],c=f[2],d[B](b),e[B](c);else{var k=Z(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[j](k.min.x,k.max.x),e=e[j](k.min.y,k.max.y),b=f[5],c=f[6]}}var l=v[i](0,d),m=v[i](0,e);return{x:l,y:m,width:u[i](0,d)-l,height:u[i](0,e)-m}}),S=function(a){var b=[];if(!f.is(a,"array")||!f.is(a&&a[0],"array"))a=f.parsePathString(a);for(var c=0,d=a[q];c<d;c++){b[c]=[];for(var e=0,g=a[c][q];e<g;e++)b[c][e]=a[c][e]}return b[x]=f._path
 2string,b},T=Q(function(a){if(!f.is(a,"array")||!f.is(a&&a[0],"array"))a=f.parsePathString(a);var b=[],c=0,d=0,e=0,g=0,h=0;a[0][0]=="M"&&(c=a[0][1],d=a[0][2],e=c,g=d,h++,b[B](["M",c,d]));for(var i=h,j=a[q];i<j;i++){var k=b[i]=[],l=a[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]-c).toFixed(3),k[7]=+(l[7]-d).toFixed(3);break;case"v":k[1]=+(l[1]-d).toFixed(3);break;case"m":e=l[1],g=l[2];default:for(var m=1,n=l[q];m<n;m++)k[m]=+(l[m]-(m%2?c:d)).toFixed(3)}}else{k=b[i]=[],l[0]=="m"&&(e=l[1]+c,g=l[2]+d);for(var o=0,p=l[q];o<p;o++)b[i][o]=l[o]}var r=b[i][q];switch(b[i][0]){case"z":c=e,d=g;break;case"h":c+=+b[i][r-1];break;case"v":d+=+b[i][r-1];break;default:c+=+b[i][r-2],d+=+b[i][r-1]}}return b[x]=f._path2string,b},0,S),U=Q(function(a){if(!f.is(a,"array")||!f.is(a&&a[0],"array"))a=f.parsePathString(a);var b=[],c=0,d=0,e=0,g=0,h=0;a[0][0]=="M"&&(c=+a[0][1],d=+a[0][2],e=c,g=d,h++,b[0]=["M",c,d]);for(var i=h,j=a[
 q];i<j;i++){var k=b[i]=[],l=a[i];if(l[0]!=J.call(l[0])){k[0]=J.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]+c),k[7]=+(l[7]+d);break;case"V":k[1]=+l[1]+d;break;case"H":k[1]=+l[1]+c;break;case"M":e=+l[1]+c,g=+l[2]+d;default:for(var m=1,n=l[q];m<n;m++)k[m]=+l[m]+(m%2?c:d)}}else for(var o=0,p=l[q];o<p;o++)b[i][o]=l[o];switch(k[0]){case"Z":c=e,d=g;break;case"H":c=k[1];break;case"V":d=k[1];break;default:c=b[i][b[i][q]-2],d=b[i][b[i][q]-1]}}return b[x]=f._path2string,b},null,S),V=function(a,b,c,d){return[a,b,c,d,c,d]},W=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]},X=function(a,b,c,d,e,f,g,h,i,k){var l=t.PI,n=l*120/180,o=l/180*(+e||0),r=[],s,v=Q(function(a,b,c){var d=a*t.cos(c)-b*t.sin(c),e=a*t.sin(c)+b*t.cos(c);return{x:d,y:e}});if(!k){s=v(a,b,-o),a=s.x,b=s.y,s=v(h,i,-o),h=s.x,i=s.y;var w=t.cos(l/180*e),x=t.sin(l/180*e),y=(a-h)/2,z=(b-i)/2;c=u(c,t.abs(y)),d=u(d,t.abs(z));var A=y*y/(c*c)+z*z/(d*d);A>1&&(c
 =t.sqrt(A)*c,d=t.sqrt(A)*d);var B=c*c,C=d*d,D=(f==g?-1:1)*t.sqrt(t.abs((B*C-B*z*z-C*y*y)/(B*z*z+C*y*y))),E=D*c*z/d+(a+h)/2,F=D*-d*y/c+(b+i)/2,G=t.asin(((b-F)/d).toFixed(7)),H=t.asin(((i-F)/d).toFixed(7));G=a<E?l-G:G,H=h<E?l-H:H,G<0&&(G=l*2+G),H<0&&(H=l*2+H),g&&G>H&&(G-=l*2),!g&&H>G&&(H-=l*2)}else G=k[0],H=k[1],E=k[2],F=k[3];var I=H-G;if(t.abs(I)>n){var J=H,K=h,L=i;H=G+n*(g&&H>G?1:-1),h=E+c*t.cos(H),i=F+d*t.sin(H),r=X(h,i,c,d,e,0,g,K,L,[H,J,E,F])}I=H-G;var M=t.cos(G),N=t.sin(G),O=t.cos(H),P=t.sin(H),R=t.tan(I/4),S=4/3*c*R,T=4/3*d*R,U=[a,b],V=[a+S*N,b-T*M],W=[h+S*P,i-T*O],Y=[h,i];V[0]=2*U[0]-V[0],V[1]=2*U[1]-V[1];if(k)return[V,W,Y][j](r);r=[V,W,Y][j](r)[p]()[m](",");var Z=[];for(var $=0,_=r[q];$<_;$++)Z[$]=$%2?v(r[$-1],r[$],o).y:v(r[$],r[$+1],o).x;return Z},Y=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:A(j,3)*a+A(j,2)*3*i*c+j*3*i*i*e+A(i,3)*g,y:A(j,3)*b+A(j,2)*3*i*d+j*3*i*i*f+A(i,3)*h}},Z=Q(function(a,b,c,d,e,f,g,h){var j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+t.sqrt(k*k-4
 *j*l))/2/j,n=(-k-t.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g],q;return t.abs(m)>1e12&&(m=.5),t.abs(n)>1e12&&(n=.5),m>0&&m<1&&(q=Y(a,b,c,d,e,f,g,h,m),p[B](q.x),o[B](q.y)),n>0&&n<1&&(q=Y(a,b,c,d,e,f,g,h,n),p[B](q.x),o[B](q.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+t.sqrt(k*k-4*j*l))/2/j,n=(-k-t.sqrt(k*k-4*j*l))/2/j,t.abs(m)>1e12&&(m=.5),t.abs(n)>1e12&&(n=.5),m>0&&m<1&&(q=Y(a,b,c,d,e,f,g,h,m),p[B](q.x),o[B](q.y)),n>0&&n<1&&(q=Y(a,b,c,d,e,f,g,h,n),p[B](q.x),o[B](q.y)),{min:{x:v[i](0,p),y:v[i](0,o)},max:{x:u[i](0,p),y:u[i](0,o)}}}),$=Q(function(a,b){var c=U(a),d=b&&U(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"][j](X[i](0,[b.x,b.y][j](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][j](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"][j](W(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"][j](W(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][j](V(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][j](V(b.x,b.y,a[1],b.y));break;case"V":a=["C"][j](V(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][j](V(b.x,b.y,b.X,b.Y))}return a},h=function(a,b){if(a[b][q]>7){a[b].shift();var e=a[b];while(e[q])a.splice(b++,0,["C"][j](e.splice(0,6)));a.splice(b,1),m=u(c[q],d&&d[q]||0)}},k=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],m=u(c[q],d&&d[q]||0))};for(var l=0,m=u(c[q],d&&d[q]||0);l<m;l++){c[l]=g(c[l],e),h(c,l),d&&(d[l]=g(d[l],f)),d&&h(d,l),k(c,d,e,f,l),k(d,c,f,e,l);var n=c[l],o=d&&d[l],p=n[q],r=d&&o[q];e.x=n[p-2],e.y=n[p-1],e.bx=H(n[p-4])||e.x,e.by=H(n[p-3])||e.y,f.bx=d&&(H(o[r-4])||f.x),f.by=d&&(H(o[r-3])||f.y),f.x=d&&o[r-2],f.y=d&&o[r-1]}return d?[c,d]:c},null,S),_=Q(function(a){var b=[];for(var c=0,d=a
 [q];c<d;c++){var e={},g=a[c].match(/^([^:]*):?([\d\.]*)/);e.color=f.getRGB(g[1]);if(e.color.error)return null;e.color=e.color.hex,g[2]&&(e.offset=g[2]+"%"),b[B](e)}for(var c=1,d=b[q]-1;c<d;c++)if(!b[c].offset){var h=H(b[c-1].offset||0),i=0;for(var j=c+1;j<d;j++)if(b[j].offset){i=b[j].offset;break}i||(i=100,j=d),i=H(i);var k=(i-h)/(j-c+1);for(;c<j;c++)h+=k,b[c].offset=h+"%"}return b}),ba=function(){var a,b,d,e,g;if(f.is(arguments[0],"string")||f.is(arguments[0],"object")){f.is(arguments[0],"string")?a=c.getElementById(arguments[0]):a=arguments[0];if(a.tagName)return arguments[1]==null?{container:a,width:a.style.pixelWidth||a.offsetWidth,height:a.style.pixelHeight||a.offsetHeight}:{container:a,width:arguments[1],height:arguments[2]}}else if(f.is(arguments[0],w)&&arguments[q]>3)return{container:1,x:arguments[0],y:arguments[1],width:arguments[2],height:arguments[3]}},bb=function(a,b){var c=this;for(var d in b)if(b[o](d)&&!(d in a))switch(typeof b[d]){case"function":(function(b){a[d]=a==
 =c?b:function(){return b[i](c,arguments)}})(b[d]);break;case"object":a[d]=a[d]||{},bb.call(this,a[d],b[d]);break;default:a[d]=b[d]}},bc=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)},bd=function(a,b){if(b.top===a)return;bc(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a},be=function(a,b){if(b.bottom===a)return;bc(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a},bf=function(a,b,c){bc(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},bg=function(a,b,c){bc(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},bh=function(a){return function(){throw new Error("Raphaël: you are calling to method “"+a+"” of removed object")}},bi=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;if(f.svg){g[r].svgns="http://www.w3.org/2000/svg",g[r].xlink="http://www.w3.org/1999/xlink";var F=function(a){return+a+(~~a===a)*.5},bj=function(a){for(var b=0,c
 =a[q];b<c;b++)if(s.call(a[b][0])!="a")for(var d=1,e=a[b][q];d<e;d++)a[b][d]=F(a[b][d]);else a[b][6]=F(a[b][6]),a[b][7]=F(a[b][7]);return a},bk=function(a,b){if(!b)return c.createElementNS(g[r].svgns,a);for(var d in b)b[o](d)&&a[G](d,b[d])};f[x]=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var bl=function(a,b){var c=bk("path");b.canvas&&b.canvas[h](c);var d=new br(c,b);return d.type="path",bo(d,{fill:"none",stroke:"#000",path:a}),d},bm=function(a,b,c){var d="linear",e=.5,g=.5,i=a.style;b=(b+k)[M](bi,function(a,b,c){d="radial";if(b&&c){e=H(b),g=H(c);var f=(g>.5)*2-1;A(e-.5,2)+A(g-.5,2)>.25&&(g=t.sqrt(.25-A(e-.5,2))*f+.5)&&g!=.5&&(g=g.toFixed(5)-1e-5*f)}return k}),b=b[m](/\s*\-\s*/);if(d=="linear"){var j=b.shift();j=-H(j);if(isNaN(j))return null;var l=[0,0,t.cos(j*t.PI/180),t.sin(j*t.PI/180)],n=1/(u(t.abs(l[2]),t.abs(l[3]))||1);l[2]*=n,l[3]*=n,l[2]<0&&(l[0]=-l[2],l[2]=0),l[3]<0&&(l[1]=-l[3],l[3]=0)}var o=_(b);if(!o)return null;var p=bk(d+"Gradi
 ent");p.id="r"+(f._id++)[x](36),bk(p,d=="radial"?{fx:e,fy:g}:{x1:l[0],y1:l[1],x2:l[2],y2:l[3]}),c.defs[h](p);for(var r=0,s=o[q];r<s;r++){var v=bk("stop");bk(v,{offset:o[r].offset?o[r].offset:r?"100%":"0%","stop-color":o[r].color||"#fff"}),p[h](v)}return bk(a,{fill:"url(#"+p.id+")",opacity:1,"fill-opacity":1}),i.fill=k,i.opacity=1,i.fillOpacity=1,1},bn=function(a){var b=a.getBBox();bk(a.pattern,{patternTransform:f.format("translate({0},{1})",b.x,b.y)})},bo=function(b,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]},g=b.node,i=b.attrs,j=b.rotate(),n=function(a,b){b=e[s.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,h=[],i=b[q];while(i--)h[i]=b[i]*c+(i%2?1:-1)*f;bk(g,{"stroke-dasharray":h[p](",")})}};d[o]("rotation")&&(j=d.rotation);var r=(j+k)[m](a);r.length-1?(r[1]=+r[1],r[2]=+r[2]):r=n
 ull,H(j)&&b.rotate(0,!0);for(var t in d)if(d[o](t)){if(!K[o](t))continue;var u=d[t];i[t]=u;switch(t){case"rotation":b.rotate(u,!0);break;case"href":case"title":case"target":var v=g.parentNode;if(s.call(v.tagName)!="a"){var w=bk("a");v.insertBefore(w,g),w[h](g),v=w}v.setAttributeNS(b.paper.xlink,t,u);break;case"cursor":g.style.cursor=u;break;case"clip-rect":var y=(u+k)[m](a);if(y[q]==4){b.clip&&b.clip.parentNode.parentNode.removeChild(b.clip.parentNode);var z=bk("clipPath"),A=bk("rect");z.id="r"+(f._id++)[x](36),bk(A,{x:y[0],y:y[1],width:y[2],height:y[3]}),z[h](A),b.paper.defs[h](z),bk(g,{"clip-path":"url(#"+z.id+")"}),b.clip=A}if(!u){var B=c.getElementById(g.getAttribute("clip-path")[M](/(^url\(#|\)$)/g,k));B&&B.parentNode.removeChild(B),bk(g,{"clip-path":k}),delete b.clip}break;case"path":u&&b.type=="path"&&(i.path=bj(U(u)),bk(g,{d:i.path}));break;case"width":g[G](t,u);if(i.fx)t="x",u=i.x;else break;case"x":i.fx&&(u=-i.x-(i.width||0));case"rx":if(t=="rx"&&b.type=="rect")break;case"
 cx":r&&(t=="x"||t=="cx")&&(r[1]+=u-i[t]),g[G](t,F(u)),b.pattern&&bn(b);break;case"height":g[G](t,u);if(i.fy)t="y",u=i.y;else break;case"y":i.fy&&(u=-i.y-(i.height||0));case"ry":if(t=="ry"&&b.type=="rect")break;case"cy":r&&(t=="y"||t=="cy")&&(r[2]+=u-i[t]),g[G](t,F(u)),b.pattern&&bn(b);break;case"r":b.type=="rect"?bk(g,{rx:u,ry:u}):g[G](t,u);break;case"src":b.type=="image"&&g.setAttributeNS(b.paper.xlink,"href",u);break;case"stroke-width":g.style.strokeWidth=u,g[G](t,u),i["stroke-dasharray"]&&n(b,i["stroke-dasharray"]);break;case"stroke-dasharray":n(b,u);break;case"translation":var C=(u+k)[m](a);C[0]=+C[0]||0,C[1]=+C[1]||0,r&&(r[1]+=C[0],r[2]+=C[1]),bN.call(b,C[0],C[1]);break;case"scale":var C=(u+k)[m](a);b.scale(+C[0]||1,+C[1]||+C[0]||1,+C[2]||null,+C[3]||null);break;case"fill":var E=(u+k).match(D);if(E){var z=bk("pattern"),L=bk("image");z.id="r"+(f._id++)[x](36),bk(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),bk(L,{x:0,y:0}),L.setAttributeNS(b.paper.xlink,"href",E[1]
 ),z[h](L);var N=c.createElement("img");N.style.cssText="position:absolute;left:-9999em;top-9999em",N.onload=function(){bk(z,{width:this.offsetWidth,height:this.offsetHeight}),bk(L,{width:this.offsetWidth,height:this.offsetHeight}),c.body.removeChild(this),b.paper.safari()},c.body[h](N),N.src=E[1],b.paper.defs[h](z),g.style.fill="url(#"+z.id+")",bk(g,{fill:"url(#"+z.id+")"}),b.pattern=z,b.pattern&&bn(b);break}if(!f.getRGB(u).error)delete d.gradient,delete i.gradient,!f.is(i.opacity,"undefined")&&f.is(d.opacity,"undefined")&&bk(g,{opacity:i.opacity}),!f.is(i["fill-opacity"],"undefined")&&f.is(d["fill-opacity"],"undefined")&&bk(g,{"fill-opacity":i["fill-opacity"]});else if(({circle:1,ellipse:1}[o](b.type)||(u+k).charAt()!="r")&&bm(g,u,b.paper)){i.gradient=u,i.fill="none";break};case"stroke":g[G](t,f.getRGB(u).hex);break;case"gradient":((({circle:1,ellipse:1}))[o](b.type)||(u+k).charAt()!="r")&&bm(g,u,b.paper);break;case"opacity":case"fill-opacity":if(i.gradient){var O=c.getElementById(
 g.getAttribute("fill")[M](/^url\(#|\)$/g,k));if(O){var P=O.getElementsByTagName("stop");P[P[q]-1][G]("stop-opacity",u)}break};default:t=="font-size"&&(u=I(u,10)+"px");var Q=t[M](/(\-.)/g,function(a){return J.call(a.substring(1))});g.style[Q]=u,g[G](t,u)}}bq(b,d),r?b.rotate(r.join(l)):H(j)&&b.rotate(j,!0)},bp=1.2,bq=function(a,b){if(a.type!="text"||!(b[o]("text")||b[o]("font")||b[o]("font-size")||b[o]("x")||b[o]("y")))return;var d=a.attrs,e=a.node,f=e.firstChild?I(c.defaultView.getComputedStyle(e.firstChild,k).getPropertyValue("font-size"),10):10;if(b[o]("text")){d.text=b.text;while(e.firstChild)e.removeChild(e.firstChild);var g=(b.text+k)[m]("\n");for(var i=0,j=g[q];i<j;i++)if(g[i]){var l=bk("tspan");i&&bk(l,{dy:f*bp,x:d.x}),l[h](c.createTextNode(g[i])),e[h](l)}}else{var g=e.getElementsByTagName("tspan");for(var i=0,j=g[q];i<j;i++)i&&bk(g[i],{dy:f*bp,x:d.x})}bk(e,{y:d.y});var n=a.getBBox(),p=d.y-(n.y+n.height/2);p&&isFinite(p)&&bk(e,{y:d.y+p})},br=function(a,b){var c=0,d=0;this[0]=a
 ,this.id=f._oid++,this.node=a,a.raphael=this,this.paper=b,this.attrs=this.attrs||{},this.transformations=[],this._={tx:0,ty:0,rt:{deg:0,cx:0,cy:0},sx:1,sy:1},!b.bottom&&(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null};br[r].rotate=function(b,c,d){if(this.removed)return this;if(b==null)return this._.rt.cx?[this._.rt.deg,this._.rt.cx,this._.rt.cy][p](l):this._.rt.deg;var e=this.getBBox();return b=(b+k)[m](a),b[q]-1&&(c=H(b[1]),d=H(b[2])),b=H(b[0]),c!=null?this._.rt.deg=b:this._.rt.deg+=b,d==null&&(c=null),this._.rt.cx=c,this._.rt.cy=d,c=c==null?e.x+e.width/2:c,d=d==null?e.y+e.height/2:d,this._.rt.deg?(this.transformations[0]=f.format("rotate({0} {1} {2})",this._.rt.deg,c,d),this.clip&&bk(this.clip,{transform:f.format("rotate({0} {1} {2})",-this._.rt.deg,c,d)})):(this.transformations[0]=k,this.clip&&bk(this.clip,{transform:k})),bk(this.node,{transform:this.transformations[p](l)}),this},br[r].hide=function(){return!this.removed&&(this.node.style.displa
 y="none"),this},br[r].show=function(){return!this.removed&&(this.node.style.display=""),this},br[r].remove=function(){if(this.removed)return;bc(this,this.paper),this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=!0},br[r].getBBox=function(){if(this.removed)return this;if(this.type=="path")return R(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=!0}var b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var d=0,e=this.node.getNumberOfChars();d<e;d++){var f=this.node.getExtentOfChar(d);f.y<b.y&&(b.y=f.y),f.y+f.height-b.y>b.height&&(b.height=f.y+f.height-b.y),f.x+f.width-b.x>b.width&&(b.width=f.x+f.width-b.x)}}return a&&this.hide(),b},br[r].attr=function(){if(this.removed)return this;if(arguments[q]==0){var a={};for(var b in this.attrs)this.attrs[o](b)&&(a[b]=this.attrs[b]);return this._.rt.deg&&(a.rotation=this.rotate()),(this._.sx!=1||this._.sy!=1)&&(a.sc
 ale=this.scale()),a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient,a}if(arguments[q]==1&&f.is(arguments[0],"string"))return arguments[0]=="translation"?bN.call(this):arguments[0]=="rotation"?this.rotate():arguments[0]=="scale"?this.scale():arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient?this.attrs.gradient:this.attrs[arguments[0]];if(arguments[q]==1&&f.is(arguments[0],"array")){var c={};for(var d in arguments[0])arguments[0][o](d)&&(c[arguments[0][d]]=this.attrs[arguments[0][d]]);return c}if(arguments[q]==2){var e={};e[arguments[0]]=arguments[1],bo(this,e)}else arguments[q]==1&&f.is(arguments[0],"object")&&bo(this,arguments[0]);return this},br[r].toFront=function(){if(this.removed)return this;this.node.parentNode[h](this.node);var a=this.paper;return a.top!=this&&bd(this,a),this},br[r].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.first
 Child),be(this,this.paper);var a=this.paper}return this},br[r].insertAfter=function(a){if(this.removed)return this;var b=a.node;return b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode[h](this.node),bf(this,a,this.paper),this},br[r].insertBefore=function(a){if(this.removed)return this;var b=a.node;return b.parentNode.insertBefore(this.node,b),bg(this,a,this.paper),this};var bs=function(a,b,c,d){b=F(b),c=F(c);var e=bk("circle");a.canvas&&a.canvas[h](e);var f=new br(e,a);return f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},f.type="circle",bk(e,f.attrs),f},bt=function(a,b,c,d,e,f){b=F(b),c=F(c);var g=bk("rect");a.canvas&&a.canvas[h](g);var i=new br(g,a);return i.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},i.type="rect",bk(g,i.attrs),i},bu=function(a,b,c,d,e){b=F(b),c=F(c);var f=bk("ellipse");a.canvas&&a.canvas[h](f);var g=new br(f,a);return g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},g.type="ellipse",bk(f
 ,g.attrs),g},bv=function(a,b,c,d,e,f){var g=bk("image");bk(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),g.setAttributeNS(a.xlink,"href",b),a.canvas&&a.canvas[h](g);var i=new br(g,a);return i.attrs={x:c,y:d,width:e,height:f,src:b},i.type="image",i},bw=function(a,b,c,d){var e=bk("text");bk(e,{x:b,y:c,"text-anchor":"middle"}),a.canvas&&a.canvas[h](e);var f=new br(e,a);return f.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:K.font,stroke:"none",fill:"#000"},f.type="text",bo(f,f.attrs),f},bx=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas[G]("width",this.width),this.canvas[G]("height",this.height),this},by=function(){var a=ba[i](null,arguments),b=a&&a.container,d=a.x,e=a.y,j=a.width,k=a.height;if(!b)throw new Error("SVG container not found.");var l=bk("svg");return j=j||512,k=k||342,bk(l,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:j,height:k}),b==1?(l.style.cssText="position:absolute;left:"+d+"px;top:"+e+"px",c.body[h](l)):b.f
 irstChild?b.insertBefore(l,b.firstChild):b[h](l),b=new g,b.width=j,b.height=k,b.canvas=l,bb.call(b,b,f.fn),b.clear(),b};g[r].clear=function(){var a=this.canvas;while(a.firstChild)a.removeChild(a.firstChild);this.bottom=this.top=null,(this.desc=bk("desc"))[h](c.createTextNode("Created with Raphaël")),a[h](this.desc),a[h](this.defs=bk("defs"))},g[r].remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bh(a)}}if(f.vml){var bz=function(a){var b=/[ahqstv]/ig,c=U;(a+k).match(b)&&(c=$),b=/[clmz]/g;if(c==U&&!(a+k).match(b)){var d={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},e=/([clmz]),?([^clmz]*)/gi,f=/-?[^,\s-]+/g,g=(a+k)[M](e,function(a,b,c){var e=[];return c[M](f,function(a){e[B](F(a))}),d[b]+e});return g}var h=c(a),i,g=[],j;for(var m=0,n=h[q];m<n;m++){i=h[m],j=s.call(h[m][0]),j=="z"&&(j="x");for(var o=1,r=i[q];o<r;o++)j+=F(i[o])+(o!=r-1?",":k);g[B](j)}return g[p](l)};f[x]=function(){return"Your browser doesn’t suppo
 rt SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var bl=function(a,b){var c=bA("group");c.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px",c.coordsize=b.coordsize,c.coordorigin=b.coordorigin;var d=bA("shape"),e=d.style;e.width=b.width+"px",e.height=b.height+"px",d.coordsize=this.coordsize,d.coordorigin=this.coordorigin,c[h](d);var f=new br(d,c,b);return f.isAbsolute=!0,f.type="path",f.path=[],f.Path=k,a&&bo(f,{fill:"none",stroke:"#000",path:a}),b.canvas[h](c),f},bo=function(b,d){b.attrs=b.attrs||{};var e=b.node,g=b.attrs,i=e.style,j,l=b;for(var n in d)d[o](n)&&(g[n]=d[n]);d.href&&(e.href=d.href),d.title&&(e.title=d.title),d.target&&(e.target=d.target),d.cursor&&(i.cursor=d.cursor),d.path&&b.type=="path"&&(g.path=d.path,e.path=bz(g.path)),d.rotation!=null&&b.rotate(d.rotation,!0),d.translation&&(j=(d.translation+k)[m](a),bN.call(b,j[0],j[1]),b._.rt.cx!=null&&(b._.rt.cx+=+j[0],b._.rt.cy+=+j[1],b.setBox(b.attrs,j[0],j[1]))),
 d.scale&&(j=(d.scale+k)[m](a),b.scale(+j[0]||1,+j[1]||+j[0]||1,+j[2]||null,+j[3]||null));if("clip-rect"in d){var p=(d["clip-rect"]+k)[m](a);if(p[q]==4){p[2]=+p[2]+ +p[0],p[3]=+p[3]+ +p[1];var r=e.clipRect||c.createElement("div"),s=r.style,t=e.parentNode;s.clip=f.format("rect({1}px {2}px {3}px {0}px)",p),e.clipRect||(s.position="absolute",s.top=0,s.left=0,s.width=b.paper.width+"px",s.height=b.paper.height+"px",t.parentNode.insertBefore(r,t),r[h](t),e.clipRect=r)}d["clip-rect"]||e.clipRect&&(e.clipRect.style.clip=k)}b.type=="image"&&d.src&&(e.src=d.src),b.type=="image"&&d.opacity&&(e.filterOpacity=" progid:DXImageTransform.Microsoft.Alpha(opacity="+d.opacity*100+")",i.filter=(e.filterMatrix||k)+(e.filterOpacity||k)),d.font&&(i.font=d.font),d["font-family"]&&(i.fontFamily='"'+d["font-family"][m](",")[0][M](/^['"]+|['"]+$/g,k)+'"'),d["font-size"]&&(i.fontSize=d["font-size"]),d["font-weight"]&&(i.fontWeight=d["font-weight"]),d["font-style"]&&(i.fontStyle=d["font-style"]);if(d.opacity!=nu
 ll||d["stroke-width"]!=null||d.fill!=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){e=b.shape||e;var u=e.getElementsByTagName("fill")&&e.getElementsByTagName("fill")[0],v=!1;!u&&(v=u=bA("fill"));if("fill-opacity"in d||"opacity"in d){var w=((+g["fill-opacity"]+1||2)-1)*((+g.opacity+1||2)-1);w<0&&(w=0),w>1&&(w=1),u.opacity=w}d.fill&&(u.on=!0);if(u.on==null||d.fill=="none")u.on=!1;if(u.on&&d.fill){var x=d.fill.match(D);x?(u.src=x[1],u.type="tile"):(u.color=f.getRGB(d.fill).hex,u.src=k,u.type="solid",f.getRGB(d.fill).error&&(l.type in{circle:1,ellipse:1}||(d.fill+k).charAt()!="r")&&bm(l,d.fill)&&(g.fill="none",g.gradient=d.fill))}v&&e[h](u);var y=e.getElementsByTagName("stroke")&&e.getElementsByTagName("stroke")[0],z=!1;!y&&(z=y=bA("stroke"));if(d.stroke&&d.stroke!="none"||d["stroke-width"]||d["stroke-opacity"]!=null||d["st
 roke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])y.on=!0;(d.stroke=="none"||y.on==null||d.stroke==0||d["stroke-width"]==0)&&(y.on=!1),y.on&&d.stroke&&(y.color=f.getRGB(d.stroke).hex);var w=((+g["stroke-opacity"]+1||2)-1)*((+g.opacity+1||2)-1),A=(H(d["stroke-width"])||1)*.75;w<0&&(w=0),w>1&&(w=1),d["stroke-width"]==null&&(A=g["stroke-width"]),d["stroke-width"]&&(y.weight=A),A&&A<1&&(w*=A)&&(y.weight=1),y.opacity=w,d["stroke-linejoin"]&&(y.joinstyle=d["stroke-linejoin"]||"miter"),y.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(y.endcap=d["stroke-linecap"]=="butt"?"flat":d["stroke-linecap"]=="square"?"square":"round");if(d["stroke-dasharray"]){var B={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};y.dashstyle=B[o](d["stroke-dasharray"])?B[d["stroke-dasharray"]]:k}z&&e[h](y)}if(l.type=="text"){var i=l.paper.span.st
 yle;g.font&&(i.font=g.font),g["font-family"]&&(i.fontFamily=g["font-family"]),g["font-size"]&&(i.fontSize=g["font-size"]),g["font-weight"]&&(i.fontWeight=g["font-weight"]),g["font-style"]&&(i.fontStyle=g["font-style"]),l.node.string&&(l.paper.span.innerHTML=(l.node.string+k)[M](/</g,"&#60;")[M](/&/g,"&#38;")[M](/\n/g,"<br>")),l.W=g.w=l.paper.span.offsetWidth,l.H=g.h=l.paper.span.offsetHeight,l.X=g.x,l.Y=g.y+F(l.H/2);switch(g["text-anchor"]){case"start":l.node.style["v-text-align"]="left",l.bbx=F(l.W/2);break;case"end":l.node.style["v-text-align"]="right",l.bbx=-F(l.W/2);break;default:l.node.style["v-text-align"]="center"}}},bm=function(a,b){a.attrs=a.attrs||{};var c=a.attrs,d=a.node.getElementsByTagName("fill"),e="linear",f=".5 .5";a.attrs.gradient=b,b=(b+k)[M](bi,function(a,b,c){return e="radial",b&&c&&(b=H(b),c=H(c),A(b-.5,2)+A(c-.5,2)>.25&&(c=t.sqrt(.25-A(b-.5,2))*((c>.5)*2-1)+.5),f=b+l+c),k}),b=b[m](/\s*\-\s*/);if(e=="linear"){var g=b.shift();g=-H(g);if(isNaN(g))return null}var 
 h=_(b);if(!h)return null;a=a.shape||a.node,d=d[0]||bA("fill");if(h[q]){d.on=!0,d.method="none",d.type=e=="radial"?"gradientradial":"gradient",d.color=h[0].color,d.color2=h[h[q]-1].color;var i=[];for(var j=0,n=h[q];j<n;j++)h[j].offset&&i[B](h[j].offset+l+h[j].color);d.colors&&(d.colors.value=i[q]?i[p](","):"0% "+d.color),e=="radial"?(d.focus="100%",d.focussize=f,d.focusposition=f):d.angle=(270-g)%360}return 1},br=function(a,b,c){var d=0,e=0,g=0,h=1;this[0]=a,this.id=f._oid++,this.node=a,a.raphael=this,this.X=0,this.Y=0,this.attrs={},this.Group=b,this.paper=c,this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1},!c.bottom&&(c.bottom=this),this.prev=c.top,c.top&&(c.top.next=this),c.top=this,this.next=null};br[r].rotate=function(b,c,d){return this.removed?this:b==null?this._.rt.cx?[this._.rt.deg,this._.rt.cx,this._.rt.cy][p](l):this._.rt.deg:(b=(b+k)[m](a),b[q]-1&&(c=H(b[1]),d=H(b[2])),b=H(b[0]),c!=null?this._.rt.deg=b:this._.rt.deg+=b,d==null&&(c=null),this._.rt.cx=c,this._.rt.cy=d,this.setBox(this.
 attrs,c,d),this.Group.style.rotation=this._.rt.deg,this)},br[r].setBox=function(a,b,c){if(this.removed)return this;var d=this.Group.style,e=this.shape&&this.shape.style||this.node.style;a=a||{};for(var f in a)a[o](f)&&(this.attrs[f]=a[f]);b=b||this._.rt.cx,c=c||this._.rt.cy;var g=this.attrs,i,j,l,m;switch(this.type){case"circle":i=g.cx-g.r,j=g.cy-g.r,l=m=g.r*2;break;case"ellipse":i=g.cx-g.rx,j=g.cy-g.ry,l=g.rx*2,m=g.ry*2;break;case"rect":case"image":i=+g.x,j=+g.y,l=g.width||0,m=g.height||0;break;case"text":this.textpath.v=["m",F(g.x),", ",F(g.y-2),"l",F(g.x)+1,", ",F(g.y-2)][p](k),i=g.x-F(this.W/2),j=g.y-this.H/2,l=this.W,m=this.H;break;case"path":if(!this.attrs
+.path)i=0,j=0,l=this.paper.width,m=this.paper.height;else{var n=R(this.attrs.path);i=n.x,j=n.y,l=n.width,m=n.height}break;default:i=0,j=0,l=this.paper.width,m=this.paper.height}b=b==null?i+l/2:b,c=c==null?j+m/2:c;var r=b-this.paper.width/2,s=c-this.paper.height/2;if(this.type=="path"||this.type=="text")d.left!=r+"px"&&(d.left=r+"px"),d.top!=s+"px"&&(d.top=s+"px"),this.X=this.type=="text"?i:-r,this.Y=this.type=="text"?j:-s,this.W=l,this.H=m,e.left!=-r+"px"&&(e.left=-r+"px"),e.top!=-s+"px"&&(e.top=-s+"px");else{d.left!=r+"px"&&(d.left=r+"px"),d.top!=s+"px"&&(d.top=s+"px"),this.X=i,this.Y=j,this.W=l,this.H=m,d.width!=this.paper.width+"px"&&(d.width=this.paper.width+"px"),d.height!=this.paper.height+"px"&&(d.height=this.paper.height+"px"),e.left!=i-r+"px"&&(e.left=i-r+"px"),e.top!=j-s+"px"&&(e.top=j-s+"px"),e.width!=l+"px"&&(e.width=l+"px"),e.height!=m+"px"&&(e.height=m+"px");var t=(+a.r||0)/v(l,m);if(this.type=="rect"&&this.arcsize.toFixed(4)!=t.toFixed(4)&&(t||this.arcsize)){var u=bA(
 "roundrect"),w={},f=0,x=this.events&&this.events[q];u.arcsize=t,u.raphael=this,this.Group[h](u),this.Group.removeChild(this.node),this[0]=this.node=u,this.arcsize=t;for(var f in g)w[f]=g[f];delete w.scale,this.attr(w);if(this.events)for(;f<x;f++)this.events[f].unbind=bC(this.node,this.events[f].name,this.events[f].f,this)}}},br[r].hide=function(){return!this.removed&&(this.Group.style.display="none"),this},br[r].show=function(){return!this.removed&&(this.Group.style.display="block"),this},br[r].getBBox=function(){return this.removed?this:this.type=="path"?R(this.attrs.path):{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}},br[r].remove=function(){if(this.removed)return;bc(this,this.paper),this.node.parentNode.removeChild(this.node),this.Group.parentNode.removeChild(this.Group),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)delete this[a];this.removed=!0},br[r].attr=function(){if(this.removed)return this;if(arguments[q]==0){var a={};for(var b 
 in this.attrs)this.attrs[o](b)&&(a[b]=this.attrs[b]);return this._.rt.deg&&(a.rotation=this.rotate()),(this._.sx!=1||this._.sy!=1)&&(a.scale=this.scale()),a.gradient&&a.fill=="none"&&(a.fill=a.gradient)&&delete a.gradient,a}if(arguments[q]==1&&f.is(arguments[0],"string"))return arguments[0]=="translation"?bN.call(this):arguments[0]=="rotation"?this.rotate():arguments[0]=="scale"?this.scale():arguments[0]=="fill"&&this.attrs.fill=="none"&&this.attrs.gradient?this.attrs.gradient:this.attrs[arguments[0]];if(this.attrs&&arguments[q]==1&&f.is(arguments[0],"array")){var c={};for(var b=0,d=arguments[0][q];b<d;b++)c[arguments[0][b]]=this.attrs[arguments[0][b]];return c}var e;return arguments[q]==2&&(e={},e[arguments[0]]=arguments[1]),arguments[q]==1&&f.is(arguments[0],"object")&&(e=arguments[0]),e&&(e.text&&this.type=="text"&&(this.node.string=e.text),bo(this,e),e.gradient&&({circle:1,ellipse:1}[o](this.type)||(e.gradient+k).charAt()!="r")&&bm(this,e.gradient),(this.type!="path"||this._.rt.
 deg)&&this.setBox(this.attrs)),this},br[r].toFront=function(){return!this.removed&&this.Group.parentNode[h](this.Group),this.paper.top!=this&&bd(this,this.paper),this},br[r].toBack=function(){return this.removed?this:(this.Group.parentNode.firstChild!=this.Group&&(this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild),be(this,this.paper)),this)},br[r].insertAfter=function(a){return this.removed?this:(a.Group.nextSibling?a.Group.parentNode.insertBefore(this.Group,a.Group.nextSibling):a.Group.parentNode[h](this.Group),bf(this,a,this.paper),this)},br[r].insertBefore=function(a){return this.removed?this:(a.Group.parentNode.insertBefore(this.Group,a.Group),bg(this,a,this.paper),this)};var bs=function(a,b,c,d){var e=bA("group"),f=bA("oval"),g=f.style;e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",e.coordsize=a.coordsize,e.coordorigin=a.coordorigin,e[h](f);var i=new br(f,e,a);return i.type="circle",bo(i,{stroke:"#000",fil
 l:"none"}),i.attrs.cx=b,i.attrs.cy=c,i.attrs.r=d,i.setBox({x:b-d,y:c-d,width:d*2,height:d*2}),a.canvas[h](e),i},bt=function(a,b,c,d,e,f){var g=bA("group"),i=bA("roundrect"),j=(+f||0)/v(d,e);g.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",g.coordsize=a.coordsize,g.coordorigin=a.coordorigin,g[h](i),i.arcsize=j;var k=new br(i,g,a);return k.type="rect",bo(k,{stroke:"#000"}),k.arcsize=j,k.setBox({x:b,y:c,width:d,height:e,r:f}),a.canvas[h](g),k},bu=function(a,b,c,d,e){var f=bA("group"),g=bA("oval"),i=g.style;f.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",f.coordsize=a.coordsize,f.coordorigin=a.coordorigin,f[h](g);var j=new br(g,f,a);return j.type="ellipse",bo(j,{stroke:"#000"}),j.attrs.cx=b,j.attrs.cy=c,j.attrs.rx=d,j.attrs.ry=e,j.setBox({x:b-d,y:c-e,width:d*2,height:e*2}),a.canvas[h](f),j},bv=function(a,b,c,d,e,f){var g=bA("group"),i=bA("image"),j=i.style;g.style.cssText="position:absolute;left:0;top:0
 ;width:"+a.width+"px;height:"+a.height+"px",g.coordsize=a.coordsize,g.coordorigin=a.coordorigin,i.src=b,g[h](i);var k=new br(i,g,a);return k.type="image",k.attrs.src=b,k.attrs.x=c,k.attrs.y=d,k.attrs.w=e,k.attrs.h=f,k.setBox({x:c,y:d,width:e,height:f}),a.canvas[h](g),k},bw=function(a,b,c,d){var e=bA("group"),g=bA("shape"),i=g.style,j=bA("path"),l=j.style,m=bA("textpath");e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px",e.coordsize=a.coordsize,e.coordorigin=a.coordorigin,j.v=f.format("m{0},{1}l{2},{1}",F(b),F(c),F(b)+1),j.textpathok=!0,i.width=a.width,i.height=a.height,m.string=d+k,m.on=!0,g[h](m),g[h](j),e[h](g);var n=new br(m,e,a);return n.shape=g,n.textpath=j,n.type="text",n.attrs.text=d,n.attrs.x=b,n.attrs.y=c,n.attrs.w=1,n.attrs.h=1,bo(n,{font:K.font,stroke:"none",fill:"#000"}),n.setBox(),a.canvas[h](e),n},bx=function(a,b){var c=this.canvas.style;return a==+a&&(a+="px"),b==+b&&(b+="px"),c.width=a,c.height=b,c.clip="rect(0 "+a+" "+b+" 0)"
 ,this},bA;c.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!c.namespaces.rvml&&c.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),bA=function(a){return c.createElement("<rvml:"+a+' class="rvml">')}}catch(bB){bA=function(a){return c.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}var by=function(){var a=ba[i](null,arguments),b=a.container,d=a.height,e,j=a.width,k=a.x,l=a.y;if(!b)throw new Error("VML container not found.");var m=new g,n=m.canvas=c.createElement("div"),o=n.style;return j=j||512,d=d||342,j==+j&&(j+="px"),d==+d&&(d+="px"),m.width=1e3,m.height=1e3,m.coordsize="1000 1000",m.coordorigin="0 0",m.span=c.createElement("span"),m.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",n[h](m.span),o.cssText=f.format("width:{0};height:{1};position:absolute;clip:rect(0 {0} {1} 0);overflow:hidden",j,d),b==1?(c.body[h](n),o.left=k+"px",o.top=l+"px"):(b.style.width=j,b.st
 yle.height=d,b.firstChild?b.insertBefore(n,b.firstChild):b[h](n)),bb.call(m,m,f.fn),m};g[r].clear=function(){this.canvas.innerHTML=k,this.span=c.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas[h](this.span),this.bottom=this.top=null},g[r].remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bh(a)}}/^Apple|^Google/.test(navigator.vendor)&&!(navigator.userAgent.indexOf("Version/4.0")+1)?g[r].safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99);setTimeout(function(){a.remove()})}:g[r].safari=function(){};var bC=function(){if(c.addEventListener)return function(a,b,c,d){var e=function(a){return c.call(d,a)};return a.addEventListener(b,e,!1),function(){return a.removeEventListener(b,e,!1),!0}};if(c.attachEvent)return function(a,b,c,e){var f=function(a){return c.call(e,a||d.event)};a.attachEvent("on"+b,f);var g=function(){return a
 .detachEvent("on"+b,f),!0};return g}}();for(var bD=n[q];bD--;)(function(a){br[r][a]=function(b){return f.is(b,"function")&&(this.events=this.events||[],this.events.push({name:a,f:b,unbind:bC(this.shape||this.node,a,b,this)})),this},br[r]["un"+a]=function(b){var c=this.events,d=c[q];while(d--)if(c[d].name==a&&c[d].f==b)return c[d].unbind(),c.splice(d,1),!c.length&&delete this.events,this;return this}})(n[bD]);br[r].hover=function(a,b){return this.mouseover(a).mouseout(b)},br[r].unhover=function(a,b){return this.unmouseover(a).unmouseout(b)},g[r].circle=function(a,b,c){return bs(this,a||0,b||0,c||0)},g[r].rect=function(a,b,c,d,e){return bt(this,a||0,b||0,c||0,d||0,e||0)},g[r].ellipse=function(a,b,c,d){return bu(this,a||0,b||0,c||0,d||0)},g[r].path=function(a){return a&&!f.is(a,"string")&&!f.is(a[0],"array")&&(a+=k),bl(f.format[i](f,arguments),this)},g[r].image=function(a,b,c,d,e){return bv(this,a||"about:blank",b||0,c||0,d||0,e||0)},g[r].text=function(a,b,c){return bw(this,a||0,b||0,c
 ||k)},g[r].set=function(a){return arguments[q]>1&&(a=Array[r].splice.call(arguments,0,arguments[q])),new bP(a)},g[r].setSize=bx,g[r].top=g[r].bottom=null,g[r].raphael=f,br[r].scale=function(a,b,c,d){if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:bE};b=b||a,!+b&&(b=a);var e,f,g,h,i=this.attrs;if(a!=0){var m=this.getBBox(),n=m.x+m.width/2,o=m.y+m.height/2,r=a/this._.sx,s=b/this._.sy;c=+c||c==0?c:n,d=+d||d==0?d:o;var u=~~(a/t.abs(a)),w=~~(b/t.abs(b)),x=this.node.style,y=c+(n-c)*r,z=d+(o-d)*s;switch(this.type){case"rect":case"image":var A=i.width*u*r,B=i.height*w*s;this.attr({height:B,r:i.r*v(u*r,w*s),width:A,x:y-A/2,y:z-B/2});break;case"circle":case"ellipse":this.attr({rx:i.rx*u*r,ry:i.ry*w*s,r:i.r*v(u*r,w*s),cx:y,cy:z});break;case"path":var C=T(i.path),D=!0;for(var E=0,F=C[q];E<F;E++){var H=C[E],I,K=J.call(H[0]);if(K=="M"&&D)continue;D=!1;if(K=="A")H[C[E][q]-2]*=r,H[C[E][q]-1]*=s,H[1]*=u*r,H[2]*=w*s,H[5]=+(u+w?!!+H[5]:!+H[5]);else if(K=="H")for(I=1,jj=H[q];I<jj;I++)H[I]*=
 r;else if(K=="V")for(I=1,jj=H[q];I<jj;I++)H[I]*=s;else for(I=1,jj=H[q];I<jj;I++)H[I]*=I%2?r:s}var L=R(C),e=y-L.x-L.width/2,f=z-L.y-L.height/2;C[0][1]+=e,C[0][2]+=f,this.attr({path:C})}this.type in{text:1,image:1}&&(u!=1||w!=1)?this.transformations?(this.transformations[2]="scale("[j](u,",",w,")"),this.node[G]("transform",this.transformations[p](l)),e=u==-1?-i.x-(A||0):i.x,f=w==-1?-i.y-(B||0):i.y,this.attr({x:e,y:f}),i.fx=u-1,i.fy=w-1):(this.node.filterMatrix=" progid:DXImageTransform.Microsoft.Matrix(M11="[j](u,", M12=0, M21=0, M22=",w,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')"),x.filter=(this.node.filterMatrix||k)+(this.node.filterOpacity||k)):this.transformations?(this.transformations[2]=k,this.node[G]("transform",this.transformations[p](l)),i.fx=0,i.fy=0):(this.node.filterMatrix=k,x.filter=(this.node.filterMatrix||k)+(this.node.filterOpacity||k)),i.scale=[a,b,c,d][p](l),this._.sx=a,this._.sy=b}return this},br[r].clone=function(){var a=this.attr();return de
 lete a.scale,delete a.translation,this.paper[this.type]().attr(a)};var bF=function(a,b){return function(c,d,e){c=$(c);var g,h,i,j,k="",l={},m,n=0;for(var o=0,q=c.length;o<q;o++){i=c[o];if(i[0]=="M")g=+i[1],h=+i[2];else{j=bG(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>d){if(b&&!l.start){m=f.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],(d-n)/j),k+=["C",m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y];if(e)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]][p](),n+=j,g=+i[5],h=+i[6];continue}if(!a&&!b)return m=f.findDotsAtSegment(g,h,i[1],i[2],i[3],i[4],i[5],i[6],(d-n)/j),{x:m.x,y:m.y,alpha:m.alpha}}n+=j,g=+i[5],h=+i[6]}k+=i}return l.end=k,m=a?n:b?l:f.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}),m}},bG=Q(function(a,b,c,d,e,f,g,h){var i={x:0,y:0},j=0;for(var k=0;k<1.01;k+=.01){var l=Y(a,b,c,d,e,f,g,h,k);k&&(j+=t.sqrt(A(i.x-l.x,2)+A(i.y-l.y,2))),i=l}return j}),bH=bF(1),bI=bF(),bJ=bF(0,1);br[r].getTotalLength=functio
 n(){if(this.type!="path")return;return bH(this.attrs.path)},br[r].getPointAtLength=function(a){if(this.type!="path")return;return bI(this.attrs.path,a)},br[r].getSubpath=function(a,b){if(this.type!="path")return;if(t.abs(this.getTotalLength()-b)<1e-6)return bJ(this.attrs.path,a).end;var c=bJ(this.attrs.path,b,1);return a?bJ(c,a).end:c},f.easing_formulas={linear:function(a){return a},"<":function(a){return A(a,3)},">":function(a){return A(a-1,3)+1},"<>":function(a){return a*=2,a<1?A(a,3)/2:(a-=2,(A(a,3)+2)/2)},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){if(a==0||a==1)return a;var b=.3,c=b/4;return A(2,-10*a)*t.sin((a-c)*2*t.PI/b)+1},bounce:function(a){var b=7.5625,c=2.75,d;return 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),d}};var bK={length:0},bL=function(){var a=+(new Date);for(var b in bK)if(b!="length"&&bK[o](b)){var c=bK[
 b];if(c.stop){delete bK[b],bK[q]--;continue}var d=a-c.start,e=c.ms,g=c.easing,h=c.from,i=c.diff,j=c.to,m=c.t,n=c.prev||0,r=c.el,s=c.callback,t={},u;if(d<e){var v=f.easing_formulas[g]?f.easing_formulas[g](d/e):d/e;for(var w in h)if(h[o](w)){switch(L[w]){case"along":u=v*e*i[w],j.back&&(u=j.len-u);var x=bI(j[w],u);r.translate(i.sx-i.x||0,i.sy-i.y||0),i.x=x.x,i.y=x.y,r.translate(x.x-i.sx,x.y-i.sy),j.rot&&r.rotate(i.r+x.alpha,x.x,x.y);break;case"number":u=+h[w]+v*e*i[w];break;case"colour":u="rgb("+[bM(F(h[w].r+v*e*i[w].r)),bM(F(h[w].g+v*e*i[w].g)),bM(F(h[w].b+v*e*i[w].b))][p](",")+")";break;case"path":u=[];for(var y=0,z=h[w][q];y<z;y++){u[y]=[h[w][y][0]];for(var A=1,B=h[w][y][q];A<B;A++)u[y][A]=+h[w][y][A]+v*e*i[w][y][A];u[y]=u[y][p](l)}u=u[p](l);break;case"csv":switch(w){case"translation":var C=i[w][0]*(d-n),D=i[w][1]*(d-n);m.x+=C,m.y+=D,u=C+l+D;break;case"rotation":u=+h[w][0]+v*e*i[w][0],h[w][1]&&(u+=","+h[w][1]+","+h[w][2]);break;case"scale":u=[+h[w][0]+v*e*i[w][0],+h[w][1]+v*e*i[w][1
 ],2 in j[w]?j[w][2]:k,3 in j[w]?j[w][3]:k][p](l);break;case"clip-rect":u=[];var y=4;while(y--)u[y]=+h[w][y]+v*e*i[w][y]}}t[w]=u}r.attr(t),r._run&&r._run.call(r)}else{if(j.along){var x=bI(j.along,j.len*!j.back);r.translate(i.sx-(i.x||0)+x.x-i.sx,i.sy-(i.y||0)+x.y-i.sy),j.rot&&r.rotate(i.r+x.alpha,x.x,x.y)}(m.x||m.y)&&r.translate(-m.x,-m.y),j.scale&&(j.scale=j.scale+k),r.attr(j),delete bK[b],bK[q]--,r.in_animation=null,f.is(s,"function")&&s.call(r)}c.prev=d}f.svg&&r&&r.paper.safari(),bK[q]&&setTimeout(bL)},bM=function(a){return a>255?255:a<0?0:a},bN=function(a,b){if(a==null)return{x:this._.tx,y:this._.ty,toString:bE};this._.tx+=+a,this._.ty+=+b;switch(this.type){case"circle":case"ellipse":this.attr({cx:+a+this.attrs.cx,cy:+b+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+a+this.attrs.x,y:+b+this.attrs.y});break;case"path":var c=T(this.attrs.path);c[0][1]+=+a,c[0][2]+=+b,this.attr({path:c})}return this};br[r].animateWith=function(a,b,c,d,e){return bK[a.id]&&(b.st
 art=bK[a.id].start),this.animate(b,c,d,e)},br[r].animateAlong=bO(),br[r].animateAlongBack=bO(1),br[r].onAnimation=function(a){return this._run=a||0,this},br[r].animate=function(b,c,d,e){if(f.is(d,"function")||!d)e=d||null;var g={},h={},i={};for(var j in b)if(b[o](j)&&L[o](j)){g[j]=this.attr(j),g[j]==null&&(g[j]=K[j]),h[j]=b[j];switch(L[j]){case"along":var l=bH(b[j]),n=bI(b[j],l*!!b.back),p=this.getBBox();i[j]=l/c,i.tx=p.x,i.ty=p.y,i.sx=n.x,i.sy=n.y,h.rot=b.rot,h.back=b.back,h.len=l,b.rot&&(i.r=H(this.rotate())||0);break;case"number":i[j]=(h[j]-g[j])/c;break;case"colour":g[j]=f.getRGB(g[j]);var r=f.getRGB(h[j]);i[j]={r:(r.r-g[j].r)/c,g:(r.g-g[j].g)/c,b:(r.b-g[j].b)/c};break;case"path":var s=$(g[j],h[j]);g[j]=s[0];var t=s[1];i[j]=[];for(var u=0,v=g[j][q];u<v;u++){i[j][u]=[0];for(var w=1,x=g[j][u][q];w<x;w++)i[j][u][w]=(t[u][w]-g[j][u][w])/c}break;case"csv":var y=(b[j]+k)[m](a),z=(g[j]+k)[m](a);switch(j){case"translation":g[j]=[0,0],i[j]=[y[0]/c,y[1]/c];break;case"rotation":g[j]=z[1]==
 y[1]&&z[2]==y[2]?z:[0,y[1],y[2]],i[j]=[(y[0]-g[j][0])/c,0,0];break;case"scale":b[j]=y,g[j]=(g[j]+k)[m](a),i[j]=[(y[0]-g[j][0])/c,(y[1]-g[j][1])/c,0,0];break;case"clip-rect":g[j]=(g[j]+k)[m](a),i[j]=[];var u=4;while(u--)i[j][u]=(y[u]-g[j][u])/c}h[j]=y}}return this.stop(),this.in_animation=1,bK[this.id]={start:b.start||+(new Date),ms:c,easing:d,from:g,diff:i,to:h,el:this,callback:e,t:{x:0,y:0}},++bK[q]==1&&bL(),this},br[r].stop=function(){return bK[this.id]&&bK[q]--,delete bK[this.id],this},br[r].translate=function(a,b){return this.attr({translation:a+" "+b})},br[r][x]=function(){return"Raphaël’s object"},f.ae=bK;var bP=function(a){this.items=[],this[q]=0;if(a)for(var b=0,c=a[q];b<c;b++)a[b]&&(a[b].constructor==br||a[b].constructor==bP)&&(this[this.items[q]]=this.items[this.items[q]]=a[b],this[q]++)};bP[r][B]=function(){var a,b;for(var c=0,d=arguments[q];c<d;c++)a=arguments[c],a&&(a.constructor==br||a.constructor==bP)&&(b=this.items[q],this[b]=this.items[b]=a,this[q]++);return this
 },bP[r].pop=function(){return delete this[this[q]--],this.items.pop()};for(var bQ in br[r])br[r][o](bQ)&&(bP[r][bQ]=function(a){return function(){for(var b=0,c=this.items[q];b<c;b++)this.items[b][a][i](this.items[b],arguments);return this}}(bQ));return bP[r].attr=function(a,b){if(a&&f.is(a,"array")&&f.is(a[0],"object"))for(var c=0,d=a[q];c<d;c++)this.items[c].attr(a[c]);else for(var e=0,g=this.items[q];e<g;e++)this.items[e].attr[i](this.items[e],arguments);return this},bP[r].animate=function(a,b,c,d){(f.is(c,"function")||!c)&&(d=c||null);var e=this.items[q],g=e,h=this,i;d&&(i=function(){!--e&&d.call(h)}),this.items[--g].animate(a,b,c||i,i);while(g--)this.items[g].animateWith(this.items[e-1],a,b,c||i,i);return this},bP[r].insertAfter=function(a){var b=this.items[q];while(b--)this.items[b].insertAfter(a);return this},bP[r].getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items[q];e--;){var f=this.items[e].getBBox();a[B](f.x),b[B](f.y),c[B](f.x+f.width),d[B](f.y+f.height)}retu
 rn a=v[i](0,a),b=v[i](0,b),{x:a,y:b,width:u[i](0,c)-a,height:u[i](0,d)-b}},f.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[o](d)&&(b.face[d]=a.face[d]);this.fonts[c]?this.fonts[c][B](b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=I(a.face["units-per-em"],10);for(var e in a.glyphs)if(a.glyphs[o](e)){var f=a.glyphs[e];b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d[M](/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"};if(f.k)for(var g in f.k)f[o](g)&&(b.glyphs[e].k[g]=f.k[g])}}return a},g[r].getFont=function(a,b,c,d){d=d||"normal",c=c||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400;var e=f.fonts[a];if(!e){var g=new RegExp("(^|\\s)"+a[M](/[^\w\d\s+!~.:_-]/g,k)+"(\\s|$)","i");for(var h in f.fonts)if(f.fonts[o](h)&&g.test(h)){e=f.fonts[h];break}}var i;if(e)for(var j=0,l=e[q];j<l;j++){i=e[j];if(i.face["font-weight"]==b&&(i.face["f
 ont-style"]==c||!i.face["font-style"])&&i.face["font-stretch"]==d)break}return i},g[r].print=function(b,c,d,e,g,h){h=h||"middle";var i=this.set(),j=(d+k)[m](k),l=0,n=k,o;f.is(e,"string")&&(e=this.getFont(e));if(e){o=(g||16)/e.face["units-per-em"];var p=e.face.bbox.split(a),r=+p[0],s=+p[1]+(h=="baseline"?p[3]-p[1]+ +e.face.descent:(p[3]-p[1])/2);for(var t=0,u=j[q];t<u;t++){var v=t&&e.glyphs[j[t-1]]||{},w=e.glyphs[j[t]];l+=t?(v.w||e.w)+(v.k&&v.k[j[t]]||0):0,w&&w.d&&i[B](this.path(w.d).attr({fill:"#000",stroke:"none",translation:[l,0]}))}i.scale(o,o,r,s).translate(b-r,c-s)}return i},f.format=function(a){var b=f.is(arguments[1],"array")?[0][j](arguments[1]):arguments,c=/\{(\d+)\}/g;return a&&f.is(a,"string")&&b[q]-1&&(a=a[M](c,function(a,c){return b[++c]==null?k:b[c]})),a||k},f.ninja=function(){var a=Raphael;return e.was?Raphael=e.is:delete Raphael,a},f.el=br[r],f}();var Graph=function(){this.nodes=[],this.nodelist=[],this.edges=[],this.snapshots=[]};Graph.prototype={addNode:function(a,
 b){return this.nodes[a]==undefined&&(this.nodes[a]=new Graph.Node(a,b||{id:a}),this.nodelist.push(this.nodes[a])),this.nodes[a]},addEdge:function(a,b,c){var d=this.addNode(a),e=this.addNode(b),f={source:d,target:e,style:c,weight:c&&c.weight||1};d.edges.push(f),this.edges.push(f);if(!c||!c.directed){var g={source:e,target:d,style:c,weight:c&&c.weight||1,backedge:f};this.edges.push(g),e.edges.push(g)}},snapShot:function(a,b){var c=new Graph;jQuery.extend(!0,c.nodes,this.nodes),jQuery.extend(!0,c.nodelist,this.nodelist),jQuery.extend(!0,c.edges,this.edges),c.snapShot=null,this.snapshots.push({comment:a,graph:c})}},Graph.Node=function(a,b){return b.id=a,b.edges=[],b},Graph.Node.prototype={},Graph.Renderer={},Graph.Renderer.Raphael=function(a,b,c,d,e){this.width=c||400,this.height=d||400;var f=this;this.r=Raphael(a,this.width,this.height),this.radius=e&&e.noderadius?e.noderadius:40,this.graph=b,this.mouse_in=!1,this.graph.render||(this.graph.render=function(){return}),this.isDrag=!1,this
 .dragger=function(a){this.dx=a.clientX,this.dy=a.clientY,f.isDrag=this,this.set&&this.set.animate({"fill-opacity":.1},200)&&this.set.toFront(),a.preventDefault&&a.preventDefault()},document.onmousemove=function(a){a=a||window.event;if(f.isDrag){var b=f.isDrag.set.getBBox(),c=a.clientX-f.isDrag.dx+(b.x+b.width/2),d=a.clientY-f.isDrag.dy+(b.y+b.height/2),e=a.clientX-(c<20?c-20:c>f.width-20?c-f.width+20:0),g=a.clientY-(d<20?d-20:d>f.height-20?d-f.height+20:0);f.isDrag.set.translate(e-f.isDrag.dx,g-f.isDrag.dy);for(var h in f.graph.edges)f.graph.edges[h].connection&&f.graph.edges[h].connection.draw();f.isDrag.dx=e,f.isDrag.dy=g}},document.onmouseup=function(){f.isDrag&&f.isDrag.set.animate({"fill-opacity":.6},500),f.isDrag=!1}},Graph.Renderer.Raphael.prototype={translate:function(a){return[Math.round((a[0]-this.graph.layoutMinX)*this.factorX+this.radius),Math.round((a[1]-this.graph.layoutMinY)*this.factorY+this.radius)]},rotate:function(a,b,c){var d=b*Math.cos(c),e=b*Math.sin(c);return[
 a[0]+d,a[1]+e]},draw:function(){this.factorX=(this.width-10*this.radius)/(this.graph.layoutMaxX-this.graph.layoutMinX),this.factorY=(this.height-15*this.radius)/(this.graph.layoutMaxY-this.graph.layoutMinY);for(a in this.graph.nodes)this.drawNode(this.graph.nodes[a]);for(var a=0;a<this.graph.edges.length;a++)this.drawEdge(this.graph.edges[a])},drawNode:function(a){var b=this.translate([a.layoutPosX,a.layoutPosY]);a.point=b;if(a.shape){var c=a.shape.getBBox(),d=[c.x+Math.round(c.width/2),c.y+Math.round(c.height/2)];a.shape.translate(b[0]-d[0],b[1]-d[1]),this.r.safari();return}var e;if(a.render)e=a.render(this.r,a);else if(!a.shape){var f=Raphael.getColor();e=this.r.set().push(this.r.ellipse(b[0],b[1],30,20).attr({fill:f,stroke:f,"stroke-width":2})).push(this.r.text(b[0],b[1]+30,a.label||a.id))}e.attr({"fill-opacity":.6}),e.items.forEach(function(a){a.set=e,a.node.style.cursor="pointer"}),e.mousedown(this.dragger),a.shape=e},drawEdge:function(a){if(a.backedge)return;a.connection&&a.co
 nnection.draw(),a.connection||(a.style&&a.style.callback&&a.style.callback(a),a.connection=this.r.connection(a.source.shape,a.target.shape,a.style))}},Graph.Layout={},Graph.Layout.Spring=function(a){this.graph=a,this.iterations=500,this.maxRepulsiveForceDistance=6,this.k=2,this.c=.01,this.maxVertexMovement=.5},Graph.Layout.Spring.prototype={layout:function(){this.layoutPrepare();for(var a=0;a<this.iterations;a++)this.layoutIteration();this.layoutCalcBounds()},layoutPrepare:function(){for(i in this.graph.nodes){var a=this.graph.nodes[i];a.layoutPosX=0,a.layoutPosY=0,a.layoutForceX=0,a.layoutForceY=0}},layoutCalcBounds:function(){var a=Infinity,b=-Infinity,c=Infinity,d=-Infinity;for(i in this.graph.nodes){var e=this.graph.nodes[i].layoutPosX,f=this.graph.nodes[i].layoutPosY;e>b&&(b=e),e<a&&(a=e),f>d&&(d=f),f<c&&(c=f)}this.graph.layoutMinX=a,this.graph.layoutMaxX=b,this.graph.layoutMinY=c,this.graph.layoutMaxY=d},layoutIteration:function(){for(var a=0;a<this.graph.nodelist.length;a++){
 var b=this.graph.nodelist[a];for(var c=a+1;c<this.graph.nodelist.length;c++){var d=this.graph.nodelist[c];this.layoutRepulsive(b,d)}}for(var a=0;a<this.graph.edges.length;a++){var e=this.graph.edges[a];this.layoutAttractive(e)}for(a in this.graph.nodes){var f=this.graph.nodes[a],g=this.c*f.layoutForceX,h=this.c*f.layoutForceY,i=this.maxVertexMovement;g>i&&(g=i),g<-i&&(g=-i),h>i&&(h=i),h<-i&&(h=-i),f.layoutPosX+=g,f.layoutPosY+=h,f.layoutForceX=0,f.layoutForceY=0}},layoutRepulsive:function(a,b){var c=b.layoutPosX-a.layoutPosX,d=b.layoutPosY-a.layoutPosY,e=c*c+d*d;if(e<.01){c=.1*Math.random()+.1,d=.1*Math.random()+.1;var e=c*c+d*d}var f=Math.sqrt(e);if(f<this.maxRepulsiveForceDistance){var g=this.k*this.k/f;b.layoutForceX+=g*c/f,b.layoutForceY+=g*d/f,a.layoutForceX-=g*c/f,a.layoutForceY-=g*d/f}},layoutAttractive:function(a){var b=a.source,c=a.target,d=c.layoutPosX-b.layoutPosX,e=c.layoutPosY-b.layoutPosY,f=d*d+e*e;if(f<.01){d=.1*Math.random()+.1,e=.1*Math.random()+.1;var f=d*d+e*e}var
  g=Math.sqrt(f);g>this.maxRepulsiveForceDistance&&(g=this.maxRepulsiveForceDistance,f=g*g);var h=(f-this.k*this.k)/this.k;a.attraction==undefined&&(a.attraction=1),h*=Math.log(a.attraction)*.5+1,c.layoutForceX-=h*d/g,c.layoutForceY-=h*e/g,b.layoutForceX+=h*d/g,b.layoutForceY+=h*e/g}},Raphael.el.tooltip=function(a){return this.tp=a,this.tp.o={x:0,y:0},this.tp.hide(),this.hover(function(a){this.mousemove(function(a){this.tp.translate(a.clientX-this.tp.o.x,a.clientY-this.tp.o.y),this.tp.o={x:a.clientX,y:a.clientY}}),this.tp.show().toFront()},function(a){this.tp.hide(),this.unmousemove()}),this},Raphael.fn.connection=function(a,b,c){var d=this,e={draw:function(){var f=a.getBBox(),g=b.getBBox(),h=0,i=0,j=[{x:f.x+f.width/2,y:f.y-h},{x:f.x+f.width/2,y:f.y+f.height+h},{x:f.x-h,y:f.y+f.height/2},{x:f.x+f.width+h,y:f.y+f.height/2},{x:g.x+g.width/2,y:g.y-i},{x:g.x+g.width/2,y:g.y+g.height+i},{x:g.x-i,y:g.y+g.height/2},{x:g.x+g.width+i,y:g.y+g.height/2}],k={},l=[];for(var m=0;m<4;m++)for(var n=
 4;n<8;n++){var o=Math.abs(j[m].x-j[n].x),p=Math.abs(j[m].y-j[n].y);if(m==n-4||(m!=3&&n!=6||j[m].x<j[n].x)&&(m!=2&&n!=7||j[m].x>j[n].x)&&(m!=0&&n!=5||j[m].y>j[n].y)&&(m!=1&&n!=4||j[m].y<j[n].y))l.push(o+p),k[l[l.length-1].toFixed(3)]=[m,n]}var q=l.length==0?[0,4]:k[Math.min.apply(Math,l).toFixed(3)],r=j[q[0]].x,s=j[q[0]].y,t=j[q[1]].x,u=j[q[1]].y,o=Math.max(Math.abs(r-t)/2,10),p=Math.max(Math.abs(s-u)/2,10),v=[r,r,r-o,r+o][q[0]].toFixed(3),w=[s-p,s+p,s,s][q[0]].toFixed(3),x=[0,0,0,0,t,t,t-o,t+o][q[1]].toFixed(3),y=[0,0,0,0,s+p,s-p,u,u][q[1]].toFixed(3),z=["M",r.toFixed(3),s.toFixed(3),"C",v,w,x,y,t.toFixed(3),u.toFixed(3)].join(",");if(c&&c.directed){var A=Math.sqrt((u-y)*(u-y)+(t-x)*(t-x)),B=function(a,b){return-a*(b||5)/A},C=[{x:(B(t-x)+B(u-y)+t).toFixed(3),y:(B(u-y)+B(t-x)+u).toFixed(3)},{x:(B(t-x)-B(u-y)+t).toFixed(3),y:(B(u-y)-B(t-x)+u).toFixed(3)}];z=z+",M"+C[0].x+","+C[0].y+",L"+t+","+u+",L"+C[1].x+","+C[1].y}e.fg&&e.fg.attr({path:z})||(e.fg=d.path(z).attr({stroke:c&&c.stroke|
 |"#000",fill:"none"}).toBack()),e.bg&&e.bg.attr({path:z})||c&&c.fill&&(e.bg=c.fill.split&&d.path(z).attr({stroke:c.fill,fill:"none","stroke-width":c.width||3}).toBack()),c&&c.label&&(e.label&&e.label.attr({x:(r+t)/2,y:(s+u)/2})||(e.label=d.text((r+t)/2,(s+u)/2,c.label).attr({fill:"#000","font-size":c.fontsize||"12px"})))}};return e.draw(),e};
\ No newline at end of file


Mime
View raw message