emblem-generator
Version:
Generate SVG emblems
1 lines • 135 kB
JavaScript
!function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){window,t.exports=function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){var i,n;i=[r(2)],void 0===(n=function(t){function e(i){if(e.is(i,"function"))return r?i():t.on("raphael.DOMload",i);if(e.is(i,A))return e._engine.create[p](e,i.splice(0,3+e.is(i[0],T))).add(i);var n=Array.prototype.slice.call(arguments,0);if(e.is(n[n.length-1],"function")){var s=n.pop();return r?s.call(e._engine.create[p](e,n)):t.on("raphael.DOMload",(function(){s.call(e._engine.create[p](e,n))}))}return e._engine.create[p](e,arguments)}e.version="2.3.0",e.eve=t;var r,i,n,s,a=/[, ]+/,o={circle:1,rect:1,path:1,ellipse:1,text:1,image:1},l=/\{(\d+)\}/g,h="hasOwnProperty",u={doc:document,win:window},c={was:Object.prototype[h].call(u.win,"Raphael"),is:u.win.Raphael},f=function(){this.ca=this.customAttributes={}},p="apply",d="concat",C="ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,g="",x=" ",v=String,y="split",m="click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[y](x),b={mousedown:"touchstart",mousemove:"touchmove",mouseup:"touchend"},_=v.prototype.toLowerCase,w=Math,k=w.max,M=w.min,B=w.abs,S=w.pow,L=w.PI,T="number",A="array",Z=Object.prototype.toString,E=(e._ISURL=/^url\(['"]?(.+?)['"]?\)$/i,/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i),z={NaN:1,Infinity:1,"-Infinity":1},F=/^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,P=w.round,N=parseFloat,j=parseInt,R=v.prototype.toUpperCase,I=e._availableAttrs={"arrow-end":"none","arrow-start":"none",blur:0,"clip-rect":"0 0 1e9 1e9",cursor:"default",cx:0,cy:0,fill:"#fff","fill-opacity":1,font:'10px "Arial"',"font-family":'"Arial"',"font-size":"10","font-style":"normal","font-weight":400,gradient:0,height:0,href:"http://raphaeljs.com/","letter-spacing":0,opacity:1,path:"M0,0",r:0,rx:0,ry:0,src:"",stroke:"#000","stroke-dasharray":"","stroke-linecap":"butt","stroke-linejoin":"butt","stroke-miterlimit":0,"stroke-opacity":1,"stroke-width":1,target:"_blank","text-anchor":"middle",title:"Raphael",transform:"",width:0,x:0,y:0,class:""},O=e._availableAnimAttrs={blur:T,"clip-rect":"csv",cx:T,cy:T,fill:"colour","fill-opacity":T,"font-size":T,height:T,opacity:T,path:"path",r:T,rx:T,ry:T,stroke:"colour","stroke-opacity":T,"stroke-width":T,transform:"transform",width:T,x:T,y:T},D=/[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/,q={hs:1,rg:1},V=/,?([achlmqrstvxz]),?/gi,G=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,W=/([rstm])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,Y=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,H=(e._radial_gradient=/^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*([^\)]+?)\))?/,{}),X=function(t,e){return N(t)-N(e)},U=function(t){return t},$=e._rectPath=function(t,e,r,i,n){return n?[["M",t+n,e],["l",r-2*n,0],["a",n,n,0,0,1,n,n],["l",0,i-2*n],["a",n,n,0,0,1,-n,n],["l",2*n-r,0],["a",n,n,0,0,1,-n,-n],["l",0,2*n-i],["a",n,n,0,0,1,n,-n],["z"]]:[["M",t,e],["l",r,0],["l",0,i],["l",-r,0],["z"]]},Q=function(t,e,r,i){return null==i&&(i=r),[["M",t,e],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]]},J=e._getPath={path:function(t){return t.attr("path")},circle:function(t){var e=t.attrs;return Q(e.cx,e.cy,e.r)},ellipse:function(t){var e=t.attrs;return Q(e.cx,e.cy,e.rx,e.ry)},rect:function(t){var e=t.attrs;return $(e.x,e.y,e.width,e.height,e.r)},image:function(t){var e=t.attrs;return $(e.x,e.y,e.width,e.height)},text:function(t){var e=t._getBBox();return $(e.x,e.y,e.width,e.height)},set:function(t){var e=t._getBBox();return $(e.x,e.y,e.width,e.height)}},K=e.mapPath=function(t,e){if(!e)return t;var r,i,n,s,a,o,l;for(n=0,a=(t=St(t)).length;n<a;n++)for(s=1,o=(l=t[n]).length;s<o;s+=2)r=e.x(l[s],l[s+1]),i=e.y(l[s],l[s+1]),l[s]=r,l[s+1]=i;return t};if(e._g=u,e.type=u.win.SVGAngle||u.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==e.type){var tt,et=u.doc.createElement("div");if(et.innerHTML='<v:shape adj="1"/>',(tt=et.firstChild).style.behavior="url(#default#VML)",!tt||"object"!=typeof tt.adj)return e.type=g;et=null}function rt(t){if("function"==typeof t||Object(t)!==t)return t;var e=new t.constructor;for(var r in t)t[h](r)&&(e[r]=rt(t[r]));return e}e.svg=!(e.vml="VML"==e.type),e._Paper=f,e.fn=i=f.prototype=e.prototype,e._id=0,e.is=function(t,e){return"finite"==(e=_.call(e))?!z[h](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||Z.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,r,i,n,s,a){if(null==s){var o=t-i,l=r-n;return o||l?(180+180*w.atan2(-l,-o)/L+360)%360:0}return e.angle(t,r,s,a)-e.angle(i,n,s,a)},e.rad=function(t){return t%360*L/180},e.deg=function(t){return Math.round(180*t/L%360*1e3)/1e3},e.snapTo=function(t,r,i){if(i=e.is(i,"finite")?i:10,e.is(t,A)){for(var n=t.length;n--;)if(B(t[n]-r)<=i)return t[n]}else{var s=r%(t=+t);if(s<i)return r-s;if(s>t-i)return r-s+t}return r},e.createUUID=(n=/[xy]/g,s=function(t){var e=16*w.random()|0;return("x"==t?e:3&e|8).toString(16)},function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(n,s).toUpperCase()}),e.setWindow=function(r){t("raphael.setWindow",e,u.win,r),u.win=r,u.doc=u.win.document,e._engine.initWin&&e._engine.initWin(u.win)};var it=function(t){if(e.vml){var r,i=/^\s+|\s+$/g;try{var n=new ActiveXObject("htmlfile");n.write("<body>"),n.close(),r=n.body}catch(t){r=createPopup().document.body}var s=r.createTextRange();it=ht((function(t){try{r.style.color=v(t).replace(i,g);var e=s.queryCommandValue("ForeColor");return"#"+("000000"+(e=(255&e)<<16|65280&e|(16711680&e)>>>16).toString(16)).slice(-6)}catch(t){return"none"}}))}else{var a=u.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",u.doc.body.appendChild(a),it=ht((function(t){return a.style.color=t,u.doc.defaultView.getComputedStyle(a,g).getPropertyValue("color")}))}return it(t)},nt=function(){return"hsb("+[this.h,this.s,this.b]+")"},st=function(){return"hsl("+[this.h,this.s,this.l]+")"},at=function(){return this.hex},ot=function(t,r,i){if(null==r&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,r=t.g,t=t.r),null==r&&e.is(t,"string")){var n=e.getRGB(t);t=n.r,r=n.g,i=n.b}return(t>1||r>1||i>1)&&(t/=255,r/=255,i/=255),[t,r,i]},lt=function(t,r,i,n){var s={r:t*=255,g:r*=255,b:i*=255,hex:e.rgb(t,r,i),toString:at};return e.is(n,"finite")&&(s.opacity=n),s};function ht(t,e,r){return function i(){var n=Array.prototype.slice.call(arguments,0),s=n.join("␀"),a=i.cache=i.cache||{},o=i.count=i.count||[];return a[h](s)?(function(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return t.push(t.splice(r,1)[0])}(o,s),r?r(a[s]):a[s]):(o.length>=1e3&&delete a[o.shift()],o.push(s),a[s]=t[p](e,n),r?r(a[s]):a[s])}}function ut(){return this.hex}function ct(t,e){for(var r=[],i=0,n=t.length;n-2*!e>i;i+=2){var s=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?n-4==i?s[3]={x:+t[0],y:+t[1]}:n-2==i&&(s[2]={x:+t[0],y:+t[1]},s[3]={x:+t[2],y:+t[3]}):s[0]={x:+t[n-2],y:+t[n-1]}:n-4==i?s[3]=s[2]:i||(s[0]={x:+t[i],y:+t[i+1]}),r.push(["C",(-s[0].x+6*s[1].x+s[2].x)/6,(-s[0].y+6*s[1].y+s[2].y)/6,(s[1].x+6*s[2].x-s[3].x)/6,(s[1].y+6*s[2].y-s[3].y)/6,s[2].x,s[2].y])}return r}e.color=function(t){var r;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(r=e.hsb2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(r=e.hsl2rgb(t),t.r=r.r,t.g=r.g,t.b=r.b,t.hex=r.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(r=e.rgb2hsl(t),t.h=r.h,t.s=r.s,t.l=r.l,r=e.rgb2hsb(t),t.v=r.b):(t={hex:"none"}).r=t.g=t.b=t.h=t.s=t.v=t.l=-1),t.toString=at,t},e.hsb2rgb=function(t,e,r,i){var n,s,a,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(r=t.b,e=t.s,i=t.o,t=t.h),o=(l=r*e)*(1-B((t=(t*=360)%360/60)%2-1)),n=s=a=r-l,lt(n+=[l,o,0,0,o,l][t=~~t],s+=[o,l,l,o,0,0][t],a+=[0,0,o,l,l,o][t],i)},e.hsl2rgb=function(t,e,r,i){var n,s,a,o,l;return this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(r=t.l,e=t.s,t=t.h),(t>1||e>1||r>1)&&(t/=360,e/=100,r/=100),o=(l=2*e*(r<.5?r:1-r))*(1-B((t=(t*=360)%360/60)%2-1)),n=s=a=r-l/2,lt(n+=[l,o,0,0,o,l][t=~~t],s+=[o,l,l,o,0,0][t],a+=[0,0,o,l,l,o][t],i)},e.rgb2hsb=function(t,e,r){var i,n;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],{h:((0==(n=(i=k(t,e,r))-M(t,e,r))?null:i==t?(e-r)/n:i==e?(r-t)/n+2:(t-e)/n+4)+360)%6*60/360,s:0==n?0:n/i,b:i,toString:nt}},e.rgb2hsl=function(t,e,r){var i,n,s,a;return t=(r=ot(t,e,r))[0],e=r[1],r=r[2],i=((n=k(t,e,r))+(s=M(t,e,r)))/2,{h:((0==(a=n-s)?null:n==t?(e-r)/a:n==e?(r-t)/a+2:(t-e)/a+4)+360)%6*60/360,s:0==a?0:i<.5?a/(2*i):a/(2-2*i),l:i,toString:st}},e._path2string=function(){return this.join(",").replace(V,"$1")},e._preload=function(t,e){var r=u.doc.createElement("img");r.style.cssText="position:absolute;left:-9999em;top:-9999em",r.onload=function(){e.call(this),this.onload=null,u.doc.body.removeChild(this)},r.onerror=function(){u.doc.body.removeChild(this)},u.doc.body.appendChild(r),r.src=t},e.getRGB=ht((function(t){if(!t||(t=v(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:ut};!q[h](t.toLowerCase().substring(0,2))&&"#"!=t.charAt()&&(t=it(t));var r,i,n,s,a,o,l=t.match(E);return l?(l[2]&&(n=j(l[2].substring(5),16),i=j(l[2].substring(3,5),16),r=j(l[2].substring(1,3),16)),l[3]&&(n=j((a=l[3].charAt(3))+a,16),i=j((a=l[3].charAt(2))+a,16),r=j((a=l[3].charAt(1))+a,16)),l[4]&&(o=l[4][y](D),r=N(o[0]),"%"==o[0].slice(-1)&&(r*=2.55),i=N(o[1]),"%"==o[1].slice(-1)&&(i*=2.55),n=N(o[2]),"%"==o[2].slice(-1)&&(n*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(s=N(o[3])),o[3]&&"%"==o[3].slice(-1)&&(s/=100)),l[5]?(o=l[5][y](D),r=N(o[0]),"%"==o[0].slice(-1)&&(r*=2.55),i=N(o[1]),"%"==o[1].slice(-1)&&(i*=2.55),n=N(o[2]),"%"==o[2].slice(-1)&&(n*=2.55),("deg"==o[0].slice(-3)||"°"==o[0].slice(-1))&&(r/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(s=N(o[3])),o[3]&&"%"==o[3].slice(-1)&&(s/=100),e.hsb2rgb(r,i,n,s)):l[6]?(o=l[6][y](D),r=N(o[0]),"%"==o[0].slice(-1)&&(r*=2.55),i=N(o[1]),"%"==o[1].slice(-1)&&(i*=2.55),n=N(o[2]),"%"==o[2].slice(-1)&&(n*=2.55),("deg"==o[0].slice(-3)||"°"==o[0].slice(-1))&&(r/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(s=N(o[3])),o[3]&&"%"==o[3].slice(-1)&&(s/=100),e.hsl2rgb(r,i,n,s)):((l={r:r,g:i,b:n,toString:ut}).hex="#"+(16777216|n|i<<8|r<<16).toString(16).slice(1),e.is(s,"finite")&&(l.opacity=s),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:ut}}),e),e.hsb=ht((function(t,r,i){return e.hsb2rgb(t,r,i).hex})),e.hsl=ht((function(t,r,i){return e.hsl2rgb(t,r,i).hex})),e.rgb=ht((function(t,e,r){function i(t){return t+.5|0}return"#"+(16777216|i(r)|i(e)<<8|i(t)<<16).toString(16).slice(1)})),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},r=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),r.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var r=ft(t);if(r.arr)return yt(r.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},n=[];return e.is(t,A)&&e.is(t[0],A)&&(n=yt(t)),n.length||v(t).replace(G,(function(t,e,r){var s=[],a=e.toLowerCase();if(r.replace(Y,(function(t,e){e&&s.push(+e)})),"m"==a&&s.length>2&&(n.push([e][d](s.splice(0,2))),a="l",e="m"==e?"l":"L"),"r"==a)n.push([e][d](s));else for(;s.length>=i[a]&&(n.push([e][d](s.splice(0,i[a]))),i[a]););})),n.toString=e._path2string,r.arr=yt(n),n},e.parseTransformString=ht((function(t){if(!t)return null;var r=[];return e.is(t,A)&&e.is(t[0],A)&&(r=yt(t)),r.length||v(t).replace(W,(function(t,e,i){var n=[];_.call(e),i.replace(Y,(function(t,e){e&&n.push(+e)})),r.push([e][d](n))})),r.toString=e._path2string,r}),this,(function(t){if(!t)return t;for(var e=[],r=0;r<t.length;r++){for(var i=[],n=0;n<t[r].length;n++)i.push(t[r][n]);e.push(i)}return e}));var ft=function(t){var e=ft.ps=ft.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout((function(){for(var r in e)e[h](r)&&r!=t&&(e[r].sleep--,!e[r].sleep&&delete e[r])})),e[t]};function pt(t,e,r,i,n){return t*(t*(-3*e+9*r-9*i+3*n)+6*e-12*r+6*i)-3*e+3*r}function dt(t,e,r,i,n,s,a,o,l){null==l&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],c=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,p=0;p<12;p++){var d=h*u[p]+h,C=pt(d,t,r,n,a),g=pt(d,e,i,s,o),x=C*C+g*g;f+=c[p]*w.sqrt(x)}return h*f}function Ct(t,e,r,i,n,s,a,o){if(!(k(t,r)<M(n,a)||M(t,r)>k(n,a)||k(e,i)<M(s,o)||M(e,i)>k(s,o))){var l=(t-r)*(s-o)-(e-i)*(n-a);if(l){var h=((t*i-e*r)*(n-a)-(t-r)*(n*o-s*a))/l,u=((t*i-e*r)*(s-o)-(e-i)*(n*o-s*a))/l,c=+h.toFixed(2),f=+u.toFixed(2);if(!(c<+M(t,r).toFixed(2)||c>+k(t,r).toFixed(2)||c<+M(n,a).toFixed(2)||c>+k(n,a).toFixed(2)||f<+M(e,i).toFixed(2)||f>+k(e,i).toFixed(2)||f<+M(s,o).toFixed(2)||f>+k(s,o).toFixed(2)))return{x:h,y:u}}}}function gt(t,r,i){var n=e.bezierBBox(t),s=e.bezierBBox(r);if(!e.isBBoxIntersect(n,s))return i?0:[];for(var a=dt.apply(0,t),o=dt.apply(0,r),l=k(~~(a/5),1),h=k(~~(o/5),1),u=[],c=[],f={},p=i?0:[],d=0;d<l+1;d++){var C=e.findDotsAtSegment.apply(e,t.concat(d/l));u.push({x:C.x,y:C.y,t:d/l})}for(d=0;d<h+1;d++)C=e.findDotsAtSegment.apply(e,r.concat(d/h)),c.push({x:C.x,y:C.y,t:d/h});for(d=0;d<l;d++)for(var g=0;g<h;g++){var x=u[d],v=u[d+1],y=c[g],m=c[g+1],b=B(v.x-x.x)<.001?"y":"x",_=B(m.x-y.x)<.001?"y":"x",w=Ct(x.x,x.y,v.x,v.y,y.x,y.y,m.x,m.y);if(w){if(f[w.x.toFixed(4)]==w.y.toFixed(4))continue;f[w.x.toFixed(4)]=w.y.toFixed(4);var S=x.t+B((w[b]-x[b])/(v[b]-x[b]))*(v.t-x.t),L=y.t+B((w[_]-y[_])/(m[_]-y[_]))*(m.t-y.t);S>=0&&S<=1.001&&L>=0&&L<=1.001&&(i?p++:p.push({x:w.x,y:w.y,t1:M(S,1),t2:M(L,1)}))}}return p}function xt(t,r,i){t=e._path2curve(t),r=e._path2curve(r);for(var n,s,a,o,l,h,u,c,f,p,d=i?0:[],C=0,g=t.length;C<g;C++){var x=t[C];if("M"==x[0])n=l=x[1],s=h=x[2];else{"C"==x[0]?(f=[n,s].concat(x.slice(1)),n=f[6],s=f[7]):(f=[n,s,n,s,l,h,l,h],n=l,s=h);for(var v=0,y=r.length;v<y;v++){var m=r[v];if("M"==m[0])a=u=m[1],o=c=m[2];else{"C"==m[0]?(p=[a,o].concat(m.slice(1)),a=p[6],o=p[7]):(p=[a,o,a,o,u,c,u,c],a=u,o=c);var b=gt(f,p,i);if(i)d+=b;else{for(var _=0,w=b.length;_<w;_++)b[_].segment1=C,b[_].segment2=v,b[_].bez1=f,b[_].bez2=p;d=d.concat(b)}}}}}return d}e.findDotsAtSegment=function(t,e,r,i,n,s,a,o,l){var h=1-l,u=S(h,3),c=S(h,2),f=l*l,p=f*l,d=u*t+3*c*l*r+3*h*l*l*n+p*a,C=u*e+3*c*l*i+3*h*l*l*s+p*o,g=t+2*l*(r-t)+f*(n-2*r+t),x=e+2*l*(i-e)+f*(s-2*i+e),v=r+2*l*(n-r)+f*(a-2*n+r),y=i+2*l*(s-i)+f*(o-2*s+i),m=h*t+l*r,b=h*e+l*i,_=h*n+l*a,k=h*s+l*o,M=90-180*w.atan2(g-v,x-y)/L;return(g>v||x<y)&&(M+=180),{x:d,y:C,m:{x:g,y:x},n:{x:v,y:y},start:{x:m,y:b},end:{x:_,y:k},alpha:M}},e.bezierBBox=function(t,r,i,n,s,a,o,l){e.is(t,"array")||(t=[t,r,i,n,s,a,o,l]);var h=Bt.apply(null,t);return{x:h.min.x,y:h.min.y,x2:h.max.x,y2:h.max.y,width:h.max.x-h.min.x,height:h.max.y-h.min.y}},e.isPointInsideBBox=function(t,e,r){return e>=t.x&&e<=t.x2&&r>=t.y&&r<=t.y2},e.isBBoxIntersect=function(t,r){var i=e.isPointInsideBBox;return i(r,t.x,t.y)||i(r,t.x2,t.y)||i(r,t.x,t.y2)||i(r,t.x2,t.y2)||i(t,r.x,r.y)||i(t,r.x2,r.y)||i(t,r.x,r.y2)||i(t,r.x2,r.y2)||(t.x<r.x2&&t.x>r.x||r.x<t.x2&&r.x>t.x)&&(t.y<r.y2&&t.y>r.y||r.y<t.y2&&r.y>t.y)},e.pathIntersection=function(t,e){return xt(t,e)},e.pathIntersectionNumber=function(t,e){return xt(t,e,1)},e.isPointInsidePath=function(t,r,i){var n=e.pathBBox(t);return e.isPointInsideBBox(n,r,i)&&xt(t,[["M",r,i],["H",n.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var vt=e.pathBBox=function(t){var e=ft(t);if(e.bbox)return rt(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};for(var r,i=0,n=0,s=[],a=[],o=0,l=(t=St(t)).length;o<l;o++)if("M"==(r=t[o])[0])i=r[1],n=r[2],s.push(i),a.push(n);else{var h=Bt(i,n,r[1],r[2],r[3],r[4],r[5],r[6]);s=s[d](h.min.x,h.max.x),a=a[d](h.min.y,h.max.y),i=r[5],n=r[6]}var u=M[p](0,s),c=M[p](0,a),f=k[p](0,s),C=k[p](0,a),g=f-u,x=C-c,v={x:u,y:c,x2:f,y2:C,width:g,height:x,cx:u+g/2,cy:c+x/2};return e.bbox=rt(v),v},yt=function(t){var r=rt(t);return r.toString=e._path2string,r},mt=e._pathToRelative=function(t){var r=ft(t);if(r.rel)return yt(r.rel);e.is(t,A)&&e.is(t&&t[0],A)||(t=e.parsePathString(t));var i=[],n=0,s=0,a=0,o=0,l=0;"M"==t[0][0]&&(a=n=t[0][1],o=s=t[0][2],l++,i.push(["M",n,s]));for(var h=l,u=t.length;h<u;h++){var c=i[h]=[],f=t[h];if(f[0]!=_.call(f[0]))switch(c[0]=_.call(f[0]),c[0]){case"a":c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=+(f[6]-n).toFixed(3),c[7]=+(f[7]-s).toFixed(3);break;case"v":c[1]=+(f[1]-s).toFixed(3);break;case"m":a=f[1],o=f[2];default:for(var p=1,d=f.length;p<d;p++)c[p]=+(f[p]-(p%2?n:s)).toFixed(3)}else{c=i[h]=[],"m"==f[0]&&(a=f[1]+n,o=f[2]+s);for(var C=0,g=f.length;C<g;C++)i[h][C]=f[C]}var x=i[h].length;switch(i[h][0]){case"z":n=a,s=o;break;case"h":n+=+i[h][x-1];break;case"v":s+=+i[h][x-1];break;default:n+=+i[h][x-2],s+=+i[h][x-1]}}return i.toString=e._path2string,r.rel=yt(i),i},bt=e._pathToAbsolute=function(t){var r=ft(t);if(r.abs)return yt(r.abs);if(e.is(t,A)&&e.is(t&&t[0],A)||(t=e.parsePathString(t)),!t||!t.length)return[["M",0,0]];var i=[],n=0,s=0,a=0,o=0,l=0;"M"==t[0][0]&&(a=n=+t[0][1],o=s=+t[0][2],l++,i[0]=["M",n,s]);for(var h,u,c=3==t.length&&"M"==t[0][0]&&"R"==t[1][0].toUpperCase()&&"Z"==t[2][0].toUpperCase(),f=l,p=t.length;f<p;f++){if(i.push(h=[]),(u=t[f])[0]!=R.call(u[0]))switch(h[0]=R.call(u[0]),h[0]){case"A":h[1]=u[1],h[2]=u[2],h[3]=u[3],h[4]=u[4],h[5]=u[5],h[6]=+(u[6]+n),h[7]=+(u[7]+s);break;case"V":h[1]=+u[1]+s;break;case"H":h[1]=+u[1]+n;break;case"R":for(var C=[n,s][d](u.slice(1)),g=2,x=C.length;g<x;g++)C[g]=+C[g]+n,C[++g]=+C[g]+s;i.pop(),i=i[d](ct(C,c));break;case"M":a=+u[1]+n,o=+u[2]+s;default:for(g=1,x=u.length;g<x;g++)h[g]=+u[g]+(g%2?n:s)}else if("R"==u[0])C=[n,s][d](u.slice(1)),i.pop(),i=i[d](ct(C,c)),h=["R"][d](u.slice(-2));else for(var v=0,y=u.length;v<y;v++)h[v]=u[v];switch(h[0]){case"Z":n=a,s=o;break;case"H":n=h[1];break;case"V":s=h[1];break;case"M":a=h[h.length-2],o=h[h.length-1];default:n=h[h.length-2],s=h[h.length-1]}}return i.toString=e._path2string,r.abs=yt(i),i},_t=function(t,e,r,i){return[t,e,r,i,r,i]},wt=function(t,e,r,i,n,s){return[1/3*t+2/3*r,1/3*e+2/3*i,1/3*n+2/3*r,1/3*s+2/3*i,n,s]},kt=function(t,e,r,i,n,s,a,o,l,h){var u,c=120*L/180,f=L/180*(+n||0),p=[],C=ht((function(t,e,r){return{x:t*w.cos(r)-e*w.sin(r),y:t*w.sin(r)+e*w.cos(r)}}));if(h)S=h[0],T=h[1],k=h[2],M=h[3];else{t=(u=C(t,e,-f)).x,e=u.y,o=(u=C(o,l,-f)).x,l=u.y,w.cos(L/180*n),w.sin(L/180*n);var g=(t-o)/2,x=(e-l)/2,v=g*g/(r*r)+x*x/(i*i);v>1&&(r*=v=w.sqrt(v),i*=v);var m=r*r,b=i*i,_=(s==a?-1:1)*w.sqrt(B((m*b-m*x*x-b*g*g)/(m*x*x+b*g*g))),k=_*r*x/i+(t+o)/2,M=_*-i*g/r+(e+l)/2,S=w.asin(((e-M)/i).toFixed(9)),T=w.asin(((l-M)/i).toFixed(9));(S=t<k?L-S:S)<0&&(S=2*L+S),(T=o<k?L-T:T)<0&&(T=2*L+T),a&&S>T&&(S-=2*L),!a&&T>S&&(T-=2*L)}var A=T-S;if(B(A)>c){var Z=T,E=o,z=l;T=S+c*(a&&T>S?1:-1),o=k+r*w.cos(T),l=M+i*w.sin(T),p=kt(o,l,r,i,n,0,a,E,z,[T,Z,k,M])}A=T-S;var F=w.cos(S),P=w.sin(S),N=w.cos(T),j=w.sin(T),R=w.tan(A/4),I=4/3*r*R,O=4/3*i*R,D=[t,e],q=[t+I*P,e-O*F],V=[o+I*j,l-O*N],G=[o,l];if(q[0]=2*D[0]-q[0],q[1]=2*D[1]-q[1],h)return[q,V,G][d](p);for(var W=[],Y=0,H=(p=[q,V,G][d](p).join()[y](",")).length;Y<H;Y++)W[Y]=Y%2?C(p[Y-1],p[Y],f).y:C(p[Y],p[Y+1],f).x;return W},Mt=function(t,e,r,i,n,s,a,o,l){var h=1-l;return{x:S(h,3)*t+3*S(h,2)*l*r+3*h*l*l*n+S(l,3)*a,y:S(h,3)*e+3*S(h,2)*l*i+3*h*l*l*s+S(l,3)*o}},Bt=ht((function(t,e,r,i,n,s,a,o){var l,h=n-2*r+t-(a-2*n+r),u=2*(r-t)-2*(n-r),c=t-r,f=(-u+w.sqrt(u*u-4*h*c))/2/h,d=(-u-w.sqrt(u*u-4*h*c))/2/h,C=[e,o],g=[t,a];return B(f)>"1e12"&&(f=.5),B(d)>"1e12"&&(d=.5),f>0&&f<1&&(l=Mt(t,e,r,i,n,s,a,o,f),g.push(l.x),C.push(l.y)),d>0&&d<1&&(l=Mt(t,e,r,i,n,s,a,o,d),g.push(l.x),C.push(l.y)),h=s-2*i+e-(o-2*s+i),c=e-i,f=(-(u=2*(i-e)-2*(s-i))+w.sqrt(u*u-4*h*c))/2/h,d=(-u-w.sqrt(u*u-4*h*c))/2/h,B(f)>"1e12"&&(f=.5),B(d)>"1e12"&&(d=.5),f>0&&f<1&&(l=Mt(t,e,r,i,n,s,a,o,f),g.push(l.x),C.push(l.y)),d>0&&d<1&&(l=Mt(t,e,r,i,n,s,a,o,d),g.push(l.x),C.push(l.y)),{min:{x:M[p](0,g),y:M[p](0,C)},max:{x:k[p](0,g),y:k[p](0,C)}}})),St=e._path2curve=ht((function(t,e){var r=!e&&ft(t);if(!e&&r.curve)return yt(r.curve);for(var i=bt(t),n=e&&bt(e),s={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},o=function(t,e,r){var i,n;if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in{T:1,Q:1})&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][d](kt[p](0,[e.x,e.y][d](t.slice(1))));break;case"S":"C"==r||"S"==r?(i=2*e.x-e.bx,n=2*e.y-e.by):(i=e.x,n=e.y),t=["C",i,n][d](t.slice(1));break;case"T":"Q"==r||"T"==r?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][d](wt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][d](wt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][d](_t(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][d](_t(e.x,e.y,t[1],e.y));break;case"V":t=["C"][d](_t(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][d](_t(e.x,e.y,e.X,e.Y))}return t},l=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)u[e]="A",n&&(c[e]="A"),t.splice(e++,0,["C"][d](r.splice(0,6)));t.splice(e,1),x=k(i.length,n&&n.length||0)}},h=function(t,e,r,s,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",s.x,s.y]),r.bx=0,r.by=0,r.x=t[a][1],r.y=t[a][2],x=k(i.length,n&&n.length||0))},u=[],c=[],f="",C="",g=0,x=k(i.length,n&&n.length||0);g<x;g++){i[g]&&(f=i[g][0]),"C"!=f&&(u[g]=f,g&&(C=u[g-1])),i[g]=o(i[g],s,C),"A"!=u[g]&&"C"==f&&(u[g]="C"),l(i,g),n&&(n[g]&&(f=n[g][0]),"C"!=f&&(c[g]=f,g&&(C=c[g-1])),n[g]=o(n[g],a,C),"A"!=c[g]&&"C"==f&&(c[g]="C"),l(n,g)),h(i,n,s,a,g),h(n,i,a,s,g);var v=i[g],y=n&&n[g],m=v.length,b=n&&y.length;s.x=v[m-2],s.y=v[m-1],s.bx=N(v[m-4])||s.x,s.by=N(v[m-3])||s.y,a.bx=n&&(N(y[b-4])||a.x),a.by=n&&(N(y[b-3])||a.y),a.x=n&&y[b-2],a.y=n&&y[b-1]}return n||(r.curve=yt(i)),n?[i,n]:i}),null,yt),Lt=(e._parseDots=ht((function(t){for(var r=[],i=0,n=t.length;i<n;i++){var s={},a=t[i].match(/^([^:]*):?([\d\.]*)/);if(s.color=e.getRGB(a[1]),s.color.error)return null;s.opacity=s.color.opacity,s.color=s.color.hex,a[2]&&(s.offset=a[2]+"%"),r.push(s)}for(i=1,n=r.length-1;i<n;i++)if(!r[i].offset){for(var o=N(r[i-1].offset||0),l=0,h=i+1;h<n;h++)if(r[h].offset){l=r[h].offset;break}l||(l=100,h=n);for(var u=((l=N(l))-o)/(h-i+1);i<h;i++)o+=u,r[i].offset=o+"%"}return r})),e._tear=function(t,e){t==e.top&&(e.top=t.prev),t==e.bottom&&(e.bottom=t.next),t.next&&(t.next.prev=t.prev),t.prev&&(t.prev.next=t.next)}),Tt=(e._tofront=function(t,e){e.top!==t&&(Lt(t,e),t.next=null,t.prev=e.top,e.top.next=t,e.top=t)},e._toback=function(t,e){e.bottom!==t&&(Lt(t,e),t.next=e.bottom,t.prev=null,e.bottom.prev=t,e.bottom=t)},e._insertafter=function(t,e,r){Lt(t,r),e==r.top&&(r.top=t),e.next&&(e.next.prev=t),t.next=e.next,t.prev=e,e.next=t},e._insertbefore=function(t,e,r){Lt(t,r),e==r.bottom&&(r.bottom=t),e.prev&&(e.prev.next=t),t.prev=e.prev,e.prev=t,t.next=e},e.toMatrix=function(t,e){var r=vt(t),i={_:{transform:g},getBBox:function(){return r}};return At(i,e),i.matrix}),At=(e.transformPath=function(t,e){return K(t,Tt(t,e))},e._extractTransform=function(t,r){if(null==r)return t._.transform;r=v(r).replace(/\.{3}|\u2026/g,t._.transform||g);var i,n,s=e.parseTransformString(r),a=0,o=1,l=1,h=t._,u=new zt;if(h.transform=s||[],s)for(var c=0,f=s.length;c<f;c++){var p,d,C,x,y,m=s[c],b=m.length,_=v(m[0]).toLowerCase(),w=m[0]!=_,k=w?u.invert():0;"t"==_&&3==b?w?(p=k.x(0,0),d=k.y(0,0),C=k.x(m[1],m[2]),x=k.y(m[1],m[2]),u.translate(C-p,x-d)):u.translate(m[1],m[2]):"r"==_?2==b?(y=y||t.getBBox(1),u.rotate(m[1],y.x+y.width/2,y.y+y.height/2),a+=m[1]):4==b&&(w?(C=k.x(m[2],m[3]),x=k.y(m[2],m[3]),u.rotate(m[1],C,x)):u.rotate(m[1],m[2],m[3]),a+=m[1]):"s"==_?2==b||3==b?(y=y||t.getBBox(1),u.scale(m[1],m[b-1],y.x+y.width/2,y.y+y.height/2),o*=m[1],l*=m[b-1]):5==b&&(w?(C=k.x(m[3],m[4]),x=k.y(m[3],m[4]),u.scale(m[1],m[2],C,x)):u.scale(m[1],m[2],m[3],m[4]),o*=m[1],l*=m[2]):"m"==_&&7==b&&u.add(m[1],m[2],m[3],m[4],m[5],m[6]),h.dirtyT=1,t.matrix=u}t.matrix=u,h.sx=o,h.sy=l,h.deg=a,h.dx=i=u.e,h.dy=n=u.f,1==o&&1==l&&!a&&h.bbox?(h.bbox.x+=+i,h.bbox.y+=+n):h.dirtyT=1}),Zt=function(t){var e=t[0];switch(e.toLowerCase()){case"t":return[e,0,0];case"m":return[e,1,0,0,1,0,0];case"r":return 4==t.length?[e,0,t[2],t[3]]:[e,0];case"s":return 5==t.length?[e,1,1,t[3],t[4]]:3==t.length?[e,1,1]:[e,1]}},Et=e._equaliseTransform=function(t,r){r=v(r).replace(/\.{3}|\u2026/g,t),t=e.parseTransformString(t)||[],r=e.parseTransformString(r)||[];for(var i,n,s,a,o=k(t.length,r.length),l=[],h=[],u=0;u<o;u++){if(s=t[u]||Zt(r[u]),a=r[u]||Zt(s),s[0]!=a[0]||"r"==s[0].toLowerCase()&&(s[2]!=a[2]||s[3]!=a[3])||"s"==s[0].toLowerCase()&&(s[3]!=a[3]||s[4]!=a[4]))return;for(l[u]=[],h[u]=[],i=0,n=k(s.length,a.length);i<n;i++)i in s&&(l[u][i]=s[i]),i in a&&(h[u][i]=a[i])}return{from:l,to:h}};function zt(t,e,r,i,n,s){null!=t?(this.a=+t,this.b=+e,this.c=+r,this.d=+i,this.e=+n,this.f=+s):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}e._getContainer=function(t,r,i,n){var s;if(null!=(s=null!=n||e.is(t,"object")?t:u.doc.getElementById(t)))return s.tagName?null==r?{container:s,width:s.style.pixelWidth||s.offsetWidth,height:s.style.pixelHeight||s.offsetHeight}:{container:s,width:r,height:i}:{container:1,x:t,y:r,width:i,height:n}},e.pathToRelative=mt,e._engine={},e.path2curve=St,e.matrix=function(t,e,r,i,n,s){return new zt(t,e,r,i,n,s)},function(t){function r(t){return t[0]*t[0]+t[1]*t[1]}function i(t){var e=w.sqrt(r(t));t[0]&&(t[0]/=e),t[1]&&(t[1]/=e)}t.add=function(t,e,r,i,n,s){var a,o,l,h,u=[[],[],[]],c=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],f=[[t,r,n],[e,i,s],[0,0,1]];for(t&&t instanceof zt&&(f=[[t.a,t.c,t.e],[t.b,t.d,t.f],[0,0,1]]),a=0;a<3;a++)for(o=0;o<3;o++){for(h=0,l=0;l<3;l++)h+=c[a][l]*f[l][o];u[a][o]=h}this.a=u[0][0],this.b=u[1][0],this.c=u[0][1],this.d=u[1][1],this.e=u[0][2],this.f=u[1][2]},t.invert=function(){var t=this,e=t.a*t.d-t.b*t.c;return new zt(t.d/e,-t.b/e,-t.c/e,t.a/e,(t.c*t.f-t.d*t.e)/e,(t.b*t.e-t.a*t.f)/e)},t.clone=function(){return new zt(this.a,this.b,this.c,this.d,this.e,this.f)},t.translate=function(t,e){this.add(1,0,0,1,t,e)},t.scale=function(t,e,r,i){null==e&&(e=t),(r||i)&&this.add(1,0,0,1,r,i),this.add(t,0,0,e,0,0),(r||i)&&this.add(1,0,0,1,-r,-i)},t.rotate=function(t,r,i){t=e.rad(t),r=r||0,i=i||0;var n=+w.cos(t).toFixed(9),s=+w.sin(t).toFixed(9);this.add(n,s,-s,n,r,i),this.add(1,0,0,1,-r,-i)},t.x=function(t,e){return t*this.a+e*this.c+this.e},t.y=function(t,e){return t*this.b+e*this.d+this.f},t.get=function(t){return+this[v.fromCharCode(97+t)].toFixed(4)},t.toString=function(){return e.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},t.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},t.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},t.split=function(){var t={};t.dx=this.e,t.dy=this.f;var n=[[this.a,this.c],[this.b,this.d]];t.scalex=w.sqrt(r(n[0])),i(n[0]),t.shear=n[0][0]*n[1][0]+n[0][1]*n[1][1],n[1]=[n[1][0]-n[0][0]*t.shear,n[1][1]-n[0][1]*t.shear],t.scaley=w.sqrt(r(n[1])),i(n[1]),t.shear/=t.scaley;var s=-n[0][1],a=n[1][1];return a<0?(t.rotate=e.deg(w.acos(a)),s<0&&(t.rotate=360-t.rotate)):t.rotate=e.deg(w.asin(s)),t.isSimple=!(+t.shear.toFixed(9)||t.scalex.toFixed(9)!=t.scaley.toFixed(9)&&t.rotate),t.isSuperSimple=!+t.shear.toFixed(9)&&t.scalex.toFixed(9)==t.scaley.toFixed(9)&&!t.rotate,t.noRotation=!+t.shear.toFixed(9)&&!t.rotate,t},t.toTransformString=function(t){var e=t||this[y]();return e.isSimple?(e.scalex=+e.scalex.toFixed(4),e.scaley=+e.scaley.toFixed(4),e.rotate=+e.rotate.toFixed(4),(e.dx||e.dy?"t"+[e.dx,e.dy]:g)+(1!=e.scalex||1!=e.scaley?"s"+[e.scalex,e.scaley,0,0]:g)+(e.rotate?"r"+[e.rotate,0,0]:g)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(zt.prototype);for(var Ft=function(){this.returnValue=!1},Pt=function(){return this.originalEvent.preventDefault()},Nt=function(){this.cancelBubble=!0},jt=function(){return this.originalEvent.stopPropagation()},Rt=function(t){var e=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,r=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft;return{x:t.clientX+r,y:t.clientY+e}},It=u.doc.addEventListener?function(t,e,r,i){var n=function(t){var e=Rt(t);return r.call(i,t,e.x,e.y)};if(t.addEventListener(e,n,!1),C&&b[e]){var s=function(e){for(var n=Rt(e),s=e,a=0,o=e.targetTouches&&e.targetTouches.length;a<o;a++)if(e.targetTouches[a].target==t){(e=e.targetTouches[a]).originalEvent=s,e.preventDefault=Pt,e.stopPropagation=jt;break}return r.call(i,e,n.x,n.y)};t.addEventListener(b[e],s,!1)}return function(){return t.removeEventListener(e,n,!1),C&&b[e]&&t.removeEventListener(b[e],s,!1),!0}}:u.doc.attachEvent?function(t,e,r,i){var n=function(t){t=t||u.win.event;var e=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,n=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,s=t.clientX+n,a=t.clientY+e;return t.preventDefault=t.preventDefault||Ft,t.stopPropagation=t.stopPropagation||Nt,r.call(i,t,s,a)};return t.attachEvent("on"+e,n),function(){return t.detachEvent("on"+e,n),!0}}:void 0,Ot=[],Dt=function(e){for(var r,i=e.clientX,n=e.clientY,s=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,a=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft,o=Ot.length;o--;){if(r=Ot[o],C&&e.touches){for(var l,h=e.touches.length;h--;)if((l=e.touches[h]).identifier==r.el._drag.id){i=l.clientX,n=l.clientY,(e.originalEvent?e.originalEvent:e).preventDefault();break}}else e.preventDefault();var c,f=r.el.node,p=f.nextSibling,d=f.parentNode,g=f.style.display;u.win.opera&&d.removeChild(f),f.style.display="none",c=r.el.paper.getElementByPoint(i,n),f.style.display=g,u.win.opera&&(p?d.insertBefore(f,p):d.appendChild(f)),c&&t("raphael.drag.over."+r.el.id,r.el,c),i+=a,n+=s,t("raphael.drag.move."+r.el.id,r.move_scope||r.el,i-r.el._drag.x,n-r.el._drag.y,i,n,e)}},qt=function(r){e.unmousemove(Dt).unmouseup(qt);for(var i,n=Ot.length;n--;)(i=Ot[n]).el._drag={},t("raphael.drag.end."+i.el.id,i.end_scope||i.start_scope||i.move_scope||i.el,r);Ot=[]},Vt=e.el={},Gt=m.length;Gt--;)!function(t){e[t]=Vt[t]=function(r,i){return e.is(r,"function")&&(this.events=this.events||[],this.events.push({name:t,f:r,unbind:It(this.shape||this.node||u.doc,t,r,i||this)})),this},e["un"+t]=Vt["un"+t]=function(r){for(var i=this.events||[],n=i.length;n--;)i[n].name!=t||!e.is(r,"undefined")&&i[n].f!=r||(i[n].unbind(),i.splice(n,1),!i.length&&delete this.events);return this}}(m[Gt]);Vt.data=function(r,i){var n=H[this.id]=H[this.id]||{};if(0==arguments.length)return n;if(1==arguments.length){if(e.is(r,"object")){for(var s in r)r[h](s)&&this.data(s,r[s]);return this}return t("raphael.data.get."+this.id,this,n[r],r),n[r]}return n[r]=i,t("raphael.data.set."+this.id,this,i,r),this},Vt.removeData=function(t){return null==t?delete H[this.id]:H[this.id]&&delete H[this.id][t],this},Vt.getData=function(){return rt(H[this.id]||{})},Vt.hover=function(t,e,r,i){return this.mouseover(t,r).mouseout(e,i||r)},Vt.unhover=function(t,e){return this.unmouseover(t).unmouseout(e)};var Wt=[];function Yt(){return this.x+x+this.y+x+this.width+" × "+this.height}Vt.drag=function(r,i,n,s,a,o){function l(l){(l.originalEvent||l).preventDefault();var h=l.clientX,c=l.clientY,f=u.doc.documentElement.scrollTop||u.doc.body.scrollTop,p=u.doc.documentElement.scrollLeft||u.doc.body.scrollLeft;if(this._drag.id=l.identifier,C&&l.touches)for(var d,g=l.touches.length;g--;)if(d=l.touches[g],this._drag.id=d.identifier,d.identifier==this._drag.id){h=d.clientX,c=d.clientY;break}this._drag.x=h+p,this._drag.y=c+f,!Ot.length&&e.mousemove(Dt).mouseup(qt),Ot.push({el:this,move_scope:s,start_scope:a,end_scope:o}),i&&t.on("raphael.drag.start."+this.id,i),r&&t.on("raphael.drag.move."+this.id,r),n&&t.on("raphael.drag.end."+this.id,n),t("raphael.drag.start."+this.id,a||s||this,this._drag.x,this._drag.y,l)}return this._drag={},Wt.push({el:this,start:l}),this.mousedown(l),this},Vt.onDragOver=function(e){e?t.on("raphael.drag.over."+this.id,e):t.unbind("raphael.drag.over."+this.id)},Vt.undrag=function(){for(var r=Wt.length;r--;)Wt[r].el==this&&(this.unmousedown(Wt[r].start),Wt.splice(r,1),t.unbind("raphael.drag.*."+this.id));!Wt.length&&e.unmousemove(Dt).unmouseup(qt),Ot=[]},i.circle=function(t,r,i){var n=e._engine.circle(this,t||0,r||0,i||0);return this.__set__&&this.__set__.push(n),n},i.rect=function(t,r,i,n,s){var a=e._engine.rect(this,t||0,r||0,i||0,n||0,s||0);return this.__set__&&this.__set__.push(a),a},i.ellipse=function(t,r,i,n){var s=e._engine.ellipse(this,t||0,r||0,i||0,n||0);return this.__set__&&this.__set__.push(s),s},i.path=function(t){t&&!e.is(t,"string")&&!e.is(t[0],A)&&(t+=g);var r=e._engine.path(e.format[p](e,arguments),this);return this.__set__&&this.__set__.push(r),r},i.image=function(t,r,i,n,s){var a=e._engine.image(this,t||"about:blank",r||0,i||0,n||0,s||0);return this.__set__&&this.__set__.push(a),a},i.text=function(t,r,i){var n=e._engine.text(this,t||0,r||0,v(i));return this.__set__&&this.__set__.push(n),n},i.set=function(t){!e.is(t,"array")&&(t=Array.prototype.splice.call(arguments,0,arguments.length));var r=new ce(t);return this.__set__&&this.__set__.push(r),r.paper=this,r.type="set",r},i.setStart=function(t){this.__set__=t||this.set()},i.setFinish=function(t){var e=this.__set__;return delete this.__set__,e},i.getSize=function(){var t=this.canvas.parentNode;return{width:t.offsetWidth,height:t.offsetHeight}},i.setSize=function(t,r){return e._engine.setSize.call(this,t,r)},i.setViewBox=function(t,r,i,n,s){return e._engine.setViewBox.call(this,t,r,i,n,s)},i.top=i.bottom=null,i.raphael=e,i.getElementByPoint=function(t,e){var r,i,n,s,a,o,l,h=this.canvas,c=u.doc.elementFromPoint(t,e);if(u.win.opera&&"svg"==c.tagName){var f=(i=(r=h).getBoundingClientRect(),s=(n=r.ownerDocument).body,o=(a=n.documentElement).clientTop||s.clientTop||0,l=a.clientLeft||s.clientLeft||0,{y:i.top+(u.win.pageYOffset||a.scrollTop||s.scrollTop)-o,x:i.left+(u.win.pageXOffset||a.scrollLeft||s.scrollLeft)-l}),p=h.createSVGRect();p.x=t-f.x,p.y=e-f.y,p.width=p.height=1;var d=h.getIntersectionList(p,null);d.length&&(c=d[d.length-1])}if(!c)return null;for(;c.parentNode&&c!=h.parentNode&&!c.raphael;)c=c.parentNode;return c==this.canvas.parentNode&&(c=h),c&&c.raphael?this.getById(c.raphaelid):null},i.getElementsByBBox=function(t){var r=this.set();return this.forEach((function(i){e.isBBoxIntersect(i.getBBox(),t)&&r.push(i)})),r},i.getById=function(t){for(var e=this.bottom;e;){if(e.id==t)return e;e=e.next}return null},i.forEach=function(t,e){for(var r=this.bottom;r;){if(!1===t.call(e,r))return this;r=r.next}return this},i.getElementsByPoint=function(t,e){var r=this.set();return this.forEach((function(i){i.isPointInside(t,e)&&r.push(i)})),r},Vt.isPointInside=function(t,r){var i=this.realPath=J[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(i=e.transformPath(i,this.attr("transform"))),e.isPointInsidePath(i,t,r)},Vt.getBBox=function(t){if(this.removed)return{};var e=this._;return t?(!e.dirty&&e.bboxwt||(this.realPath=J[this.type](this),e.bboxwt=vt(this.realPath),e.bboxwt.toString=Yt,e.dirty=0),e.bboxwt):((e.dirty||e.dirtyT||!e.bbox)&&(!e.dirty&&this.realPath||(e.bboxwt=0,this.realPath=J[this.type](this)),e.bbox=vt(K(this.realPath,this.matrix)),e.bbox.toString=Yt,e.dirty=e.dirtyT=0),e.bbox)},Vt.clone=function(){if(this.removed)return null;var t=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(t),t},Vt.glow=function(t){if("text"==this.type)return null;var e={width:((t=t||{}).width||10)+(+this.attr("stroke-width")||1),fill:t.fill||!1,opacity:null==t.opacity?.5:t.opacity,offsetx:t.offsetx||0,offsety:t.offsety||0,color:t.color||"#000"},r=e.width/2,i=this.paper,n=i.set(),s=this.realPath||J[this.type](this);s=this.matrix?K(s,this.matrix):s;for(var a=1;a<r+1;a++)n.push(i.path(s).attr({stroke:e.color,fill:e.fill?e.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(e.width/r*a).toFixed(3),opacity:+(e.opacity/r).toFixed(3)}));return n.insertBefore(this).translate(e.offsetx,e.offsety)};var Ht=function(t,r,i,n,s,a,o,l,h){return null==h?dt(t,r,i,n,s,a,o,l):e.findDotsAtSegment(t,r,i,n,s,a,o,l,function(t,e,r,i,n,s,a,o,l){if(!(l<0||dt(t,e,r,i,n,s,a,o)<l)){var h,u=.5,c=1-u;for(h=dt(t,e,r,i,n,s,a,o,c);B(h-l)>.01;)h=dt(t,e,r,i,n,s,a,o,c+=(h<l?1:-1)*(u/=2));return c}}(t,r,i,n,s,a,o,l,h))},Xt=function(t,r){return function(i,n,s){for(var a,o,l,h,u,c="",f={},p=0,d=0,C=(i=St(i)).length;d<C;d++){if("M"==(l=i[d])[0])a=+l[1],o=+l[2];else{if(p+(h=Ht(a,o,l[1],l[2],l[3],l[4],l[5],l[6]))>n){if(r&&!f.start){if(c+=["C"+(u=Ht(a,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).start.x,u.start.y,u.m.x,u.m.y,u.x,u.y],s)return c;f.start=c,c=["M"+u.x,u.y+"C"+u.n.x,u.n.y,u.end.x,u.end.y,l[5],l[6]].join(),p+=h,a=+l[5],o=+l[6];continue}if(!t&&!r)return{x:(u=Ht(a,o,l[1],l[2],l[3],l[4],l[5],l[6],n-p)).x,y:u.y,alpha:u.alpha}}p+=h,a=+l[5],o=+l[6]}c+=l.shift()+l}return f.end=c,(u=t?p:r?f:e.findDotsAtSegment(a,o,l[0],l[1],l[2],l[3],l[4],l[5],1)).alpha&&(u={x:u.x,y:u.y,alpha:u.alpha}),u}},Ut=Xt(1),$t=Xt(),Qt=Xt(0,1);e.getTotalLength=Ut,e.getPointAtLength=$t,e.getSubpath=function(t,e,r){if(this.getTotalLength(t)-r<1e-6)return Qt(t,e).end;var i=Qt(t,r,1);return e?Qt(i,e).end:i},Vt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():Ut(t)},Vt.getPointAtLength=function(t){var e=this.getPath();if(e)return $t(e,t)},Vt.getPath=function(){var t,r=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return r&&(t=r(this)),t},Vt.getSubpath=function(t,r){var i=this.getPath();if(i)return e.getSubpath(i,t,r)};var Jt=e.easing_formulas={linear:function(t){return t},"<":function(t){return S(t,1.7)},">":function(t){return S(t,.48)},"<>":function(t){var e=.48-t/1.04,r=w.sqrt(.1734+e*e),i=r-e,n=-r-e,s=S(B(i),1/3)*(i<0?-1:1)+S(B(n),1/3)*(n<0?-1:1)+.5;return 3*(1-s)*s*s+s*s*s},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:S(2,-10*t)*w.sin(2*L*(t-.075)/.3)+1},bounce:function(t){var e=7.5625,r=2.75;return t<1/r?e*t*t:t<2/r?e*(t-=1.5/r)*t+.75:t<2.5/r?e*(t-=2.25/r)*t+.9375:e*(t-=2.625/r)*t+.984375}};Jt.easeIn=Jt["ease-in"]=Jt["<"],Jt.easeOut=Jt["ease-out"]=Jt[">"],Jt.easeInOut=Jt["ease-in-out"]=Jt["<>"],Jt["back-in"]=Jt.backIn,Jt["back-out"]=Jt.backOut;var Kt=[],te=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ee=function(){for(var r=+new Date,i=0;i<Kt.length;i++){var n=Kt[i];if(!n.el.removed&&!n.paused){var s,a,o=r-n.start,l=n.ms,u=n.easing,c=n.from,f=n.diff,p=n.to,C=(n.t,n.el),g={},v={};if(n.initstatus?(o=(n.initstatus*n.anim.top-n.prev)/(n.percent-n.prev)*l,n.status=n.initstatus,delete n.initstatus,n.stop&&Kt.splice(i--,1)):n.status=(n.prev+(n.percent-n.prev)*(o/l))/n.anim.top,!(o<0))if(o<l){var y=u(o/l);for(var m in c)if(c[h](m)){switch(O[m]){case T:s=+c[m]+y*l*f[m];break;case"colour":s="rgb("+[re(P(c[m].r+y*l*f[m].r)),re(P(c[m].g+y*l*f[m].g)),re(P(c[m].b+y*l*f[m].b))].join(",")+")";break;case"path":s=[];for(var b=0,_=c[m].length;b<_;b++){s[b]=[c[m][b][0]];for(var w=1,k=c[m][b].length;w<k;w++)s[b][w]=+c[m][b][w]+y*l*f[m][b][w];s[b]=s[b].join(x)}s=s.join(x);break;case"transform":if(f[m].real)for(s=[],b=0,_=c[m].length;b<_;b++)for(s[b]=[c[m][b][0]],w=1,k=c[m][b].length;w<k;w++)s[b][w]=c[m][b][w]+y*l*f[m][b][w];else{var M=function(t){return+c[m][t]+y*l*f[m][t]};s=[["m",M(0),M(1),M(2),M(3),M(4),M(5)]]}break;case"csv":if("clip-rect"==m)for(s=[],b=4;b--;)s[b]=+c[m][b]+y*l*f[m][b];break;default:var B=[][d](c[m]);for(s=[],b=C.paper.customAttributes[m].length;b--;)s[b]=+B[b]+y*l*f[m][b]}g[m]=s}C.attr(g),function(e,r,i){setTimeout((function(){t("raphael.anim.frame."+e,r,i)}))}(C.id,C,n.anim)}else{if(function(r,i,n){setTimeout((function(){t("raphael.anim.frame."+i.id,i,n),t("raphael.anim.finish."+i.id,i,n),e.is(r,"function")&&r.call(i)}))}(n.callback,C,n.anim),C.attr(p),Kt.splice(i--,1),n.repeat>1&&!n.next){for(a in p)p[h](a)&&(v[a]=n.totalOrigin[a]);n.el.attr(v),se(n.anim,n.el,n.anim.percents[0],null,n.totalOrigin,n.repeat-1)}n.next&&!n.stop&&se(n.anim,n.el,n.next,null,n.totalOrigin,n.repeat)}}}Kt.length&&te(ee)},re=function(t){return t>255?255:t<0?0:t};function ie(t,e,r,i,n,s){var a=3*e,o=3*(i-e)-a,l=1-a-o,h=3*r,u=3*(n-r)-h,c=1-h-u;function f(t){return((l*t+o)*t+a)*t}return function(t,e){var r=function(t,e){var r,i,n,s,h,u;for(n=t,u=0;u<8;u++){if(s=f(n)-t,B(s)<e)return n;if(B(h=(3*l*n+2*o)*n+a)<1e-6)break;n-=s/h}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(s=f(n),B(s-t)<e)return n;t>s?r=n:i=n,n=(i-r)/2+r}return n}(t,e);return((c*r+u)*r+h)*r}(t,1/(200*s))}function ne(t,e){var r=[],i={};if(this.ms=e,this.times=1,t){for(var n in t)t[h](n)&&(i[N(n)]=t[n],r.push(N(n)));r.sort(X)}this.anim=i,this.top=r[r.length-1],this.percents=r}function se(r,i,n,s,o,l){n=N(n);var u,c,f,p,C,g,x=r.ms,m={},b={},_={};if(s)for(k=0,M=Kt.length;k<M;k++){var w=Kt[k];if(w.el.id==i.id&&w.anim==r){w.percent!=n?(Kt.splice(k,1),f=1):c=w,i.attr(w.totalOrigin);break}}else s=+b;for(var k=0,M=r.percents.length;k<M;k++){if(r.percents[k]==n||r.percents[k]>s*r.top){n=r.percents[k],C=r.percents[k-1]||0,x=x/r.top*(n-C),p=r.percents[k+1],u=r.anim[n];break}s&&i.attr(r.anim[r.percents[k]])}if(u){if(c)c.initstatus=s,c.start=new Date-c.ms*s;else{for(var B in u)if(u[h](B)&&(O[h](B)||i.paper.customAttributes[h](B)))switch(m[B]=i.attr(B),null==m[B]&&(m[B]=I[B]),b[B]=u[B],O[B]){case T:_[B]=(b[B]-m[B])/x;break;case"colour":m[B]=e.getRGB(m[B]);var S=e.getRGB(b[B]);_[B]={r:(S.r-m[B].r)/x,g:(S.g-m[B].g)/x,b:(S.b-m[B].b)/x};break;case"path":var L=St(m[B],b[B]),A=L[1];for(m[B]=L[0],_[B]=[],k=0,M=m[B].length;k<M;k++){_[B][k]=[0];for(var Z=1,E=m[B][k].length;Z<E;Z++)_[B][k][Z]=(A[k][Z]-m[B][k][Z])/x}break;case"transform":var z=i._,P=Et(z[B],b[B]);if(P)for(m[B]=P.from,b[B]=P.to,_[B]=[],_[B].real=!0,k=0,M=m[B].length;k<M;k++)for(_[B][k]=[m[B][k][0]],Z=1,E=m[B][k].length;Z<E;Z++)_[B][k][Z]=(b[B][k][Z]-m[B][k][Z])/x;else{var j=i.matrix||new zt,R={_:{transform:z.transform},getBBox:function(){return i.getBBox(1)}};m[B]=[j.a,j.b,j.c,j.d,j.e,j.f],At(R,b[B]),b[B]=R._.transform,_[B]=[(R.matrix.a-j.a)/x,(R.matrix.b-j.b)/x,(R.matrix.c-j.c)/x,(R.matrix.d-j.d)/x,(R.matrix.e-j.e)/x,(R.matrix.f-j.f)/x]}break;case"csv":var D=v(u[B])[y](a),q=v(m[B])[y](a);if("clip-rect"==B)for(m[B]=q,_[B]=[],k=q.length;k--;)_[B][k]=(D[k]-m[B][k])/x;b[B]=D;break;default:for(D=[][d](u[B]),q=[][d](m[B]),_[B]=[],k=i.paper.customAttributes[B].length;k--;)_[B][k]=((D[k]||0)-(q[k]||0))/x}var V=u.easing,G=e.easing_formulas[V];if(!G)if((G=v(V).match(F))&&5==G.length){var W=G;G=function(t){return ie(t,+W[1],+W[2],+W[3],+W[4],x)}}else G=U;if(w={anim:r,percent:n,timestamp:g=u.start||r.start||+new Date,start:g+(r.del||0),status:0,initstatus:s||0,stop:!1,ms:x,easing:G,from:m,diff:_,to:b,el:i,callback:u.callback,prev:C,next:p,repeat:l||r.times,origin:i.attr(),totalOrigin:o},Kt.push(w),s&&!c&&!f&&(w.stop=!0,w.start=new Date-x*s,1==Kt.length))return ee();f&&(w.start=new Date-w.ms*s),1==Kt.length&&te(ee)}t("raphael.anim.start."+i.id,i,r)}}function ae(t){for(var e=0;e<Kt.length;e++)Kt[e].el.paper==t&&Kt.splice(e--,1)}Vt.animateWith=function(t,r,i,n,s,a){if(this.removed)return a&&a.call(this),this;var o=i instanceof ne?i:e.animation(i,n,s,a);se(o,this,o.percents[0],null,this.attr());for(var l=0,h=Kt.length;l<h;l++)if(Kt[l].anim==r&&Kt[l].el==t){Kt[h-1].start=Kt[l].start;break}return this},Vt.onAnimation=function(e){return e?t.on("raphael.anim.frame."+this.id,e):t.unbind("raphael.anim.frame."+this.id),this},ne.prototype.delay=function(t){var e=new ne(this.anim,this.ms);return e.times=this.times,e.del=+t||0,e},ne.prototype.repeat=function(t){var e=new ne(this.anim,this.ms);return e.del=this.del,e.times=w.floor(k(t,0))||1,e},e.animation=function(t,r,i,n){if(t instanceof ne)return t;!e.is(i,"function")&&i||(n=n||i||null,i=null),t=Object(t),r=+r||0;var s,a,o={};for(a in t)t[h](a)&&N(a)!=a&&N(a)+"%"!=a&&(s=!0,o[a]=t[a]);if(s)return i&&(o.easing=i),n&&(o.callback=n),new ne({100:o},r);if(n){var l=0;for(var u in t){var c=j(u);t[h](u)&&c>l&&(l=c)}!t[l+="%"].callback&&(t[l].callback=n)}return new ne(t,r)},Vt.animate=function(t,r,i,n){if(this.removed)return n&&n.call(this),this;var s=t instanceof ne?t:e.animation(t,r,i,n);return se(s,this,s.percents[0],null,this.attr()),this},Vt.setTime=function(t,e){return t&&null!=e&&this.status(t,M(e,t.ms)/t.ms),this},Vt.status=function(t,e){var r,i,n=[],s=0;if(null!=e)return se(t,this,-1,M(e,1)),this;for(r=Kt.length;s<r;s++)if((i=Kt[s]).el.id==this.id&&(!t||i.anim==t)){if(t)return i.status;n.push({anim:i.anim,status:i.status})}return t?0:n},Vt.pause=function(e){for(var r=0;r<Kt.length;r++)Kt[r].el.id!=this.id||e&&Kt[r].anim!=e||!1!==t("raphael.anim.pause."+this.id,this,Kt[r].anim)&&(Kt[r].paused=!0);return this},Vt.resume=function(e){for(var r=0;r<Kt.length;r++)if(Kt[r].el.id==this.id&&(!e||Kt[r].anim==e)){var i=Kt[r];!1!==t("raphael.anim.resume."+this.id,this,i.anim)&&(delete i.paused,this.status(i.anim,i.status))}return this},Vt.stop=function(e){for(var r=0;r<Kt.length;r++)Kt[r].el.id!=this.id||e&&Kt[r].anim!=e||!1!==t("raphael.anim.stop."+this.id,this,Kt[r].anim)&&Kt.splice(r--,1);return this},t.on("raphael.remove",ae),t.on("raphael.clear",ae),Vt.toString=function(){return"Raphaël’s object"};var oe,le,he,ue,ce=function(t){if(this.items=[],this.length=0,this.type="set",t)for(var e=0,r=t.length;e<r;e++)!t[e]||t[e].constructor!=Vt.constructor&&t[e].constructor!=ce||(this[this.items.length]=this.items[this.items.length]=t[e],this.length++)},fe=ce.prototype;for(var pe in fe.push=function(){for(var t,e,r=0,i=arguments.length;r<i;r++)!(t=arguments[r])||t.constructor!=Vt.constructor&&t.constructor!=ce||(this[e=this.items.length]=this.items[e]=t,this.length++);return this},fe.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},fe.forEach=function(t,e){for(var r=0,i=this.items.length;r<i;r++)if(!1===t.call(e,this.items[r],r))return this;return this},Vt)