// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com 'use strict';var aa,da,fa,ga,ha,ia,ja,ka,la,ma,na,oa,qa,ra,sa,C,ta,ua,va,wa,xa,Aa,Ba,P,Ca,Da,Ea,Fa,Ga,Q,Ha,Ia,Ja,Ka,La,Ma,Na,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,fb,gb,hb,ib,jb,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Jb,Kb,Lb,Mb,Nb,Ob,Pb,Qb,Rb,Sb,Tb,Ub,Vb,Wb,Xb,Yb,Zb,$b,ac,bc,cc,dc,ec,fc,gc,hc,ic={},jc={};"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(d){return d.__proto__}:function(d){return d.constructor.prototype}); (function(){function d(b,a,f,e){this.set(b,a,f,e)}function q(){this.yc=this.xc=this.Ac=this.zc=this.Rc=this.Qc=this.mc=this.lc=0}function n(b,a,f,e){be?a:e):(D=bf?a:f):fe?b:e):(D=af?b:f)}function k(){this.items=this.ze=null;this.lj=0;y&&(this.ze=new Set);this.mi=[];this.zf=!0}function c(b){u[A++]=b}function p(){this.qa=this.Lm=this.y=this.sn=0}function g(b){this.Ma=[];this.Hk=this.Jk=this.Kk=this.Ik=0;this.ak(b)}function a(b,a){this.yb= b;this.Gb=a;this.cells={}}function e(b,a){this.yb=b;this.Gb=a;this.cells={}}function v(b,a,f){var e;return M.length?(e=M.pop(),e.co=b,e.x=a,e.y=f,e):new da(b,a,f)}function b(b,a,f){this.co=b;this.x=a;this.y=f;this.Nb=new fa}function h(b,a,f){var e;return Z.length?(e=Z.pop(),e.co=b,e.x=a,e.y=f,e):new ga(b,a,f)}function t(b,a,f){this.co=b;this.x=a;this.y=f;this.Nb=[];this.Bh=!0;this.ue=new fa;this.ti=!1}function m(b,a){return b.ke-a.ke}ha=function(b){window.console&&window.console.log&&window.console.log(b)}; ia=function(b){window.console&&window.console.error&&window.console.error(b)};aa=function(b){return b};ja=function(b){return"undefined"===typeof b};ka=function(b){return"number"===typeof b};la=function(b){return"string"===typeof b};ma=function(b){return 0a;a<<=1)b=b|b>>a;return b+1};oa=function(b){return 0>b?-b:b};qa=function(b,a){return b>a?b:a};ra=function(b,a){return bv)return!1;av)return!1;w=h-b+l-f;u=c-a+z-e;b=f-b;a=e-a;h=l-h;c=z-c;z=oa(a*h-c*b);return oa(h*u-c*w)>z?!1:oa(b*u-a*w)<=z};d.prototype.set=function(b,a,f,e){this.left=b;this.top=a;this.right=f;this.bottom=e};d.prototype.mh=function(b){this.left=b.left;this.top=b.top;this.right=b.right;this.bottom=b.bottom};d.prototype.width= function(){return this.right-this.left};d.prototype.height=function(){return this.bottom-this.top};d.prototype.offset=function(b,a){this.left+=b;this.top+=a;this.right+=b;this.bottom+=a;return this};d.prototype.normalize=function(){var b=0;this.left>this.right&&(b=this.left,this.left=this.right,this.right=b);this.top>this.bottom&&(b=this.top,this.top=this.bottom,this.bottom=b)};d.prototype.lz=function(b){return!(b.rightthis.right||b.top>this.bottom)};d.prototype.mz= function(b,a,f){return!(b.right+athis.right||b.top+f>this.bottom)};d.prototype.pc=function(b,a){return b>=this.left&&b<=this.right&&a>=this.top&&a<=this.bottom};d.prototype.Hi=function(b){return this.left===b.left&&this.top===b.top&&this.right===b.right&&this.bottom===b.bottom};va=d;q.prototype.$j=function(b){this.lc=b.left;this.mc=b.top;this.Qc=b.right;this.Rc=b.top;this.zc=b.right;this.Ac=b.bottom;this.xc=b.left;this.yc=b.bottom};q.prototype.wt=function(b, a){if(0===a)this.$j(b);else{var f=Math.sin(a),e=Math.cos(a),h=b.left*f,c=b.top*f,l=b.right*f,f=b.bottom*f,z=b.left*e,w=b.top*e,u=b.right*e,e=b.bottom*e;this.lc=z-c;this.mc=w+h;this.Qc=u-c;this.Rc=w+l;this.zc=u-f;this.Ac=e+l;this.xc=z-f;this.yc=e+h}};q.prototype.offset=function(b,a){this.lc+=b;this.mc+=a;this.Qc+=b;this.Rc+=a;this.zc+=b;this.Ac+=a;this.xc+=b;this.yc+=a;return this};var D=0,x=0;q.prototype.Mq=function(b){n(this.lc,this.Qc,this.zc,this.xc);b.left=D;b.right=x;n(this.mc,this.Rc,this.Ac, this.yc);b.top=D;b.bottom=x};q.prototype.pc=function(b,a){var f=this.lc,e=this.mc,h=this.Qc-f,c=this.Rc-e,l=this.zc-f,z=this.Ac-e,w=b-f,u=a-e,v=h*h+c*c,m=h*l+c*z,c=h*w+c*u,r=l*l+z*z,t=l*w+z*u,d=1/(v*r-m*m),h=(r*c-m*t)*d,v=(v*t-m*c)*d;if(0<=h&&0h+v)return!0;h=this.xc-f;c=this.yc-e;v=h*h+c*c;m=h*l+c*z;c=h*w+c*u;d=1/(v*r-m*m);h=(r*c-m*t)*d;v=(v*t-m*c)*d;return 0<=h&&0h+v};q.prototype.xf=function(b,a){if(a)switch(b){case 0:return this.lc;case 1:return this.Qc;case 2:return this.zc;case 3:return this.xc; case 4:return this.lc;default:return this.lc}else switch(b){case 0:return this.mc;case 1:return this.Rc;case 2:return this.Ac;case 3:return this.yc;case 4:return this.mc;default:return this.mc}};q.prototype.rs=function(){return(this.lc+this.Qc+this.zc+this.xc)/4};q.prototype.ts=function(){return(this.mc+this.Rc+this.Ac+this.yc)/4};q.prototype.Dr=function(b){var a=b.rs(),f=b.ts();if(this.pc(a,f))return!0;a=this.rs();f=this.ts();if(b.pc(a,f))return!0;var e,h,c,l,z,w,u,v;for(u=0;4>u;u++)for(v=0;4>v;v++)if(a= this.xf(u,!0),f=this.xf(u,!1),e=this.xf(u+1,!0),h=this.xf(u+1,!1),c=b.xf(v,!0),l=b.xf(v,!1),z=b.xf(v+1,!0),w=b.xf(v+1,!1),ua(a,f,e,h,c,l,z,w))return!0;return!1};wa=q;xa=function(b,a){for(var f in a)a.hasOwnProperty(f)&&(b[f]=a[f]);return b};Aa=function(b,a){var f,e;a=C(a);if(!(0>a||a>=b.length)){f=a;for(e=b.length-1;ff?f:b};Q=function(b){return b/(180/sa)};Ha=function(b){return 180/sa*b};Ia=function(b){b%=360;0>b&&(b+=360);return b};Ja=function(b){b%=2*sa;0>b&&(b+=2*sa);return b};Ka=function(b){return Ia(Ha(b))};La=function(b){return Ja(Q(b))};Ma=function(b,a,f,e){return Math.atan2(e-a,f-b)};Na=function(b,a){if(b===a)return 0;var f=Math.sin(b),e=Math.cos(b), h=Math.sin(a),c=Math.cos(a),f=f*h+e*c;return 1<=f?0:-1>=f?sa:Math.acos(f)};Pa=function(b,a,f){var e=Math.sin(b),h=Math.cos(b),c=Math.sin(a),l=Math.cos(a);return Math.acos(e*c+h*l)>f?0=e*h-f*c};Ra=function(b,a,f,e,h,c){if(0===f)return c?b:a;var l=Math.sin(f);f=Math.cos(f);b-=e;a-=h;var z=b*l;b=b*f-a*l;a=a*f+z;return c?b+e:a+h};Sa=function(b,a,f,e){b=f-b;a=e-a;return Math.sqrt(b*b+a* a)};Ta=function(b,a){return!b!==!a};Ua=function(b){for(var a in b)if(b.hasOwnProperty(a))return!0;return!1};Va=function(b){for(var a in b)b.hasOwnProperty(a)&&delete b[a]};var r=+new Date;Wa=function(){if("undefined"!==typeof window.performance){var b=window.performance;if("undefined"!==typeof b.now)return b.now();if("undefined"!==typeof b.webkitNow)return b.webkitNow();if("undefined"!==typeof b.mozNow)return b.mozNow();if("undefined"!==typeof b.msNow)return b.msNow()}return Date.now()-r};var f=!1, l=f=!1,O=!1;"undefined"!==typeof window&&(f=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent),f=!f&&/safari/i.test(navigator.userAgent),l=/(iphone|ipod|ipad)/i.test(navigator.userAgent),O=window.c2ejecta);var y=!f&&!O&&!l&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;k.prototype.contains=function(b){return this.Te()?!1:y?this.ze.has(b):this.items&&this.items.hasOwnProperty(b)};k.prototype.add=function(b){if(y)this.ze.has(b)||(this.ze.add(b),this.zf= !1);else{var a=b.toString(),f=this.items;f?f.hasOwnProperty(a)||(f[a]=b,this.lj++,this.zf=!1):(this.items={},this.items[a]=b,this.lj=1,this.zf=!1)}};k.prototype.remove=function(b){if(!this.Te())if(y)this.ze.has(b)&&(this.ze["delete"](b),this.zf=!1);else if(this.items){b=b.toString();var a=this.items;a.hasOwnProperty(b)&&(delete a[b],this.lj--,this.zf=!1)}};k.prototype.clear=function(){this.Te()||(y?this.ze.clear():(this.items=null,this.lj=0),P(this.mi),this.zf=!0)};k.prototype.Te=function(){return 0=== this.count()};k.prototype.count=function(){return y?this.ze.size:this.lj};var u=null,A=0;k.prototype.AA=function(){if(!this.zf){if(y)P(this.mi),u=this.mi,A=0,this.ze.forEach(c),u=null,A=0;else{var b=this.mi;P(b);var a,f=0,e=this.items;if(e)for(a in e)e.hasOwnProperty(a)&&(b[f++]=e[a])}this.zf=!0}};k.prototype.pf=function(){this.AA();return this.mi};fa=k;new fa;Xa=function(b,a){y?Ya(b,a.ze):Za(b,a.pf())};Ya=function(b,a){var f,e,h,c;e=f=0;for(h=b.length;ff&&(f=c),lh&&(h=l);this.Ik=a;this.Jk=f;this.Kk=e;this.Hk=h};g.prototype.$j=function(b,a,f){this.Ma.length=8;this.Yc=4;var e=this.Ma;e[0]=b.left-a;e[1]=b.top-f;e[2]=b.right-a;e[3]=b.top-f;e[4]=b.right-a;e[5]=b.bottom-f;e[6]=b.left-a;e[7]=b.bottom-f;this.Nk=b.right-b.left;this.Mk=b.bottom-b.top;this.Na()};g.prototype.di=function(b,a,f,e,h){this.Ma.length=8;this.Yc= 4;var c=this.Ma;c[0]=b.lc-a;c[1]=b.mc-f;c[2]=b.Qc-a;c[3]=b.Rc-f;c[4]=b.zc-a;c[5]=b.Ac-f;c[6]=b.xc-a;c[7]=b.yc-f;this.Nk=e;this.Mk=h;this.Na()};g.prototype.ut=function(b){this.Yc=b.Yc;Ca(this.Ma,b.Ma);this.Ik=b.Ik;this.Kk-b.Kk;this.Jk=b.Jk;this.Hk=b.Hk};g.prototype.fg=function(b,a,f){if(this.Nk!==b||this.Mk!==a||this.Pq!==f){this.Nk=b;this.Mk=a;this.Pq=f;var e,h,c,l,z,w=0,u=1,v=this.$s,m=this.Ma;0!==f&&(w=Math.sin(f),u=Math.cos(f));f=0;for(c=this.Yc;fM.length&&M.push(z),this.cells[e][c]=null);if(f)for(e= f.left,h=f.right;e<=h;++e)for(c=f.top,l=f.bottom;c<=l;++c)a&&a.pc(e,c)||this.Gf(e,c,!0).mo(b)};a.prototype.qm=function(b,a){var f,e,h,c,l,z;f=this.vc(b.left);h=this.wc(b.top);e=this.vc(b.right);for(l=this.wc(b.bottom);f<=e;++f)for(c=h;c<=l;++c)(z=this.Gf(f,c,!1))&&z.dump(a)};hb=a;e.prototype.Gf=function(b,a,f){var e;e=this.cells[b];return e?(e=e[a])?e:f?(e=h(this,b,a),this.cells[b][a]=e):null:f?(e=h(this,b,a),this.cells[b]={},this.cells[b][a]=e):null};e.prototype.vc=function(b){return C(b/this.yb)}; e.prototype.wc=function(b){return C(b/this.Gb)};e.prototype.update=function(b,a,f){var e,h,c,l,z;if(a)for(e=a.left,h=a.right;e<=h;++e)for(c=a.top,l=a.bottom;c<=l;++c)if(!f||!f.pc(e,c))if(z=this.Gf(e,c,!1))z.remove(b),z.Te()&&(z.reset(),1E3>Z.length&&Z.push(z),this.cells[e][c]=null);if(f)for(e=f.left,h=f.right;e<=h;++e)for(c=f.top,l=f.bottom;c<=l;++c)a&&a.pc(e,c)||this.Gf(e,c,!0).mo(b)};e.prototype.qm=function(b,a,f,e,h){var c,l;b=this.vc(b);a=this.wc(a);f=this.vc(f);for(c=this.wc(e);b<=f;++b)for(e= a;e<=c;++e)(l=this.Gf(b,e,!1))&&l.dump(h)};e.prototype.Az=function(b){var a,f,e,h,c;a=b.left;e=b.top;f=b.right;for(h=b.bottom;a<=f;++a)for(b=e;b<=h;++b)if(c=this.Gf(a,b,!1))c.Bh=!1};ib=e;var M=[];b.prototype.Te=function(){return this.Nb.Te()};b.prototype.mo=function(b){this.Nb.add(b)};b.prototype.remove=function(b){this.Nb.remove(b)};b.prototype.dump=function(b){Da(b,this.Nb.pf())};da=b;var Z=[];t.prototype.Te=function(){if(!this.Nb.length)return!0;if(this.Nb.length>this.ue.count())return!1;this.Mn(); return!0};t.prototype.mo=function(b){this.ue.contains(b)?(this.ue.remove(b),this.ue.Te()&&(this.ti=!1)):this.Nb.length?(this.Nb[this.Nb.length-1].qe()>b.qe()&&(this.Bh=!1),this.Nb.push(b)):(this.Nb.push(b),this.Bh=!0)};t.prototype.remove=function(b){this.ue.add(b);this.ti=!0;30<=this.ue.count()&&this.Mn()};t.prototype.Mn=function(){this.ti&&(this.ue.count()===this.Nb.length?this.reset():(Xa(this.Nb,this.ue),this.ue.clear(),this.ti=!1))};t.prototype.Lx=function(){this.Bh||(this.Nb.sort(m),this.Bh= !0)};t.prototype.reset=function(){P(this.Nb);this.Bh=!0;this.ue.clear();this.ti=!1};t.prototype.dump=function(b){this.Mn();this.Lx();this.Nb.length&&b.push(this.Nb)};ga=t;var B="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");jb=function(b){return 0>=b||11<=b?"source-over":B[b-1]};kb=function(b,a,f){if(f)switch(b.gc=f.ONE,b.cc=f.ONE_MINUS_SRC_ALPHA,a){case 1:b.gc=f.ONE;b.cc=f.ONE;break;case 3:b.gc=f.ONE;b.cc=f.ZERO;break; case 4:b.gc=f.ONE_MINUS_DST_ALPHA;b.cc=f.ONE;break;case 5:b.gc=f.DST_ALPHA;b.cc=f.ZERO;break;case 6:b.gc=f.ZERO;b.cc=f.SRC_ALPHA;break;case 7:b.gc=f.ONE_MINUS_DST_ALPHA;b.cc=f.ZERO;break;case 8:b.gc=f.ZERO;b.cc=f.ONE_MINUS_SRC_ALPHA;break;case 9:b.gc=f.DST_ALPHA;b.cc=f.ONE_MINUS_SRC_ALPHA;break;case 10:b.gc=f.ONE_MINUS_DST_ALPHA,b.cc=f.SRC_ALPHA}};lb=function(b){return Math.round(1E6*b)/1E6};mb=function(b,a){return"string"!==typeof b||"string"!==typeof a||b.length!==a.length?!1:b===a?!0:b.toLowerCase()=== a.toLowerCase()};nb=function(b){b=b.target;return!b||b===document||b===window||document&&document.body&&b===document.body||mb(b.tagName,"canvas")?!0:!1}})();var kc="undefined"!==typeof Float32Array?Float32Array:Array;function lc(d){var q=new kc(3);d&&(q[0]=d[0],q[1]=d[1],q[2]=d[2]);return q} function mc(d){var q=new kc(16);d&&(q[0]=d[0],q[1]=d[1],q[2]=d[2],q[3]=d[3],q[4]=d[4],q[5]=d[5],q[6]=d[6],q[7]=d[7],q[8]=d[8],q[9]=d[9],q[10]=d[10],q[11]=d[11],q[12]=d[12],q[13]=d[13],q[14]=d[14],q[15]=d[15]);return q}function nc(d,q){q[0]=d[0];q[1]=d[1];q[2]=d[2];q[3]=d[3];q[4]=d[4];q[5]=d[5];q[6]=d[6];q[7]=d[7];q[8]=d[8];q[9]=d[9];q[10]=d[10];q[11]=d[11];q[12]=d[12];q[13]=d[13];q[14]=d[14];q[15]=d[15]} function oc(d,q){var n=q[0],k=q[1];q=q[2];d[0]*=n;d[1]*=n;d[2]*=n;d[3]*=n;d[4]*=k;d[5]*=k;d[6]*=k;d[7]*=k;d[8]*=q;d[9]*=q;d[10]*=q;d[11]*=q} function pc(d,q,n,k){k||(k=mc());var c,p,g,a,e,v,b,h,t=d[0],m=d[1];d=d[2];p=n[0];g=n[1];c=n[2];n=q[1];v=q[2];t===q[0]&&m===n&&d===v?(d=k,d[0]=1,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=1,d[6]=0,d[7]=0,d[8]=0,d[9]=0,d[10]=1,d[11]=0,d[12]=0,d[13]=0,d[14]=0,d[15]=1):(n=t-q[0],v=m-q[1],b=d-q[2],h=1/Math.sqrt(n*n+v*v+b*b),n*=h,v*=h,b*=h,q=g*b-c*v,c=c*n-p*b,p=p*v-g*n,(h=Math.sqrt(q*q+c*c+p*p))?(h=1/h,q*=h,c*=h,p*=h):p=c=q=0,g=v*p-b*c,a=b*q-n*p,e=n*c-v*q,(h=Math.sqrt(g*g+a*a+e*e))?(h=1/h,g*=h,a*=h,e*=h):e=a=g=0, k[0]=q,k[1]=g,k[2]=n,k[3]=0,k[4]=c,k[5]=a,k[6]=v,k[7]=0,k[8]=p,k[9]=e,k[10]=b,k[11]=0,k[12]=-(q*t+c*m+p*d),k[13]=-(g*t+a*m+e*d),k[14]=-(n*t+v*m+b*d),k[15]=1)} (function(){function d(a,e,c){this.Ue=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.Ka=!!c;this.Al=this.aj=!1;this.Uk=0;this.cn=1;this.Xp=1E3;this.IA=(this.Xp-this.cn)/32768;this.tn=lc([0,0,100]);this.Xr=lc([0,0,0]);this.Wt=lc([0,1,0]);this.wk=lc([1,1,1]);this.Zq=!0;this.Sl=mc();this.ld=mc();this.zo=mc();this.Dn=mc();this.N=a;this.yr()}function q(a,e,c){this.N=a;this.bk=e;this.name=c;this.Bd=a.getAttribLocation(e,"aPos");this.Of=a.getAttribLocation(e, "aTex");this.Vr=a.getUniformLocation(e,"matP");this.Nl=a.getUniformLocation(e,"matMV");this.Mh=a.getUniformLocation(e,"opacity");this.Go=a.getUniformLocation(e,"colorFill");this.Wr=a.getUniformLocation(e,"samplerFront");this.uj=a.getUniformLocation(e,"samplerBack");this.Og=a.getUniformLocation(e,"destStart");this.Ng=a.getUniformLocation(e,"destEnd");this.wj=a.getUniformLocation(e,"seconds");this.Io=a.getUniformLocation(e,"pixelWidth");this.Ho=a.getUniformLocation(e,"pixelHeight");this.tj=a.getUniformLocation(e, "layerScale");this.sj=a.getUniformLocation(e,"layerAngle");this.xj=a.getUniformLocation(e,"viewOrigin");this.vj=a.getUniformLocation(e,"scrollPos");this.gz=!!(this.Io||this.Ho||this.wj||this.uj||this.Og||this.Ng||this.tj||this.sj||this.xj||this.vj);this.es=this.gs=-999;this.Rl=1;this.as=this.$r=0;this.cs=this.Zr=this.Yr=1;this.ls=this.ks=this.hs=this.os=this.ns=this.bs=0;this.yo=[];this.ds=mc();this.Mh&&a.uniform1f(this.Mh,1);this.Go&&a.uniform4f(this.Go,1,1,1,1);this.Wr&&a.uniform1i(this.Wr,0);this.uj&& a.uniform1i(this.uj,1);this.Og&&a.uniform2f(this.Og,0,0);this.Ng&&a.uniform2f(this.Ng,1,1);this.tj&&a.uniform1f(this.tj,1);this.sj&&a.uniform1f(this.sj,0);this.xj&&a.uniform2f(this.xj,0,0);this.vj&&a.uniform2f(this.vj,0,0);this.wj&&a.uniform1f(this.wj,0);this.wg=!1}function n(a,e){return a[0]===e[0]&&a[1]===e[1]&&a[2]===e[2]&&a[3]===e[3]&&a[4]===e[4]&&a[5]===e[5]&&a[6]===e[6]&&a[7]===e[7]&&a[8]===e[8]&&a[9]===e[9]&&a[10]===e[10]&&a[11]===e[11]&&a[12]===e[12]&&a[13]===e[13]&&a[14]===e[14]&&a[15]=== e[15]}function k(a,e){this.type=a;this.K=e;this.N=e.N;this.gd=this.hc=this.Ks=0;this.na=this.Id=null;this.xt=[]}var c=mc();d.prototype.yr=function(){var a=this.N,e;this.Qr=1;this.Ig=this.Lf=null;this.Tk=1;a.clearColor(0,0,0,0);a.clear(a.COLOR_BUFFER_BIT);a.enable(a.BLEND);a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA);a.disable(a.CULL_FACE);a.disable(a.STENCIL_TEST);a.disable(a.DITHER);this.Ka?(a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL)):a.disable(a.DEPTH_TEST);this.Rr=a.ONE;this.Pr=a.ONE_MINUS_SRC_ALPHA; this.vk=new Float32Array(8E3*(this.Ka?3:2));this.kk=new Float32Array(16E3);this.Vs=new Float32Array(32E3);this.gp=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.gp);a.bufferData(a.ARRAY_BUFFER,this.Vs.byteLength,a.DYNAMIC_DRAW);this.uk=Array(4);this.jk=Array(4);for(e=0;4>e;e++)this.uk[e]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.uk[e]),a.bufferData(a.ARRAY_BUFFER,this.vk.byteLength,a.DYNAMIC_DRAW),this.jk[e]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.jk[e]),a.bufferData(a.ARRAY_BUFFER, this.kk.byteLength,a.DYNAMIC_DRAW);this.Je=0;this.jz=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.jz);for(var c=new Uint16Array(12E3),b=e=0;12E3>e;)c[e++]=b,c[e++]=b+1,c[e++]=b+2,c[e++]=b,c[e++]=b+2,c[e++]=b+3,b+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,c,a.STATIC_DRAW);this.hp=this.Xf=this.Kd=0;this.cb=[];e=this.Ka?"attribute highp vec3 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, aPos.z, 1.0);\n\tvTex = aTex;\n}": "attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}";c=this.Ci({src:"varying mediump vec2 vTex;\nuniform lowp float opacity;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, vTex);\n\tgl_FragColor *= opacity;\n}"},e,"");this.cb.push(c);c=this.Ci({src:"uniform mediump sampler2D samplerFront;\nvarying lowp float opacity;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, gl_PointCoord);\n\tgl_FragColor *= opacity;\n}"}, "attribute vec4 aPos;\nvarying float opacity;\nuniform mat4 matP;\nuniform mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tgl_PointSize = aPos.z;\n\topacity = aPos.w;\n}","");this.cb.push(c);c=this.Ci({src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}"},e,"");this.cb.push(c);c=this.Ci({src:"uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}"}, e,"");this.cb.push(c);for(var h in qc)qc.hasOwnProperty(h)&&this.cb.push(this.Ci(qc[h],e,h));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.me=[];this.Rd=0;this.Jb=!1;this.Uq=this.pj=-1;this.nh=null;this.Ln=a.createFramebuffer();this.Yk=this.rm=null;this.Jq=!1;this.Ka&&(this.Yk=a.createRenderbuffer());this.Yf=lc([0,0,0]);this.ps=a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1];2048"===c.name&&a.vertexAttribPointer(c.Bd,4,a.FLOAT,!1,0,0));if(0"!==c.name&&a.vertexAttribPointer(c.Bd,this.Ka?3:2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.jk[this.Je]);a.bufferSubData(a.ARRAY_BUFFER,0,this.kk.subarray(0,this.Xf));c&&0<=c.Of&&""!== c.name&&a.vertexAttribPointer(c.Of,2,a.FLOAT,!1,0,0)}for(var d,a=0,c=this.Rd;ad||0>b)){var h=this.Mc();h.type=7;h.hc=1;h.na||(h.na=mc());h.na[0]=a;h.na[1]=c;h.na[2]=d;h.na[3]=b;this.Jb=!1}};d.prototype.nt=function(a){if(this.Ka&&(a=!!a,this.aj!==a)){var c=this.Mc();c.type=14;c.hc=a?1:0;this.Jb=!1;this.aj=a;this.rm=null;this.aj?this.Pc(2):this.Pc(0)}};d.prototype.mt=function(a){if(this.Ka){var c=this.Mc();c.type=13;c.hc=a?1:0;this.Jb=!1}};d.prototype.ir=function(){nc(this.zo,c);this.ye();this.je(); var a=this.width/2,e=this.height/2;this.Sj(-a,e,a,e,a,-e,-a,-e);nc(c,this.ld);this.je()};d.prototype.lt=function(a,c,d){this.Pc(3);var b=this.Mc();b.type=12;b.na||(b.na=mc());b.na[0]=a;b.na[1]=c;b.na[2]=d;b.na[3]=1;this.Jb=!1};d.prototype.qA=function(){this.Pc(0)};d.prototype.bA=function(){this.Pc(2)};d.prototype.Uz=function(){this.Oe();this.N.flush()};var p=[],g={};d.prototype.Vw=function(){P(p);g={}};d.prototype.Kl=function(a,c,d,b){c=!!c;d=!!d;var h=a.src+","+c+","+d+(c?",undefined":""),t=null; if("undefined"!==typeof a.src&&g.hasOwnProperty(h))return t=g[h],t.Lk++,t;this.Oe();var m=this.N,k=ma(a.width)&&ma(a.height),t=m.createTexture();m.bindTexture(m.TEXTURE_2D,t);m.pixelStorei(m.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var x=m.RGBA,r=m.RGBA,f=m.UNSIGNED_BYTE;if(b&&!this.Ue)switch(b){case 1:r=x=m.RGB;break;case 2:f=m.UNSIGNED_SHORT_4_4_4_4;break;case 3:f=m.UNSIGNED_SHORT_5_5_5_1;break;case 4:r=x=m.RGB,f=m.UNSIGNED_SHORT_5_6_5}if(!k&&c){b=document.createElement("canvas");b.width=na(a.width); b.height=na(a.height);var l=b.getContext("2d");"undefined"!==typeof l.imageSmoothingEnabled?l.imageSmoothingEnabled=d:(l.webkitImageSmoothingEnabled=d,l.mozImageSmoothingEnabled=d,l.msImageSmoothingEnabled=d);l.drawImage(a,0,0,a.width,a.height,0,0,b.width,b.height);m.texImage2D(m.TEXTURE_2D,0,x,r,f,b)}else m.texImage2D(m.TEXTURE_2D,0,x,r,f,a);c?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.REPEAT),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.REPEAT)):(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S, m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE));d?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),k&&this.Zq?(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR_MIPMAP_LINEAR),m.generateMipmap(m.TEXTURE_2D)):m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR)):(m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.NEAREST),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.NEAREST));m.bindTexture(m.TEXTURE_2D,null);this.Lf=null;t.eg=a.width; t.dg=a.height;t.Lk=1;t.Oq=h;p.push(t);return g[h]=t};d.prototype.dd=function(a,c,d,b,h){this.Oe();var t=this.N;this.Ue&&(b=!1);var m=t.createTexture();t.bindTexture(t.TEXTURE_2D,m);t.texImage2D(t.TEXTURE_2D,0,t.RGBA,a,c,0,t.RGBA,b?t.UNSIGNED_SHORT_4_4_4_4:t.UNSIGNED_BYTE,null);h?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T, t.CLAMP_TO_EDGE));t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,d?t.LINEAR:t.NEAREST);t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,d?t.LINEAR:t.NEAREST);t.bindTexture(t.TEXTURE_2D,null);this.Lf=null;m.eg=a;m.dg=c;p.push(m);return m};d.prototype.FA=function(a,c){var d;this.Oe();var b=this.N;this.Ue&&(d=!1);b.bindTexture(b.TEXTURE_2D,c);b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);try{b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,d?b.UNSIGNED_SHORT_4_4_4_4:b.UNSIGNED_BYTE,a)}catch(h){console&& console.error&&console.error("Error updating WebGL texture: ",h)}b.bindTexture(b.TEXTURE_2D,null);this.Lf=null};d.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.Lk&&1=a?b[3]:256>=a?b[2]:512>=a?b[1]:b[0]}function n(){try{return!!window.indexedDB}catch(b){return!1}}function k(b){b.target.result.createObjectStore("saves",{keyPath:"slot"})}function c(b,a,c,f){try{var e=indexedDB.open("_C2SaveStates");e.onupgradeneeded=k;e.onerror=f;e.onsuccess=function(e){e=e.target.result;e.onerror=f;e.transaction(["saves"],"readwrite").objectStore("saves").put({slot:b,data:a}).onsuccess=c}}catch(h){f(h)}}function p(b,a,c){try{var f=indexedDB.open("_C2SaveStates"); f.onupgradeneeded=k;f.onerror=c;f.onsuccess=function(f){f=f.target.result;f.onerror=c;var e=f.transaction(["saves"]).objectStore("saves").get(b);e.onsuccess=function(){e.result?a(e.result.data):a(null)}}}catch(e){c(e)}}function g(){ha("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1h?(h*=a,5===d?(l=h*c/this.qb,1l&&(l=1/Math.ceil(1/l)),h=this.qb*l/c,l=this.pb*l/c,f=(b-h)/2,e=(a-l)/2,b=h,a=l):(f=(b-h)/2,b=h)):(l=b/h,5===d?(l=l*c/this.pb,1l&&(l=1/Math.ceil(1/l)),h=this.qb*l/c,l=this.pb*l/c,f=(b-h)/2,e=(a-l)/2,b=h):e=(a-l)/2,a=l),u&&!this.Jf&&(e=f=0)):this.Jf&&this.ej&&0===this.jr&&(f=Math.floor((b-this.qb)/ 2),e=Math.floor((a-this.pb)/2),b=this.qb,a=this.pb),2>d&&(this.wi=c),this.Rk=Math.round(b),this.Ei=Math.round(a),this.width=Math.round(b*c),this.height=Math.round(a*c),this.za=!0,this.eu?(this.W=this.width,this.V=this.height,this.ed=!0):this.widthh&&(this.V=this.W/d)):3===d&&(h=this.qb/this.pb,d=this.Ih/this.Hh, d>h?this.W=this.V*d:d=l)l=5E4;b+=l;d.src&&(d.complete||d.loaded)&&!d.Nq?a+=l:c=!1}c&&this.Sz&&this.kh&&(t||(this.kh.wA(),t=!0),f=this.kh.Ky(),a+=f,fthis.Nf&&(this.zd||500<=c&&this.Sr!=this.de)){a.clearRect(0,0,d,l);var c=d/2,l=l/2,d=0===this.Nf&&this.Mf.Pl.complete,u=40*f,r=0,t=80*f,p;if(d){var g=this.Mf.Pl,t=g.width*f;p=g.height*f;u=t/2;r=p/2;a.drawImage(g,C(c-u),C(l-r),t,p)}1>=this.Nf?(c=C(c-u)+.5,l=C(l+(r+(d?12*f:0)))+.5,a.fillStyle=b?"red":"DodgerBlue",a.fillRect(c,l,Math.floor(t*this.de),6*f),a.strokeStyle="black",a.strokeRect(c,l,t,6*f),a.strokeStyle= "white",a.strokeRect(c-1*f,l-1*f,t+2*f,8*f)):2===this.Nf&&(a.font=this.Xd?"12pt ArialMT":"12pt Arial",a.fillStyle=b?"#f00":"#999",a.iC="middle",f=Math.round(100*this.de)+"%",d=a.measureText?a.measureText(f):null,a.fillText(f,c-(d?d.width:0)/2,l));this.Sr=this.de}else if(4===this.Nf){this.Gx(a);e?e(function(){h.go()}):setTimeout(function(){h.go()},16);return}}setTimeout(function(){h.go()},this.zd?10:100)}}};var D=-1,x="undefined"===typeof cr_is_preview?200:0,r=!0,f=!1,l=0,O=0,y="undefined"===typeof cr_is_preview? 3E3:0,u=null,A=null,M=0;d.prototype.Gx=function(a){if(!m){for(var c=Math.ceil(this.width),e=Math.ceil(this.height),h=this.Mf.Pl,d=this.Mf.Rz,t=this.Mf.HA,p=0;4>p;++p)if(!h[p].complete||!d[p].complete||!t[p].complete)return;0===M&&(D=Date.now());var p=Date.now(),g=!1,k=a,n,v;r||f?(a.clearRect(0,0,c,e),u&&u.width===c&&u.height===e||(u=document.createElement("canvas"),u.width=c,u.height=e,A=u.getContext("2d")),k=A,g=!0,r&&1===M&&(D=Date.now())):a.globalAlpha=1;k.fillStyle="#333333";k.fillRect(0,0,c, e);256=y&&!f&&1<=this.de&&(f=!0,O=p);if(f&&p-O>=300+x||"undefined"!==typeof cr_is_preview&&1<=this.de&&500>Date.now()-D)m=!0,f=r=!1,this.Mf=A=u=null;++M}};d.prototype.dz=function(){this.Vb&&(this.canvas.parentNode.removeChild(this.Vb),this.Vb=this.fp=null);this.Im= Date.now();this.Kg=Wa();var b,a,f;if(this.Sp)for(b=0,a=this.M.length;bb||2===this.qc&&aa&&(a=0),this.lg=a/=1E3,.51/this.us&&(this.lg=1/this.us));this.Dl=b;this.kg=this.lg*this.ah;this.mb.add(this.kg); this.qf.add(a);b=(document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.ej)&&!this.Vc;2<=this.qc||b&&0a||2===c&&fb++;)this.Yq(this.Ai);b=0;for(a=this.Pe.length;b< a;b++)this.Pe[b].fo=!1;this.xa.ng&&this.xa.ng.sb();P(this.Vj);this.Co=!1;this.Yd++;b=0;for(a=this.M.length;ba.Wk.length&&a.Wk.push(b)};d.prototype.Tq=function(b,a,f,c){if(b.T){var e=C(Math.random()*b.Oh.length);return this.Tq(b.Oh[e],a,f,c)}return b.wd?this.Cf(b.wd,a,!1,f,c,!1):null};var B=[];d.prototype.Cf=function(b, a,f,c,e,h){var d,l,m,u;if(!b)return null;var r=this.M[b[1]],t=r.La.Kf;if(this.kj&&t&&!r.ro||t&&!this.K&&11===b[0][11])return null;var p=a;t||(a=null);var g;r.Wk.length?(g=r.Wk.pop(),g.nd=!0,r.La.S.call(g,r)):(g=new r.La.S(r),g.nd=!1);!f||h||this.Ze.hasOwnProperty(b[2].toString())?g.uid=this.Ej++:g.uid=b[2];this.Ze[g.uid.toString()]=g;g.bt=this.ys++;g.yg=r.j.length;d=0;for(l=this.Td.length;db&&(b=0);b>=this.xa.ka.length&&(b=this.xa.ka.length-1);return this.xa.ka[b]};d.prototype.yn=function(b){var a,f;a=0;for(f=b.length;a=e;)d=1/e,e*=2,b.x+=a*d*(h?1:-1),b.y+=f*d*(h?1:-1),b.J(),this.ic(b,c)?d=h=!0:(d=h=!1,l=b.x,m=b.y);d&&(b.x=l,b.y=m,b.J())};d.prototype.dt=function(b,a){var f=ja(a)?100:a,c=0,e=b.x,d=b.y,h=0,l=0,m=0, u=this.Pb(b);if(!u)return!0;for(;c<=f;){switch(h){case 0:l=0;m=-1;c++;break;case 1:l=1;m=-1;break;case 2:l=1;m=0;break;case 3:m=l=1;break;case 4:l=0;m=1;break;case 5:l=-1;m=1;break;case 6:l=-1;m=0;break;case 7:m=l=-1}h=(h+1)%8;b.x=C(e+l*c);b.y=C(d+m*c);b.J();if(!this.ic(b,u)&&(u=this.Pb(b),!u))return!0}b.x=e;b.y=d;b.J();return!1};d.prototype.Zh=function(b,a){b.Ie&&a.Ie&&this.Vj.push([b,a])};d.prototype.Tw=function(b,a){var f,c,e;f=0;for(c=this.Vj.length;fu;u++)if(g=h-u*p,b.x=a+Math.cos(g)*d,b.y=f+Math.sin(g)*d,b.J(),!this.ic(b,m)&&(m=this.Pb(b),!m)){r=g;break}36===u&&(r=Ja(h+sa));m=l;for(u=1;36>u;u++)if(g=h+u*p,b.x=a+Math.cos(g)*d,b.y=f+Math.sin(g)*d,b.J(),!this.ic(b,m)&&(m=this.Pb(b),!m)){t=g;break}36===u&&(t=Ja(h+sa));b.x=c;b.y=e;b.J();if(t===r)return t;b=Na(t,r)/2;b= Qa(t,r)?Ja(r+b+sa):Ja(t+b);r=Math.cos(h);h=Math.sin(h);t=Math.cos(b);b=Math.sin(b);a=r*t+h*b;return Ma(0,0,r-2*a*t,h-2*a*b)};var W=-1;d.prototype.trigger=function(b,a,f){if(!this.xa)return!1;var c=this.xa.ng;if(!c)return!1;var e=!1,d,h,l;W++;var m=c.Gn;h=0;for(l=m.length;h=this.Jo.length&&this.Jo.push([])};d.prototype.Pz=function(){this.Ol--};d.prototype.lr=function(){return this.Jo[this.Ol]};d.prototype.pm=function(b){this.al++;this.al>=this.Jn.length&&this.Jn.push(new Tb);var a=this.kb();a.reset(b);return a};d.prototype.km=function(){this.al--};d.prototype.kb=function(){return this.Jn[this.al]};d.prototype.ct=function(){this.Ql++;this.Ql>=this.Lo.length&&this.Lo.push(aa({name:void 0,index:0,wb:!1}));var b= this.Dy();b.name=void 0;b.index=0;b.wb=!1;return b};d.prototype.Ws=function(){this.Ql--};d.prototype.Dy=function(){return this.Lo[this.Ql]};d.prototype.mr=function(b,a){for(var f,c,e,d,h,l;a;){f=0;for(c=a.Hd.length;fd||d>=b.Db.length||(b.Db[d]=e[c]));if(h.Kf){d=a.w;b.u.ua!==d.l&&(e= b.u,b.u=this.xa.ql(d.l),b.u?(e.$h(b,!0),b.u.vi(b,!0),b.J(),b.u.Zj(0)):(b.u=e,f||this.Fe(b)));b.x=d.x;b.y=d.y;b.width=d.w;b.height=d.h;b.ke=d.zi;b.n=d.hasOwnProperty("a")?d.a:0;b.opacity=d.hasOwnProperty("o")?d.o:1;b.Dc=d.hasOwnProperty("hX")?d.hX:.5;b.Ec=d.hasOwnProperty("hY")?d.hY:.5;b.visible=d.hasOwnProperty("v")?d.v:!0;b.Ie=d.hasOwnProperty("ce")?d.ce:!0;b.Dj=d.hasOwnProperty("mts")?d.mts:-1;b.$b=d.hasOwnProperty("bm")?d.bm:0;b.Bi=jb(b.$b);this.N&&kb(b,b.$b,this.N);b.J();if(d.hasOwnProperty("fx"))for(f= 0,e=d.fx.length;fh||(b.tf[h]=d.fx[f].active,b.ab[h]=d.fx[f].params);b.ie()}if(l=a.behs)for(c in l)l.hasOwnProperty(c)&&(f=this.By(b,parseInt(c,10)),0>f||b.Y[f].Mb(l[c]));a.data&&b.Mb(a.data)};d.prototype.dr=function(b,a,f){window.resolveLocalFileSystemURL(cordova.file.applicationDirectory+"www/"+b,function(b){b.file(a,f)},f)};d.prototype.fr=function(b,a){this.dr("data.js",function(f){var c=new FileReader;c.onload=function(a){b(a.target.result)};c.onerror=a;c.readAsText(f)}, a)};var S=[],V=0;d.prototype.Po=function(){if(S.length&&!(8<=V)){V++;var b=S.shift();this.kx(b.filename,b.yA,b.Mx)}};d.prototype.er=function(b,a,f){var c=this;S.push({filename:b,yA:function(b){V--;c.Po();a(b)},Mx:function(b){V--;c.Po();f(b)}});this.Po()};d.prototype.kx=function(b,a,f){this.dr(b,function(b){var f=new FileReader;f.onload=function(b){a(b.target.result)};f.readAsArrayBuffer(b)},f)};d.prototype.ty=function(b,a,f){this.er(b,function(b){b=URL.createObjectURL(new Blob([b]));a(b)},f)};d.prototype.nz= function(b){return/^(?:[a-z]+:)?\/\//.test(b)||"data:"===b.substr(0,5)||"blob:"===b.substr(0,5)};d.prototype.ot=function(b,a){this.hj&&!this.nz(a)?this.ty(a,function(a){b.src=a},function(b){alert("Failed to load image: "+b)}):b.src=a};d.prototype.Am=function(b,a){"undefined"!==typeof b.imageSmoothingEnabled?b.imageSmoothingEnabled=a:(b.webkitImageSmoothingEnabled=a,b.mozImageSmoothingEnabled=a,b.msImageSmoothingEnabled=a)};Vb=function(b){return new d(document.getElementById(b))};Wb=function(b,a){return new d({dc:!0, width:b,height:a})};window.cr_createRuntime=Vb;window.cr_createDCRuntime=Wb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var b=document.createElement("screencanvas")||document.createElement("canvas");b.xi=!0;document.body.appendChild(b);b=new d(b);window.c2runtime=b;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth,window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);return b};window.createEjectaRuntime= function(){var b=new d(document.getElementById("canvas"));window.c2runtime=b;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return b}})();window.cr_getC2Runtime=function(){var d=document.getElementById("c2canvas");return d?d.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_getSnapshot=function(d,q){var n=window.cr_getC2Runtime();n&&n.gx(d,q)};window.cr_sizeCanvas=function(d,q){if(0!==d&&0!==q){var n=window.cr_getC2Runtime();n&&n.setSize(d,q)}}; window.cr_setSuspended=function(d){var q=window.cr_getC2Runtime();q&&q.setSuspended(d)}; (function(){function d(b,a){this.b=b;this.ng=null;this.scrollX=this.b.qb/2;this.scrollY=this.b.pb/2;this.scale=1;this.n=0;this.rh=!0;this.name=a[0];this.Mz=a[1];this.Lz=a[2];this.width=a[1];this.height=a[2];this.Vt=a[3];this.yt=a[4];this.ua=a[5];var c=a[6],e,d;this.ka=[];this.Xi=[];e=0;for(d=c.length;e=this.ka.length&&(f=this.ka.length-1);k.u=this.ka[f];-1===k.u.j.indexOf(k)&&k.u.j.push(k);k.u.eh=!0}if(!g)for(b=0,c=this.ka.length;bc?k.siblings.push(r.j[c]):r.wd&&(d=this.b.Cf(r.wd,k.u,!0,k.x,k.y,!0),this.b.Zb(),r.Zm(),k.siblings.push(d),p.push(d))); b=0;for(c=this.Ag.length;bthis.width-a&&(b=this.width-a);bthis.height-a&&(b=this.height-a);bE&&(E=0);0>I&&(I=0);N>W&&(N=W);H>S&&(H=S);0>L&&(L=0);0>K&&(K=0);X>W&&(X=W);ba>S&&(ba=S);w.left=E/W;w.top=1-I/S;w.right=N/W;w.bottom=1-H/S}else w.left=G.left=0,w.top=G.top=0,w.right=G.right=1,w.bottom=G.bottom=1;ea=c&&(b.Qj(d[0].ub)||0!==q||0!==ea||1!==c.opacity|| c.type.La.ws)||a&&!c&&1!==a.opacity;b.kt();if(ea){u[J]||(u[J]=b.dd(W,S,this.b.Za));if(u[J].eg!==W||u[J].dg!==S)b.deleteTexture(u[J]),u[J]=b.dd(W,S,this.b.Za);b.Pc(0);b.Gd(u[J]);R=ba-K;b.clearRect(L,S-K-R,X-L,R);c?c.Bc(b):(b.Zc(this.b.Eb),b.Vg(a.opacity),b.ye(),b.translate(-V,-z),b.je(),b.ve(E,H,N,H,N,I,E,I,w));G.left=G.top=0;G.right=G.bottom=1;c&&(v=w.top,w.top=w.bottom,w.bottom=v);J=1;F=0}b.Vg(1);q=d.length-1;var ya=b.jp(d[q].ub)||!a&&!c&&!this.b.ed;A=v=0;for(n=d.length;Ac||(a&&this.sd&&b.Nc&&b.Nc.right>=b.Nc.left&&(b.Na(),this.Xb.update(b,b.Nc,null),b.Nc.set(0,0,-1,-1)),c===this.j.length-1?this.j.pop():(Aa(this.j,c),this.Zj(c)),this.ee= !0)};n.prototype.vi=function(b,a){b.ke=this.j.length;this.j.push(b);a&&this.sd&&b.Nc&&b.J();this.ee=!0};n.prototype.Tz=function(b){this.j.unshift(b);this.Zj(0)};n.prototype.Ez=function(b,a,c){var e=b.qe();a=a.qe();Aa(this.j,e);ethis.Ra||c.top>this.Qa||(a.globalCompositeOperation=b.Bi,b.Ne(a))}};n.prototype.an=function(){this.Me=!0;var b=this.xb(0,0,!0,!0),a=this.xb(0,0,!1,!0);this.Me=!1;this.b.be&&(b=Math.round(b), a=Math.round(a));this.um(b,a,null)};n.prototype.um=function(b,a,c){var e=this.yd();this.Ia=b;this.Ja=a;this.Ra=b+1/e*this.b.W;this.Qa=a+1/e*this.b.V;this.Ia>this.Ra&&(b=this.Ia,this.Ia=this.Ra,this.Ra=b);this.Ja>this.Qa&&(b=this.Ja,this.Ja=this.Qa,this.Qa=b);b=this.Sb();0!==b&&(c&&(c.translate(this.b.W/2,this.b.V/2),c.rotate(-b),c.translate(this.b.W/-2,this.b.V/-2)),this.nf.set(this.Ia,this.Ja,this.Ra,this.Qa),this.nf.offset((this.Ia+this.Ra)/-2,(this.Ja+this.Qa)/-2),this.Ot.wt(this.nf,b),this.Ot.Mq(this.nf), this.nf.offset((this.Ia+this.Ra)/2,(this.Ja+this.Qa)/2),this.Ia=this.nf.left,this.Ja=this.nf.top,this.Ra=this.nf.right,this.Qa=this.nf.bottom)};n.prototype.Ef=function(b){if(this.xe=this.ml){this.b.Eb||(this.b.Eb=b.dd(this.b.W,this.b.V,this.b.Za));if(this.b.Eb.eg!==this.b.W||this.b.Eb.dg!==this.b.V)b.deleteTexture(this.b.Eb),this.b.Eb=b.dd(this.b.W,this.b.V,this.b.Za);b.Gd(this.b.Eb)}this.Me=!0;var a=this.xb(0,0,!0,!0),e=this.xb(0,0,!1,!0);this.Me=!1;this.b.be&&(a=Math.round(a),e=Math.round(e));this.um(a, e,null);a=this.yd();b.ye();b.scale(a,a);b.qp(-this.Sb());b.translate((this.Ia+this.Ra)/-2,(this.Ja+this.Qa)/-2);b.je();this.sd?(this.Qb.left=this.Xb.vc(this.Ia),this.Qb.top=this.Xb.wc(this.Ja),this.Qb.right=this.Xb.vc(this.Ra),this.Qb.bottom=this.Xb.wc(this.Qa),this.ee||!this.Qb.Hi(this.Jh)?(c(this.We),a=this.$n(),this.ee=!1,this.Jh.mh(this.Qb)):a=this.We):a=this.j;for(var d,g=null,e=a.length-1;0<=e;--e)d=a[e],d!==g&&(this.Ex(a[e],b),g=d);this.sd&&(this.We=a);this.he||(this.zn=this.b.mg++,b.Bm(this.zn), b.lt(1,1,1),b.ir(),b.bA())};n.prototype.Bc=function(b){var a=0,e=0;if(this.xe=this.ml||1!==this.opacity||0this.Ra||c.top>this.Qa||(a.Bm(b.mg),b.cu?this.Fx(b,a):(a.Pc(0),a.Vf(b.gc,b.cc),b.Bc(a)))}};n.prototype.Ex=function(b,a){if(b.visible&&0!==b.width&&0!==b.height){b.Na();var c=b.Wa;c.rightthis.Ra||c.top>this.Qa|| (b.mg=this.b.mg++,0===b.$b&&1===b.opacity&&b.gf&&b.Ef&&(a.Bm(b.mg),b.Ef(a)))}};n.prototype.Fx=function(b,a){var c=b.Aa[0].ub,e=b.Aa[0].index,d=this.yd();if(1!==b.Aa.length||a.jp(c)||a.Vz(c)||(b.n||b.u.Sb())&&a.Qj(c)||1!==b.opacity||b.type.La.ws)this.nb.np(a,this,b,this.xe?this.b.Eb:this.nb.Qi()),a.ye(),a.scale(d,d),a.qp(-this.Sb()),a.translate((this.Ia+this.Ra)/-2,(this.Ja+this.Qa)/-2),a.je();else{a.Pc(c);a.Vf(b.gc,b.cc);a.om(c)&&(this.b.za=!0);var g=0,r=0,f=0,l=0;a.Qj(c)&&(l=b.Wa,g=this.rc(l.left, l.top,!0,!0),r=this.rc(l.left,l.top,!1,!0),f=this.rc(l.right,l.bottom,!0,!0),l=this.rc(l.right,l.bottom,!1,!0),g=g/windowWidth,r=1-r/windowHeight,f=f/windowWidth,l=1-l/windowHeight);var p;b.Hb&&b.Hb.X?(p=b.Hb.X,c=1/p.width,p=1/p.height):(c=1/b.width,p=1/b.height);a.ci(this.xe?this.b.Eb:this.nb.Qi(),c,p,g,r,f,l,d,this.Sb(),this.Ia,this.Ja,(this.Ia+this.Ra)/2,(this.Ja+this.Qa)/2,this.b.mb.qa,b.ab[e]);b.Bc(a)}};n.prototype.xb=function(b,a,c,e){var d=this.b.devicePixelRatio;this.b.Fg&&(b*=d,a*=d);var d= this.b.Rs,g=this.b.Ss,d=(this.nb.scrollX-d)*this.Jc+d,g=(this.nb.scrollY-g)*this.Kc+g,r=d,f=g,l=1/this.yd(!e);e?(r-=this.b.W*l/2,f-=this.b.V*l/2):(r-=this.b.width*l/2,f-=this.b.height*l/2);r+=b*l;f+=a*l;a=this.Sb();0!==a&&(r-=d,f-=g,b=Math.cos(a),a=Math.sin(a),e=r*b-f*a,f=f*b+r*a,r=e+d,f+=g);return c?r:f};n.prototype.rc=function(b,a,c,e){var d=this.b.Rs,g=this.b.Ss,r=(this.nb.scrollX-d)*this.Jc+d,f=(this.nb.scrollY-g)*this.Kc+g,g=r,d=f,l=this.Sb();if(0!==l){b-=r;a-=f;var p=Math.cos(-l),l=Math.sin(-l), k=b*p-a*l;a=a*p+b*l;b=k+r;a+=f}r=1/this.yd(!e);e?(g-=this.b.W*r/2,d-=this.b.V*r/2):(g-=this.b.width*r/2,d-=this.b.height*r/2);g=(b-g)/r;d=(a-d)/r;b=this.b.devicePixelRatio;this.b.Fg&&!e&&(g/=b,d/=b);return c?g:d};n.prototype.tb=function(){var b,a,c,e={s:this.scale,a:this.n,vl:this.Ia,vt:this.Ja,vr:this.Ra,vb:this.Qa,v:this.visible,bc:this.Qd,t:this.he,px:this.Jc,py:this.Kc,o:this.opacity,zr:this.nc,fx:[],cg:this.Di,instances:[]};b=0;for(a=this.ca.length;bb[1].index&&(a=b[0],b[0]=b[1],b[1]=a):2=D.length&&(D.length=b.length+1);D[b.length]||(D[b.length]=[]);g=D[b.length];a=0;for(c=g.length;a=a.length&&(a.length=this.Pg+1),a[this.Pg]=b):this.data=b};h.prototype.vg=function(){var b=this.b.lr();return!this.parent||this.jj||!b||this.Bl?this.data:this.Pg>=b.length||"undefined"===typeof b[this.Pg]?this.B:b[this.Pg]};h.prototype.sb=function(){!this.parent||this.jj||this.Bl||this.ff(this.B)};Ub=h; t.prototype.toString=function(){return"include:"+this.Wi.toString()};t.prototype.fb=function(){this.Wi=this.b.Kn[this.iz];this.sheet.xr.add(this);this.Ha=n(this.Ha);for(var b=this.parent;b;)b.group&&b.Pk.push(this),b=b.parent;this.Xt()};t.prototype.sb=function(){this.parent&&this.b.Rj(this.b.M);this.Wi.fo||this.Wi.sb(!0);this.parent&&this.b.df(this.b.M)};t.prototype.Xt=function(){for(var b=this.parent;b;){if(b.group&&!b.uh){this.H=!1;return}b=b.parent}this.H=!0};dc=t;m.prototype.reset=function(b){this.Ib= b;this.td=this.ib=0;P(this.Gt);this.Hn=this.Jg=!1};m.prototype.Hr=function(){return this.Ib.Ap?!0:this.ib=this.type&&(this.first=new bc(c,a[1]),this.second=new bc(c,a[2]));if(e){var d,b;d=0;for(b=e.length;d=a||k<=-a)k%=a;0>k&&(k+=a);h.apply(D[k],e)};d.prototype.Tx=function(c){var a=this.Ye,e=this.bb,d=this.fa,b=this.Wd,h=this.Sd,k=this.Rb,m=this.Dd.hf,D=a.la(),x=D.Cc();if(!x.length)if(D.da.length)x=D.da;else{this.ai?c.fc(""):c.Oa(0);return}e[0]=c;c.Rg=a;c=q();n(d,e,c);b&&(b.get(c),c.Kb()&&(m=c.data,x=a.j));--p;d=x.length;if(m>=d||m<=-d)m%=d;0>m&&(m+=d);m=x[m];x=0;a.T&&(x=m.type.qh[a.Qe]);k.apply(m.Y[h+x],e)};d.prototype.ay=function(c){var a=this.Wd,d=this.Ye,k=this.du, b=this.Dd.hf,h=d.la(),n=h.Cc();if(!n.length)if(h.da.length)n=h.da;else{this.ai?c.fc(""):c.Oa(0);return}if(a){h=q();a.get(h);if(h.Kb()){b=h.data;n=d.j;0!==n.length&&(b%=n.length,0>b&&(b+=n.length));b=d.Yn(b);d=b.Db[k];la(d)?c.fc(d):c.D(d);--p;return}--p}a=n.length;if(b>=a||b<=-a)b%=a;0>b&&(b+=a);b=n[b];n=0;d.T&&(n=b.type.el[d.Qe]);d=b.Db[k+n];la(d)?c.fc(d):c.D(d)};d.prototype.by=function(c){c.type=ec.gh;c.data=this.value};d.prototype.Yx=function(c){c.type=ec.fh;c.data=this.value};d.prototype.my=function(c){c.type= ec.String;c.data=this.value};d.prototype.qy=function(c){this.first.get(c);c.Kb()&&(c.data=-c.data)};d.prototype.Nx=function(c){this.first.get(c);var a=q();this.second.get(a);c.Kb()&&a.Kb()&&(c.data+=a.data,a.zh()&&c.Nh());--p};d.prototype.ny=function(c){this.first.get(c);var a=q();this.second.get(a);c.Kb()&&a.Kb()&&(c.data-=a.data,a.zh()&&c.Nh());--p};d.prototype.gy=function(c){this.first.get(c);var a=q();this.second.get(a);c.Kb()&&a.Kb()&&(c.data*=a.data,a.zh()&&c.Nh());--p};d.prototype.Vx=function(c){this.first.get(c); var a=q();this.second.get(a);c.Kb()&&a.Kb()&&(c.data/=a.data,c.Nh());--p};d.prototype.fy=function(c){this.first.get(c);var a=q();this.second.get(a);c.Kb()&&a.Kb()&&(c.data%=a.data,a.zh()&&c.Nh());--p};d.prototype.ky=function(c){this.first.get(c);var a=q();this.second.get(a);c.Kb()&&a.Kb()&&(c.data=Math.pow(c.data,a.data),a.zh()&&c.Nh());--p};d.prototype.Ox=function(c){this.first.get(c);var a=q();this.second.get(a);a.Ch()||c.Ch()?this.Qx(c,a):this.Px(c,a);--p};d.prototype.Qx=function(c,a){c.Ch()&& a.Ch()?this.Sx(c,a):this.Rx(c,a)};d.prototype.Sx=function(c,a){c.data+=a.data};d.prototype.Rx=function(c,a){c.Ch()?c.data+=(Math.round(1E10*a.data)/1E10).toString():c.fc(c.data.toString()+a.data)};d.prototype.Px=function(c,a){c.Oa(c.data&&a.data?1:0)};d.prototype.jy=function(c){this.first.get(c);var a=q();this.second.get(a);c.Kb()&&a.Kb()&&(c.data||a.data?c.Oa(1):c.Oa(0));--p};d.prototype.Ux=function(c){this.first.get(c);c.data?this.second.get(c):this.Pm.get(c)};d.prototype.Wx=function(c){this.first.get(c); var a=q();this.second.get(a);c.Oa(c.data===a.data?1:0);--p};d.prototype.hy=function(c){this.first.get(c);var a=q();this.second.get(a);c.Oa(c.data!==a.data?1:0);--p};d.prototype.cy=function(c){this.first.get(c);var a=q();this.second.get(a);c.Oa(c.dataa.data?1:0);--p};d.prototype.$x=function(c){this.first.get(c); var a=q();this.second.get(a);c.Oa(c.data>=a.data?1:0);--p};d.prototype.Xx=function(c){var a=this.pg.vg();ka(a)?c.D(a):c.fc(a)};bc=d;k.prototype.zh=function(){return this.type===ec.fh};k.prototype.Kb=function(){return this.type===ec.gh||this.type===ec.fh};k.prototype.Ch=function(){return this.type===ec.String};k.prototype.Nh=function(){this.zh()||(this.Ch()&&(this.data=parseFloat(this.data)),this.type=ec.fh)};k.prototype.Oa=function(c){this.type=ec.gh;this.data=Math.floor(c)};k.prototype.D=function(c){this.type= ec.fh;this.data=c};k.prototype.fc=function(c){this.type=ec.String;this.data=c};k.prototype.sA=function(c){ka(c)?(this.type=ec.fh,this.data=c):la(c)?(this.type=ec.String,this.data=c.toString()):(this.type=ec.gh,this.data=0)};ac=k;ec={gh:0,fh:1,String:2}})();function U(d){this.b=d;this.ad=[]} U.prototype.tb=function(){var d={},q,n,k,c,p,g,a,e;d.waits=[];var v=d.waits,b;q=0;for(n=this.ad.length;q=c?d.O.CompareTime_executed=!0:!1}return fc(b,a,c)};d.prototype.Mv=function(a){var c=this.b.kb(),b=c.Ib,d=c.Hr(),c=this.b.ct();if(d)for(d=0;d=b+g)return c.O.Every_lastTime=b+g,d>=c.O.Every_lastTime+.04&&(c.O.Every_lastTime=d),c.O.Every_seconds=a,!0;dg&&(c=g);a.D(c)};n.prototype.kg=function(a){a.D(this.b.kg)};n.prototype.ah=function(a){a.D(this.b.ah)};n.prototype.time= function(a){a.D(this.b.mb.qa)};n.prototype.$g=function(a){a.Oa(this.b.$g)};n.prototype.Wl=function(a){a.Oa(this.b.Wl)};n.prototype.On=function(a){a.Oa(this.b.On)};n.prototype.cx=function(a,c,b,d,g){a.D(Sa(c,b,d,g))};n.prototype.n=function(a,c,b,d,g){a.D(Ha(Ma(c,b,d,g)))};n.prototype.left=function(a,c,b){a.fc(la(c)?c.substr(0,b):"")};n.prototype.right=function(a,c,b){a.fc(la(c)?c.substr(c.length-b):"")};n.prototype.replace=function(a,c,b,d){la(c)&&la(b)&&la(d)?a.fc(c.replace(new RegExp(fb(b),"gi"), d)):a.fc(la(c)?c:"")};n.prototype.trim=function(a,c){a.fc(la(c)?c.trim():"")};n.prototype.Uw=function(a){var c=C(Math.random()*(arguments.length-1));a.sA(arguments[c+1])};n.prototype.An=function(a){a.D(this.b.An/1E3)};n.prototype.Lh=function(a){a.D(this.b.Lh)};k.ja=new n;k.eA=function(){var c,d,b,h,p,m,k=this.b.kb();c=0;for(b=this.ad.length;cthis.b.mb.qa)continue;k.Ib=h.Ii;k.td=h.td;k.ib=0;for(d in h.$c)h.$c.hasOwnProperty(d)&& (p=this.b.M[parseInt(d,10)].la(),m=h.$c[d],p.ta=m.jt,Ca(p.j,m.Bg),p=m,P(p.Bg),a.push(p));h.Ii.dA();this.b.yn(h.Ha);h.Wq=!0}d=c=0;for(b=this.ad.length;ca.Ra||b.top>a.Qa)},b.ZA=function(){this.Na();var a=this.Wa,b=this.b.xa;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},b.iB=function(a,b,c){var d=this.la(), e=d.Cc();if(!e.length)return!1;var l=e[0],g=l,h=Sa(l.x,l.y,b,c),u,p,k;u=1;for(p=e.length;uh)h=k,g=l;d.Oj(g);return!0},h.rw=function(a){this.x!==a&&(this.x=a,this.J())},h.sw=function(a){this.y!==a&&(this.y=a,this.J())},h.dw=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.J()},h.DB=function(a,b){var c=a.Jy(this);if(c){var d;c.Oi?(d=c.Oi(b,!0),c=c.Oi(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,this.y=c,this.J()}},h.bB= function(a){0!==a&&(this.x+=Math.cos(this.n)*a,this.y+=Math.sin(this.n)*a,this.J())},h.aB=function(a,b){0!==b&&(this.x+=Math.cos(Q(a))*b,this.y+=Math.sin(Q(a))*b,this.J())},t.kn=function(a){a.D(this.x)},t.Ak=function(a){a.D(this.y)},t.kg=function(a){a.D(this.b.tg(this))});p&&(b.SA=function(a,b){return fc(this.width,a,b)},b.PA=function(a,b){return fc(this.height,a,b)},h.qw=function(a){this.width!==a&&(this.width=a,this.J())},h.yB=function(a){this.height!==a&&(this.height=a,this.J())},h.EB=function(a, b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.J()},t.PB=function(a){a.D(this.width)},t.Gu=function(a){a.D(this.height)},t.KA=function(a){this.Na();a.D(this.Wa.left)},t.MA=function(a){this.Na();a.D(this.Wa.top)},t.LA=function(a){this.Na();a.D(this.Wa.right)},t.JA=function(a){this.Na();a.D(this.Wa.bottom)});g&&(b.ku=function(a,b){return Na(this.n,Q(b))<=Q(a)},b.Lu=function(a){return Qa(this.n,Q(a))},b.Ku=function(a,b){var c=La(a),d=La(b),e=Ja(this.n);return Qa(d,c)?Qa(e,c)&& !Qa(e,d):!(!Qa(e,c)&&Qa(e,d))},h.Qv=function(a){a=Q(Ia(a));isNaN(a)||this.n===a||(this.n=a,this.J())},h.qB=function(a){0===a||isNaN(a)||(this.n+=Q(a),this.n=Ja(this.n),this.J())},h.rB=function(a){0===a||isNaN(a)||(this.n-=Q(a),this.n=Ja(this.n),this.J())},h.sB=function(a,b){var c=Pa(this.n,Q(b),Q(a));isNaN(c)||this.n===c||(this.n=c,this.J())},h.tB=function(a,b,c){a=Pa(this.n,Math.atan2(c-this.y,b-this.x),Q(a));isNaN(a)||this.n===a||(this.n=a,this.J())},h.HB=function(a,b){var c=Math.atan2(b-this.y, a-this.x);isNaN(c)||this.n===c||(this.n=c,this.J())},t.ju=function(a){a.D(Ka(this.n))});k||(b.qu=function(a,b,c){return fc(this.Db[a],b,c)},b.XA=function(a){return this.Db[a]},b.jB=function(a,b){var c=this.la(),d=c.Cc();if(!d.length)return!1;var e=d[0],l=e,g=e.Db[b],h,u,p;h=1;for(u=d.length;hg)g=p,l=e;c.Oj(l);return!0},b.hB=function(a){var b,c,d,e,l;if(this.b.sg().xl){l=this.la();if(l.ta)for(l.ta=!1,P(l.j),P(l.da),d=this.j,b=0,c=d.length;ba?a=0:1e.u.index||d.u.index===e.u.index&&d.qe()>e.qe())e=d}else if(d.u.indexc)){var d=1===a;this.tf[c]!==d&&(this.tf[c]=d,this.ie(),this.b.za=!0)}}},h.xB=function(a,b,c){if(this.b.K){var d=this.type.Xn(a);0>d||(a=this.type.ca[d],d=this.ab[d],b=Math.floor(b),0>b||b>=d.length||(1===this.b.K.Ny(a.ub,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.H&&(this.b.za=!0))))}})};Lb=function(){this.wn=this.qn=!0;this.type.Ek=!0;this.b.za=!0;var d,n,k=this.rn;d=0;for(n= k.length;dk;case 5:return d>=k;default:return!1}}})(); var qc={waterbg:{src:"varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nuniform lowp sampler2D samplerBack;\nuniform mediump vec2 destStart;\nuniform mediump vec2 destEnd;\nprecision mediump float;\nuniform float seconds;\nuniform float pixelWidth;\nuniform float pixelHeight;\nconst float PI = 3.1415926535897932;\nuniform float speed;\nuniform float speed_x;\nuniform float speed_y;\nuniform float intensity;\nconst int steps = 8;\nuniform float frequency;\nuniform float angle; // better when a prime\nuniform float delta;\nuniform float intence;\nuniform float emboss;\nfloat col(vec2 coord)\n{\nfloat delta_theta = 2.0 * PI / angle;\nfloat col = 0.0;\nfloat theta = 0.0;\nfor (int i = 0; i < steps; i++)\n{\nvec2 adjc = coord;\ntheta = delta_theta*float(i);\nadjc.x += cos(theta)*seconds*speed + seconds * speed_x;\nadjc.y -= sin(theta)*seconds*speed - seconds * speed_y;\ncol = col + cos( (adjc.x*cos(theta) - adjc.y*sin(theta))*frequency)*intensity;\n}\nreturn cos(col);\n}\nvoid main(void)\n{\nvec2 p = vTex, c1 = p, c2 = p;\nfloat cc1 = col(c1);\nc2.x += (1.0 / pixelWidth) / delta;\nfloat dx = emboss*(cc1-col(c2))/delta;\nc2.x = p.x;\nc2.y += (1.0 / pixelHeight) / delta;\nfloat dy = emboss*(cc1-col(c2))/delta;\nc1.x += dx;\nc1.y = -(c1.y+dy);\nfloat alpha = 1.+dot(dx,dy)*intence;\nc1.y = -c1.y;\nlowp vec4 front = texture2D(samplerFront,c1) * alpha;\nlowp vec4 result;\nif (front.a == 0.0)\nresult = front + texture2D(samplerBack, mix(destStart, destEnd, vTex)) * (1.0 - front.a);\nelse\nresult = front + texture2D(samplerBack, mix(destStart, destEnd, c1)) * (1.0 - front.a);\ngl_FragColor = result;\n}",bl:25, cl:25,Cn:!0,Ed:!1,nn:!0,fa:[["speed",0,1],["speed_x",0,1],["speed_y",0,1],["intensity",0,0],["frequency",0,0],["angle",0,0],["delta",0,0],["intence",0,0],["emboss",0,1]]}};function uc(d){this.b=d} (function(){function d(a){a=Math.pow(10,a/20);isFinite(a)||(a=0);0>a&&(a=0);1a&&(a=0);1a&&(a=.01);this.mm.gain.value=a;this.lm.gain.value=Math.pow(1/a,.6)*b};r.prototype.shape=function(a, b,c){var d=1.05*c*b-b;c=0>a?-1:1;a=0>a?-a:a;b=af;++f)e=f/32768,e=this.shape(e,c,d),this.Vk[32768+f]=e,this.Vk[32768-f-1]=-e};r.prototype.vd=function(a){this.ba.disconnect();this.ba.connect(a);this.aa.disconnect();this.aa.connect(a)};r.prototype.remove=function(){this.wa.disconnect();this.mm.disconnect();this.bn.disconnect();this.lm.disconnect();this.ba.disconnect(); this.aa.disconnect()};r.prototype.fd=function(){return this.wa};f.prototype.vd=function(a){this.ya.disconnect();this.ya.connect(a)};f.prototype.remove=function(){this.ya.disconnect()};f.prototype.fd=function(){return this.ya};l.prototype.Pa=function(){this.ya.getFloatFrequencyData(this.xy);this.ya.getByteTimeDomainData(this.zt);for(var a=this.ya.fftSize,b=0,c=this.Mj=0,d=0;bd&&(d=-d),this.Mjb&&(c=b);return c};u.prototype.Eg=function(){return!this.Wc&&!this.pe&&!this.wb&&!this.xg()};u.prototype.tA=function(){return!this.pe&&!this.wb&&!this.xg()};u.prototype.rA=function(a){this.volume=a;this.au()};u.prototype.au=function(){var a=this.volume*X;isFinite(a)||(a=0);switch(this.ra){case 0:"undefined"!==typeof this.q.volume&&this.q.volume!==a&&(this.q.volume=a);break;case 1:1===this.buffer.ra? this.Cb.gain.value=a*this.Ph:"undefined"!==typeof this.q.volume&&this.q.volume!==a&&(this.q.volume=a)}};u.prototype.$k=function(a){switch(this.ra){case 0:this.q.muted!==!!a&&(this.q.muted=!!a);break;case 1:1===this.buffer.ra?(this.Ph=a?0:1,this.Cb.gain.value=X*this.volume*this.Ph):this.q.muted!==!!a&&(this.q.muted=!!a)}};u.prototype.nA=function(){this.Ah=!0;this.$k(this.Ah||this.ij)};u.prototype.pt=function(a){this.ij=!!a;this.$k(this.Ah||this.ij)};u.prototype.$m=function(){var a=this.playbackRate; this.wh&&(a*=R.ah);switch(this.ra){case 0:this.q.playbackRate!==a&&(this.q.playbackRate=a);break;case 1:1===this.buffer.ra?this.q.playbackRate.value!==a&&(this.q.playbackRate.value=a):this.q.playbackRate!==a&&(this.q.playbackRate=a)}};u.prototype.pA=function(b){switch(this.ra){case 0:b?this.Eg()?(this.od=!0,this.q.pause()):this.od=!1:this.od&&(this.q.play(),this.od=!1);break;case 1:b?this.Eg()?(this.od=!0,1===this.buffer.ra?(this.Oc=this.Zn(!0),this.re&&(this.Oc=this.Oc%this.Hf()),a(this.q)):this.q.pause()): this.od=!1:this.od&&(1===this.buffer.ra?(this.q=w.createBufferSource(),this.q.buffer=this.buffer.Ba,this.q.connect(this.Cb),this.q.onended=this.cp,this.Bk=this.q,this.q.loop=this.re,this.Cb.gain.value=X*this.volume*this.Ph,this.$m(),this.startTime=(this.wh?R.mb.qa:R.qf.qa)-this.Oc/(this.playbackRate||.001),g(this.q,this.Oc,this.Hf())):this.q.play(),this.od=!1);break;case 2:b?this.Eg()?(this.q.pause(),this.od=!0):this.od=!1:this.od&&(this.od=!1,this.q.play())}};T.S=function(a){function b(){if(!ea&& w.createBuffer){var a=w.createBuffer(1,220,22050),c=w.createBufferSource();c.buffer=a;c.connect(w.destination);p(c)}}this.type=a;R=this.b=a.b;W=this;this.Ic=null;this.rj=-600;this.b.hj&&(ab=!0);!(this.b.Dh||this.b.yl&&(this.b.Zi||this.b.zl))||this.b.$i||this.b.Ya||this.b.oo||ab||(bb=!0);w=null;"undefined"!==typeof AudioContext?(z=1,w=new AudioContext):"undefined"!==typeof webkitAudioContext&&(z=1,w=new webkitAudioContext);this.b.Dh&&w&&(w.close&&w.close(),"undefined"!==typeof AudioContext?w=new AudioContext: "undefined"!==typeof webkitAudioContext&&(w=new webkitAudioContext));bb?document.addEventListener("touchend",function(){!vb&&w&&(b(),vb=!0);var a,c,d;if(bb){if(!N)for(a=0,c=cb.length;a"!==b&&(a.im=b,a.Ko=d,a.Tp=e),null;l=new u(a,b);E.push(l);return l};var pa=[];B.prototype.zk=function(a){return mb(S,a)};B.prototype.Lv=function(){var a,b;a=0;for(b=G.length;a",b,!1)}};J.prototype.jn=function(a){M(a);var b;a=0;for(b=pa.length;ac;++c)if(this.Gh[c]){this.Gh[c]=!1;this.of=c;this.b.trigger(wc.prototype.k.gq,this);var d=this.b.trigger(wc.prototype.k.lq,this),g=this.b.trigger(wc.prototype.k.kq,this);if(d||g)this.pk[c]=!0}};n.tb=function(){return{triggerKey:this.of}};n.Mb=function(c){this.of=c.triggerKey};d.prototype.Qu=function(c){return this.Gh[c]};d.prototype.jq=function(c){return c===this.of};d.prototype.fq=function(){return!0}; d.prototype.gq=function(){return!0};d.prototype.lq=function(c){return c===this.of};d.prototype.sv=function(c){return c===this.of};d.prototype.kq=function(c){return c===this.of};q.k=new d;q.A=new function(){};q.ja=new function(){}})();function xc(d){this.b=d} (function(){function d(){}function q(){}var n=xc.prototype;n.Z=function(c){this.La=c;this.b=c.b};n.Z.prototype.P=function(){};n.S=function(c){this.type=c;this.b=c.b;this.bg=Array(4);this.Pt=this.Um=this.bh=this.Qf=this.Pf=0;this.tl=!1};var k=n.S.prototype;k.P=function(){var c=this;if(!this.b.Ya){jQuery(document).mousemove(function(a){c.Zo(a)});jQuery(document).mousedown(function(a){c.Yo(a)});jQuery(document).mouseup(function(a){c.$o(a)});jQuery(document).dblclick(function(a){c.Iz(a)});var d=function(a){c.Kz(a)}; document.addEventListener("mousewheel",d,!1);document.addEventListener("DOMMouseScroll",d,!1)}};var c={left:0,top:0};k.Zo=function(d){var g=this.b.Ya?c:jQuery(this.b.canvas).offset();this.Pf=d.pageX-g.left;this.Qf=d.pageY-g.top};k.vs=function(){return 0(c.wheelDelta?c.wheelDelta:c.detail?-c.detail: 0)?0:1;this.tl=!1;this.b.eb=!0;this.b.trigger(xc.prototype.k.Hv,this);this.b.eb=!1;this.tl&&nb(c)&&c.preventDefault()};k.Rf=function(){var c,d;c=0;for(d=this.bg.length;cthis.R&&(this.R=0);this.R>=this.Ua.frames.length&&(this.R=this.Ua.frames.length-1);var a=this.Ua.frames[this.R];this.Ca.ak(a.jm);this.Dc=a.Dc;this.Ec=a.Ec;this.hg=this.Ua.speed;this.Df=this.Ua.pp;1===this.type.Sc.length&&1===this.type.Sc[0].frames.length||0===this.hg||(this.b.mk(this),this.gj=!0);this.nd?this.le.reset():this.le=new $a;this.Re=this.le.qa;this.wf=!0;this.Ge=0;this.vf=!0;this.lh=this.Gq="";this.Rq=0;this.xn=-1;this.type.Ll();var b,c,d,e,f,l,g,a=0;for(b=this.type.Sc.length;a< b;a++)for(e=this.type.Sc[a],c=0,d=e.frames.length;cthis.R&&(this.R=0);this.R>=this.Ua.frames.length&&(this.R=this.Ua.frames.length-1);this.hg=a.cas;this.Re=a.fs;this.Ge=a.ar;this.le.reset();this.le.qa=a.at;this.wf=a.hasOwnProperty("ap")?a.ap:!0;this.vf=a.hasOwnProperty("af")?a.af:!0;a.hasOwnProperty("rt")?this.Df=a.rt:this.Df=this.Ua.pp;this.Hb=this.Ua.frames[this.R];this.Sk=this.Hb.Va;this.Ca.ak(this.Hb.jm);this.Dc=this.Hb.Dc;this.Ec=this.Hb.Ec};t.pn= function(a){this.R=a?0:this.Ua.frames.length-1;this.wf=!1;this.Gq=this.Ua.name;this.ko=!0;this.b.trigger(Y.prototype.k.dq,this);this.b.trigger(Y.prototype.k.cq,this);this.ko=!1;this.Ge=0};t.xi=function(){return this.le.qa};t.Pa=function(){this.le.add(this.b.tg(this));this.lh.length&&this.Xq();0<=this.xn&&this.hx();var a=this.le.qa,b=this.Ua,c=b.frames[this.R],d=c.duration/this.hg;this.wf&&a>=this.Re+d&&(this.vf?this.R++:this.R--,this.Re+=d,this.R>=b.frames.length&&(b.Ts?(this.vf=!1,this.R=b.frames.length- 2):b.loop?this.R=this.Df:(this.Ge++,this.Ge>=b.op?this.pn(!1):this.R=this.Df)),0>this.R&&(b.Ts?(this.R=1,this.vf=!0,b.loop||(this.Ge++,this.Ge>=b.op&&this.pn(!0))):b.loop?this.R=this.Df:(this.Ge++,this.Ge>=b.op?this.pn(!0):this.R=this.Df)),0>this.R?this.R=0:this.R>=b.frames.length&&(this.R=b.frames.length-1),a>this.Re+b.frames[this.R].duration/this.hg&&(this.Re=a),a=b.frames[this.R],this.hh(c,a),this.b.za=!0)};t.kr=function(a){var b,c,d;b=0;for(c=this.type.Sc.length;bthis.R&&(this.R=0),this.R>=this.Ua.frames.length&&(this.R=this.Ua.frames.length-1),1===this.Rq&&(this.R=0),this.wf=!0,this.Re=this.le.qa,this.vf=!0,this.hh(a,this.Ua.frames[this.R]),this.b.za=!0)};t.hx=function(){var a= this.Ua.frames[this.R],b=this.R;this.R=C(this.xn);0>this.R&&(this.R=0);this.R>=this.Ua.frames.length&&(this.R=this.Ua.frames.length-1);b!==this.R&&(this.hh(a,this.Ua.frames[this.R]),this.Re=this.le.qa,this.b.za=!0);this.xn=-1};t.hh=function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;c!=e&&(this.width*=e/c);d!=f&&(this.height*=f/d);this.Dc=b.Dc;this.Ec=b.Ec;this.Ca.ak(b.jm);this.J();this.Hb=b;this.Sk=b.Va;c=0;for(d=this.Y.length;ce||e>=d.length)return b?this.x:this.y;var f=(d[e][1]-c.Dc)*this.width,d=d[e][2],d=(d-c.Ec)*this.height,c=Math.cos(this.n);e=Math.sin(this.n);var l=f*c-d*e,d=d*c+f*e,f=l+this.x,d=d+this.y;return b?f:d};var m=[],D=-2,x=[];q.prototype.cv=function(a){if(!a)return!1;var b=this.b,d=b.sg(),e=d.type,f=null;d.O.collmemory?f=d.O.collmemory: (f={},d.O.collmemory=f);d.O.spriteCreatedDestroyCallback||(d.O.spriteCreatedDestroyCallback=!0,b.Ck(function(a){var b=d.O.collmemory;a=a.uid;var c,e;for(c in b)b.hasOwnProperty(c)&&(e=b[c],e[0]===a||e[1]===a)&&(n(b[c]),delete b[c])}));var l=e.la(),h=a.la(),l=l.Cc(),r,k,m,q,t,y,v,O=this.b.$g,E=O-1,L=b.kb().Ib;for(k=0;kthis.width?-1:1);a=b.height*a*(0>this.height?-1:1);if(this.width!==c||this.height!==a)this.width=c,this.height=a,this.J()};v.A=new a;e.prototype.Hu=function(a,b){a.D(this.Oi(b,!0))};e.prototype.Iu=function(a,b){a.D(this.Oi(b,!1))};v.ja=new e})();function yc(d){this.b=d} (function(){var d=yc.prototype;d.Z=function(d){this.La=d;this.b=d.b};var q=d.Z.prototype;q.P=function(){this.T||(this.X=new Image,this.X.Bn=this.Nm,this.b.Up(this.X,this.Mm),this.Va=this.pattern=null)};q.Yl=function(){this.T||(this.Va=null)};q.$l=function(){if(!this.T&&this.j.length){this.Va||(this.Va=this.b.K.Kl(this.X,!0,this.b.Za,this.Ep));var d,k;d=0;for(k=this.j.length;da&&(a+=this.X.width);0>e&&(e+=this.X.height);d.translate(k,c);d.rotate(this.n);d.translate(a,e);d.fillRect(p-a,g-e,this.width,this.height);d.restore()};q.Ef=function(d){this.Bc(d)}; q.Bc=function(d){d.Zc(this.Va);d.Vg(this.opacity);var k=this.Uj;k.right=this.width/this.X.width;k.bottom=this.height/this.X.height;var c=this.cd;if(this.b.be){var p=Math.round(this.x)-this.x,g=Math.round(this.y)-this.y;d.ve(c.lc+p,c.mc+g,c.Qc+p,c.Rc+g,c.zc+p,c.Ac+g,c.xc+p,c.yc+g,k)}else d.ve(c.lc,c.mc,c.Qc,c.Rc,c.zc,c.Ac,c.xc,c.yc,k)};d.k=new function(){};d.A=new function(){};d.ja=new function(){}})();function zc(d){this.b=d} (function(){function d(){this.Rm=this.id=-1;this.Hq=this.ph=this.tk=this.Vi=!1;this.Fa=new va(0,0,0,0)}function q(a){1E4>t.length&&t.push(a)}function n(){this.id=-1;this.Fa=new va(0,0,0,0);this.cf=null}function k(a){1E4>m.length&&m.push(a)}function c(a,b,c){var d;return D.length?(d=D.pop(),d.c=a,d.x=b,d.y=c,d.left=d.x*d.c.yb*d.c.kc,d.top=d.y*d.c.Gb*d.c.jc,d.clear(),d.Tj=!1,d):new p(a,b,c)}function p(a,b,c){this.c=a;this.x=b;this.y=c;this.left=this.x*this.c.yb*this.c.kc;this.top=this.y*this.c.Gb*this.c.jc; this.Ce=[];this.Wb=[];this.oc=[];this.Tj=!1;var d,e;a=0;for(b=this.c.Gb;aa||a>=this.ge.length)&&this.ge[a]){var h=this.ge[a].kl;a=new gb(this.ge[a].cf);a.fg(b,c,0);g&&a.bx();d&&a.Dz(b/2);e&&a.vy(c/2);h[d?1:0][e?1:0][g?1:0]=a}};a.Py=function(a){if(-1===a)return null;var c=a&h;return 0>c||c>=this.ge.length||!this.ge[c]?null:this.ge[c].kl[a&e?1:0][a&v?1:0][a&b?1:0]};a.Pn=function(){var a,b,c=this.b.K;if(c)for(a=0,b=this.ig.length;a=a||0>=b)){this.Pn();var p=this.X.width,k=this.X.height,m;for(m=d;m+b<=k;m+=b+g)for(d=c;d+a<=p;d+=a+e)this.ig.push(this.wu(d,m,a,b,h));this.En=!0}};a.wu=function(a,b,c,d,e){if(this.b.K)return this.dn(a,b,c,d,!1,!1,!1,e);var g=[[[null,null],[null,null]],[[null,null],[null,null]]];g[0][0][0]=this.dn(a,b,c,d,!1,!1,!1,e);return{kl:g,x:a,y:b,GA:c,ez:d}};a.$p=function(a,b,c,d,e){if(0>a||a>=this.ig.length)return null;a=this.ig[a];var g=a.kl;b=b?1:0;c=c?1:0;d=d?1:0;var h=g[b][c][d]; if(h)return h;h=this.dn(a.x,a.y,a.GA,a.ez,0!==b,0!==c,0!==d,e);return g[b][c][d]=h};a.dn=function(a,b,c,d,e,g,h,p){var k=c,m=d;this.b.K&&!p&&(ma(k)||(k=na(k)),ma(m)||(m=na(m)));var n=document.createElement("canvas");n.width=k;n.height=m;var q=n.getContext("2d");if(this.b.Ta)return e?g?(h?(q.rotate(Math.PI/2),q.scale(-1,1)):q.scale(-1,-1),q.translate(-k,-m)):h?(q.rotate(Math.PI/2),q.translate(0,-m)):(q.scale(-1,1),q.translate(-k,0)):g?h?(q.rotate(-Math.PI/2),q.translate(-k,0)):(q.scale(1,-1),q.translate(0, -m)):h&&(q.scale(-1,1),q.rotate(Math.PI/2)),q.drawImage(this.X,a,b,c,d,0,0,k,m),p?n:this.b.Ta.createPattern(n,"repeat");q.drawImage(this.X,a,b,c,d,0,0,k,m);a=this.b.K.dd(k,m,this.b.Za,!1,!p);this.b.K.FA(n,a);return a};a.Yl=function(){this.T||this.Pn()};a.$l=function(){};a.Ll=function(){};a.Ym=function(){this.T||this.j.length||this.Pn()};a.nm=function(){};g.S=function(a){this.type=a;this.b=a.b};var a=g.S.prototype,e=-2147483648,v=1073741824,b=536870912,h=536870911,t=[],m=[],D=[];p.prototype.clear= function(){var a,b,c,d,e;this.Ce.length=this.c.Gb;a=0;for(b=this.Ce.length;a=a||0>=c)){var g,p,x,u,A,M;g=0;for(p=this.Wb.length;gthis.c.yb&&(D=this.c.yb);B>this.c.Gb&&(B=this.c.Gb);var J=this.c.Uf,F=null;g=0;for(p=B;gu.Fa.bottom)break;if(x.Fa.right>u.Fa.right||x.Fa.left>u.Fa.left)break; x.id===u.id&&x.Fa.left===u.Fa.left&&x.Fa.right===u.Fa.right&&(q(this.Wb[a]),this.Wb.splice(a,1),--p,u.Fa.bottom+=c,--a)}p=this.oc.length;for(g=0;gA.bottom)break;if(u.right>A.right||u.left>A.left)break;x.cf||u.left!==A.left||u.right!==A.right||(k(this.oc[a]),this.oc.splice(a,1),--p,A.bottom+=c,--a)}this.Tj=!0}}};p.prototype.yp=function(a,b,c){this.Ce[b][a]!==c&&(this.Ce[b][a]=c,this.Tj=!1,this.c.Gk= !0,this.c.Nj=!0,this.c.b.za=!0)};a.P=function(){var a,b,c;this.visible=0===this.C[0];this.kc=this.C[1];this.jc=this.C[2];this.Fp=this.C[3];this.Hp=this.C[4];this.Gp=this.C[5];this.Ip=this.C[6];this.Uf=0!==this.C[7];this.Cd=this.Nt;this.$d=this.Mt;this.Fl=this.width;this.El=this.height;var d=this.kc,e=this.jc;0===d&&(d=1);0===e&&(e=1);this.yb=Math.ceil(this.b.qb/d);this.Gb=Math.ceil(this.b.pb/e);if(!this.type.Kt)for(this.type.Kt=!0,a=0,b=this.type.ge.length;athis.$d&&(this.$d=d,a=Math.ceil(this.$d/this.Gb)),b>this.Cd&&(this.Cd=b,e=Math.ceil(this.Cd/this.yb)),this.zm(),this.Nj=!0,this.b.za=!0);for(var g,b=0;b< a;++b)if(g=this.uc[b])for(d=g.length;da||0>b)return null;var c=C(b/this.Gb);if(c>=this.uc.length)return null;var c=this.uc[c],d=C(a/this.yb);return d>=c.length?null:c[d]};a.vn=function(a,b){if(0>a||0>b||b>=this.uc.length)return null;var c=this.uc[b];return a>=c.length?null:c[a]};a.qt=function(a){var c=[];a=a.split(",");var d,g,h,p,k;d=0;for(g=a.length;d=this.Cd||0>=this.$d)return a;var c=1,d=this.pr(0,0),g,p,k,m,n,q,t,x;m=C(this.width/this.kc); p=C(this.height/this.jc);for(g=0;ga||0>b||a>=this.Cd||b>=this.$d)return-1;var c=this.un(a,b); return c?c.Ce[b%this.Gb][a%this.yb]:-1};a.yp=function(a,b,c){a=Math.floor(a);b=Math.floor(b);if(0>a||0>b||a>=this.Cd||b>=this.$d)return-1;var d=this.un(a,b);if(!d)return-1;d.yp(a%this.yb,b%this.Gb,c)};a.fu=function(a){return Math.floor((a-this.x)/(this.yb*this.kc))};a.gu=function(a){return Math.floor((a-this.y)/(this.Gb*this.jc))};a.Cy=function(a,b){var c=this.gu(a.top),d=this.fu(a.right),e=this.gu(a.bottom),g,h,p;for(g=this.fu(a.left);g<=d;++g)for(h=c;h<=e;++h)if(p=this.vn(g,h))p.Aj(),Da(b,p.oc)}; a.xi=function(a){var b,c,d,e,g,h;b=0;for(c=this.uc.length;bD.length&&D.push(g)}P(e)}P(this.uc)};a.tb=function(){this.Oo();return{w:C(this.width/this.kc),h:C(this.height/this.jc),d:this.Qy()}}; a.Mb=function(a){this.Cd=a.w;this.$d=a.h;this.Oo(!0);this.qt(a.d);this.Nj=!0;this.zm()};a.Ne=function(a){if(!(0>=this.kc||0>=this.jc)){this.type.No(this.kc,this.jc,this.Fp,this.Hp,this.Gp,this.Ip,this.Uf);if(this.width!==this.Fl||this.height!==this.El)this.Nj=!0,this.zm(),this.Mo(),this.Fl=this.width,this.El=this.height;a.globalAlpha=this.opacity;var b=this.u,c=b.Ia,d=b.Ja,e=b.Ra,b=b.Qa,g=this.x,h=this.y,p=this.Uf,k;this.b.be&&(g=Math.round(g),h=Math.round(h));var m=this.yb*this.kc,n=this.Gb*this.jc, q=Math.floor((c-g)/m),m=Math.floor((e-g)/m),t=Math.floor((d-h)/n),n=Math.floor((b-h)/n),x=g%this.kc,v=h%this.jc;this.Uf&&(v=x=0);if(0!==x||0!==v)a.save(),a.translate(x,v),g-=x,h-=v,c-=x,d-=v,e-=x,b-=v;for(var D,V,z,w,G,E,L,I,K;q<=m;++q)for(D=t;D<=n;++D)if(V=this.vn(q,D))for(V.Aj(),z=0,w=V.Wb.length;ze||Ib||k=this.kc||0>=this.jc)){this.type.No(this.kc,this.jc,this.Fp,this.Hp,this.Gp,this.Ip,this.Uf);if(this.width!==this.Fl||this.height!==this.El)this.Nj=!0,this.zm(),this.Mo(),this.Fl=this.width,this.El=this.height;a.Vg(this.opacity);var b=this.type.ig,c=this.u,d=c.Ia,e=c.Ja,g=c.Ra,c=c.Qa,h=this.x,p=this.y,k;this.b.be&&(h=Math.round(h),p=Math.round(p));var m= this.yb*this.kc,n=this.Gb*this.jc,q=Math.floor((g-h)/m),t=Math.floor((e-p)/n),n=Math.floor((c-p)/n),v,D,S,V,z,w,G,E,L,I,K,N,X,H,ba,ea,ya;for(ba=Math.floor((d-h)/m);ba<=q;++ba)for(ea=t;ea<=n;++ea)if(ya=this.vn(ba,ea))for(ya.Aj(),m=0,v=ya.Wb.length;mg||zc||kSa(this.Jm,this.Km,this.x,this.y)&&(this.Vm=!0,a.De=this.fk,a.hi=this.id,a.th=b,a.b.trigger(Ac.prototype.k.pv,a),a.Ke=this.x,a.Le=this.y,a.b.trigger(Ac.prototype.k.qv,a),a.th=0)};var t=-1E3,m=-1E3,D=-1E4;n.prototype.qs=function(a,b){if(!this.Vm){var c=Wa();333>=c-this.Cp&&!this.ok&&15>Sa(this.Jm,this.Km,this.x,this.y)&&(a.De=this.fk,a.hi=this.id,a.th=b,666>=c-D&&25>Sa(t,m,this.x,this.y)?(a.b.trigger(Ac.prototype.k.hv,a),a.Ke= this.x,a.Le=this.y,a.b.trigger(Ac.prototype.k.jv,a),m=t=-1E3,D=-1E4):(a.b.trigger(Ac.prototype.k.Ev,a),a.Ke=this.x,a.Le=this.y,a.b.trigger(Ac.prototype.k.Fv,a),t=this.x,m=this.y,D=c),a.th=0)}};g.P=function(){this.vz=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.th=this.hi=this.De=this.Le=this.Ke=this.Cq=this.Bq=this.Aq=this.Iw=this.Hw=this.Gw=this.fm=this.em=this.dm=0;this.DA=0!==this.C[0];var a=0d-c.time||c.update(d,b.pageX-e.left,b.pageY-e.top, b.width||0,b.height||0,b.pressure||0)}}};g.Gs=function(b){if(b.pointerType!==b.MSPOINTER_TYPE_MOUSE&&"mouse"!==b.pointerType){b.preventDefault&&nb(b)&&b.preventDefault();var c=this.b.Ya?a:jQuery(this.b.canvas).offset(),d=b.pageX-c.left,c=b.pageY-c.top;Wa();this.De=this.touches.length;this.hi=b.pointerId;this.touches.push(q(d,c,b.pointerId,this.De));this.b.eb=!0;this.b.trigger(Ac.prototype.k.rq,this);this.b.trigger(Ac.prototype.k.xq,this);this.Ke=d;this.Le=c;this.b.trigger(Ac.prototype.k.wq,this); this.b.eb=!1}};g.Zl=function(a,b){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&nb(a)&&a.preventDefault();var c=this.Mi(a.pointerId);this.De=0<=c?this.touches[c].fk:-1;this.hi=0<=c?this.touches[c].id:-1;this.b.eb=!0;this.b.trigger(Ac.prototype.k.qq,this);this.b.trigger(Ac.prototype.k.vq,this);0<=c&&(b||this.touches[c].qs(this,c),100>h.length&&h.push(this.touches[c]),this.touches.splice(c,1));this.b.eb=!1}};g.Is=function(b){b.preventDefault&&b.preventDefault(); var c=Wa(),d,e,g,h;d=0;for(e=b.changedTouches.length;dc-h.time||h.update(c,g.pageX-p.left,g.pageY-p.top,2*(g.fC||g.kC||g.ZB||g.bC||0),2*(g.gC||g.lC||g.$B||g.cC||0),g.TB||g.jC||g.YB||g.aC||0)}};g.Js=function(b){b.preventDefault&&nb(b)&&b.preventDefault();var c=this.b.Ya?a:jQuery(this.b.canvas).offset();Wa();this.b.eb=!0;var d,e,g,h;d=0;for(e=b.changedTouches.length;dh.length&&h.push(this.touches[e]),this.touches.splice(e,1));this.b.eb=!1};g.xi=function(){return this.b.Vc&&0===this.dm&&0!==b?90*b:this.dm};g.WB=function(){return this.b.Vc&&0===this.em&&0!==v?90*v:this.em};g.XB=function(){return this.b.Vc&&0===this.fm&&0!==e?90*e:this.fm};g.Yo=function(a){this.Js({changedTouches:[{pageX:a.pageX, pageY:a.pageY,identifier:0}]});this.Ro=!0};g.Zo=function(a){this.Ro&&this.Is({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};g.$o=function(a){a.preventDefault&&this.b.sl&&!this.b.Cg&&a.preventDefault();this.b.sl=!0;this.bp({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.Ro=!1};g.lk=function(){var a,b,c,d=Wa();a=0;for(b=this.touches.length;ac||c>=this.touches.length)a.D(0);else{var d,e,g,h,p;ja(b)?(d=this.b.Se(0),e=d.scale,g=d.nc,h=d.Jc,p=d.n,d.scale=1,d.nc=1,d.Jc=1,d.n=0,a.D(d.xb(this.touches[c].x,this.touches[c].y,!0)),d.scale=e,d.nc=g,d.Jc=h,d.n=p):(d=ka(b)?this.b.Se(b):this.b.Pi(b))?a.D(d.xb(this.touches[c].x,this.touches[c].y,!0)):a.D(0)}};c.prototype.Ak=function(a,b){var c=this.th;if(0>c||c>=this.touches.length)a.D(0);else{var d,e,g,h,p;ja(b)?(d=this.b.Se(0),e=d.scale, g=d.nc,h=d.Kc,p=d.n,d.scale=1,d.nc=1,d.Kc=1,d.n=0,a.D(d.xb(this.touches[c].x,this.touches[c].y,!1)),d.scale=e,d.nc=g,d.Kc=h,d.n=p):(d=ka(b)?this.b.Se(b):this.b.Pi(b))?a.D(d.xb(this.touches[c].x,this.touches[c].y,!1)):a.D(0)}};p.ja=new c})();function Bc(d){this.b=d} (function(){function d(){}var q=Bc.prototype;q.Z=function(a){this.La=a;this.b=a.b};q.Z.prototype.P=function(){};q.S=function(a){this.type=a;this.b=a.b};var n=q.S.prototype,k="",c="undefined"!==typeof window.is_scirra_arcade;c&&(k="arcade"+window.scirra_arcade_id);var p=!1;try{localStorage.getItem("test"),p=!0}catch(g){p=!1}n.P=function(){p||ha("[Construct 2] Webstorage plugin: local storage is not supported on this platform.")};q.k=new function(){};q.A=new function(){};d.prototype.Yp=function(a){if(p){var d= {},g,b,h;g=0;for(b=localStorage.length;gc;++c)b[a][c]=0;return b[a]}function q(a){var b;if(!h[a])for(h[a]=Array(20),b=0;20>b;++b)h[a][b]=0;return h[a]}function n(a,b){return b?4<=a?-1:a+16:16<=a?-1:a}function k(b){v[b.gamepad.index]=b.gamepad;a.trigger(Cc.prototype.k.nv,e)}function c(b){a.trigger(Cc.prototype.k.ov,e);v[b.gamepad.index]=null}function p(){}var g=Cc.prototype;g.Z=function(a){this.La=a;this.b=a.b};g.Z.prototype.P=function(){};var a=null,e=null,v=Array(16),b= Array(16),h=Array(16),t="",m="",D=null,x={windows:{}};x.windows.firefox={};var r=[0,1,2,3,4,5,8,9,10,11],f=[0,1,[7,6],2,3,[14,15],[12,13]];x.windows.firefox.xbox360=function(a,b){return b?a>=f.length?-1:ka(f[a])?f[a]+16:f[a]:a>=r.length?-1:r[a]};var l=[2,0,1,3,4,6,5,7,8,9],O=[0,1,2,3,[14,15],[12,13]];x.windows.firefox.logitechdualaction=function(a,b){return b?a>=O.length?-1:ka(O[a])?O[a]+16:O[a]:a>=l.length?-1:l[a]};g.S=function(b){this.type=b;a=this.b=b.b;e=this};var y=g.S.prototype;y.P=function(){this.Zw= this.C[0];this.nj=0;var a=navigator.userAgent;t="windows";/mac/i.test(a)&&(t="mac");D=x[t];m="chrome";/firefox/i.test(a)&&(m="firefox");D&&(D=D[m]);window.addEventListener("webkitgamepadconnected",k,!1);window.addEventListener("webkitgamepaddisconnected",c,!1);window.addEventListener("MozGamepadConnected",k,!1);window.addEventListener("MozGamepadDisconnected",c,!1);window.addEventListener("gamepadconnected",k,!1);window.addEventListener("gamepaddisconnected",c,!1);this.b.mk(this);this.ri=[]};y.Pa= function(){this.ri.length=0;var a=null,c=!1;navigator.getGamepads?a=navigator.getGamepads():navigator.webkitGetGamepads?a=navigator.webkitGetGamepads():navigator.mozGetGamepads?a=navigator.mozGetGamepads():navigator.msGetGamepads?a=navigator.msGetGamepads():this.b.Lr&&window.cr_getGamepads?(a=window.cr_getGamepads(),c=!0):a=navigator.gamepads||navigator.webkitGamepads||navigator.MozGamepads||v;if(a){var e,f,g,p,k,l,m;e=0;for(f=a.length;ek;++k)p[k]=g[k];c?g=n:D?(g="",p=r.id.toLowerCase(),-1l&&(t[l]=100*m,50<=t[l]&&50>x[l]&&(this.nj=l));g=0;for(p=r.axes.length;gl&&(t[l]=100*m):(t[l[0]]=0,t[l[1]]=0,0>=m?t[l[0]]=Math.abs(100* m):t[l[1]]=Math.abs(100*m));this.ri.push(r)}else r=e,b[r]=null,h[r]=null}for(;20>e;++e)a=e,b[a]=null,h[a]=null}};y.tb=function(){return{lastButton:this.nj}};y.Mb=function(a){this.nj=a.lastButton};p.prototype.nv=function(){return!0};p.prototype.ov=function(){return!0};p.prototype.bq=function(a,b){a=Math.floor(a);if(0>a||a>=this.ri.length)return!1;var c=d(a);if(!c)return!1;if(c=50<=c[b])this.nj=b;return c};p.prototype.av=function(a,b){a=Math.floor(a);if(0>a||a>=this.ri.length)return!1;var c=d(a),e= q(a);if(!c||!e)return!1;if(c=50<=c[b]&&50>e[b])this.nj=b;return c};p.prototype.ou=function(a,b,c,e){a=Math.floor(a);b=Math.floor(b);if(0>a||a>=this.ri.length)return!1;if(a=d(a)){var f=a[b+16],g=0,g=0===b%2?a[b+16+1]:a[b+16-1];Math.sqrt(f*f+g*g)<=this.Zw&&(f=0);return fc(f,c,e)}};g.k=new p;g.A=new function(){};g.ja=new function(){}})();function Dc(d){this.b=d} (function(){function d(){}function q(){}var n=Dc.prototype;n.Z=function(c){this.behavior=c;this.b=c.b};n.Z.prototype.P=function(){};n.S=function(c,d){this.type=c;this.behavior=c.behavior;this.c=d;this.b=c.b};var k=n.S.prototype;k.P=function(){var c=this.C[0];this.Ld=this.C[1];this.Uc=this.C[2];this.Pw=0!==this.C[3];this.vp=0!==this.C[4];this.F=Math.cos(this.c.n)*c;this.I=Math.sin(this.c.n)*c;this.Lg=this.c.x;this.Mg=this.c.y;this.jd=this.c.n;this.Tm=0;this.enabled=0!==this.C[5]};k.tb=function(){return{acc:this.Ld, g:this.Uc,dx:this.F,dy:this.I,lx:this.Lg,ly:this.Mg,lka:this.jd,t:this.Tm,e:this.enabled}};k.Mb=function(c){this.Ld=c.acc;this.Uc=c.g;this.F=c.dx;this.I=c.dy;this.Lg=c.lx;this.Mg=c.ly;this.jd=c.lka;this.Tm=c.t;this.enabled=c.e};k.Pa=function(){if(this.enabled){var c=this.b.tg(this.c),d,g;this.c.n!==this.jd&&(this.vp&&(d=Sa(0,0,this.F,this.I),this.F=Math.cos(this.c.n)*d,this.I=Math.sin(this.c.n)*d),this.jd=this.c.n);0!==this.Ld&&(d=Sa(0,0,this.F,this.I),g=0===this.F&&0===this.I?this.c.n:Ma(0,0,this.F, this.I),d+=this.Ld*c,0>d&&(d=0),this.F=Math.cos(g)*d,this.I=Math.sin(g)*d);0!==this.Uc&&(this.I+=this.Uc*c);this.Lg=this.c.x;this.Mg=this.c.y;if(0!==this.F||0!==this.I)if(this.c.x+=this.F*c,this.c.y+=this.I*c,this.Tm+=Sa(0,0,this.F*c,this.I*c),this.vp&&(this.c.n=Ma(0,0,this.F,this.I),this.c.J(),this.jd=this.c.n),this.c.J(),this.Pw&&(d=this.b.Pb(this.c)))this.b.Zh(this.c,d),d=Sa(0,0,this.F,this.I),g=this.b.Rw(this.c,this.Lg,this.Mg),this.F=Math.cos(g)*d,this.I=Math.sin(g)*d,this.c.x+=this.F*c,this.c.y+= this.I*c,this.c.J(),this.vp&&(this.jd=this.c.n=g,this.c.J()),this.b.Fd(this.c,this.F/d,this.I/d,Math.max(2.5*d*c,30))||this.b.dt(this.c,100)}};n.k=new function(){};d.prototype.fw=function(c){var d=Ma(0,0,this.F,this.I);this.F=Math.cos(d)*c;this.I=Math.sin(d)*c};d.prototype.Rv=function(c){c=Q(c);var d=Sa(0,0,this.F,this.I);this.F=Math.cos(c)*d;this.I=Math.sin(c)*d};d.prototype.ih=function(c){this.enabled=1===c};n.A=new d;q.prototype.zq=function(c){var d=Sa(0,0,this.F,this.I),d=lb(d);c.D(d)};n.ja=new q})(); function Ec(d){this.b=d} (function(){function d(){}function q(){}var n=Ec.prototype;n.Z=function(c){this.behavior=c;this.b=c.b};n.Z.prototype.P=function(){};n.S=function(c,d){this.type=c;this.behavior=c.behavior;this.c=d;this.b=c.b};var k=n.S.prototype;k.P=function(){this.lf=this.Ae=this.fi=this.Xl=this.cm=0};k.tb=function(){return{ontime:this.cm,offtime:this.Xl,stage:this.fi,stagetimeleft:this.Ae,timeleft:this.lf}};k.Mb=function(c){this.cm=c.ontime;this.Xl=c.offtime;this.fi=c.stage;this.Ae=c.stagetimeleft;this.lf=c.timeleft}; k.Pa=function(){if(!(0>=this.lf)){var c=this.b.tg(this.c);this.lf-=c;0>=this.lf?(this.lf=0,this.c.visible=!0,this.b.za=!0,this.b.trigger(Ec.prototype.k.lv,this.c)):(this.Ae-=c,0>=this.Ae&&(0===this.fi?(this.c.visible=!1,this.fi=1,this.Ae+=this.Xl):(this.c.visible=!0,this.fi=0,this.Ae+=this.cm),this.b.za=!0))}};d.prototype.Nu=function(){return 0 this.bf||4===this.mode&&pthis.Uc&&(this.Ab*=-1,this.Bb*=-1,this.Uc=Math.abs(this.Uc))};c.P=function(){this.Xe=this.C[0];this.Ld=this.C[1];this.oh=this.C[2];this.mj=this.C[3];this.Sn=this.Uc=this.C[4];this.Qg=this.C[5];this.In=0!==this.C[6];this.xo=this.C[7]/1E3;this.$w=1===this.C[8];this.enabled=0!==this.C[9];this.pi=!1;this.qi=this.b.kf(this.c);this.Fo=-1;this.Zg=0;this.sh=Q(90); this.$t();var c=this;this.$w&&!this.b.Ya&&(jQuery(document).keydown(function(d){c.Wo(d)}),jQuery(document).keyup(function(d){c.Xo(d)}));this.nd||(this.Cj=function(d){c.Ij(d)});this.b.Ck(this.Cj);this.c.O.isPlatformBehavior=!0};c.tb=function(){return{ii:this.wl,lfx:this.Gg,lfy:this.Hg,lfo:this.Gc?this.Gc.uid:-1,am:this.Pd,en:this.enabled,fall:this.qg,ft:this.jl,dx:this.F,dy:this.I,ms:this.Xe,acc:this.Ld,dec:this.oh,js:this.mj,g:this.Uc,g1:this.Sn,mf:this.Qg,wof:this.pi,woj:this.qi?this.qi.uid:-1,ga:this.sh, edj:this.In,cdj:this.yi,dj:this.Fi,sus:this.xo}};c.Mb=function(c){this.wl=c.ii;this.Gg=c.lfx;this.Hg=c.lfy;this.Eo=c.lfo;this.Pd=c.am;this.enabled=c.en;this.qg=c.fall;this.jl=c.ft;this.F=c.dx;this.I=c.dy;this.Xe=c.ms;this.Ld=c.acc;this.oh=c.dec;this.mj=c.js;this.Uc=c.g;this.Sn=c.g1;this.Qg=c.mf;this.pi=c.wof;this.Fo=c.woj;this.sh=c.ga;this.In=c.edj;this.yi=c.cdj;this.Fi=c.dj;this.xo=c.sus;this.dk=this.Gm=this.Fm=this.Eh=this.Fh=this.Xj=this.qj=!1;this.Zg=0;this.$t()};c.Nd=function(){-1===this.Eo? this.Gc=null:this.Gc=this.b.ug(this.Eo);-1===this.Fo?this.qi=null:this.qi=this.b.ug(this.Fo)};c.Ij=function(c){this.Gc==c&&(this.Gc=null)};c.Sg=function(){this.Gc=null;this.b.gt(this.Cj)};c.Wo=function(c){switch(c.which){case 38:c.preventDefault();this.Fh=!0;break;case 37:c.preventDefault();this.qj=!0;break;case 39:c.preventDefault(),this.Xj=!0}};c.Xo=function(c){switch(c.which){case 38:c.preventDefault();this.Eh=this.Fh=!1;break;case 37:c.preventDefault();this.qj=!1;break;case 39:c.preventDefault(), this.Xj=!1}};c.Rf=function(){this.Fh=this.Xj=this.qj=!1};c.xi=function(){return 0>this.Uc?-1:1};c.Ir=function(){var c=null,d=null,a,e;a=this.c.x;e=this.c.y;this.c.x+=this.Ab;this.c.y+=this.Bb;this.c.J();if(this.Gc&&this.b.ic(this.c,this.Gc))return this.c.x=a,this.c.y=e,this.c.J(),this.Gc;(c=this.b.Pb(this.c))||0!==this.qg||(d=this.b.kf(this.c,!0));this.c.x=a;this.c.y=e;this.c.J();if(c){if(this.b.ic(this.c,c))return null;this.ll=!1;return c}if(d&&d.length){e=c=0;for(a=d.length;cthis.Qg&&(this.I=this.Qg)),r&&(this.Eh=!0));this.pi=!!f;x==e&&(0>this.F?(this.F+=this.oh*c,0this.F&&(this.F=0)));x&&!e&&(this.F=0this.F?this.F+(this.Ld+this.oh)*c:this.F+this.Ld*c);this.F>this.Xe?this.F=this.Xe:this.F<-this.Xe&&(this.F=-this.Xe);x=!1;0!==this.F&&(m=this.c.x,q=this.c.y,d=this.F*c*this.Tg,a=this.F*c*this.Ug,this.c.x+= this.Tg*(1this.F?1:-1),this.Ug*(0>this.F?1: -1),d,!1)?!f||k||this.ll||(m=this.c.x,q=this.c.y,this.c.x+=this.Ab,this.c.y+=this.Bb,this.b.Pb(this.c)?this.b.Fd(this.c,-this.Ab,-this.Bb,3,!1)||(this.c.x=m,this.c.y=q,this.c.J()):(this.c.x=m,this.c.y=q,this.c.J())):(this.c.x=m,this.c.y=q,this.c.J()),k||(this.F=0)):!b&&!r&&Math.abs(this.I)this.I?1:-1),this.Bb*(0>this.I?1:-1),d,k,a)?(this.Gc=a,this.Gg=a.x,this.Hg=a.y,(this.ll=k)&&(x=!0),this.I=0):(this.c.x=m,this.c.y=q,this.c.J(),this.pi=!0,k||(this.I=0)))}3!==this.Pd&&0this.I};d.prototype.Mu=function(){return 0this.Xe&&(this.Xe=0)};q.prototype.$v=function(c){this.Qg=c;0>this.Qg&&(this.Qg=0)};q.prototype.uw=function(c){switch(c){case 0:this.Fm=!0;break;case 1:this.Gm=!0;break;case 2:this.dk=!0}};q.prototype.kw=function(c){this.F=c};q.prototype.lw=function(c){this.I=c};q.prototype.ih=function(c){this.enabled!==(1===c)&&(this.enabled=1===c,this.enabled||(this.Gc=null))};k.A=new q;n.prototype.zq=function(c){c.D(Math.sqrt(this.F*this.F+this.I*this.I))};n.prototype.Bw=function(c){c.D(this.F)};n.prototype.Cw= function(c){c.D(this.I)};k.ja=new n})();function Kc(d){this.b=d} (function(){function d(){}function q(){}function n(){}var k=Kc.prototype;k.Z=function(a){this.behavior=a;this.b=a.b};k.Z.prototype.P=function(){};k.S=function(a,c){this.type=a;this.behavior=a.behavior;this.c=c;this.b=a.b;this.G=0};var c=k.S.prototype,p=2*Math.PI,g=Math.PI/2,a=3*Math.PI/2;c.P=function(){this.H=1===this.C[0];this.Bj=this.C[1];this.Wp=this.C[2];this.$e=this.C[3];this.$e+=Math.random()*this.C[4];0===this.$e?this.G=0:(this.G=this.C[5]/this.$e*p,this.G+=Math.random()*this.C[6]/this.$e* p);this.sc=this.C[7];this.sc+=Math.random()*this.C[8];this.we=this.zg=this.va=0;this.init()};c.tb=function(){return{i:this.G,a:this.H,mv:this.Bj,w:this.Wp,p:this.$e,mag:this.sc,iv:this.va,iv2:this.zg,r:this.we,lkv:this.Lb,lkv2:this.oj}};c.Mb=function(a){this.G=a.i;this.H=a.a;this.Bj=a.mv;this.Wp=a.w;this.$e=a.p;this.sc=a.mag;this.va=a.iv;this.zg=a.iv2||0;this.we=a.r;this.Lb=a.lkv;this.oj=a.lkv2||0};c.init=function(){switch(this.Bj){case 0:this.va=this.c.x;break;case 1:this.va=this.c.y;break;case 2:this.va= this.c.width;this.we=this.c.height/this.c.width;break;case 3:this.va=this.c.width;break;case 4:this.va=this.c.height;break;case 5:this.va=this.c.n;this.sc=Q(this.sc);break;case 6:this.va=this.c.opacity;break;case 7:this.va=0;break;case 8:this.va=this.c.x,this.zg=this.c.y}this.Lb=this.va;this.oj=this.zg};c.Ee=function(c){c=c%p;switch(this.Wp){case 0:return Math.sin(c);case 1:return c<=g?c/g:c<=a?1-2*(c-g)/Math.PI:(c-a)/g-1;case 2:return 2*c/p-1;case 3:return-2*c/p+1;case 4:return cthis.c.opacity?this.c.opacity=0:1d.right||0>d.bottom||d.left>n.width||d.top>n.height)&&this.b.Fe(this.c)}})();function tc(d){this.b=d} (function(){function d(){}var q=tc.prototype;q.Z=function(d){this.behavior=d;this.b=d.b};q.Z.prototype.P=function(){};q.S=function(d,c){this.type=d;this.behavior=d.behavior;this.c=c;this.b=d.b};var n=q.S.prototype;n.P=function(){this.c.O.jumpthruEnabled=0!==this.C[0]};n.Pa=function(){};q.k=new function(){};d.prototype.ih=function(d){this.c.O.jumpthruEnabled=!!d};q.A=new d})();function Mc(d){this.b=d} (function(){function d(c,d){return(c/=d)<1/2.75?7.5625*c*c+0:c<2/2.75?1*(7.5625*(c-=1.5/2.75)*c+.75)+0:c<2.5/2.75?1*(7.5625*(c-=2.25/2.75)*c+.9375)+0:1*(7.5625*(c-=2.625/2.75)*c+.984375)+0}var q=Mc.prototype;q.Z=function(c){this.behavior=c;this.b=c.b};q.Z.prototype.P=function(){};q.S=function(c,d){this.type=c;this.behavior=c.behavior;this.c=d;this.b=c.b;this.G=0};var n=q.S.prototype;n.xi=function(c){1=c&&(gc[this.group]=c)};n.rr=function(){""!= this.group&&("undefined"===typeof hc&&(hc={},gc={}),"undefined"===typeof hc[this.group]&&(hc[this.group]=[],gc[this.group]=-1),-1==hc[this.group].indexOf(this)&&hc[this.group].push(this))};n.Tf=function(){this.rd=this.c.width;this.qd=this.c.height;this.ji=this.c.n;this.Tt=this.c.opacity;this.Zf=this.c.x;this.$f=this.c.y;this.Xm=this.value};n.P=function(){this.H=1===this.C[0];this.L=this.C[1];this.Gi=this.C[2];this.B=this.C[3];this.target=this.C[4];this.duration=this.C[5];this.dh=this.C[6];this.U= this.C[7];this.value=this.C[8];this.ac=this.C[9];this.Nn=1===this.C[10];this.group=this.C[11];this.tc=null;this.Lc=0;5==this.U&&(this.Lc=1);this.rr();this.Dg=!1;this.ea=this.c.x;this.lb=this.c.y;this.ha=parseFloat(this.target.split(",")[0]);this.gb=parseFloat(this.target.split(",")[1]);this.Tf();this.ki=this.Yb=this.Ga=this.hb=this.ma=0;this.we=this.c.height/this.c.width;this.tm=this.reverse=!1;this.Vd=this.Ud=!0;this.loop=!1;this.Sa=this.Da=0;this.Ao=this.U;this.Hc=this.Lb=this.ma;this.kd=this.hb; this.Nn&&this.init();""==this.B&&(this.B="current");this.Gj=this.Th=this.Hj=this.Uh=this.Lj=this.Wh=this.Kj=this.Vh=!1;this.H&&this.init()};n.init=function(){this.Vh=!1;""===this.B&&(this.B="current");""===this.target&&(this.target="current");var c="current"===this.B,d="current"===this.target,g="OBJ"===this.target;"OBJ"===this.target&&null!=this.tc&&(0==this.L?this.target=1==this.ac?this.tc.x-this.c.x+","+(this.tc.y-this.c.y):this.tc.x+","+this.tc.y:1==this.L||2==this.L||3==this.L||7==this.L?this.target= 1==this.ac?(2==this.L?1:this.tc.width)+","+(3==this.L?1:this.tc.height):(2==this.L?1:this.tc.width/this.rd)+","+(3==this.L?1:this.tc.height/this.qd):4==this.L?this.target=1==this.ac?Ha(this.tc.n-this.c.n)+"":Ha(this.tc.n)+"":5==this.L&&(this.target=1==this.ac?100*(this.tc.opacity-this.c.opacity)+"":100*this.tc.opacity+""));if(0==this.L)d&&(this.target=this.c.x+","+this.c.y),c?this.B=1==this.ac?this.c.x+","+this.c.y:this.Zf+","+this.$f:this.reverse||1==this.U||(this.c.x=parseFloat(this.B.split(",")[0]), this.c.y=parseFloat(this.B.split(",")[1])),1==this.ac?(this.loop&&(this.c.x=this.Zf,this.c.y=this.$f),this.ea=this.c.x,this.lb=this.c.y,this.reverse?(this.ha=-parseFloat(this.target.split(",")[0]),this.gb=-parseFloat(this.target.split(",")[1])):(this.ha=parseFloat(this.target.split(",")[0]),this.gb=parseFloat(this.target.split(",")[1])),this.ma=this.ea,this.hb=this.lb,this.Ga=this.ma+this.ha,this.Yb=this.hb+this.gb):(this.reverse?(this.c.x=parseFloat(this.target.split(",")[0]),this.c.y=parseFloat(this.target.split(",")[1]), this.ha=this.Zf,this.gb=this.$f):(this.c.x=this.Zf,this.c.y=this.$f,this.ha=parseFloat(this.target.split(",")[0]),this.gb=parseFloat(this.target.split(",")[1])),this.ea=this.c.x,this.lb=this.c.y,this.ma=this.ea,this.hb=this.lb,this.Ga=this.ha,this.Yb=this.gb,-6==this.U&&(this.Ga=this.Zf,this.Yb=this.$f));else if(1==this.L||2==this.L||3==this.L){d&&(this.target="1,1");"current"==this.B&&(this.B="1,1");this.B=""+this.B;this.target=""+this.target;2==this.L?(-1==this.B.indexOf(",")&&(this.B=parseFloat(this.B)+ ",1"),-1==this.target.indexOf(",")&&(this.target=parseFloat(this.target)+",1")):3==this.L?(-1==this.B.indexOf(",")&&(this.B="1,"+parseFloat(this.B)),-1==this.target.indexOf(",")&&(this.target="1,"+parseFloat(this.target))):(-1==this.B.indexOf(",")&&(this.B=parseFloat(this.B)+","+parseFloat(this.B)),-1==this.target.indexOf(",")&&(this.target=parseFloat(this.target)+","+parseFloat(this.target)));var a=parseFloat(this.B.split(",")[0]),e=parseFloat(this.B.split(",")[1]);this.Ud=!0;var k=parseFloat(this.target.split(",")[0]); if(0==k||isNaN(k))this.Ud=!1;3==this.L&&(this.Ud=!1);this.Vd=!0;var b=parseFloat(this.target.split(",")[1]);if(0==b||isNaN(b))this.Vd=!1;2==this.L&&(this.Vd=!1);1==this.ac?(this.loop&&(this.c.width=this.rd,this.c.height=this.qd),c||(this.reverse?(this.c.width=this.c.width*k,this.c.height=this.c.height*b):(this.c.width=this.c.width*a,this.c.height=this.c.height*e)),this.ea=this.c.width,this.lb=this.c.height,this.ma=this.ea,this.hb=this.lb,this.reverse?(this.ha=this.ea*a/k,this.gb=this.lb*e/b):(this.ha= this.ea*k,this.gb=this.lb*b)):(c||(this.reverse?(this.c.width=this.rd*k,this.c.height=this.qd*b):(this.c.width=this.rd*a,this.c.height=this.qd*e)),this.ea=this.c.width,this.lb=this.c.height,this.ma=this.ea,this.hb=this.lb,this.reverse?(this.ha=this.rd*a,this.gb=this.qd*e):(this.ha=this.rd*k,this.gb=this.qd*b));this.Ga=this.ha;this.Yb=this.gb;-6==this.U&&(this.Ga=this.rd*a,this.Yb=this.qd*e)}else if(4==this.L)d&&(this.target=Ha(this.c.n)),"current"==this.B||this.reverse||1==this.U||(this.c.n=Q(parseFloat(this.B.split(",")[0]))), 1==this.ac?(this.loop&&(this.c.n=this.ji),this.ea=this.c.n,this.reverse?this.ha=this.c.n-Q(parseFloat(this.target.split(",")[0])):this.ha=this.c.n+Q(parseFloat(this.target.split(",")[0]))):this.reverse?(this.c.n=Q(parseFloat(this.target.split(",")[0])),this.ea=this.c.n,this.ha=this.ji):(this.c.n=this.ji,this.ea=this.c.n,this.ha=Q(parseFloat(this.target.split(",")[0]))),this.ma=this.ea,this.Ga=Ha(this.ha),-6==this.U&&(this.Ga=Ha(this.ji)),this.ki=Q(this.Ga);else if(5==this.L)"current"==this.B&&(this.B= this.c.opacity),d&&(this.target=""+this.c.opacity),c||this.reverse||1==this.U||(this.c.opacity=parseFloat(this.B.split(",")[0])/100),1==this.ac?(this.loop&&(this.c.opacity=this.Tt),this.ma=this.ea=this.c.opacity,this.ha=this.reverse?-parseFloat(this.target.split(",")[0])/100:parseFloat(this.target.split(",")[0])/100,this.Ga=this.ma+this.ha):(this.ea=this.c.opacity,this.reverse?(this.ma=parseFloat(this.target.split(",")[0])/100,this.ha=parseFloat(this.B.split(",")[0])/100):(this.ma=this.ea,this.ha= parseFloat(this.target.split(",")[0])/100),this.Ga=this.ha),-6==this.U&&(this.Ga=this.Tt);else if(6==this.L)isNaN(this.value)&&(this.value=0),"current"==this.B&&(this.B=""+this.value),d&&(this.target=""+this.value),c||this.reverse||1==this.U||(this.value=parseFloat(this.B.split(",")[0])),1==this.ac?(this.loop&&(this.value=this.Xm),c||(this.value=this.reverse?parseFloat(this.target.split(",")[0]):parseFloat(this.B.split(",")[0])),this.ea=this.value,this.reverse?this.ha=this.ea-parseFloat(this.target.split(",")[0]): this.ha=this.ea+parseFloat(this.target.split(",")[0]),this.ma=this.ea,this.Ga=this.ha):(c||(this.value=this.reverse?parseFloat(this.target.split(",")[0]):parseFloat(this.B.split(",")[0])),this.ea=this.value,this.ha=this.reverse?parseFloat(this.B.split(",")[0]):parseFloat(this.target.split(",")[0]),this.ma=this.ea,this.Ga=this.ha),-6==this.U&&(this.Ga=this.Xm);else if(7==this.L){d&&(this.target=this.c.width+","+this.c.height);"current"==this.B||this.reverse||1==this.U||(this.c.width=parseFloat(this.B.split(",")[0]), this.c.height=parseFloat(this.B.split(",")[1]));this.Ud=!0;k=parseFloat(this.target.split(",")[0]);if(0>k||isNaN(k))this.Ud=!1;this.Vd=!0;b=parseFloat(this.target.split(",")[1]);if(0>b||isNaN(b))this.Vd=!1;1==this.ac?(this.loop&&(this.c.width=this.rd,this.c.height=this.qd),this.ea=this.c.width,this.lb=this.c.height,this.reverse?(this.ha=this.ea-parseFloat(this.target.split(",")[0]),this.gb=this.lb-parseFloat(this.target.split(",")[1])):(this.ha=this.ea+parseFloat(this.target.split(",")[0]),this.gb= this.lb+parseFloat(this.target.split(",")[1]))):(c||(this.reverse?(this.c.width=parseFloat(this.target.split(",")[0]),this.c.height=parseFloat(this.target.split(",")[1])):(this.c.width=this.rd,this.c.height=this.qd)),this.ea=this.c.width,this.lb=this.c.height,this.reverse?(this.ha=this.rd,this.gb=this.qd):(this.ha=parseFloat(this.target.split(",")[0]),this.gb=parseFloat(this.target.split(",")[1])));this.ma=this.ea;this.hb=this.lb;this.Ga=this.ha;this.Yb=this.gb;-6==this.U&&(this.Ga=this.rd,this.Yb= this.qd)}this.Hc=this.Lb=this.ma;this.kd=this.hb;this.Da=parseFloat(this.dh.split(",")[0]);this.Sa=parseFloat(this.dh.split(",")[1]);if(0>this.Da||isNaN(this.Da))this.Da=0;if(0>this.Sa||isNaN(this.Sa))this.Sa=0;c&&(this.B="current");d&&(this.target="current");g&&(this.target="OBJ")};n.Hx=function(c,k){switch(this.Gi){case 0:return 1*c/k+0;case 1:return 1*(c/=k)*c+0;case 2:return-1*(c/=k)*(c-2)+0;case 3:return 1>(c/=k/2)?.5*c*c+0:-.5*(--c*(c-2)-1)+0;case 4:return 1*(c/=k)*c*c+0;case 5:return 1*((c= c/k-1)*c*c+1)+0;case 6:return 1>(c/=k/2)?.5*c*c*c+0:.5*((c-=2)*c*c+2)+0;case 7:return 1*(c/=k)*c*c*c+0;case 8:return-1*((c=c/k-1)*c*c*c-1)+0;case 9:return 1>(c/=k/2)?.5*c*c*c*c+0:-.5*((c-=2)*c*c*c-2)+0;case 10:return 1*(c/=k)*c*c*c*c+0;case 11:return 1*((c=c/k-1)*c*c*c*c+1)+0;case 12:return 1>(c/=k/2)?.5*c*c*c*c*c+0:.5*((c-=2)*c*c*c*c+2)+0;case 13:return-1*(Math.sqrt(1-(c/=k)*c)-1)+0;case 14:return 1*Math.sqrt(1-(c=c/k-1)*c)+0;case 15:return 1>(c/=k/2)?-.5*(Math.sqrt(1-c*c)-1)+0:.5*(Math.sqrt(1-(c-= 2)*c)+1)+0;case 16:var g=0;0==g&&(g=1.70158);return 1*(c/=k)*c*((g+1)*c-g)+0;case 17:return g=0,0==g&&(g=1.70158),1*((c=c/k-1)*c*((g+1)*c+g)+1)+0;case 18:return g=0,0==g&&(g=1.70158),1>(c/=k/2)?.5*c*c*(((g*=1.525)+1)*c-g)+0:.5*((c-=2)*c*(((g*=1.525)+1)*c+g)+2)+0;case 19:var a=0,e=0;if(0==c)break;if(1==(c/=k))return 1;0==e&&(e=.3*k);0==a||ac?-.5*a*Math.pow(2,10*--c)*Math.sin(2*(c*k-g)*Math.PI/e)+0:a*Math.pow(2,-10*--c)*Math.sin(2*(c*k-g)*Math.PI/e)*.5+1;case 22:return 1-d(k-c,k)+0;case 23:return d(c,k);case 24:return c=this.duration+this.Da&&(c=this.ki),this.c.n=Ja(c)):5==this.L?(1==this.ac&&this.c.opacity!==this.Hc&&(this.ma=this.c.opacity),this.c.opacity=this.ma+(this.Ga-this.ma)*c,this.Hc=this.c.opacity): 6==this.L?this.value=this.ma+(this.Ga-this.ma)*c:7==this.L&&(1==this.ac&&(this.c.width!==this.Hc&&(this.ma=this.c.width),this.c.height!==this.kd&&(this.hb=this.c.height)),this.Ud&&(this.c.width=this.ma+(this.Ga-this.ma)*c),this.Vd&&(this.c.height=this.hb+(this.Yb-this.hb)*c),this.Hc=this.c.width,this.kd=this.c.height),this.c.J()),this.G>=this.duration+this.Da&&(this.jx(d),this.c.J(),0==this.Uh&&(this.Uh=!0,this.b.trigger(Mc.prototype.k.iq,this.c),this.Hj=!0))))};n.jx=function(c){switch(this.L){case 0:this.c.x= this.Ga;this.c.y=this.Yb;break;case 1:this.Ud&&(this.c.width=this.Ga);this.Vd?this.c.height=this.Yb:this.c.height=this.c.width*this.we;break;case 2:this.c.width=this.Ga;break;case 3:this.c.height=this.Yb;break;case 4:this.c.n=Ja(this.ki);this.Lb=this.c.n;break;case 5:this.c.opacity=this.Ga;break;case 6:this.value=this.Ga;break;case 7:this.Ud&&(this.c.width=this.Ga),this.Vd&&(this.c.height=this.Yb)}this.G>=this.duration+this.Da+this.Sa&&(0==this.U?(this.reverse=this.H=!1,this.G=this.duration+this.Da+ this.Sa):1==this.U?(this.G=0,this.init(),this.H=!0):2==this.U?c?(this.reverse=!1,this.init()):(this.reverse=!this.reverse,this.G=0,this.init(),this.H=!0):3==this.U?this.b.Fe(this.c):4==this.U?(this.loop=!0,this.G=0,this.init(),this.H=!0):5==this.U?c?(this.reverse=!1,this.init()):0>=this.Lc?(this.G=this.duration+this.Da+this.Sa,this.H=!1):(this.reverse?(--this.Lc,this.reverse=!1):(--this.Lc,this.reverse=!0),this.G=0,this.init(),this.H=!0):-6==this.U?(this.U=this.Ao,this.reverse=!1,this.G=0,this.H= !1):6==this.U&&(this.reverse=!1,this.G=this.duration+this.Da+this.Sa,this.H=!1));0==this.Th&&(this.Th=!0,this.b.trigger(Mc.prototype.k.dv,this.c),this.Gj=!0)};q.k={};n=q.k;n.aq=function(){return this.H};n.OA=function(c,d){var g=[];hc[this.group].forEach(function(a){g.push(a.G/(a.duration+a.Da+a.Sa))});return fc(Math.min.apply(null,g),c,d)};n.RA=function(c,d){return fc(this.G/(this.duration+this.Da+this.Sa),c,d)};n.Cv=function(){if(!1===this.Kj)return this.Vh};n.Gv=function(){if(!1===this.Lj)return this.Wh}; n.iq=function(){if(!1===this.Hj)return this.Uh};n.dv=function(){if(!1===this.Gj)return this.Th};q.A={};var k=q.A;k.Pv=function(c){this.H=1===c};k.KB=function(c,d){""===d&&(d=this.group);(1===c||hc[d].every(function(c){return!c.H}))&&hc[d].forEach(function(d){1===c?k.Zp.apply(d):k.vw.apply(d)})};k.LB=function(c,d){""===d&&(d=this.group);hc[d].forEach(function(d){k.jn.apply(d,[c])})};k.pB=function(c,d,g){""===g&&(g=this.group);(1===c||hc[g].every(function(a){return!a.H}))&&hc[g].forEach(function(a){1=== c?k.Eu.apply(a,[d]):k.Nv.apply(a,[d])})};k.Zp=function(){this.loop=4===this.U;5==this.U&&(this.Lc=1);6==this.U||-6==this.U?this.G=this.duration+this.Sa+this.Da&&(this.reverse=!0,this.G= 0,this.Lc=2,this.init(),this.H=!0):(this.reverse=!0,this.G=0,this.init(),this.H=!0)};k.vw=function(){this.H||(this.loop=4===this.U,5==this.U&&(this.Lc=1),6==this.U||-6==this.U?this.G=this.duration+this.Sa+this.Da&&(this.reverse=!0,this.G=0,this.Lc=2,this.init(),this.H=!0):(this.reverse=!0,this.G=0,this.init(),this.H=!0))};k.Uv=function(c){this.duration=c};k.pw= function(c){this.dh=c;this.Da=parseFloat(this.dh.split(",")[0]);this.Sa=parseFloat(this.dh.split(",")[1]);if(0>this.Da||isNaN(this.Da))this.Da=0;if(0>this.Sa||isNaN(this.Sa))this.Sa=0};k.gw=function(c){"string"==typeof c?(this.target=c,this.ha=parseFloat(c.split(",")[0]),this.gb=parseFloat(c.split(",")[1])):this.ha=this.target=c;this.H||this.init()};k.GB=function(c){c&&(c=c.Ni())&&(this.tc=c,this.target="OBJ")};k.hw=function(c){2==this.L||3==this.L||4==this.L||5==this.L||6==this.L?("string"==typeof c? this.target=parseFloat(c.split(",")[0]):this.target=""+c+","+this.gb,this.ha=this.target):(this.target=String(c)+","+this.target.split(",")[1],this.ha=parseFloat(this.target.split(",")[0]),this.gb=parseFloat(this.target.split(",")[1]));this.H||(this.Tf(),this.init())};k.iw=function(c){2==this.L||3==this.L||4==this.L||5==this.L||6==this.L?this.ha=this.target="string"==typeof c?parseFloat(c)+"":this.ha+","+c:(this.target=this.target.split(",")[0]+","+String(c),this.ha=parseFloat(this.target.split(",")[0]), this.gb=parseFloat(this.target.split(",")[1]));this.H||(this.Tf(),this.init())};k.Wv=function(c){"string"==typeof c?(this.B=c,this.ea=parseFloat(c.split(",")[0]),this.lb=parseFloat(c.split(",")[1])):(this.B=""+c,this.ea=c);6==this.L&&(this.value=this.ea);this.H||(this.Tf(),this.init())};k.zB=function(c){2==this.L||3==this.L||4==this.L||5==this.L||6==this.L?("string"==typeof c?this.B=parseFloat(c):this.B=""+c+","+this.lb,this.ea=this.B):(""==this.B&&(this.B="current"),this.B=String(c)+","+("current"== this.B?this.$f:this.B.split(",")[1]),this.ea=parseFloat(this.B.split(",")[0]),this.lb=parseFloat(this.B.split(",")[1]));6==this.L&&(this.value=this.ea);this.H||(this.Tf(),this.init())};k.AB=function(c){2==this.L||3==this.L||4==this.L||5==this.L||6==this.L?("string"==typeof c?this.B=parseFloat(c):this.B=""+this.ea+","+c,this.ea=this.B):(""==this.B&&(this.B="current"),this.B=("current"==this.B?this.Zf:this.B.split(",")[0])+","+String(c),this.ea=parseFloat(this.B.split(",")[0]),this.lb=parseFloat(this.B.split(",")[1])); this.H||(this.Tf(),this.init())};k.JB=function(c){this.value=c};k.IB=function(c){this.L=c};k.vB=function(c){this.Gi=c};k.CB=function(c){this.U=c};k.BB=function(c,d,g,a,e,n,b,h){this.L=c;this.U=d;this.Gi=g;k.Wv.apply(this,[a]);k.gw.apply(this,[e]);k.Uv.apply(this,[n]);k.pw.apply(this,[b]);this.ac=h;this.Tf()};q.ja={};q=q.ja;q.mB=function(c){c.D(this.G/(this.duration+this.Da+this.Sa))};q.nB=function(c){c.D(this.G)};q.yu=function(c){c.D(this.duration)};q.WA=function(c){c.D(this.Da)};q.TA=function(c){c.D(this.Sa)}; q.MB=function(c){c.fc(this.target)};q.Aw=function(c){c.D(this.value)};q.Dg=function(c){c.Oa(this.Dg?1:0)}})();function Nc(d){this.b=d;this.Em=this.ck=this.Xg=this.Dm=0} (function(){function d(){}var q=Nc.prototype;q.Z=function(d){this.behavior=d;this.b=d.b};q.Z.prototype.P=function(){};q.S=function(d,c){this.type=d;this.behavior=d.behavior;this.c=c;this.b=d.b};var n=q.S.prototype;n.P=function(){this.enabled=0!==this.C[0]};n.tb=function(){return{smg:this.behavior.Dm,ss:this.behavior.Xg,se:this.behavior.ck,smd:this.behavior.Em}};n.Mb=function(d){this.behavior.Dm=d.smg;this.behavior.Xg=d.ss;this.behavior.ck=d.se;this.behavior.Em=d.smd};n.Pa=function(){};n.lk=function(){if(this.enabled){var d= this.behavior.Tl.pf(),c=0,n=0,g,a,e,q=0;g=0;for(a=d.length;g=this.behavior.Xg&&a