=a)return 16;var b=S[a];b||(b=t(ca[a])?0|(a.toLowerCase().indexOf("color")==a.length-5?48:0):1);return b}function K(a){return 0<=a?Math.pow(a,1/3):-Math.pow(-a,1/3)}function da(a,b,c,d){if(0==a)return 0==b?b=-d/c:(a=Math.sqrt(c*c-4*b*d),d=(-c+a)/(2*b),0=d?b=d:(d=(-c-a)/(2*b),b=0=d?d:0)),b; var e=c/a-b*b/(a*a)/3;c=b*b*b/(a*a*a)/13.5-b*c/(a*a)/3+d/a;var n=c*c/4+e*e*e/27;b=-b/(3*a);if(0>=n){if(0==e&&0==c)return-K(d/a);a=Math.sqrt(c*c/4-n);d=Math.acos(-c/2/a);c=Math.cos(d/3);d=Math.sqrt(3)*Math.sin(d/3);a=K(a);e=2*a*c+b;if(0=e)return e;e=-a*(c+d)+b;if(0=e)return e;e=a*(d-c)+b;if(0=e)return e}else{a=K(-c/2+Math.sqrt(n));c=K(-c/2-Math.sqrt(n));d=a+c+b;if(0=d)return d;d=-(a+c)/2+b;if(0=d)return d}return 0}function ea(a,b){if(48==a&&"number"===typeof b)return"rgba("+ (b>>>24)+","+(b>>>16&255)+","+(b>>>8&255)+","+(b&255)/255+")";if(64==a)return b=b.map(function(a){return a+"px"}),b.join(",");if(96==a){a="";for(var c=b.length,d=0;d<c;d+=2)a+=b[d],a+=b[d+1].join(",");return a}if(80==a){if(0==b[0])return"none";a="";c=b.length;for(d=0;d>>24)+","+(b[d+4]>>16&255)+","+(b[d+4]>>8&255)+","+(b[d+4]&255)/255+")) ",d+=3):a=2==b[d]?a+("("+b[d+1]+"px) "):7==b[d]?a+ ("("+b[d+1]+"deg) "):a+("("+(0>b[d+1]?0:b[d+1])+") "),d+=2;return a}return 32==a?b+"px":b}function y(a){return 0>=a?0:255d?b:c;if(48==a){if("number"===typeof b&&"number"===typeof c){var e=1-d;return(y(e*(b>>>24)+d*(c>>>24))<>>16&255)+d*(c>>>16&255))<>>8&255)+d*(c>>>8&255))<>>0}return.5>d?b:c}if(64==a){0==b.length&&(b=[0]);0==c.length&&(c=[0]);var n=b.length;b.length!=c.length&& (n=b.length*c.length);var l=[];for(a=0;ah&&(h=0);l.push(h)}return l}if(96==a){if(b.length!=c.length)return.5>d?b:c;n=b.length;l=[];for(a=0;ad?b:c;l[a]=b[a];l[a+1]=[];for(f=0;fd?b:c;l=[];for(a=0;ad?b:c;l[a]=b[a];l[a+1]=(c[a+1]-b[a+1])*d+b[a+1];if(5==b[a]){l[a+ 2]=(c[a+2]-b[a+2])*d+b[a+2];l[a+3]=(c[a+3]-b[a+3])*d+b[a+3];e=1-d;var g=b[a+4],q=c[a+4];h=e*(g>>>24)+d*(q>>>24);var m=e*(g>>16&255)+d*(q>>16&255);f=e*(g>>8&255)+d*(q>>8&255);e=e*(g&255)+d*(q&255);l[a+4]=(y(m)<<16|y(f)<<8|y(e))+16777216*(y(h)|0);a+=3}a+=2}return l}return 0}function U(a,b){a:{var c=a+b[2];var d=b[4].length;for(var e=0;e<d;++e)if(cc-1)if(d=b[6][c-1],1==d[0])if(0>=a)a=0;else if(1<=a)a=1;else{e= d[1];var n=d[3];a=da(3*e-3*n+1,-6*e+3*n,3*e,-a);a=3*a*(1-a)*(1-a)*d[2]+3*a*a*(1-a)*d[4]+a*a*a}else 2==d[0]?(d=d[1],a=Math.ceil(a*d)/d):3==d[0]&&(d=d[1],a=Math.floor(a*d)/d);return fa(b[1]&240,b[5][c-1],b[5][c],a)}function L(){u||(v=(new Date).getTime()+V)}function O(a){if(a||!E){for(var b=!1,c=0;c<w.length;++c)w[c].J(a)&&(b=!0);if(a)for(;0=c;++c)b[c]=0;b[10]=1;b[11]=1;if(a=a.getAttribute("transform")){a=a.trim().split(") ");for(c=a.length-2;0<=c;--c)if(x(a[c],"translate(")){for(var d=0;d<c;d++)a.shift();break}c=a.shift();x(c,"translate(")&&(c=A(c.substring(10)), b[1]=c[0],b[2]=t(c[1])?c[1]:0,c=a.shift());x(c,"rotate(")&&(c=A(c.substring(7)),b[6]=c[0],c=a.shift());x(c,"skewX(")&&(c=A(c.substring(6)),b[7]=c[0],c=a.shift());x(c,"skewY(")&&(c=A(c.substring(6)),b[8]=c[0],c=a.shift());x(c,"scale(")&&(c=A(c.substring(6)),b[10]=c[0],b[11]=t(c[1])?c[1]:c[0],c=a.shift());x(c,"translate(")&&(c=A(c.substring(10)),b[13]=c[0],b[14]=t(c[1])?c[1]:0)}}}function Z(a){this.l=a;this.A=[];this.C=[];this.v=0;this.s=this.a=this.c=null;this.h=this.f=this.g=0;this.b=1;this.i=this.F= this.o=!1}function J(a,b,c){b=a[b];void 0===b&&(b=a[c]);return b}function ha(a){return Array.isArray(a)?a:x(a,"cubic-bezier(")?(a=a.substring(13,a.length-1).split(","),[1,parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2]),parseFloat(a[3])]):x(a,"steps(")?(a=a.substring(6,a.length-1).split(","),[a[1]&&"start"==a[1].trim()?2:3,parseFloat(a[0])]):[0]}function ia(a){a=a.trim();return x(a,"#")?(parseInt(a.substring(1),16)<<8)+255:x(a,"rgba(")?(a=a.substring(5,a.length-1),a=a.split(","),(parseInt(a[0], 10)<<24)+(parseInt(a[1],10)<<16)+(parseInt(a[2],10)<<8)+255*parseFloat(a[3])<<0):a}function aa(a){!1===a.i&&(w.push(a),a.i=!0,!1!==a.l.autoplay&&a.play());return this}function P(a){if(!0===a.i){a._cancel();var b=w.indexOf(a);-1<b&&w.splice(b,1);b=I.indexOf(a);-1<b&&I.splice(b,1);a.i=!1}return this}var Q=Error("Not in timeline list"),ba="mpath posX posY rotate skewX skewY scaleX scaleY anchorX anchorY".split(" "),ja=" translate translate rotate skewX skewY scale scale translate translate".split(" "), T="none url blur brightness contrast drop-shadow grayscale hue-rotate invert opacity saturate sepia".split(" "),M=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||null;M||(M=function(a){window.setTimeout(a,16)});var S={d:97,fill:48,fillOpacity:16,filter:80,height:33,opacity:16,offsetDistance:33,stroke:48,strokeDasharray:64,strokeDashoffset:32,strokeOpacity:16,strokeWidth:32,transform:1, width:33},ca=window.getComputedStyle(document.documentElement),E=!1,v=(new Date).getTime(),u,V=0,w=[],I=[];Z.prototype={B:function(a){var b=0;if(null!==this.c){var c=this.j();0=this.f?this.h?(this.c=v-this.g/this.b,this.h--,b=2):(b=1,a?this.a=c:this.a=this.s?Math.max(this.s,this.f):this.f):0>this.b&&null!==c&&c<=this.g?this.h&&Infinity!=this.f?(this.c=v-this.f/this.b,this.h--,b=2):(this.h=0,b=1,a?this.a=c:this.a=this.s?Math.min(this.s,this.g):this.g):null!==c&&0!=this.b&&(a&& null!==this.a&&(this.c=v-this.a/this.b),this.a=null)}this.s=this.j();return b},J:function(a){a&&(this.o&&(this.o=!1,null===this.c&&(0!=this.b&&null!==this.a?(this.c=v-this.a/this.b,this.a=null):this.c=v)),null===this.a&&null!==this.c&&(a=this.B(!1),0!=a&&I.push([this,a])));a=this.j();if(null===a)return!1;for(var b=this.A,c=this.C,d=0;d<b.length;++d){for(var e=b[d],n=!1,l=0;l<c[d].length;++l){var f=c[d][l],h=f[0];if(null!==h){var g=f[2];var q=f[4].length,m=f[4][q-1]-g;g=0==m?f[5][q-1]:a=g+f[3]?0==f[3]%m?f[5][q-1]:U(f[3]%m,f):U((a-g)%m,f);0==h?(e._ks.mpath=f[8],e._ks.transform[h]=g,n=!0):14>=h?(e._ks.transform[h]=g,n=!0):(g=ea(f[1]&240,g),f[1]&1?e.setAttribute(h,g):e.style[h]=g)}}if(n){Y(e);n=e._ks.transform;l="";if(f=e._ks.mpath)g=n[0],0>g&&(g=0),100g?(g=h,h=f[1].getPointAtLength(.5)):g=f[1].getPointAtLength(g-.5),l+="rotate("+180*Math.atan2(h.y-g.y,h.x-g.x)/Math.PI+") ");for(f=1;f=f?l+(1==f?h+",0":"0,"+h):13<=f?l+(13==f?h+",0":"0,"+h):10<=f?l+(10==f?h+",1":"1,"+h):l+h,l+=")");e.setAttribute("transform",l)}}return"running"==this.m()},I:function(){!1!==this.l.autoremove&&"finished"==this.m()&&P(this)},D:function(){if(!this.F){this.F=!0;for(var a=this.A,b=this.C,c=0;c<a.length;++c)for(var d=a[c],e=0;e=b[c][e][0]&&Y(d)}},u:function(a){if("number"==typeof a)return a;if(!t(this.l.markers)||!t(this.l.markers[a]))throw Error("Invalid marker: "+ a);return+this.l.markers[a]},play:function(a){t(a)&&null!==a&&(a=this.u(a),H(a),0>this.b&&a<this.g&&(a=this.g),0this.f&&(a=this.f),this.w(a,!0));if(!this.i)throw Q;a=this.j();if(0=this.f))this.a=this.g;else if(0>this.b&&(null===a||a<=this.g)){if(Infinity==this.f)throw Error("Cannot seek to Infinity");this.a=this.f}else 0==this.b&&null===a&&(this.a=this.g);if(null===this.a)return this;this.c=null;this.o=!0;this.D();N();return this},pause:function(a){if(!this.i)throw Q; t(a)&&(a=this.u(a),H(a));if("paused"!=this.m()){L();var b=this.j();if(null===b)if(0c||0>d||c>=d||isNaN(d))throw Error("Invalid range");var e=this.m();this.g= c;this.f=d;"finished"==e&&"running"==this.m()&&this.play();return this},loop:function(a){if(!t(a))return{count:this.h};this.h=!0===a?Infinity:Math.floor(a);if(0>this.h||isNaN(this.h))this.h=0;return this},j:function(){return null!==this.a?this.a:null===this.c?null:(v-this.c)*this.b},w:function(a,b){b&&L();null!==a&&(this.D(),null!==this.a||null===this.c||0==this.b?(this.a=a,O(!1)):this.c=v-a/this.b,this.i||(this.c=null),this.s=null,this.B(!0),N())},G:function(){return this.j()},time:function(a){if(t(a)){if(!this.i)throw Q; a=this.u(a);H(a);this.w(a,!0);return this}return this.G()},m:function(){var a=this.j();return this.o?"running":null===a?"idle":null===this.c?"paused":0=this.f||0>this.b&&a<=this.g?"finished":"running"},state:function(){return this.m()},duration:function(){return this.v},H:function(a){H(a);L();var b=this.j();this.b=a;null!==b&&this.w(b,!1)},rate:function(a){return t(a)?(this.H(a),this):this.b},marker:function(a){return t(this.l.markers)?this.l.markers[a]:void 0},_cancel:function(){if(!this.i|| "idle"==this.m())return this;this.c=this.a=null;this.o=!1;return this}};return{version:"1.1.0",animate:function(){var a={};if(1==arguments.length%2){a=arguments[arguments.length-1];var b={};for(c in a)b[c]=a[c];a=b}var c=new Z(a);a=arguments;for(var d=b=0;d<a.length-1;d+=2){var e=a[d];var n=e instanceof Element?e:document.getElementById(e.substring(1));if(!n)throw Error("Invalid target: "+e);e=n;n=a[d+1];e._ks||(e._ks={});for(var l=[],f=0;f<n.length;++f){var h=n[f],g=J(h,"p","property");if("string"!= typeof g||-1!=g.indexOf("-")||""===g||!(0<S[g]||0<=ba.indexOf(g)))throw Error("Invalid property: "+g);var q=ba.indexOf(g);""!==g&&0m.length)throw Error("Not enough times");m=m.slice();if(!isFinite(m[0])||0>m[0])throw Error("Invalid time: "+m[0]);for(var B=1;Bm[B]||m[B]y&&(y=1);v*=y;b<v+B&&(b=v+B);var u=J(h,"v","values");if(!u|| u.length!=m.length)throw Error("Values do not match times");u=u.slice();for(var C=g,k=u,w=R(C)&240,p=0;p<k.length;++p)if(96==w){for(var G=k[p].substring(6,k[p].length-2).match(/[A-DF-Za-df-z][-+0-9eE., ]*/ig),A=[],r=0;r<G.length;++r){A.push(G[r][0]);for(var z=1<G[r].trim().length?G[r].substring(1).split(","):[],F=0;F<z.length;++F)z[F]=parseFloat(z[F]);A.push(z)}k[p]=A}else if(48==w)x(k[p],"#")?(G=9==k[p].length,k[p]=parseInt(k[p].substring(1),16),G||(k[p]=256*k[p]|255)):x(k[p],"url(")||"none"==k[p]|| (console.warn("unsupported color: "+k[p]),k[p]=0);else if(80==w){G=k;A=p;r=k[p];if("none"==r)r=[0];else{z=[];for(var D=r.indexOf("(");0<D;)if(F=T.indexOf(r.substring(0,D)),0E&&(E=r.length-1);D=r.substring(D+1,E).split(" ");5==F?(z.push(parseFloat(D[0])),z.push(parseFloat(D[1])),z.push(parseFloat(D[2])),z.push(ia(D[3]))):1==F?z.push(D[0]):z.push(parseFloat(D[0]));r=r.substring(E+1).trim();D=r.indexOf("(")}else break;r=z}G[A]=r}else 64==w?"none"!=k[p]?/^[0-9 .]*$/.test(k[p])? k[p]=X(k[p]," "):(console.warn("unsupported value: "+k[p]),k[p]=[0]):k[p]=[0]:32==w?(H(k[p]),k[p]=parseFloat(k[p])):0===C&&(k[p]=parseFloat(k[p]));C=J(h,"e","easing");k=m.length;for(C||(C=[]);C.length<k;)C.push([1,0,0,.58,1]);for(k=0;k<C.length;++k)C[k]=ha(C[k]);q=[g,q,B,v,m,u,C,y];m=J(h,"mp","motionPath");t(m)&&0===g&&(q[8]=[],q[8][0]=h.motionRotate,h=document.createElementNS("http://www.w3.org/2000/svg","path"),m||(m="M0,0"),h.setAttribute("d",m),q[8][1]=h,q[8][2]=h.getTotalLength());l.push(q)}0< l.length&&(c.A.push(e),c.C.push(l))}c.v=b;c.g=0;c.f=c.v;aa(c);return c},add:aa,remove:P,removeAll:function(){for(var a=w.length-1;0 =0)ks.globalPause()})(KeyshapeJS); ]]>