diff --git a/dist/snap.svg-min.js b/dist/snap.svg-min.js index 07ecadf..6590a42 100644 --- a/dist/snap.svg-min.js +++ b/dist/snap.svg-min.js @@ -14,7 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// build: 2017-02-04 +// build: 2017-02-05 !function(a){var b,c,d="0.5.0",e="hasOwnProperty",f=/[\.\/]/,g=/\s*,\s*/,h="*",i=function(a,b){return a-b},j={n:{}},k=function(){for(var a=0,b=this.length;b>a;a++)if("undefined"!=typeof this[a])return this[a]},l=function(){for(var a=this.length;--a;)if("undefined"!=typeof this[a])return this[a]},m=Object.prototype.toString,n=String,o=Array.isArray||function(a){return a instanceof Array||"[object Array]"==m.call(a)};eve=function(a,d){var e,f=c,g=Array.prototype.slice.call(arguments,2),h=eve.listeners(a),j=0,m=[],n={},o=[],p=b;o.firstDefined=k,o.lastDefined=l,b=a,c=0;for(var q=0,r=h.length;r>q;q++)"zIndex"in h[q]&&(m.push(h[q].zIndex),h[q].zIndex<0&&(n[h[q].zIndex]=h[q]));for(m.sort(i);m[j]<0;)if(e=n[m[j++]],o.push(e.apply(d,g)),c)return c=f,o;for(q=0;r>q;q++)if(e=h[q],"zIndex"in e)if(e.zIndex==m[j]){if(o.push(e.apply(d,g)),c)break;do if(j++,e=n[m[j]],e&&o.push(e.apply(d,g)),c)break;while(e)}else n[e.zIndex]=e;else if(o.push(e.apply(d,g)),c)break;return c=f,b=p,o},eve._events=j,eve.listeners=function(a){var b,c,d,e,g,i,k,l,m=o(a)?a:a.split(f),n=j,p=[n],q=[];for(e=0,g=m.length;g>e;e++){for(l=[],i=0,k=p.length;k>i;i++)for(n=p[i].n,c=[n[m[e]],n[h]],d=2;d--;)b=c[d],b&&(l.push(b),q=q.concat(b.f||[]));p=l}return q},eve.separator=function(a){a?(a=n(a).replace(/(?=[\.\^\]\[\-])/g,"\\"),a="["+a+"]",f=new RegExp(a)):f=/[\.\/]/},eve.on=function(a,b){if("function"!=typeof b)return function(){};for(var c=o(a)?o(a[0])?a:[a]:n(a).split(g),d=0,e=c.length;e>d;d++)!function(a){for(var c,d=o(a)?a:n(a).split(f),e=j,g=0,h=d.length;h>g;g++)e=e.n,e=e.hasOwnProperty(d[g])&&e[d[g]]||(e[d[g]]={n:{}});for(e.f=e.f||[],g=0,h=e.f.length;h>g;g++)if(e.f[g]==b){c=!0;break}!c&&e.f.push(b)}(c[d]);return function(a){+a==+a&&(b.zIndex=+a)}},eve.f=function(a){var b=[].slice.call(arguments,1);return function(){eve.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},eve.stop=function(){c=1},eve.nt=function(a){var c=o(b)?b.join("."):b;return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(c):c},eve.nts=function(){return o(b)?b:b.split(f)},eve.off=eve.unbind=function(a,b){if(!a)return void(eve._events=j={n:{}});var c=o(a)?o(a[0])?a:[a]:n(a).split(g);if(c.length>1)for(var d=0,i=c.length;i>d;d++)eve.off(c[d],b);else{c=o(a)?a:n(a).split(f);var k,l,m,d,i,p,q,r=[j],s=[];for(d=0,i=c.length;i>d;d++)for(p=0;pd;d++)for(k=r[d];k.n;){if(b){if(k.f){for(p=0,q=k.f.length;q>p;p++)if(k.f[p]==b){k.f.splice(p,1);break}!k.f.length&&delete k.f}for(l in k.n)if(k.n[e](l)&&k.n[l].f){var t=k.n[l].f;for(p=0,q=t.length;q>p;p++)if(t[p]==b){t.splice(p,1);break}!t.length&&delete k.n[l].f}}else{delete k.f;for(l in k.n)k.n[e](l)&&k.n[l].f&&delete k.n[l].f}k=k.n}a:for(d=0,i=s.length;i>d;d++){k=s[d];for(l in k.n[k.name].f)continue a;for(l in k.n[k.name].n)continue a;delete k.n[k.name]}}},eve.once=function(a,b){var c=function(){return eve.off(a,c),b.apply(this,arguments)};return eve.on(a,c)},eve.version=d,eve.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=eve:"function"==typeof define&&define.amd?define("eve",[],function(){return eve}):a.eve=eve}(this),function(a,b){if("function"==typeof define&&define.amd)define(["eve"],function(c){return b(a,c)});else if("undefined"!=typeof exports){var c=require("eve");module.exports=b(a,c)}else b(a,a.eve)}(window||this,function(a,b){var c=function(b){var c,d={},e=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){return setTimeout(a,16,(new Date).getTime()),!0},f=Array.isArray||function(a){return a instanceof Array||"[object Array]"==Object.prototype.toString.call(a)},g=0,h="M"+(+new Date).toString(36),i=function(){return h+(g++).toString(36)},j=Date.now||function(){return+new Date},k=function(a){var b=this;if(null==a)return b.s;var c=b.s-a;b.b+=b.dur*c,b.B+=b.dur*c,b.s=a},l=function(a){var b=this;return null==a?b.spd:void(b.spd=a)},m=function(a){var b=this;return null==a?b.dur:(b.s=b.s*a/b.dur,void(b.dur=a))},n=function(){var a=this;delete d[a.id],a.update(),b("mina.stop."+a.id,a)},o=function(){var a=this;a.pdif||(delete d[a.id],a.update(),a.pdif=a.get()-a.b)},p=function(){var a=this;a.pdif&&(a.b=a.get()-a.pdif,delete a.pdif,d[a.id]=a,r())},q=function(){var a,b=this;if(f(b.start)){a=[];for(var c=0,d=b.start.length;d>c;c++)a[c]=+b.start[c]+(b.end[c]-b.start[c])*b.easing(b.s)}else a=+b.start+(b.end-b.start)*b.easing(b.s);b.set(a)},r=function(a){if(!a)return void(c||(c=e(r)));var f=0;for(var g in d)if(d.hasOwnProperty(g)){var h=d[g],i=h.get();f++,h.s=(i-h.b)/(h.dur/h.spd),h.s>=1&&(delete d[g],h.s=1,f--,function(a){setTimeout(function(){b("mina.finish."+a.id,a)})}(h)),h.update()}c=f?e(r):!1},s=function(a,b,c,e,f,g,h){var j={id:i(),start:a,end:b,b:c,s:0,dur:e-c,spd:1,get:f,set:g,easing:h||s.linear,status:k,speed:l,duration:m,stop:n,pause:o,resume:p,update:q};d[j.id]=j;var t,u=0;for(t in d)if(d.hasOwnProperty(t)&&(u++,2==u))break;return 1==u&&r(),j};return s.time=j,s.getById=function(a){return d[a]||null},s.linear=function(a){return a},s.easeout=function(a){return Math.pow(a,1.7)},s.easein=function(a){return Math.pow(a,.48)},s.easeinout=function(a){if(1==a)return 1;if(0==a)return 0;var b=.48-a/1.04,c=Math.sqrt(.1734+b*b),d=c-b,e=Math.pow(Math.abs(d),1/3)*(0>d?-1:1),f=-c-b,g=Math.pow(Math.abs(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},s.backin=function(a){if(1==a)return 1;var b=1.70158;return a*a*((b+1)*a-b)},s.backout=function(a){if(0==a)return 0;a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},s.elastic=function(a){return a==!!a?a:Math.pow(2,-10*a)*Math.sin((a-.075)*(2*Math.PI)/.3)+1},s.bounce=function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b},a.mina=s,s}("undefined"==typeof b?function(){}:b),d=function(a){function c(a,b){if(a){if(a.nodeType)return w(a);if(e(a,"array")&&c.set)return c.set.apply(c,a);if(a instanceof s)return a;if(null==b)return a=y.doc.querySelector(String(a)),w(a)}return a=null==a?"100%":a,b=null==b?"100%":b,new v(a,b)}function d(a,b){if(b){if("#text"==a&&(a=y.doc.createTextNode(b.text||b["#text"]||"")),"#comment"==a&&(a=y.doc.createComment(b.text||b["#text"]||"")),"string"==typeof a&&(a=d(a)),"string"==typeof b)return 1==a.nodeType?"xlink:"==b.substring(0,6)?a.getAttributeNS(T,b.substring(6)):"xml:"==b.substring(0,4)?a.getAttributeNS(U,b.substring(4)):a.getAttribute(b):"text"==b?a.nodeValue:null;if(1==a.nodeType){for(var c in b)if(b[z](c)){var e=A(b[c]);e?"xlink:"==c.substring(0,6)?a.setAttributeNS(T,c.substring(6),e):"xml:"==c.substring(0,4)?a.setAttributeNS(U,c.substring(4),e):a.setAttribute(c,e):a.removeAttribute(c)}}else"text"in b&&(a.nodeValue=b.text)}else a=y.doc.createElementNS(U,a);return a}function e(a,b){return b=A.prototype.toLowerCase.call(b),"finite"==b?isFinite(a):"array"==b&&(a instanceof Array||Array.isArray&&Array.isArray(a))?!0:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||J.call(a).slice(8,-1).toLowerCase()==b}function f(a){if("function"==typeof a||Object(a)!==a)return a;var b=new a.constructor;for(var c in a)a[z](c)&&(b[c]=f(a[c]));return b}function h(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function i(a,b,c){function d(){var e=Array.prototype.slice.call(arguments,0),f=e.join("␀"),g=d.cache=d.cache||{},i=d.count=d.count||[];return g[z](f)?(h(i,f),c?c(g[f]):g[f]):(i.length>=1e3&&delete g[i.shift()],i.push(f),g[f]=a.apply(b,e),c?c(g[f]):g[f])}return d}function j(a,b,c,d,e,f){if(null==e){var g=a-c,h=b-d;return g||h?(180+180*D.atan2(-h,-g)/H+360)%360:0}return j(a,b,e,f)-j(c,d,e,f)}function k(a){return a%360*H/180}function l(a){return 180*a/H%360}function m(a){var b=[];return a=a.replace(/(?:^|\s)(\w+)\(([^)]+)\)/g,function(a,c,d){return d=d.split(/\s*,\s*|\s+/),"rotate"==c&&1==d.length&&d.push(0,0),"scale"==c&&(d.length>2?d=d.slice(0,2):2==d.length&&d.push(0,0),1==d.length&&d.push(d[0],0,0)),"skewX"==c?b.push(["m",1,0,D.tan(k(d[0])),1,0,0]):"skewY"==c?b.push(["m",1,D.tan(k(d[0])),0,1,0,0]):b.push([c.charAt(0)].concat(d)),a}),b}function n(a,b){var d=aa(a),e=new c.Matrix;if(d)for(var f=0,g=d.length;g>f;f++){var h,i,j,k,l,m=d[f],n=m.length,o=A(m[0]).toLowerCase(),p=m[0]!=o,q=p?e.invert():0;"t"==o&&2==n?e.translate(m[1],0):"t"==o&&3==n?p?(h=q.x(0,0),i=q.y(0,0),j=q.x(m[1],m[2]),k=q.y(m[1],m[2]),e.translate(j-h,k-i)):e.translate(m[1],m[2]):"r"==o?2==n?(l=l||b,e.rotate(m[1],l.x+l.width/2,l.y+l.height/2)):4==n&&(p?(j=q.x(m[2],m[3]),k=q.y(m[2],m[3]),e.rotate(m[1],j,k)):e.rotate(m[1],m[2],m[3])):"s"==o?2==n||3==n?(l=l||b,e.scale(m[1],m[n-1],l.x+l.width/2,l.y+l.height/2)):4==n?p?(j=q.x(m[2],m[3]),k=q.y(m[2],m[3]),e.scale(m[1],m[1],j,k)):e.scale(m[1],m[1],m[2],m[3]):5==n&&(p?(j=q.x(m[3],m[4]),k=q.y(m[3],m[4]),e.scale(m[1],m[2],j,k)):e.scale(m[1],m[2],m[3],m[4])):"m"==o&&7==n&&e.add(m[1],m[2],m[3],m[4],m[5],m[6])}return e}function o(a){var b=a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||a.node.parentNode&&w(a.node.parentNode)||c.select("svg")||c(0,0),d=b.select("defs"),e=null==d?!1:d.node;return e||(e=u("defs",b.node).node),e}function p(a){return a.node.ownerSVGElement&&w(a.node.ownerSVGElement)||c.select("svg")}function q(a,b,c){function e(a){if(null==a)return I;if(a==+a)return a;d(j,{width:a});try{return j.getBBox().width}catch(b){return 0}}function f(a){if(null==a)return I;if(a==+a)return a;d(j,{height:a});try{return j.getBBox().height}catch(b){return 0}}function g(d,e){null==b?i[d]=e(a.attr(d)||0):d==b&&(i=e(null==c?a.attr(d)||0:c))}var h=p(a).node,i={},j=h.querySelector(".svg---mgr");switch(j||(j=d("rect"),d(j,{x:-9e9,y:-9e9,width:10,height:10,"class":"svg---mgr",fill:"none"}),h.appendChild(j)),a.type){case"rect":g("rx",e),g("ry",f);case"image":g("width",e),g("height",f);case"text":g("x",e),g("y",f);break;case"circle":g("cx",e),g("cy",f),g("r",e);break;case"ellipse":g("cx",e),g("cy",f),g("rx",e),g("ry",f);break;case"line":g("x1",e),g("x2",e),g("y1",f),g("y2",f);break;case"marker":g("refX",e),g("markerWidth",e),g("refY",f),g("markerHeight",f);break;case"radialGradient":g("fx",e),g("fy",f);break;case"tspan":g("dx",e),g("dy",f);break;default:g(b,e)}return h.removeChild(j),i}function r(a){e(a,"array")||(a=Array.prototype.slice.call(arguments,0));for(var b=0,c=0,d=this.node;this[b];)delete this[b++];for(b=0;bc;c++){var e={type:a[c].type,attr:a[c].attr()},f=a[c].children();b.push(e),f.length&&x(f,e.childNodes=[])}}c.version="0.5.0",c.toString=function(){return"Snap v"+this.version},c._={};var y={win:a.window,doc:a.window.document};c._.glob=y;var z="hasOwnProperty",A=String,B=parseFloat,C=parseInt,D=Math,E=D.max,F=D.min,G=D.abs,H=(D.pow,D.PI),I=(D.round,""),J=Object.prototype.toString,K=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?%?)\s*\))\s*$/i,L=(c._.separator=/[,\s]+/,/[\s]*,[\s]*/),M={hs:1,rg:1},N=/([a-z])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,O=/([rstm])[\s,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\s]*,?[\s]*)+)/gi,P=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\s]*,?[\s]*/gi,Q=0,R="S"+(+new Date).toString(36),S=function(a){return(a&&a.type?a.type:I)+R+(Q++).toString(36)},T="http://www.w3.org/1999/xlink",U="http://www.w3.org/2000/svg",V={};c.url=function(a){return"url('#"+a+"')"};c._.$=d,c._.id=S,c.format=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return A(b).replace(a,function(a,b){return c(a,b,d)})}}(),c._.clone=f,c._.cacher=i,c.rad=k,c.deg=l,c.sin=function(a){return D.sin(c.rad(a))},c.tan=function(a){return D.tan(c.rad(a))},c.cos=function(a){return D.cos(c.rad(a))},c.asin=function(a){return c.deg(D.asin(a))},c.acos=function(a){return c.deg(D.acos(a))},c.atan=function(a){return c.deg(D.atan(a))},c.atan2=function(a){return c.deg(D.atan2(a))},c.angle=j,c.len=function(a,b,d,e){return Math.sqrt(c.len2(a,b,d,e))},c.len2=function(a,b,c,d){return(a-c)*(a-c)+(b-d)*(b-d)},c.closestPoint=function(a,b,c){function d(a){var d=a.x-b,e=a.y-c;return d*d+e*e}for(var e,f,g,h,i=a.node,j=i.getTotalLength(),k=j/i.pathSegList.numberOfItems*.125,l=1/0,m=0;j>=m;m+=k)(h=d(g=i.getPointAtLength(m))).5;){var n,o,p,q,r,s;(p=f-k)>=0&&(r=d(n=i.getPointAtLength(p)))f)return b-f;if(f>a-c)return b-f+a}return b},c.getRGB=i(function(a){if(!a||(a=A(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Z};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:Z};if(!(M[z](a.toLowerCase().substring(0,2))||"#"==a.charAt())&&(a=W(a)),!a)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Z};var b,d,f,g,h,i,j=a.match(K);return j?(j[2]&&(f=C(j[2].substring(5),16),d=C(j[2].substring(3,5),16),b=C(j[2].substring(1,3),16)),j[3]&&(f=C((h=j[3].charAt(3))+h,16),d=C((h=j[3].charAt(2))+h,16),b=C((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4].split(L),b=B(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=B(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),f=B(i[2]),"%"==i[2].slice(-1)&&(f*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100)),j[5]?(i=j[5].split(L),b=B(i[0]),"%"==i[0].slice(-1)&&(b/=100),d=B(i[1]),"%"==i[1].slice(-1)&&(d/=100),f=B(i[2]),"%"==i[2].slice(-1)&&(f/=100),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),c.hsb2rgb(b,d,f,g)):j[6]?(i=j[6].split(L),b=B(i[0]),"%"==i[0].slice(-1)&&(b/=100),d=B(i[1]),"%"==i[1].slice(-1)&&(d/=100),f=B(i[2]),"%"==i[2].slice(-1)&&(f/=100),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(g=B(i[3])),i[3]&&"%"==i[3].slice(-1)&&(g/=100),c.hsl2rgb(b,d,f,g)):(b=F(D.round(b),255),d=F(D.round(d),255),f=F(D.round(f),255),g=F(E(g,0),1),j={r:b,g:d,b:f,toString:Z},j.hex="#"+(16777216|f|d<<8|b<<16).toString(16).slice(1),j.opacity=e(g,"finite")?g:1,j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:Z}},c),c.hsb=i(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=i(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=i(function(a,b,c,d){if(e(d,"finite")){var f=D.round;return"rgba("+[f(a),f(b),f(c),+d.toFixed(2)]+")"}return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)});var W=function(a){var b=y.doc.getElementsByTagName("head")[0]||y.doc.getElementsByTagName("svg")[0],c="rgb(255, 0, 0)";return(W=i(function(a){if("red"==a.toLowerCase())return c;b.style.color=c,b.style.color=a;var d=y.doc.defaultView.getComputedStyle(b,I).getPropertyValue("color");return d==c?null:d}))(a)},X=function(){return"hsb("+[this.h,this.s,this.b]+")"},Y=function(){return"hsl("+[this.h,this.s,this.l]+")"},Z=function(){return 1==this.opacity||null==this.opacity?this.hex:"rgba("+[this.r,this.g,this.b,this.opacity]+")"},$=function(a,b,d){if(null==b&&e(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&e(a,string)){var f=c.getRGB(a);a=f.r,b=f.g,d=f.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},_=function(a,b,d,f){a=D.round(255*a),b=D.round(255*b),d=D.round(255*d);var g={r:a,g:b,b:d,opacity:e(f,"finite")?f:1,hex:c.rgb(a,b,d),toString:Z};return e(f,"finite")&&(g.opacity=f),g};c.color=function(a){var b;return e(a,"object")&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):e(a,"object")&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.opacity=1,a.hex=b.hex):(e(a,"string")&&(a=c.getRGB(a)),e(a,"object")&&"r"in a&&"g"in a&&"b"in a&&!("error"in a)?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1,a.error=1)),a.toString=Z,a},c.hsb2rgb=function(a,b,c,d){e(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,d=a.o,a=a.h),a*=360;var f,g,h,i,j;return a=a%360/60,j=c*b,i=j*(1-G(a%2-1)),f=g=h=c-j,a=~~a,f+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],_(f,g,h,d)},c.hsl2rgb=function(a,b,c,d){e(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var f,g,h,i,j;return a=a%360/60,j=2*b*(.5>c?c:1-c),i=j*(1-G(a%2-1)),f=g=h=c-j/2,a=~~a,f+=[j,i,0,0,i,j][a],g+=[i,j,j,i,0,0][a],h+=[0,0,i,j,j,i][a],_(f,g,h,d)},c.rgb2hsb=function(a,b,c){c=$(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=E(a,b,c),g=f-F(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6*60/360,e=0==g?0:g/f,{h:d,s:e,b:f,toString:X}},c.rgb2hsl=function(a,b,c){c=$(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=E(a,b,c),h=F(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6*60/360,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:Y}},c.parsePathString=function(a){if(!a)return null;var b=c.path(a);if(b.arr)return c.path.clone(b.arr);var d={a:7,c:6,o:2,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,u:3,z:0},f=[];return e(a,"array")&&e(a[0],"array")&&(f=c.path.clone(a)),f.length||A(a).replace(N,function(a,b,c){var e=[],g=b.toLowerCase();if(c.replace(P,function(a,b){b&&e.push(+b)}),"m"==g&&e.length>2&&(f.push([b].concat(e.splice(0,2))),g="l",b="m"==b?"l":"L"),"o"==g&&1==e.length&&f.push([b,e[0]]),"r"==g)f.push([b].concat(e));else for(;e.length>=d[g]&&(f.push([b].concat(e.splice(0,d[g]))),d[g]););}),f.toString=c.path.toString,b.arr=c.path.clone(f),f};var aa=c.parseTransformString=function(a){if(!a)return null;var b=[];return e(a,"array")&&e(a[0],"array")&&(b=c.path.clone(a)),b.length||A(a).replace(O,function(a,c,d){var e=[];c.toLowerCase();d.replace(P,function(a,b){b&&e.push(+b)}),b.push([c].concat(e))}),b.toString=c.path.toString,b};c._.svgTransform2string=m,c._.rgTransform=/^[a-z][\s]*-?\.?\d/i,c._.transform2matrix=n,c._unit2px=q;y.doc.contains||y.doc.compareDocumentPosition?function(a,b){var c=9==a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a==d||!(!d||1!=d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)for(;b;)if(b=b.parentNode,b==a)return!0;return!1};c._.getSomeDefs=o,c._.getSomeSVG=p,c.select=function(a){return a=A(a).replace(/([^\\]):/g,"$1\\:"),w(y.doc.querySelector(a))},c.selectAll=function(a){for(var b=y.doc.querySelectorAll(a),d=(c.set||Array)(),e=0;ei;i++)h[g[i].nodeName]=g[i].nodeValue;return h}if(e(a,"string")){if(!(arguments.length>1))return b("snap.util.getattr."+a,d).firstDefined();var k={};k[a]=c,a=k}for(var l in a)a[z](l)&&b("snap.util.attr."+l,d,a[l]);return d},c.parse=function(a){var b=y.doc.createDocumentFragment(),c=!0,d=y.doc.createElement("div");if(a=A(a),a.match(/^\s*<\s*svg(?:\s|>)/)||(a=""+a+"",c=!1),d.innerHTML=a,a=d.getElementsByTagName("svg")[0])if(c)b=a;else for(;a.firstChild;)b.appendChild(a.firstChild);return new t(b)},c.fragment=function(){for(var a=Array.prototype.slice.call(arguments,0),b=y.doc.createDocumentFragment(),d=0,e=a.length;e>d;d++){var f=a[d];f.node&&f.node.nodeType&&b.appendChild(f.node),f.nodeType&&b.appendChild(f),"string"==typeof f&&b.appendChild(c.parse(f).node)}return new t(b)},c._.make=u,c._.wrap=w,v.prototype.el=function(a,b){var c=u(a,this.node);return b&&c.attr(b),c},s.prototype.children=function(){for(var a=[],b=this.node.childNodes,d=0,e=b.length;e>d;d++)a[d]=c(b[d]);return a},s.prototype.toJSON=function(){var a=[];return x([this],a),a[0]},b.on("snap.util.getattr",function(){var a=b.nt();a=a.substring(a.lastIndexOf(".")+1);var c=a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});return ba[z](c)?this.node.ownerDocument.defaultView.getComputedStyle(this.node,null).getPropertyValue(c):d(this.node,a)});var ba={"alignment-baseline":0,"baseline-shift":0,clip:0,"clip-path":0,"clip-rule":0,color:0,"color-interpolation":0,"color-interpolation-filters":0,"color-profile":0,"color-rendering":0,cursor:0,direction:0,display:0,"dominant-baseline":0,"enable-background":0,fill:0,"fill-opacity":0,"fill-rule":0,filter:0,"flood-color":0,"flood-opacity":0,font:0,"font-family":0,"font-size":0,"font-size-adjust":0,"font-stretch":0,"font-style":0,"font-variant":0,"font-weight":0,"glyph-orientation-horizontal":0,"glyph-orientation-vertical":0,"image-rendering":0,kerning:0,"letter-spacing":0,"lighting-color":0,marker:0,"marker-end":0,"marker-mid":0,"marker-start":0,mask:0,opacity:0,overflow:0,"pointer-events":0,"shape-rendering":0,"stop-color":0,"stop-opacity":0,stroke:0,"stroke-dasharray":0,"stroke-dashoffset":0,"stroke-linecap":0,"stroke-linejoin":0,"stroke-miterlimit":0,"stroke-opacity":0,"stroke-width":0,"text-anchor":0,"text-decoration":0,"text-rendering":0,"unicode-bidi":0,visibility:0,"word-spacing":0,"writing-mode":0};b.on("snap.util.attr",function(a){var c=b.nt(),e={};c=c.substring(c.lastIndexOf(".")+1),e[c]=a;var f=c.replace(/-(\w)/gi,function(a,b){return b.toUpperCase()}),g=c.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()});ba[z](g)?this.node.style[f]=null==a?I:a:d(this.node,e)}),function(a){}(v.prototype),c.ajax=function(a,c,d,f){var g=new XMLHttpRequest,h=S();if(g){if(e(c,"function"))f=d,d=c,c=null;else if(e(c,"object")){var i=[];for(var j in c)c.hasOwnProperty(j)&&i.push(encodeURIComponent(j)+"="+encodeURIComponent(c[j]));c=i.join("&")}return g.open(c?"POST":"GET",a,!0),c&&(g.setRequestHeader("X-Requested-With","XMLHttpRequest"),g.setRequestHeader("Content-type","application/x-www-form-urlencoded")),d&&(b.once("snap.ajax."+h+".0",d),b.once("snap.ajax."+h+".200",d),b.once("snap.ajax."+h+".304",d)),g.onreadystatechange=function(){4==g.readyState&&b("snap.ajax."+h+"."+g.status,f,g)},4==g.readyState?g:(g.send(c),g)}},c.load=function(a,b,d){c.ajax(a,function(a){var e=c.parse(a.responseText);d?b.call(d,e):b(e)})};var ca=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,h=e.clientLeft||d.clientLeft||0,i=b.top+(g.win.pageYOffset||e.scrollTop||d.scrollTop)-f,j=b.left+(g.win.pageXOffset||e.scrollLeft||d.scrollLeft)-h;return{y:i,x:j}};return c.getElementByPoint=function(a,b){var c=this,d=(c.canvas,y.doc.elementFromPoint(a,b));if(y.win.opera&&"svg"==d.tagName){var e=ca(d),f=d.createSVGRect();f.x=a-e.x,f.y=b-e.y,f.width=f.height=1;var g=d.getIntersectionList(f,null);g.length&&(d=g[g.length-1])}return d?w(d):null},c.plugin=function(a){a(c,s,v,y,t)},y.win.Snap=c,c}(a||this);return d.plugin(function(c,d,e,f,g){function h(a,b){if(null==b){var d=!0;if(b="linearGradient"==a.type||"radialGradient"==a.type?a.node.getAttribute("gradientTransform"):"pattern"==a.type?a.node.getAttribute("patternTransform"):a.node.getAttribute("transform"),!b)return new c.Matrix;b=c._.svgTransform2string(b)}else b=c._.rgTransform.test(b)?m(b).replace(/\.{3}|\u2026/g,a._.transform||""):c._.svgTransform2string(b),l(b,"array")&&(b=c.path?c.path.toString.call(b):m(b)),a._.transform=b;var e=c._.transform2matrix(b,a.getBBox(1));return d?e:void(a.matrix=e)}function i(a){function b(a,b){var d=o(a.node,b);d=d&&d.match(g),d=d&&d[2],d&&"#"==d.charAt()&&(d=d.substring(1),d&&(i[d]=(i[d]||[]).concat(function(d){var e={};e[b]=c.url(d),o(a.node,e)})))}function d(a){var b=o(a.node,"xlink:href");b&&"#"==b.charAt()&&(b=b.substring(1),b&&(i[b]=(i[b]||[]).concat(function(b){a.attr("xlink:href","#"+b)})))}for(var e,f=a.selectAll("*"),g=/^\s*url\(("|'|)(.*)\1\)\s*$/,h=[],i={},j=0,k=f.length;k>j;j++){e=f[j],b(e,"fill"),b(e,"stroke"),b(e,"filter"),b(e,"mask"),b(e,"clip-path"),d(e);var l=o(e.node,"id");l&&(o(e.node,{id:e.id}),h.push({old:l,id:e.id}))}for(j=0,k=h.length;k>j;j++){var m=i[h[j].old];if(m)for(var n=0,p=m.length;p>n;n++)m[n](h[j].id)}}function j(a){return function(){var b=a?"<"+this.type:"",c=this.node.attributes,d=this.node.childNodes;if(a)for(var e=0,f=c.length;f>e;e++)b+=" "+c[e].name+'="'+c[e].value.replace(/"/g,'\\"')+'"';if(d.length){for(a&&(b+=">"),e=0,f=d.length;f>e;e++)3==d[e].nodeType?b+=d[e].nodeValue:1==d[e].nodeType&&(b+=s(d[e]).toString());a&&(b+="")}else a&&(b+="/>");return b}}var k=d.prototype,l=c.is,m=String,n=c._unit2px,o=c._.$,p=c._.make,q=c._.getSomeDefs,r="hasOwnProperty",s=c._.wrap;k.getBBox=function(a){if("tspan"==this.type)return c._.box(this.node.getClientRects().item(0));if(!c.Matrix||!c.path)return this.node.getBBox();var b=this,d=new c.Matrix;if(b.removed)return c._.box();for(;"use"==b.type;)if(a||(d=d.add(b.transform().localMatrix.translate(b.attr("x")||0,b.attr("y")||0))),b.original)b=b.original;else{var e=b.attr("xlink:href");b=b.original=b.node.ownerDocument.getElementById(e.substring(e.indexOf("#")+1))}var f=b._,g=c.path.get[b.type]||c.path.get.deflt;try{return a?(f.bboxwt=g?c.path.getBBox(b.realPath=g(b)):c._.box(b.node.getBBox()),c._.box(f.bboxwt)):(b.realPath=g(b),b.matrix=b.transform().localMatrix,f.bbox=c.path.getBBox(c.path.map(b.realPath,d.add(b.matrix))),c._.box(f.bbox))}catch(h){return c._.box()}};var t=function(){return this.string};k.transform=function(a){var b=this._;if(null==a){for(var d,e=this,f=new c.Matrix(this.node.getCTM()),g=h(this),i=[g],j=new c.Matrix,k=g.toTransformString(),l=m(g)==m(this.matrix)?m(b.transform):k;"svg"!=e.type&&(e=e.parent());)i.push(h(e));for(d=i.length;d--;)j.add(i[d]);return{string:l,globalMatrix:f,totalMatrix:j,localMatrix:g,diffMatrix:f.clone().add(g.invert()),global:f.toTransformString(),total:j.toTransformString(),local:k,toString:t}}return a instanceof c.Matrix?(this.matrix=a,this._.transform=a.toTransformString()):h(this,a),this.node&&("linearGradient"==this.type||"radialGradient"==this.type?o(this.node,{gradientTransform:this.matrix}):"pattern"==this.type?o(this.node,{patternTransform:this.matrix}):o(this.node,{transform:this.matrix})),this},k.parent=function(){return s(this.node.parentNode)},k.append=k.add=function(a){if(a){if("set"==a.type){var b=this;return a.forEach(function(a){b.add(a)}),this}a=s(a),this.node.appendChild(a.node),a.paper=this.paper}return this},k.appendTo=function(a){return a&&(a=s(a),a.append(this)),this},k.prepend=function(a){if(a){if("set"==a.type){var b,c=this;return a.forEach(function(a){b?b.after(a):c.prepend(a),b=a}),this}a=s(a);var d=a.parent();this.node.insertBefore(a.node,this.node.firstChild),this.add&&this.add(),a.paper=this.paper,this.parent()&&this.parent().add(),d&&d.add()}return this},k.prependTo=function(a){return a=s(a),a.prepend(this),this},k.before=function(a){if("set"==a.type){var b=this;return a.forEach(function(a){var c=a.parent();b.node.parentNode.insertBefore(a.node,b.node),c&&c.add()}),this.parent().add(),this}a=s(a);var c=a.parent();return this.node.parentNode.insertBefore(a.node,this.node),this.parent()&&this.parent().add(),c&&c.add(),a.paper=this.paper,this},k.after=function(a){a=s(a);var b=a.parent();return this.node.nextSibling?this.node.parentNode.insertBefore(a.node,this.node.nextSibling):this.node.parentNode.appendChild(a.node),this.parent()&&this.parent().add(),b&&b.add(),a.paper=this.paper,this},k.insertBefore=function(a){a=s(a);var b=this.parent();return a.node.parentNode.insertBefore(this.node,a.node),this.paper=a.paper,b&&b.add(),a.parent()&&a.parent().add(),this},k.insertAfter=function(a){a=s(a);var b=this.parent();return a.node.parentNode.insertBefore(this.node,a.node.nextSibling),this.paper=a.paper,b&&b.add(),a.parent()&&a.parent().add(),this},k.remove=function(){var a=this.parent();return this.node.parentNode&&this.node.parentNode.removeChild(this.node),delete this.paper,this.removed=!0,a&&a.add(),this},k.select=function(a){return s(this.node.querySelector(a))},k.selectAll=function(a){for(var b=this.node.querySelectorAll(a),d=(c.set||Array)(),e=0;e{contents}',{x:+b.x.toFixed(3),y:+b.y.toFixed(3),width:+b.width.toFixed(3),height:+b.height.toFixed(3),contents:this.outerSVG()}); return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(d)))}},g.prototype.select=k.select,g.prototype.selectAll=k.selectAll}),d.plugin(function(a,d,e,f,g){function h(a,b,c){return function(d){var e=d.slice(a,b);return 1==e.length&&(e=e[0]),c?c(e):e}}var i=d.prototype,j=a.is,k=String,l="hasOwnProperty",m=function(a,b,d,e){"function"!=typeof d||d.length||(e=d,d=c.linear),this.attr=a,this.dur=b,d&&(this.easing=d),e&&(this.callback=e)};a._.Animation=m,a.animation=function(a,b,c,d){return new m(a,b,c,d)},i.inAnim=function(){var a=this,b=[];for(var c in a.anims)a.anims[l](c)&&!function(a){b.push({anim:new m(a._attrs,a.dur,a.easing,a._callback),mina:a,curStatus:a.status(),status:function(b){return a.status(b)},stop:function(){a.stop()}})}(a.anims[c]);return b},a.animate=function(a,d,e,f,g,h){"function"!=typeof g||g.length||(h=g,g=c.linear);var i=c.time(),j=c(a,d,i,i+f,c.time,e,g);return h&&b.once("mina.finish."+j.id,h),j},i.stop=function(){for(var a=this.inAnim(),b=0,c=a.length;c>b;b++)a[b].stop();return this},i.animate=function(a,d,e,f){"function"!=typeof e||e.length||(f=e,e=c.linear),a instanceof m&&(f=a.callback,e=a.easing,d=a.dur,a=a.attr);var g,i,n,o,p=[],q=[],r={},s=this;for(var t in a)if(a[l](t)){s.equal?(o=s.equal(t,k(a[t])),g=o.from,i=o.to,n=o.f):(g=+s.attr(t),i=+a[t]);var u=j(g,"array")?g.length:1;r[t]=h(p.length,p.length+u,n),p=p.concat(g),q=q.concat(i)}var v=c.time(),w=c(p,q,v,v+d,c.time,function(a){var b={};for(var c in r)r[l](c)&&(b[c]=r[c](a));s.attr(b)},e);return s.anims[w.id]=w,w._attrs=a,w._callback=f,b("snap.animcreated."+s.id,w),b.once("mina.finish."+w.id,function(){b.off("mina.*."+w.id),delete s.anims[w.id],f&&f.call(s)}),b.once("mina.stop."+w.id,function(){b.off("mina.*."+w.id),delete s.anims[w.id]}),s}}),d.plugin(function(a,b,c,d,e){function f(a,b,c,d,e,f){return null==b&&"[object SVGMatrix]"==g.call(a)?(this.a=a.a,this.b=a.b,this.c=a.c,this.d=a.d,this.e=a.e,void(this.f=a.f)):void(null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0))}var g=Object.prototype.toString,h=String,i=Math,j="";!function(b){function c(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var b=i.sqrt(c(a));a[0]&&(a[0]/=b),a[1]&&(a[1]/=b)}b.add=function(a,b,c,d,e,g){if(a&&a instanceof f)return this.add(a.a,a.b,a.c,a.d,a.e,a.f);var h=a*this.a+b*this.c,i=a*this.b+b*this.d;return this.e+=e*this.a+g*this.c,this.f+=e*this.b+g*this.d,this.c=c*this.a+d*this.c,this.d=c*this.b+d*this.d,this.a=h,this.b=i,this},f.prototype.multLeft=function(a,b,c,d,e,g){if(a&&a instanceof f)return this.multLeft(a.a,a.b,a.c,a.d,a.e,a.f);var h=a*this.a+c*this.b,i=a*this.c+c*this.d,j=a*this.e+c*this.f+e;return this.b=b*this.a+d*this.b,this.d=b*this.c+d*this.d,this.f=b*this.e+d*this.f+g,this.a=h,this.c=i,this.e=j,this},b.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new f(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},b.clone=function(){return new f(this.a,this.b,this.c,this.d,this.e,this.f)},b.translate=function(a,b){return this.e+=a*this.a+b*this.c,this.f+=a*this.b+b*this.d,this},b.scale=function(a,b,c,d){return null==b&&(b=a),(c||d)&&this.translate(c,d),this.a*=a,this.b*=a,this.c*=b,this.d*=b,(c||d)&&this.translate(-c,-d),this},b.rotate=function(b,c,d){b=a.rad(b),c=c||0,d=d||0;var e=+i.cos(b).toFixed(9),f=+i.sin(b).toFixed(9);return this.add(e,f,-f,e,c,d),this.add(1,0,0,1,-c,-d)},b.skewX=function(a){return this.skew(a,0)},b.skewY=function(a){return this.skew(0,a)},b.skew=function(b,c){b=b||0,c=c||0,b=a.rad(b),c=a.rad(c);var d=i.tan(b).toFixed(9),e=i.tan(c).toFixed(9);return this.add(1,e,d,1,0,0)},b.x=function(a,b){return a*this.a+b*this.c+this.e},b.y=function(a,b){return a*this.b+b*this.d+this.f},b.get=function(a){return+this[h.fromCharCode(97+a)].toFixed(4)},b.toString=function(){return"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")"},b.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},b.determinant=function(){return this.a*this.d-this.b*this.c},b.split=function(){var b={};b.dx=this.e,b.dy=this.f;var e=[[this.a,this.b],[this.c,this.d]];b.scalex=i.sqrt(c(e[0])),d(e[0]),b.shear=e[0][0]*e[1][0]+e[0][1]*e[1][1],e[1]=[e[1][0]-e[0][0]*b.shear,e[1][1]-e[0][1]*b.shear],b.scaley=i.sqrt(c(e[1])),d(e[1]),b.shear/=b.scaley,this.determinant()<0&&(b.scalex=-b.scalex);var f=e[0][1],g=e[1][1];return 0>g?(b.rotate=a.deg(i.acos(g)),0>f&&(b.rotate=360-b.rotate)):b.rotate=a.deg(i.asin(f)),b.isSimple=!(+b.shear.toFixed(9)||b.scalex.toFixed(9)!=b.scaley.toFixed(9)&&b.rotate),b.isSuperSimple=!+b.shear.toFixed(9)&&b.scalex.toFixed(9)==b.scaley.toFixed(9)&&!b.rotate,b.noRotation=!+b.shear.toFixed(9)&&!b.rotate,b},b.toTransformString=function(a){var b=a||this.split();return+b.shear.toFixed(9)?"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]:(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[+b.dx.toFixed(4),+b.dy.toFixed(4)]:j)+(b.rotate?"r"+[+b.rotate.toFixed(4),0,0]:j)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:j))}}(f.prototype),a.Matrix=f,a.matrix=function(a,b,c,d,e,g){return new f(a,b,c,d,e,g)}}),d.plugin(function(a,c,d,e,f){function g(d){return function(e){if(b.stop(),e instanceof f&&1==e.node.childNodes.length&&("radialGradient"==e.node.firstChild.tagName||"linearGradient"==e.node.firstChild.tagName||"pattern"==e.node.firstChild.tagName)&&(e=e.node.firstChild,n(this).appendChild(e),e=l(e)),e instanceof c)if("radialGradient"==e.type||"linearGradient"==e.type||"pattern"==e.type){e.node.id||p(e.node,{id:e.id});var g=q(e.node.id)}else g=e.attr(d);else if(g=a.color(e),g.error){var h=a(n(this).ownerSVGElement).gradient(e);h?(h.node.id||p(h.node,{id:h.id}),g=q(h.node.id)):g=e}else g=r(g);var i={};i[d]=g,p(this.node,i),this.node.style[d]=t}}function h(a){b.stop(),a==+a&&(a+="px"),this.node.style.fontSize=a}function i(a){for(var b=[],c=a.childNodes,d=0,e=c.length;e>d;d++){var f=c[d];3==f.nodeType&&b.push(f.nodeValue),"tspan"==f.tagName&&(1==f.childNodes.length&&3==f.firstChild.nodeType?b.push(f.firstChild.nodeValue):b.push(i(f)))}return b}function j(){return b.stop(),this.node.style.fontSize}var k=a._.make,l=a._.wrap,m=a.is,n=a._.getSomeDefs,o=/^url\(#?([^)]+)\)$/,p=a._.$,q=a.url,r=String,s=a._.separator,t="";a.deurl=function(a){return String(a).match(o)[1]},b.on("snap.util.attr.mask",function(a){if(a instanceof c||a instanceof f){if(b.stop(),a instanceof f&&1==a.node.childNodes.length&&(a=a.node.firstChild,n(this).appendChild(a),a=l(a)),"mask"==a.type)var d=a;else d=k("mask",n(this)),d.node.appendChild(a.node);!d.node.id&&p(d.node,{id:d.id}),p(this.node,{mask:q(d.id)})}}),function(a){b.on("snap.util.attr.clip",a),b.on("snap.util.attr.clip-path",a),b.on("snap.util.attr.clipPath",a)}(function(a){if(a instanceof c||a instanceof f){b.stop();for(var d,e=a.node;e;){if("clipPath"===e.nodeName){d=new c(e);break}if("svg"===e.nodeName){d=void 0;break}e=e.parentNode}d||(d=k("clipPath",n(this)),d.node.appendChild(a.node),!d.node.id&&p(d.node,{id:d.id})),p(this.node,{"clip-path":q(d.node.id||d.id)})}}),b.on("snap.util.attr.fill",g("fill")),b.on("snap.util.attr.stroke",g("stroke"));var u=/^([lr])(?:\(([^)]*)\))?(.*)$/i;b.on("snap.util.grad.parse",function(a){function b(a,b){for(var c=(b-h)/(a-i),d=i;a>d;d++)f[d].offset=+(+h+c*(d-i)).toFixed(2);i=a,h=b}a=r(a);var c=a.match(u);if(!c)return null;var d=c[1],e=c[2],f=c[3];e=e.split(/\s*,\s*/).map(function(a){return+a==a?+a:a}),1==e.length&&0==e[0]&&(e=[]),f=f.split("-"),f=f.map(function(a){a=a.split(":");var b={color:a[0]};return a[1]&&(b.offset=parseFloat(a[1])),b});var g=f.length,h=0,i=0;g--;for(var j=0;g>j;j++)"offset"in f[j]&&b(j,f[j].offset);return f[g].offset=f[g].offset||100,b(g,f[g].offset),{type:d,params:e,stops:f}}),b.on("snap.util.attr.d",function(c){b.stop(),m(c,"array")&&m(c[0],"array")&&(c=a.path.toString.call(c)),c=r(c),c.match(/[ruo]/i)&&(c=a.path.toAbsolute(c)),p(this.node,{d:c})})(-1),b.on("snap.util.attr.#text",function(a){b.stop(),a=r(a);for(var c=e.doc.createTextNode(a);this.node.firstChild;)this.node.removeChild(this.node.firstChild);this.node.appendChild(c)})(-1),b.on("snap.util.attr.path",function(a){b.stop(),this.attr({d:a})})(-1),b.on("snap.util.attr.class",function(a){b.stop(),this.node.className.baseVal=a})(-1),b.on("snap.util.attr.viewBox",function(a){var c;c=m(a,"object")&&"x"in a?[a.x,a.y,a.width,a.height].join(" "):m(a,"array")?a.join(" "):a,p(this.node,{viewBox:c}),b.stop()})(-1),b.on("snap.util.attr.transform",function(a){this.transform(a),b.stop()})(-1),b.on("snap.util.attr.r",function(a){"rect"==this.type&&(b.stop(),p(this.node,{rx:a,ry:a}))})(-1),b.on("snap.util.attr.textpath",function(a){if(b.stop(),"text"==this.type){var d,e,f;if(!a&&this.textPath){for(e=this.textPath;e.node.firstChild;)this.node.appendChild(e.node.firstChild);return e.remove(),void delete this.textPath}if(m(a,"string")){var g=n(this),h=l(g.parentNode).path(a);g.appendChild(h.node),d=h.id,h.attr({id:d})}else a=l(a),a instanceof c&&(d=a.attr("id"),d||(d=a.id,a.attr({id:d})));if(d)if(e=this.textPath,f=this.node,e)e.attr({"xlink:href":"#"+d});else{for(e=p("textPath",{"xlink:href":"#"+d});f.firstChild;)e.appendChild(f.firstChild);f.appendChild(e),this.textPath=l(e)}}})(-1),b.on("snap.util.attr.text",function(a){if("text"==this.type){for(var c=this.node,d=function(a){var b=p("tspan");if(m(a,"array"))for(var c=0;c1&&(a=Array.prototype.slice.call(arguments,0));var b={};return i(a,"object")&&!i(a,"array")?b=a:null!=a&&(b={points:a}),this.el("polyline",b)},h.polygon=function(a){arguments.length>1&&(a=Array.prototype.slice.call(arguments,0));var b={};return i(a,"object")&&!i(a,"array")?b=a:null!=a&&(b={points:a}),this.el("polygon",b)},function(){function d(){return this.selectAll("stop")}function e(a,b){var d=l("stop"),e={offset:+b+"%"};a=c.color(a),e["stop-color"]=a.hex,a.opacity<1&&(e["stop-opacity"]=a.opacity),l(d,e);for(var f,g=this.stops(),h=0;hb){this.node.insertBefore(d,g[h].node),f=!0;break}}return f||this.node.appendChild(d),this}function f(){if("linearGradient"==this.type){var a=l(this.node,"x1")||0,b=l(this.node,"x2")||1,d=l(this.node,"y1")||0,e=l(this.node,"y2")||0;return c._.box(a,d,math.abs(b-a),math.abs(e-d))}var f=this.node.cx||.5,g=this.node.cy||.5,h=this.node.r||0;return c._.box(f-h,g-h,2*h,2*h)}function g(a){var d=a,e=this.stops();if("string"==typeof a&&(d=b("snap.util.grad.parse",null,"l(0,0,0,1)"+a).firstDefined().stops),c.is(d,"array")){for(var f=0;fh;h++){var i=f[h];d.addStop(i.color,i.offset)}return d}function j(a,b,h,i,j){var k=c._.make("linearGradient",a);return k.stops=d,k.addStop=e,k.getBBox=f,k.setStops=g,null!=b&&l(k.node,{x1:b,y1:h,x2:i,y2:j}),k}function k(a,b,g,h,i,j){var k=c._.make("radialGradient",a);return k.stops=d,k.addStop=e,k.getBBox=f,null!=b&&l(k.node,{cx:b,cy:g,r:h}),null!=i&&null!=j&&l(k.node,{fx:i,fy:j}),k}var l=c._.$;h.gradient=function(a){return i(this.defs,a)},h.gradientLinear=function(a,b,c,d){return j(this.defs,a,b,c,d)},h.gradientRadial=function(a,b,c,d,e){return k(this.defs,a,b,c,d,e)},h.toString=function(){var a,b=this.node.ownerDocument,d=b.createDocumentFragment(),e=b.createElement("div"),f=this.node.cloneNode(!0);return d.appendChild(e),e.appendChild(f),c._.$(f,{xmlns:"http://www.w3.org/2000/svg"}),a=e.innerHTML,d.removeChild(d.firstChild),a},h.toDataURL=function(){return a&&a.btoa?"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(this))):void 0},h.clear=function(){for(var a,b=this.node.firstChild;b;)a=b.nextSibling,"defs"!=b.tagName?b.parentNode.removeChild(b):h.clear.call({node:b}),b=a}}()}),d.plugin(function(a,b,c,d){function e(a){var b=e.ps=e.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[M](c)&&c!=a&&(b[c].sleep--,!b[c].sleep&&delete b[c])}),b[a]}function f(a,b,c,d){return null==a&&(a=b=c=d=0),null==b&&(b=a.y,c=a.width,d=a.height,a=a.x),{x:a,y:b,width:c,w:c,height:d,h:d,x2:a+c,y2:b+d,cx:a+c/2,cy:b+d/2,r1:P.min(c,d)/2,r2:P.max(c,d)/2,r0:P.sqrt(c*c+d*d)/2,path:y(a,b,c,d),vb:[a,b,c,d].join(" ")}}function g(){return this.join(",").replace(N,"$1")}function h(a){var b=L(a);return b.toString=g,b}function i(a,b,c,d,e,f,g,h,i){return null==i?p(a,b,c,d,e,f,g,h):k(a,b,c,d,e,f,g,h,q(a,b,c,d,e,f,g,h,i))}function j(c,d){function e(a){return+(+a).toFixed(3)}return a._.cacher(function(a,f,g){a instanceof b&&(a=a.attr("d")),a=G(a);for(var h,j,l,m,n,o="",p={},q=0,r=0,s=a.length;s>r;r++){if(l=a[r],"M"==l[0])h=+l[1],j=+l[2];else{if(m=i(h,j,l[1],l[2],l[3],l[4],l[5],l[6]),q+m>f){if(d&&!p.start){if(n=i(h,j,l[1],l[2],l[3],l[4],l[5],l[6],f-q),o+=["C"+e(n.start.x),e(n.start.y),e(n.m.x),e(n.m.y),e(n.x),e(n.y)],g)return o;p.start=o,o=["M"+e(n.x),e(n.y)+"C"+e(n.n.x),e(n.n.y),e(n.end.x),e(n.end.y),e(l[5]),e(l[6])].join(),q+=m,h=+l[5],j=+l[6];continue}if(!c&&!d)return n=i(h,j,l[1],l[2],l[3],l[4],l[5],l[6],f-q)}q+=m,h=+l[5],j=+l[6]}o+=l.shift()+l}return p.end=o,n=c?q:d?p:k(h,j,l[0],l[1],l[2],l[3],l[4],l[5],1)},null,a._.clone)}function k(a,b,c,d,e,f,g,h,i){var j=1-i,k=T(j,3),l=T(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*P.atan2(q-s,r-t)/Q;return{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}}function l(b,c,d,e,g,h,i,j){a.is(b,"array")||(b=[b,c,d,e,g,h,i,j]);var k=F.apply(null,b);return f(k.min.x,k.min.y,k.max.x-k.min.x,k.max.y-k.min.y)}function m(a,b,c){return b>=a.x&&b<=a.x+a.width&&c>=a.y&&c<=a.y+a.height}function n(a,b){return a=f(a),b=f(b),m(b,a.x,a.y)||m(b,a.x2,a.y)||m(b,a.x,a.y2)||m(b,a.x2,a.y2)||m(a,b.x,b.y)||m(a,b.x2,b.y)||m(a,b.x,b.y2)||m(a,b.x2,b.y2)||(a.xb.x||b.xa.x)&&(a.yb.y||b.ya.y)}function o(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function p(a,b,c,d,e,f,g,h,i){null==i&&(i=1),i=i>1?1:0>i?0:i;for(var j=i/2,k=12,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],m=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],n=0,p=0;k>p;p++){var q=j*l[p]+j,r=o(q,a,c,e,g),s=o(q,b,d,f,h),t=r*r+s*s;n+=m[p]*P.sqrt(t)}return j*n}function q(a,b,c,d,e,f,g,h,i){if(!(0>i||p(a,b,c,d,e,f,g,h)n;)l/=2,m+=(i>j?1:-1)*l,j=p(a,b,c,d,e,f,g,h,m);return m}}function r(a,b,c,d,e,f,g,h){if(!(S(a,c)S(e,g)||S(b,d)S(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+R(a,c).toFixed(2)||n>+S(a,c).toFixed(2)||n<+R(e,g).toFixed(2)||n>+S(e,g).toFixed(2)||o<+R(b,d).toFixed(2)||o>+S(b,d).toFixed(2)||o<+R(f,h).toFixed(2)||o>+S(f,h).toFixed(2)))return{x:l,y:m}}}}function s(a,b,c){var d=l(a),e=l(b);if(!n(d,e))return c?0:[];for(var f=p.apply(0,a),g=p.apply(0,b),h=~~(f/8),i=~~(g/8),j=[],m=[],o={},q=c?0:[],s=0;h+1>s;s++){var t=k.apply(0,a.concat(s/h));j.push({x:t.x,y:t.y,t:s/h})}for(s=0;i+1>s;s++)t=k.apply(0,b.concat(s/i)),m.push({x:t.x,y:t.y,t:s/i});for(s=0;h>s;s++)for(var u=0;i>u;u++){var v=j[s],w=j[s+1],x=m[u],y=m[u+1],z=U(w.x-v.x)<.001?"y":"x",A=U(y.x-x.x)<.001?"y":"x",B=r(v.x,v.y,w.x,w.y,x.x,x.y,y.x,y.y);if(B){if(o[B.x.toFixed(4)]==B.y.toFixed(4))continue;o[B.x.toFixed(4)]=B.y.toFixed(4);var C=v.t+U((B[z]-v[z])/(w[z]-v[z]))*(w.t-v.t),D=x.t+U((B[A]-x[A])/(y[A]-x[A]))*(y.t-x.t);C>=0&&1>=C&&D>=0&&1>=D&&(c?q++:q.push({x:B.x,y:B.y,t1:C,t2:D}))}}return q}function t(a,b){return v(a,b)}function u(a,b){return v(a,b,1)}function v(a,b,c){a=G(a),b=G(b);for(var d,e,f,g,h,i,j,k,l,m,n=c?0:[],o=0,p=a.length;p>o;o++){var q=a[o];if("M"==q[0])d=h=q[1],e=i=q[2];else{"C"==q[0]?(l=[d,e].concat(q.slice(1)),d=l[6],e=l[7]):(l=[d,e,d,e,h,i,h,i],d=h,e=i);for(var r=0,t=b.length;t>r;r++){var u=b[r];if("M"==u[0])f=j=u[1],g=k=u[2];else{"C"==u[0]?(m=[f,g].concat(u.slice(1)),f=m[6],g=m[7]):(m=[f,g,f,g,j,k,j,k],f=j,g=k);var v=s(l,m,c);if(c)n+=v;else{for(var w=0,x=v.length;x>w;w++)v[w].segment1=o,v[w].segment2=r,v[w].bez1=l,v[w].bez2=m;n=n.concat(v)}}}}}return n}function w(a,b,c){var d=x(a);return m(d,b,c)&&v(a,[["M",b,c],["H",d.x2+10]],1)%2==1}function x(a){var b=e(a);if(b.bbox)return L(b.bbox);if(!a)return f();a=G(a);for(var c,d=0,g=0,h=[],i=[],j=0,k=a.length;k>j;j++)if(c=a[j],"M"==c[0])d=c[1],g=c[2],h.push(d),i.push(g);else{var l=F(d,g,c[1],c[2],c[3],c[4],c[5],c[6]);h=h.concat(l.min.x,l.max.x),i=i.concat(l.min.y,l.max.y),d=c[5],g=c[6]}var m=R.apply(0,h),n=R.apply(0,i),o=S.apply(0,h),p=S.apply(0,i),q=f(m,n,o-m,p-n);return b.bbox=L(q),q}function y(a,b,c,d,e){if(e)return[["M",+a+ +e,b],["l",c-2*e,0],["a",e,e,0,0,1,e,e],["l",0,d-2*e],["a",e,e,0,0,1,-e,e],["l",2*e-c,0],["a",e,e,0,0,1,-e,-e],["l",0,2*e-d],["a",e,e,0,0,1,e,-e],["z"]];var f=[["M",a,b],["l",c,0],["l",0,d],["l",-c,0],["z"]];return f.toString=g,f}function z(a,b,c,d,e){if(null==e&&null==d&&(d=c),a=+a,b=+b,c=+c,d=+d,null!=e)var f=Math.PI/180,h=a+c*Math.cos(-d*f),i=a+c*Math.cos(-e*f),j=b+c*Math.sin(-d*f),k=b+c*Math.sin(-e*f),l=[["M",h,j],["A",c,c,0,+(e-d>180),0,i,k]];else l=[["M",a,b],["m",0,-d],["a",c,d,0,1,1,0,2*d],["a",c,d,0,1,1,0,-2*d],["z"]];return l.toString=g,l}function A(b){var c=e(b),d=String.prototype.toLowerCase;if(c.rel)return h(c.rel);a.is(b,"array")&&a.is(b&&b[0],"array")||(b=a.parsePathString(b));var f=[],i=0,j=0,k=0,l=0,m=0;"M"==b[0][0]&&(i=b[0][1],j=b[0][2],k=i,l=j,m++,f.push(["M",i,j]));for(var n=m,o=b.length;o>n;n++){var p=f[n]=[],q=b[n];if(q[0]!=d.call(q[0]))switch(p[0]=d.call(q[0]),p[0]){case"a":p[1]=q[1],p[2]=q[2],p[3]=q[3],p[4]=q[4],p[5]=q[5],p[6]=+(q[6]-i).toFixed(3),p[7]=+(q[7]-j).toFixed(3);break;case"v":p[1]=+(q[1]-j).toFixed(3);break;case"m":k=q[1],l=q[2];default:for(var r=1,s=q.length;s>r;r++)p[r]=+(q[r]-(r%2?i:j)).toFixed(3)}else{p=f[n]=[],"m"==q[0]&&(k=q[1]+i,l=q[2]+j);for(var t=0,u=q.length;u>t;t++)f[n][t]=q[t]}var v=f[n].length;switch(f[n][0]){case"z":i=k,j=l;break;case"h":i+=+f[n][v-1];break;case"v":j+=+f[n][v-1];break;default:i+=+f[n][v-2],j+=+f[n][v-1]}}return f.toString=g,c.rel=h(f),f}function B(b){var c=e(b);if(c.abs)return h(c.abs);if(K(b,"array")&&K(b&&b[0],"array")||(b=a.parsePathString(b)),!b||!b.length)return[["M",0,0]];var d,f=[],i=0,j=0,k=0,l=0,m=0;"M"==b[0][0]&&(i=+b[0][1],j=+b[0][2],k=i,l=j,m++,f[0]=["M",i,j]);for(var n,o,p=3==b.length&&"M"==b[0][0]&&"R"==b[1][0].toUpperCase()&&"Z"==b[2][0].toUpperCase(),q=m,r=b.length;r>q;q++){if(f.push(n=[]),o=b[q],d=o[0],d!=d.toUpperCase())switch(n[0]=d.toUpperCase(),n[0]){case"A":n[1]=o[1],n[2]=o[2],n[3]=o[3],n[4]=o[4],n[5]=o[5],n[6]=+o[6]+i,n[7]=+o[7]+j;break;case"V":n[1]=+o[1]+j;break;case"H":n[1]=+o[1]+i;break;case"R":for(var s=[i,j].concat(o.slice(1)),t=2,u=s.length;u>t;t++)s[t]=+s[t]+i,s[++t]=+s[t]+j;f.pop(),f=f.concat(I(s,p));break;case"O":f.pop(),s=z(i,j,o[1],o[2]),s.push(s[0]),f=f.concat(s);break;case"U":f.pop(),f=f.concat(z(i,j,o[1],o[2],o[3])),n=["U"].concat(f[f.length-1].slice(-2));break;case"M":k=+o[1]+i,l=+o[2]+j;default:for(t=1,u=o.length;u>t;t++)n[t]=+o[t]+(t%2?i:j)}else if("R"==d)s=[i,j].concat(o.slice(1)),f.pop(),f=f.concat(I(s,p)),n=["R"].concat(o.slice(-2));else if("O"==d)f.pop(),s=z(i,j,o[1],o[2]),s.push(s[0]),f=f.concat(s);else if("U"==d)f.pop(),f=f.concat(z(i,j,o[1],o[2],o[3])),n=["U"].concat(f[f.length-1].slice(-2));else for(var v=0,w=o.length;w>v;v++)n[v]=o[v];if(d=d.toUpperCase(),"O"!=d)switch(n[0]){case"Z":i=+k,j=+l;break;case"H":i=n[1];break;case"V":j=n[1];break;case"M":k=n[n.length-2],l=n[n.length-1];default:i=n[n.length-2],j=n[n.length-1]}}return f.toString=g,c.abs=h(f),f}function C(a,b,c,d){return[a,b,c,d,c,d]}function D(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]}function E(b,c,d,e,f,g,h,i,j,k){var l,m=120*Q/180,n=Q/180*(+f||0),o=[],p=a._.cacher(function(a,b,c){var d=a*P.cos(c)-b*P.sin(c),e=a*P.sin(c)+b*P.cos(c);return{x:d,y:e}});if(!d||!e)return[b,c,i,j,i,j];if(k)y=k[0],z=k[1],w=k[2],x=k[3];else{l=p(b,c,-n),b=l.x,c=l.y,l=p(i,j,-n),i=l.x,j=l.y;var q=(P.cos(Q/180*f),P.sin(Q/180*f),(b-i)/2),r=(c-j)/2,s=q*q/(d*d)+r*r/(e*e);s>1&&(s=P.sqrt(s),d=s*d,e=s*e);var t=d*d,u=e*e,v=(g==h?-1:1)*P.sqrt(U((t*u-t*r*r-u*q*q)/(t*r*r+u*q*q))),w=v*d*r/e+(b+i)/2,x=v*-e*q/d+(c+j)/2,y=P.asin(((c-x)/e).toFixed(9)),z=P.asin(((j-x)/e).toFixed(9));y=w>b?Q-y:y,z=w>i?Q-z:z,0>y&&(y=2*Q+y),0>z&&(z=2*Q+z),h&&y>z&&(y-=2*Q),!h&&z>y&&(z-=2*Q)}var A=z-y;if(U(A)>m){var B=z,C=i,D=j;z=y+m*(h&&z>y?1:-1),i=w+d*P.cos(z),j=x+e*P.sin(z),o=E(i,j,d,e,f,0,h,C,D,[z,B,w,x])}A=z-y;var F=P.cos(y),G=P.sin(y),H=P.cos(z),I=P.sin(z),J=P.tan(A/4),K=4/3*d*J,L=4/3*e*J,M=[b,c],N=[b+K*G,c-L*F],O=[i+K*I,j-L*H],R=[i,j];if(N[0]=2*M[0]-N[0],N[1]=2*M[1]-N[1],k)return[N,O,R].concat(o);o=[N,O,R].concat(o).join().split(",");for(var S=[],T=0,V=o.length;V>T;T++)S[T]=T%2?p(o[T-1],o[T],n).y:p(o[T],o[T+1],n).x;return S}function F(a,b,c,d,e,f,g,h){for(var i,j,k,l,m,n,o,p,q=[],r=[[],[]],s=0;2>s;++s)if(0==s?(j=6*a-12*c+6*e,i=-3*a+9*c-9*e+3*g,k=3*c-3*a):(j=6*b-12*d+6*f,i=-3*b+9*d-9*f+3*h,k=3*d-3*b),U(i)<1e-12){if(U(j)<1e-12)continue;l=-k/j,l>0&&1>l&&q.push(l)}else o=j*j-4*k*i,p=P.sqrt(o),0>o||(m=(-j+p)/(2*i),m>0&&1>m&&q.push(m),n=(-j-p)/(2*i),n>0&&1>n&&q.push(n));for(var t,u=q.length,v=u;u--;)l=q[u],t=1-l,r[0][u]=t*t*t*a+3*t*t*l*c+3*t*l*l*e+l*l*l*g,r[1][u]=t*t*t*b+3*t*t*l*d+3*t*l*l*f+l*l*l*h;return r[0][v]=a,r[1][v]=b,r[0][v+1]=g,r[1][v+1]=h,r[0].length=r[1].length=v+2,{min:{x:R.apply(0,r[0]),y:R.apply(0,r[1])},max:{x:S.apply(0,r[0]),y:S.apply(0,r[1])}}}function G(a,b){var c=!b&&e(a);if(!b&&c.curve)return h(c.curve);for(var d=B(a),f=b&&B(b),g={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=(function(a,b,c){var d,e;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(!(a[0]in{T:1,Q:1})&&(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"].concat(E.apply(0,[b.x,b.y].concat(a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e].concat(a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"].concat(D(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"].concat(D(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"].concat(C(b.x,b.y,a[1],a[2]));break;case"H":a=["C"].concat(C(b.x,b.y,a[1],b.y));break;case"V":a=["C"].concat(C(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"].concat(C(b.x,b.y,b.X,b.Y))}return a}),k=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)m[b]="A",f&&(n[b]="A"),a.splice(b++,0,["C"].concat(c.splice(0,6)));a.splice(b,1),r=S(d.length,f&&f.length||0)}},l=function(a,b,c,e,g){a&&b&&"M"==a[g][0]&&"M"!=b[g][0]&&(b.splice(g,0,["M",e.x,e.y]),c.bx=0,c.by=0,c.x=a[g][1],c.y=a[g][2],r=S(d.length,f&&f.length||0))},m=[],n=[],o="",p="",q=0,r=S(d.length,f&&f.length||0);r>q;q++){d[q]&&(o=d[q][0]),"C"!=o&&(m[q]=o,q&&(p=m[q-1])),d[q]=j(d[q],g,p),"A"!=m[q]&&"C"==o&&(m[q]="C"),k(d,q),f&&(f[q]&&(o=f[q][0]),"C"!=o&&(n[q]=o,q&&(p=n[q-1])),f[q]=j(f[q],i,p),"A"!=n[q]&&"C"==o&&(n[q]="C"),k(f,q)),l(d,f,g,i,q),l(f,d,i,g,q);var s=d[q],t=f&&f[q],u=s.length,v=f&&t.length;g.x=s[u-2],g.y=s[u-1],g.bx=O(s[u-4])||g.x,g.by=O(s[u-3])||g.y,i.bx=f&&(O(t[v-4])||i.x),i.by=f&&(O(t[v-3])||i.y),i.x=f&&t[v-2],i.y=f&&t[v-1]}return f||(c.curve=h(d)),f?[d,f]:d}function H(a,b){if(!b)return a;var c,d,e,f,g,h,i;for(a=G(a),e=0,g=a.length;g>e;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a}function I(a,b){for(var c=[],d=0,e=a.length;e-2*!b>d;d+=2){var f=[{x:+a[d-2],y:+a[d-1]},{x:+a[d],y:+a[d+1]},{x:+a[d+2],y:+a[d+3]},{x:+a[d+4],y:+a[d+5]}];b?d?e-4==d?f[3]={x:+a[0],y:+a[1]}:e-2==d&&(f[2]={x:+a[0],y:+a[1]},f[3]={x:+a[2],y:+a[3]}):f[0]={x:+a[e-2],y:+a[e-1]}:e-4==d?f[3]=f[2]:d||(f[0]={x:+a[d],y:+a[d+1]}),c.push(["C",(-f[0].x+6*f[1].x+f[2].x)/6,(-f[0].y+6*f[1].y+f[2].y)/6,(f[1].x+6*f[2].x-f[3].x)/6,(f[1].y+6*f[2].y-f[3].y)/6,f[2].x,f[2].y])}return c}var J=b.prototype,K=a.is,L=a._.clone,M="hasOwnProperty",N=/,?([a-z]),?/gi,O=parseFloat,P=Math,Q=P.PI,R=P.min,S=P.max,T=P.pow,U=P.abs,V=j(1),W=j(),X=j(0,1),Y=a._unit2px,Z={path:function(a){return a.attr("path")},circle:function(a){var b=Y(a);return z(b.cx,b.cy,b.r)},ellipse:function(a){var b=Y(a);return z(b.cx||0,b.cy||0,b.rx,b.ry); diff --git a/dist/snap.svg.js b/dist/snap.svg.js index fb0e4b7..8c6601a 100644 --- a/dist/snap.svg.js +++ b/dist/snap.svg.js @@ -14,7 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// build: 2017-02-04 +// build: 2017-02-05 // Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. // @@ -947,7 +947,7 @@ var has = "hasOwnProperty", xmlns = "http://www.w3.org/2000/svg", hub = {}, /*\ - * Snap.url() + * Snap.url [ method ] ** * Wraps path into `"url('')"`. @@ -1241,7 +1241,6 @@ Snap.atan2 = function (num) { [ method ] ** * Returns an angle between two or three points - > Parameters - x1 (number) x coord of first point - y1 (number) y coord of first point - x2 (number) x coord of second point @@ -1256,7 +1255,6 @@ Snap.angle = angle; [ method ] ** * Returns distance between two points - > Parameters - x1 (number) x coord of first point - y1 (number) y coord of first point - x2 (number) x coord of second point @@ -1271,7 +1269,6 @@ Snap.len = function (x1, y1, x2, y2) { [ method ] ** * Returns squared distance between two points - > Parameters - x1 (number) x coord of first point - y1 (number) y coord of first point - x2 (number) x coord of second point @@ -1286,7 +1283,6 @@ Snap.len2 = function (x1, y1, x2, y2) { [ method ] ** * Returns closest point to a given one on a given path. - > Parameters - path (Element) path element - x (number) x coord of a point - y (number) y coord of a point @@ -4116,7 +4112,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { separator = Snap._.separator, E = ""; /*\ - * Snap.deurl() + * Snap.deurl [ method ] ** * Unwraps path from `"url()"`. @@ -5310,7 +5306,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { var $ = Snap._.$; // gradients' helpers /*\ - * Element.stops() + * Element.stops [ method ] ** * Only for gradients! @@ -5321,7 +5317,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { return this.selectAll("stop"); } /*\ - * Element.addStop() + * Element.addStop [ method ] ** * Only for gradients! @@ -5371,7 +5367,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { } } /*\ - * Element.setStops() + * Element.setStops [ method ] ** * Only for gradients! diff --git a/doc/reference.html b/doc/reference.html index 7956d45..9f08b41 100644 --- a/doc/reference.html +++ b/doc/reference.html @@ -8,7 +8,6 @@ - @@ -46,7 +45,7 @@ Docs Support Demos - Download + Download @@ -56,7 +55,7 @@
- +

or

-
-

Parameters

-
    -
  1. +
    +

    Parameters

    +
      +
    1. matrix object @@ -4808,12 +4842,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.multLeft(…) +

      Matrix.multLeft(…) -

      +
      @@ -4821,45 +4855,45 @@ rect.animate({x: 10}, 1000);

      Multiplies a passed affine transform to the left: M * this.

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. a number
        2. -
        3. +
        4. b number
        5. -
        6. +
        7. c number
        8. -
        9. +
        10. d number
        11. -
        12. +
        13. e number
        14. -
        15. +
        16. f number @@ -4870,10 +4904,10 @@ rect.animate({x: 10}, 1000);

        or

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. matrix object @@ -4889,12 +4923,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.invert() +

      Matrix.invert() -

      +
      @@ -4913,12 +4947,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.clone() +

      Matrix.clone() -

      +
      @@ -4937,29 +4971,29 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.translate(x, y) +

      Matrix.translate(x, y) -

      +

      Translate the matrix

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number horizontal offset distance
        2. -
        3. +
        4. y number @@ -4973,29 +5007,29 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.scale(x, [y], [cx], [cy]) +

      Matrix.scale(x, [y], [cx], [cy]) -

      +

      Scales the matrix

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number amount to be scaled, with 1 resulting in no change
        2. -
        3. +
        4. y number @@ -5004,7 +5038,7 @@ rect.animate({x: 10}, 1000);
      (Otherwise x applies to both axes.)
    2. -
    3. +
    4. cx number @@ -5012,7 +5046,7 @@ rect.animate({x: 10}, 1000); horizontal origin point from which to scale
    5. -
    6. +
    7. cy number @@ -5028,29 +5062,29 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.rotate(a, x, y) +

      Matrix.rotate(a, x, y) -

      +

      Rotates the matrix

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. a number angle of rotation, in degrees
        2. -
        3. +
        4. x number @@ -5058,7 +5092,7 @@ rect.animate({x: 10}, 1000);
      horizontal origin point from which to rotate
    8. -
    9. +
    10. y number @@ -5072,22 +5106,22 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.skewX(x) +

      Matrix.skewX(x) -

      +

      Skews the matrix along the x-axis

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number @@ -5101,22 +5135,22 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.skewY(y) +

      Matrix.skewY(y) -

      +

      Skews the matrix along the y-axis

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. y number @@ -5130,29 +5164,29 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.skew(y, x) +

      Matrix.skew(y, x) -

      +

      Skews the matrix

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. y number Angle to skew along the y-axis (in degrees).
        2. -
        3. +
        4. x number @@ -5166,12 +5200,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.x(x, y) +

      Matrix.x(x, y) -

      +
      @@ -5181,17 +5215,17 @@ rect.animate({x: 10}, 1000);
      Matrix.y

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number
        2. -
        3. +
        4. y number @@ -5210,12 +5244,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.y(x, y) +

      Matrix.y(x, y) -

      +
      @@ -5225,17 +5259,17 @@ rect.animate({x: 10}, 1000);
      Matrix.x

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number
        2. -
        3. +
        4. y number @@ -5254,12 +5288,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.determinant() +

      Matrix.determinant() -

      +
      @@ -5276,12 +5310,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.split() +

      Matrix.split() -

      +
      @@ -5349,12 +5383,12 @@ rect.animate({x: 10}, 1000);
      -

      Matrix.toTransformString() +

      Matrix.toTransformString() -

      +
      @@ -5371,12 +5405,12 @@ rect.animate({x: 10}, 1000);
      -

      Snap.Matrix() +

      Snap.Matrix() -

      +
      @@ -5390,12 +5424,12 @@ rect.animate({x: 10}, 1000);
      -

      Snap.matrix(…) +

      Snap.matrix(…) -

      +
      @@ -5403,45 +5437,45 @@ rect.animate({x: 10}, 1000);

      Utility method Returns a matrix based on the given parameters

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. a number
        2. -
        3. +
        4. b number
        5. -
        6. +
        7. c number
        8. -
        9. +
        10. d number
        11. -
        12. +
        13. e number
        14. -
        15. +
        16. f number @@ -5452,10 +5486,10 @@ rect.animate({x: 10}, 1000);

        or

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. svgMatrix SVGMatrix @@ -5476,12 +5510,12 @@ rect.animate({x: 10}, 1000);
      -

      Paper.rect(x, y, width, height, [rx], [ry]) +

      Paper.rect(x, y, width, height, [rx], [ry]) -

      +
      @@ -5489,38 +5523,38 @@ rect.animate({x: 10}, 1000);

      Draws a rectangle

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number x coordinate of the top left corner
        2. -
        3. +
        4. y number y coordinate of the top left corner
        5. -
        6. +
        7. width number width
        8. -
        9. +
        10. height number height
        11. -
        12. +
        13. rx number @@ -5528,7 +5562,7 @@ rect.animate({x: 10}, 1000); horizontal radius for rounded corners, default is 0
        14. -
        15. +
        16. ry number @@ -5553,36 +5587,36 @@ var c = paper.rect(40, 40, 50, 50, 10);
      -

      Paper.circle(x, y, r) +

      Paper.circle(x, y, r) -

      +

      Draws a circle

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number x coordinate of the centre
        2. -
        3. +
        4. y number y coordinate of the centre
        5. -
        6. +
        7. r number @@ -5603,50 +5637,50 @@ var c = paper.rect(40, 40, 50, 50, 10);
      -

      Paper.image(src, x, y, width, height) +

      Paper.image(src, x, y, width, height) -

      +

      Places an image on the surface

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. src string URI of the source image
        2. -
        3. +
        4. x number x offset position
        5. -
        6. +
        7. y number y offset position
        8. -
        9. +
        10. width number width of the image
        11. -
        12. +
        13. height number @@ -5674,43 +5708,43 @@ var c = paper.rect(40, 40, 50, 50, 10);
      -

      Paper.ellipse(x, y, rx, ry) +

      Paper.ellipse(x, y, rx, ry) -

      +

      Draws an ellipse

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number x coordinate of the centre
        2. -
        3. +
        4. y number y coordinate of the centre
        5. -
        6. +
        7. rx number horizontal radius
        8. -
        9. +
        10. ry number @@ -5731,12 +5765,12 @@ var c = paper.rect(40, 40, 50, 50, 10);
      -

      Paper.path([pathString]) +

      Paper.path([pathString]) -

      +
      @@ -5744,10 +5778,10 @@ var c = paper.rect(40, 40, 50, 50, 10);

      Creates a <path> element using the given string as the path's definition

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. pathString string @@ -5859,22 +5893,22 @@ var c = paper.rect(40, 40, 50, 50, 10);
      -

      Paper.g([varargs]) +

      Paper.g([varargs]) -

      +

      Creates a group element

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. varargs @@ -5903,12 +5937,12 @@ g.add(c2, c1);
      -

      Paper.group() +

      Paper.group() -

      +
      @@ -5921,22 +5955,22 @@ g.add(c2, c1);
      -

      Paper.svg(x, y, width, height, vbx, vby, vbw, vbh) +

      Paper.svg(x, y, width, height, vbx, vby, vbw, vbh) -

      +

      Creates a nested SVG element.

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number @@ -5944,7 +5978,7 @@ g.add(c2, c1);
      optional X of the element
    11. -
    12. +
    13. y number @@ -5952,7 +5986,7 @@ g.add(c2, c1); optional Y of the element
    14. -
    15. +
    16. width number @@ -5960,7 +5994,7 @@ g.add(c2, c1); optional width of the element
    17. -
    18. +
    19. height number @@ -5968,7 +6002,7 @@ g.add(c2, c1); optional height of the element
    20. -
    21. +
    22. vbx number @@ -5976,7 +6010,7 @@ g.add(c2, c1); optional viewbox X
    23. -
    24. +
    25. vby number @@ -5984,7 +6018,7 @@ g.add(c2, c1); optional viewbox Y
    26. -
    27. +
    28. vbw number @@ -5992,7 +6026,7 @@ g.add(c2, c1); optional viewbox width
    29. -
    30. +
    31. vbh number @@ -6012,12 +6046,12 @@ g.add(c2, c1);
      -

      Paper.mask() +

      Paper.mask() -

      +
      @@ -6035,12 +6069,12 @@ g.add(c2, c1);
      -

      Paper.ptrn(x, y, width, height, vbx, vby, vbw, vbh) +

      Paper.ptrn(x, y, width, height, vbx, vby, vbw, vbh) -

      +
      @@ -6048,10 +6082,10 @@ g.add(c2, c1);

      Equivalent in behaviour to Paper.g, except it’s a pattern.

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. x number @@ -6059,7 +6093,7 @@ g.add(c2, c1); optional X of the element
        2. -
        3. +
        4. y number @@ -6067,7 +6101,7 @@ g.add(c2, c1); optional Y of the element
        5. -
        6. +
        7. width number @@ -6075,7 +6109,7 @@ g.add(c2, c1); optional width of the element
        8. -
        9. +
        10. height number @@ -6083,7 +6117,7 @@ g.add(c2, c1); optional height of the element
        11. -
        12. +
        13. vbx number @@ -6091,7 +6125,7 @@ g.add(c2, c1); optional viewbox X
        14. -
        15. +
        16. vby number @@ -6099,7 +6133,7 @@ g.add(c2, c1); optional viewbox Y
        17. -
        18. +
        19. vbw number @@ -6107,7 +6141,7 @@ g.add(c2, c1); optional viewbox width
        20. -
        21. +
        22. vbh number @@ -6127,22 +6161,22 @@ g.add(c2, c1);
      -

      Paper.use(…) +

      Paper.use(…) -

      +

      Creates a <use> element.

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. id string @@ -6154,10 +6188,10 @@ g.add(c2, c1);

    or

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. id Element @@ -6177,22 +6211,22 @@ g.add(c2, c1);
        -

        Paper.symbol(vbx, vby, vbw, vbh) +

        Paper.symbol(vbx, vby, vbw, vbh) -

        +

        Creates a <symbol> element.

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. vbx number @@ -6200,7 +6234,7 @@ g.add(c2, c1);
        optional viewbox X
      2. -
      3. +
      4. vby number @@ -6208,7 +6242,7 @@ g.add(c2, c1); optional viewbox Y
      5. -
      6. +
      7. vbw number @@ -6216,7 +6250,7 @@ g.add(c2, c1); optional viewbox width
      8. -
      9. +
      10. vbh number @@ -6236,36 +6270,36 @@ g.add(c2, c1);
        -

        Paper.text(x, y, text) +

        Paper.text(x, y, text) -

        +

        Draws a text string

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. x number x coordinate position
          2. -
          3. +
          4. y number y coordinate position
          5. -
          6. +
          7. text string @@ -6294,43 +6328,43 @@ t1.attr({textpath: pth});
        -

        Paper.line(x1, y1, x2, y2) +

        Paper.line(x1, y1, x2, y2) -

        +

        Draws a line

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. x1 number x coordinate position of the start
          2. -
          3. +
          4. y1 number y coordinate position of the start
          5. -
          6. +
          7. x2 number x coordinate position of the end
          8. -
          9. +
          10. y2 number @@ -6351,22 +6385,22 @@ t1.attr({textpath: pth});
        -

        Paper.polyline(…) +

        Paper.polyline(…) -

        +

        Draws a polyline

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. points array @@ -6377,10 +6411,10 @@ t1.attr({textpath: pth});

      or

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. varargs @@ -6402,12 +6436,12 @@ var p2 = paper.polyline(10, 10, 100, 100);
          -

          Paper.polygon() +

          Paper.polygon() -

          +
          @@ -6418,17 +6452,17 @@ var p2 = paper.polyline(10, 10, 100, 100);
        -
        +
        -

        Element.stops()() - Element.stops() + -

        +
        -
        +

        Only for gradients! Returns array of gradient stops elements. @@ -6441,31 +6475,31 @@ var p2 = paper.polyline(10, 10, 100, 100);

      -
      +
      -

      Element.addStop()(color, offset) - Element.addStop(color, offset) + -

      +
      -
      +

      Only for gradients! Adds another stop to the gradient.

      -
      -

      Parameters

      -
        -
      1. +
        +

        Parameters

        +
          +
        1. color string stops color
        2. -
        3. +
        4. offset number @@ -6482,27 +6516,27 @@ var p2 = paper.polyline(10, 10, 100, 100);
    -
    +
    -

    Element.setStops()(str) - +

    Element.setStops(str) + -

    +
    -
    +

    Only for gradients! Updates stops of the gradient based on passed gradient descriptor. See Ppaer.gradient

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. str string @@ -6523,22 +6557,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Paper.gradient(gradient) +

    Paper.gradient(gradient) -

    +

    Creates a gradient element

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. gradient string @@ -6595,12 +6629,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Paper.toString() +

    Paper.toString() -

    +
    @@ -6620,12 +6654,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Paper.toDataURL() +

    Paper.toDataURL() -

    +
    @@ -6643,12 +6677,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Paper.clear() +

    Paper.clear() -

    +
    @@ -6660,12 +6694,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Element.addClass(value) +

    Element.addClass(value) -

    +
    @@ -6673,10 +6707,10 @@ g.setStops("#fff-#000-#f00-#fc0");

    Adds given class name or list of class names to the element.

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. value string @@ -6696,12 +6730,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Element.removeClass(value) +

    Element.removeClass(value) -

    +
    @@ -6709,10 +6743,10 @@ g.setStops("#fff-#000-#f00-#fc0");

    Removes given class name or list of class names from the element.

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. value string @@ -6732,12 +6766,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Element.hasClass(value) +

    Element.hasClass(value) -

    +
    @@ -6745,10 +6779,10 @@ g.setStops("#fff-#000-#f00-#fc0");

    Checks if the element has a given class name in the list of class names applied to it.

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. value string @@ -6767,12 +6801,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Element.toggleClass(value, flag) +

    Element.toggleClass(value, flag) -

    +
    @@ -6781,10 +6815,10 @@ g.setStops("#fff-#000-#f00-#fc0");
    depending on either the class’s presence or the value of the flag argument.

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. value string @@ -6792,7 +6826,7 @@ g.setStops("#fff-#000-#f00-#fc0"); class name or space separated list of class names
      2. -
      3. +
      4. flag boolean @@ -6812,22 +6846,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina(a, A, b, B, get, set, [easing]) +

    mina(a, A, b, B, get, set, [easing]) -

    +

    Generic animation of numbers

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. a number @@ -6835,7 +6869,7 @@ g.setStops("#fff-#000-#f00-#fc0");
    start slave number
  2. -
  3. +
  4. A number @@ -6843,7 +6877,7 @@ g.setStops("#fff-#000-#f00-#fc0"); end slave number
  5. -
  6. +
  7. b number @@ -6852,7 +6886,7 @@ g.setStops("#fff-#000-#f00-#fc0"); master number (start time in general case)
  8. -
  9. +
  10. B number @@ -6861,7 +6895,7 @@ g.setStops("#fff-#000-#f00-#fc0"); master number (end time in general case)
  11. -
  12. +
  13. get function @@ -6871,7 +6905,7 @@ g.setStops("#fff-#000-#f00-#fc0"); mina.time)
  14. -
  15. +
  16. set function @@ -6879,7 +6913,7 @@ g.setStops("#fff-#000-#f00-#fc0"); setter of slave number
  17. -
  18. +
  19. easing function @@ -7037,12 +7071,12 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.time() +

    mina.time() -

    +
    @@ -7057,22 +7091,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.getById(id) +

    mina.getById(id) -

    +

    Returns an animation by its id

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. id string @@ -7093,22 +7127,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.linear(n) +

    mina.linear(n) -

    +

    Default linear easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7127,22 +7161,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.easeout(n) +

    mina.easeout(n) -

    +

    Easeout easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7161,22 +7195,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.easein(n) +

    mina.easein(n) -

    +

    Easein easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7195,22 +7229,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.easeinout(n) +

    mina.easeinout(n) -

    +

    Easeinout easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7229,22 +7263,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.backin(n) +

    mina.backin(n) -

    +

    Backin easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7263,22 +7297,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.backout(n) +

    mina.backout(n) -

    +

    Backout easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7297,22 +7331,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.elastic(n) +

    mina.elastic(n) -

    +

    Elastic easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7331,22 +7365,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    mina.bounce(n) +

    mina.bounce(n) -

    +

    Bounce easing

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. n number @@ -7365,22 +7399,22 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Paper.filter(filstr) +

    Paper.filter(filstr) -

    +

    Creates a <filter> element

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. filstr string @@ -7410,29 +7444,29 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Snap.filter.blur(x, [y]) +

    Snap.filter.blur(x, [y]) -

    +

    Returns an SVG markup string for the blur filter

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. x number amount of horizontal blur, in pixels
      2. -
      3. +
      4. y number @@ -7456,50 +7490,50 @@ g.setStops("#fff-#000-#f00-#fc0");
    -

    Snap.filter.shadow(…) +

    Snap.filter.shadow(…) -

    +

    Returns an SVG markup string for the shadow filter

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. dx number horizontal shift of the shadow, in pixels
      2. -
      3. +
      4. dy number vertical shift of the shadow, in pixels
      5. -
      6. +
      7. blur number amount of blur
      8. -
      9. +
      10. color string color of the shadow
      11. -
      12. +
      13. opacity number @@ -7510,31 +7544,31 @@ g.setStops("#fff-#000-#f00-#fc0");

or

-
-

Parameters

-
    -
  1. +
    +

    Parameters

    +
      +
    1. dx number horizontal shift of the shadow, in pixels
    2. -
    3. +
    4. dy number vertical shift of the shadow, in pixels
    5. -
    6. +
    7. color string color of the shadow
    8. -
    9. +
    10. opacity number @@ -7545,24 +7579,24 @@ g.setStops("#fff-#000-#f00-#fc0");

    which makes blur default to 4. Or

    -
    -

    Parameters

    -
      -
    1. +
      +

      Parameters

      +
        +
      1. dx number horizontal shift of the shadow, in pixels
      2. -
      3. +
      4. dy number vertical shift of the shadow, in pixels
      5. -
      6. +
      7. opacity number @@ -7586,22 +7620,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.filter.grayscale(amount) +

        Snap.filter.grayscale(amount) -

        +

        Returns an SVG markup string for the grayscale filter

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. amount number @@ -7620,22 +7654,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.filter.sepia(amount) +

        Snap.filter.sepia(amount) -

        +

        Returns an SVG markup string for the sepia filter

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. amount number @@ -7654,22 +7688,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.filter.saturate(amount) +

        Snap.filter.saturate(amount) -

        +

        Returns an SVG markup string for the saturate filter

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. amount number @@ -7688,22 +7722,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.filter.hueRotate(angle) +

        Snap.filter.hueRotate(angle) -

        +

        Returns an SVG markup string for the hue-rotate filter

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. angle number @@ -7722,22 +7756,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.filter.invert(amount) +

        Snap.filter.invert(amount) -

        +

        Returns an SVG markup string for the invert filter

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. amount number @@ -7756,22 +7790,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.filter.brightness(amount) +

        Snap.filter.brightness(amount) -

        +

        Returns an SVG markup string for the brightness filter

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. amount number @@ -7790,22 +7824,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.filter.contrast(amount) +

        Snap.filter.contrast(amount) -

        +

        Returns an SVG markup string for the contrast filter

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. amount number @@ -7824,22 +7858,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.click(handler) +

        Element.click(handler) -

        +

        Adds a click event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -7860,22 +7894,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.unclick(handler) +

        Element.unclick(handler) -

        +

        Removes a click event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -7896,22 +7930,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.dblclick(handler) +

        Element.dblclick(handler) -

        +

        Adds a double click event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -7932,22 +7966,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.undblclick(handler) +

        Element.undblclick(handler) -

        +

        Removes a double click event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -7968,22 +8002,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.mousedown(handler) +

        Element.mousedown(handler) -

        +

        Adds a mousedown event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8004,22 +8038,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.unmousedown(handler) +

        Element.unmousedown(handler) -

        +

        Removes a mousedown event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8040,22 +8074,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.mousemove(handler) +

        Element.mousemove(handler) -

        +

        Adds a mousemove event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8076,22 +8110,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.unmousemove(handler) +

        Element.unmousemove(handler) -

        +

        Removes a mousemove event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8112,22 +8146,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.mouseout(handler) +

        Element.mouseout(handler) -

        +

        Adds a mouseout event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8148,22 +8182,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.unmouseout(handler) +

        Element.unmouseout(handler) -

        +

        Removes a mouseout event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8184,22 +8218,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.mouseover(handler) +

        Element.mouseover(handler) -

        +

        Adds a mouseover event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8220,22 +8254,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.unmouseover(handler) +

        Element.unmouseover(handler) -

        +

        Removes a mouseover event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8256,22 +8290,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.mouseup(handler) +

        Element.mouseup(handler) -

        +

        Adds a mouseup event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8292,22 +8326,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.unmouseup(handler) +

        Element.unmouseup(handler) -

        +

        Removes a mouseup event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8328,22 +8362,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.touchstart(handler) +

        Element.touchstart(handler) -

        +

        Adds a touchstart event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8364,22 +8398,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.untouchstart(handler) +

        Element.untouchstart(handler) -

        +

        Removes a touchstart event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8400,22 +8434,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.touchmove(handler) +

        Element.touchmove(handler) -

        +

        Adds a touchmove event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8436,22 +8470,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.untouchmove(handler) +

        Element.untouchmove(handler) -

        +

        Removes a touchmove event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8472,22 +8506,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.touchend(handler) +

        Element.touchend(handler) -

        +

        Adds a touchend event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8508,22 +8542,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.untouchend(handler) +

        Element.untouchend(handler) -

        +

        Removes a touchend event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8544,22 +8578,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.touchcancel(handler) +

        Element.touchcancel(handler) -

        +

        Adds a touchcancel event handler to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8580,22 +8614,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.untouchcancel(handler) +

        Element.untouchcancel(handler) -

        +

        Removes a touchcancel event handler from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. handler function @@ -8616,44 +8650,44 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.hover(f_in, f_out, [icontext], [ocontext]) +

        Element.hover(f_in, f_out, [icontext], [ocontext]) -

        +

        Adds hover event handlers to the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. f_in function handler for hover in
          2. -
          3. +
          4. f_out function handler for hover out
          5. -
          6. +
          7. icontext object context for hover in handler
          8. -
          9. +
          10. ocontext object @@ -8674,29 +8708,29 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.unhover(f_in, f_out) +

        Element.unhover(f_in, f_out) -

        +

        Removes hover event handlers from the element

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. f_in function handler for hover in
          2. -
          3. +
          4. f_out function @@ -8717,58 +8751,58 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.drag(onmove, onstart, onend, [mcontext], [scontext], +

        Element.drag(onmove, onstart, onend, [mcontext], [scontext], [econtext]) -

        +

        Adds event handlers for an element's drag gesture

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. onmove function handler for moving
          2. -
          3. +
          4. onstart function handler for drag start
          5. -
          6. +
          7. onend function handler for drag end
          8. -
          9. +
          10. mcontext object context for moving handler
          11. -
          12. +
          13. scontext object context for drag start handler
          14. -
          15. +
          16. econtext object @@ -8876,12 +8910,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.undrag() +

        Element.undrag() -

        +
        @@ -8893,22 +8927,22 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.getTotalLength(path) +

        Snap.path.getTotalLength(path) -

        +

        Returns the length of the given path in pixels

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string @@ -8927,12 +8961,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.getPointAtLength(path, length) +

        Snap.path.getPointAtLength(path, length) -

        +
        @@ -8940,17 +8974,17 @@ g.setStops("#fff-#000-#f00-#fc0");

        Returns the coordinates of the point located at the given length along the given path

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string SVG path string
          2. -
          3. +
          4. length number @@ -8999,12 +9033,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.getSubpath(path, from, to) +

        Snap.path.getSubpath(path, from, to) -

        +
        @@ -9012,17 +9046,17 @@ g.setStops("#fff-#000-#f00-#fc0");

        Returns the subpath of a given path between given start and end lengths

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string SVG path string
          2. -
          3. +
          4. from number @@ -9030,7 +9064,7 @@ g.setStops("#fff-#000-#f00-#fc0"); length, in pixels, from the start of the path to the start of the segment
          5. -
          6. +
          7. to number @@ -9050,12 +9084,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.getTotalLength() +

        Element.getTotalLength() -

        +
        @@ -9073,12 +9107,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.getPointAtLength(length) +

        Element.getPointAtLength(length) -

        +
        @@ -9086,10 +9120,10 @@ g.setStops("#fff-#000-#f00-#fc0");

        Returns coordinates of the point located at the given length on the given path (only works for path elements)

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. length number @@ -9138,12 +9172,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Element.getSubpath(from, to) +

        Element.getSubpath(from, to) -

        +
        @@ -9151,10 +9185,10 @@ g.setStops("#fff-#000-#f00-#fc0");

        Returns subpath of a given element from given start and end lengths (only works for path elements)

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. from number @@ -9162,7 +9196,7 @@ g.setStops("#fff-#000-#f00-#fc0"); length, in pixels, from the start of the path to the start of the segment
          2. -
          3. +
          4. to number @@ -9182,13 +9216,13 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, +

        Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) -

        +
        @@ -9196,66 +9230,66 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Finds dot coordinates on the given cubic beziér curve at the given t

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. p1x number x of the first point of the curve
          2. -
          3. +
          4. p1y number y of the first point of the curve
          5. -
          6. +
          7. c1x number x of the first anchor of the curve
          8. -
          9. +
          10. c1y number y of the first anchor of the curve
          11. -
          12. +
          13. c2x number x of the second anchor of the curve
          14. -
          15. +
          16. c2y number y of the second anchor of the curve
          17. -
          18. +
          19. p2x number x of the second point of the curve
          20. -
          21. +
          22. p2y number y of the second point of the curve
          23. -
          24. +
          25. t number @@ -9387,12 +9421,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.bezierBBox(…) +

        Snap.path.bezierBBox(…) -

        +
        @@ -9400,59 +9434,59 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Returns the bounding box of a given cubic beziér curve

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. p1x number x of the first point of the curve
          2. -
          3. +
          4. p1y number y of the first point of the curve
          5. -
          6. +
          7. c1x number x of the first anchor of the curve
          8. -
          9. +
          10. c1y number y of the first anchor of the curve
          11. -
          12. +
          13. c2x number x of the second anchor of the curve
          14. -
          15. +
          16. c2y number y of the second anchor of the curve
          17. -
          18. +
          19. p2x number x of the second point of the curve
          20. -
          21. +
          22. p2y number @@ -9463,10 +9497,10 @@ g.setStops("#fff-#000-#f00-#fc0");

          or

          -
          -

          Parameters

          -
            -
          1. +
            +

            Parameters

            +
              +
            1. bez array @@ -9538,12 +9572,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.isPointInsideBBox(bbox, x, y) +

        Snap.path.isPointInsideBBox(bbox, x, y) -

        +
        @@ -9551,24 +9585,24 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Returns true if given point is inside bounding box

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. bbox string bounding box
          2. -
          3. +
          4. x string x coordinate of the point
          5. -
          6. +
          7. y string @@ -9587,12 +9621,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.isBBoxIntersect(bbox1, bbox2) +

        Snap.path.isBBoxIntersect(bbox1, bbox2) -

        +
        @@ -9600,17 +9634,17 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Returns true if two bounding boxes intersect

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. bbox1 string first bounding box
          2. -
          3. +
          4. bbox2 string @@ -9629,29 +9663,29 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.intersection(path1, path2) +

        Snap.path.intersection(path1, path2) -

        +

        Utility method Finds intersections of two paths

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path1 string path string
          2. -
          3. +
          4. path2 string @@ -9737,12 +9771,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.isPointInside(path, x, y) +

        Snap.path.isPointInside(path, x, y) -

        +
        @@ -9753,24 +9787,24 @@ g.setStops("#fff-#000-#f00-#fc0");

        Note: fill mode doesn’t affect the result of this method.

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string path string
          2. -
          3. +
          4. x number x of the point
          5. -
          6. +
          7. y number @@ -9789,12 +9823,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.getBBox(path) +

        Snap.path.getBBox(path) -

        +
        @@ -9802,10 +9836,10 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Returns the bounding box of a given path

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string @@ -9877,12 +9911,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.toRelative(path) +

        Snap.path.toRelative(path) -

        +
        @@ -9890,10 +9924,10 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Converts path coordinates into relative values

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string @@ -9912,12 +9946,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.toAbsolute(path) +

        Snap.path.toAbsolute(path) -

        +
        @@ -9925,10 +9959,10 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Converts path coordinates into absolute values

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string @@ -9947,12 +9981,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.toCubic(pathString) +

        Snap.path.toCubic(pathString) -

        +
        @@ -9960,10 +9994,10 @@ g.setStops("#fff-#000-#f00-#fc0");

        Utility method Converts path to a new path where all segments are cubic beziér curves

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. pathString string @@ -9983,29 +10017,29 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Snap.path.map(path, matrix) +

        Snap.path.map(path, matrix) -

        +

        Transform the path string with the given matrix

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. path string path string
          2. -
          3. +
          4. matrix object @@ -10026,12 +10060,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Set.push() +

        Set.push() -

        +
        @@ -10048,12 +10082,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Set.pop() +

        Set.pop() -

        +
        @@ -10070,12 +10104,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Set.forEach(callback, thisArg) +

        Set.forEach(callback, thisArg) -

        +
        @@ -10085,17 +10119,17 @@ g.setStops("#fff-#000-#f00-#fc0");

        If the function returns false, the loop stops running.

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. callback function function to run
          2. -
          3. +
          4. thisArg object @@ -10114,12 +10148,12 @@ g.setStops("#fff-#000-#f00-#fc0");
        -

        Set.animate(…) +

        Set.animate(…) -

        +
        @@ -10127,24 +10161,24 @@ g.setStops("#fff-#000-#f00-#fc0");

        Animates each element in set in sync.

        -
        -

        Parameters

        -
          -
        1. +
          +

          Parameters

          +
            +
          1. attrs object key-value pairs of destination attributes
          2. -
          3. +
          4. duration number duration of the animation in milliseconds
          5. -
          6. +
          7. easing function @@ -10153,7 +10187,7 @@ g.setStops("#fff-#000-#f00-#fc0"); mina or custom
          8. -
          9. +
          10. callback function @@ -10165,10 +10199,10 @@ g.setStops("#fff-#000-#f00-#fc0");

          or

          -
          -

          Parameters

          -
            -
          1. +
            +

            Parameters

            +
              +
            1. animation array @@ -10194,12 +10228,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
              -

              Set.remove() +

              Set.remove() -

              +
              @@ -10217,12 +10251,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
              -

              Set.bind(…) +

              Set.bind(…) -

              +
              @@ -10231,17 +10265,17 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);

              -
              -

              Parameters

              -
                -
              1. +
                +

                Parameters

                +
                  +
                1. attr string attribute name
                2. -
                3. +
                4. callback function @@ -10252,17 +10286,17 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);

                  or

                  -
                  -

                  Parameters

                  -
                    -
                  1. +
                    +

                    Parameters

                    +
                      +
                    1. attr string attribute name
                    2. -
                    3. +
                    4. element Element @@ -10274,17 +10308,17 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);

                      or

                      -
                      -

                      Parameters

                      -
                        -
                      1. +
                        +

                        Parameters

                        +
                          +
                        1. attr string attribute name
                        2. -
                        3. +
                        4. element Element @@ -10292,7 +10326,7 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);specific element in the set to apply the attribute to
                        5. -
                        6. +
                        7. eattr string @@ -10312,12 +10346,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                          -

                          Set.attr() +

                          Set.attr() -

                          +
                          @@ -10335,12 +10369,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                          -

                          Set.clear() +

                          Set.clear() -

                          +
                          @@ -10352,36 +10386,36 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                          -

                          Set.splice(index, count, [insertion…]) +

                          Set.splice(index, count, [insertion…]) -

                          +

                          Removes range of elements from the set

                          -
                          -

                          Parameters

                          -
                            -
                          1. +
                            +

                            Parameters

                            +
                              +
                            1. index number position of the deletion
                            2. -
                            3. +
                            4. count number number of element to remove
                            5. -
                            6. +
                            7. insertion… object @@ -10400,22 +10434,22 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                              -

                              Set.exclude(element) +

                              Set.exclude(element) -

                              +

                              Removes given element from the set

                              -
                              -

                              Parameters

                              -
                                -
                              1. +
                                +

                                Parameters

                                +
                                  +
                                1. element object @@ -10435,22 +10469,22 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                  -

                                  undefined +

                                  undefined -

                                  +

                                  Inserts set elements after given element.

                                  -
                                  -

                                  Parameters

                                  -
                                    -
                                  1. +
                                    +

                                    Parameters

                                    +
                                      +
                                    1. element object @@ -10469,12 +10503,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                      -

                                      Set.getBBox() +

                                      Set.getBBox() -

                                      +
                                      @@ -10495,12 +10529,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                      -

                                      Set.insertAfter() +

                                      Set.insertAfter() -

                                      +
                                      @@ -10517,12 +10551,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                      -

                                      Snap.Set +

                                      Snap.Set -

                                      +
                                      @@ -10534,12 +10568,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                      -

                                      Snap.set() +

                                      Snap.set() -

                                      +
                                      @@ -10559,12 +10593,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                      -

                                      Snap.mui() +

                                      Snap.mui() -

                                      +
                                      @@ -10579,12 +10613,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                      -

                                      Snap.flat +

                                      Snap.flat -

                                      +
                                      @@ -10599,12 +10633,12 @@ set.animate([{r: 10}, 500, mina.easein], [{r: 20}, 1500, mina.easein]);
                                      -

                                      Snap.importMUIColors() +

                                      Snap.importMUIColors() -

                                      +
                                      diff --git a/dr.json b/dr.json index 642a914..9e690f9 100644 --- a/dr.json +++ b/dr.json @@ -8,6 +8,9 @@ }, { "url": "src/element.js", "link": "https://github.com/adobe-webplatform/Snap.svg/blob/master/src/element.js" + }, { + "url": "src/attr.js", + "link": "https://github.com/adobe-webplatform/Snap.svg/blob/master/src/attr.js" }, { "url": "src/animation.js", "link": "https://github.com/adobe-webplatform/Snap.svg/blob/master/src/animation.js" diff --git a/src/attr.js b/src/attr.js index cf6c81e..a7e43c6 100644 --- a/src/attr.js +++ b/src/attr.js @@ -24,7 +24,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { separator = Snap._.separator, E = ""; /*\ - * Snap.deurl() + * Snap.deurl [ method ] ** * Unwraps path from `"url()"`. diff --git a/src/paper.js b/src/paper.js index 3999e6d..1cdbf03 100644 --- a/src/paper.js +++ b/src/paper.js @@ -513,7 +513,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { var $ = Snap._.$; // gradients' helpers /*\ - * Element.stops() + * Element.stops [ method ] ** * Only for gradients! @@ -524,7 +524,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { return this.selectAll("stop"); } /*\ - * Element.addStop() + * Element.addStop [ method ] ** * Only for gradients! @@ -574,7 +574,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) { } } /*\ - * Element.setStops() + * Element.setStops [ method ] ** * Only for gradients! diff --git a/src/svg.js b/src/svg.js index efaca69..da4a9c3 100644 --- a/src/svg.js +++ b/src/svg.js @@ -92,7 +92,7 @@ var has = "hasOwnProperty", xmlns = "http://www.w3.org/2000/svg", hub = {}, /*\ - * Snap.url() + * Snap.url [ method ] ** * Wraps path into `"url('')"`. @@ -386,7 +386,6 @@ Snap.atan2 = function (num) { [ method ] ** * Returns an angle between two or three points - > Parameters - x1 (number) x coord of first point - y1 (number) y coord of first point - x2 (number) x coord of second point @@ -401,7 +400,6 @@ Snap.angle = angle; [ method ] ** * Returns distance between two points - > Parameters - x1 (number) x coord of first point - y1 (number) y coord of first point - x2 (number) x coord of second point @@ -416,7 +414,6 @@ Snap.len = function (x1, y1, x2, y2) { [ method ] ** * Returns squared distance between two points - > Parameters - x1 (number) x coord of first point - y1 (number) y coord of first point - x2 (number) x coord of second point @@ -431,7 +428,6 @@ Snap.len2 = function (x1, y1, x2, y2) { [ method ] ** * Returns closest point to a given one on a given path. - > Parameters - path (Element) path element - x (number) x coord of a point - y (number) y coord of a point diff --git a/template.dot b/template.dot index 3695b59..34923a6 100644 --- a/template.dot +++ b/template.dot @@ -8,7 +8,6 @@ - @@ -50,7 +49,7 @@ Docs Support Demos - Download + Download
                                    @@ -62,7 +61,7 @@
                                    - +