Fixed negative scaling (hat tip to http://github.com/mal)
authorDmitry Baranovskiy <Dmitry@Baranovskiy.com>
Thu, 19 Aug 2010 01:12:51 +0000 (11:12 +1000)
committerDmitry Baranovskiy <Dmitry@Baranovskiy.com>
Thu, 19 Aug 2010 01:12:51 +0000 (11:12 +1000)
added license.txt

license.txt [new file with mode: 0644]
raphael-min.js
raphael.js

diff --git a/license.txt b/license.txt
new file mode 100644 (file)
index 0000000..479afcb
--- /dev/null
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2008-2010 Dmitry Baranovskiy
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
\ No newline at end of file
index f08bebd..4e4e002 100644 (file)
@@ -1,7 +1,7 @@
-/*
- * Raphael 1.5.0 - JavaScript Vector Library
+/*!
+ * Raphael 1.5.1 - JavaScript Vector Library
  *
  * Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
  * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
  */
-(function(){function aG(){if(aG.is(arguments[0],a4)){var b=arguments[0],d=D[bz](aG,b.splice(0,3+aG.is(b[0],aD))),R=d.set();for(var E=0,S=b[r];E<S;E++){var e=b[E]||{};bm[af](e.type)&&R[j](d[e.type]().attr(e))}return R}return D[bz](aG,arguments)}aG.version="1.5.0";var a=/[, ]+/,bm={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},bk=/\{(\d+)\}/g,bC="prototype",af="hasOwnProperty",Z=document,aN=window,q={was:Object[bC][af].call(aN,"Raphael"),is:aN.Raphael},bw=function(){this.customAttributes={}},aW,bh="appendChild",bz="apply",bt="concat",V="createTouch" in Z,aM="",aF=" ",bA=String,H="split",P="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[H](aF),bn={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},aT="join",r="length",bE=bA[bC].toLowerCase,an=Math,l=an.max,bf=an.min,bi=an.pow,aD="number",ae="string",a4="array",aX="toString",a1="fill",aQ=Object[bC][aX],bq={},j="push",bx=/^(?=[\da-f]$)/,h=/^url\(['"]?([^\)]+?)['"]?\)$/i,F=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+(?:\s*,\s*[\d\.]+)?)\s*\)|rgba?\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%(?:\s*,\s*[\d\.]+%)?)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,ao=/^(NaN|-?Infinity)$/,c=/^cubic-bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,ac=an.round,C="setAttribute",ai=parseFloat,Q=parseInt,a2=" progid:DXImageTransform.Microsoft",bl=bA[bC].toUpperCase,p={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,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,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},al={along:"along",blur:aD,"clip-rect":"csv",cx:aD,cy:aD,fill:"colour","fill-opacity":aD,"font-size":aD,height:aD,opacity:aD,path:"path",r:aD,rotation:"csv",rx:aD,ry:aD,scale:"csv",stroke:"colour","stroke-opacity":aD,"stroke-width":aD,translation:"csv",width:aD,x:aD,y:aD},bp="replace",a7=/,?([achlmqrstvxz]),?/gi,ba=/\s*,\s*/,m={hs:1,rg:1},bc=/^(from|to|\d+%)$/,aO=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,aE=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,bj=function(e,d){return e.key-d.key};aG.type=(aN.SVGAngle||Z.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML");if(aG.type=="VML"){var av=Z.createElement("div"),az;av.innerHTML='<v:shape adj="1"/>';az=av.firstChild;az.style.behavior="url(#default#VML)";if(!(az&&typeof az.adj=="object")){return aG.type=null}av=null}aG.svg=!(aG.vml=aG.type=="VML");bw[bC]=aG[bC];aW=bw[bC];aG._id=0;aG._oid=0;aG.fn={};aG.is=function(d,b){b=bE.call(b);if(b=="finite"){return !ao.test(+d)}return(b=="null"&&d===null)||(b==typeof d)||(b=="object"&&d===Object(d))||(b=="array"&&Array.isArray&&Array.isArray(d))||aQ.call(d).slice(8,-1).toLowerCase()==b};aG.angle=function(E,S,e,R,d,i){if(d==null){var b=E-e,bF=S-R;if(!b&&!bF){return 0}return((b<0)*180+an.atan(-bF/-b)*180/an.PI+360)%360}else{return aG.angle(E,S,d,i)-aG.angle(e,R,d,i)}};aG.snapTo=function(d,E,b){b=b||10;d=[][bt](d);var e=d.length;while(e--){if(an.abs(d[e]-E)<=b){return d[e]}}return E};aG.setWindow=function(b){aN=b;Z=aN.document};var a6=function(E){if(aG.vml){var b=/^\s+|\s+$/g;var S;try{var bF=new ActiveXObject("htmlfile");bF.write("<body>");bF.close();S=bF.body}catch(bG){S=createPopup().document.body}var d=S.createTextRange();a6=ay(function(i){try{S.style.color=bA(i)[bp](b,aM);var bH=d.queryCommandValue("ForeColor");bH=((bH&255)<<16)|(bH&65280)|((bH&16711680)>>>16);return"#"+("000000"+bH[aX](16)).slice(-6)}catch(bI){return"none"}})}else{var R=Z.createElement("i");R.title="Rapha\xebl Colour Picker";R.style.display="none";Z.body[bh](R);a6=ay(function(e){R.style.color=e;return Z.defaultView.getComputedStyle(R,aM).getPropertyValue("color")})}return a6(E)},aA=function(){return"hsb("+[this.h,this.s,this.b]+")"},L=function(){return"hsl("+[this.h,this.s,this.l]+")"},A=function(){return this.hex};aG.hsb2rgb=function(i,e,d){if(aG.is(i,"object")&&"h" in i&&"s" in i&&"b" in i){d=i.b;e=i.s;i=i.h}return aG.hsl2rgb(i,e,d/2)};aG.hsl2rgb=function(S,bM,e){if(aG.is(S,"object")&&"h" in S&&"s" in S&&"l" in S){e=S.l;bM=S.s;S=S.h}if(S>1||bM>1||e>1){S/=360;bM/=100;e/=100}var bJ={},bG=["r","g","b"],bF,bI,R,d,bH,bK;if(!bM){bJ={r:e,g:e,b:e}}else{if(e<0.5){bF=e*(1+bM)}else{bF=e+bM-e*bM}bI=2*e-bF;for(var E=0,bL=bG.length;E<bL;E++){R=S+1/3*-(E-1);R<0&&R++;R>1&&R--;if(R*6<1){bJ[bG[E]]=bI+(bF-bI)*6*R}else{if(R*2<1){bJ[bG[E]]=bF}else{if(R*3<2){bJ[bG[E]]=bI+(bF-bI)*(2/3-R)*6}else{bJ[bG[E]]=bI}}}}}bJ.r*=255;bJ.g*=255;bJ.b*=255;d=(~~bJ.r)[aX](16);bH=(~~bJ.g)[aX](16);bK=(~~bJ.b)[aX](16);d=d[bp](bx,"0");bH=bH[bp](bx,"0");bK=bK[bp](bx,"0");bJ.hex="#"+d+bH+bK;bJ.toString=A;return bJ};aG.rgb2hsb=function(b,d,bF){if(d==null&&aG.is(b,"object")&&"r" in b&&"g" in b&&"b" in b){bF=b.b;d=b.g;b=b.r}if(d==null&&aG.is(b,ae)){var bH=aG.getRGB(b);b=bH.r;d=bH.g;bF=bH.b}if(b>1||d>1||bF>1){b/=255;d/=255;bF/=255}var S=l(b,d,bF),e=bf(b,d,bF),E,i,R=S;if(e==S){return{h:0,s:0,b:S,toString:aA}}else{var bG=(S-e);i=bG/S;if(b==S){E=(d-bF)/bG}else{if(d==S){E=2+((bF-b)/bG)}else{E=4+((b-d)/bG)}}E/=6;E<0&&E++;E>1&&E--}return{h:E,s:i,b:R,toString:aA}};aG.rgb2hsl=function(d,e,S){if(e==null&&aG.is(d,"object")&&"r" in d&&"g" in d&&"b" in d){S=d.b;e=d.g;d=d.r}if(e==null&&aG.is(d,ae)){var bI=aG.getRGB(d);d=bI.r;e=bI.g;S=bI.b}if(d>1||e>1||S>1){d/=255;e/=255;S/=255}var R=l(d,e,S),i=bf(d,e,S),E,bH,b=(R+i)/2,bG;if(i==R){bG={h:0,s:0,l:b}}else{var bF=R-i;bH=b<0.5?bF/(R+i):bF/(2-R-i);if(d==R){E=(e-S)/bF}else{if(e==R){E=2+(S-d)/bF}else{E=4+(d-e)/bF}}E/=6;E<0&&E++;E>1&&E--;bG={h:E,s:bH,l:b}}bG.toString=L;return bG};aG._path2string=function(){return this.join(",")[bp](a7,"$1")};function ay(i,d,b){function e(){var E=Array[bC].slice.call(arguments,0),S=E[aT]("\u25ba"),R=e.cache=e.cache||{},bF=e.count=e.count||[];if(R[af](S)){return b?b(R[S]):R[S]}bF[r]>=1000&&delete R[bF.shift()];bF[j](S);R[S]=i[bz](d,E);return b?b(R[S]):R[S]}return e}aG.getRGB=ay(function(e){if(!e||!!((e=bA(e)).indexOf("-")+1)){return{r:-1,g:-1,b:-1,hex:"none",error:1}}if(e=="none"){return{r:-1,g:-1,b:-1,hex:"none"}}!(m[af](e.substring(0,2))||e.charAt()=="#")&&(e=a6(e));var bF,i,E,bI,S,bJ,bG=e.match(F);if(bG){if(bG[2]){bI=Q(bG[2].substring(5),16);E=Q(bG[2].substring(3,5),16);i=Q(bG[2].substring(1,3),16)}if(bG[3]){bI=Q((bJ=bG[3].charAt(3))+bJ,16);E=Q((bJ=bG[3].charAt(2))+bJ,16);i=Q((bJ=bG[3].charAt(1))+bJ,16)}if(bG[4]){bG=bG[4][H](ba);i=ai(bG[0]);E=ai(bG[1]);bI=ai(bG[2]);S=ai(bG[3])}if(bG[5]){bG=bG[5][H](ba);i=ai(bG[0])*2.55;E=ai(bG[1])*2.55;bI=ai(bG[2])*2.55;S=ai(bG[3])}if(bG[6]){bG=bG[6][H](ba);i=ai(bG[0]);E=ai(bG[1]);bI=ai(bG[2]);(bG[0].slice(-3)=="deg"||bG[0].slice(-1)=="\xb0")&&(i/=360);return aG.hsb2rgb(i,E,bI)}if(bG[7]){bG=bG[7][H](ba);i=ai(bG[0])*2.55;E=ai(bG[1])*2.55;bI=ai(bG[2])*2.55;(bG[0].slice(-3)=="deg"||bG[0].slice(-1)=="\xb0")&&(i/=360*2.55);return aG.hsb2rgb(i,E,bI)}if(bG[8]){bG=bG[8][H](ba);i=ai(bG[0]);E=ai(bG[1]);bI=ai(bG[2]);(bG[0].slice(-3)=="deg"||bG[0].slice(-1)=="\xb0")&&(i/=360);return aG.hsl2rgb(i,E,bI)}if(bG[9]){bG=bG[9][H](ba);i=ai(bG[0])*2.55;E=ai(bG[1])*2.55;bI=ai(bG[2])*2.55;(bG[0].slice(-3)=="deg"||bG[0].slice(-1)=="\xb0")&&(i/=360*2.55);return aG.hsl2rgb(i,E,bI)}bG={r:i,g:E,b:bI};var d=(~~i)[aX](16),R=(~~E)[aX](16),bH=(~~bI)[aX](16);d=d[bp](bx,"0");R=R[bp](bx,"0");bH=bH[bp](bx,"0");bG.hex="#"+d+R+bH;isFinite(ai(S))&&(bG.o=S);return bG}return{r:-1,g:-1,b:-1,hex:"none",error:1}},aG);aG.getColor=function(d){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:d||0.75},b=this.hsb2rgb(e.h,e.s,e.b);e.h+=0.075;if(e.h>1){e.h=0;e.s-=0.2;e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})}return b.hex};aG.getColor.reset=function(){delete this.start};aG.parsePathString=ay(function(b){if(!b){return null}var e={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},d=[];if(aG.is(b,a4)&&aG.is(b[0],a4)){d=aP(b)}if(!d[r]){bA(b)[bp](aO,function(E,i,bF){var S=[],R=bE.call(i);bF[bp](aE,function(bH,bG){bG&&S[j](+bG)});if(R=="m"&&S[r]>2){d[j]([i][bt](S.splice(0,2)));R="l";i=i=="m"?"l":"L"}while(S[r]>=e[R]){d[j]([i][bt](S.splice(0,e[R])));if(!e[R]){break}}})}d[aX]=aG._path2string;return d});aG.findDotsAtSegment=function(d,b,bS,bQ,S,E,bG,bF,bM){var bK=1-bM,bJ=bi(bK,3)*d+bi(bK,2)*3*bM*bS+bK*3*bM*bM*S+bi(bM,3)*bG,bH=bi(bK,3)*b+bi(bK,2)*3*bM*bQ+bK*3*bM*bM*E+bi(bM,3)*bF,bO=d+2*bM*(bS-d)+bM*bM*(S-2*bS+d),bN=b+2*bM*(bQ-b)+bM*bM*(E-2*bQ+b),bR=bS+2*bM*(S-bS)+bM*bM*(bG-2*S+bS),bP=bQ+2*bM*(E-bQ)+bM*bM*(bF-2*E+bQ),bL=(1-bM)*d+bM*bS,bI=(1-bM)*b+bM*bQ,i=(1-bM)*S+bM*bG,e=(1-bM)*E+bM*bF,R=(90-an.atan((bO-bR)/(bN-bP))*180/an.PI);(bO>bR||bN<bP)&&(R+=180);return{x:bJ,y:bH,m:{x:bO,y:bN},n:{x:bR,y:bP},start:{x:bL,y:bI},end:{x:i,y:e},alpha:R}};var ah=ay(function(bJ){if(!bJ){return{x:0,y:0,width:0,height:0}}bJ=U(bJ);var bG=0,bF=0,E=[],d=[],e;for(var R=0,bI=bJ[r];R<bI;R++){e=bJ[R];if(e[0]=="M"){bG=e[1];bF=e[2];E[j](bG);d[j](bF)}else{var S=a3(bG,bF,e[1],e[2],e[3],e[4],e[5],e[6]);E=E[bt](S.min.x,S.max.x);d=d[bt](S.min.y,S.max.y);bG=e[5];bF=e[6]}}var b=bf[bz](0,E),bH=bf[bz](0,d);return{x:b,y:bH,width:l[bz](0,E)-b,height:l[bz](0,d)-bH}}),aP=function(S){var e=[];if(!aG.is(S,a4)||!aG.is(S&&S[0],a4)){S=aG.parsePathString(S)}for(var d=0,E=S[r];d<E;d++){e[d]=[];for(var b=0,R=S[d][r];b<R;b++){e[d][b]=S[d][b]}}e[aX]=aG._path2string;return e},ar=ay(function(E){if(!aG.is(E,a4)||!aG.is(E&&E[0],a4)){E=aG.parsePathString(E)}var bI=[],bK=0,bJ=0,bN=0,bM=0,e=0;if(E[0][0]=="M"){bK=E[0][1];bJ=E[0][2];bN=bK;bM=bJ;e++;bI[j](["M",bK,bJ])}for(var bF=e,bO=E[r];bF<bO;bF++){var b=bI[bF]=[],bL=E[bF];if(bL[0]!=bE.call(bL[0])){b[0]=bE.call(bL[0]);switch(b[0]){case"a":b[1]=bL[1];b[2]=bL[2];b[3]=bL[3];b[4]=bL[4];b[5]=bL[5];b[6]=+(bL[6]-bK).toFixed(3);b[7]=+(bL[7]-bJ).toFixed(3);break;case"v":b[1]=+(bL[1]-bJ).toFixed(3);break;case"m":bN=bL[1];bM=bL[2];default:for(var S=1,bG=bL[r];S<bG;S++){b[S]=+(bL[S]-((S%2)?bK:bJ)).toFixed(3)}}}else{b=bI[bF]=[];if(bL[0]=="m"){bN=bL[1]+bK;bM=bL[2]+bJ}for(var R=0,d=bL[r];R<d;R++){bI[bF][R]=bL[R]}}var bH=bI[bF][r];switch(bI[bF][0]){case"z":bK=bN;bJ=bM;break;case"h":bK+=+bI[bF][bH-1];break;case"v":bJ+=+bI[bF][bH-1];break;default:bK+=+bI[bF][bH-2];bJ+=+bI[bF][bH-1]}}bI[aX]=aG._path2string;return bI},0,aP),x=ay(function(E){if(!aG.is(E,a4)||!aG.is(E&&E[0],a4)){E=aG.parsePathString(E)}var bH=[],bJ=0,bI=0,bM=0,bL=0,e=0;if(E[0][0]=="M"){bJ=+E[0][1];bI=+E[0][2];bM=bJ;bL=bI;e++;bH[0]=["M",bJ,bI]}for(var bF=e,bN=E[r];bF<bN;bF++){var b=bH[bF]=[],bK=E[bF];if(bK[0]!=bl.call(bK[0])){b[0]=bl.call(bK[0]);switch(b[0]){case"A":b[1]=bK[1];b[2]=bK[2];b[3]=bK[3];b[4]=bK[4];b[5]=bK[5];b[6]=+(bK[6]+bJ);b[7]=+(bK[7]+bI);break;case"V":b[1]=+bK[1]+bI;break;case"H":b[1]=+bK[1]+bJ;break;case"M":bM=+bK[1]+bJ;bL=+bK[2]+bI;default:for(var S=1,bG=bK[r];S<bG;S++){b[S]=+bK[S]+((S%2)?bJ:bI)}}}else{for(var R=0,d=bK[r];R<d;R++){bH[bF][R]=bK[R]}}switch(b[0]){case"Z":bJ=bM;bI=bL;break;case"H":bJ=b[1];break;case"V":bI=b[1];break;case"M":bM=bH[bF][bH[bF][r]-2];bL=bH[bF][bH[bF][r]-1];default:bJ=bH[bF][bH[bF][r]-2];bI=bH[bF][bH[bF][r]-1]}}bH[aX]=aG._path2string;return bH},null,aP),bB=function(d,i,b,e){return[d,i,b,e,b,e]},bg=function(d,i,S,E,b,e){var R=1/3,bF=2/3;return[R*d+bF*S,R*i+bF*E,R*b+bF*S,R*e+bF*E,b,e]},Y=function(bN,ci,bW,bU,bO,bI,R,bM,ch,bP){var E=an.PI,bT=E*120/180,b=E/180*(+bO||0),b0=[],bX,ce=ay(function(cj,cm,i){var cl=cj*an.cos(i)-cm*an.sin(i),ck=cj*an.sin(i)+cm*an.cos(i);return{x:cl,y:ck}});if(!bP){bX=ce(bN,ci,-b);bN=bX.x;ci=bX.y;bX=ce(bM,ch,-b);bM=bX.x;ch=bX.y;var d=an.cos(E/180*bO),bK=an.sin(E/180*bO),b2=(bN-bM)/2,b1=(ci-ch)/2;var cc=(b2*b2)/(bW*bW)+(b1*b1)/(bU*bU);if(cc>1){cc=an.sqrt(cc);bW=cc*bW;bU=cc*bU}var e=bW*bW,b5=bU*bU,b7=(bI==R?-1:1)*an.sqrt(an.abs((e*b5-e*b1*b1-b5*b2*b2)/(e*b1*b1+b5*b2*b2))),bR=b7*bW*b1/bU+(bN+bM)/2,bQ=b7*-bU*b2/bW+(ci+ch)/2,bH=an.asin(((ci-bQ)/bU).toFixed(9)),bG=an.asin(((ch-bQ)/bU).toFixed(9));bH=bN<bR?E-bH:bH;bG=bM<bR?E-bG:bG;bH<0&&(bH=E*2+bH);bG<0&&(bG=E*2+bG);if(R&&bH>bG){bH=bH-E*2}if(!R&&bG>bH){bG=bG-E*2}}else{bH=bP[0];bG=bP[1];bR=bP[2];bQ=bP[3]}var bL=bG-bH;if(an.abs(bL)>bT){var bS=bG,bV=bM,bJ=ch;bG=bH+bT*(R&&bG>bH?1:-1);bM=bR+bW*an.cos(bG);ch=bQ+bU*an.sin(bG);b0=Y(bM,ch,bW,bU,bO,0,R,bV,bJ,[bG,bS,bR,bQ])}bL=bG-bH;var bF=an.cos(bH),cg=an.sin(bH),S=an.cos(bG),cf=an.sin(bG),b3=an.tan(bL/4),b6=4/3*bW*b3,b4=4/3*bU*b3,cd=[bN,ci],cb=[bN+b6*cg,ci-b4*bF],ca=[bM+b6*cf,ch-b4*S],b8=[bM,ch];cb[0]=2*cd[0]-cb[0];cb[1]=2*cd[1]-cb[1];if(bP){return[cb,ca,b8][bt](b0)}else{b0=[cb,ca,b8][bt](b0)[aT]()[H](",");var bY=[];for(var b9=0,bZ=b0[r];b9<bZ;b9++){bY[b9]=b9%2?ce(b0[b9-1],b0[b9],b).y:ce(b0[b9],b0[b9+1],b).x}return bY}},ab=function(d,b,i,e,bG,bF,S,R,bH){var E=1-bH;return{x:bi(E,3)*d+bi(E,2)*3*bH*i+E*3*bH*bH*bG+bi(bH,3)*S,y:bi(E,3)*b+bi(E,2)*3*bH*e+E*3*bH*bH*bF+bi(bH,3)*R}},a3=ay(function(i,d,R,E,bO,bN,bK,bH){var bM=(bO-2*R+i)-(bK-2*bO+R),bJ=2*(R-i)-2*(bO-R),bG=i-R,bF=(-bJ+an.sqrt(bJ*bJ-4*bM*bG))/2/bM,S=(-bJ-an.sqrt(bJ*bJ-4*bM*bG))/2/bM,bI=[d,bH],bL=[i,bK],e;an.abs(bF)>"1e12"&&(bF=0.5);an.abs(S)>"1e12"&&(S=0.5);if(bF>0&&bF<1){e=ab(i,d,R,E,bO,bN,bK,bH,bF);bL[j](e.x);bI[j](e.y)}if(S>0&&S<1){e=ab(i,d,R,E,bO,bN,bK,bH,S);bL[j](e.x);bI[j](e.y)}bM=(bN-2*E+d)-(bH-2*bN+E);bJ=2*(E-d)-2*(bN-E);bG=d-E;bF=(-bJ+an.sqrt(bJ*bJ-4*bM*bG))/2/bM;S=(-bJ-an.sqrt(bJ*bJ-4*bM*bG))/2/bM;an.abs(bF)>"1e12"&&(bF=0.5);an.abs(S)>"1e12"&&(S=0.5);if(bF>0&&bF<1){e=ab(i,d,R,E,bO,bN,bK,bH,bF);bL[j](e.x);bI[j](e.y)}if(S>0&&S<1){e=ab(i,d,R,E,bO,bN,bK,bH,S);bL[j](e.x);bI[j](e.y)}return{min:{x:bf[bz](0,bL),y:bf[bz](0,bI)},max:{x:l[bz](0,bL),y:l[bz](0,bI)}}}),U=ay(function(bN,bI){var E=x(bN),bJ=bI&&x(bI),bK={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},b={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},S=function(bO,bP){var i,bQ;if(!bO){return["C",bP.x,bP.y,bP.x,bP.y,bP.x,bP.y]}!(bO[0] in {T:1,Q:1})&&(bP.qx=bP.qy=null);switch(bO[0]){case"M":bP.X=bO[1];bP.Y=bO[2];break;case"A":bO=["C"][bt](Y[bz](0,[bP.x,bP.y][bt](bO.slice(1))));break;case"S":i=bP.x+(bP.x-(bP.bx||bP.x));bQ=bP.y+(bP.y-(bP.by||bP.y));bO=["C",i,bQ][bt](bO.slice(1));break;case"T":bP.qx=bP.x+(bP.x-(bP.qx||bP.x));bP.qy=bP.y+(bP.y-(bP.qy||bP.y));bO=["C"][bt](bg(bP.x,bP.y,bP.qx,bP.qy,bO[1],bO[2]));break;case"Q":bP.qx=bO[1];bP.qy=bO[2];bO=["C"][bt](bg(bP.x,bP.y,bO[1],bO[2],bO[3],bO[4]));break;case"L":bO=["C"][bt](bB(bP.x,bP.y,bO[1],bO[2]));break;case"H":bO=["C"][bt](bB(bP.x,bP.y,bO[1],bP.y));break;case"V":bO=["C"][bt](bB(bP.x,bP.y,bP.x,bO[1]));break;case"Z":bO=["C"][bt](bB(bP.x,bP.y,bP.X,bP.Y));break}return bO},d=function(bO,bP){if(bO[bP][r]>7){bO[bP].shift();var bQ=bO[bP];while(bQ[r]){bO.splice(bP++,0,["C"][bt](bQ.splice(0,6)))}bO.splice(bP,1);bL=l(E[r],bJ&&bJ[r]||0)}},e=function(bS,bR,bP,bO,bQ){if(bS&&bR&&bS[bQ][0]=="M"&&bR[bQ][0]!="M"){bR.splice(bQ,0,["M",bO.x,bO.y]);bP.bx=0;bP.by=0;bP.x=bS[bQ][1];bP.y=bS[bQ][2];bL=l(E[r],bJ&&bJ[r]||0)}};for(var bG=0,bL=l(E[r],bJ&&bJ[r]||0);bG<bL;bG++){E[bG]=S(E[bG],bK);d(E,bG);bJ&&(bJ[bG]=S(bJ[bG],b));bJ&&d(bJ,bG);e(E,bJ,bK,b,bG);e(bJ,E,b,bK,bG);var bF=E[bG],bM=bJ&&bJ[bG],R=bF[r],bH=bJ&&bM[r];bK.x=bF[R-2];bK.y=bF[R-1];bK.bx=ai(bF[R-4])||bK.x;bK.by=ai(bF[R-3])||bK.y;b.bx=bJ&&(ai(bM[bH-4])||b.x);b.by=bJ&&(ai(bM[bH-3])||b.y);b.x=bJ&&bM[bH-2];b.y=bJ&&bM[bH-1]}return bJ?[E,bJ]:E},null,aP),v=ay(function(bI){var bH=[];for(var S=0,bJ=bI[r];S<bJ;S++){var b={},bG=bI[S].match(/^([^:]*):?([\d\.]*)/);b.color=aG.getRGB(bG[1]);if(b.color.error){return null}b.color=b.color.hex;bG[2]&&(b.offset=bG[2]+"%");bH[j](b)}for(S=1,bJ=bH[r]-1;S<bJ;S++){if(!bH[S].offset){var e=ai(bH[S-1].offset||0),E=0;for(var R=S+1;R<bJ;R++){if(bH[R].offset){E=bH[R].offset;break}}if(!E){E=100;R=bJ}E=ai(E);var bF=(E-e)/(R-S+1);for(;S<R;S++){e+=bF;bH[S].offset=e+"%"}}}return bH}),aH=function(b,E,e,i){var d;if(aG.is(b,ae)||aG.is(b,"object")){d=aG.is(b,ae)?Z.getElementById(b):b;if(d.tagName){if(E==null){return{container:d,width:d.style.pixelWidth||d.offsetWidth,height:d.style.pixelHeight||d.offsetHeight}}else{return{container:d,width:E,height:e}}}}else{return{container:1,x:b,y:E,width:e,height:i}}},bb=function(b,e){var d=this;for(var i in e){if(e[af](i)&&!(i in b)){switch(typeof e[i]){case"function":(function(E){b[i]=b===d?E:function(){return E[bz](d,arguments)}})(e[i]);break;case"object":b[i]=b[i]||{};bb.call(this,b[i],e[i]);break;default:b[i]=e[i];break}}}},aC=function(b,d){b==d.top&&(d.top=b.prev);b==d.bottom&&(d.bottom=b.next);b.next&&(b.next.prev=b.prev);b.prev&&(b.prev.next=b.next)},ak=function(b,d){if(d.top===b){return}aC(b,d);b.next=null;b.prev=d.top;d.top.next=b;d.top=b},o=function(b,d){if(d.bottom===b){return}aC(b,d);b.next=d.bottom;b.prev=null;d.bottom.prev=b;d.bottom=b},I=function(d,b,e){aC(d,e);b==e.top&&(e.top=d);b.next&&(b.next.prev=d);d.next=b.next;d.prev=b;b.next=d},aJ=function(d,b,e){aC(d,e);b==e.bottom&&(e.bottom=d);b.prev&&(b.prev.next=d);d.prev=b.prev;b.prev=d;d.next=b},y=function(b){return function(){throw new Error("Rapha\xebl: you are calling to method \u201c"+b+"\u201d of removed object")}},aL=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;aG.pathToRelative=ar;if(aG.svg){aW.svgns="http://www.w3.org/2000/svg";aW.xlink="http://www.w3.org/1999/xlink";ac=function(b){return +b+(~~b===b)*0.5};var be=function(e,b){if(b){for(var d in b){if(b[af](d)){e[C](d,bA(b[d]))}}}else{e=Z.createElementNS(aW.svgns,e);e.style.webkitTapHighlightColor="rgba(0,0,0,0)";return e}};aG[aX]=function(){return"Your browser supports SVG.\nYou are running Rapha\xebl "+this.version};var w=function(b,i){var d=be("path");i.canvas&&i.canvas[bh](d);var e=new aR(d,i);e.type="path";am(e,{fill:"none",stroke:"#000",path:b});return e};var g=function(E,bM,b){var bJ="linear",bG=0.5,S=0.5,bO=E.style;bM=bA(bM)[bp](aL,function(bQ,i,bR){bJ="radial";if(i&&bR){bG=ai(i);S=ai(bR);var bP=((S>0.5)*2-1);bi(bG-0.5,2)+bi(S-0.5,2)>0.25&&(S=an.sqrt(0.25-bi(bG-0.5,2))*bP+0.5)&&S!=0.5&&(S=S.toFixed(5)-0.00001*bP)}return aM});bM=bM[H](/\s*\-\s*/);if(bJ=="linear"){var bF=bM.shift();bF=-ai(bF);if(isNaN(bF)){return null}var R=[0,0,an.cos(bF*an.PI/180),an.sin(bF*an.PI/180)],bL=1/(l(an.abs(R[2]),an.abs(R[3]))||1);R[2]*=bL;R[3]*=bL;if(R[2]<0){R[0]=-R[2];R[2]=0}if(R[3]<0){R[1]=-R[3];R[3]=0}}var bI=v(bM);if(!bI){return null}var d=E.getAttribute(a1);d=d.match(/^url\(#(.*)\)$/);d&&b.defs.removeChild(Z.getElementById(d[1]));var e=be(bJ+"Gradient");e.id="r"+(aG._id++)[aX](36);be(e,bJ=="radial"?{fx:bG,fy:S}:{x1:R[0],y1:R[1],x2:R[2],y2:R[3]});b.defs[bh](e);for(var bH=0,bN=bI[r];bH<bN;bH++){var bK=be("stop");be(bK,{offset:bI[bH].offset?bI[bH].offset:!bH?"0%":"100%","stop-color":bI[bH].color||"#fff"});e[bh](bK)}be(E,{fill:"url(#"+e.id+")",opacity:1,"fill-opacity":1});bO.fill=aM;bO.opacity=1;bO.fillOpacity=1;return 1};var aa=function(d){var b=d.getBBox();be(d.pattern,{patternTransform:aG.format("translate({0},{1})",b.x,b.y)})};var am=function(bL,bU){var bO={"":[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]},bQ=bL.node,bM=bL.attrs,bI=bL.rotate(),S=function(b1,b0){b0=bO[bE.call(b0)];if(b0){var bY=b1.attrs["stroke-width"]||"1",bW={round:bY,square:bY,butt:0}[b1.attrs["stroke-linecap"]||bU["stroke-linecap"]]||0,bZ=[];var bX=b0[r];while(bX--){bZ[bX]=b0[bX]*bY+((bX%2)?1:-1)*bW}be(bQ,{"stroke-dasharray":bZ[aT](",")})}};bU[af]("rotation")&&(bI=bU.rotation);var bH=bA(bI)[H](a);if(!(bH.length-1)){bH=null}else{bH[1]=+bH[1];bH[2]=+bH[2]}ai(bI)&&bL.rotate(0,true);for(var bP in bU){if(bU[af](bP)){if(!p[af](bP)){continue}var bN=bU[bP];bM[bP]=bN;switch(bP){case"blur":bL.blur(bN);break;case"rotation":bL.rotate(bN,true);break;case"href":case"title":case"target":var bS=bQ.parentNode;if(bE.call(bS.tagName)!="a"){var E=be("a");bS.insertBefore(E,bQ);E[bh](bQ);bS=E}if(bP=="target"&&bN=="blank"){bS.setAttributeNS(bL.paper.xlink,"show","new")}else{bS.setAttributeNS(bL.paper.xlink,bP,bN)}break;case"cursor":bQ.style.cursor=bN;break;case"clip-rect":var d=bA(bN)[H](a);if(d[r]==4){bL.clip&&bL.clip.parentNode.parentNode.removeChild(bL.clip.parentNode);var e=be("clipPath"),bR=be("rect");e.id="r"+(aG._id++)[aX](36);be(bR,{x:d[0],y:d[1],width:d[2],height:d[3]});e[bh](bR);bL.paper.defs[bh](e);be(bQ,{"clip-path":"url(#"+e.id+")"});bL.clip=bR}if(!bN){var bT=Z.getElementById(bQ.getAttribute("clip-path")[bp](/(^url\(#|\)$)/g,aM));bT&&bT.parentNode.removeChild(bT);be(bQ,{"clip-path":aM});delete bL.clip}break;case"path":if(bL.type=="path"){be(bQ,{d:bN?bM.path=x(bN):"M0,0"})}break;case"width":bQ[C](bP,bN);if(bM.fx){bP="x";bN=bM.x}else{break}case"x":if(bM.fx){bN=-bM.x-(bM.width||0)}case"rx":if(bP=="rx"&&bL.type=="rect"){break}case"cx":bH&&(bP=="x"||bP=="cx")&&(bH[1]+=bN-bM[bP]);bQ[C](bP,bN);bL.pattern&&aa(bL);break;case"height":bQ[C](bP,bN);if(bM.fy){bP="y";bN=bM.y}else{break}case"y":if(bM.fy){bN=-bM.y-(bM.height||0)}case"ry":if(bP=="ry"&&bL.type=="rect"){break}case"cy":bH&&(bP=="y"||bP=="cy")&&(bH[2]+=bN-bM[bP]);bQ[C](bP,bN);bL.pattern&&aa(bL);break;case"r":if(bL.type=="rect"){be(bQ,{rx:bN,ry:bN})}else{bQ[C](bP,bN)}break;case"src":if(bL.type=="image"){bQ.setAttributeNS(bL.paper.xlink,"href",bN)}break;case"stroke-width":bQ.style.strokeWidth=bN;bQ[C](bP,bN);if(bM["stroke-dasharray"]){S(bL,bM["stroke-dasharray"])}break;case"stroke-dasharray":S(bL,bN);break;case"translation":var bF=bA(bN)[H](a);bF[0]=+bF[0]||0;bF[1]=+bF[1]||0;if(bH){bH[1]+=bF[0];bH[2]+=bF[1]}z.call(bL,bF[0],bF[1]);break;case"scale":bF=bA(bN)[H](a);bL.scale(+bF[0]||1,+bF[1]||+bF[0]||1,isNaN(ai(bF[2]))?null:+bF[2],isNaN(ai(bF[3]))?null:+bF[3]);break;case a1:var R=bA(bN).match(h);if(R){e=be("pattern");var bK=be("image");e.id="r"+(aG._id++)[aX](36);be(e,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});be(bK,{x:0,y:0});bK.setAttributeNS(bL.paper.xlink,"href",R[1]);e[bh](bK);var bV=Z.createElement("img");bV.style.cssText="position:absolute;left:-9999em;top-9999em";bV.onload=function(){be(e,{width:this.offsetWidth,height:this.offsetHeight});be(bK,{width:this.offsetWidth,height:this.offsetHeight});Z.body.removeChild(this);bL.paper.safari()};Z.body[bh](bV);bV.src=R[1];bL.paper.defs[bh](e);bQ.style.fill="url(#"+e.id+")";be(bQ,{fill:"url(#"+e.id+")"});bL.pattern=e;bL.pattern&&aa(bL);break}var i=aG.getRGB(bN);if(!i.error){delete bU.gradient;delete bM.gradient;!aG.is(bM.opacity,"undefined")&&aG.is(bU.opacity,"undefined")&&be(bQ,{opacity:bM.opacity});!aG.is(bM["fill-opacity"],"undefined")&&aG.is(bU["fill-opacity"],"undefined")&&be(bQ,{"fill-opacity":bM["fill-opacity"]})}else{if((({circle:1,ellipse:1})[af](bL.type)||bA(bN).charAt()!="r")&&g(bQ,bN,bL.paper)){bM.gradient=bN;bM.fill="none";break}}i[af]("o")&&be(bQ,{"fill-opacity":i.o>1?i.o/100:i.o});case"stroke":i=aG.getRGB(bN);bQ[C](bP,i.hex);bP=="stroke"&&i[af]("o")&&be(bQ,{"stroke-opacity":i.o>1?i.o/100:i.o});break;case"gradient":(({circle:1,ellipse:1})[af](bL.type)||bA(bN).charAt()!="r")&&g(bQ,bN,bL.paper);break;case"opacity":case"fill-opacity":if(bM.gradient){var b=Z.getElementById(bQ.getAttribute(a1)[bp](/^url\(#|\)$/g,aM));if(b){var bG=b.getElementsByTagName("stop");bG[bG[r]-1][C]("stop-opacity",bN)}break}default:bP=="font-size"&&(bN=Q(bN,10)+"px");var bJ=bP[bp](/(\-.)/g,function(bW){return bl.call(bW.substring(1))});bQ.style[bJ]=bN;bQ[C](bP,bN);break}}}O(bL,bU);if(bH){bL.rotate(bH.join(aF))}else{ai(bI)&&bL.rotate(bI,true)}};var n=1.2,O=function(b,E){if(b.type!="text"||!(E[af]("text")||E[af]("font")||E[af]("font-size")||E[af]("x")||E[af]("y"))){return}var bH=b.attrs,d=b.node,bJ=d.firstChild?Q(Z.defaultView.getComputedStyle(d.firstChild,aM).getPropertyValue("font-size"),10):10;if(E[af]("text")){bH.text=E.text;while(d.firstChild){d.removeChild(d.firstChild)}var e=bA(E.text)[H]("\n");for(var R=0,bI=e[r];R<bI;R++){if(e[R]){var bF=be("tspan");R&&be(bF,{dy:bJ*n,x:bH.x});bF[bh](Z.createTextNode(e[R]));d[bh](bF)}}}else{e=d.getElementsByTagName("tspan");for(R=0,bI=e[r];R<bI;R++){R&&be(e[R],{dy:bJ*n,x:bH.x})}}be(d,{y:bH.y});var S=b.getBBox(),bG=bH.y-(S.y+S.height/2);bG&&isFinite(bG)&&be(d,{y:bH.y+bG})},aR=function(d,b){var i=0,e=0;this[0]=d;this.id=aG._oid++;this.node=d;d.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};var a9=aR[bC];aR[bC].rotate=function(d,b,i){if(this.removed){return this}if(d==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aT](aF)}return this._.rt.deg}var e=this.getBBox();d=bA(d)[H](a);if(d[r]-1){b=ai(d[1]);i=ai(d[2])}d=ai(d[0]);if(b!=null&&b!==false){this._.rt.deg=d}else{this._.rt.deg+=d}(i==null)&&(b=null);this._.rt.cx=b;this._.rt.cy=i;b=b==null?e.x+e.width/2:b;i=i==null?e.y+e.height/2:i;if(this._.rt.deg){this.transformations[0]=aG.format("rotate({0} {1} {2})",this._.rt.deg,b,i);this.clip&&be(this.clip,{transform:aG.format("rotate({0} {1} {2})",-this._.rt.deg,b,i)})}else{this.transformations[0]=aM;this.clip&&be(this.clip,{transform:aM})}be(this.node,{transform:this.transformations[aT](aF)});return this};aR[bC].hide=function(){!this.removed&&(this.node.style.display="none");return this};aR[bC].show=function(){!this.removed&&(this.node.style.display="");return this};aR[bC].remove=function(){if(this.removed){return}aC(this,this.paper);this.node.parentNode.removeChild(this.node);for(var b in this){delete this[b]}this.removed=true};aR[bC].getBBox=function(){if(this.removed){return this}if(this.type=="path"){return ah(this.attrs.path)}if(this.node.style.display=="none"){this.show();var d=true}var bF={};try{bF=this.node.getBBox()}catch(R){}finally{bF=bF||{}}if(this.type=="text"){bF={x:bF.x,y:Infinity,width:0,height:0};for(var b=0,E=this.node.getNumberOfChars();b<E;b++){var S=this.node.getExtentOfChar(b);(S.y<bF.y)&&(bF.y=S.y);(S.y+S.height-bF.y>bF.height)&&(bF.height=S.y+S.height-bF.y);(S.x+S.width-bF.x>bF.width)&&(bF.width=S.x+S.width-bF.x)}}d&&this.hide();return bF};aR[bC].attr=function(b,bH){if(this.removed){return this}if(b==null){var bG={};for(var R in this.attrs){if(this.attrs[af](R)){bG[R]=this.attrs[R]}}this._.rt.deg&&(bG.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(bG.scale=this.scale());bG.gradient&&bG.fill=="none"&&(bG.fill=bG.gradient)&&delete bG.gradient;return bG}if(bH==null&&aG.is(b,ae)){if(b=="translation"){return z.call(this)}if(b=="rotation"){return this.rotate()}if(b=="scale"){return this.scale()}if(b==a1&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient}return this.attrs[b]}if(bH==null&&aG.is(b,a4)){var bJ={};for(var E=0,S=b.length;E<S;E++){bJ[b[E]]=this.attr(b[E])}return bJ}if(bH!=null){var d={};d[b]=bH}else{if(b!=null&&aG.is(b,"object")){d=b}}for(var bI in this.paper.customAttributes){if(this.paper.customAttributes[af](bI)&&d[af](bI)&&aG.is(this.paper.customAttributes[bI],"function")){var bF=this.paper.customAttributes[bI].apply(this,[][bt](d[bI]));this.attrs[bI]=d[bI];for(var e in bF){if(bF[af](e)){d[e]=bF[e]}}}}am(this,d);return this};aR[bC].toFront=function(){if(this.removed){return this}this.node.parentNode[bh](this.node);var b=this.paper;b.top!=this&&ak(this,b);return this};aR[bC].toBack=function(){if(this.removed){return this}if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);o(this,this.paper);var b=this.paper}return this};aR[bC].insertAfter=function(b){if(this.removed){return this}var d=b.node||b[b.length-1].node;if(d.nextSibling){d.parentNode.insertBefore(this.node,d.nextSibling)}else{d.parentNode[bh](this.node)}I(this,b,this.paper);return this};aR[bC].insertBefore=function(b){if(this.removed){return this}var d=b.node||b[0].node;d.parentNode.insertBefore(this.node,d);aJ(this,b,this.paper);return this};aR[bC].blur=function(d){var b=this;if(+d!==0){var e=be("filter"),i=be("feGaussianBlur");b.attrs.blur=d;e.id="r"+(aG._id++)[aX](36);be(i,{stdDeviation:+d||1.5});e.appendChild(i);b.paper.defs.appendChild(e);b._blur=e;be(b.node,{filter:"url(#"+e.id+")"})}else{if(b._blur){b._blur.parentNode.removeChild(b._blur);delete b._blur;delete b.attrs.blur}b.node.removeAttribute("filter")}};var ad=function(d,b,R,E){var i=be("circle");d.canvas&&d.canvas[bh](i);var e=new aR(i,d);e.attrs={cx:b,cy:R,r:E,fill:"none",stroke:"#000"};e.type="circle";be(i,e.attrs);return e},a8=function(e,b,bF,d,R,S){var E=be("rect");e.canvas&&e.canvas[bh](E);var i=new aR(E,e);i.attrs={x:b,y:bF,width:d,height:R,r:S||0,rx:S||0,ry:S||0,fill:"none",stroke:"#000"};i.type="rect";be(E,i.attrs);return i},ax=function(d,b,S,R,E){var i=be("ellipse");d.canvas&&d.canvas[bh](i);var e=new aR(i,d);e.attrs={cx:b,cy:S,rx:R,ry:E,fill:"none",stroke:"#000"};e.type="ellipse";be(i,e.attrs);return e},u=function(e,S,b,bF,d,R){var E=be("image");be(E,{x:b,y:bF,width:d,height:R,preserveAspectRatio:"none"});E.setAttributeNS(e.xlink,"href",S);e.canvas&&e.canvas[bh](E);var i=new aR(E,e);i.attrs={x:b,y:bF,width:d,height:R,src:S};i.type="image";return i},aj=function(d,b,R,E){var i=be("text");be(i,{x:b,y:R,"text-anchor":"middle"});d.canvas&&d.canvas[bh](i);var e=new aR(i,d);e.attrs={x:b,y:R,"text-anchor":"middle",text:E,font:p.font,stroke:"none",fill:"#000"};e.type="text";am(e,e.attrs);return e},by=function(d,b){this.width=d||this.width;this.height=b||this.height;this.canvas[C]("width",this.width);this.canvas[C]("height",this.height);return this},D=function(){var i=aH[bz](0,arguments),e=i&&i.container,d=i.x,S=i.y,E=i.width,b=i.height;if(!e){throw new Error("SVG container not found.")}var R=be("svg");d=d||0;S=S||0;E=E||512;b=b||342;be(R,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:E,height:b});if(e==1){R.style.cssText="position:absolute;left:"+d+"px;top:"+S+"px";Z.body[bh](R)}else{if(e.firstChild){e.insertBefore(R,e.firstChild)}else{e[bh](R)}}e=new bw;e.width=E;e.height=b;e.canvas=R;bb.call(e,e,aG.fn);e.clear();return e};aW.clear=function(){var b=this.canvas;while(b.firstChild){b.removeChild(b.firstChild)}this.bottom=this.top=null;(this.desc=be("desc"))[bh](Z.createTextNode("Created with Rapha\xebl"));b[bh](this.desc);b[bh](this.defs=be("defs"))};aW.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]=y(b)}}}if(aG.vml){var M={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},aK=/([clmz]),?([^clmz]*)/gi,bu=/ progid:\S+Blur\([^\)]+\)/g,bD=/-?[^,\s-]+/g,aU=1000+aF+1000,t=10,s={path:1,rect:1},bd=function(bJ){var bG=/[ahqstv]/ig,e=x;bA(bJ).match(bG)&&(e=U);bG=/[clmz]/g;if(e==x&&!bA(bJ).match(bG)){var bF=bA(bJ)[bp](aK,function(bM,bO,bK){var bN=[],i=bE.call(bO)=="m",bL=M[bO];bK[bp](bD,function(bP){if(i&&bN[r]==2){bL+=bN+M[bO=="m"?"l":"L"];bN=[]}bN[j](ac(bP*t))});return bL+bN});return bF}var bH=e(bJ),d,b;bF=[];for(var R=0,bI=bH[r];R<bI;R++){d=bH[R];b=bE.call(bH[R][0]);b=="z"&&(b="x");for(var E=1,S=d[r];E<S;E++){b+=ac(d[E]*t)+(E!=S-1?",":aM)}bF[j](b)}return bF[aT](aF)};aG[aX]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl "+this.version};w=function(e,d){var R=aw("group");R.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";R.coordsize=d.coordsize;R.coordorigin=d.coordorigin;var E=aw("shape"),i=E.style;i.width=d.width+"px";i.height=d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;R[bh](E);var S=new aR(E,R,d),b={fill:"none",stroke:"#000"};e&&(b.path=e);S.type="path";S.path=[];S.Path=aM;am(S,b);d.canvas[bh](R);return S};am=function(bH,bO){bH.attrs=bH.attrs||{};var bL=bH.node,bP=bH.attrs,S=bL.style,i,bN=(bO.x!=bP.x||bO.y!=bP.y||bO.width!=bP.width||bO.height!=bP.height||bO.r!=bP.r)&&bH.type=="rect",bT=bH;for(var bF in bO){if(bO[af](bF)){bP[bF]=bO[bF]}}if(bN){bP.path=aq(bP.x,bP.y,bP.width,bP.height,bP.r);bH.X=bP.x;bH.Y=bP.y;bH.W=bP.width;bH.H=bP.height}bO.href&&(bL.href=bO.href);bO.title&&(bL.title=bO.title);bO.target&&(bL.target=bO.target);bO.cursor&&(S.cursor=bO.cursor);"blur" in bO&&bH.blur(bO.blur);if(bO.path&&bH.type=="path"||bN){bL.path=bd(bP.path)}if(bO.rotation!=null){bH.rotate(bO.rotation,true)}if(bO.translation){i=bA(bO.translation)[H](a);z.call(bH,i[0],i[1]);if(bH._.rt.cx!=null){bH._.rt.cx+=+i[0];bH._.rt.cy+=+i[1];bH.setBox(bH.attrs,i[0],i[1])}}if(bO.scale){i=bA(bO.scale)[H](a);bH.scale(+i[0]||1,+i[1]||+i[0]||1,+i[2]||null,+i[3]||null)}if("clip-rect" in bO){var b=bA(bO["clip-rect"])[H](a);if(b[r]==4){b[2]=+b[2]+(+b[0]);b[3]=+b[3]+(+b[1]);var bG=bL.clipRect||Z.createElement("div"),bS=bG.style,R=bL.parentNode;bS.clip=aG.format("rect({1}px {2}px {3}px {0}px)",b);if(!bL.clipRect){bS.position="absolute";bS.top=0;bS.left=0;bS.width=bH.paper.width+"px";bS.height=bH.paper.height+"px";R.parentNode.insertBefore(bG,R);bG[bh](R);bL.clipRect=bG}}if(!bO["clip-rect"]){bL.clipRect&&(bL.clipRect.style.clip=aM)}}if(bH.type=="image"&&bO.src){bL.src=bO.src}if(bH.type=="image"&&bO.opacity){bL.filterOpacity=a2+".Alpha(opacity="+(bO.opacity*100)+")";S.filter=(bL.filterMatrix||aM)+(bL.filterOpacity||aM)}bO.font&&(S.font=bO.font);bO["font-family"]&&(S.fontFamily='"'+bO["font-family"][H](",")[0][bp](/^['"]+|['"]+$/g,aM)+'"');bO["font-size"]&&(S.fontSize=bO["font-size"]);bO["font-weight"]&&(S.fontWeight=bO["font-weight"]);bO["font-style"]&&(S.fontStyle=bO["font-style"]);if(bO.opacity!=null||bO["stroke-width"]!=null||bO.fill!=null||bO.stroke!=null||bO["stroke-width"]!=null||bO["stroke-opacity"]!=null||bO["fill-opacity"]!=null||bO["stroke-dasharray"]!=null||bO["stroke-miterlimit"]!=null||bO["stroke-linejoin"]!=null||bO["stroke-linecap"]!=null){bL=bH.shape||bL;var bM=(bL.getElementsByTagName(a1)&&bL.getElementsByTagName(a1)[0]),bQ=false;!bM&&(bQ=bM=aw(a1));if("fill-opacity" in bO||"opacity" in bO){var d=((+bP["fill-opacity"]+1||2)-1)*((+bP.opacity+1||2)-1)*((+aG.getRGB(bO.fill).o+1||2)-1);d=bf(l(d,0),1);bM.opacity=d}bO.fill&&(bM.on=true);if(bM.on==null||bO.fill=="none"){bM.on=false}if(bM.on&&bO.fill){var e=bO.fill.match(h);if(e){bM.src=e[1];bM.type="tile"}else{bM.color=aG.getRGB(bO.fill).hex;bM.src=aM;bM.type="solid";if(aG.getRGB(bO.fill).error&&(bT.type in {circle:1,ellipse:1}||bA(bO.fill).charAt()!="r")&&g(bT,bO.fill)){bP.fill="none";bP.gradient=bO.fill}}}bQ&&bL[bh](bM);var E=(bL.getElementsByTagName("stroke")&&bL.getElementsByTagName("stroke")[0]),bR=false;!E&&(bR=E=aw("stroke"));if((bO.stroke&&bO.stroke!="none")||bO["stroke-width"]||bO["stroke-opacity"]!=null||bO["stroke-dasharray"]||bO["stroke-miterlimit"]||bO["stroke-linejoin"]||bO["stroke-linecap"]){E.on=true}(bO.stroke=="none"||E.on==null||bO.stroke==0||bO["stroke-width"]==0)&&(E.on=false);var bK=aG.getRGB(bO.stroke);E.on&&bO.stroke&&(E.color=bK.hex);d=((+bP["stroke-opacity"]+1||2)-1)*((+bP.opacity+1||2)-1)*((+bK.o+1||2)-1);var bI=(ai(bO["stroke-width"])||1)*0.75;d=bf(l(d,0),1);bO["stroke-width"]==null&&(bI=bP["stroke-width"]);bO["stroke-width"]&&(E.weight=bI);bI&&bI<1&&(d*=bI)&&(E.weight=1);E.opacity=d;bO["stroke-linejoin"]&&(E.joinstyle=bO["stroke-linejoin"]||"miter");E.miterlimit=bO["stroke-miterlimit"]||8;bO["stroke-linecap"]&&(E.endcap=bO["stroke-linecap"]=="butt"?"flat":bO["stroke-linecap"]=="square"?"square":"round");if(bO["stroke-dasharray"]){var bJ={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};E.dashstyle=bJ[af](bO["stroke-dasharray"])?bJ[bO["stroke-dasharray"]]:aM}bR&&bL[bh](E)}if(bT.type=="text"){S=bT.paper.span.style;bP.font&&(S.font=bP.font);bP["font-family"]&&(S.fontFamily=bP["font-family"]);bP["font-size"]&&(S.fontSize=bP["font-size"]);bP["font-weight"]&&(S.fontWeight=bP["font-weight"]);bP["font-style"]&&(S.fontStyle=bP["font-style"]);bT.node.string&&(bT.paper.span.innerHTML=bA(bT.node.string)[bp](/</g,"&#60;")[bp](/&/g,"&#38;")[bp](/\n/g,"<br>"));bT.W=bP.w=bT.paper.span.offsetWidth;bT.H=bP.h=bT.paper.span.offsetHeight;bT.X=bP.x;bT.Y=bP.y+ac(bT.H/2);switch(bP["text-anchor"]){case"start":bT.node.style["v-text-align"]="left";bT.bbx=ac(bT.W/2);break;case"end":bT.node.style["v-text-align"]="right";bT.bbx=-ac(bT.W/2);break;default:bT.node.style["v-text-align"]="center";break}}};g=function(b,bF){b.attrs=b.attrs||{};var bG=b.attrs,bI,R="linear",S=".5 .5";b.attrs.gradient=bF;bF=bA(bF)[bp](aL,function(bK,bL,i){R="radial";if(bL&&i){bL=ai(bL);i=ai(i);bi(bL-0.5,2)+bi(i-0.5,2)>0.25&&(i=an.sqrt(0.25-bi(bL-0.5,2))*((i>0.5)*2-1)+0.5);S=bL+aF+i}return aM});bF=bF[H](/\s*\-\s*/);if(R=="linear"){var d=bF.shift();d=-ai(d);if(isNaN(d)){return null}}var E=v(bF);if(!E){return null}b=b.shape||b.node;bI=b.getElementsByTagName(a1)[0]||aw(a1);!bI.parentNode&&b.appendChild(bI);if(E[r]){bI.on=true;bI.method="none";bI.color=E[0].color;bI.color2=E[E[r]-1].color;var bJ=[];for(var e=0,bH=E[r];e<bH;e++){E[e].offset&&bJ[j](E[e].offset+aF+E[e].color)}bI.colors&&(bI.colors.value=bJ[r]?bJ[aT]():"0% "+bI.color);if(R=="radial"){bI.type="gradientradial";bI.focus="100%";bI.focussize=S;bI.focusposition=S}else{bI.type="gradient";bI.angle=(270-d)%360}}return 1};aR=function(E,S,b){var R=0,e=0,d=0,i=1;this[0]=E;this.id=aG._oid++;this.node=E;E.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=S;this.paper=b;this._={tx:0,ty:0,rt:{deg: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};a9=aR[bC];a9.rotate=function(d,b,e){if(this.removed){return this}if(d==null){if(this._.rt.cx){return[this._.rt.deg,this._.rt.cx,this._.rt.cy][aT](aF)}return this._.rt.deg}d=bA(d)[H](a);if(d[r]-1){b=ai(d[1]);e=ai(d[2])}d=ai(d[0]);if(b!=null){this._.rt.deg=d}else{this._.rt.deg+=d}e==null&&(b=null);this._.rt.cx=b;this._.rt.cy=e;this.setBox(this.attrs,b,e);this.Group.style.rotation=this._.rt.deg;return this};a9.setBox=function(E,R,e){if(this.removed){return this}var b=this.Group.style,S=(this.shape&&this.shape.style)||this.node.style;E=E||{};for(var bF in E){if(E[af](bF)){this.attrs[bF]=E[bF]}}R=R||this._.rt.cx;e=e||this._.rt.cy;var bI=this.attrs,bL,bK,bM,bH;switch(this.type){case"circle":bL=bI.cx-bI.r;bK=bI.cy-bI.r;bM=bH=bI.r*2;break;case"ellipse":bL=bI.cx-bI.rx;bK=bI.cy-bI.ry;bM=bI.rx*2;bH=bI.ry*2;break;case"image":bL=+bI.x;bK=+bI.y;bM=bI.width||0;bH=bI.height||0;break;case"text":this.textpath.v=["m",ac(bI.x),", ",ac(bI.y-2),"l",ac(bI.x)+1,", ",ac(bI.y-2)][aT](aM);bL=bI.x-ac(this.W/2);bK=bI.y-this.H/2;bM=this.W;bH=this.H;break;case"rect":case"path":if(!this.attrs.path){bL=0;bK=0;bM=this.paper.width;bH=this.paper.height}else{var bG=ah(this.attrs.path);bL=bG.x;bK=bG.y;bM=bG.width;bH=bG.height}break;default:bL=0;bK=0;bM=this.paper.width;bH=this.paper.height;break}R=(R==null)?bL+bM/2:R;e=(e==null)?bK+bH/2:e;var d=R-this.paper.width/2,bJ=e-this.paper.height/2,bN;b.left!=(bN=d+"px")&&(b.left=bN);b.top!=(bN=bJ+"px")&&(b.top=bN);this.X=s[af](this.type)?-d:bL;this.Y=s[af](this.type)?-bJ:bK;this.W=bM;this.H=bH;if(s[af](this.type)){S.left!=(bN=-d*t+"px")&&(S.left=bN);S.top!=(bN=-bJ*t+"px")&&(S.top=bN)}else{if(this.type=="text"){S.left!=(bN=-d+"px")&&(S.left=bN);S.top!=(bN=-bJ+"px")&&(S.top=bN)}else{b.width!=(bN=this.paper.width+"px")&&(b.width=bN);b.height!=(bN=this.paper.height+"px")&&(b.height=bN);S.left!=(bN=bL-d+"px")&&(S.left=bN);S.top!=(bN=bK-bJ+"px")&&(S.top=bN);S.width!=(bN=bM+"px")&&(S.width=bN);S.height!=(bN=bH+"px")&&(S.height=bN)}}};a9.hide=function(){!this.removed&&(this.Group.style.display="none");return this};a9.show=function(){!this.removed&&(this.Group.style.display="block");return this};a9.getBBox=function(){if(this.removed){return this}if(s[af](this.type)){return ah(this.attrs.path)}return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};a9.remove=function(){if(this.removed){return}aC(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 b in this){delete this[b]}this.removed=true};a9.attr=function(b,bF){if(this.removed){return this}if(b==null){var S={};for(var E in this.attrs){if(this.attrs[af](E)){S[E]=this.attrs[E]}}this._.rt.deg&&(S.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(S.scale=this.scale());S.gradient&&S.fill=="none"&&(S.fill=S.gradient)&&delete S.gradient;return S}if(bF==null&&aG.is(b,"string")){if(b=="translation"){return z.call(this)}if(b=="rotation"){return this.rotate()}if(b=="scale"){return this.scale()}if(b==a1&&this.attrs.fill=="none"&&this.attrs.gradient){return this.attrs.gradient}return this.attrs[b]}if(this.attrs&&bF==null&&aG.is(b,a4)){var bI,bH={};for(E=0,bI=b[r];E<bI;E++){bH[b[E]]=this.attr(b[E])}return bH}var d;if(bF!=null){d={};d[b]=bF}bF==null&&aG.is(b,"object")&&(d=b);if(d){for(var bG in this.paper.customAttributes){if(this.paper.customAttributes[af](bG)&&d[af](bG)&&aG.is(this.paper.customAttributes[bG],"function")){var R=this.paper.customAttributes[bG].apply(this,[][bt](d[bG]));this.attrs[bG]=d[bG];for(var e in R){if(R[af](e)){d[e]=R[e]}}}}if(d.text&&this.type=="text"){this.node.string=d.text}am(this,d);if(d.gradient&&(({circle:1,ellipse:1})[af](this.type)||bA(d.gradient).charAt()!="r")){g(this,d.gradient)}(!s[af](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this};a9.toFront=function(){!this.removed&&this.Group.parentNode[bh](this.Group);this.paper.top!=this&&ak(this,this.paper);return this};a9.toBack=function(){if(this.removed){return this}if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);o(this,this.paper)}return this};a9.insertAfter=function(b){if(this.removed){return this}if(b.constructor==ag){b=b[b.length-1]}if(b.Group.nextSibling){b.Group.parentNode.insertBefore(this.Group,b.Group.nextSibling)}else{b.Group.parentNode[bh](this.Group)}I(this,b,this.paper);return this};a9.insertBefore=function(b){if(this.removed){return this}if(b.constructor==ag){b=b[0]}b.Group.parentNode.insertBefore(this.Group,b.Group);aJ(this,b,this.paper);return this};a9.blur=function(b){var d=this.node.runtimeStyle,e=d.filter;e=e.replace(bu,aM);if(+b!==0){this.attrs.blur=b;d.filter=e+aF+a2+".Blur(pixelradius="+(+b||1.5)+")";d.margin=aG.format("-{0}px 0 0 -{0}px",ac(+b||1.5))}else{d.filter=e;d.margin=0;delete this.attrs.blur}};ad=function(d,b,bF,R){var E=aw("group"),S=aw("oval"),e=S.style;E.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;E[bh](S);var i=new aR(S,E,d);i.type="circle";am(i,{stroke:"#000",fill:"none"});i.attrs.cx=b;i.attrs.cy=bF;i.attrs.r=R;i.setBox({x:b-R,y:bF-R,width:R*2,height:R*2});d.canvas[bh](E);return i};function aq(b,E,d,e,i){if(i){return aG.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",b+i,E,d-i*2,i,-i,e-i*2,i*2-d,i*2-e)}else{return aG.format("M{0},{1}l{2},0,0,{3},{4},0z",b,E,d,e,-d)}}a8=function(d,S,E,bF,e,b){var bG=aq(S,E,bF,e,b),i=d.path(bG),R=i.attrs;i.X=R.x=S;i.Y=R.y=E;i.W=R.width=bF;i.H=R.height=e;R.r=b;R.path=bG;i.type="rect";return i};ax=function(b,bG,bF,e,d){var E=aw("group"),i=aw("oval"),S=i.style;E.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px";E.coordsize=aU;E.coordorigin=b.coordorigin;E[bh](i);var R=new aR(i,E,b);R.type="ellipse";am(R,{stroke:"#000"});R.attrs.cx=bG;R.attrs.cy=bF;R.attrs.rx=e;R.attrs.ry=d;R.setBox({x:bG-e,y:bF-d,width:e*2,height:d*2});b.canvas[bh](E);return R};u=function(d,b,bF,S,bG,i){var E=aw("group"),e=aw("image");E.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;e.src=b;E[bh](e);var R=new aR(e,E,d);R.type="image";R.attrs.src=b;R.attrs.x=bF;R.attrs.y=S;R.attrs.w=bG;R.attrs.h=i;R.setBox({x:bF,y:S,width:bG,height:i});d.canvas[bh](E);return R};aj=function(d,bG,bF,bH){var E=aw("group"),i=aw("shape"),S=i.style,bI=aw("path"),b=bI.style,e=aw("textpath");E.style.cssText="position:absolute;left:0;top:0;width:"+d.width+"px;height:"+d.height+"px";E.coordsize=aU;E.coordorigin=d.coordorigin;bI.v=aG.format("m{0},{1}l{2},{1}",ac(bG*10),ac(bF*10),ac(bG*10)+1);bI.textpathok=true;S.width=d.width;S.height=d.height;e.string=bA(bH);e.on=true;i[bh](e);i[bh](bI);E[bh](i);var R=new aR(e,E,d);R.shape=i;R.textpath=bI;R.type="text";R.attrs.text=bH;R.attrs.x=bG;R.attrs.y=bF;R.attrs.w=1;R.attrs.h=1;am(R,{font:p.font,stroke:"none",fill:"#000"});R.setBox();d.canvas[bh](E);return R};by=function(e,b){var d=this.canvas.style;e==+e&&(e+="px");b==+b&&(b+="px");d.width=e;d.height=b;d.clip="rect(0 "+e+" "+b+" 0)";return this};var aw;Z.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!Z.namespaces.rvml&&Z.namespaces.add("rvml","urn:schemas-microsoft-com:vml");aw=function(b){return Z.createElement("<rvml:"+b+' class="rvml">')}}catch(au){aw=function(b){return Z.createElement("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}D=function(){var e=aH[bz](0,arguments),b=e.container,bG=e.height,bH,d=e.width,bF=e.x,S=e.y;if(!b){throw new Error("VML container not found.")}var E=new bw,R=E.canvas=Z.createElement("div"),i=R.style;bF=bF||0;S=S||0;d=d||512;bG=bG||342;d==+d&&(d+="px");bG==+bG&&(bG+="px");E.width=1000;E.height=1000;E.coordsize=t*1000+aF+t*1000;E.coordorigin="0 0";E.span=Z.createElement("span");E.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";R[bh](E.span);i.cssText=aG.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",d,bG);if(b==1){Z.body[bh](R);i.left=bF+"px";i.top=S+"px";i.position="absolute"}else{if(b.firstChild){b.insertBefore(R,b.firstChild)}else{b[bh](R)}}bb.call(E,E,aG.fn);return E};aW.clear=function(){this.canvas.innerHTML=aM;this.span=Z.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[bh](this.span);this.bottom=this.top=null};aW.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var b in this){this[b]=y(b)}return true}}var T=navigator.userAgent.match(/Version\/(.*?)\s/);if((navigator.vendor=="Apple Computer, Inc.")&&(T&&T[1]<4||navigator.platform.slice(0,2)=="iP")){aW.safari=function(){var b=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});aN.setTimeout(function(){b.remove()})}}else{aW.safari=function(){}}var N=function(){this.returnValue=false},bs=function(){return this.originalEvent.preventDefault()},a0=function(){this.cancelBubble=true},aB=function(){return this.originalEvent.stopPropagation()},at=(function(){if(Z.addEventListener){return function(R,i,e,d){var b=V&&bn[i]?bn[i]:i;var E=function(bH){if(V&&bn[af](i)){for(var bF=0,bG=bH.targetTouches&&bH.targetTouches.length;bF<bG;bF++){if(bH.targetTouches[bF].target==R){var S=bH;bH=bH.targetTouches[bF];bH.originalEvent=S;bH.preventDefault=bs;bH.stopPropagation=aB;break}}}return e.call(d,bH)};R.addEventListener(b,E,false);return function(){R.removeEventListener(b,E,false);return true}}}else{if(Z.attachEvent){return function(R,i,e,d){var E=function(S){S=S||aN.event;S.preventDefault=S.preventDefault||N;S.stopPropagation=S.stopPropagation||a0;return e.call(d,S)};R.attachEvent("on"+i,E);var b=function(){R.detachEvent("on"+i,E);return true};return b}}}})(),a5=[],bo=function(S){var bG=S.clientX,bF=S.clientY,bH=Z.documentElement.scrollTop||Z.body.scrollTop,bI=Z.documentElement.scrollLeft||Z.body.scrollLeft,b,d=a5.length;while(d--){b=a5[d];if(V){var R=S.touches.length,E;while(R--){E=S.touches[R];if(E.identifier==b.el._drag.id){bG=E.clientX;bF=E.clientY;(S.originalEvent?S.originalEvent:S).preventDefault();break}}}else{S.preventDefault()}bG+=bI;bF+=bH;b.move&&b.move.call(b.el,bG-b.el._drag.x,bF-b.el._drag.y,bG,bF)}},f=function(){aG.unmousemove(bo).unmouseup(f);var d=a5.length,b;while(d--){b=a5[d];b.el._drag={};b.end&&b.end.call(b.el)}a5=[]};for(var ap=P[r];ap--;){(function(b){aG[b]=aR[bC][b]=function(d){if(aG.is(d,"function")){this.events=this.events||[];this.events.push({name:b,f:d,unbind:at(this.shape||this.node||Z,b,d,this)})}return this};aG["un"+b]=aR[bC]["un"+b]=function(i){var e=this.events,d=e[r];while(d--){if(e[d].name==b&&e[d].f==i){e[d].unbind();e.splice(d,1);!e.length&&delete this.events;return this}}return this}})(P[ap])}a9.hover=function(d,b){return this.mouseover(d).mouseout(b)};a9.unhover=function(d,b){return this.unmouseover(d).unmouseout(b)};a9.drag=function(b,e,d){this._drag={};this.mousedown(function(E){(E.originalEvent||E).preventDefault();var i=Z.documentElement.scrollTop||Z.body.scrollTop,R=Z.documentElement.scrollLeft||Z.body.scrollLeft;this._drag.x=E.clientX+R;this._drag.y=E.clientY+i;this._drag.id=E.identifier;e&&e.call(this,E.clientX+R,E.clientY+i);!a5.length&&aG.mousemove(bo).mouseup(f);a5.push({el:this,move:b,end:d})});return this};a9.undrag=function(b,E,e){var d=a5.length;while(d--){a5[d].el==this&&(a5[d].move==b&&a5[d].end==e)&&a5.splice(d,1);!a5.length&&aG.unmousemove(bo).unmouseup(f)}};aW.circle=function(b,e,d){return ad(this,b||0,e||0,d||0)};aW.rect=function(b,E,d,e,i){return a8(this,b||0,E||0,d||0,e||0,i||0)};aW.ellipse=function(b,i,e,d){return ax(this,b||0,i||0,e||0,d||0)};aW.path=function(b){b&&!aG.is(b,ae)&&!aG.is(b[0],a4)&&(b+=aM);return w(aG.format[bz](aG,arguments),this)};aW.image=function(i,b,E,d,e){return u(this,i||"about:blank",b||0,E||0,d||0,e||0)};aW.text=function(b,e,d){return aj(this,b||0,e||0,bA(d))};aW.set=function(b){arguments[r]>1&&(b=Array[bC].splice.call(arguments,0,arguments[r]));return new ag(b)};aW.setSize=by;aW.top=aW.bottom=null;aW.raphael=aG;function B(){return this.x+aF+this.y}a9.resetScale=function(){if(this.removed){return this}this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};a9.scale=function(bK,bJ,e,d){if(this.removed){return this}if(bK==null&&bJ==null){return{x:this._.sx,y:this._.sy,toString:B}}bJ=bJ||bK;!+bJ&&(bJ=bK);var bO,bM,bN,bL,b0=this.attrs;if(bK!=0){var bI=this.getBBox(),bF=bI.x+bI.width/2,E=bI.y+bI.height/2,bZ=bK/this._.sx,bY=bJ/this._.sy;e=(+e||e==0)?e:bF;d=(+d||d==0)?d:E;var bH=~~(bK/an.abs(bK)),S=~~(bJ/an.abs(bJ)),bR=this.node.style,b2=e+(bF-e)*bZ,b1=d+(E-d)*bY;switch(this.type){case"rect":case"image":var bG=b0.width*bH*bZ,bQ=b0.height*S*bY;this.attr({height:bQ,r:b0.r*bf(bH*bZ,S*bY),width:bG,x:b2-bG/2,y:b1-bQ/2});break;case"circle":case"ellipse":this.attr({rx:b0.rx*bH*bZ,ry:b0.ry*S*bY,r:b0.r*bf(bH*bZ,S*bY),cx:b2,cy:b1});break;case"text":this.attr({x:b2,y:b1});break;case"path":var bT=ar(b0.path),bU=true;for(var bW=0,bP=bT[r];bW<bP;bW++){var bS=bT[bW],R=bl.call(bS[0]);if(R=="M"&&bU){continue}else{bU=false}if(R=="A"){bS[bT[bW][r]-2]*=bZ;bS[bT[bW][r]-1]*=bY;bS[1]*=bH*bZ;bS[2]*=S*bY;bS[5]=+!(bH+S?!+bS[5]:+bS[5])}else{if(R=="H"){for(var bV=1,bX=bS[r];bV<bX;bV++){bS[bV]*=bZ}}else{if(R=="V"){for(bV=1,bX=bS[r];bV<bX;bV++){bS[bV]*=bY}}else{for(bV=1,bX=bS[r];bV<bX;bV++){bS[bV]*=(bV%2)?bZ:bY}}}}}var b=ah(bT);bO=b2-b.x-b.width/2;bM=b1-b.y-b.height/2;bT[0][1]+=bO;bT[0][2]+=bM;this.attr({path:bT});break}if(this.type in {text:1,image:1}&&(bH!=1||S!=1)){if(this.transformations){this.transformations[2]="scale("[bt](bH,",",S,")");this.node[C]("transform",this.transformations[aT](aF));bO=(bH==-1)?-b0.x-(bG||0):b0.x;bM=(S==-1)?-b0.y-(bQ||0):b0.y;this.attr({x:bO,y:bM});b0.fx=bH-1;b0.fy=S-1}else{this.node.filterMatrix=a2+".Matrix(M11="[bt](bH,", M12=0, M21=0, M22=",S,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");bR.filter=(this.node.filterMatrix||aM)+(this.node.filterOpacity||aM)}}else{if(this.transformations){this.transformations[2]=aM;this.node[C]("transform",this.transformations[aT](aF));b0.fx=0;b0.fy=0}else{this.node.filterMatrix=aM;bR.filter=(this.node.filterMatrix||aM)+(this.node.filterOpacity||aM)}}b0.scale=[bK,bJ,e,d][aT](aF);this._.sx=bK;this._.sy=bJ}return this};a9.clone=function(){if(this.removed){return null}var b=this.attr();delete b.scale;delete b.translation;return this.paper[this.type]().attr(b)};var aZ={},k=function(R,d,bH,bG,bN,bM,bL,bK,S){var bJ=0,E=[R,d,bH,bG,bN,bM,bL,bK].join(),b=aZ[E],bF,e;!b&&(aZ[E]=b={data:[]});b.timer&&clearTimeout(b.timer);b.timer=setTimeout(function(){delete aZ[E]},2000);for(var bI=0;bI<101;bI++){if(b.data[S]>bI){e=b.data[bI*100]}else{e=aG.findDotsAtSegment(R,d,bH,bG,bN,bM,bL,bK,bI/100);b.data[bI]=e}bI&&(bJ+=bi(bi(bF.x-e.x,2)+bi(bF.y-e.y,2),0.5));if(S!=null&&bJ>=S){return e}bF=e}if(S==null){return bJ}},aY=function(b,d){return function(bN,R,S){bN=U(bN);var bJ,bI,e,bF,E="",bM={},bK,bH=0;for(var bG=0,bL=bN.length;bG<bL;bG++){e=bN[bG];if(e[0]=="M"){bJ=+e[1];bI=+e[2]}else{bF=k(bJ,bI,e[1],e[2],e[3],e[4],e[5],e[6]);if(bH+bF>R){if(d&&!bM.start){bK=k(bJ,bI,e[1],e[2],e[3],e[4],e[5],e[6],R-bH);E+=["C",bK.start.x,bK.start.y,bK.m.x,bK.m.y,bK.x,bK.y];if(S){return E}bM.start=E;E=["M",bK.x,bK.y+"C",bK.n.x,bK.n.y,bK.end.x,bK.end.y,e[5],e[6]][aT]();bH+=bF;bJ=+e[5];bI=+e[6];continue}if(!b&&!d){bK=k(bJ,bI,e[1],e[2],e[3],e[4],e[5],e[6],R-bH);return{x:bK.x,y:bK.y,alpha:bK.alpha}}}bH+=bF;bJ=+e[5];bI=+e[6]}E+=e}bM.end=E;bK=b?bH:d?bM:aG.findDotsAtSegment(bJ,bI,e[1],e[2],e[3],e[4],e[5],e[6],1);bK.alpha&&(bK={x:bK.x,y:bK.y,alpha:bK.alpha});return bK}};var aI=aY(1),K=aY(),X=aY(0,1);a9.getTotalLength=function(){if(this.type!="path"){return}if(this.node.getTotalLength){return this.node.getTotalLength()}return aI(this.attrs.path)};a9.getPointAtLength=function(b){if(this.type!="path"){return}if(this.node.getPointAtLength){return this.node.getPointAtLength(b)}return K(this.attrs.path,b)};a9.getSubpath=function(e,d){if(this.type!="path"){return}if(an.abs(this.getTotalLength()-d)<"1e-6"){return X(this.attrs.path,e).end}var b=X(this.attrs.path,d,1);return e?X(b,e).end:b};aG.easing_formulas={linear:function(b){return b},"<":function(b){return bi(b,3)},">":function(b){return bi(b-1,3)+1},"<>":function(b){b=b*2;if(b<1){return bi(b,3)/2}b-=2;return(bi(b,3)+2)/2},backIn:function(d){var b=1.70158;return d*d*((b+1)*d-b)},backOut:function(d){d=d-1;var b=1.70158;return d*d*((b+1)*d+b)+1},elastic:function(e){if(e==0||e==1){return e}var d=0.3,b=d/4;return bi(2,-10*e)*an.sin((e-b)*(2*an.PI)/d)+1},bounce:function(i){var d=7.5625,e=2.75,b;if(i<(1/e)){b=d*i*i}else{if(i<(2/e)){i-=(1.5/e);b=d*i*i+0.75}else{if(i<(2.5/e)){i-=(2.25/e);b=d*i*i+0.9375}else{i-=(2.625/e);b=d*i*i+0.984375}}}return b}};var W=[],br=function(){var bG=+new Date;for(var bR=0;bR<W[r];bR++){var bW=W[bR];if(bW.stop||bW.el.removed){continue}var R=bG-bW.start,bO=bW.ms,bN=bW.easing,bS=bW.from,bL=bW.diff,d=bW.to,bK=bW.t,bF=bW.el,bM={},b;if(R<bO){var E=bN(R/bO);for(var bP in bS){if(bS[af](bP)){switch(al[bP]){case"along":b=E*bO*bL[bP];d.back&&(b=d.len-b);var bQ=K(d[bP],b);bF.translate(bL.sx-bL.x||0,bL.sy-bL.y||0);bL.x=bQ.x;bL.y=bQ.y;bF.translate(bQ.x-bL.sx,bQ.y-bL.sy);d.rot&&bF.rotate(bL.r+bQ.alpha,bQ.x,bQ.y);break;case aD:b=+bS[bP]+E*bO*bL[bP];break;case"colour":b="rgb("+[J(ac(bS[bP].r+E*bO*bL[bP].r)),J(ac(bS[bP].g+E*bO*bL[bP].g)),J(ac(bS[bP].b+E*bO*bL[bP].b))][aT](",")+")";break;case"path":b=[];for(var bU=0,bJ=bS[bP][r];bU<bJ;bU++){b[bU]=[bS[bP][bU][0]];for(var bT=1,bV=bS[bP][bU][r];bT<bV;bT++){b[bU][bT]=+bS[bP][bU][bT]+E*bO*bL[bP][bU][bT]}b[bU]=b[bU][aT](aF)}b=b[aT](aF);break;case"csv":switch(bP){case"translation":var bI=E*bO*bL[bP][0]-bK.x,bH=E*bO*bL[bP][1]-bK.y;bK.x+=bI;bK.y+=bH;b=bI+aF+bH;break;case"rotation":b=+bS[bP][0]+E*bO*bL[bP][0];bS[bP][1]&&(b+=","+bS[bP][1]+","+bS[bP][2]);break;case"scale":b=[+bS[bP][0]+E*bO*bL[bP][0],+bS[bP][1]+E*bO*bL[bP][1],(2 in d[bP]?d[bP][2]:aM),(3 in d[bP]?d[bP][3]:aM)][aT](aF);break;case"clip-rect":b=[];bU=4;while(bU--){b[bU]=+bS[bP][bU]+E*bO*bL[bP][bU]}break}break;default:var S=[].concat(bS[bP]);b=[];bU=bF.paper.customAttributes[bP].length;while(bU--){b[bU]=+S[bU]+E*bO*bL[bP][bU]}break}bM[bP]=b}}bF.attr(bM);bF._run&&bF._run.call(bF)}else{if(d.along){bQ=K(d.along,d.len*!d.back);bF.translate(bL.sx-(bL.x||0)+bQ.x-bL.sx,bL.sy-(bL.y||0)+bQ.y-bL.sy);d.rot&&bF.rotate(bL.r+bQ.alpha,bQ.x,bQ.y)}(bK.x||bK.y)&&bF.translate(-bK.x,-bK.y);d.scale&&(d.scale+=aM);bF.attr(d);W.splice(bR--,1)}}aG.svg&&bF&&bF.paper&&bF.paper.safari();W[r]&&setTimeout(br)},bv=function(b,e,R,E,i){var d=R-E;e.timeouts.push(setTimeout(function(){aG.is(i,"function")&&i.call(e);e.animate(b,d,b.easing)},E))},J=function(b){return l(bf(b,255),0)},z=function(b,e){if(b==null){return{x:this._.tx,y:this._.ty,toString:B}}this._.tx+=+b;this._.ty+=+e;switch(this.type){case"circle":case"ellipse":this.attr({cx:+b+this.attrs.cx,cy:+e+this.attrs.cy});break;case"rect":case"image":case"text":this.attr({x:+b+this.attrs.x,y:+e+this.attrs.y});break;case"path":var d=ar(this.attrs.path);d[0][1]+=+b;d[0][2]+=+e;this.attr({path:d});break}return this};a9.animateWith=function(e,R,b,bF,S){for(var d=0,E=W.length;d<E;d++){if(W[d].el.id==e.id){R.start=W[d].start}}return this.animate(R,b,bF,S)};a9.animateAlong=aS();a9.animateAlongBack=aS(1);function aS(b){return function(i,e,d,R){var E={back:b};aG.is(d,"function")?(R=d):(E.rot=d);i&&i.constructor==aR&&(i=i.attrs.path);i&&(E.along=i);return this.animate(E,e,R)}}function aV(bL,i,d,bK,bJ,bF){var bG=3*i,bI=3*(bK-i)-bG,b=1-bG-bI,S=3*d,bH=3*(bJ-d)-S,bM=1-S-bH;function R(bN){return((b*bN+bI)*bN+bG)*bN}function e(bN,bP){var bO=E(bN,bP);return((bM*bO+bH)*bO+S)*bO}function E(bN,bU){var bT,bS,bQ,bO,bR,bP;for(bQ=bN,bP=0;bP<8;bP++){bO=R(bQ)-bN;if(an.abs(bO)<bU){return bQ}bR=(3*b*bQ+2*bI)*bQ+bG;if(an.abs(bR)<0.000001){break}bQ=bQ-bO/bR}bT=0;bS=1;bQ=bN;if(bQ<bT){return bT}if(bQ>bS){return bS}while(bT<bS){bO=R(bQ);if(an.abs(bO-bN)<bU){return bQ}if(bN>bO){bT=bQ}else{bS=bQ}bQ=(bS-bT)/2+bT}return bQ}return e(bL,1/(200*bF))}a9.onAnimation=function(b){this._run=b||0;return this};a9.animate=function(bY,bO,bN,R){var d=this;d.timeouts=d.timeouts||[];if(aG.is(bN,"function")||!bN){R=bN||null}if(d.removed){R&&R.call(d);return d}var bS={},e={},S=false,bJ={};for(var bP in bY){if(bY[af](bP)){if(al[af](bP)||d.paper.customAttributes[af](bP)){S=true;bS[bP]=d.attr(bP);(bS[bP]==null)&&(bS[bP]=p[bP]);e[bP]=bY[bP];switch(al[bP]){case"along":var bW=aI(bY[bP]);var bQ=K(bY[bP],bW*!!bY.back);var bF=d.getBBox();bJ[bP]=bW/bO;bJ.tx=bF.x;bJ.ty=bF.y;bJ.sx=bQ.x;bJ.sy=bQ.y;e.rot=bY.rot;e.back=bY.back;e.len=bW;bY.rot&&(bJ.r=ai(d.rotate())||0);break;case aD:bJ[bP]=(e[bP]-bS[bP])/bO;break;case"colour":bS[bP]=aG.getRGB(bS[bP]);var bR=aG.getRGB(e[bP]);bJ[bP]={r:(bR.r-bS[bP].r)/bO,g:(bR.g-bS[bP].g)/bO,b:(bR.b-bS[bP].b)/bO};break;case"path":var bG=U(bS[bP],e[bP]);bS[bP]=bG[0];var bL=bG[1];bJ[bP]=[];for(var bV=0,bI=bS[bP][r];bV<bI;bV++){bJ[bP][bV]=[0];for(var bU=1,bX=bS[bP][bV][r];bU<bX;bU++){bJ[bP][bV][bU]=(bL[bV][bU]-bS[bP][bV][bU])/bO}}break;case"csv":var b=bA(bY[bP])[H](a),bH=bA(bS[bP])[H](a);switch(bP){case"translation":bS[bP]=[0,0];bJ[bP]=[b[0]/bO,b[1]/bO];break;case"rotation":bS[bP]=(bH[1]==b[1]&&bH[2]==b[2])?bH:[0,b[1],b[2]];bJ[bP]=[(b[0]-bS[bP][0])/bO,0,0];break;case"scale":bY[bP]=b;bS[bP]=bA(bS[bP])[H](a);bJ[bP]=[(b[0]-bS[bP][0])/bO,(b[1]-bS[bP][1])/bO,0,0];break;case"clip-rect":bS[bP]=bA(bS[bP])[H](a);bJ[bP]=[];bV=4;while(bV--){bJ[bP][bV]=(b[bV]-bS[bP][bV])/bO}break}e[bP]=b;break;default:b=[].concat(bY[bP]);bH=[].concat(bS[bP]);bJ[bP]=[];bV=d.paper.customAttributes[bP][r];while(bV--){bJ[bP][bV]=((b[bV]||0)-(bH[bV]||0))/bO}break}}}}if(!S){var bM=[],E;for(var bZ in bY){if(bY[af](bZ)&&bc.test(bZ)){bP={value:bY[bZ]};bZ=="from"&&(bZ=0);bZ=="to"&&(bZ=100);bP.key=Q(bZ,10);bM.push(bP)}}bM.sort(bj);if(bM[0].key){bM.unshift({key:0,value:d.attrs})}for(bV=0,bI=bM[r];bV<bI;bV++){bv(bM[bV].value,d,bO/100*bM[bV].key,bO/100*(bM[bV-1]&&bM[bV-1].key||0),bM[bV-1]&&bM[bV-1].value.callback)}E=bM[bM[r]-1].value.callback;if(E){d.timeouts.push(setTimeout(function(){E.call(d)},bO))}}else{var bT=aG.easing_formulas[bN];if(!bT){bT=bA(bN).match(c);if(bT&&bT[r]==5){var bK=bT;bT=function(i){return aV(i,+bK[1],+bK[2],+bK[3],+bK[4],bO)}}else{bT=function(i){return i}}}W.push({start:bY.start||+new Date,ms:bO,easing:bT,from:bS,diff:bJ,to:e,el:d,t:{x:0,y:0}});aG.is(R,"function")&&(d._ac=setTimeout(function(){R.call(d)},bO));W[r]==1&&setTimeout(br)}return this};a9.stop=function(){for(var b=0;b<W.length;b++){W[b].el.id==this.id&&W.splice(b--,1)}for(b=0,ii=this.timeouts&&this.timeouts.length;b<ii;b++){clearTimeout(this.timeouts[b])}this.timeouts=[];clearTimeout(this._ac);delete this._ac;return this};a9.translate=function(b,d){return this.attr({translation:b+" "+d})};a9[aX]=function(){return"Rapha\xebl\u2019s object"};aG.ae=W;var ag=function(b){this.items=[];this[r]=0;this.type="set";if(b){for(var d=0,e=b[r];d<e;d++){if(b[d]&&(b[d].constructor==aR||b[d].constructor==ag)){this[this.items[r]]=this.items[this.items[r]]=b[d];this[r]++}}}};ag[bC][j]=function(){var E,b;for(var d=0,e=arguments[r];d<e;d++){E=arguments[d];if(E&&(E.constructor==aR||E.constructor==ag)){b=this.items[r];this[b]=this.items[b]=E;this[r]++}}return this};ag[bC].pop=function(){delete this[this[r]--];return this.items.pop()};for(var G in a9){if(a9[af](G)){ag[bC][G]=(function(b){return function(){for(var d=0,e=this.items[r];d<e;d++){this.items[d][b][bz](this.items[d],arguments)}return this}})(G)}}ag[bC].attr=function(d,S){if(d&&aG.is(d,a4)&&aG.is(d[0],"object")){for(var b=0,R=d[r];b<R;b++){this.items[b].attr(d[b])}}else{for(var e=0,E=this.items[r];e<E;e++){this.items[e].attr(d,S)}}return this};ag[bC].animate=function(d,b,S,bG){(aG.is(S,"function")||!S)&&(bG=S||null);var R=this.items[r],e=R,bH,bF=this,E;bG&&(E=function(){!--R&&bG.call(bF)});S=aG.is(S,ae)?S:E;bH=this.items[--e].animate(d,b,S,E);while(e--){this.items[e]&&!this.items[e].removed&&this.items[e].animateWith(bH,d,b,S,E)}return this};ag[bC].insertAfter=function(d){var b=this.items[r];while(b--){this.items[b].insertAfter(d)}return this};ag[bC].getBBox=function(){var b=[],S=[],d=[],E=[];for(var e=this.items[r];e--;){var R=this.items[e].getBBox();b[j](R.x);S[j](R.y);d[j](R.x+R.width);E[j](R.y+R.height)}b=bf[bz](0,b);S=bf[bz](0,S);return{x:b,y:S,width:l[bz](0,d)-b,height:l[bz](0,E)-S}};ag[bC].clone=function(e){e=new ag;for(var b=0,d=this.items[r];b<d;b++){e[j](this.items[b].clone())}return e};aG.registerFont=function(d){if(!d.face){return d}this.fonts=this.fonts||{};var i={w:d.w,face:{},glyphs:{}},e=d.face["font-family"];for(var S in d.face){if(d.face[af](S)){i.face[S]=d.face[S]}}if(this.fonts[e]){this.fonts[e][j](i)}else{this.fonts[e]=[i]}if(!d.svg){i.face["units-per-em"]=Q(d.face["units-per-em"],10);for(var E in d.glyphs){if(d.glyphs[af](E)){var R=d.glyphs[E];i.glyphs[E]={w:R.w,k:{},d:R.d&&"M"+R.d[bp](/[mlcxtrv]/g,function(bF){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[bF]||"M"})+"z"};if(R.k){for(var b in R.k){if(R[af](b)){i.glyphs[E].k[b]=R.k[b]}}}}}}return d};aW.getFont=function(bG,bH,d,E){E=E||"normal";d=d||"normal";bH=+bH||{normal:400,bold:700,lighter:300,bolder:800}[bH]||400;if(!aG.fonts){return}var R=aG.fonts[bG];if(!R){var e=new RegExp("(^|\\s)"+bG[bp](/[^\w\d\s+!~.:_-]/g,aM)+"(\\s|$)","i");for(var b in aG.fonts){if(aG.fonts[af](b)){if(e.test(b)){R=aG.fonts[b];break}}}}var S;if(R){for(var bF=0,bI=R[r];bF<bI;bF++){S=R[bF];if(S.face["font-weight"]==bH&&(S.face["font-style"]==d||!S.face["font-style"])&&S.face["font-stretch"]==E){break}}}return S};aW.print=function(R,E,b,bG,bH,bQ,d){bQ=bQ||"middle";d=l(bf(d||0,1),-1);var bM=this.set(),bP=bA(b)[H](aM),bN=0,bK=aM,bR;aG.is(bG,b)&&(bG=this.getFont(bG));if(bG){bR=(bH||16)/bG.face["units-per-em"];var e=bG.face.bbox.split(a),bF=+e[0],bI=+e[1]+(bQ=="baseline"?e[3]-e[1]+(+bG.face.descent):(e[3]-e[1])/2);for(var bL=0,S=bP[r];bL<S;bL++){var bJ=bL&&bG.glyphs[bP[bL-1]]||{},bO=bG.glyphs[bP[bL]];bN+=bL?(bJ.w||bG.w)+(bJ.k&&bJ.k[bP[bL]]||0)+(bG.w*d):0;bO&&bO.d&&bM[j](this.path(bO.d).attr({fill:"#000",stroke:"none",translation:[bN,0]}))}bM.scale(bR,bR,bF,bI).translate(R-bF,E-bI)}return bM};aG.format=function(d,e){var b=aG.is(e,a4)?[0][bt](e):arguments;d&&aG.is(d,ae)&&b[r]-1&&(d=d[bp](bk,function(R,E){return b[++E]==null?aM:b[E]}));return d||aM};aG.ninja=function(){q.was?(aN.Raphael=q.is):delete Raphael;return aG};aG.el=a9;aG.st=ag[bC];q.was?(aN.Raphael=aG):(Raphael=aG)})();
\ No newline at end of file
+(function(){function a(){if(a.is(arguments[0],F)){var b=arguments[0],d=bU[m](a,b.splice(0,3+a.is(b[0],D))),e=d.set();for(var g=0,h=b[w];g<h;g++){var i=b[g]||{};c[f](i.type)&&e[K](d[i.type]().attr(i))}return e}return bU[m](a,arguments)}a.version="1.5.1";var b=/[, ]+/,c={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},d=/\{(\d+)\}/g,e="prototype",f="hasOwnProperty",g=document,h=window,i={was:Object[e][f].call(h,"Raphael"),is:h.Raphael},j=function(){this.customAttributes={}},k,l="appendChild",m="apply",n="concat",o="createTouch"in g,p="",q=" ",r=String,s="split",t="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[s](q),u={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},v="join",w="length",x=r[e].toLowerCase,y=Math,z=y.max,A=y.min,B=y.abs,C=y.pow,D="number",E="string",F="array",G="toString",H="fill",I=Object[e][G],J={},K="push",L=/^(?=[\da-f]$)/,M=/^url\(['"]?([^\)]+?)['"]?\)$/i,N=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+(?:\s*,\s*[\d\.]+)?)\s*\)|rgba?\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%(?:\s*,\s*[\d\.]+%)?)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i,O=/^(NaN|-?Infinity)$/,P=/^cubic-bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,Q=y.round,R="setAttribute",S=parseFloat,T=parseInt,U=" progid:DXImageTransform.Microsoft",V=r[e].toUpperCase,W={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,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,target:"_blank","text-anchor":"middle",title:"Raphael",translation:"0 0",width:0,x:0,y:0},X={along:"along",blur:D,"clip-rect":"csv",cx:D,cy:D,fill:"colour","fill-opacity":D,"font-size":D,height:D,opacity:D,path:"path",r:D,rotation:"csv",rx:D,ry:D,scale:"csv",stroke:"colour","stroke-opacity":D,"stroke-width":D,translation:"csv",width:D,x:D,y:D},Y="replace",Z=/,?([achlmqrstvxz]),?/gi,$=/\s*,\s*/,_={hs:1,rg:1},ba=/^(from|to|\d+%)$/,bb=/([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig,bc=/(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig,bd=function(a,b){return a.key-b.key};a.type=h.SVGAngle||g.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML";if(a.type=="VML"){var be=g.createElement("div"),bf;be.innerHTML="<v:shape adj=\"1\"/>";bf=be.firstChild;bf.style.behavior="url(#default#VML)";if(!(bf&&typeof bf.adj=="object"))return a.type=null;be=null}a.svg=!(a.vml=a.type=="VML");j[e]=a[e];k=j[e];a._id=0;a._oid=0;a.fn={};a.is=function(a,b){b=x.call(b);if(b=="finite")return!O.test(+a);return b=="null"&&a===null||b==typeof a||b=="object"&&a===Object(a)||b=="array"&&Array.isArray&&Array.isArray(a)||I.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((h<0)*180+y.atan(-i/-h)*180/y.PI+360)%360}return a.angle(b,c,f,g)-a.angle(d,e,f,g)}};a.snapTo=function(a,b,c){c=c||10;a=[][n](a);var d=a.length;while(d--)if(B(a[d]-b)<=c)return a[d];return b};a.setWindow=function(a){h=a;g=h.document};var bg=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(a){d=createPopup().document.body}var f=d.createTextRange();bg=bk(function(a){try{d.style.color=r(a)[Y](c,p);var b=f.queryCommandValue("ForeColor");b=(b&255)<<16|b&65280|(b&16711680)>>>16;return"#"+("000000"+b[G](16)).slice(-6)}catch(a){return"none"}})}else{var h=g.createElement("i");h.title="Rapha\u00ebl Colour Picker";h.style.display="none";g.body[l](h);bg=bk(function(a){h.style.color=a;return g.defaultView.getComputedStyle(h,p).getPropertyValue("color")})}return bg(b)},bh=function(){return"hsb("+[this.h,this.s,this.b]+")"},bi=function(){return"hsl("+[this.h,this.s,this.l]+")"},bj=function(){return this.hex};a.hsb2rgb=function(b,c,d){if(a.is(b,"object")&&"h"in b&&"s"in b&&"b"in b){d=b.b;c=b.s;b=b.h}return a.hsl2rgb(b,c,d/2)};a.hsl2rgb=function(b,c,d){if(a.is(b,"object")&&"h"in b&&"s"in b&&"l"in b){d=b.l;c=b.s;b=b.h}if(b>1||c>1||d>1){b/=360;c/=100;d/=100}var e={},f=["r","g","b"],g,h,i,j,k,l;if(!c)e={r:d,g:d,b:d};else{d<0.5?g=d*(1+c):g=d+c-d*c;h=2*d-g;for(var m=0,n=f.length;m<n;m++){i=b+1/3*-(m-1);i<0&&i++;i>1&&i--;i*6<1?e[f[m]]=h+(g-h)*6*i:i*2<1?e[f[m]]=g:i*3<2?e[f[m]]=h+(g-h)*(2/3-i)*6:e[f[m]]=h}}e.r*=255;e.g*=255;e.b*=255;j=(~(~e.r))[G](16);k=(~(~e.g))[G](16);l=(~(~e.b))[G](16);j=j[Y](L,"0");k=k[Y](L,"0");l=l[Y](L,"0");e.hex="#"+j+k+l;e.toString=bj;return e};a.rgb2hsb=function(b,c,d){if(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,E)){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}var f=z(b,c,d),g=A(b,c,d),h,i,j=f;{if(g==f)return{h:0,s:0,b:f,toString:bh};var k=f-g;i=k/f;b==f?h=(c-d)/k:c==f?h=2+(d-b)/k:h=4+(b-c)/k;h/=6;h<0&&h++;h>1&&h--}return{h:h,s:i,b:j,toString:bh}};a.rgb2hsl=function(b,c,d){if(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,E)){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}var f=z(b,c,d),g=A(b,c,d),h,i,j=(f+g)/2,k;if(g==f)k={h:0,s:0,l:j};else{var l=f-g;i=j<0.5?l/(f+g):l/(2-f-g);b==f?h=(c-d)/l:c==f?h=2+(d-b)/l:h=4+(b-c)/l;h/=6;h<0&&h++;h>1&&h--;k={h:h,s:i,l:j}}k.toString=bi;return k};a._path2string=function(){return this.join(",")[Y](Z,"$1")};function bk(a,b,c){function d(){var g=Array[e].slice.call(arguments,0),h=g[v]("\u25ba"),i=d.cache=d.cache||{},j=d.count=d.count||[];if(i[f](h))return c?c(i[h]):i[h];j[w]>=1000&&delete i[j.shift()];j[K](h);i[h]=a[m](b,g);return c?c(i[h]):i[h]}return d}a.getRGB=bk(function(b){if(!b||!(!((b=r(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"};!(_[f](b.substring(0,2))||b.charAt()=="#")&&(b=bg(b));var c,d,e,g,h,i,j=b.match(N);if(j){if(j[2]){g=T(j[2].substring(5),16);e=T(j[2].substring(3,5),16);d=T(j[2].substring(1,3),16)}if(j[3]){g=T((i=j[3].charAt(3))+i,16);e=T((i=j[3].charAt(2))+i,16);d=T((i=j[3].charAt(1))+i,16)}if(j[4]){j=j[4][s]($);d=S(j[0]);e=S(j[1]);g=S(j[2]);h=S(j[3])}if(j[5]){j=j[5][s]($);d=S(j[0])*2.55;e=S(j[1])*2.55;g=S(j[2])*2.55;h=S(j[3])}if(j[6]){j=j[6][s]($);d=S(j[0]);e=S(j[1]);g=S(j[2]);(j[0].slice(-3)=="deg"||j[0].slice(-1)=="\u00b0")&&(d/=360);return a.hsb2rgb(d,e,g)}if(j[7]){j=j[7][s]($);d=S(j[0])*2.55;e=S(j[1])*2.55;g=S(j[2])*2.55;(j[0].slice(-3)=="deg"||j[0].slice(-1)=="\u00b0")&&(d/=360*2.55);return a.hsb2rgb(d,e,g)}if(j[8]){j=j[8][s]($);d=S(j[0]);e=S(j[1]);g=S(j[2]);(j[0].slice(-3)=="deg"||j[0].slice(-1)=="\u00b0")&&(d/=360);return a.hsl2rgb(d,e,g)}if(j[9]){j=j[9][s]($);d=S(j[0])*2.55;e=S(j[1])*2.55;g=S(j[2])*2.55;(j[0].slice(-3)=="deg"||j[0].slice(-1)=="\u00b0")&&(d/=360*2.55);return a.hsl2rgb(d,e,g)}j={r:d,g:e,b:g};var k=(~(~d))[G](16),l=(~(~e))[G](16),m=(~(~g))[G](16);k=k[Y](L,"0");l=l[Y](L,"0");m=m[Y](L,"0");j.hex="#"+k+l+m;isFinite(S(h))&&(j.o=h);return j}return{r:-1,g:-1,b:-1,hex:"none",error:1}},a);a.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||0.75},c=this.hsb2rgb(b.h,b.s,b.b);b.h+=0.075;if(b.h>1){b.h=0;b.s-=0.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=bk(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,F)&&a.is(b[0],F)&&(d=bm(b));d[w]||r(b)[Y](bb,function(a,b,e){var f=[],g=x.call(b);e[Y](bc,function(a,b){b&&f[K](+b)});if(g=="m"&&f[w]>2){d[K]([b][n](f.splice(0,2)));g="l";b=b=="m"?"l":"L"}while(f[w]>=c[g]){d[K]([b][n](f.splice(0,c[g])));if(!c[g])break}});d[G]=a._path2string;return d});a.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=C(j,3)*a+C(j,2)*3*i*c+j*3*i*i*e+C(i,3)*g,l=C(j,3)*b+C(j,2)*3*i*d+j*3*i*i*f+C(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-y.atan((m-o)/(n-p))*180/y.PI;(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 bl=bk(function(a){if(!a)return{x:0,y:0,width:0,height:0};a=bu(a);var b=0,c=0,d=[],e=[],f;for(var g=0,h=a[w];g<h;g++){f=a[g];if(f[0]=="M"){b=f[1];c=f[2];d[K](b);e[K](c)}else{var i=bt(b,c,f[1],f[2],f[3],f[4],f[5],f[6]);d=d[n](i.min.x,i.max.x);e=e[n](i.min.y,i.max.y);b=f[5];c=f[6]}}var j=A[m](0,d),k=A[m](0,e);return{x:j,y:k,width:z[m](0,d)-j,height:z[m](0,e)-k}}),bm=function(b){var c=[];if(!a.is(b,F)||!a.is(b&&b[0],F))b=a.parsePathString(b);for(var d=0,e=b[w];d<e;d++){c[d]=[];for(var f=0,g=b[d][w];f<g;f++)c[d][f]=b[d][f]}c[G]=a._path2string;return c},bn=bk(function(b){if(!a.is(b,F)||!a.is(b&&b[0],F))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;if(b[0][0]=="M"){d=b[0][1];e=b[0][2];f=d;g=e;h++;c[K](["M",d,e])}for(var i=h,j=b[w];i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=x.call(l[0])){k[0]=x.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[w];m<n;m++)k[m]=+(l[m]-(m%2?d:e)).toFixed(3)}}else{k=c[i]=[];if(l[0]=="m"){f=l[1]+d;g=l[2]+e}for(var o=0,p=l[w];o<p;o++)c[i][o]=l[o]}var q=c[i][w];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[G]=a._path2string;return c},0,bm),bo=bk(function(b){if(!a.is(b,F)||!a.is(b&&b[0],F))b=a.parsePathString(b);var c=[],d=0,e=0,f=0,g=0,h=0;if(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[w];i<j;i++){var k=c[i]=[],l=b[i];if(l[0]!=V.call(l[0])){k[0]=V.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[w];m<n;m++)k[m]=+l[m]+(m%2?d:e)}}else for(var o=0,p=l[w];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][w]-2];g=c[i][c[i][w]-1];default:d=c[i][c[i][w]-2];e=c[i][c[i][w]-1]}}c[G]=a._path2string;return c},null,bm),bp=function(a,b,c,d){return[a,b,c,d,c,d]},bq=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]},br=function(a,b,c,d,e,f,g,h,i,j){var k=y.PI,l=k*120/180,m=k/180*(+e||0),o=[],p,q=bk(function(a,b,c){var d=a*y.cos(c)-b*y.sin(c),e=a*y.sin(c)+b*y.cos(c);return{x:d,y:e}});if(!j){p=q(a,b,-m);a=p.x;b=p.y;p=q(h,i,-m);h=p.x;i=p.y;var r=y.cos(k/180*e),t=y.sin(k/180*e),u=(a-h)/2,x=(b-i)/2,z=u*u/(c*c)+x*x/(d*d);if(z>1){z=y.sqrt(z);c=z*c;d=z*d}var A=c*c,C=d*d,D=(f==g?-1:1)*y.sqrt(B((A*C-A*x*x-C*u*u)/(A*x*x+C*u*u))),E=D*c*x/d+(a+h)/2,F=D*-d*u/c+(b+i)/2,G=y.asin(((b-F)/d).toFixed(9)),H=y.asin(((i-F)/d).toFixed(9));G=a<E?k-G:G;H=h<E?k-H:H;G<0&&(G=k*2+G);H<0&&(H=k*2+H);g&&G>H&&(G=G-k*2);!g&&H>G&&(H=H-k*2)}else{G=j[0];H=j[1];E=j[2];F=j[3]}var I=H-G;if(B(I)>l){var J=H,K=h,L=i;H=G+l*(g&&H>G?1:-1);h=E+c*y.cos(H);i=F+d*y.sin(H);o=br(h,i,c,d,e,0,g,K,L,[H,J,E,F])}I=H-G;var M=y.cos(G),N=y.sin(G),O=y.cos(H),P=y.sin(H),Q=y.tan(I/4),R=4/3*c*Q,S=4/3*d*Q,T=[a,b],U=[a+R*N,b-S*M],V=[h+R*P,i-S*O],W=[h,i];U[0]=2*T[0]-U[0];U[1]=2*T[1]-U[1];{if(j)return[U,V,W][n](o);o=[U,V,W][n](o)[v]()[s](",");var X=[];for(var Y=0,Z=o[w];Y<Z;Y++)X[Y]=Y%2?q(o[Y-1],o[Y],m).y:q(o[Y],o[Y+1],m).x;return X}},bs=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:C(j,3)*a+C(j,2)*3*i*c+j*3*i*i*e+C(i,3)*g,y:C(j,3)*b+C(j,2)*3*i*d+j*3*i*i*f+C(i,3)*h}},bt=bk(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,l=(-j+y.sqrt(j*j-4*i*k))/2/i,n=(-j-y.sqrt(j*j-4*i*k))/2/i,o=[b,h],p=[a,g],q;B(l)>"1e12"&&(l=0.5);B(n)>"1e12"&&(n=0.5);if(l>0&&l<1){q=bs(a,b,c,d,e,f,g,h,l);p[K](q.x);o[K](q.y)}if(n>0&&n<1){q=bs(a,b,c,d,e,f,g,h,n);p[K](q.x);o[K](q.y)}i=f-2*d+b-(h-2*f+d);j=2*(d-b)-2*(f-d);k=b-d;l=(-j+y.sqrt(j*j-4*i*k))/2/i;n=(-j-y.sqrt(j*j-4*i*k))/2/i;B(l)>"1e12"&&(l=0.5);B(n)>"1e12"&&(n=0.5);if(l>0&&l<1){q=bs(a,b,c,d,e,f,g,h,l);p[K](q.x);o[K](q.y)}if(n>0&&n<1){q=bs(a,b,c,d,e,f,g,h,n);p[K](q.x);o[K](q.y)}return{min:{x:A[m](0,p),y:A[m](0,o)},max:{x:z[m](0,p),y:z[m](0,o)}}}),bu=bk(function(a,b){var c=bo(a),d=b&&bo(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"][n](br[m](0,[b.x,b.y][n](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][n](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"][n](bq(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"][n](bq(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][n](bp(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][n](bp(b.x,b.y,a[1],b.y));break;case"V":a=["C"][n](bp(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][n](bp(b.x,b.y,b.X,b.Y));break}return a},h=function(a,b){if(a[b][w]>7){a[b].shift();var e=a[b];while(e[w])a.splice(b++,0,["C"][n](e.splice(0,6)));a.splice(b,1);k=z(c[w],d&&d[w]||0)}},i=function(a,b,e,f,g){if(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=z(c[w],d&&d[w]||0)}};for(var j=0,k=z(c[w],d&&d[w]||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 l=c[j],o=d&&d[j],p=l[w],q=d&&o[w];e.x=l[p-2];e.y=l[p-1];e.bx=S(l[p-4])||e.x;e.by=S(l[p-3])||e.y;f.bx=d&&(S(o[q-4])||f.x);f.by=d&&(S(o[q-3])||f.y);f.x=d&&o[q-2];f.y=d&&o[q-1]}return d?[c,d]:c},null,bm),bv=bk(function(b){var c=[];for(var d=0,e=b[w];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[K](f)}for(d=1,e=c[w]-1;d<e;d++){if(!c[d].offset){var h=S(c[d-1].offset||0),i=0;for(var j=d+1;j<e;j++){if(c[j].offset){i=c[j].offset;break}}if(!i){i=100;j=e}i=S(i);var k=(i-h)/(j-d+1);for(;d<j;d++){h+=k;c[d].offset=h+"%"}}}return c}),bw=function(b,c,d,e){var f;if(a.is(b,E)||a.is(b,"object")){f=a.is(b,E)?g.getElementById(b):b;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}}else return{container:1,x:b,y:c,width:d,height:e}},bx=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[m](c,arguments)}})(b[d]);break;case"object":a[d]=a[d]||{};bx.call(this,a[d],b[d]);break;default:a[d]=b[d];break}}},by=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)},bz=function(a,b){if(b.top===a)return;by(a,b);a.next=null;a.prev=b.top;b.top.next=a;b.top=a},bA=function(a,b){if(b.bottom===a)return;by(a,b);a.next=b.bottom;a.prev=null;b.bottom.prev=a;b.bottom=a},bB=function(a,b,c){by(a,c);b==c.top&&(c.top=a);b.next&&(b.next.prev=a);a.next=b.next;a.prev=b;b.next=a},bC=function(a,b,c){by(a,c);b==c.bottom&&(c.bottom=a);b.prev&&(b.prev.next=a);a.prev=b.prev;b.prev=a;a.next=b},bD=function(a){return function(){throw new Error("Rapha\u00ebl: you are calling to method \u201c"+a+"\u201d of removed object")}},bE=/^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/;a.pathToRelative=bn;if(a.svg){k.svgns="http://www.w3.org/2000/svg";k.xlink="http://www.w3.org/1999/xlink";Q=function(a){return+a+(~(~a)===a)*0.5};var bF=function(a,b){if(b)for(var c in b)b[f](c)&&a[R](c,r(b[c]));else{a=g.createElementNS(k.svgns,a);a.style.webkitTapHighlightColor="rgba(0,0,0,0)";return a}};a[G]=function(){return"Your browser supports SVG.\nYou are running Rapha\u00ebl "+this.version};var bG=function(a,b){var c=bF("path");b.canvas&&b.canvas[l](c);var d=new bM(c,b);d.type="path";bJ(d,{fill:"none",stroke:"#000",path:a});return d},bH=function(b,c,d){var e="linear",f=0.5,h=0.5,i=b.style;c=r(c)[Y](bE,function(a,b,c){e="radial";if(b&&c){f=S(b);h=S(c);var d=(h>0.5)*2-1;C(f-0.5,2)+C(h-0.5,2)>0.25&&(h=y.sqrt(0.25-C(f-0.5,2))*d+0.5)&&h!=0.5&&(h=h.toFixed(5)-0.00001*d)}return p});c=c[s](/\s*\-\s*/);if(e=="linear"){var j=c.shift();j=-S(j);if(isNaN(j))return null;var k=[0,0,y.cos(j*y.PI/180),y.sin(j*y.PI/180)],m=1/(z(B(k[2]),B(k[3]))||1);k[2]*=m;k[3]*=m;if(k[2]<0){k[0]=-k[2];k[2]=0}if(k[3]<0){k[1]=-k[3];k[3]=0}}var n=bv(c);if(!n)return null;var o=b.getAttribute(H);o=o.match(/^url\(#(.*)\)$/);o&&d.defs.removeChild(g.getElementById(o[1]));var q=bF(e+"Gradient");q.id="r"+(a._id++)[G](36);bF(q,e=="radial"?{fx:f,fy:h}:{x1:k[0],y1:k[1],x2:k[2],y2:k[3]});d.defs[l](q);for(var t=0,u=n[w];t<u;t++){var v=bF("stop");bF(v,{offset:n[t].offset?n[t].offset:t?"100%":"0%","stop-color":n[t].color||"#fff"});q[l](v)}bF(b,{fill:"url(#"+q.id+")",opacity:1,"fill-opacity":1});i.fill=p;i.opacity=1;i.fillOpacity=1;return 1},bI=function(b){var c=b.getBBox();bF(b.pattern,{patternTransform:a.format("translate({0},{1})",c.x,c.y)})},bJ=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=c.rotate(),k=function(a,b){b=e[x.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[w];while(i--)g[i]=b[i]*c+(i%2?1:-1)*f;bF(h,{"stroke-dasharray":g[v](",")})}};d[f]("rotation")&&(j=d.rotation);var m=r(j)[s](b);if(!(m.length-1))m=null;else{m[1]=+m[1];m[2]=+m[2]}S(j)&&c.rotate(0,true);for(var n in d){if(d[f](n)){if(!W[f](n))continue;var o=d[n];i[n]=o;switch(n){case"blur":c.blur(o);break;case"rotation":c.rotate(o,true);break;case"href":case"title":case"target":var t=h.parentNode;if(x.call(t.tagName)!="a"){var u=bF("a");t.insertBefore(u,h);u[l](h);t=u}n=="target"&&o=="blank"?t.setAttributeNS(c.paper.xlink,"show","new"):t.setAttributeNS(c.paper.xlink,n,o);break;case"cursor":h.style.cursor=o;break;case"clip-rect":var y=r(o)[s](b);if(y[w]==4){c.clip&&c.clip.parentNode.parentNode.removeChild(c.clip.parentNode);var z=bF("clipPath"),A=bF("rect");z.id="r"+(a._id++)[G](36);bF(A,{x:y[0],y:y[1],width:y[2],height:y[3]});z[l](A);c.paper.defs[l](z);bF(h,{"clip-path":"url(#"+z.id+")"});c.clip=A}if(!o){var B=g.getElementById(h.getAttribute("clip-path")[Y](/(^url\(#|\)$)/g,p));B&&B.parentNode.removeChild(B);bF(h,{"clip-path":p});delete c.clip}break;case"path":c.type=="path"&&bF(h,{d:o?i.path=bo(o):"M0,0"});break;case"width":h[R](n,o);if(i.fx){n="x";o=i.x}else break;case"x":i.fx&&(o=-i.x-(i.width||0));case"rx":if(n=="rx"&&c.type=="rect")break;case"cx":m&&(n=="x"||n=="cx")&&(m[1]+=o-i[n]);h[R](n,o);c.pattern&&bI(c);break;case"height":h[R](n,o);if(i.fy){n="y";o=i.y}else break;case"y":i.fy&&(o=-i.y-(i.height||0));case"ry":if(n=="ry"&&c.type=="rect")break;case"cy":m&&(n=="y"||n=="cy")&&(m[2]+=o-i[n]);h[R](n,o);c.pattern&&bI(c);break;case"r":c.type=="rect"?bF(h,{rx:o,ry:o}):h[R](n,o);break;case"src":c.type=="image"&&h.setAttributeNS(c.paper.xlink,"href",o);break;case"stroke-width":h.style.strokeWidth=o;h[R](n,o);i["stroke-dasharray"]&&k(c,i["stroke-dasharray"]);break;case"stroke-dasharray":k(c,o);break;case"translation":var C=r(o)[s](b);C[0]=+C[0]||0;C[1]=+C[1]||0;if(m){m[1]+=C[0];m[2]+=C[1]}cy.call(c,C[0],C[1]);break;case"scale":C=r(o)[s](b);c.scale(+C[0]||1,+C[1]||+C[0]||1,isNaN(S(C[2]))?null:+C[2],isNaN(S(C[3]))?null:+C[3]);break;case H:var D=r(o).match(M);if(D){z=bF("pattern");var E=bF("image");z.id="r"+(a._id++)[G](36);bF(z,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1});bF(E,{x:0,y:0});E.setAttributeNS(c.paper.xlink,"href",D[1]);z[l](E);var F=g.createElement("img");F.style.cssText="position:absolute;left:-9999em;top-9999em";F.onload=function(){bF(z,{width:this.offsetWidth,height:this.offsetHeight});bF(E,{width:this.offsetWidth,height:this.offsetHeight});g.body.removeChild(this);c.paper.safari()};g.body[l](F);F.src=D[1];c.paper.defs[l](z);h.style.fill="url(#"+z.id+")";bF(h,{fill:"url(#"+z.id+")"});c.pattern=z;c.pattern&&bI(c);break}var I=a.getRGB(o);if(!I.error){delete d.gradient;delete i.gradient;!a.is(i.opacity,"undefined")&&a.is(d.opacity,"undefined")&&bF(h,{opacity:i.opacity});!a.is(i["fill-opacity"],"undefined")&&a.is(d["fill-opacity"],"undefined")&&bF(h,{"fill-opacity":i["fill-opacity"]})}else if((({circle:1,ellipse:1})[f](c.type)||r(o).charAt()!="r")&&bH(h,o,c.paper)){i.gradient=o;i.fill="none";break}I[f]("o")&&bF(h,{"fill-opacity":I.o>1?I.o/100:I.o});case"stroke":I=a.getRGB(o);h[R](n,I.hex);n=="stroke"&&I[f]("o")&&bF(h,{"stroke-opacity":I.o>1?I.o/100:I.o});break;case"gradient":(({circle:1,ellipse:1})[f](c.type)||r(o).charAt()!="r")&&bH(h,o,c.paper);break;case"opacity":case"fill-opacity":if(i.gradient){var J=g.getElementById(h.getAttribute(H)[Y](/^url\(#|\)$/g,p));if(J){var K=J.getElementsByTagName("stop");K[K[w]-1][R]("stop-opacity",o)}break}default:n=="font-size"&&(o=T(o,10)+"px");var L=n[Y](/(\-.)/g,function(a){return V.call(a.substring(1))});h.style[L]=o;h[R](n,o);break}}}bL(c,d);m?c.rotate(m.join(q)):S(j)&&c.rotate(j,true)},bK=1.2,bL=function(a,b){if(a.type!="text"||!(b[f]("text")||b[f]("font")||b[f]("font-size")||b[f]("x")||b[f]("y")))return;var c=a.attrs,d=a.node,e=d.firstChild?T(g.defaultView.getComputedStyle(d.firstChild,p).getPropertyValue("font-size"),10):10;if(b[f]("text")){c.text=b.text;while(d.firstChild)d.removeChild(d.firstChild);var h=r(b.text)[s]("\n");for(var i=0,j=h[w];i<j;i++)if(h[i]){var k=bF("tspan");i&&bF(k,{dy:e*bK,x:c.x});k[l](g.createTextNode(h[i]));d[l](k)}}else{h=d.getElementsByTagName("tspan");for(i=0,j=h[w];i<j;i++)i&&bF(h[i],{dy:e*bK,x:c.x})}bF(d,{y:c.y});var m=a.getBBox(),n=c.y-(m.y+m.height/2);n&&isFinite(n)&&bF(d,{y:c.y+n})},bM=function(b,c){var d=0,e=0;this[0]=b;this.id=a._oid++;this.node=b;b.raphael=this;this.paper=c;this.attrs=this.attrs||{};this.transformations=[];this._={tx:0,ty:0,rt:{deg:0,cx:0,cy: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},bN=bM[e];bM[e].rotate=function(c,d,e){if(this.removed)return this;if(c==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][v](q);return this._.rt.deg}var f=this.getBBox();c=r(c)[s](b);if(c[w]-1){d=S(c[1]);e=S(c[2])}c=S(c[0]);d!=null&&d!==false?this._.rt.deg=c:this._.rt.deg+=c;e==null&&(d=null);this._.rt.cx=d;this._.rt.cy=e;d=d==null?f.x+f.width/2:d;e=e==null?f.y+f.height/2:e;if(this._.rt.deg){this.transformations[0]=a.format("rotate({0} {1} {2})",this._.rt.deg,d,e);this.clip&&bF(this.clip,{transform:a.format("rotate({0} {1} {2})",-this._.rt.deg,d,e)})}else{this.transformations[0]=p;this.clip&&bF(this.clip,{transform:p})}bF(this.node,{transform:this.transformations[v](q)});return this};bM[e].hide=function(){!this.removed&&(this.node.style.display="none");return this};bM[e].show=function(){!this.removed&&(this.node.style.display="");return this};bM[e].remove=function(){if(this.removed)return;by(this,this.paper);this.node.parentNode.removeChild(this.node);for(var a in this)delete this[a];this.removed=true};bM[e].getBBox=function(){if(this.removed)return this;if(this.type=="path")return bl(this.attrs.path);if(this.node.style.display=="none"){this.show();var a=true}var b={};try{b=this.node.getBBox()}catch(a){}finally{b=b||{}}if(this.type=="text"){b={x:b.x,y:Infinity,width:0,height:0};for(var c=0,d=this.node.getNumberOfChars();c<d;c++){var e=this.node.getExtentOfChar(c);e.y<b.y&&(b.y=e.y);e.y+e.height-b.y>b.height&&(b.height=e.y+e.height-b.y);e.x+e.width-b.x>b.width&&(b.width=e.x+e.width-b.x)}}a&&this.hide();return b};bM[e].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]);this._.rt.deg&&(d.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(d.scale=this.scale());d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,E)){if(b=="translation")return cy.call(this);if(b=="rotation")return this.rotate();if(b=="scale")return this.scale();if(b==H&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[b]}if(c==null&&a.is(b,F)){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,[][n](j[k]));this.attrs[k]=j[k];for(var m in l)l[f](m)&&(j[m]=l[m])}bJ(this,j);return this};bM[e].toFront=function(){if(this.removed)return this;this.node.parentNode[l](this.node);var a=this.paper;a.top!=this&&bz(this,a);return this};bM[e].toBack=function(){if(this.removed)return this;if(this.node.parentNode.firstChild!=this.node){this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild);bA(this,this.paper);var a=this.paper}return this};bM[e].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[l](this.node);bB(this,a,this.paper);return this};bM[e].insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;b.parentNode.insertBefore(this.node,b);bC(this,a,this.paper);return this};bM[e].blur=function(b){var c=this;if(+b!==0){var d=bF("filter"),e=bF("feGaussianBlur");c.attrs.blur=b;d.id="r"+(a._id++)[G](36);bF(e,{stdDeviation:+b||1.5});d.appendChild(e);c.paper.defs.appendChild(d);c._blur=d;bF(c.node,{filter:"url(#"+d.id+")"})}else{if(c._blur){c._blur.parentNode.removeChild(c._blur);delete c._blur;delete c.attrs.blur}c.node.removeAttribute("filter")}};var bO=function(a,b,c,d){var e=bF("circle");a.canvas&&a.canvas[l](e);var f=new bM(e,a);f.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"};f.type="circle";bF(e,f.attrs);return f},bP=function(a,b,c,d,e,f){var g=bF("rect");a.canvas&&a.canvas[l](g);var h=new bM(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";bF(g,h.attrs);return h},bQ=function(a,b,c,d,e){var f=bF("ellipse");a.canvas&&a.canvas[l](f);var g=new bM(f,a);g.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"};g.type="ellipse";bF(f,g.attrs);return g},bR=function(a,b,c,d,e,f){var g=bF("image");bF(g,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"});g.setAttributeNS(a.xlink,"href",b);a.canvas&&a.canvas[l](g);var h=new bM(g,a);h.attrs={x:c,y:d,width:e,height:f,src:b};h.type="image";return h},bS=function(a,b,c,d){var e=bF("text");bF(e,{x:b,y:c,"text-anchor":"middle"});a.canvas&&a.canvas[l](e);var f=new bM(e,a);f.attrs={x:b,y:c,"text-anchor":"middle",text:d,font:W.font,stroke:"none",fill:"#000"};f.type="text";bJ(f,f.attrs);return f},bT=function(a,b){this.width=a||this.width;this.height=b||this.height;this.canvas[R]("width",this.width);this.canvas[R]("height",this.height);return this},bU=function(){var b=bw[m](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 i=bF("svg");d=d||0;e=e||0;f=f||512;h=h||342;bF(i,{xmlns:"http://www.w3.org/2000/svg",version:1.1,width:f,height:h});if(c==1){i.style.cssText="position:absolute;left:"+d+"px;top:"+e+"px";g.body[l](i)}else c.firstChild?c.insertBefore(i,c.firstChild):c[l](i);c=new j();c.width=f;c.height=h;c.canvas=i;bx.call(c,c,a.fn);c.clear();return c};k.clear=function(){var a=this.canvas;while(a.firstChild)a.removeChild(a.firstChild);this.bottom=this.top=null;(this.desc=bF("desc"))[l](g.createTextNode("Created with Rapha\u00ebl"));a[l](this.desc);a[l](this.defs=bF("defs"))};k.remove=function(){this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bD(a)}}if(a.vml){var bV={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},bW=/([clmz]),?([^clmz]*)/gi,bX=/ progid:\S+Blur\([^\)]+\)/g,bY=/-?[^,\s-]+/g,bZ=1000+q+1000,b$=10,b_={path:1,rect:1},ca=function(a){var b=/[ahqstv]/ig,c=bo;r(a).match(b)&&(c=bu);b=/[clmz]/g;if(c==bo&&!r(a).match(b)){var d=r(a)[Y](bW,function(a,b,c){var d=[],e=x.call(b)=="m",f=bV[b];c[Y](bY,function(a){if(e&&d[w]==2){f+=d+bV[b=="m"?"l":"L"];d=[]}d[K](Q(a*b$))});return f+d});return d}var e=c(a),f,g;d=[];for(var h=0,i=e[w];h<i;h++){f=e[h];g=x.call(e[h][0]);g=="z"&&(g="x");for(var j=1,k=f[w];j<k;j++)g+=Q(f[j]*b$)+(j!=k-1?",":p);d[K](g)}return d[v](q)};a[G]=function(){return"Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\u00ebl "+this.version};bG=function(a,b){var c=cc("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=cc("shape"),e=d.style;e.width=b.width+"px";e.height=b.height+"px";d.coordsize=bZ;d.coordorigin=b.coordorigin;c[l](d);var f=new bM(d,c,b),g={fill:"none",stroke:"#000"};a&&(g.path=a);f.type="path";f.path=[];f.Path=p;bJ(f,g);b.canvas[l](c);return f};bJ=function(c,d){c.attrs=c.attrs||{};var e=c.node,h=c.attrs,i=e.style,j,k=(d.x!=h.x||d.y!=h.y||d.width!=h.width||d.height!=h.height||d.r!=h.r)&&c.type=="rect",m=c;for(var n in d)d[f](n)&&(h[n]=d[n]);if(k){h.path=cb(h.x,h.y,h.width,h.height,h.r);c.X=h.x;c.Y=h.y;c.W=h.width;c.H=h.height}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);if(d.path&&c.type=="path"||k)e.path=ca(h.path);d.rotation!=null&&c.rotate(d.rotation,true);if(d.translation){j=r(d.translation)[s](b);cy.call(c,j[0],j[1]);if(c._.rt.cx!=null){c._.rt.cx+=+j[0];c._.rt.cy+=+j[1];c.setBox(c.attrs,j[0],j[1])}}if(d.scale){j=r(d.scale)[s](b);c.scale(+j[0]||1,+j[1]||+j[0]||1,+j[2]||null,+j[3]||null)}if("clip-rect"in d){var o=r(d["clip-rect"])[s](b);if(o[w]==4){o[2]=+o[2]+ +o[0];o[3]=+o[3]+ +o[1];var q=e.clipRect||g.createElement("div"),t=q.style,u=e.parentNode;t.clip=a.format("rect({1}px {2}px {3}px {0}px)",o);if(!e.clipRect){t.position="absolute";t.top=0;t.left=0;t.width=c.paper.width+"px";t.height=c.paper.height+"px";u.parentNode.insertBefore(q,u);q[l](u);e.clipRect=q}}d["clip-rect"]||e.clipRect&&(e.clipRect.style.clip=p)}c.type=="image"&&d.src&&(e.src=d.src);if(c.type=="image"&&d.opacity){e.filterOpacity=U+".Alpha(opacity="+d.opacity*100+")";i.filter=(e.filterMatrix||p)+(e.filterOpacity||p)}d.font&&(i.font=d.font);d["font-family"]&&(i.fontFamily="\""+d["font-family"][s](",")[0][Y](/^['"]+|['"]+$/g,p)+"\"");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!=null||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=c.shape||e;var v=e.getElementsByTagName(H)&&e.getElementsByTagName(H)[0],x=false;!v&&(x=v=cc(H));if("fill-opacity"in d||"opacity"in d){var y=((+h["fill-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+a.getRGB(d.fill).o+1||2)-1);y=A(z(y,0),1);v.opacity=y}d.fill&&(v.on=true);if(v.on==null||d.fill=="none")v.on=false;if(v.on&&d.fill){var B=d.fill.match(M);if(B){v.src=B[1];v.type="tile"}else{v.color=a.getRGB(d.fill).hex;v.src=p;v.type="solid";if(a.getRGB(d.fill).error&&(m.type in{circle:1,ellipse:1}||r(d.fill).charAt()!="r")&&bH(m,d.fill)){h.fill="none";h.gradient=d.fill}}}x&&e[l](v);var C=e.getElementsByTagName("stroke")&&e.getElementsByTagName("stroke")[0],D=false;!C&&(D=C=cc("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"])C.on=true;(d.stroke=="none"||C.on==null||d.stroke==0||d["stroke-width"]==0)&&(C.on=false);var E=a.getRGB(d.stroke);C.on&&d.stroke&&(C.color=E.hex);y=((+h["stroke-opacity"]+1||2)-1)*((+h.opacity+1||2)-1)*((+E.o+1||2)-1);var F=(S(d["stroke-width"])||1)*0.75;y=A(z(y,0),1);d["stroke-width"]==null&&(F=h["stroke-width"]);d["stroke-width"]&&(C.weight=F);F&&F<1&&(y*=F)&&(C.weight=1);C.opacity=y;d["stroke-linejoin"]&&(C.joinstyle=d["stroke-linejoin"]||"miter");C.miterlimit=d["stroke-miterlimit"]||8;d["stroke-linecap"]&&(C.endcap=d["stroke-linecap"]=="butt"?"flat":d["stroke-linecap"]=="square"?"square":"round");if(d["stroke-dasharray"]){var G={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"};C.dashstyle=G[f](d["stroke-dasharray"])?G[d["stroke-dasharray"]]:p}D&&e[l](C)}if(m.type=="text"){i=m.paper.span.style;h.font&&(i.font=h.font);h["font-family"]&&(i.fontFamily=h["font-family"]);h["font-size"]&&(i.fontSize=h["font-size"]);h["font-weight"]&&(i.fontWeight=h["font-weight"]);h["font-style"]&&(i.fontStyle=h["font-style"]);m.node.string&&(m.paper.span.innerHTML=r(m.node.string)[Y](/</g,"&#60;")[Y](/&/g,"&#38;")[Y](/\n/g,"<br>"));m.W=h.w=m.paper.span.offsetWidth;m.H=h.h=m.paper.span.offsetHeight;m.X=h.x;m.Y=h.y+Q(m.H/2);switch(h["text-anchor"]){case"start":m.node.style["v-text-align"]="left";m.bbx=Q(m.W/2);break;case"end":m.node.style["v-text-align"]="right";m.bbx=-Q(m.W/2);break;default:m.node.style["v-text-align"]="center";break}}};bH=function(a,b){a.attrs=a.attrs||{};var c=a.attrs,d,e="linear",f=".5 .5";a.attrs.gradient=b;b=r(b)[Y](bE,function(a,b,c){e="radial";if(b&&c){b=S(b);c=S(c);C(b-0.5,2)+C(c-0.5,2)>0.25&&(c=y.sqrt(0.25-C(b-0.5,2))*((c>0.5)*2-1)+0.5);f=b+q+c}return p});b=b[s](/\s*\-\s*/);if(e=="linear"){var g=b.shift();g=-S(g);if(isNaN(g))return null}var h=bv(b);if(!h)return null;a=a.shape||a.node;d=a.getElementsByTagName(H)[0]||cc(H);!d.parentNode&&a.appendChild(d);if(h[w]){d.on=true;d.method="none";d.color=h[0].color;d.color2=h[h[w]-1].color;var i=[];for(var j=0,k=h[w];j<k;j++)h[j].offset&&i[K](h[j].offset+q+h[j].color);d.colors&&(d.colors.value=i[w]?i[v]():"0% "+d.color);if(e=="radial"){d.type="gradientradial";d.focus="100%";d.focussize=f;d.focusposition=f}else{d.type="gradient";d.angle=(270-g)%360}}return 1};bM=function(b,c,d){var e=0,f=0,g=0,h=1;this[0]=b;this.id=a._oid++;this.node=b;b.raphael=this;this.X=0;this.Y=0;this.attrs={};this.Group=c;this.paper=d;this._={tx:0,ty:0,rt:{deg:0},sx:1,sy:1};!d.bottom&&(d.bottom=this);this.prev=d.top;d.top&&(d.top.next=this);d.top=this;this.next=null};bN=bM[e];bN.rotate=function(a,c,d){if(this.removed)return this;if(a==null){if(this._.rt.cx)return[this._.rt.deg,this._.rt.cx,this._.rt.cy][v](q);return this._.rt.deg}a=r(a)[s](b);if(a[w]-1){c=S(a[1]);d=S(a[2])}a=S(a[0]);c!=null?this._.rt.deg=a:this._.rt.deg+=a;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;return this};bN.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 g in a)a[f](g)&&(this.attrs[g]=a[g]);b=b||this._.rt.cx;c=c||this._.rt.cy;var h=this.attrs,i,j,k,l;switch(this.type){case"circle":i=h.cx-h.r;j=h.cy-h.r;k=l=h.r*2;break;case"ellipse":i=h.cx-h.rx;j=h.cy-h.ry;k=h.rx*2;l=h.ry*2;break;case"image":i=+h.x;j=+h.y;k=h.width||0;l=h.height||0;break;case"text":this.textpath.v=["m",Q(h.x),", ",Q(h.y-2),"l",Q(h.x)+1,", ",Q(h.y-2)][v](p);i=h.x-Q(this.W/2);j=h.y-this.H/2;k=this.W;l=this.H;break;case"rect":case"path":if(!this.attrs.path){i=0;j=0;k=this.paper.width;l=this.paper.height}else{var m=bl(this.attrs.path);i=m.x;j=m.y;k=m.width;l=m.height}break;default:i=0;j=0;k=this.paper.width;l=this.paper.height;break}b=b==null?i+k/2:b;c=c==null?j+l/2:c;var n=b-this.paper.width/2,o=c-this.paper.height/2,q;d.left!=(q=n+"px")&&(d.left=q);d.top!=(q=o+"px")&&(d.top=q);this.X=b_[f](this.type)?-n:i;this.Y=b_[f](this.type)?-o:j;this.W=k;this.H=l;if(b_[f](this.type)){e.left!=(q=-n*b$+"px")&&(e.left=q);e.top!=(q=-o*b$+"px")&&(e.top=q)}else if(this.type=="text"){e.left!=(q=-n+"px")&&(e.left=q);e.top!=(q=-o+"px")&&(e.top=q)}else{d.width!=(q=this.paper.width+"px")&&(d.width=q);d.height!=(q=this.paper.height+"px")&&(d.height=q);e.left!=(q=i-n+"px")&&(e.left=q);e.top!=(q=j-o+"px")&&(e.top=q);e.width!=(q=k+"px")&&(e.width=q);e.height!=(q=l+"px")&&(e.height=q)}};bN.hide=function(){!this.removed&&(this.Group.style.display="none");return this};bN.show=function(){!this.removed&&(this.Group.style.display="block");return this};bN.getBBox=function(){if(this.removed)return this;if(b_[f](this.type))return bl(this.attrs.path);return{x:this.X+(this.bbx||0),y:this.Y,width:this.W,height:this.H}};bN.remove=function(){if(this.removed)return;by(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=true};bN.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]);this._.rt.deg&&(d.rotation=this.rotate());(this._.sx!=1||this._.sy!=1)&&(d.scale=this.scale());d.gradient&&d.fill=="none"&&(d.fill=d.gradient)&&delete d.gradient;return d}if(c==null&&a.is(b,"string")){if(b=="translation")return cy.call(this);if(b=="rotation")return this.rotate();if(b=="scale")return this.scale();if(b==H&&this.attrs.fill=="none"&&this.attrs.gradient)return this.attrs.gradient;return this.attrs[b]}if(this.attrs&&c==null&&a.is(b,F)){var g,h={};for(e=0,g=b[w];e<g;e++)h[b[e]]=this.attr(b[e]);return h}var i;if(c!=null){i={};i[b]=c}c==null&&a.is(b,"object")&&(i=b);if(i){for(var 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,[][n](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.node.string=i.text);bJ(this,i);i.gradient&&(({circle:1,ellipse:1})[f](this.type)||r(i.gradient).charAt()!="r")&&bH(this,i.gradient);(!b_[f](this.type)||this._.rt.deg)&&this.setBox(this.attrs)}return this};bN.toFront=function(){!this.removed&&this.Group.parentNode[l](this.Group);this.paper.top!=this&&bz(this,this.paper);return this};bN.toBack=function(){if(this.removed)return this;if(this.Group.parentNode.firstChild!=this.Group){this.Group.parentNode.insertBefore(this.Group,this.Group.parentNode.firstChild);bA(this,this.paper)}return this};bN.insertAfter=function(a){if(this.removed)return this;a.constructor==cB&&(a=a[a.length-1]);a.Group.nextSibling?a.Group.parentNode.insertBefore(this.Group,a.Group.nextSibling):a.Group.parentNode[l](this.Group);bB(this,a,this.paper);return this};bN.insertBefore=function(a){if(this.removed)return this;a.constructor==cB&&(a=a[0]);a.Group.parentNode.insertBefore(this.Group,a.Group);bC(this,a,this.paper);return this};bN.blur=function(b){var c=this.node.runtimeStyle,d=c.filter;d=d.replace(bX,p);if(+b!==0){this.attrs.blur=b;c.filter=d+q+U+".Blur(pixelradius="+(+b||1.5)+")";c.margin=a.format("-{0}px 0 0 -{0}px",Q(+b||1.5))}else{c.filter=d;c.margin=0;delete this.attrs.blur}};bO=function(a,b,c,d){var e=cc("group"),f=cc("oval"),g=f.style;e.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";e.coordsize=bZ;e.coordorigin=a.coordorigin;e[l](f);var h=new bM(f,e,a);h.type="circle";bJ(h,{stroke:"#000",fill:"none"});h.attrs.cx=b;h.attrs.cy=c;h.attrs.r=d;h.setBox({x:b-d,y:c-d,width:d*2,height:d*2});a.canvas[l](e);return h};function cb(b,c,d,e,f){return f?a.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z",b+f,c,d-f*2,f,-f,e-f*2,f*2-d,f*2-e):a.format("M{0},{1}l{2},0,0,{3},{4},0z",b,c,d,e,-d)}bP=function(a,b,c,d,e,f){var g=cb(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};bQ=function(a,b,c,d,e){var f=cc("group"),g=cc("oval"),h=g.style;f.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";f.coordsize=bZ;f.coordorigin=a.coordorigin;f[l](g);var i=new bM(g,f,a);i.type="ellipse";bJ(i,{stroke:"#000"});i.attrs.cx=b;i.attrs.cy=c;i.attrs.rx=d;i.attrs.ry=e;i.setBox({x:b-d,y:c-e,width:d*2,height:e*2});a.canvas[l](f);return i};bR=function(a,b,c,d,e,f){var g=cc("group"),h=cc("image");g.style.cssText="position:absolute;left:0;top:0;width:"+a.width+"px;height:"+a.height+"px";g.coordsize=bZ;g.coordorigin=a.coordorigin;h.src=b;g[l](h);var i=new bM(h,g,a);i.type="image";i.attrs.src=b;i.attrs.x=c;i.attrs.y=d;i.attrs.w=e;i.attrs.h=f;i.setBox({x:c,y:d,width:e,height:f});a.canvas[l](g);return i};bS=function(b,c,d,e){var f=cc("group"),g=cc("shape"),h=g.style,i=cc("path"),j=i.style,k=cc("textpath");f.style.cssText="position:absolute;left:0;top:0;width:"+b.width+"px;height:"+b.height+"px";f.coordsize=bZ;f.coordorigin=b.coordorigin;i.v=a.format("m{0},{1}l{2},{1}",Q(c*10),Q(d*10),Q(c*10)+1);i.textpathok=true;h.width=b.width;h.height=b.height;k.string=r(e);k.on=true;g[l](k);g[l](i);f[l](g);var m=new bM(k,f,b);m.shape=g;m.textpath=i;m.type="text";m.attrs.text=e;m.attrs.x=c;m.attrs.y=d;m.attrs.w=1;m.attrs.h=1;bJ(m,{font:W.font,stroke:"none",fill:"#000"});m.setBox();b.canvas[l](f);return m};bT=function(a,b){var c=this.canvas.style;a==+a&&(a+="px");b==+b&&(b+="px");c.width=a;c.height=b;c.clip="rect(0 "+a+" "+b+" 0)";return this};var cc;g.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{!g.namespaces.rvml&&g.namespaces.add("rvml","urn:schemas-microsoft-com:vml");cc=function(a){return g.createElement("<rvml:"+a+" class=\"rvml\">")}}catch(a){cc=function(a){return g.createElement("<"+a+" xmlns=\"urn:schemas-microsoft.com:vml\" class=\"rvml\">")}}bU=function(){var b=bw[m](0,arguments),c=b.container,d=b.height,e,f=b.width,h=b.x,i=b.y;if(!c)throw new Error("VML container not found.");var k=new j(),n=k.canvas=g.createElement("div"),o=n.style;h=h||0;i=i||0;f=f||512;d=d||342;f==+f&&(f+="px");d==+d&&(d+="px");k.width=1000;k.height=1000;k.coordsize=b$*1000+q+b$*1000;k.coordorigin="0 0";k.span=g.createElement("span");k.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";n[l](k.span);o.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);if(c==1){g.body[l](n);o.left=h+"px";o.top=i+"px";o.position="absolute"}else c.firstChild?c.insertBefore(n,c.firstChild):c[l](n);bx.call(k,k,a.fn);return k};k.clear=function(){this.canvas.innerHTML=p;this.span=g.createElement("span");this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";this.canvas[l](this.span);this.bottom=this.top=null};k.remove=function(){this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]=bD(a);return true}}var cd=navigator.userAgent.match(/Version\\x2f(.*?)\s/);navigator.vendor=="Apple Computer, Inc."&&(cd&&cd[1]<4||navigator.platform.slice(0,2)=="iP")?k.safari=function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});h.setTimeout(function(){a.remove()})}:k.safari=function(){};var ce=function(){this.returnValue=false},cf=function(){return this.originalEvent.preventDefault()},cg=function(){this.cancelBubble=true},ch=function(){return this.originalEvent.stopPropagation()},ci=(function(){{if(g.addEventListener)return function(a,b,c,d){var e=o&&u[b]?u[b]:b,g=function(e){if(o&&u[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=cf;e.stopPropagation=ch;break}}return c.call(d,e)};a.addEventListener(e,g,false);return function(){a.removeEventListener(e,g,false);return true}};if(g.attachEvent)return function(a,b,c,d){var e=function(a){a=a||h.event;a.preventDefault=a.preventDefault||ce;a.stopPropagation=a.stopPropagation||cg;return c.call(d,a)};a.attachEvent("on"+b,e);var f=function(){a.detachEvent("on"+b,e);return true};return f}}})(),cj=[],ck=function(a){var b=a.clientX,c=a.clientY,d=g.documentElement.scrollTop||g.body.scrollTop,e=g.documentElement.scrollLeft||g.body.scrollLeft,f,h=cj.length;while(h--){f=cj[h];if(o){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();b+=e;c+=d;f.move&&f.move.call(f.el,b-f.el._drag.x,c-f.el._drag.y,b,c)}},cl=function(){a.unmousemove(ck).unmouseup(cl);var b=cj.length,c;while(b--){c=cj[b];c.el._drag={};c.end&&c.end.call(c.el)}cj=[]};for(var cm=t[w];cm--;)(function(b){a[b]=bM[e][b]=function(c){if(a.is(c,"function")){this.events=this.events||[];this.events.push({name:b,f:c,unbind:ci(this.shape||this.node||g,b,c,this)})}return this};a["un"+b]=bM[e]["un"+b]=function(a){var c=this.events,d=c[w];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}})(t[cm]);bN.hover=function(a,b){return this.mouseover(a).mouseout(b)};bN.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)};bN.drag=function(b,c,d){this._drag={};this.mousedown(function(e){(e.originalEvent||e).preventDefault();var f=g.documentElement.scrollTop||g.body.scrollTop,h=g.documentElement.scrollLeft||g.body.scrollLeft;this._drag.x=e.clientX+h;this._drag.y=e.clientY+f;this._drag.id=e.identifier;c&&c.call(this,e.clientX+h,e.clientY+f);!cj.length&&a.mousemove(ck).mouseup(cl);cj.push({el:this,move:b,end:d})});return this};bN.undrag=function(b,c,d){var e=cj.length;while(e--)cj[e].el==this&&(cj[e].move==b&&cj[e].end==d)&&cj.splice(e++,1);!cj.length&&a.unmousemove(ck).unmouseup(cl)};k.circle=function(a,b,c){return bO(this,a||0,b||0,c||0)};k.rect=function(a,b,c,d,e){return bP(this,a||0,b||0,c||0,d||0,e||0)};k.ellipse=function(a,b,c,d){return bQ(this,a||0,b||0,c||0,d||0)};k.path=function(b){b&&!a.is(b,E)&&!a.is(b[0],F)&&(b+=p);return bG(a.format[m](a,arguments),this)};k.image=function(a,b,c,d,e){return bR(this,a||"about:blank",b||0,c||0,d||0,e||0)};k.text=function(a,b,c){return bS(this,a||0,b||0,r(c))};k.set=function(a){arguments[w]>1&&(a=Array[e].splice.call(arguments,0,arguments[w]));return new cB(a)};k.setSize=bT;k.top=k.bottom=null;k.raphael=a;function cn(){return this.x+q+this.y}bN.resetScale=function(){if(this.removed)return this;this._.sx=1;this._.sy=1;this.attrs.scale="1 1"};bN.scale=function(a,b,c,d){if(this.removed)return this;if(a==null&&b==null)return{x:this._.sx,y:this._.sy,toString:cn};b=b||a;!(+b)&&(b=a);var e,f,g,h,i=this.attrs;if(a!=0){var j=this.getBBox(),k=j.x+j.width/2,l=j.y+j.height/2,m=B(a/this._.sx),o=B(b/this._.sy);c=+c||c==0?c:k;d=+d||d==0?d:l;var r=this._.sx>0,s=this._.sy>0,t=~(~(a/B(a))),u=~(~(b/B(b))),x=m*t,y=o*u,z=this.node.style,A=c+B(k-c)*x*(k>c==r?1:-1),C=d+B(l-d)*y*(l>d==s?1:-1),D=a*t>b*u?o:m;switch(this.type){case"rect":case"image":var E=i.width*m,F=i.height*o;this.attr({height:F,r:i.r*D,width:E,x:A-E/2,y:C-F/2});break;case"circle":case"ellipse":this.attr({rx:i.rx*m,ry:i.ry*o,r:i.r*D,cx:A,cy:C});break;case"text":this.attr({x:A,y:C});break;case"path":var G=bn(i.path),H=true,I=r?x:m,J=s?y:o;for(var K=0,L=G[w];K<L;K++){var M=G[K],N=V.call(M[0]);{if(N=="M"&&H)continue;H=false}if(N=="A"){M[G[K][w]-2]*=I;M[G[K][w]-1]*=J;M[1]*=m;M[2]*=o;M[5]=+(t+u?!(+M[4]):!(!(+M[4])))}else if(N=="H")for(var O=1,P=M[w];O<P;O++)M[O]*=I;else if(N=="V")for(O=1,P=M[w];O<P;O++)M[O]*=J;else for(O=1,P=M[w];O<P;O++)M[O]*=O%2?I:J}var Q=bl(G);e=A-Q.x-Q.width/2;f=C-Q.y-Q.height/2;G[0][1]+=e;G[0][2]+=f;this.attr({path:G});break}if(this.type in{text:1,image:1}&&(t!=1||u!=1))if(this.transformations){this.transformations[2]="scale("[n](t,",",u,")");this.node[R]("transform",this.transformations[v](q));e=t==-1?-i.x-(E||0):i.x;f=u==-1?-i.y-(F||0):i.y;this.attr({x:e,y:f});i.fx=t-1;i.fy=u-1}else{this.node.filterMatrix=U+".Matrix(M11="[n](t,", M12=0, M21=0, M22=",u,", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')");z.filter=(this.node.filterMatrix||p)+(this.node.filterOpacity||p)}else if(this.transformations){this.transformations[2]=p;this.node[R]("transform",this.transformations[v](q));i.fx=0;i.fy=0}else{this.node.filterMatrix=p;z.filter=(this.node.filterMatrix||p)+(this.node.filterOpacity||p)}i.scale=[a,b,c,d][v](q);this._.sx=a;this._.sy=b}return this};bN.clone=function(){if(this.removed)return null;var a=this.attr();delete a.scale;delete a.translation;return this.paper[this.type]().attr(a)};var co={},cp=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=co[m],o,p;!n&&(co[m]=n={data:[]});n.timer&&clearTimeout(n.timer);n.timer=setTimeout(function(){delete co[m]},2000);if(j!=null){var q=cp(b,c,d,e,f,g,h,i);l=~(~q)*10}for(var r=0;r<l+1;r++){if(n.data[j]>r)p=n.data[r*l];else{p=a.findDotsAtSegment(b,c,d,e,f,g,h,i,r/l);n.data[r]=p}r&&(k+=C(C(o.x-p.x,2)+C(o.y-p.y,2),0.5));if(j!=null&&k>=j)return p;o=p}if(j==null)return k},cq=function(b,c){return function(d,e,f){d=bu(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=cp(g,h,i[1],i[2],i[3],i[4],i[5],i[6]);if(n+j>e){if(c&&!l.start){m=cp(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]][v]();n+=j;g=+i[5];h=+i[6];continue}if(!b&&!c){m=cp(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}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}},cr=cq(1),cs=cq(),ct=cq(0,1);bN.getTotalLength=function(){if(this.type!="path")return;if(this.node.getTotalLength)return this.node.getTotalLength();return cr(this.attrs.path)};bN.getPointAtLength=function(a){if(this.type!="path")return;return cs(this.attrs.path,a)};bN.getSubpath=function(a,b){if(this.type!="path")return;if(B(this.getTotalLength()-b)<"1e-6")return ct(this.attrs.path,a).end;var c=ct(this.attrs.path,b,1);return a?ct(c,a).end:c};a.easing_formulas={linear:function(a){return a},"<":function(a){return C(a,3)},">":function(a){return C(a-1,3)+1},"<>":function(a){a=a*2;if(a<1)return C(a,3)/2;a-=2;return(C(a,3)+2)/2},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==0||a==1)return a;var b=0.3,c=b/4;return C(2,-10*a)*y.sin((a-c)*(2*y.PI)/b)+1},bounce:function(a){var b=7.5625,c=2.75,d;if(a<1/c)d=b*a*a;else if(a<2/c){a-=1.5/c;d=b*a*a+0.75}else if(a<2.5/c){a-=2.25/c;d=b*a*a+0.9375}else{a-=2.625/c;d=b*a*a+0.984375}return d}};var cu=[],cv=function(){var b=+(new Date());for(var c=0;c<cu[w];c++){var d=cu[c];if(d.stop||d.el.removed)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;if(e<g){var r=h(e/g);for(var s in i)if(i[f](s)){switch(X[s]){case"along":o=r*g*j[s];k.back&&(o=k.len-o);var t=cs(k[s],o);m.translate(j.sx-j.x||0,j.sy-j.y||0);j.x=t.x;j.y=t.y;m.translate(t.x-j.sx,t.y-j.sy);k.rot&&m.rotate(j.r+t.alpha,t.x,t.y);break;case D:o=+i[s]+r*g*j[s];break;case"colour":o="rgb("+[cx(Q(i[s].r+r*g*j[s].r)),cx(Q(i[s].g+r*g*j[s].g)),cx(Q(i[s].b+r*g*j[s].b))][v](",")+")";break;case"path":o=[];for(var u=0,x=i[s][w];u<x;u++){o[u]=[i[s][u][0]];for(var y=1,z=i[s][u][w];y<z;y++)o[u][y]=+i[s][u][y]+r*g*j[s][u][y];o[u]=o[u][v](q)}o=o[v](q);break;case"csv":switch(s){case"translation":var A=r*g*j[s][0]-l.x,B=r*g*j[s][1]-l.y;l.x+=A;l.y+=B;o=A+q+B;break;case"rotation":o=+i[s][0]+r*g*j[s][0];i[s][1]&&(o+=","+i[s][1]+","+i[s][2]);break;case"scale":o=[+i[s][0]+r*g*j[s][0],+i[s][1]+r*g*j[s][1],2 in k[s]?k[s][2]:p,3 in k[s]?k[s][3]:p][v](q);break;case"clip-rect":o=[];u=4;while(u--)o[u]=+i[s][u]+r*g*j[s][u];break}break;default:var C=[].concat(i[s]);o=[];u=m.paper.customAttributes[s].length;while(u--)o[u]=+C[u]+r*g*j[s][u];break}n[s]=o}m.attr(n);m._run&&m._run.call(m)}else{if(k.along){t=cs(k.along,k.len*!k.back);m.translate(j.sx-(j.x||0)+t.x-j.sx,j.sy-(j.y||0)+t.y-j.sy);k.rot&&m.rotate(j.r+t.alpha,t.x,t.y)}(l.x||l.y)&&m.translate(-l.x,-l.y);k.scale&&(k.scale+=p);m.attr(k);cu.splice(c--,1)}}a.svg&&m&&m.paper&&m.paper.safari();cu[w]&&setTimeout(cv)},cw=function(b,c,d,e,f){var g=d-e;c.timeouts.push(setTimeout(function(){a.is(f,"function")&&f.call(c);c.animate(b,g,b.easing)},e))},cx=function(a){return z(A(a,255),0)},cy=function(a,b){if(a==null)return{x:this._.tx,y:this._.ty,toString:cn};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=bn(this.attrs.path);c[0][1]+=+a;c[0][2]+=+b;this.attr({path:c});break}return this};bN.animateWith=function(a,b,c,d,e){for(var f=0,g=cu.length;f<g;f++)cu[f].el.id==a.id&&(b.start=cu[f].start);return this.animate(b,c,d,e)};bN.animateAlong=cz();bN.animateAlongBack=cz(1);function cz(b){return function(c,d,e,f){var g={back:b};a.is(e,"function")?f=e:g.rot=e;c&&c.constructor==bM&&(c=c.attrs.path);c&&(g.along=c);return this.animate(g,d,f)}}function cA(a,b,c,d,e,f){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;function m(a){return((i*a+h)*a+g)*a}function n(a,b){var c=o(a,b);return((l*c+k)*c+j)*c}function o(a,b){var c,d,e,f,j,k;for(e=a,k=0;k<8;k++){f=m(e)-a;if(B(f)<b)return e;j=(3*i*e+2*h)*e+g;if(B(j)<0.000001)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(B(f-a)<b)return e;a>f?c=e:d=e;e=(d-c)/2+c}return e}return n(a,1/(200*f))}bN.onAnimation=function(a){this._run=a||0;return this};bN.animate=function(c,d,e,g){var h=this;h.timeouts=h.timeouts||[];if(a.is(e,"function")||!e)g=e||null;if(h.removed){g&&g.call(h);return h}var i={},j={},k=false,l={};for(var m in c)if(c[f](m)){if(X[f](m)||h.paper.customAttributes[f](m)){k=true;i[m]=h.attr(m);i[m]==null&&(i[m]=W[m]);j[m]=c[m];switch(X[m]){case"along":var n=cr(c[m]),o=cs(c[m],n*!(!c.back)),p=h.getBBox();l[m]=n/d;l.tx=p.x;l.ty=p.y;l.sx=o.x;l.sy=o.y;j.rot=c.rot;j.back=c.back;j.len=n;c.rot&&(l.r=S(h.rotate())||0);break;case D:l[m]=(j[m]-i[m])/d;break;case"colour":i[m]=a.getRGB(i[m]);var q=a.getRGB(j[m]);l[m]={r:(q.r-i[m].r)/d,g:(q.g-i[m].g)/d,b:(q.b-i[m].b)/d};break;case"path":var t=bu(i[m],j[m]);i[m]=t[0];var u=t[1];l[m]=[];for(var v=0,x=i[m][w];v<x;v++){l[m][v]=[0];for(var y=1,z=i[m][v][w];y<z;y++)l[m][v][y]=(u[v][y]-i[m][v][y])/d}break;case"csv":var A=r(c[m])[s](b),B=r(i[m])[s](b);switch(m){case"translation":i[m]=[0,0];l[m]=[A[0]/d,A[1]/d];break;case"rotation":i[m]=B[1]==A[1]&&B[2]==A[2]?B:[0,A[1],A[2]];l[m]=[(A[0]-i[m][0])/d,0,0];break;case"scale":c[m]=A;i[m]=r(i[m])[s](b);l[m]=[(A[0]-i[m][0])/d,(A[1]-i[m][1])/d,0,0];break;case"clip-rect":i[m]=r(i[m])[s](b);l[m]=[];v=4;while(v--)l[m][v]=(A[v]-i[m][v])/d;break}j[m]=A;break;default:A=[].concat(c[m]);B=[].concat(i[m]);l[m]=[];v=h.paper.customAttributes[m][w];while(v--)l[m][v]=((A[v]||0)-(B[v]||0))/d;break}}}if(!k){var C=[],E;for(var F in c)if(c[f](F)&&ba.test(F)){m={value:c[F]};F=="from"&&(F=0);F=="to"&&(F=100);m.key=T(F,10);C.push(m)}C.sort(bd);C[0].key&&C.unshift({key:0,value:h.attrs});for(v=0,x=C[w];v<x;v++)cw(C[v].value,h,d/100*C[v].key,d/100*(C[v-1]&&C[v-1].key||0),C[v-1]&&C[v-1].value.callback);E=C[C[w]-1].value.callback;E&&h.timeouts.push(setTimeout(function(){E.call(h)},d))}else{var G=a.easing_formulas[e];if(!G){G=r(e).match(P);if(G&&G[w]==5){var H=G;G=function(a){return cA(a,+H[1],+H[2],+H[3],+H[4],d)}}else G=function(a){return a}}cu.push({start:c.start||+(new Date()),ms:d,easing:G,from:i,diff:l,to:j,el:h,t:{x:0,y:0}});a.is(g,"function")&&(h._ac=setTimeout(function(){g.call(h)},d));cu[w]==1&&setTimeout(cv)}return this};bN.stop=function(){for(var a=0;a<cu.length;a++)cu[a].el.id==this.id&&cu.splice(a--,1);for(a=0,ii=this.timeouts&&this.timeouts.length;a<ii;a++)clearTimeout(this.timeouts[a]);this.timeouts=[];clearTimeout(this._ac);delete this._ac;return this};bN.translate=function(a,b){return this.attr({translation:a+" "+b})};bN[G]=function(){return"Rapha\u00ebl\u2019s object"};a.ae=cu;var cB=function(a){this.items=[];this[w]=0;this.type="set";if(a)for(var b=0,c=a[w];b<c;b++){if(a[b]&&(a[b].constructor==bM||a[b].constructor==cB)){this[this.items[w]]=this.items[this.items[w]]=a[b];this[w]++}}};cB[e][K]=function(){var a,b;for(var c=0,d=arguments[w];c<d;c++){a=arguments[c];if(a&&(a.constructor==bM||a.constructor==cB)){b=this.items[w];this[b]=this.items[b]=a;this[w]++}}return this};cB[e].pop=function(){delete this[this[w]--];return this.items.pop()};for(var cC in bN)bN[f](cC)&&(cB[e][cC]=(function(a){return function(){for(var b=0,c=this.items[w];b<c;b++)this.items[b][a][m](this.items[b],arguments);return this}})(cC));cB[e].attr=function(b,c){if(b&&a.is(b,F)&&a.is(b[0],"object"))for(var d=0,e=b[w];d<e;d++)this.items[d].attr(b[d]);else for(var f=0,g=this.items[w];f<g;f++)this.items[f].attr(b,c);return this};cB[e].animate=function(b,c,d,e){(a.is(d,"function")||!d)&&(e=d||null);var f=this.items[w],g=f,h,i=this,j;e&&(j=function(){!(--f)&&e.call(i)});d=a.is(d,E)?d:j;h=this.items[--g].animate(b,c,d,j);while(g--)this.items[g]&&!this.items[g].removed&&this.items[g].animateWith(h,b,c,d,j);return this};cB[e].insertAfter=function(a){var b=this.items[w];while(b--)this.items[b].insertAfter(a);return this};cB[e].getBBox=function(){var a=[],b=[],c=[],d=[];for(var e=this.items[w];e--;){var f=this.items[e].getBBox();a[K](f.x);b[K](f.y);c[K](f.x+f.width);d[K](f.y+f.height)}a=A[m](0,a);b=A[m](0,b);return{x:a,y:b,width:z[m](0,c)-a,height:z[m](0,d)-b}};cB[e].clone=function(a){a=new cB();for(var b=0,c=this.items[w];b<c;b++)a[K](this.items[b].clone());return a};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][K](b):this.fonts[c]=[b];if(!a.svg){b.face["units-per-em"]=T(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[Y](/[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};k.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)return;var g=a.fonts[b];if(!g){var h=new RegExp("(^|\\s)"+b[Y](/[^\w\d\s+!~.:_-]/g,p)+"(\\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[w];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};k.print=function(c,d,e,f,g,h,i){h=h||"middle";i=z(A(i||0,1),-1);var j=this.set(),k=r(e)[s](p),l=0,m=p,n;a.is(f,e)&&(f=this.getFont(f));if(f){n=(g||16)/f.face["units-per-em"];var o=f.face.bbox.split(b),q=+o[0],t=+o[1]+(h=="baseline"?o[3]-o[1]+ +f.face.descent:(o[3]-o[1])/2);for(var u=0,v=k[w];u<v;u++){var x=u&&f.glyphs[k[u-1]]||{},y=f.glyphs[k[u]];l+=u?(x.w||f.w)+(x.k&&x.k[k[u]]||0)+f.w*i:0;y&&y.d&&j[K](this.path(y.d).attr({fill:"#000",stroke:"none",translation:[l,0]}))}j.scale(n,n,q,t).translate(c-q,d-t)}return j};a.format=function(b,c){var e=a.is(c,F)?[0][n](c):arguments;b&&a.is(b,E)&&e[w]-1&&(b=b[Y](d,function(a,b){return e[++b]==null?p:e[b]}));return b||p};a.ninja=function(){i.was?h.Raphael=i.is:delete Raphael;return a};a.el=bN;a.st=cB[e];i.was?h.Raphael=a:Raphael=a})()
\ No newline at end of file
index f0fda43..98e5730 100644 (file)
             var bb = this.getBBox(),
                 rcx = bb.x + bb.width / 2,
                 rcy = bb.y + bb.height / 2,
-                kx = x / this._.sx,
-                ky = y / this._.sy;
+                kx = abs(x / this._.sx),
+                ky = abs(y / this._.sy);
             cx = (+cx || cx == 0) ? cx : rcx;
             cy = (+cy || cy == 0) ? cy : rcy;
-            var dirx = ~~(x / abs(x)),
+            var posx = this._.sx > 0,
+                posy = this._.sy > 0,
+                dirx = ~~(x / abs(x)),
                 diry = ~~(y / abs(y)),
+                dkx = kx * dirx,
+                dky = ky * diry,
                 s = this.node.style,
-                ncx = cx + (rcx - cx) * kx,
-                ncy = cy + (rcy - cy) * ky;
+                ncx = cx + abs(rcx - cx) * dkx * (rcx > cx == posx ? 1 : -1),
+                ncy = cy + abs(rcy - cy) * dky * (rcy > cy == posy ? 1 : -1),
+                fr = (x * dirx > y * diry ? ky : kx);
             switch (this.type) {
                 case "rect":
                 case "image":
-                    var neww = a.width * dirx * kx,
-                        newh = a.height * diry * ky;
+                    var neww = a.width * kx,
+                        newh = a.height * ky;
                     this.attr({
                         height: newh,
-                        r: a.r * mmin(dirx * kx, diry * ky),
+                        r: a.r * fr,
                         width: neww,
                         x: ncx - neww / 2,
                         y: ncy - newh / 2
                 case "circle":
                 case "ellipse":
                     this.attr({
-                        rx: a.rx * dirx * kx,
-                        ry: a.ry * diry * ky,
-                        r: a.r * mmin(dirx * kx, diry * ky),
+                        rx: a.rx * kx,
+                        ry: a.ry * ky,
+                        r: a.r * fr,
                         cx: ncx,
                         cy: ncy
                     });
                     break;
                 case "path":
                     var path = pathToRelative(a.path),
-                        skip = true;
+                        skip = true,
+                        fx = posx ? dkx : kx,
+                        fy = posy ? dky : ky;
                     for (var i = 0, ii = path[length]; i < ii; i++) {
                         var p = path[i],
                             P0 = upperCase.call(p[0]);
                             skip = false;
                         }
                         if (P0 == "A") {
-                            p[path[i][length] - 2] *= kx;
-                            p[path[i][length] - 1] *= ky;
-                            p[1] *= dirx * kx;
-                            p[2] *= diry * ky;
-                            p[5] = +!(dirx + diry ? !+p[5] : +p[5]);
+                            p[path[i][length] - 2] *= fx;
+                            p[path[i][length] - 1] *= fy;
+                            p[1] *= kx;
+                            p[2] *= ky;
+                            p[5] = +(dirx + diry ? !+p[4] : !!+p[4]);
                         } else if (P0 == "H") {
                             for (var j = 1, jj = p[length]; j < jj; j++) {
-                                p[j] *= kx;
+                                p[j] *= fx;
                             }
                         } else if (P0 == "V") {
                             for (j = 1, jj = p[length]; j < jj; j++) {
-                                p[j] *= ky;
+                                p[j] *= fy;
                             }
                          } else {
                             for (j = 1, jj = p[length]; j < jj; j++) {
-                                p[j] *= (j % 2) ? kx : ky;
+                                p[j] *= (j % 2) ? fx : fy;
                             }
                         }
                     }