parallaxis/duo/js/plugins/CSSPlugin.min.js

65 lines
26 KiB
JavaScript
Executable File

/*!
* VERSION: beta 1.667
* DATE: 2012-12-30
* JavaScript
* UPDATES AND DOCS AT: http://www.greensock.com
*
* Copyright (c) 2008-2013, GreenSock. All rights reserved.
* This work is subject to the terms in http://www.greensock.com/terms_of_use.html or for
* Club GreenSock members, the software agreement that was issued with your membership.
*
* @author: Jack Doyle, jack@greensock.com
*/
(window._gsQueue||(window._gsQueue=[])).push(function(){_gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(V){var B=function(){V.call(this,"css");this._overwriteProps.length=0},ba,ca,r,da,L={},m=B.prototype=new V("css");m.constructor=B;B.version=1.667;B.API=2;B.defaultTransformPerspective=0;m="px";B.suffixMap={top:m,right:m,bottom:m,left:m,width:m,height:m,fontSize:m,padding:m,margin:m,perspective:m};var ea=/(?:\d|\-\d|\.\d|\-\.\d)+/g,pa=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,
fa=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,W=/[^\d\-\.]/g,Ha=/(?:\d|\-|\+|=|#|\.)*/g,ga=/opacity *= *([^)]*)/,Ia=/opacity:([^;]*)/,Ja=/alpha\(opacity *=.+?\)/i,qa=/([A-Z])/g,ra=/-([a-z])/gi,Ka=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,sa=function(a,b){return b.toUpperCase()},La=/(?:Left|Right|Width)/i,Ma=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,Na=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,E=Math.PI/180,R=180/Math.PI,X={},M=document,S=M.createElement("div"),ha=M.createElement("img"),
N=B._internals={_specialProps:L},A=navigator.userAgent,ia,ta,ua,va,wa,ja,O,xa=A.indexOf("Android"),ya=M.createElement("div");wa=(ua=-1!==A.indexOf("Safari")&&-1===A.indexOf("Chrome")&&(-1===xa||3<Number(A.substr(xa+8,1))))&&6>Number(A.substr(A.indexOf("Version/")+8,1));va=-1!==A.indexOf("Firefox");/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(A);ja=parseFloat(RegExp.$1);ya.innerHTML="<a style='top:1px;opacity:.55;'>a</a>";O=(A=ya.getElementsByTagName("a")[0])?/^0.55/.test(A.style.opacity):!1;var za=function(a){return ga.test("string"===
typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},Aa="",ka="",T=function(a,b){b=b||S;var d=b.style,c,f;if(void 0!==d[a])return a;a=a.charAt(0).toUpperCase()+a.substr(1);c=["O","Moz","ms","Ms","Webkit"];for(f=5;-1<--f&&void 0===d[c[f]+a];);return 0<=f?(ka=3===f?"ms":c[f],Aa="-"+ka.toLowerCase()+"-",ka+a):null},U=M.defaultView?M.defaultView.getComputedStyle:function(){},x=B.getStyle=function(a,b,d,c,f){var j;if(!O&&"opacity"===b)return za(a);!c&&a.style[b]?
j=a.style[b]:(d=d||U(a,null))?j=(a=d.getPropertyValue(b.replace(qa,"-$1").toLowerCase()))||d.length?a:d[b]:a.currentStyle&&(d=a.currentStyle,j=d[b]);return null!=f&&(!j||"none"===j||"auto"===j||"auto auto"===j)?f:j},Z=function(a,b,d){var c={},f=a._gsOverwrittenClassNamePT,j;if(f&&!d){for(;f;)f.setRatio(0),f=f._next;a._gsOverwrittenClassNamePT=null}if(b=b||U(a,null))if(j=b.length)for(;-1<--j;)c[b[j].replace(ra,sa)]=b.getPropertyValue(b[j]);else for(j in b)c[j]=b[j];else if(b=a.currentStyle||a.style)for(j in b)c[j.replace(ra,
sa)]=b[j];O||(c.opacity=za(a));a=Y(a,b,!1);c.rotation=a.rotation*R;c.skewX=a.skewX*R;c.scaleX=a.scaleX;c.scaleY=a.scaleY;c.x=a.x;c.y=a.y;I&&(c.z=a.z,c.rotationX=a.rotationX*R,c.rotationY=a.rotationY*R,c.scaleZ=a.scaleZ);c.filters&&delete c.filters;return c},Ba=function(a,b,d,c){var f={};a=a.style;var j,e,h;for(e in d)if("cssText"!==e&&"length"!==e&&isNaN(e)&&b[e]!==(j=d[e]))if(-1===e.indexOf("Origin")&&("number"===typeof j||"string"===typeof j))f[e]=(""===j||"auto"===j||"none"===j)&&"string"===typeof b[e]&&
""!==b[e].replace(W,"")?0:j,void 0!==a[e]&&(h=new la(a,e,a[e],h));if(c)for(e in c)"className"!==e&&(f[e]=c[e]);return{difs:f,firstMPT:h}},Oa={width:["Left","Right"],height:["Top","Bottom"]},Pa=["marginLeft","marginRight","marginTop","marginBottom"],F=function(a,b,d,c,f){if("px"===c||!c)return d;if("auto"===c||!d)return 0;var j=La.test(b),e=a,h=S.style,k=0>d;k&&(d=-d);"%"===c&&-1!==b.indexOf("border")?j=d/100*(j?a.clientWidth:a.clientHeight):(h.cssText="border-style:solid; border-width:0; position:absolute; line-height:0;",
"%"===c||"em"===c||!e.appendChild?(e=a.parentNode||M.body,h[j?"width":"height"]=d+c):h[j?"borderLeftWidth":"borderTopWidth"]=d+c,e.appendChild(S),j=parseFloat(S[j?"offsetWidth":"offsetHeight"]),e.removeChild(S),0===j&&!f&&(j=F(a,b,d,c,!0)));return k?-j:j},ma=function(a,b){if(null==a||""===a||"auto"===a||"auto auto"===a)a="0 0";var d=a.split(" "),c=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];null==f?f="0":"center"===
f&&(f="50%");if("center"===c||isNaN(parseFloat(c)))c="50%";b&&(b.oxp=-1!==c.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===c.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(c.replace(W,"")),b.oy=parseFloat(f.replace(W,"")));return c+" "+f+(2<d.length?" "+d[2]:"")},Ca=function(a,b){return"string"===typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)},G=function(a,b){return null==a?b:"string"===typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+
"1",10)*Number(a.substr(2))+b:parseFloat(a)},P=function(a,b){if(null==a)return b;var d=-1===a.indexOf("rad")?E:1,c="="===a.charAt(1);a=Number(a.replace(W,""))*d;return c?a+b:a},na=function(a,b){var d=(("number"===typeof a?a*E:P(a,b))-b)%(2*Math.PI);d!==d%Math.PI&&(d+=Math.PI*(0>d?2:-2));return b+d},Q={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,
255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},oa=function(a){if(!a||""===a)return Q.black;if(Q[a])return Q[a];if("number"===typeof a)return[a>>16,a>>8&255,a&255];if("#"===a.charAt(0)){if(4===a.length){var b=a.charAt(1),d=a.charAt(2);a=a.charAt(3);a="#"+b+b+d+d+a+a}a=parseInt(a.substr(1),16);return[a>>16,a>>8&255,a&255]}a=a.match(ea)||Q.transparent;a[0]=Number(a[0]);a[1]=Number(a[1]);a[2]=
Number(a[2]);3<a.length&&(a[3]=Number(a[3]));return a},J="(?:\\b(?:(?:rgb|rgba)\\(.+?\\))|\\B#.+?\\b";for(m in Q)J+="|"+m+"\\b";var J=RegExp(J+")","gi"),Da=function(a,b,d){if(null==a)return function(a){return a};var c=b?(a.match(J)||[""])[0]:"",f=a.split(c).join("").match(fa)||[],j=a.substr(0,a.indexOf(f[0])),e=")"===a.charAt(a.length-1)?")":"",h=-1!==a.indexOf(" ")?" ":",",k=f.length,g=0<k?f[0].replace(ea,""):"";return b?function(a){"number"===typeof a&&(a+=g);var b=(a.match(J)||[c])[0];a=a.split(b).join("").match(fa)||
[];var n=a.length;if(k>n--)for(;++n<k;)a[n]=d?a[(n-1)/2>>0]:f[n];return j+a.join(h)+h+b+e}:function(a){"number"===typeof a&&(a+=g);a=a.match(fa)||[];var b=a.length;if(k>b--)for(;++b<k;)a[b]=d?a[(b-1)/2>>0]:f[b];return j+a.join(h)+e}},A=function(a){a=a.split(",");return function(b,d,c,f,j,e,h){d=(d+"").split(" ");h={};for(c=0;4>c;c++)h[a[c]]=d[c]=d[c]||d[(c-1)/2>>0];return f.parse(b,h,j,e)}};N._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b=this.data,d=b.proxy,c=b.firstMPT,f;c;)f=d[c.v],
c.r?f=0<f?f+0.5>>0:f-0.5>>0:1E-6>f&&-1E-6<f&&(f=0),c.t[c.p]=f,c=c._next;b.autoRotate&&(b.autoRotate.rotation=d.rotation);if(1===a)for(c=b.firstMPT;c;){a=c.t;if(a.type){if(1===a.type){d=a.xs0+a.s+a.xs1;for(b=1;b<a.l;b++)d+=a["xn"+b]+a["xs"+(b+1)];a.e=d}}else a.e=a.s+a.xs0;c=c._next}};var la=function(a,b,d,c,f){this.t=a;this.p=b;this.v=d;this.r=f;c&&(c._prev=this,this._next=c)};N._parseToProxy=function(a,b,d,c,f,j){var e=c,h={},k={},g=d._transform,l=X,p;d._transform=null;X=b;c=a=d.parse(a,b,c,f);X=
l;j&&(d._transform=g,e&&(e._prev=null,e._prev&&(e._prev._next=null)));for(;c&&c!==e;){if(1>=c.type&&(g=c.p,k[g]=c.s+c.c,h[g]=c.s,j||(p=new la(c,"s",g,p,c.r),c.c=0),1===c.type))for(d=c.l;0<--d;)l="xn"+d,g=c.p+"_"+l,k[g]=c.data[l],h[g]=c[l],j||(p=new la(c,l,g,p,c.rxp[l]));c=c._next}return{proxy:h,end:k,firstMPT:p,pt:a}};var y=N.CSSPropTween=function(a,b,d,c,f,j,e,h,k,g,l){this.t=a;this.p=b;this.s=d;this.c=c;this.n=e||"css_"+b;a instanceof y||da.push(this.n);this.r=h;this.type=j||0;k&&(this.pr=k,ba=
!0);this.b=void 0===g?d:g;this.e=void 0===l?d+c:l;f&&(this._next=f,f._prev=this)},aa=B.parseComplex=function(a,b,d,c,f,j,e,h,k,g){e=new y(a,b,0,0,e,g?2:1,null,!1,h,d,c);a=d.split(", ").join(",").split(" ");b=(c+"").split(", ").join(",").split(" ");d=a.length;h=!1!==ia;var l,p,n,$,m;d!==b.length&&(a=(j||"").split(" "),d=a.length);e.plugin=k;e.setRatio=g;for(j=0;j<d;j++)if(k=a[j],l=b[j],(g=parseFloat(k))||0===g)e.appendXtra("",g,Ca(l,g),l.replace(pa,""),h&&-1!==l.indexOf("px"),!0);else if(f&&("#"===
k.charAt(0)||0===k.indexOf("rgb")||Q[k]))k=oa(k),l=oa(l),(g=6<k.length+l.length)&&!O&&0===l[3]?(e["xs"+e.l]+=e.l?" transparent":"transparent",e.e=e.e.split(b[j]).join("transparent")):(e.appendXtra(g?"rgba(":"rgb(",k[0],l[0]-k[0],",",!0,!0).appendXtra("",k[1],l[1]-k[1],",",!0).appendXtra("",k[2],l[2]-k[2],g?",":")",!0),g&&(k=4>k.length?1:k[3],e.appendXtra("",k,(4>l.length?1:l[3])-k,")",!1)));else if(g=k.match(ea)){n=l.match(pa);if(!n||n.length!==g.length)return e;for(l=p=0;l<g.length;l++)m=g[l],$=
k.indexOf(m,p),e.appendXtra(k.substr(p,$-p),Number(m),Ca(n[l],m),"",h&&"px"===k.substr($+m.length,2),0===l),p=$+m.length;e["xs"+e.l]+=k.substr(p)}else e["xs"+e.l]+=e.l?" "+k:k;if(-1!==c.indexOf("=")&&e.data){c=e.xs0+e.data.s;for(j=1;j<e.l;j++)c+=e["xs"+j]+e.data["xn"+j];e.e=c+e["xs"+j]}e.l||(e.type=-1,e.xs0=e.e);return e.xfirst||e},v=9,m=y.prototype;for(m.l=m.pr=0;0<--v;)m["xn"+v]=0,m["xs"+v]="";m.xs0="";m._next=m._prev=m.xfirst=m.data=m.plugin=m.setRatio=m.rxp=null;m.appendXtra=function(a,b,d,c,
f,j){var e=this.l;this["xs"+e]+=j&&e?" "+a:a||"";if(!d&&0!==e&&!this.plugin)return this["xs"+e]+=b+(c||""),this;this.l++;this.type=this.setRatio?2:1;this["xs"+this.l]=c||"";if(0<e)return this.data["xn"+e]=b+d,this.rxp["xn"+e]=f,this["xn"+e]=b,this.plugin||(this.xfirst=new y(this,"xn"+e,b,d,this.xfirst||this,0,this.n,f,this.pr),this.xfirst.xs0=0),this;this.data={s:b+d};this.rxp={};this.s=b;this.c=d;this.r=f;return this};var Ea=function(a,b,d,c,f,j,e){this.p=c?T(a)||a:a;L[a]=L[this.p]=this;this.format=
j||Da(b,f);d&&(this.parse=d);this.clrs=f;this.dflt=b;this.pr=e||0},q=N._registerComplexSpecialProp=function(a,b,d,c,f,j,e){a=a.split(",");b=b instanceof Array?b:[b];for(var h=a.length;-1<--h;)new Ea(a[h],b[h],d,c&&0===h,f,j,e)},N=function(a){if(!L[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";q(a,null,function(a,c,f,j,e,h,k){var g=window.com.greensock.plugins[b];if(!g)return window.console&&console.log("Error: "+b+" js file not loaded."),e;g._cssRegister();return L[f].parse(a,c,f,j,e,h,
k)})}},m=Ea.prototype;m.parseComplex=function(a,b,d,c,f,j){return aa(a,this.p,b,d,this.clrs,this.dflt,c,this.pr,f,j)};m.parse=function(a,b,d,c,f,j){return this.parseComplex(a.style,this.format(x(a,d,r,!1,this.dflt)),this.format(b),f,j)};B.registerSpecialProp=function(a,b,d){q(a,null,function(a,f,j,e,h,k){h=new y(a,j,0,0,h,2,j,!1,d);h.plugin=k;h.setRatio=b(a,f,e._tween,j);return h},!1,!1,null,d)};var Fa="scaleX scaleY scaleZ x y z skewX rotation rotationX rotationY perspective".split(" "),H=T("transform"),
Qa=Aa+"transform",Ga=T("transformOrigin"),I=null!==T("perspective"),Y=function(a,b,d){var c=d?a._gsTransform||{skewY:0}:{skewY:0},f=0>c.scaleX,j=I?parseFloat(x(a,Ga,b,!1,"0 0 0").split(" ")[2])||c.zOrigin||0:0,e,h,k,g,l,p,n,m;H?e=x(a,Qa,b,!0):a.currentStyle&&(e=(e=a.currentStyle.filter.match(Ma))&&4===e.length?e[0].substr(4)+","+Number(e[2].substr(4))+","+Number(e[1].substr(4))+","+e[3].substr(4)+","+(c?c.x:0)+","+(c?c.y:0):null);h=(e||"").match(/(?:\-|\b)[\d\-\.e]+\b/gi)||[];for(b=h.length;-1<--b;)e=
Number(h[b]),h[b]=(1E5*e+(0>e?-0.5:0.5)>>0)/1E5;if(16===h.length){if(f=h[8],e=h[9],l=h[10],p=h[12],n=h[13],m=h[14],c.zOrigin&&(m=-c.zOrigin,p=f*m-h[12],n=e*m-h[13],m=l*m+c.zOrigin-h[14]),!d||p!==c.x||n!==c.y||m!==c.z){var K=h[0],s=h[1],w=h[2],q=h[3],t=h[4],r=h[5],u=h[6],y=h[7];h=h[11];var v=-Math.PI+1E-4,A=Math.PI-1E-4,z=c.rotationX=Math.atan2(u,l),F=z<v||z>A,E,G,C,D;z&&(C=Math.cos(-z),D=Math.sin(-z),z=t*C+f*D,E=r*C+e*D,G=u*C+l*D,f=t*-D+f*C,e=r*-D+e*C,l=u*-D+l*C,h=y*-D+h*C,t=z,r=E,u=G);if(z=c.rotationY=
Math.atan2(f,K))k=z<v||z>A,C=Math.cos(-z),D=Math.sin(-z),E=s*C-e*D,G=w*C-l*D,e=s*D+e*C,l=w*D+l*C,h=q*D+h*C,K=K*C-f*D,s=E,w=G;if(z=c.rotation=Math.atan2(s,r))g=z<v||z>A,C=Math.cos(-z),D=Math.sin(-z),K=K*C+t*D,E=s*C+r*D,r=s*-D+r*C,u=w*-D+u*C,s=E;g&&F?c.rotation=c.rotationX=0:g&&k?c.rotation=c.rotationY=0:k&&F&&(c.rotationY=c.rotationX=0);c.scaleX=(1E5*Math.sqrt(K*K+s*s)+0.5>>0)/1E5;c.scaleY=(1E5*Math.sqrt(r*r+e*e)+0.5>>0)/1E5;c.scaleZ=(1E5*Math.sqrt(u*u+l*l)+0.5>>0)/1E5;c.skewX=0;c.perspective=h?1/
h:0;c.x=p;c.y=n;c.z=m}}else if(!I||0===h.length||c.x!==h[4]||c.y!==h[5]||!c.rotationX&&!c.rotationY){e=(k=6<=h.length)?h[0]:1;p=h[1]||0;l=h[2]||0;n=k?h[3]:1;c.x=h[4]||0;c.y=h[5]||0;k=Math.sqrt(e*e+p*p);g=Math.sqrt(n*n+l*l);e=e||p?Math.atan2(p,e):c.rotation||0;l=l||n?Math.atan2(l,n)+e:c.skewX||0;p=k-Math.abs(c.scaleX||0);n=g-Math.abs(c.scaleY||0);Math.abs(l)>Math.PI/2&&Math.abs(l)<1.5*Math.PI&&(f?(k*=-1,l+=0>=e?Math.PI:-Math.PI,e+=0>=e?Math.PI:-Math.PI):(g*=-1,l+=0>=l?Math.PI:-Math.PI));f=(e-c.rotation)%
Math.PI;m=(l-c.skewX)%Math.PI;if(void 0===c.skewX||1E-6<p||-1E-6>p||1E-6<n||-1E-6>n||1E-6<f||-1E-6>f||1E-6<m||-1E-6>m)c.scaleX=k,c.scaleY=g,c.rotation=e,c.skewX=l;I&&(c.rotationX=c.rotationY=c.z=0,c.perspective=parseFloat(B.defaultTransformPerspective)||0,c.scaleZ=1)}c.zOrigin=j;for(b in c)1E-6>c[b]&&-1E-6<c[b]&&(c[b]=0);d&&(a._gsTransform=c);return c},Ra=function(a){var b=this.data,d=-b.rotation,c=d+b.skewX,f=(1E5*Math.cos(d)*b.scaleX>>0)/1E5,d=(1E5*Math.sin(d)*b.scaleX>>0)/1E5,j=(1E5*Math.sin(c)*
-b.scaleY>>0)/1E5,c=(1E5*Math.cos(c)*b.scaleY>>0)/1E5,e=this.t.style,h=this.t.currentStyle,k,g;if(h){g=d;d=-j;j=-g;k=h.filter;e.filter="";var l=this.t.offsetWidth;g=this.t.offsetHeight;var p="absolute"!==h.position,n="progid:DXImageTransform.Microsoft.Matrix(M11="+f+", M12="+d+", M21="+j+", M22="+c,m=b.x,r=b.y,s,w;null!=b.ox&&(s=(b.oxp?0.01*l*b.ox:b.ox)-l/2,w=(b.oyp?0.01*g*b.oy:b.oy)-g/2,m+=s-(s*f+w*d),r+=w-(s*j+w*c));if(p)s=l/2,w=g/2,n+=", Dx="+(s-(s*f+w*d)+m)+", Dy="+(w-(s*j+w*c)+r)+")";else{var q=
8>ja?1:-1;s=b.ieOffsetX||0;w=b.ieOffsetY||0;b.ieOffsetX=Math.round((l-((0>f?-f:f)*l+(0>d?-d:d)*g))/2+m);b.ieOffsetY=Math.round((g-((0>c?-c:c)*g+(0>j?-j:j)*l))/2+r);for(v=0;4>v;v++)l=Pa[v],g=h[l],g=-1!==g.indexOf("px")?parseFloat(g):F(this.t,l,parseFloat(g),g.replace(Ha,""))||0,m=g!==b[l]?2>v?-b.ieOffsetX:-b.ieOffsetY:2>v?s-b.ieOffsetX:w-b.ieOffsetY,e[l]=(b[l]=Math.round(g-m*(0===v||2===v?1:q)))+"px";n+=", sizingMethod='auto expand')"}e.filter=-1!==k.indexOf("DXImageTransform.Microsoft.Matrix(")?k.replace(Na,
n):n+" "+k;if(0===a||1===a)if(1===f&&0===d&&0===j&&1===c&&(!p||-1!==n.indexOf("Dx=0, Dy=0")))(!ga.test(k)||100===parseFloat(RegExp.$1))&&-1===k.indexOf("gradient(")&&e.removeAttribute("filter")}},Sa=function(){var a=this.data,b=this.t.style,d=a.perspective,c=a.scaleX,f=0,j=0,e=0,h=0,k=a.scaleY,g=0,l=0,p=0,m=0,r=a.scaleZ,q=0,s=0,w=0,v=d?-1/d:0,t=a.rotation,A=a.zOrigin,u,x,y,B,z;va&&(x=b.top+"",u=parseFloat(x)||0,x=x.substr((u+"").length),a._ffFix=!a._ffFix,b.top=(a._ffFix?u+0.05:u-0.05)+(""===x?"px":
x));t&&(u=Math.cos(t),t=Math.sin(t),y=k*t,f=c*-t,k*=u,c*=u,h=y);if(t=a.rotationY)u=Math.cos(t),t=Math.sin(t),B=r*-t,z=v*-t,j=c*t,g=h*t,r*=u,v*=u,c*=u,h*=u,p=B,s=z;if(t=a.rotationX)u=Math.cos(t),t=Math.sin(t),x=f*u+j*t,y=k*u+g*t,B=m*u+r*t,z=w*u+v*t,j=f*-t+j*u,g=k*-t+g*u,r=m*-t+r*u,v=w*-t+v*u,f=x,k=y,m=B,w=z;A&&(q-=A,e=j*q,l=g*q,q=r*q+A);e+=a.x;l+=a.y;q=(1E5*(q+a.z)>>0)/1E5;b[H]="matrix3d("+(1E5*c>>0)/1E5+","+(1E5*h>>0)/1E5+","+(1E5*p>>0)/1E5+","+(1E5*s>>0)/1E5+","+(1E5*f>>0)/1E5+","+(1E5*k>>0)/1E5+
","+(1E5*m>>0)/1E5+","+(1E5*w>>0)/1E5+","+(1E5*j>>0)/1E5+","+(1E5*g>>0)/1E5+","+(1E5*r>>0)/1E5+","+(1E5*v>>0)/1E5+","+(1E5*e>>0)/1E5+","+(1E5*l>>0)/1E5+","+q+","+(d?1+-q/d:1)+")"},Ta=function(){var a=this.data;if(!a.rotation&&!a.skewX)this.t.style[H]="matrix("+a.scaleX+",0,0,"+a.scaleY+","+a.x+","+a.y+")";else{var b=a.rotation,d=b-a.skewX,c=(1E5*Math.cos(b)*a.scaleX>>0)/1E5,b=(1E5*Math.sin(b)*a.scaleX>>0)/1E5,f=(1E5*Math.sin(d)*-a.scaleY>>0)/1E5,d=(1E5*Math.cos(d)*a.scaleY>>0)/1E5;this.t.style[H]=
"matrix("+c+","+b+","+f+","+d+","+a.x+","+a.y+")"}};q("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,transformPerspective",null,function(a,b,d,c,f,j,e){if(c._transform)return f;b=c._transform=Y(a,r,!0);var h=a.style,k=Fa.length,g,l,p,m,q;if("string"===typeof e.transform&&H)l=h[H],h[H]=e.transform,g=Y(a,null,!1),h[H]=l;else if("object"===typeof e){l=null!=e.rotation?e.rotation:
null!=e.rotationZ?e.rotationZ:b.rotation*R;g={scaleX:G(null!=e.scaleX?e.scaleX:e.scale,b.scaleX),scaleY:G(null!=e.scaleY?e.scaleY:e.scale,b.scaleY),scaleZ:G(null!=e.scaleZ?e.scaleZ:e.scale,b.scaleZ),x:G(e.x,b.x),y:G(e.y,b.y),z:G(e.z,b.z),perspective:G(e.transformPerspective,b.perspective)};g.rotation=null!=e.shortRotation||null!=e.shortRotationZ?na(e.shortRotation||e.shortRotationZ||0,b.rotation):"number"===typeof l?l*E:P(l,b.rotation);I&&(g.rotationX=null!=e.shortRotationX?na(e.shortRotationX,b.rotationX):
"number"===typeof e.rotationX?e.rotationX*E:P(e.rotationX,b.rotationX),g.rotationY=null!=e.shortRotationY?na(e.shortRotationY,b.rotationY):"number"===typeof e.rotationY?e.rotationY*E:P(e.rotationY,b.rotationY),1E-6>g.rotationX&&-1E-6<g.rotationX&&(g.rotationX=0),1E-6>g.rotationY&&-1E-6<g.rotationY&&(g.rotationY=0));g.skewX=null==e.skewX?b.skewX:"number"===typeof e.skewX?e.skewX*E:P(e.skewX,b.skewX);g.skewY=null==e.skewY?b.skewY:"number"===typeof e.skewY?e.skewY*E:P(e.skewY,b.skewY);if(l=g.skewY-b.skewY)g.skewX+=
l,g.rotation+=l;1E-6>g.skewY&&-1E-6<g.skewY&&(g.skewY=0);1E-6>g.skewX&&-1E-6<g.skewX&&(g.skewX=0);1E-6>g.rotation&&-1E-6<g.rotation&&(g.rotation=0)}m=b.z||b.rotationX||b.rotationY||g.z||g.rotationX||g.rotationY||g.perspective;!m&&null!=g.scale&&(g.scaleZ=1);for(;-1<--k;)if(d=Fa[k],p=g[d]-b[d],1E-6<p||-1E-6>p||null!=X[d])q=!0,f=new y(b,d,b[d],p,f),f.xs0=0,f.plugin=j,c._overwriteProps.push(f.n);if((p=e.transformOrigin)||I&&m&&b.zOrigin)H?(q=!0,p=(p||x(a,d,r,!1,"50% 50%"))+"",d=Ga,f=new y(h,d,0,0,f,
-1,"css_transformOrigin"),f.b=h[d],f.plugin=j,I?(l=b.zOrigin,p=p.split(" "),b.zOrigin=(2<p.length?parseFloat(p[2]):l)||0,f.xs0=f.e=h[d]=p[0]+" "+(p[1]||"50%")+" 0px",f=new y(b,"zOrigin",0,0,f,-1,f.n),f.b=l,f.xs0=f.e=b.zOrigin):f.xs0=f.e=h[d]=p):ma(p+"",b);q&&(c._transformType=m||3===this._transformType?3:2);return f},!0);q("boxShadow","0px 0px 0px 0px #999",null,!0,!0);q("borderRadius","0px",function(a,b,d,c,f){b=this.format(b);c=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius",
"borderBottomLeftRadius"];var j=a.style,e,h,k,g,l,m,n,q,v,s,w,y;q=parseFloat(a.offsetWidth);v=parseFloat(a.offsetHeight);b=b.split(" ");for(e=0;e<c.length;e++)this.p.indexOf("border")&&(c[e]=T(c[e])),g=k=x(a,c[e],r,!1,"0px"),-1!==g.indexOf(" ")&&(k=g.split(" "),g=k[0],k=k[1]),l=h=b[e],m=parseFloat(g),w=g.substr((m+"").length),(y="="===l.charAt(1))?(n=parseInt(l.charAt(0)+"1",10),l=l.substr(2),n*=parseFloat(l),s=l.substr((n+"").length-(0>n?1:0))||""):(n=parseFloat(l),s=l.substr((n+"").length)),""===
s&&(s=ca[d]||w),s!==w&&(g=F(a,"borderLeft",m,w),m=F(a,"borderTop",m,w),"%"===s?(g=100*(g/q)+"%",k=100*(m/v)+"%"):"em"===s?(w=F(a,"borderLeft",1,"em"),g=g/w+"em",k=m/w+"em"):(g+="px",k=m+"px"),y&&(l=parseFloat(g)+n+s,h=parseFloat(k)+n+s)),f=aa(j,c[e],g+" "+k,l+" "+h,!1,"0px",f);return f},!0,!1,Da("0px 0px 0px 0px",!1,!0));q("backgroundPosition","0 0",function(a,b,d,c,f,j){d=r||U(a,null);d=this.format((d?ja?d.getPropertyValue("background-position-x")+" "+d.getPropertyValue("background-position-y"):
d.getPropertyValue("background-position"):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0");b=this.format(b);var e,h,k,g;if(-1!==d.indexOf("%")!==(-1!==b.indexOf("%"))){c=d.split(" ");e=b.split(" ");ha.setAttribute("src",x(a,"backgroundImage").replace(Ka,""));for(h=2;-1<--h;)d=c[h],k=-1!==d.indexOf("%"),k!==(-1!==e[h].indexOf("%"))&&(g=0===h?a.offsetWidth-ha.width:a.offsetHeight-ha.height,c[h]=k?parseFloat(d)/100*g+"px":100*(parseFloat(d)/g)+"%");d=c.join(" ")}return this.parseComplex(a.style,
d,b,f,j)},!1,!1,ma);q("backgroundSize","0 0",null,!1,!1,ma);q("perspective","0px",null,!0);q("perspectiveOrigin","50% 50%",null,!0);q("transformStyle","preserve-3d",null,!0);q("backfaceVisibility","visible",null,!0);q("margin",null,A("marginTop,marginRight,marginBottom,marginLeft"));q("padding",null,A("paddingTop,paddingRight,paddingBottom,paddingLeft"));q("clip","rect(0px,0px,0px,0px)");q("textShadow","0px 0px 0px #999",null,!1,!0);q("autoRound",null,function(a,b,d,c,f){return f});q("border","0px solid #000",
function(a,b,d,c,f,j){return this.parseComplex(a.style,this.format(x(a,"borderTopWidth",r,!1,"0px")+" "+x(a,"borderTopStyle",r,!1,"solid")+" "+x(a,"borderTopColor",r,!1,"#000")),this.format(b),f,j)},!1,!0,function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(J)||["#000"])[0]});var Ua=function(a){var b=this.t,d=b.filter;a=this.s+this.c*a>>0;var c;100===a&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")?(b.removeAttribute("filter"),c=!x(this.data,"filter")):(b.filter=d.replace(Ja,
""),c=!0));c||(this.xn1&&(b.filter=d=d||"alpha(opacity=100)"),b.filter=-1===d.indexOf("opacity")?b.filter+(" alpha(opacity="+a+")"):d.replace(ga,"opacity="+a))};q("opacity,alpha,autoAlpha","1",function(a,b,d,c,f,j){var e=parseFloat(x(a,"opacity",r,!1,"1")),h=a.style,k;b=parseFloat(b);"autoAlpha"===d&&(k=x(a,"visibility",r),1===e&&("hidden"===k&&0!==b)&&(e=0),f=new y(h,"visibility",0,0,f,-1,null,!1,0,0!==e?"visible":"hidden",0===b?"hidden":"visible"),f.xs0="visible",c._overwriteProps.push(f.n));O?
f=new y(h,"opacity",e,b-e,f):(f=new y(h,"opacity",100*e,100*(b-e),f),f.xn1="autoAlpha"===d?1:0,h.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=j,f.setRatio=Ua);return f});var Va=function(a){if(1===a||0===a){this.t.className=1===a?this.e:this.b;a=this.data;for(var b=this.t.style,d=b.removeProperty?"removeProperty":"removeAttribute";a;){if(a.v)b[a.p]=a.v;else b[d](a.p.replace(qa,"-$1").toLowerCase());a=a._next}}else this.t.className!==this.b&&(this.t.className=
this.b)};q("className",null,function(a,b,d,c,f,j,e){var h=a.className,k=a.style.cssText;f=c._classNamePT=new y(a,d,0,0,f,2);f.setRatio=Va;f.b=h;f.e="="!==b.charAt(1)?b:"+"===b.charAt(0)?h+" "+b.substr(2):h.split(b.substr(2)).join("");c._tween._duration&&(b=Z(a,r,!0),a.className=f.e,e=Ba(a,b,Z(a),e),a.className=h,f.data=e.firstMPT,a.style.cssText=k,f=f.xfirst=c.parse(a,e.difs,f,j));return f});m=["bezier","throwProps","physicsProps","physics2D"];for(v=m.length;v--;)N(m[v]);m=B.prototype;m._firstPT=
null;m._onInitTween=function(a,b,d){if(!a.nodeType)return!1;this._target=a;this._tween=d;this._vars=b;ia=b.autoRound;ba=!1;ca=b.suffixMap||B.suffixMap;r=U(a,"");da=this._overwriteProps;d=a.style;var c,f,j,e;if(ta&&""===d.zIndex&&(c=x(a,"zIndex",r),"auto"===c||""===c))d.zIndex=0;"string"===typeof b&&(f=d.cssText,c=Z(a,r),d.cssText=f+";"+b,c=Ba(a,c,Z(a)).difs,!O&&Ia.test(b)&&(c.opacity=parseFloat(RegExp.$1)),b=c,d.cssText=f);this._firstPT=b=this.parse(a,b,null);if(this._transformType){c=3===this._transformType;
if(H){if(ua){ta=!0;if(""===d.zIndex&&(e=x(a,"zIndex",r),"auto"===e||""===e))d.zIndex=0;wa&&(d.WebkitBackfaceVisibility=this._vars.WebkitBackfaceVisibility||(c?"visible":"hidden"))}}else d.zoom=1;for(d=b;d&&d._next;)d=d._next;e=new y(a,"transform",0,0,null,2);this._linkCSSP(e,null,d);e.setRatio=c&&I?Sa:H?Ta:Ra;e.data=this._transform||Y(a,r,!0);da.pop()}if(ba){for(;b;){a=b._next;for(d=f;d&&d.pr>b.pr;)d=d._next;(b._prev=d?d._prev:j)?b._prev._next=b:f=b;(b._next=d)?d._prev=b:j=b;b=a}this._firstPT=f}return!0};
m.parse=function(a,b,d,c){var f=a.style,j,e,h,k,g,l,m,n;for(j in b){g=b[j];if(e=L[j])d=e.parse(a,g,j,this,d,c,b);else if(e=x(a,j,r)+"",m="string"===typeof g,"color"===j||"fill"===j||"stroke"===j||-1!==j.indexOf("Color")||m&&!g.indexOf("rgb"))m||(g=oa(g),g=(3<g.length?"rgba(":"rgb(")+g.join(",")+")"),d=aa(f,j,e,g,!0,"transparent",d,0,c);else if(m&&(-1!==g.indexOf(" ")||-1!==g.indexOf(",")))d=aa(f,j,e,g,!0,null,d,0,c);else{h=parseFloat(e);l=e.substr((h+"").length);if(""===e||"auto"===e)if("width"===
j||"height"===j){h=a;n=j;k=r;l=parseFloat("width"===n?h.offsetWidth:h.offsetHeight);n=Oa[n];var q=n.length;for(k=k||U(h,null);-1<--q;)l-=parseFloat(x(h,"padding"+n[q],k,!0))||0,l-=parseFloat(x(h,"border"+n[q]+"Width",k,!0))||0;h=l;l="px"}else h="opacity"!==j?0:1,l="";(n=m&&"="===g.charAt(1))?(k=parseInt(g.charAt(0)+"1",10),g=g.substr(2),k*=parseFloat(g),m=g.substr((k+"").length-(0>k?1:0))||""):(k=parseFloat(g),m=m?g.substr((k+"").length)||"":"");""===m&&(m=ca[j]||l);g=k||0===k?(n?k+h:k)+m:b[j];if(l!==
m&&""!==m&&(k||0===k))if(h||0===h)if(h=F(a,j,h,l),"%"===m?(h/=F(a,j,100,"%")/100,100<h&&(h=100)):"em"===m?h/=F(a,j,1,"em"):(k=F(a,j,k,m),m="px"),n&&(k||0===k))g=k+h+m;n&&(k+=h);(h||0===h)&&(k||0===k)?(d=new y(f,j,h,k-h,d,0,"css_"+j,!1!==ia&&("px"===m||"zIndex"===j),0,e,g),d.xs0=m):!g&&("NaN"===g+""||null==g)?window.console&&console.log("invalid "+j+" tween value. "):(d=new y(f,j,k||h||0,0,d,-1,"css_"+j,!1,0,e,g),d.xs0="display"===j&&"none"===g?e:g)}c&&(d&&!d.plugin)&&(d.plugin=c)}return d};m.setRatio=
function(a){var b=this._firstPT,d,c;if(1===a&&(this._tween._time===this._tween._duration||0===this._tween._time))for(;b;)2!==b.type?b.t[b.p]=b.e:b.setRatio(a),b=b._next;else if(a||!(this._tween._time===this._tween._duration||0===this._tween._time)||-1E-6===this._tween._rawPrevTime)for(;b;){d=b.c*a+b.s;b.r?d=0<d?d+0.5>>0:d-0.5>>0:1E-6>d&&-1E-6<d&&(d=0);if(b.type)if(1===b.type)if(c=b.l,2===c)b.t[b.p]=b.xs0+d+b.xs1+b.xn1+b.xs2;else if(3===c)b.t[b.p]=b.xs0+d+b.xs1+b.xn1+b.xs2+b.xn2+b.xs3;else if(4===
c)b.t[b.p]=b.xs0+d+b.xs1+b.xn1+b.xs2+b.xn2+b.xs3+b.xn3+b.xs4;else if(5===c)b.t[b.p]=b.xs0+d+b.xs1+b.xn1+b.xs2+b.xn2+b.xs3+b.xn3+b.xs4+b.xn4+b.xs5;else{d=b.xs0+d+b.xs1;for(c=1;c<b.l;c++)d+=b["xn"+c]+b["xs"+(c+1)];b.t[b.p]=d}else-1===b.type?b.t[b.p]=b.xs0:b.setRatio&&b.setRatio(a);else b.t[b.p]=d+b.xs0;b=b._next}else for(;b;)2!==b.type?b.t[b.p]=b.b:b.setRatio(a),b=b._next};m._enableTransforms=function(a){this._transformType=a||3===this._transformType?3:2};m._linkCSSP=function(a,b,d,c){a&&(b&&(b._prev=
a),a._next&&(a._next._prev=a._prev),d?d._next=a:!c&&null===this._firstPT&&(this._firstPT=a),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next),a._next=b,a._prev=d);return a};m._kill=function(a){var b=a,d=!1,c,f;if(a.css_autoAlpha||a.css_alpha){b={};for(f in a)b[f]=a[f];b.css_opacity=1;b.css_autoAlpha&&(b.css_visibility=1)}if(a.css_className&&(c=this._classNamePT))(a=c.xfirst)&&a._prev?this._linkCSSP(a._prev,c._next,a._prev._prev):a===this._firstPT&&(this._firstPT=null),c._next&&
this._linkCSSP(c._next,c._next._next,a._prev),this._target._gsOverwrittenClassNamePT=this._linkCSSP(c,this._target._gsOverwrittenClassNamePT),this._classNamePT=null,d=!0;return V.prototype._kill.call(this,b)||d};V.activate([B]);return B},!0)});window._gsDefine&&_gsQueue.pop()();