// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com
'use strict';function r(){return function(){}}function aa(a){return function(b){this[a]=b}}function t(a){return function(){return this[a]}}function v(a){return function(){return a}}var y,ba,ca,da,fa,ia,I,ja,ka,la,ma,oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,L,za,Aa,Ba,Ca,Da,Ea,Fa,Ga,Ha,Ia,Ja,Ka,La,Ma,Na,Oa,Pa,Qa,Ra,Sa,Ta,Ua,Va,Wa,Xa,Ya,Za,$a,ab,bb,cb,db,eb,fb,gb,hb,ib,kb,lb,mb,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,Bb,Cb,Db,Eb,Fb,Gb,Hb,M,Ib,Jb={},Kb={};
"function"!==typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"===typeof"test".__proto__?function(a){return a.__proto__}:function(a){return a.constructor.prototype});
(function(){function a(a,c,b,n){this.set(a,c,b,n)}function b(){this.Df=this.Cf=this.Ff=this.Ef=this.pg=this.og=this.fe=this.ee=0}function c(a,c,b,g){a<c?b<g?(m=a<b?a:b,n=c>g?c:g):(m=a<g?a:g,n=c>b?c:b):b<g?(m=c<b?c:b,n=a>g?a:g):(m=c<g?c:g,n=a>b?a:b)}function d(){this.Tf=this.mf=null;this.Ki=0;p&&(this.mf=new Set);this.mj=[];this.Bg=!0}function e(a){s[u++]=a}function g(){this.bh=this.Wm=this.y=this.n=0}function f(a){this.Ug=[];this.or=this.rr=this.sr=this.qr=0;this.Kl=null;this.Qy(a)}function h(a,c){this.Fv=
a;this.Ev=c;this.cells={}}function k(a,c,b){var n;return x.length?(n=x.pop(),n.jx=a,n.x=c,n.y=b,n):new ba(a,c,b)}function l(a,c,b){this.jx=a;this.x=c;this.y=b;this.Jm=new ca}da=function(a){window.console&&window.console.log&&window.console.log(a)};fa=function(a){return"undefined"===typeof a};ia=function(a){return"number"===typeof a};I=function(a){return"string"===typeof a};ja=function(a){return 0<a&&0===(a-1&a)};ka=function(a){--a;for(var c=1;32>c;c<<=1)a|=a>>c;return a+1};la=function(a){return 0>
a?-a:a};ma=function(a,c){return a<c?a:c};oa=Math.PI;pa=function(a){return a+0.5|0};qa=function(a){return 0<=a?a|0:(a|0)-1};ra=function(a){var c=a|0;return c===a?c:c+1};sa=function(a,c,b,n,g,d,e,f){var h,q,p,k;a<b?(q=a,h=b):(q=b,h=a);g<e?(k=g,p=e):(k=e,p=g);if(h<k||q>p)return!1;c<n?(q=c,h=n):(q=n,h=c);d<f?(k=d,p=f):(k=f,p=d);if(h<k||q>p)return!1;h=g-a+e-b;q=d-c+f-n;a=b-a;c=n-c;g=e-g;d=f-d;f=la(c*g-d*a);return la(g*q-d*h)>f?!1:la(a*q-c*h)<=f};a.prototype.set=function(a,c,b,n){this.left=a;this.top=c;
this.right=b;this.bottom=n};a.prototype.copy=function(a){this.left=a.left;this.top=a.top;this.right=a.right;this.bottom=a.bottom};a.prototype.width=function(){return this.right-this.left};a.prototype.height=function(){return this.bottom-this.top};a.prototype.offset=function(a,c){this.left+=a;this.top+=c;this.right+=a;this.bottom+=c;return this};a.prototype.normalize=function(){var a=0;this.left>this.right&&(a=this.left,this.left=this.right,this.right=a);this.top>this.bottom&&(a=this.top,this.top=
this.bottom,this.bottom=a)};a.prototype.Qe=function(a,c){return a>=this.left&&a<=this.right&&c>=this.top&&c<=this.bottom};a.prototype.kw=function(a){return this.left===a.left&&this.top===a.top&&this.right===a.right&&this.bottom===a.bottom};ta=a;b.prototype.Rm=function(a){this.ee=a.left;this.fe=a.top;this.og=a.right;this.pg=a.top;this.Ef=a.right;this.Ff=a.bottom;this.Cf=a.left;this.Df=a.bottom};b.prototype.It=function(a,c){if(0===c)this.Rm(a);else{var b=Math.sin(c),n=Math.cos(c),g=a.left*b,d=a.top*
b,e=a.right*b,b=a.bottom*b,f=a.left*n,h=a.top*n,q=a.right*n,n=a.bottom*n;this.ee=f-d;this.fe=h+g;this.og=q-d;this.pg=h+e;this.Ef=q-b;this.Ff=n+e;this.Cf=f-b;this.Df=n+g}};b.prototype.offset=function(a,c){this.ee+=a;this.fe+=c;this.og+=a;this.pg+=c;this.Ef+=a;this.Ff+=c;this.Cf+=a;this.Df+=c;return this};var m=0,n=0;b.prototype.wr=function(a){c(this.ee,this.og,this.Ef,this.Cf);a.left=m;a.right=n;c(this.fe,this.pg,this.Ff,this.Df);a.top=m;a.bottom=n};b.prototype.Qe=function(a,c){var b=this.og-this.ee,
n=this.pg-this.fe,g=this.Ef-this.ee,d=this.Ff-this.fe,e=a-this.ee,f=c-this.fe,h=b*b+n*n,q=b*g+n*d,n=b*e+n*f,p=g*g+d*d,k=g*e+d*f,x=1/(h*p-q*q),b=(p*n-q*k)*x,h=(h*k-q*n)*x;if(0<=b&&0<h&&1>b+h)return!0;b=this.Cf-this.ee;n=this.Df-this.fe;h=b*b+n*n;q=b*g+n*d;n=b*e+n*f;x=1/(h*p-q*q);b=(p*n-q*k)*x;h=(h*k-q*n)*x;return 0<=b&&0<h&&1>b+h};b.prototype.aj=function(){return(this.ee+this.og+this.Ef+this.Cf)/4};b.prototype.bj=function(){return(this.fe+this.pg+this.Ff+this.Df)/4};ua=b;va=function(a,c){for(var b in c)c.hasOwnProperty(b)&&
(a[b]=c[b]);return a};wa=function(a,c){var b,n;c=qa(c);if(!(0>c||c>=a.length))if(0===c)a.shift();else if(c===a.length-1)a.pop();else{b=c;for(n=a.length-1;b<n;b++)a[b]=a[b+1];a.length=n}};xa=function(a,c){a.length=c.length;var b,n;b=0;for(n=c.length;b<n;b++)a[b]=c[b]};ya=function(a,c){var b=a.indexOf(c);-1!==b&&wa(a,b)};L=function(a){return a/(180/oa)};za=function(a){return a*(180/oa)};Aa=function(a){a%=360;0>a&&(a+=360);return a};Ba=function(a){a%=2*oa;0>a&&(a+=2*oa);return a};Ca=function(a){return Aa(za(a))};
Da=function(a){return Ba(L(a))};Ea=function(a,c,b,n){return Math.atan2(n-c,b-a)};Fa=function(a,c){if(a===c)return 0;var b=Math.sin(a),n=Math.cos(a),g=Math.sin(c),d=Math.cos(c),b=b*g+n*d;return 1<=b?0:-1>=b?oa:Math.acos(b)};Ga=function(a,c,b){var n=Math.sin(a),g=Math.cos(a),d=Math.sin(c),e=Math.cos(c);return Math.acos(n*d+g*e)>b?0<g*d-n*e?Ba(a+b):Ba(a-b):Ba(c)};Ha=function(a,c){var b=Math.sin(a),n=Math.cos(a),g=Math.sin(c),d=Math.cos(c);return 0>=n*g-b*d};Ia=function(a,c,b,n){a=b-a;c=n-c;return Math.sqrt(a*
a+c*c)};Ja=function(a,c){return!a!==!c};Ka=function(a){for(var c in a)if(a.hasOwnProperty(c))return!0;return!1};La=function(a){for(var c in a)a.hasOwnProperty(c)&&delete a[c]};var q=+new Date;Ma=function(){if("undefined"!==typeof window.performance){var a=window.performance;if("undefined"!==typeof a.now)return a.now();if("undefined"!==typeof a.webkitNow)return a.webkitNow();if("undefined"!==typeof a.mozNow)return a.mozNow();if("undefined"!==typeof a.msNow)return a.msNow()}return Date.now()-q};var p=
("undefined"===typeof window||!window.c2ejecta)&&"undefined"!==typeof Set&&"undefined"!==typeof Set.prototype.forEach;d.prototype.contains=function(a){return this.ue()?!1:p?this.mf.has(a):this.Tf&&this.Tf.hasOwnProperty(a)};d.prototype.add=function(a){if(p)this.mf.has(a)||(this.mf.add(a),this.Bg=!1);else{var c=a.toString(),b=this.Tf;b?b.hasOwnProperty(c)||(b[c]=a,this.Ki++,this.Bg=!1):(this.Tf={},this.Tf[c]=a,this.Ki=1,this.Bg=!1)}};d.prototype.remove=function(a){if(!this.ue())if(p)this.mf.has(a)&&
(this.mf["delete"](a),this.Bg=!1);else if(this.Tf){a=a.toString();var c=this.Tf;c.hasOwnProperty(a)&&(delete c[a],this.Ki--,this.Bg=!1)}};d.prototype.clear=function(){this.ue()||(p?this.mf.clear():(this.Tf=null,this.Ki=0),this.mj.length=0,this.Bg=!0)};d.prototype.ue=function(){return 0===this.count()};d.prototype.count=function(){return p?this.mf.size:this.Ki};var s=null,u=0;d.prototype.ez=function(){if(!this.Bg){if(p)this.mj.length=this.mf.size,s=this.mj,u=0,this.mf.forEach(e),s=null,u=0;else{var a=
this.mj;a.length=this.Ki;var c,b=0,n=this.Tf;if(n)for(c in n)n.hasOwnProperty(c)&&(a[b++]=n[c])}this.Bg=!0}};d.prototype.lj=function(){this.ez();return this.mj};ca=d;g.prototype.add=function(a){this.y=a-this.n;this.Wm=this.bh+this.y;this.n=this.Wm-this.bh-this.y;this.bh=this.Wm};g.prototype.reset=function(){this.bh=this.Wm=this.y=this.n=0};Na=g;Oa=function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")};f.prototype.Qy=function(a){this.qt=a;this.gj=a.length/2;this.Ug.length=a.length;this.On=
this.Pn=-1;this.yr=0};f.prototype.ss=function(){return!this.qt.length};f.prototype.Tb=function(){for(var a=this.Ug,c=a[0],b=c,n=a[1],g=n,d,e,f=1,h=this.gj;f<h;++f)e=2*f,d=a[e],e=a[e+1],d<c&&(c=d),d>b&&(b=d),e<n&&(n=e),e>g&&(g=e);this.qr=c;this.rr=b;this.sr=n;this.or=g};f.prototype.Rm=function(a,c,b){this.Ug.length=8;this.gj=4;var n=this.Ug;n[0]=a.left-c;n[1]=a.top-b;n[2]=a.right-c;n[3]=a.top-b;n[4]=a.right-c;n[5]=a.bottom-b;n[6]=a.left-c;n[7]=a.bottom-b;this.Pn=a.right-a.left;this.On=a.bottom-a.top;
this.Tb()};f.prototype.Ar=function(a,c,b){if(this.Pn!==a||this.On!==c||this.yr!==b){this.Pn=a;this.On=c;this.yr=b;var n,g,d,e,f,h=0,q=1,p=this.qt,k=this.Ug;0!==b&&(h=Math.sin(b),q=Math.cos(b));b=0;for(d=this.gj;b<d;b++)n=2*b,g=n+1,e=p[n]*a,f=p[g]*c,k[n]=e*q-f*h,k[g]=f*q+e*h;this.Tb()}};f.prototype.Qe=function(a,c){var b=this.Ug;if(a===b[0]&&c===b[1])return!0;var n,g,d,e=this.gj,f=this.qr-110,h=this.sr-101,q=this.rr+131,p=this.or+120,k,x,l=0,s=0;for(n=0;n<e;n++)g=2*n,d=2*((n+1)%e),k=b[g],g=b[g+1],
x=b[d],d=b[d+1],sa(f,h,a,c,k,g,x,d)&&l++,sa(q,p,a,c,k,g,x,d)&&s++;return 1===l%2||1===s%2};Pa=f;h.prototype.Xr=function(a,c,b){var n;n=this.cells[a];return n?(n=n[c])?n:b?(n=k(this,a,c),this.cells[a][c]=n):null:b?(n=k(this,a,c),this.cells[a]={},this.cells[a][c]=n):null};h.prototype.Xq=function(a){return qa(a/this.Fv)};h.prototype.Yq=function(a){return qa(a/this.Ev)};h.prototype.update=function(a,c,b){var n,g,d,e,f;if(c)for(n=c.left,g=c.right;n<=g;++n)for(d=c.top,e=c.bottom;d<=e;++d)if(!b||!b.Qe(n,
d))if(f=this.Xr(n,d,!1))f.remove(a),f.ue()&&(f.Jm.clear(),1E3>x.length&&x.push(f),this.cells[n][d]=null);if(b)for(n=b.left,g=b.right;n<=g;++n)for(d=b.top,e=b.bottom;d<=e;++d)c&&c.Qe(n,d)||this.Xr(n,d,!0).qx(a)};Qa=h;var x=[];l.prototype.ue=function(){return this.Jm.ue()};l.prototype.qx=function(a){this.Jm.add(a)};l.prototype.remove=function(a){this.Jm.remove(a)};ba=l;var A="lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");
Ra=function(a){return 0>=a||11<=a?"source-over":A[a-1]};Sa=function(a,c,b){if(b)switch(a.Bc=b.ONE,a.uc=b.ONE_MINUS_SRC_ALPHA,c){case 1:a.Bc=b.ONE;a.uc=b.ONE;break;case 3:a.Bc=b.ONE;a.uc=b.ZERO;break;case 4:a.Bc=b.ONE_MINUS_DST_ALPHA;a.uc=b.ONE;break;case 5:a.Bc=b.DST_ALPHA;a.uc=b.ZERO;break;case 6:a.Bc=b.ZERO;a.uc=b.SRC_ALPHA;break;case 7:a.Bc=b.ONE_MINUS_DST_ALPHA;a.uc=b.ZERO;break;case 8:a.Bc=b.ZERO;a.uc=b.ONE_MINUS_SRC_ALPHA;break;case 9:a.Bc=b.DST_ALPHA;a.uc=b.ONE_MINUS_SRC_ALPHA;break;case 10:a.Bc=
b.ONE_MINUS_DST_ALPHA,a.uc=b.SRC_ALPHA}};Ta=function(a){return pa(1E6*a)/1E6};Ua=function(a,c){return"string"!==typeof a||"string"!==typeof c||a.length!==c.length?!1:a===c?!0:a.toLowerCase()===c.toLowerCase()}})();var Lb="undefined"!==typeof Float32Array?Float32Array:Array;function Mb(a){var b=new Lb(3);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2]);return b}
function Nb(a){var b=new Lb(16);a&&(b[0]=a[0],b[1]=a[1],b[2]=a[2],b[3]=a[3],b[4]=a[4],b[5]=a[5],b[6]=a[6],b[7]=a[7],b[8]=a[8],b[9]=a[9],b[10]=a[10],b[11]=a[11],b[12]=a[12],b[13]=a[13],b[14]=a[14],b[15]=a[15]);return b}function Ob(a,b){b[0]=a[0];b[1]=a[1];b[2]=a[2];b[3]=a[3];b[4]=a[4];b[5]=a[5];b[6]=a[6];b[7]=a[7];b[8]=a[8];b[9]=a[9];b[10]=a[10];b[11]=a[11];b[12]=a[12];b[13]=a[13];b[14]=a[14];b[15]=a[15]}
function Pb(a,b){var c=b[0],d=b[1];b=b[2];a[0]*=c;a[1]*=c;a[2]*=c;a[3]*=c;a[4]*=d;a[5]*=d;a[6]*=d;a[7]*=d;a[8]*=b;a[9]*=b;a[10]*=b;a[11]*=b}
function Qb(a,b,c,d){d||(d=Nb());var e,g,f,h,k,l,m,n,q=a[0],p=a[1];a=a[2];g=c[0];f=c[1];e=c[2];c=b[1];l=b[2];q===b[0]&&p===c&&a===l?(a=d,a[0]=1,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=1,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=1,a[11]=0,a[12]=0,a[13]=0,a[14]=0,a[15]=1):(c=q-b[0],l=p-b[1],m=a-b[2],n=1/Math.sqrt(c*c+l*l+m*m),c*=n,l*=n,m*=n,b=f*m-e*l,e=e*c-g*m,g=g*l-f*c,(n=Math.sqrt(b*b+e*e+g*g))?(n=1/n,b*=n,e*=n,g*=n):g=e=b=0,f=l*g-m*e,h=m*b-c*g,k=c*e-l*b,(n=Math.sqrt(f*f+h*h+k*k))?(n=1/n,f*=n,h*=n,k*=n):k=h=f=0,
d[0]=b,d[1]=f,d[2]=c,d[3]=0,d[4]=e,d[5]=h,d[6]=l,d[7]=0,d[8]=g,d[9]=k,d[10]=m,d[11]=0,d[12]=-(b*q+e*p+g*a),d[13]=-(f*q+h*p+k*a),d[14]=-(c*q+l*p+m*a),d[15]=1)}
(function(){function a(a){this.Ho=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.height=this.width=0;this.Br=Mb([0,0,100]);this.Gs=Mb([0,0,0]);this.$t=Mb([0,1,0]);this.kq=Mb([1,1,1]);this.vp=Nb();this.Wd=Nb();this.xs=Nb();this.bo=Nb();this.P=a;this.ks()}function b(a,c,b){this.P=a;this.Wk=c;this.name=b;this.Sd=a.getAttribLocation(c,"aPos");this.Mg=a.getAttribLocation(c,"aTex");this.Es=a.getUniformLocation(c,"matP");this.Pi=a.getUniformLocation(c,"matMV");this.Qi=a.getUniformLocation(c,
"opacity");this.Fs=a.getUniformLocation(c,"samplerFront");this.tk=a.getUniformLocation(c,"samplerBack");this.Qh=a.getUniformLocation(c,"destStart");this.Ph=a.getUniformLocation(c,"destEnd");this.dp=a.getUniformLocation(c,"seconds");this.cp=a.getUniformLocation(c,"pixelWidth");this.bp=a.getUniformLocation(c,"pixelHeight");this.sk=a.getUniformLocation(c,"layerScale");this.rk=a.getUniformLocation(c,"layerAngle");this.uk=a.getUniformLocation(c,"viewOrigin");this.mx=!!(this.cp||this.bp||this.dp||this.tk||
this.Qh||this.Ph||this.sk||this.rk||this.uk);this.Qi&&a.uniform1f(this.Qi,1);this.Fs&&a.uniform1i(this.Fs,0);this.tk&&a.uniform1i(this.tk,1);this.Qh&&a.uniform2f(this.Qh,0,0);this.Ph&&a.uniform2f(this.Ph,1,1);this.sk&&a.uniform1f(this.sk,1);this.rk&&a.uniform1f(this.rk,0);this.uk&&a.uniform2f(this.uk,0,0);this.Gh=!1}function c(a,c){this.type=a;this.$=c;this.P=c.P;this.Ze=this.be=this.gt=0;this.Ma=this.Ge=null;this.Jt=[]}a.prototype.ks=function(){var a=this.P,c;this.ys=1;this.Mh=this.Lh=null;this.Mr=
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.DEPTH_TEST);this.zs=a.ONE;this.ws=a.ONE_MINUS_SRC_ALPHA;this.Fp=a.createBuffer();a.bindBuffer(a.ARRAY_BUFFER,this.Fp);this.el=Array(4);this.Yk=Array(4);for(c=0;4>c;c++)this.el[c]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.el[c]),this.Yk[c]=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,this.Yk[c]);this.Hf=0;this.ox=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,
this.ox);this.iq=new Float32Array(16E3);this.Xp=new Float32Array(16E3);this.xy=new Float32Array(32E3);for(var b=new Uint16Array(12E3),d=c=0;12E3>c;)b[c++]=d,b[c++]=d+1,b[c++]=d+2,b[c++]=d,b[c++]=d+2,b[c++]=d+3,d+=4;a.bufferData(a.ELEMENT_ARRAY_BUFFER,b,a.STATIC_DRAW);this.Gp=this.sf=0;this.Sb=[];c=this.Zn({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}"},
"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}","<default>");this.Sb.push(c);c=this.Zn({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}",
"<point>");this.Sb.push(c);for(var e in Rb)Rb.hasOwnProperty(e)&&this.Sb.push(this.Zn(Rb[e],"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}",e));a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,null);this.Ag=[];this.Bf=0;this.jd=!1;this.Nr=this.mk=-1;this.Pj=null;this.Iw=a.createFramebuffer();this.yt=
null;this.eh=Mb([0,0,0]);this.pf(0)};a.prototype.Zn=function(a,c,d){var e=this.P,l=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(l,a.src);e.compileShader(l);if(!e.getShaderParameter(l,e.COMPILE_STATUS))return e.deleteShader(l),null;var m=e.createShader(e.VERTEX_SHADER);e.shaderSource(m,c);e.compileShader(m);if(!e.getShaderParameter(m,e.COMPILE_STATUS))return e.deleteShader(l),e.deleteShader(m),null;c=e.createProgram();e.attachShader(c,l);e.attachShader(c,m);e.linkProgram(c);if(!e.getProgramParameter(c,
e.LINK_STATUS))return e.deleteShader(l),e.deleteShader(m),e.deleteProgram(c),null;e.useProgram(c);e.deleteShader(l);e.deleteShader(m);d=new b(e,c,d);d.ko=a.ko||0;d.lo=a.lo||0;d.Ir=!!a.Ir;d.hr=!!a.hr;d.ja=a.ja||[];a=0;for(l=d.ja.length;a<l;a++)d.ja[a][1]=e.getUniformLocation(c,d.ja[a][0]),e.uniform1f(d.ja[a][1],0);return d};a.prototype.xo=function(a){var c,b;c=0;for(b=this.Sb.length;c<b;c++)if(this.Sb[c].name===a)return c;return-1};a.prototype.pt=function(a,c,b){var d=this.Wd,e=this.vp,m=[0,0,0,0,
0,0,0,0];m[0]=d[0]*a+d[4]*c+d[12];m[1]=d[1]*a+d[5]*c+d[13];m[2]=d[2]*a+d[6]*c+d[14];m[3]=d[3]*a+d[7]*c+d[15];m[4]=e[0]*m[0]+e[4]*m[1]+e[8]*m[2]+e[12]*m[3];m[5]=e[1]*m[0]+e[5]*m[1]+e[9]*m[2]+e[13]*m[3];m[6]=e[2]*m[0]+e[6]*m[1]+e[10]*m[2]+e[14]*m[3];m[7]=-m[2];0!==m[7]&&(m[7]=1/m[7],m[4]*=m[7],m[5]*=m[7],m[6]*=m[7],b[0]=(0.5*m[4]+0.5)*this.width,b[1]=(0.5*m[5]+0.5)*this.height)};a.prototype.ij=function(a,c,b){if(this.width!==a||this.height!==c||b){this.Dh();this.width=a;this.height=c;this.P.viewport(0,
0,a,c);c=a/c;var d=this.vp,e;e=1*Math.tan(45*Math.PI/360);c*=e;a=-c;b=-e;d||(d=Nb());var m=c-a,n=e-b;d[0]=2/m;d[1]=0;d[2]=0;d[3]=0;d[4]=0;d[5]=2/n;d[6]=0;d[7]=0;d[8]=(c+a)/m;d[9]=(e+b)/n;d[10]=-1001/999;d[11]=-1;d[12]=0;d[13]=0;d[14]=-2E3/999;d[15]=0;Qb(this.Br,this.Gs,this.$t,this.Wd);a=[0,0];c=[0,0];this.pt(0,0,a);this.pt(1,1,c);this.kq[0]=1/(c[0]-a[0]);this.kq[1]=-1/(c[1]-a[1]);a=0;for(c=this.Sb.length;a<c;a++)b=this.Sb[a],b.Gh=!1,b.Es&&(this.P.useProgram(b.Wk),this.P.uniformMatrix4fv(b.Es,!1,
this.vp));this.P.useProgram(this.Sb[this.mk].Wk);this.P.bindTexture(this.P.TEXTURE_2D,null);this.P.activeTexture(this.P.TEXTURE1);this.P.bindTexture(this.P.TEXTURE_2D,null);this.P.activeTexture(this.P.TEXTURE0);this.Mh=this.Lh=null}};a.prototype.Xg=function(){Qb(this.Br,this.Gs,this.$t,this.Wd);Pb(this.Wd,this.kq)};a.prototype.translate=function(a,c){if(0!==a||0!==c){this.eh[0]=a;this.eh[1]=c;this.eh[2]=0;var b=this.Wd,d=this.eh,e=d[0],m=d[1],d=d[2];b[12]=b[0]*e+b[4]*m+b[8]*d+b[12];b[13]=b[1]*e+b[5]*
m+b[9]*d+b[13];b[14]=b[2]*e+b[6]*m+b[10]*d+b[14];b[15]=b[3]*e+b[7]*m+b[11]*d+b[15]}};a.prototype.scale=function(a,c){if(1!==a||1!==c)this.eh[0]=a,this.eh[1]=c,this.eh[2]=1,Pb(this.Wd,this.eh)};a.prototype.zt=function(a){if(0!==a){var c=this.Wd,b,d=Math.sin(a);a=Math.cos(a);var e=c[0],m=c[1],n=c[2],q=c[3],p=c[4],s=c[5],u=c[6],x=c[7];b?c!==b&&(b[8]=c[8],b[9]=c[9],b[10]=c[10],b[11]=c[11],b[12]=c[12],b[13]=c[13],b[14]=c[14],b[15]=c[15]):b=c;b[0]=e*a+p*d;b[1]=m*a+s*d;b[2]=n*a+u*d;b[3]=q*a+x*d;b[4]=e*-d+
p*a;b[5]=m*-d+s*a;b[6]=n*-d+u*a;b[7]=q*-d+x*a}};a.prototype.gh=function(){for(var a=!1,c=0;16>c;c++)if(this.xs[c]!==this.Wd[c]){a=!0;break}a&&(a=this.Fe(),a.type=5,a.Ma?Ob(this.Wd,a.Ma):a.Ma=Nb(this.Wd),Ob(this.Wd,this.xs),this.jd=!1)};c.prototype.Xv=function(){this.P.bindTexture(this.P.TEXTURE_2D,this.Ge)};c.prototype.Yv=function(){var a=this.P;a.activeTexture(a.TEXTURE1);a.bindTexture(a.TEXTURE_2D,this.Ge);a.activeTexture(a.TEXTURE0)};c.prototype.Uv=function(){var a=this.gt,c=this.$;c.Mr=a;c=c.Pj;
c.Qi&&this.P.uniform1f(c.Qi,a)};c.prototype.Rv=function(){this.P.drawElements(this.P.TRIANGLES,this.Ze,this.P.UNSIGNED_SHORT,2*this.be)};c.prototype.Tv=function(){this.P.blendFunc(this.be,this.Ze)};c.prototype.Zv=function(){var a,c,b,d=this.$.Sb,e=this.$.Nr;a=0;for(c=d.length;a<c;a++)b=d[a],a===e&&b.Pi?(this.P.uniformMatrix4fv(b.Pi,!1,this.Ma),b.Gh=!0):b.Gh=!1;Ob(this.Ma,this.$.bo)};c.prototype.Sv=function(){var a=this.P,c=this.$;this.Ge?(c.Mh===this.Ge&&(a.activeTexture(a.TEXTURE1),a.bindTexture(a.TEXTURE_2D,
null),c.Mh=null,a.activeTexture(a.TEXTURE0)),a.bindFramebuffer(a.FRAMEBUFFER,c.Iw),a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,this.Ge,0)):(a.framebufferTexture2D(a.FRAMEBUFFER,a.COLOR_ATTACHMENT0,a.TEXTURE_2D,null,0),a.bindFramebuffer(a.FRAMEBUFFER,null))};c.prototype.Mv=function(){var a=this.P;0===this.be?(a.clearColor(this.Ma[0],this.Ma[1],this.Ma[2],this.Ma[3]),a.clear(a.COLOR_BUFFER_BIT)):(a.enable(a.SCISSOR_TEST),a.scissor(this.Ma[0],this.Ma[1],this.Ma[2],this.Ma[3]),
a.clearColor(0,0,0,0),a.clear(this.P.COLOR_BUFFER_BIT),a.disable(a.SCISSOR_TEST))};c.prototype.Qv=function(){var a=this.P,c=this.$,b=c.Sb[1];a.useProgram(b.Wk);!b.Gh&&b.Pi&&(a.uniformMatrix4fv(b.Pi,!1,c.bo),b.Gh=!0);a.enableVertexAttribArray(b.Sd);a.bindBuffer(a.ARRAY_BUFFER,c.Fp);a.vertexAttribPointer(b.Sd,4,a.FLOAT,!1,0,0);a.drawArrays(a.POINTS,this.be/4,this.Ze);b=c.Pj;a.useProgram(b.Wk);0<=b.Sd&&(a.enableVertexAttribArray(b.Sd),a.bindBuffer(a.ARRAY_BUFFER,c.el[c.Hf]),a.vertexAttribPointer(b.Sd,
2,a.FLOAT,!1,0,0));0<=b.Mg&&(a.enableVertexAttribArray(b.Mg),a.bindBuffer(a.ARRAY_BUFFER,c.Yk[c.Hf]),a.vertexAttribPointer(b.Mg,2,a.FLOAT,!1,0,0))};c.prototype.Vv=function(){var a=this.P,c=this.$,b=c.Sb[this.be];c.Nr=this.be;c.Pj=b;a.useProgram(b.Wk);!b.Gh&&b.Pi&&(a.uniformMatrix4fv(b.Pi,!1,c.bo),b.Gh=!0);b.Qi&&a.uniform1f(b.Qi,c.Mr);0<=b.Sd&&(a.enableVertexAttribArray(b.Sd),a.bindBuffer(a.ARRAY_BUFFER,c.el[c.Hf]),a.vertexAttribPointer(b.Sd,2,a.FLOAT,!1,0,0));0<=b.Mg&&(a.enableVertexAttribArray(b.Mg),
a.bindBuffer(a.ARRAY_BUFFER,c.Yk[c.Hf]),a.vertexAttribPointer(b.Mg,2,a.FLOAT,!1,0,0))};c.prototype.Wv=function(){var a,c,b=this.$.Pj,d=this.P;a=this.Ma;b.tk&&this.$.Mh!==this.Ge&&(d.activeTexture(d.TEXTURE1),d.bindTexture(d.TEXTURE_2D,this.Ge),this.$.Mh=this.Ge,d.activeTexture(d.TEXTURE0));b.cp&&d.uniform1f(b.cp,a[0]);b.bp&&d.uniform1f(b.bp,a[1]);b.Qh&&d.uniform2f(b.Qh,a[2],a[3]);b.Ph&&d.uniform2f(b.Ph,a[4],a[5]);b.sk&&d.uniform1f(b.sk,a[6]);b.rk&&d.uniform1f(b.rk,a[7]);b.uk&&d.uniform2f(b.uk,a[8],
a[9]);b.dp&&d.uniform1f(b.dp,Ma()/1E3);if(b.ja.length)for(a=0,c=b.ja.length;a<c;a++)d.uniform1f(b.ja[a][1],this.Jt[a])};a.prototype.Fe=function(){this.Bf===this.Ag.length&&this.Ag.push(new c(0,this));return this.Ag[this.Bf++]};a.prototype.Dh=function(){if(0!==this.Bf&&!this.P.isContextLost()){var a=this.P;0<this.Gp&&(a.bindBuffer(a.ARRAY_BUFFER,this.Fp),a.bufferData(a.ARRAY_BUFFER,this.xy.subarray(0,this.Gp),a.STREAM_DRAW),c&&0<=c.Sd&&"<point>"===c.name&&a.vertexAttribPointer(c.Sd,4,a.FLOAT,!1,0,
0));if(0<this.sf){var c=this.Pj;a.bindBuffer(a.ARRAY_BUFFER,this.el[this.Hf]);a.bufferData(a.ARRAY_BUFFER,this.iq.subarray(0,this.sf),a.STREAM_DRAW);c&&0<=c.Sd&&"<point>"!==c.name&&a.vertexAttribPointer(c.Sd,2,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Yk[this.Hf]);a.bufferData(a.ARRAY_BUFFER,this.Xp.subarray(0,this.sf),a.STREAM_DRAW);c&&0<=c.Mg&&"<point>"!==c.name&&a.vertexAttribPointer(c.Mg,2,a.FLOAT,!1,0,0)}for(var b,a=0,c=this.Bf;a<c;a++)switch(b=this.Ag[a],b.type){case 1:b.Rv();break;case 2:b.Xv();
break;case 3:b.Uv();break;case 4:b.Tv();break;case 5:b.Zv();break;case 6:b.Sv();break;case 7:b.Mv();break;case 8:b.Qv();break;case 9:b.Vv();break;case 10:b.Wv();break;case 11:b.Yv()}this.Gp=this.sf=this.Bf=0;this.jd=!1;this.Hf++;4<=this.Hf&&(this.Hf=0)}};a.prototype.Vk=function(a){if(a!==this.ys){var c=this.Fe();c.type=3;this.ys=c.gt=a;this.jd=!1}};a.prototype.$d=function(a){if(a!==this.Lh){var c=this.Fe();c.type=2;this.Lh=c.Ge=a;this.jd=!1}};a.prototype.Yg=function(a,c){if(a!==this.zs||c!==this.ws){var b=
this.Fe();b.type=4;b.be=a;b.Ze=c;this.zs=a;this.ws=c;this.jd=!1}};a.prototype.Gt=function(){this.Yg(this.P.ONE,this.P.ONE_MINUS_SRC_ALPHA)};a.prototype.tt=function(a,c,b,d,e,m,n,q){15992<=this.sf&&this.Dh();var p=this.sf,s=this.iq,u=this.Xp;if(this.jd)this.Ag[this.Bf-1].Ze+=6;else{var x=this.Fe();x.type=1;x.be=3*(p/4);x.Ze=6;this.jd=!0}s[p]=a;u[p++]=0;s[p]=c;u[p++]=0;s[p]=b;u[p++]=1;s[p]=d;u[p++]=0;s[p]=e;u[p++]=1;s[p]=m;u[p++]=1;s[p]=n;u[p++]=0;s[p]=q;u[p++]=1;this.sf=p};a.prototype.di=function(a,
c,b,d,e,m,n,q,p){15992<=this.sf&&this.Dh();var s=this.sf,u=this.iq,x=this.Xp;if(this.jd)this.Ag[this.Bf-1].Ze+=6;else{var A=this.Fe();A.type=1;A.be=3*(s/4);A.Ze=6;this.jd=!0}var A=p.left,z=p.top,H=p.right;p=p.bottom;u[s]=a;x[s++]=A;u[s]=c;x[s++]=z;u[s]=b;x[s++]=H;u[s]=d;x[s++]=z;u[s]=e;x[s++]=H;u[s]=m;x[s++]=p;u[s]=n;x[s++]=A;u[s]=q;x[s++]=p;this.sf=s};a.prototype.pf=function(a){if(this.mk!==a){if(!this.Sb[a]){if(0===this.mk)return;a=0}var c=this.Fe();c.type=9;this.mk=c.be=a;this.jd=!1}};a.prototype.Rk=
function(a){a=this.Sb[a];return!(!a.Qh&&!a.Ph)};a.prototype.Ip=function(a){a=this.Sb[a];return!!(a.Qh||a.Ph||a.Ir)};a.prototype.By=function(a){a=this.Sb[a];return 0!==a.ko||0!==a.lo};a.prototype.Rw=function(a){return this.Sb[a].ko};a.prototype.Sw=function(a){return this.Sb[a].lo};a.prototype.Tw=function(a,c){return this.Sb[a].ja[c][2]};a.prototype.Lm=function(a){return this.Sb[a].hr};a.prototype.hj=function(a,c,b,d,e,m,n,q,p,s,u,x){var A=this.Sb[this.mk],z,H;if(A.mx||x.length){z=this.Fe();z.type=
10;z.Ma?Ob(this.Wd,z.Ma):z.Ma=Nb();H=z.Ma;H[0]=c;H[1]=b;H[2]=d;H[3]=e;H[4]=m;H[5]=n;H[6]=q;H[7]=p;H[8]=s;H[9]=u;z.Ge=A.tk?a:null;if(x.length)for(b=z.Jt,b.length=x.length,a=0,c=x.length;a<c;a++)b[a]=x[a];this.jd=!1}};a.prototype.clear=function(a,c,b,d){var e=this.Fe();e.type=7;e.be=0;e.Ma||(e.Ma=Nb());e.Ma[0]=a;e.Ma[1]=c;e.Ma[2]=b;e.Ma[3]=d;this.jd=!1};a.prototype.clearRect=function(a,c,b,d){if(!(0>b||0>d)){var e=this.Fe();e.type=7;e.be=1;e.Ma||(e.Ma=Nb());e.Ma[0]=a;e.Ma[1]=c;e.Ma[2]=b;e.Ma[3]=d;this.jd=
!1}};a.prototype.Ay=function(){this.Dh();this.P.flush()};var d=[],e={};a.prototype.Ds=function(a,c,b){var k;k=!0;c=!!c;var l=a.src+","+k+","+c+(k?",undefined":""),m=null;if("undefined"!==typeof a.src&&e.hasOwnProperty(l))return m=e[l],m.Fl++,m;this.Dh();var n=this.P,q=ja(a.width)&&ja(a.height),m=n.createTexture();n.bindTexture(n.TEXTURE_2D,m);n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0);var p=n.RGBA,s=n.RGBA,u=n.UNSIGNED_BYTE;if(b&&!this.Ho)switch(b){case 1:s=p=n.RGB;break;case 2:u=n.UNSIGNED_SHORT_4_4_4_4;
break;case 3:u=n.UNSIGNED_SHORT_5_5_5_1;break;case 4:s=p=n.RGB,u=n.UNSIGNED_SHORT_5_6_5}if(!q&&k){b=document.createElement("canvas");b.width=ka(a.width);b.height=ka(a.height);var x=b.getContext("2d");x.webkitImageSmoothingEnabled=c;x.mozImageSmoothingEnabled=c;x.msImageSmoothingEnabled=c;x.imageSmoothingEnabled=c;x.drawImage(a,0,0,a.width,a.height,0,0,b.width,b.height);n.texImage2D(n.TEXTURE_2D,0,p,s,u,b)}else n.texImage2D(n.TEXTURE_2D,0,p,s,u,a);k?(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.REPEAT),
n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.REPEAT)):(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE));c?(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),q?(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR_MIPMAP_LINEAR),n.generateMipmap(n.TEXTURE_2D)):n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR)):(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,
n.TEXTURE_MIN_FILTER,n.NEAREST));n.bindTexture(n.TEXTURE_2D,null);this.Lh=null;m.Nj=a.width;m.Mj=a.height;m.Fl=1;m.xr=l;d.push(m);return e[l]=m};a.prototype.Cg=function(a,c,b){var e;this.Dh();var l=this.P;this.Ho&&(e=!1);var m=l.createTexture();l.bindTexture(l.TEXTURE_2D,m);l.texImage2D(l.TEXTURE_2D,0,l.RGBA,a,c,0,l.RGBA,e?l.UNSIGNED_SHORT_4_4_4_4:l.UNSIGNED_BYTE,null);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE);l.texParameteri(l.TEXTURE_2D,
l.TEXTURE_MAG_FILTER,b?l.LINEAR:l.NEAREST);l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,b?l.LINEAR:l.NEAREST);l.bindTexture(l.TEXTURE_2D,null);this.Lh=null;m.Nj=a;m.Mj=c;d.push(m);return m};a.prototype.deleteTexture=function(a){a&&("undefined"!==typeof a.Fl&&1<a.Fl?a.Fl--:(this.Dh(),a===this.Lh&&(this.P.bindTexture(this.P.TEXTURE_2D,null),this.Lh=null),a===this.Mh&&(this.P.activeTexture(this.P.TEXTURE1),this.P.bindTexture(this.P.TEXTURE_2D,null),this.P.activeTexture(this.P.TEXTURE0),this.Mh=
null),ya(d,a),"undefined"!==typeof a.xr&&delete e[a.xr],this.P.deleteTexture(a)))};a.prototype.of=function(a){if(a!==this.yt){var c=this.Fe();c.type=6;this.yt=c.Ge=a;this.jd=!1}};Va=a})();
(function(){function a(a){if(a&&(a.getContext||a.dc)&&!a.c2runtime){a.c2runtime=this;var c=this;this.Go=/crosswalk/i.test(navigator.userAgent)||/xwalk/i.test(navigator.userAgent)||!("undefined"===typeof window.c2isCrosswalk||!window.c2isCrosswalk);this.Ii=!this.Go&&"undefined"!==typeof window.device&&("undefined"!==typeof window.device.cordova||"undefined"!==typeof window.device.phonegap);this.Qf=!!a.dc;this.ik="undefined"!==typeof window.AppMobi||this.Qf;this.Qd=!!window.c2cocoonjs;this.Rf=!!window.c2ejecta;
this.Qd&&(CocoonJS.App.onSuspended.addEventListener(function(){c.setSuspended(!0)}),CocoonJS.App.onActivated.addEventListener(function(){c.setSuspended(!1)}));this.Rf&&(document.addEventListener("pagehide",function(){c.setSuspended(!0)}),document.addEventListener("pageshow",function(){c.setSuspended(!1)}),document.addEventListener("resize",function(){c.setSize(window.innerWidth,window.innerHeight)}));this.jc=this.Qf||this.Qd||this.Rf;this.ps=/tizen/i.test(navigator.userAgent);this.os=/android/i.test(navigator.userAgent)&&
!this.ps;this.Ho=/msie/i.test(navigator.userAgent)||/trident/i.test(navigator.userAgent);this.km=/iphone/i.test(navigator.userAgent)||/ipod/i.test(navigator.userAgent);this.us=/ipad/i.test(navigator.userAgent);this.Ex=this.km||this.us||this.Rf;this.Fx=this.km&&/os\s6/i.test(navigator.userAgent);this.fm=/chrome/i.test(navigator.userAgent)||/chromium/i.test(navigator.userAgent);this.tx=/amazonwebappplatform/i.test(navigator.userAgent);this.yx=/firefox/i.test(navigator.userAgent);this.Ax=!this.fm&&/safari/i.test(navigator.userAgent);
this.Jg="undefined"!==typeof window.c2nodewebkit||/nodewebkit/i.test(navigator.userAgent);this.Cx=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);this.Dx=!("undefined"===typeof window.c2isWindows8Capable||!window.c2isWindows8Capable);this.Mo=!("undefined"===typeof window.c2isWindowsPhone8||!window.c2isWindowsPhone8);this.rs=!("undefined"===typeof window.c2isWindowsPhone81||!window.c2isWindowsPhone81);this.qs=this.Cx||this.Dx||this.rs;this.wx=!("undefined"===typeof window.c2isBlackberry10||
!window.c2isBlackberry10);this.ux=this.os&&!this.fm&&!this.yx&&!this.tx&&!this.jc;this.devicePixelRatio=1;this.Ig=this.Ii||this.Go||this.ik||this.Qd||this.os||this.Ex||this.Mo||this.rs||this.wx||this.ps||this.Rf;this.Ig||(this.Ig=/(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));"undefined"===typeof cr_is_preview||this.Jg||"?nw"!==window.location.search&&!/nodewebkit/i.test(navigator.userAgent)||(this.Jg=!0);this.xx="undefined"!==
typeof cr_is_preview&&-1<window.location.search.indexOf("debug");this.canvas=a;this.Cr=document.getElementById("c2canvasdiv");this.Na=this.$=this.P=null;this.ro="";this.Ul=!1;this.Zs=this.$s=0;this.canvas.oncontextmenu=function(a){a.preventDefault&&a.preventDefault();return!1};this.canvas.onselectstart=function(a){a.preventDefault&&a.preventDefault();return!1};this.Qf&&(window.c2runtime=this);this.Jg&&(window.OA=function(a){a.preventDefault();return!1},window.PA=function(a){a.preventDefault();return!1},
require("nw.gui").App.clearCache());this.width=a.width;this.height=a.height;this.ya=this.width;this.xa=this.height;this.Ml=this.width;this.Ll=this.height;this.ok=window.innerWidth;this.nk=window.innerHeight;this.ub=!0;this.kk=!1;Date.now||(Date.now=function(){return+new Date});this.plugins=[];this.types={};this.Q=[];this.Db=[];this.Yo={};this.we=[];this.io={};this.Kf=[];this.jq=[];this.cn=[];this.uv=[];this.vv=[];this.Se=new ca;this.Io=!1;this.Sf=0;this.Ko=!1;this.gd=[];this.Wf=this.Kc=this.um=this.Up=
"";this.Xk=this.Lt=!1;this.Xn=this.vk=this.Dg=this.la=0;this.gi=1;this.Ni=new Na;this.pm=0;this.Rs=!0;this.Im=this.Wl=this.jo=this.dh=this.pk=this.qo=0;this.Rn=null;this.Ql=[];this.ho=[];this.Rl=-1;this.ep=[[]];this.bq=this.xm=0;this.Kp(null);this.Tj=this.Ws=this.Jk=0;this.Vm=[];this.Zm=this.Nm=-1;this.lm=!0;this.wm=0;this.jk=!1;this.Sy=0;this.kx=!1;this.So=0;this.Hg=this.yo=this.Lp=!1;this.Ys=new ca;this.Ap=new ca;this.xt=[];new Pa([]);new Pa([]);this.xi=[];this.em={};this.Bi={};this.wi={};this.nj=
{};this.ur={};this.Cs=this.tm=this.kd=this.xd=this.Bs=this.rm=this.Pa=null;this.kj=this.No=!1;this.so=[null,null];this.Fh=0;this.Sg={};this.Tm=this.Oi=null;this.load();this.devicePixelRatio=(this.Kh=(!this.jc||this.Rf)&&this.fz&&!this.ux)?window.devicePixelRatio||window.webkitDevicePixelRatio||window.mozDevicePixelRatio||window.msDevicePixelRatio||1:1;this.pc();var b,d=this.Kn&&!(this.Jg||this.qs||this.Mo||this.Go);0<this.hd&&this.setSize(window.innerWidth,window.innerHeight,!0);try{this.hw&&(this.Qd||
this.Rf||!this.jc)&&(b={alpha:d,depth:!1,antialias:!1,failIfMajorPerformanceCaveat:!0},this.P=a.getContext("webgl",b)||a.getContext("experimental-webgl",b))}catch(e){}if(this.P){this.jc||(this.lc=document.createElement("canvas"),jQuery(this.lc).appendTo(this.canvas.parentNode),this.lc.oncontextmenu=v(!1),this.lc.onselectstart=v(!1),this.lc.width=this.Ml,this.lc.height=this.Ll,jQuery(this.lc).css({width:this.Ml+"px",height:this.Ll+"px"}),this.lt(),this.Ep=this.lc.getContext("2d"));this.$=new Va(this.P,
this.Ig);this.$.ij(a.width,a.height);this.Na=null;this.canvas.addEventListener("webglcontextlost",function(a){a.preventDefault();c.ny();console.log("[Construct 2] WebGL context lost");window.cr_setSuspended(!0)},!1);this.canvas.addEventListener("webglcontextrestored",function(){c.$.ks();c.$.ij(c.$.width,c.$.height,!0);c.xd=null;c.kd=null;c.so[0]=null;c.so[1]=null;c.oy();c.ub=!0;console.log("[Construct 2] WebGL context restored");window.cr_setSuspended(!1)},!1);var g,f,h,k,l,m;a=0;for(b=this.Q.length;a<
b;a++)for(f=this.Q[a],d=0,g=f.fa.length;d<g;d++)k=f.fa[d],k.mc=this.$.xo(k.id),this.kj=this.kj||this.$.Rk(k.mc);a=0;for(b=this.we.length;a<b;a++){l=this.we[a];d=0;for(g=l.fa.length;d<g;d++)k=l.fa[d],k.mc=this.$.xo(k.id);d=0;for(g=l.za.length;d<g;d++)for(m=l.za[d],f=0,h=m.fa.length;f<h;f++)k=m.fa[f],k.mc=this.$.xo(k.id),this.kj=this.kj||this.$.Rk(k.mc)}}else{if(0<this.hd&&this.Qf){this.canvas=null;document.oncontextmenu=v(!1);document.onselectstart=v(!1);this.Na=AppMobi.canvas.getContext("2d");try{this.Na.samplingMode=
this.Oa?"smooth":"sharp",this.Na.globalScale=1,this.Na.HTML5CompatibilityMode=!0,this.Na.imageSmoothingEnabled=this.Oa}catch(C){}0!==this.width&&0!==this.height&&(this.Na.width=this.width,this.Na.height=this.height)}this.Na||(b=this.Qd?{antialias:!!this.Oa,alpha:d}:{alpha:d},this.Na=a.getContext("2d",b),this.Na.webkitImageSmoothingEnabled=this.Oa,this.Na.mozImageSmoothingEnabled=this.Oa,this.Na.msImageSmoothingEnabled=this.Oa,this.Na.imageSmoothingEnabled=this.Oa);this.Ep=this.lc=null}this.Ym=function(){c.fi(!1)};
window==window.top||this.jc||this.qs||this.Mo||(document.addEventListener("mousedown",function(){window.focus()},!0),document.addEventListener("touchstart",function(){window.focus()},!0));"undefined"!==typeof cr_is_preview&&(this.Qd&&console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"),-1<window.location.search.indexOf("continuous")&&(da("Reloading for continuous preview"),this.um="__c2_continuouspreview",this.Xk=!0),this.wy&&!this.Ig&&(jQuery(window).focus(function(){c.setSuspended(!1)}),
jQuery(window).blur(function(){c.setSuspended(!0)})));0===this.hd&&this.Kh&&1<this.devicePixelRatio&&this.setSize(this.cc,this.ac,!0);this.Vt();this.go();this.ha={}}}function b(a){a.target.result.createObjectStore("saves",{keyPath:"slot"})}function c(a,c,d,e){var g=indexedDB.open("_C2SaveStates");g.onupgradeneeded=b;g.onerror=e;g.onsuccess=function(b){b=b.target.result;b.onerror=e;b.transaction(["saves"],"readwrite").objectStore("saves").put({slot:a,data:c}).onsuccess=d}}function d(a,c,d){var e=indexedDB.open("_C2SaveStates");
e.onupgradeneeded=b;e.onerror=d;e.onsuccess=function(b){b=b.target.result;b.onerror=d;var e=b.transaction(["saves"]).objectStore("saves").get(a);e.onsuccess=function(){e.result?c(e.result.data):c(null)}}}function e(){da("Reloading for continuous preview");window.c2cocoonjs?CocoonJS.App.reload():-1<window.location.search.indexOf("continuous")?window.location.reload(!0):window.location+="?continuous"}function g(a){var c,b={};for(c in a)!a.hasOwnProperty(c)||a[c]instanceof ca||a[c]&&"undefined"!==typeof a[c].Ne||
(b[c]=a[c]);return b}a.prototype.setSize=function(a,c,b){var d=0,e=0,g=0,f=0,f=0,h=this.Fx&&this.Ax&&!navigator.standalone&&!this.jc&&!this.Ii;h&&(c+=60);if(this.ok!==a||this.nk!==c||b){this.ok=a;this.nk=c;var k=this.hd,l=document.mozFullScreen||document.webkitIsFullScreen||!!document.msFullscreenElement||document.fullScreen||this.jk;if(l||0!==this.hd||b)l&&0<this.Fh&&(k=this.Fh),4<=k?(b=this.cc/this.ac,a/c>b?(g=c*b,5===k?(f=g/this.cc,1<f?f=Math.floor(f):1>f&&(f=1/Math.ceil(1/f)),g=this.cc*f,f*=this.ac,
d=(a-g)/2,e=(c-f)/2,a=g,c=f):(d=(a-g)/2,a=g)):(f=a/b,5===k?(f/=this.ac,1<f?f=Math.floor(f):1>f&&(f=1/Math.ceil(1/f)),g=this.cc*f,f*=this.ac,d=(a-g)/2,e=(c-f)/2,a=g):e=(c-f)/2,c=f),l&&!this.Jg&&(e=d=0),d=Math.floor(d),e=Math.floor(e),a=Math.floor(a),c=Math.floor(c)):this.Jg&&this.jk&&0===this.Wr&&(d=Math.floor((a-this.cc)/2),e=Math.floor((c-this.ac)/2),a=this.cc,c=this.ac),2>k&&(this.Lj=this.devicePixelRatio),this.Kh&&this.us&&1<this.devicePixelRatio&&(1024<=a&&(a=1023),1024<=c&&(c=1023)),l=this.devicePixelRatio,
this.Ml=a,this.Ll=c,this.width=Math.round(a*l),this.height=Math.round(c*l),this.ub=!0,this.fu?(this.ya=this.width,this.xa=this.height,this.Od=!0):this.width<this.cc&&this.height<this.ac||1===k?(this.ya=this.width,this.xa=this.height,this.Od=!0):(this.ya=this.cc,this.xa=this.ac,this.Od=!1,2===k?(b=this.cc/this.ac,k=this.ok/this.nk,k<b?this.ya=this.xa*k:k>b&&(this.xa=this.ya/k)):3===k&&(b=this.cc/this.ac,k=this.ok/this.nk,k>b?this.ya=this.xa*k:k<b&&(this.xa=this.ya/k))),this.Cr&&!this.jc&&(jQuery(this.Cr).css({width:a+
"px",height:c+"px","margin-left":d,"margin-top":e}),"undefined"!==typeof cr_is_preview&&jQuery("#borderwrap").css({width:a+"px",height:c+"px"})),this.canvas&&(this.canvas.width=Math.round(a*l),this.canvas.height=Math.round(c*l),this.Rf?(this.canvas.style.left=d+"px",this.canvas.style.top=e+"px",this.canvas.style.width=a+"px",this.canvas.style.height=c+"px"):this.Kh&&!this.jc&&jQuery(this.canvas).css({width:a+"px",height:c+"px"})),this.lc&&(this.lc.width=a,this.lc.height=c,jQuery(this.lc).css({width:a+
"px",height:c+"px"})),this.$&&this.$.ij(Math.round(a*l),Math.round(c*l)),this.Qf&&this.Na&&(this.Na.width=a,this.Na.height=c),this.Na&&(this.Na.webkitImageSmoothingEnabled=this.Oa,this.Na.mozImageSmoothingEnabled=this.Oa,this.Na.msImageSmoothingEnabled=this.Oa,this.Na.imageSmoothingEnabled=this.Oa),this.Vt(),this.jc||!h&&!this.km||window.setTimeout(function(){window.scrollTo(0,1)},100)}};a.prototype.Vt=function(){if(this.xv&&0!==this.Dp){var a="portrait";2===this.Dp&&(a="landscape");screen.lockOrientation?
screen.lockOrientation(a):screen.webkitLockOrientation?screen.webkitLockOrientation(a):screen.mozLockOrientation?screen.mozLockOrientation(a):screen.msLockOrientation&&screen.msLockOrientation(a)}};a.prototype.ny=function(){this.No=!0;var a,c,b;a=0;for(c=this.Q.length;a<c;a++)b=this.Q[a],b.at&&b.at()};a.prototype.oy=function(){this.No=!1;var a,c,b;a=0;for(c=this.Q.length;a<c;a++)b=this.Q[a],b.dt&&b.dt()};a.prototype.lt=function(){if(!this.jc){var a=document.mozFullScreen||document.webkitIsFullScreen||
document.fullScreen||document.msFullscreenElement||this.jk?jQuery(this.canvas).offset():jQuery(this.canvas).position();a.position="absolute";jQuery(this.lc).css(a)}};var f=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.msCancelAnimationFrame||window.oCancelAnimationFrame;a.prototype.setSuspended=function(a){var c;if(a&&!this.kk)for(da("[Construct 2] Suspending"),this.kk=!0,-1!==this.Nm&&f&&f(this.Nm),-1!==this.Zm&&clearTimeout(this.Zm),a=0,c=
this.Vm.length;a<c;a++)this.Vm[a](!0);else if(!a&&this.kk){da("[Construct 2] Resuming");this.kk=!1;this.pm=Ma();this.pk=Ma();a=this.vk=this.Wl=0;for(c=this.Vm.length;a<c;a++)this.Vm[a](!1);this.fi(!1)}};a.prototype.load=function(){var a=Sb();this.name=a[0];this.Vr=a[1];this.hd=a[11];this.Wr=a[11];this.cc=a[9];this.ac=a[10];this.ht=this.cc/2;this.it=this.ac/2;this.jc&&!this.Rf&&(4<=a[11]||0===a[11])&&(da("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"),
this.Wr=this.hd=3);this.gq=a[17];this.qk=a[18];0===this.qk&&(this.Oi=new Image,this.Oi.src="loading-logo.png");this.Jk=a[20];this.qf=new N(this);var c,b,d,e,g,f,h,k,l;c=0;for(b=a[2].length;c<b;c++)h=a[2][c],Wa(h),l=new h[0](this),l.Sm=h[1],l.Kg=h[2],l.Ts=h[9],l.kc&&l.kc(),this.plugins.push(l);a=Sb();c=0;for(b=a[3].length;c<b;c++){h=a[3][c];g=h[1];l=null;d=0;for(e=this.plugins.length;d<e;d++)if(this.plugins[d]instanceof g){l=this.plugins[d];break}var m=new l.yf(l);m.name=h[0];m.Ca=h[2];m.Eo=h[3].slice(0);
m.iz=h[3].length;m.Bv=h[4];m.Jw=h[5];m.Ia=h[11];m.Ca?(m.Ss=[],m.Mf=this.Tj++,m.eb=null):(m.Ss=null,m.Mf=-1,m.eb=[]);m.Sl=null;m.Fi=null;m.Rr=null;m.ve=!1;m.fd=null;h[6]?(m.Qt=h[6][0],m.Rt=h[6][1],m.Yp=h[6][2]):(m.Qt=null,m.Rt=0,m.Yp=0);m.GA=h[7]?h[7]:null;m.index=c;m.A=[];m.Ol=[];m.ah=[new Xa(m)];m.If=0;m.Te=null;m.Kv=0;m.jj=!0;m.dn=Ya;m.Mw=Za;m.Qw=$a;m.lb=ab;m.Sk=bb;m.Jp=cb;m.fj=db;m.Yl=eb;m.to=fb;m.vo=gb;m.uh=hb;m.as=ib;m.Dr=new Qa(this.cc,this.ac);m.ir=!0;m.jr=!1;m.ha={};m.toString=kb;m.Db=[];
d=0;for(e=h[8].length;d<e;d++){k=h[8][d];var C=k[1],B=null;g=0;for(f=this.Db.length;g<f;g++)if(this.Db[g]instanceof C){B=this.Db[g];break}B||(B=new C(this),B.Vs=[],B.zp=new ca,B.kc&&B.kc(),this.Db.push(B));-1===B.Vs.indexOf(m)&&B.Vs.push(m);g=new B.yf(B,m);g.name=k[0];g.Ia=k[2];g.kc();m.Db.push(g)}m.global=h[9];m.Jo=h[10];m.fa=[];d=0;for(e=h[12].length;d<e;d++)m.fa.push({id:h[12][d][0],name:h[12][d][1],mc:-1,sc:!0,index:d});m.WA=h[13];this.gq&&!m.Ca&&!m.Jo&&l.Kg||m.kc();m.name&&(this.types[m.name]=
m);this.Q.push(m);l.Sm&&(d=new l.Id(m),d.uid=this.Jk++,d.st=this.Ws++,d.Hh=0,d.ck=lb,d.toString=mb,d.Ac=h[14],d.kc(),m.A.push(d),this.Sg[d.uid.toString()]=d)}c=0;for(b=a[4].length;c<b;c++)for(g=a[4][c],f=this.Q[g[0]],d=1,e=g.length;d<e;d++)h=this.Q[g[d]],h.eb.push(f),f.Ss.push(h);c=0;for(b=a[23].length;c<b;c++){g=a[23][c];f=[];d=0;for(e=g.length;d<e;d++)f.push(this.Q[g[d]]);d=0;for(e=f.length;d<e;d++)f[d].ve=!0,f[d].fd=f}if(0<this.Tj)for(c=0,b=this.Q.length;c<b;c++)if(h=this.Q[c],!h.Ca&&h.eb.length){h.Sl=
Array(this.Tj);h.Fi=Array(this.Tj);h.Rr=Array(this.Tj);m=[];d=B=C=k=0;for(e=h.eb.length;d<e;d++)for(l=h.eb[d],h.Sl[l.Mf]=k,k+=l.iz,h.Fi[l.Mf]=C,C+=l.Bv,h.Rr[l.Mf]=B,B+=l.Jw,g=0,f=l.fa.length;g<f;g++)m.push(va({},l.fa[g]));h.fa=m.concat(h.fa);d=0;for(e=h.fa.length;d<e;d++)h.fa[d].index=d}c=0;for(b=a[5].length;c<b;c++)h=a[5][c],d=new nb(this,h),this.Yo[d.name]=d,this.we.push(d);c=0;for(b=a[6].length;c<b;c++)h=a[6][c],d=new ob(this,h),this.io[d.name]=d,this.Kf.push(d);c=0;for(b=this.Kf.length;c<b;c++)this.Kf[c].Ab();
c=0;for(b=this.Kf.length;c<b;c++)this.Kf[c].au();c=0;for(b=this.cn.length;c<b;c++)this.cn[c].Ab();this.cn.length=0;this.Pk=a[8];this.Lj=1;this.hw=a[12];this.Oa=a[13];this.Kn=a[14];this.fz=a[16];this.Dp=a[19];this.xv=0<this.Dp;this.wy=a[21];this.Od=this.fu=a[22];this.Um=Date.now()};var h=!1;a.prototype.jz=function(a){a.onerror=function(c){h=a.Dv=!0;console&&console.error&&console.error("Error loading image '"+a.src+"': ",c)};this.jq.push(a)};a.prototype.kr=function(){var a=0,c=0,b=!0,d,e,g;d=0;for(e=
this.jq.length;d<e;d++){g=this.jq[d];var f=g.Hv;if(!f||0>=f)f=5E4;a+=f;!g.complete&&!g.loaded||g.Dv?b=!1:c+=f}this.ci=0==a?0:c/a;return b};a.prototype.go=function(){if(this.Na||this.$){var a=this.Na||this.Ep;this.lc&&this.lt();this.ci=0;this.As=-1;if(this.kr())this.ix();else{var c=Date.now()-this.Um;if(a){var b=this.width,d=this.height,e=this.devicePixelRatio;this.lc&&(b=this.Ml,d=this.Ll,e=1);if(3!==this.qk&&(this.Qd||500<=c&&this.As!=this.ci)){a.clearRect(0,0,b,d);var c=b/2,d=d/2,b=0===this.qk&&
this.Oi.complete,g=40*e,f=0,k=80*e,l;b&&(k=this.Oi.width*e,l=this.Oi.height*e,g=k/2,f=l/2,a.drawImage(this.Oi,qa(c-g),qa(d-f),k,l));1>=this.qk?(c=qa(c-g)+0.5,d=qa(d+(f+(b?12*e:0)))+0.5,a.fillStyle=h?"red":"DodgerBlue",a.fillRect(c,d,Math.floor(k*this.ci),6*e),a.strokeStyle="black",a.strokeRect(c,d,k,6*e),a.strokeStyle="white",a.strokeRect(c-1*e,d-1*e,k+2*e,8*e)):2===this.qk&&(a.font=this.Rf?"12pt ArialMT":"12pt Arial",a.fillStyle=h?"#f00":"#999",a.VA="middle",e=Math.round(100*this.ci)+"%",b=a.measureText?
a.measureText(e):null,a.fillText(e,c-(b?b.width:0)/2,d))}this.As=this.ci}setTimeout(function(a){return function(){a.go()}}(this),this.Qd?10:100)}}};a.prototype.ix=function(){this.lc&&(this.canvas.parentNode.removeChild(this.lc),this.lc=this.Ep=null);this.Um=Date.now();this.pk=Ma();var a,c,b;if(this.gq)for(a=0,c=this.Q.length;a<c;a++)b=this.Q[a],b.Ca||b.Jo||!b.zc.Kg||b.kc();else this.lm=!1;a=0;for(c=this.we.length;a<c;a++)this.we[a].Iv();2<=this.hd&&(a=this.cc/this.ac,c=this.width/this.height,this.Lj=
2!==this.hd&&c>a||2===this.hd&&c<a?this.height/this.ac:this.width/this.cc);this.Vr?this.Yo[this.Vr].Vp():this.we[0].Vp();this.gq||(this.wm=1,this.trigger(N.prototype.wa.Dq,null));navigator.splashscreen&&navigator.splashscreen.hide&&navigator.splashscreen.hide();a=0;for(c=this.Q.length;a<c;a++)b=this.Q[a],b.my&&b.my();this.fi(!1);this.Qf&&AppMobi.webview.execute("onGameReady();")};var k=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||
window.oRequestAnimationFrame;a.prototype.fi=function(a){if(this.Pa){var c=Ma();if(this.kx&&this.Lp&&29>c-this.So)this.Lp=!1,this.So=c,k?this.Nm=k(this.Ym,this.canvas):this.Zm=setTimeout(this.Ym,this.Ig?1:16);else{this.Lp=!0;this.So=c;var b=this.hd,d=document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement;(d||this.jk)&&0<this.Fh&&(b=this.Fh);if(0<b&&(!this.km||window.self!==window.top)){var b=window.innerWidth,e=window.innerHeight;this.ok===b&&this.nk===
e||this.setSize(b,e)}this.jc||(d?(this.Ul||(this.ro=jQuery(this.canvas).css("margin")||"0",this.Ul=!0),this.fm||this.Jg||jQuery(this.canvas).css({"margin-left":""+Math.floor((screen.width-this.width/this.devicePixelRatio)/2)+"px","margin-top":""+Math.floor((screen.height-this.height/this.devicePixelRatio)/2)+"px"})):this.Ul?(this.fm||this.Jg||jQuery(this.canvas).css("margin",this.ro),this.ro="",this.Ul=!1,0===this.hd&&this.setSize(Math.round(this.$s/this.devicePixelRatio),Math.round(this.Zs/this.devicePixelRatio),
!0)):(this.$s=this.width,this.Zs=this.height));this.lm&&(d=this.kr(),this.wm=this.ci,d&&(this.lm=!1,this.ci=1,this.trigger(N.prototype.wa.Dq,null)));this.Kx();!this.ub&&!this.Qd||this.No||this.Xk||a||(this.ub=!1,this.$?this.Ue():this.Bh(),this.Tm&&(this.canvas&&this.canvas.toDataURL&&(this.canvas.toDataURL(this.Tm[0],this.Tm[1]),this.trigger(N.prototype.wa.Gu,null)),this.Tm=null));this.NA||(this.dh++,this.jo++,this.Wl++);this.vk+=Ma()-c;this.kk||a||(k?this.Nm=k(this.Ym,this.canvas):this.Zm=setTimeout(this.Ym,
this.Ig?1:16))}}};a.prototype.Kx=function(){var a,c,b,d,e,g,f,h,k;a=Ma();1E3<=a-this.pk&&(this.pk+=1E3,this.qo=this.Wl,this.Wl=0,this.Xn=this.vk,this.vk=0);this.Rs&&(0!==this.pm&&(c=a-this.pm,0!==c||this.xx?(this.Dg=c/1E3,0.5<this.Dg?this.Dg=0:0.1<this.Dg&&(this.Dg=0.1)):(10<=this.YA&&(this.Rs=!1),this.Dg=1/60)),this.pm=a);this.la=this.Dg*this.gi;this.Ni.add(this.la);a=document.mozFullScreen||document.webkitIsFullScreen||document.fullScreen||!!document.msFullscreenElement||this.jk;2<=this.hd||a&&
0<this.Fh?(c=this.cc/this.ac,b=this.width/this.height,d=this.hd,a&&0<this.Fh&&(d=this.Fh),this.Lj=2!==d&&b>c||2===d&&b<c?this.height/this.ac:this.width/this.cc,this.Pa&&(this.Pa.Et(this.Pa.scrollX),this.Pa.Ft(this.Pa.scrollY))):this.Lj=this.Kh?this.devicePixelRatio:1;this.pc();this.Sf++;this.qf.Gy();this.Sf--;this.pc();this.Sf++;a=0;for(c=this.Q.length;a<c;a++)if(f=this.Q[a],!f.Ca&&(f.Db.length||f.eb.length))for(b=0,d=f.A.length;b<d;b++)for(h=f.A[b],e=0,g=h.ta.length;e<g;e++)h.ta[e].fi();a=0;for(c=
this.Q.length;a<c;a++)if(f=this.Q[a],!f.Ca&&(f.Db.length||f.eb.length))for(b=0,d=f.A.length;b<d;b++)for(h=f.A[b],e=0,g=h.ta.length;e<g;e++)k=h.ta[e],k.zy&&k.zy();b=this.Ys.lj();a=0;for(c=b.length;a<c;a++)b[a].fi();this.Sf--;this.lx();for(a=0;this.Rn&&10>a++;)this.Pr(this.Rn);a=0;for(c=this.Kf.length;a<c;a++)this.Kf[a].Ao=!1;this.Pa.Rj&&this.Pa.Rj.Qb();this.xt.length=0;this.Sf++;a=0;for(c=this.Q.length;a<c;a++)if(f=this.Q[a],!f.Ca&&(f.Db.length||f.eb.length))for(b=0,d=f.A.length;b<d;b++)for(h=f.A[b],
e=0,g=h.ta.length;e<g;e++)k=h.ta[e],k.Zp&&k.Zp();b=this.Ap.lj();a=0;for(c=b.length;a<c;a++)b[a].Zp();this.Sf--};a.prototype.Pr=function(a){var c=this.Pa;this.Pa.Uy();var b,d,e,g,f,h,k;if(this.$)for(b=0,d=this.Q.length;b<d;b++)f=this.Q[b],f.Ca||!f.Zt||f.global&&0!==f.A.length||-1!==a.hk.indexOf(f)||f.Zt();c==a&&(this.qf.pd.length=0);a.Vp();b=0;for(d=this.Q.length;b<d;b++)if(f=this.Q[b],f.global||f.zc.Sm)for(a=0,c=f.A.length;a<c;a++)if(h=f.A[a],h.Bp&&h.Bp(),h.ta)for(e=0,g=h.ta.length;e<g;e++)k=h.ta[e],
k.Bp&&k.Bp();this.ub=!0;this.pc()};a.prototype.Yy=function(a){this.Ap.add(a)};a.prototype.Zr=function(a){return a&&-1!==a.Ik?this.Dg*a.Ik:this.la};a.prototype.Bh=function(){this.Pa.Bh(this.Na);this.Qf&&this.Na.present()};a.prototype.Ue=function(){this.Pa.Ue(this.$);this.$.Ay()};a.prototype.rv=function(a){a&&this.Ql.push(a)};a.prototype.Ey=function(a){ya(this.Ql,a)};a.prototype.ak=function(a){a=a.toString();return this.Sg.hasOwnProperty(a)?this.Sg[a]:null};a.prototype.ni=function(a){var c,b;if(!this.Se.contains(a)){this.Se.add(a);
if(a.ve)for(c=0,b=a.siblings.length;c<b;c++)this.ni(a.siblings[c]);this.Io&&this.Se.mj.push(a);this.Sf++;this.trigger(Object.getPrototypeOf(a.type.zc).wa.Iu,a);this.Sf--}};a.prototype.pc=function(){var a,c,b,d,e,g,f,h,k,l;this.Io=!0;d=0;for(g=this.gd.length;d<g;d++)for(a=this.gd[d],c=a.type,c.A.push(a),e=0,f=c.eb.length;e<f;e++)c.eb[e].A.push(a),c.eb[e].jj=!0;this.gd.length=0;g=this.Se.lj();for(d=0;d<g.length;d++){a=g[d];c=a.type;b=c.A;e=0;for(f=this.Ql.length;e<f;e++)this.Ql[e](a);ya(b,a);0===b.length&&
(c.jr=!1);a.Gl&&c.Dr.update(a,a.Gl,null);a.O&&(wa(a.O.A,a.wd()),a.O.qd=!0);e=0;for(f=c.eb.length;e<f;e++)ya(c.eb[e].A,a),c.eb[e].jj=!0;if(a.ta)for(e=0,f=a.ta.length;e<f;e++)b=a.ta[e],b.Kk&&b.Kk(),b.nb.zp.remove(a);this.Ys.remove(a);this.Ap.remove(a);e=0;for(f=this.qf.pd.length;e<f;e++)if(k=this.qf.pd[e],k.od.hasOwnProperty(c.index)&&ya(k.od[c.index].Jh,a),!c.Ca)for(b=0,h=c.eb.length;b<h;b++)l=c.eb[b],k.od.hasOwnProperty(l.index)&&ya(k.od[l.index].Jh,a);a.Kk&&a.Kk();this.Sg.hasOwnProperty(a.uid.toString())&&
delete this.Sg[a.uid.toString()];this.Im--;64>c.Ol.length&&c.Ol.push(a);c.jj=!0}this.Se.ue()||(this.ub=!0);this.Se.clear();this.Io=!1};var l=[];a.prototype.zh=function(a,c,b,d,e,g){var f,h,k,m;if(!a)return null;var E=this.Q[a[1]],C=E.zc.Kg;if(this.lm&&C&&!E.Jo||C&&!this.$&&11===a[0][11])return null;var B=c;C||(c=null);var w;E.Ol.length?(w=E.Ol.pop(),w.mg=!0,E.zc.Id.call(w,E)):(w=new E.zc.Id(E),w.mg=!1);w.uid=b&&!g?a[2]:this.Jk++;this.Sg[w.uid.toString()]=w;w.st=this.Ws++;w.Hh=E.A.length;f=0;for(h=
this.gd.length;f<h;++f)this.gd[f].type===E&&w.Hh++;w.ck=lb;k=a[3];if(w.mg)La(w.ha);else{w.ha={};if("undefined"!==typeof cr_is_preview)for(w.ns=[],w.ns.length=k.length,f=0,h=k.length;f<h;f++)w.ns[f]=k[f][1];w.Ob=[];w.Ob.length=k.length}f=0;for(h=k.length;f<h;f++)w.Ob[f]=k[f][0];if(C){var D=a[0];w.x=fa(d)?D[0]:d;w.y=fa(e)?D[1]:e;w.z=D[2];w.width=D[3];w.height=D[4];w.depth=D[5];w.N=D[6];w.opacity=D[7];w.ek=D[8];w.fk=D[9];w.Vc=D[10];f=D[11];!this.$&&E.fa.length&&(w.Vc=f);w.Oj=Ra(w.Vc);this.P&&Sa(w,w.Vc,
this.P);if(w.mg){f=0;for(h=D[12].length;f<h;f++)for(k=0,m=D[12][f].length;k<m;k++)w.ob[f][k]=D[12][f][k];w.Uc.set(0,0,0,0);w.Gl.set(0,0,-1,-1);w.Ic.Rm(w.Uc);w.Nn.length=0}else{w.ob=D[12].slice(0);f=0;for(h=w.ob.length;f<h;f++)w.ob[f]=D[12][f].slice(0);w.Fa=[];w.yg=[];w.yg.length=E.fa.length;w.Uc=new ta(0,0,0,0);w.Gl=new ta(0,0,-1,-1);w.Ic=new ua;w.Nn=[];w.Rb=pb;w.FA=qb;w.Qe=rb;w.Tb=sb;w.XA=tb;w.wd=ub}w.Zk=!1;w.az=0;w.$y=0;w.Zy=null;14===D.length&&(w.Zk=!0,w.az=D[13][0],w.$y=D[13][1],w.Zy=D[13][2]);
f=0;for(h=E.fa.length;f<h;f++)w.yg[f]=!0;w.qg=vb;w.qg();w.cu=!!w.Fa.length;w.Mn=!0;w.Qn=!0;E.ir=!0;w.visible=!0;w.Ik=-1;w.O=c;w.ii=c.A.length;"undefined"===typeof w.Pe&&(w.Pe=null);this.ub=w.Ci=!0}w.toString=mb;var F;f=l.length=0;for(h=E.eb.length;f<h;f++)l.push.apply(l,E.eb[f].Db);l.push.apply(l,E.Db);if(w.mg)for(f=0,h=l.length;f<h;f++){var G=l[f];F=w.ta[f];F.mg=!0;G.nb.Id.call(F,G,w);D=a[4][f];k=0;for(m=D.length;k<m;k++)F.Ac[k]=D[k];F.kc();G.nb.zp.add(w)}else for(w.ta=[],f=0,h=l.length;f<h;f++)G=
l[f],F=new G.nb.Id(G,w),F.mg=!1,F.Ac=a[4][f].slice(0),F.kc(),w.ta.push(F),G.nb.zp.add(w);D=a[5];if(w.mg)for(f=0,h=D.length;f<h;f++)w.Ac[f]=D[f];else w.Ac=D.slice(0);this.gd.push(w);c&&(c.A.push(w),1!==c.ig||1!==c.jg)&&(E.jr=!0);this.Im++;if(E.ve){if(w.ve=!0,w.mg?w.siblings.length=0:w.siblings=[],!b&&!g){f=0;for(h=E.fd.length;f<h;f++)if(E.fd[f]!==E){if(!E.fd[f].Te)return null;w.siblings.push(this.zh(E.fd[f].Te,B,!1,C?w.x:d,C?w.y:e,!0))}f=0;for(h=w.siblings.length;f<h;f++)for(w.siblings[f].siblings.push(w),
k=0;k<h;k++)f!==k&&w.siblings[f].siblings.push(w.siblings[k])}}else w.ve=!1,w.siblings=null;w.kc();f=0;for(h=w.ta.length;f<h;f++)w.ta[f].mt&&w.ta[f].mt();return w};a.prototype.wo=function(a){var c,b;c=0;for(b=this.Pa.za.length;c<b;c++){var d=this.Pa.za[c];if(Ua(d.name,a))return d}return null};a.prototype.$j=function(a){a=qa(a);0>a&&(a=0);a>=this.Pa.za.length&&(a=this.Pa.za.length-1);return this.Pa.za[a]};a.prototype.Sn=function(a){var c,b;c=0;for(b=a.length;c<b;c++)a[c].lb().Ib=!0};a.prototype.Sk=
function(a){var c,b;c=0;for(b=a.length;c<b;c++)a[c].Sk()};a.prototype.Jp=function(a){var c,b;c=0;for(b=a.length;c<b;c++)a[c].Jp()};a.prototype.fj=function(a){var c,b;c=0;for(b=a.length;c<b;c++)a[c].fj()};a.prototype.Xy=function(a,c,b){var d=a.lb(),e,g,f,h,k,l;if(d.Ib)for(d.Ib=!1,e=d.A.length=0,h=a.A.length;e<h;e++)f=a.A[e],f.Tb(),k=f.O.dd(c,b,!0),l=f.O.dd(c,b,!1),f.Qe(k,l)&&d.A.push(f);else{e=g=0;for(h=d.A.length;e<h;e++)f=d.A[e],f.Tb(),k=f.O.dd(c,b,!0),l=f.O.dd(c,b,!1),f.Qe(k,l)&&(d.A[g]=d.A[e],
g++);d.A.length=g}a.uh();return d.zo()};new ua;new ta(0,0,0,0);a.prototype.Wt=function(a,c){if(!c)return!1;var b,d,e,g,f;b=0;for(d=a.Db.length;b<d;b++)if(a.Db[b].nb instanceof c)return!0;if(!a.Ca)for(b=0,d=a.eb.length;b<d;b++)for(f=a.eb[b],e=0,g=f.Db.length;e<g;e++)if(f.Db[e].nb instanceof c)return!0;return!1};a.prototype.Xt=function(a){return this.Wt(a,Kb.Xz)};a.prototype.cq=function(a){return this.Wt(a,Kb.Zz)};a.prototype.Dy=function(a,c){a.Ci&&c.Ci&&this.xt.push([a,c])};var m=-1;a.prototype.trigger=
function(a,c,b){if(!this.Pa)return!1;var d=this.Pa.Rj;if(!d)return!1;var e=!1,g,f,h;m++;var k=d.co;f=0;for(h=k.length;f<h;++f)g=this.Tt(a,c,k[f],b),e=e||g;g=this.Tt(a,c,d,b);m--;return e||g};a.prototype.Tt=function(a,c,b,d){var e=!1,g,f,h,k;if(c)for(h=this.aq(a,c,c.type.name,b,d),e=e||h,k=c.type.eb,g=0,f=k.length;g<f;++g)h=this.aq(a,c,k[g].name,b,d),e=e||h;else h=this.aq(a,c,"system",b,d),e=e||h;return e};a.prototype.aq=function(a,c,b,d,e){var g,f=!1,h=!1,h="undefined"!==typeof e,k=(h?d.Tr:d.Ut)[b];
if(!k)return f;var l=null;d=0;for(g=k.length;d<g;++d)if(k[d].method==a){l=k[d].Sj;break}if(!l)return f;a=h?l[e]:l;if(!a)return null;d=0;for(g=a.length;d<g;d++)e=a[d][0],h=a[d][1],h=this.Hw(c,b,e,h),f=f||h;return f};a.prototype.Hw=function(a,c,b,d){var e,g,f=!1;this.bq++;var h=this.vd().Re;h&&this.Sk(h.Zg);var k=1<this.bq;this.Sk(b.Zg);k&&this.Cy();var l=this.Kp(b);l.Re=b;a&&(e=this.types[c].lb(),e.Ib=!1,e.A.length=1,e.A[0]=a,this.types[c].uh());a=!0;if(b.parent){c=l.Pt;for(e=b.parent;e;)c.push(e),
e=e.parent;c.reverse();e=0;for(g=c.length;e<g;e++)if(!c[e].Iy()){a=!1;break}}a&&(this.jo++,b.hg?b.Hy(d):b.Qb(),f=f||l.Nh);this.kt();k&&this.yy();this.fj(b.Zg);h&&this.fj(h.Zg);0!==this.Sf||0!==m||this.Ko||this.Se.ue()&&!this.gd.length||this.pc();this.bq--;return f};a.prototype.Lw=function(){var a=this.vd();return a.Re.tc[a.Wc]};a.prototype.Cy=function(){this.xm++;this.xm>=this.ep.length&&this.ep.push([])};a.prototype.yy=function(){this.xm--};a.prototype.Yr=function(){return this.ep[this.xm]};a.prototype.Kp=
function(a){this.Rl++;this.Rl>=this.ho.length&&this.ho.push(new wb);var c=this.vd();c.reset(a);return c};a.prototype.kt=function(){this.Rl--};a.prototype.vd=function(){return this.ho[this.Rl]};a.prototype.$r=function(a,c){for(var b,d,e,g,f,h;c;){b=0;for(d=c.de.length;b<d;b++)if(h=c.de[b],h instanceof xb&&Ua(a,h.name))return h;c=c.parent}b=0;for(d=this.Kf.length;b<d;b++)for(f=this.Kf[b],e=0,g=f.Fg.length;e<g;e++)if(h=f.Fg[e],h instanceof xb&&Ua(a,h.name))return h;return null};a.prototype.bs=function(a){var c,
b;c=0;for(b=this.we.length;c<b;c++)if(this.we[c].Ia===a)return this.we[c];return null};a.prototype.$l=function(a){var c,b;c=0;for(b=this.Q.length;c<b;c++)if(this.Q[c].Ia===a)return this.Q[c];return null};a.prototype.Nw=function(a){var c,b;c=0;for(b=this.xi.length;c<b;c++)if(this.xi[c].Ia===a)return this.xi[c];return null};a.prototype.lx=function(){var a=this,b=this.Up,g=this.Wf,f=this.um,h=!1;this.Lt&&(h=!0,b="__c2_continuouspreview",this.Lt=!1);if(b.length){this.pc();g=this.Ny();if(window.indexedDB&&
!this.Qd)c(b,g,function(){da("Saved state to IndexedDB storage ("+g.length+" bytes)");a.Wf=g;a.trigger(N.prototype.wa.xn,null);a.Wf="";h&&e()},function(c){try{localStorage.setItem("__c2save_"+b,g),da("Saved state to WebStorage ("+g.length+" bytes)"),a.Wf=g,a.trigger(N.prototype.wa.xn,null),a.Wf="",h&&e()}catch(d){da("Failed to save game state: "+c+"; "+d)}});else try{localStorage.setItem("__c2save_"+b,g),da("Saved state to WebStorage ("+g.length+" bytes)"),a.Wf=g,this.trigger(N.prototype.wa.xn,null),
a.Wf="",h&&e()}catch(k){da("Error saving to WebStorage: "+k)}this.Kc=this.um=this.Up=""}f.length&&(window.indexedDB&&!this.Qd?d(f,function(c){c?(a.Kc=c,da("Loaded state from IndexedDB storage ("+a.Kc.length+" bytes)")):(a.Kc=localStorage.getItem("__c2save_"+f)||"",da("Loaded state from WebStorage ("+a.Kc.length+" bytes)"));a.Xk=!1;a.Kc.length||a.trigger(N.prototype.wa.wn,null)},function(){a.Kc=localStorage.getItem("__c2save_"+f)||"";da("Loaded state from WebStorage ("+a.Kc.length+" bytes)");a.Xk=
!1;a.Kc.length||a.trigger(N.prototype.wa.wn,null)}):(this.Kc=localStorage.getItem("__c2save_"+f)||"",da("Loaded state from WebStorage ("+this.Kc.length+" bytes)"),this.Xk=!1,a.Kc.length||a.trigger(N.prototype.wa.wn,null)),this.Up=this.um="");this.Kc.length&&(this.pc(),this.Ix(this.Kc),this.Wf=this.Kc,this.trigger(N.prototype.wa.Lu,null),this.Kc=this.Wf="")};a.prototype.Ny=function(){var a,c,b,d,e,f,h,k={c2save:!0,version:1,rt:{time:this.Ni.bh,timescale:this.gi,tickcount:this.dh,execcount:this.jo,
next_uid:this.Jk,running_layout:this.Pa.Ia,start_time_offset:Date.now()-this.Um},types:{},layouts:{},events:{groups:{},cnds:{},acts:{},vars:{}}};a=0;for(c=this.Q.length;a<c;a++)if(e=this.Q[a],!e.Ca&&!this.Xt(e)){f={instances:[]};Ka(e.ha)&&(f.ex=g(e.ha));b=0;for(d=e.A.length;b<d;b++)f.instances.push(this.Tp(e.A[b]));k.types[e.Ia.toString()]=f}a=0;for(c=this.we.length;a<c;a++)b=this.we[a],k.layouts[b.Ia.toString()]=b.nf();d=k.events.groups;a=0;for(c=this.xi.length;a<c;a++)b=this.xi[a],d[b.Ia.toString()]=
this.em[b.dk].dm;c=k.events.cnds;for(h in this.Bi)this.Bi.hasOwnProperty(h)&&(a=this.Bi[h],Ka(a.ha)&&(c[h]={ex:g(a.ha)}));c=k.events.acts;for(h in this.wi)this.wi.hasOwnProperty(h)&&(a=this.wi[h],Ka(a.ha)&&(c[h]={ex:a.ha}));c=k.events.vars;for(h in this.nj)this.nj.hasOwnProperty(h)&&(a=this.nj[h],a.gm||a.parent&&!a.lk||(c[h]=a.data));k.system=this.qf.nf();return JSON.stringify(k)};a.prototype.wt=function(){var a,c,b,d,e,g;this.Sg={};a=0;for(c=this.Q.length;a<c;a++)if(b=this.Q[a],!b.Ca)for(d=0,e=b.A.length;d<
e;d++)g=b.A[d],this.Sg[g.uid.toString()]=g};a.prototype.Ix=function(a){a=JSON.parse(a);if(a.c2save&&!(1<a.version)){var c=a.rt;this.Ni.reset();this.Ni.bh=c.time;this.gi=c.timescale;this.dh=c.tickcount;this.Um=Date.now()-c.start_time_offset;var b=c.running_layout;if(b!==this.Pa.Ia)if(b=this.bs(b))this.Pr(b);else return;var d,e,g,f,h,k,l;k=a.types;for(e in k)if(k.hasOwnProperty(e)&&(f=this.$l(parseInt(e,10)))&&!f.Ca&&!this.Xt(f)){k[e].ex?f.ha=k[e].ex:La(f.ha);h=f.A;g=k[e].instances;b=0;for(d=ma(h.length,
g.length);b<d;b++)this.vm(h[b],g[b]);b=g.length;for(d=h.length;b<d;b++)this.ni(h[b]);b=h.length;for(d=g.length;b<d;b++){h=null;if(f.zc.Kg&&(h=this.Pa.Zl(g[b].w.l),!h))continue;h=this.zh(f.Te,h,!1,0,0,!0);this.vm(h,g[b])}f.jj=!0}this.pc();this.wt();d=a.layouts;for(e in d)d.hasOwnProperty(e)&&(b=this.bs(parseInt(e,10)))&&b.Lg(d[e]);d=a.events.groups;for(e in d)d.hasOwnProperty(e)&&(b=this.Nw(parseInt(e,10)))&&this.em[b.dk]&&(this.em[b.dk].dm=d[e]);b=a.events.cnds;for(e in b)b.hasOwnProperty(e)&&this.Bi.hasOwnProperty(e)&&
(this.Bi[e].ha=b[e].ex);b=a.events.acts;for(e in b)b.hasOwnProperty(e)&&this.wi.hasOwnProperty(e)&&(this.wi[e].ha=b[e].ex);b=a.events.vars;for(e in b)b.hasOwnProperty(e)&&this.nj.hasOwnProperty(e)&&(this.nj[e].data=b[e]);this.Jk=c.next_uid;this.qf.Lg(a.system);b=0;for(d=this.Q.length;b<d;b++)if(f=this.Q[b],!f.Ca)for(e=0,a=f.A.length;e<a;e++){h=f.A[e];if(f.ve)for(k=h.ck(),c=h.siblings.length=0,g=f.fd.length;c<g;c++)l=f.fd[c],f!==l&&h.siblings.push(l.A[k]);h.Af&&h.Af();if(h.ta)for(c=0,g=h.ta.length;c<
g;c++)k=h.ta[c],k.Af&&k.Af()}this.ub=!0}};a.prototype.Tp=function(a,c){var b,d,e,f,h;f=a.type;e=f.zc;var k={};c?k.c2=!0:k.uid=a.uid;Ka(a.ha)&&(k.ex=g(a.ha));if(a.Ob&&a.Ob.length)for(k.ivs={},b=0,d=a.Ob.length;b<d;b++)k.ivs[a.type.Eo[b].toString()]=a.Ob[b];if(e.Kg){e={x:a.x,y:a.y,w:a.width,h:a.height,l:a.O.Ia,zi:a.wd()};0!==a.N&&(e.a=a.N);1!==a.opacity&&(e.o=a.opacity);0.5!==a.ek&&(e.hX=a.ek);0.5!==a.fk&&(e.hY=a.fk);0!==a.Vc&&(e.bm=a.Vc);a.visible||(e.v=a.visible);a.Ci||(e.ce=a.Ci);-1!==a.Ik&&(e.mts=
a.Ik);if(f.fa.length)for(e.fx=[],b=0,d=f.fa.length;b<d;b++)h=f.fa[b],e.fx.push({name:h.name,active:a.yg[h.index],params:a.ob[h.index]});k.w=e}if(a.ta&&a.ta.length)for(k.behs={},b=0,d=a.ta.length;b<d;b++)f=a.ta[b],f.nf&&(k.behs[f.type.Ia.toString()]=f.nf());a.nf&&(k.data=a.nf());return k};a.prototype.Ow=function(a,c){var b,d;b=0;for(d=a.Eo.length;b<d;b++)if(a.Eo[b]===c)return b;return-1};a.prototype.Kw=function(a,c){var b,d;b=0;for(d=a.ta.length;b<d;b++)if(a.ta[b].type.Ia===c)return b;return-1};a.prototype.vm=
function(a,c,b){var d,e,g,f,h;h=a.type;g=h.zc;if(b){if(!c.c2)return}else a.uid=c.uid;c.ex?a.ha=c.ex:La(a.ha);if(e=c.ivs)for(d in e)e.hasOwnProperty(d)&&(b=this.Ow(h,parseInt(d,10)),0>b||b>=a.Ob.length||(a.Ob[b]=e[d]));if(g.Kg){g=c.w;a.O.Ia!==g.l&&(b=a.O,a.O=this.Pa.Zl(g.l),a.O?(a.O.A.push(a),a.O.qd=!0,ya(b.A,a),b.qd=!0):(a.O=b,this.ni(a)));a.x=g.x;a.y=g.y;a.width=g.w;a.height=g.h;a.ii=g.zi;a.N=g.hasOwnProperty("a")?g.a:0;a.opacity=g.hasOwnProperty("o")?g.o:1;a.ek=g.hasOwnProperty("hX")?g.hX:0.5;a.fk=
g.hasOwnProperty("hY")?g.hY:0.5;a.visible=g.hasOwnProperty("v")?g.v:!0;a.Ci=g.hasOwnProperty("ce")?g.ce:!0;a.Ik=g.hasOwnProperty("mts")?g.mts:-1;a.Vc=g.hasOwnProperty("bm")?g.bm:0;a.Oj=Ra(a.Vc);this.P&&Sa(a,a.Vc,this.P);a.Rb();if(g.hasOwnProperty("fx"))for(b=0,e=g.fx.length;b<e;b++)f=h.vo(g.fx[b].name),0>f||(a.yg[f]=g.fx[b].active,a.ob[f]=g.fx[b].params);a.qg()}if(h=c.behs)for(d in h)h.hasOwnProperty(d)&&(g=this.Kw(a,parseInt(d,10)),0>g||a.ta[g].Lg(h[d]));c.data&&a.Lg(c.data)};yb=function(c){return new a(document.getElementById(c))};
zb=function(c,b){return new a({dc:!0,width:c,height:b})};window.cr_createRuntime=yb;window.cr_createDCRuntime=zb;window.createCocoonJSRuntime=function(){window.c2cocoonjs=!0;var c=document.createElement("screencanvas")||document.createElement("canvas");c.UA=!0;document.body.appendChild(c);c=new a(c);window.c2runtime=c;window.addEventListener("orientationchange",function(){window.c2runtime.setSize(window.innerWidth,window.innerHeight)});window.c2runtime.setSize(window.innerWidth,window.innerHeight);
return c};window.createEjectaRuntime=function(){var c=new a(document.getElementById("canvas"));window.c2runtime=c;window.c2runtime.setSize(window.innerWidth,window.innerHeight);return c}})();window.cr_getC2Runtime=function(){var a=document.getElementById("c2canvas");return a?a.c2runtime:window.c2runtime?window.c2runtime:null};window.cr_sizeCanvas=function(a,b){if(0!==a&&0!==b){var c=window.cr_getC2Runtime();c&&c.setSize(a,b)}};window.cr_setSuspended=function(a){var b=window.cr_getC2Runtime();b&&b.setSuspended(a)};
(function(){function a(a,c){this.c=a;this.Rj=null;this.scrollX=this.c.cc/2;this.scrollY=this.c.ac/2;this.scale=1;this.N=0;this.Vj=!0;this.name=c[0];this.width=c[1];this.height=c[2];this.Yt=c[3];this.Kt=c[4];this.Ia=c[5];var b=c[6],d,k;this.za=[];this.hk=[];d=0;for(k=b.length;d<k;d++){var l=new Ab(this,b[d]);l.Xs=d;this.za.push(l)}b=c[7];this.Ih=[];d=0;for(k=b.length;d<k;d++){var l=b[d],m=this.c.Q[l[1]];m.Te||(m.Te=l);this.Ih.push(l);-1===this.hk.indexOf(m)&&this.hk.push(m)}this.fa=[];this.Fa=[];this.ob=
[];d=0;for(k=c[8].length;d<k;d++)this.fa.push({id:c[8][d][0],name:c[8][d][1],mc:-1,sc:!0,index:d}),this.ob.push(c[8][d][2].slice(0));this.qg();this.Tk=new ta(0,0,1,1);this.Mp=new ta(0,0,1,1);this.Tg={}}function b(a,c){this.Ta=a;this.c=a.c;this.A=[];this.scale=1;this.N=0;this.Ah=!1;this.ng=new ta(0,0,0,0);this.St=new ua;this.he=this.Rc=this.ie=this.Qc=0;this.qd=!1;this.name=c[0];this.index=c[1];this.Ia=c[2];this.visible=c[3];this.zg=c[4];this.hi=c[5];this.ig=c[6];this.jg=c[7];this.opacity=c[8];this.po=
c[9];this.sg=c[10];this.Vc=c[11];this.gw=c[12];this.Oj="source-over";this.uc=this.Bc=0;this.Wg=!1;var b=c[13],d,k;this.Hi=[];d=0;for(k=b.length;d<k;d++){var l=b[d],m=this.c.Q[l[1]];m.Te||(m.Te=l,m.Kv=this.index);this.Hi.push(l);-1===this.Ta.hk.indexOf(m)&&this.Ta.hk.push(m)}this.fa=[];this.Fa=[];this.ob=[];d=0;for(k=c[14].length;d<k;d++)this.fa.push({id:c[14][d][0],name:c[14][d][1],mc:-1,sc:!0,index:d}),this.ob.push(c[14][d][2].slice(0));this.qg();this.Tk=new ta(0,0,1,1);this.Mp=new ta(0,0,1,1)}function c(a,
c){return a.ii-c.ii}a.prototype.My=function(a){var c=a.type.Ia.toString();this.Tg.hasOwnProperty(c)||(this.Tg[c]=[]);this.Tg[c].push(this.c.Tp(a))};a.prototype.es=function(){var a=this.za[0];return!a.hi&&1===a.opacity&&!a.po&&a.visible};a.prototype.qg=function(){this.Fa.length=0;var a,c,b;a=0;for(c=this.fa.length;a<c;a++)b=this.fa[a],b.sc&&this.Fa.push(b)};a.prototype.uo=function(a){var c,b,d;c=0;for(b=this.fa.length;c<b;c++)if(d=this.fa[c],d.name===a)return d;return null};var d=[];a.prototype.Vp=
function(){this.Kt&&(this.Rj=this.c.io[this.Kt],this.Rj.au());this.c.Pa=this;this.scrollX=this.c.cc/2;this.scrollY=this.c.ac/2;var a,b,f,h,k,l,m;a=0;for(f=this.c.Q.length;a<f;a++)if(b=this.c.Q[a],!b.Ca)for(k=b.A,b=0,h=k.length;b<h;b++)if(l=k[b],l.O){var n=l.O.Xs;n>=this.za.length&&(n=this.za.length-1);l.O=this.za[n];l.O.A.push(l);l.O.qd=!0}d.length=0;this.Cv();a=0;for(f=this.za.length;a<f;a++)l=this.za[a],l.Jv(),l.Ah=!0,b=l.dd(0,0,!0,!0),h=l.dd(0,0,!1,!0),l.Ah=!1,this.c.Pk&&(b=b+0.5|0,h=h+0.5|0),
l.Pp(b,h,null);k=!1;if(!this.Vj){for(m in this.Tg)if(this.Tg.hasOwnProperty(m)&&(b=this.c.$l(parseInt(m,10)))&&!b.Ca&&this.c.cq(b)){h=this.Tg[m];a=0;for(f=h.length;a<f;a++){l=null;if(b.zc.Kg&&(l=this.Zl(h[a].w.l),!l))continue;l=this.c.zh(b.Te,l,!1,0,0,!0);this.c.vm(l,h[a]);k=!0;d.push(l)}h.length=0}a=0;for(f=this.za.length;a<f;a++)this.za[a].A.sort(c),this.za[a].qd=!0}k&&(this.c.pc(),this.c.wt());for(a=0;a<d.length;a++)if(l=d[a],l.type.ve)for(f=l.ck(),b=0,h=l.type.fd.length;b<h;b++)m=l.type.fd[b],
l.type!==m&&(m.A.length>f?l.siblings.push(m.A[f]):m.Te&&(k=this.c.zh(m.Te,l.O,!0,l.x,l.y,!0),this.c.pc(),m.dn(),l.siblings.push(k),d.push(k)));a=0;for(f=this.Ih.length;a<f;a++)this.c.zh(this.Ih[a],null,!0);this.c.Rn=null;this.c.pc();if(this.c.Na&&!this.c.jc)for(a=0,f=this.c.Q.length;a<f;a++)m=this.c.Q[a],!m.Ca&&m.A.length&&m.nt&&m.nt(this.c.Na);a=0;for(f=d.length;a<f;a++)l=d[a],this.c.trigger(Object.getPrototypeOf(l.type.zc).wa.Hu,l);d.length=0;this.c.trigger(N.prototype.wa.Ku,null);this.Vj=!1};a.prototype.Iv=
function(){var a,c,b,d,k;c=a=0;for(b=this.Ih.length;a<b;a++)d=this.Ih[a],k=this.c.Q[d[1]],k.global?this.c.zh(d,null,!0):(this.Ih[c]=d,c++);this.Ih.length=c};a.prototype.Uy=function(){this.c.trigger(N.prototype.wa.Ju,null);this.c.qf.pd.length=0;var a,c,b,d,k,l;a=0;for(c=this.za.length;a<c;a++){k=this.za[a].A;b=0;for(d=k.length;b<d;b++)l=k[b],l.type.global||(this.c.cq(l.type)&&this.My(l),this.c.ni(l));this.c.pc();k.length=0;this.za[a].qd=!0}a=0;for(c=this.c.Q.length;a<c;a++)if(k=this.c.Q[a],!(k.global||
k.zc.Kg||k.zc.Sm||k.Ca)){b=0;for(d=k.A.length;b<d;b++)this.c.ni(k.A[b]);this.c.pc()}};a.prototype.Bh=function(a){var c,b=a,d=!1,k=!this.c.Od;k&&(this.c.tm||(this.c.tm=document.createElement("canvas"),c=this.c.tm,c.width=this.c.ya,c.height=this.c.xa,this.c.Cs=c.getContext("2d"),d=!0),c=this.c.tm,b=this.c.Cs,c.width!==this.c.ya&&(c.width=this.c.ya,d=!0),c.height!==this.c.xa&&(c.height=this.c.xa,d=!0),d&&(b.webkitImageSmoothingEnabled=this.c.Oa,b.mozImageSmoothingEnabled=this.c.Oa,b.msImageSmoothingEnabled=
this.c.Oa,b.imageSmoothingEnabled=this.c.Oa));b.globalAlpha=1;b.globalCompositeOperation="source-over";this.c.Kn&&!this.es()&&b.clearRect(0,0,this.c.ya,this.c.xa);var l,m,d=0;for(l=this.za.length;d<l;d++)m=this.za[d],m.visible&&0<m.opacity&&11!==m.Vc&&m.Bh(b);k&&a.drawImage(c,0,0,this.c.width,this.c.height)};a.prototype.Ue=function(a){var c=0<this.Fa.length||this.c.kj||!this.c.Od;if(c){this.c.kd||(this.c.kd=a.Cg(this.c.ya,this.c.xa,this.c.Oa));if(this.c.kd.Nj!==this.c.ya||this.c.kd.Mj!==this.c.xa)a.deleteTexture(this.c.kd),
this.c.kd=a.Cg(this.c.ya,this.c.xa,this.c.Oa);a.of(this.c.kd);this.c.Od||a.ij(this.c.ya,this.c.xa)}else this.c.kd&&(a.of(null),a.deleteTexture(this.c.kd),this.c.kd=null);this.c.Kn&&!this.es()&&a.clear(0,0,0,0);var b,d;b=0;for(d=this.za.length;b<d;b++)this.za[b].visible&&0<this.za[b].opacity&&this.za[b].Ue(a);c&&(0===this.Fa.length||1===this.Fa.length&&this.c.Od?(1===this.Fa.length?(c=this.Fa[0].index,a.pf(this.Fa[0].mc),a.hj(null,1/this.c.ya,1/this.c.xa,0,0,1,1,this.scale,this.N,0,0,this.ob[c]),a.Lm(this.Fa[0].mc)&&
(this.c.ub=!0)):a.pf(0),this.c.Od||a.ij(this.c.width,this.c.height),a.of(null),a.Vk(1),a.$d(this.c.kd),a.Gt(),a.Xg(),a.gh(),c=this.c.width/2,b=this.c.height/2,a.tt(-c,b,c,b,c,-b,-c,-b),a.$d(null)):this.Op(a,null,null,null))};a.prototype.bk=function(){return 0<this.Fa.length||this.c.kj||!this.c.Od?this.c.kd:null};a.prototype.cs=function(){var a=this.za[0].Pd(),c,b,d;c=1;for(b=this.za.length;c<b;c++)d=this.za[c],(0!==d.ig||0!==d.jg)&&d.Pd()<a&&(a=d.Pd());return a};a.prototype.Et=function(a){if(!this.Yt){var c=
this.c.ya*(1/this.cs())/2;a>this.width-c&&(a=this.width-c);a<c&&(a=c)}this.scrollX!==a&&(this.scrollX=a,this.c.ub=!0)};a.prototype.Ft=function(a){if(!this.Yt){var c=this.c.xa*(1/this.cs())/2;a>this.height-c&&(a=this.height-c);a<c&&(a=c)}this.scrollY!==a&&(this.scrollY=a,this.c.ub=!0)};a.prototype.Cv=function(){this.Et(this.scrollX);this.Ft(this.scrollY)};a.prototype.Op=function(a,c,b,d){var k=b?b.Fa:c?c.Fa:this.Fa,l=1,m=0,n=0,q=0;b?(l=b.O.Pd(),m=b.O.se(),n=b.O.Qc,q=b.O.Rc):c&&(l=c.Pd(),m=c.se(),n=
c.Qc,q=c.Rc);var p=this.c.so,s,u,x,A,z=0,H=1,J,E=this.c.ya,C=this.c.xa,B=E/2,w=C/2,D=c?c.Tk:this.Tk,F=c?c.Mp:this.Mp,G=0,V=0,Q=0,ga=0,R=E,na=E,K=C,T=C,ea=x=0,ha=b?b.O.se():0;if(b){s=0;for(u=k.length;s<u;s++)x+=a.Rw(k[s].mc),ea+=a.Sw(k[s].mc);A=b.Uc;G=c.Rd(A.left,A.top,!0);Q=c.Rd(A.left,A.top,!1);R=c.Rd(A.right,A.bottom,!0);K=c.Rd(A.right,A.bottom,!1);0!==ha&&(s=c.Rd(A.right,A.top,!0),u=c.Rd(A.right,A.top,!1),V=c.Rd(A.left,A.bottom,!0),ga=c.Rd(A.left,A.bottom,!1),A=Math.min(G,R,s,V),R=Math.max(G,R,
s,V),G=A,A=Math.min(Q,K,u,ga),K=Math.max(Q,K,u,ga),Q=A);G-=x;Q-=ea;R+=x;K+=ea;F.left=G/E;F.top=1-Q/C;F.right=R/E;F.bottom=1-K/C;V=G=qa(G);ga=Q=qa(Q);na=R=ra(R);T=K=ra(K);V-=x;ga-=ea;na+=x;T+=ea;0>G&&(G=0);0>Q&&(Q=0);R>E&&(R=E);K>C&&(K=C);0>V&&(V=0);0>ga&&(ga=0);na>E&&(na=E);T>C&&(T=C);D.left=G/E;D.top=1-Q/C;D.right=R/E;D.bottom=1-K/C}else D.left=F.left=0,D.top=F.top=0,D.right=F.right=1,D.bottom=F.bottom=1;ea=b&&((b.N||ha)&&a.Rk(k[0].mc)||0!==x||0!==ea||1!==b.opacity||b.type.zc.Ts)||c&&!b&&1!==c.opacity;
a.Gt();if(ea){p[z]||(p[z]=a.Cg(E,C,this.c.Oa));if(p[z].Nj!==E||p[z].Mj!==C)a.deleteTexture(p[z]),p[z]=a.Cg(E,C,this.c.Oa);a.pf(0);a.of(p[z]);J=T-ga;a.clearRect(V,C-ga-J,na-V,J);b?b.Ue(a):(a.$d(this.c.xd),a.Vk(c.opacity),a.Xg(),a.translate(-B,-w),a.gh(),a.di(G,K,R,K,R,Q,G,Q,D));F.left=F.top=0;F.right=F.bottom=1;b&&(A=D.top,D.top=D.bottom,D.bottom=A);z=1;H=0}a.Vk(1);x=k.length-1;var ha=a.Ip(k[x].mc)||!c&&!b&&!this.c.Od,Z=0;s=0;for(u=k.length;s<u;s++){p[z]||(p[z]=a.Cg(E,C,this.c.Oa));if(p[z].Nj!==E||
p[z].Mj!==C)a.deleteTexture(p[z]),p[z]=a.Cg(E,C,this.c.Oa);a.pf(k[s].mc);Z=k[s].index;a.Lm(k[s].mc)&&(this.c.ub=!0);0!=s||ea?(a.hj(d,1/E,1/C,F.left,F.top,F.right,F.bottom,l,m,n,q,b?b.ob[Z]:c?c.ob[Z]:this.ob[Z]),a.$d(null),s!==x||ha?(a.of(p[z]),J=T-ga,A=C-ga-J,a.clearRect(V,A,na-V,J)):(b?a.Yg(b.Bc,b.uc):c&&a.Yg(c.Bc,c.uc),a.of(d)),a.$d(p[H]),a.Xg(),a.translate(-B,-w),a.gh(),a.di(G,K,R,K,R,Q,G,Q,D),s!==x||ha||a.$d(null)):(a.of(p[z]),J=T-ga,A=C-ga-J,a.clearRect(V,A,na-V,J),b?(a.hj(d,1/b.width,1/b.height,
F.left,F.top,F.right,F.bottom,l,m,n,q,b.ob[Z]),b.Ue(a)):(a.hj(d,1/E,1/C,0,0,1,1,l,m,n,q,c?c.ob[Z]:this.ob[Z]),a.$d(c?this.c.xd:this.c.kd),a.Xg(),a.translate(-B,-w),a.gh(),a.di(G,K,R,K,R,Q,G,Q,D)),F.left=F.top=0,F.right=F.bottom=1,b&&!ha&&(A=K,K=Q,Q=A));z=0===z?1:0;H=0===z?1:0}ha&&(a.pf(0),b?a.Yg(b.Bc,b.uc):c?a.Yg(c.Bc,c.uc):this.c.Od||(a.ij(this.c.width,this.c.height),B=this.c.width/2,w=this.c.height/2,Q=G=0,R=this.c.width,K=this.c.height),a.of(d),a.$d(p[H]),a.Xg(),a.translate(-B,-w),a.gh(),b&&1===
k.length&&!ea?a.di(G,Q,R,Q,R,K,G,K,D):a.di(G,K,R,K,R,Q,G,Q,D),a.$d(null))};a.prototype.Zl=function(a){var c,b;c=0;for(b=this.za.length;c<b;c++)if(this.za[c].Ia===a)return this.za[c];return null};a.prototype.nf=function(){var a,c,b,d={sx:this.scrollX,sy:this.scrollY,s:this.scale,a:this.N,w:this.width,h:this.height,fv:this.Vj,persist:this.Tg,fx:[],layers:{}};a=0;for(c=this.fa.length;a<c;a++)b=this.fa[a],d.fx.push({name:b.name,active:b.sc,params:this.ob[b.index]});a=0;for(c=this.za.length;a<c;a++)b=
this.za[a],d.layers[b.Ia.toString()]=b.nf();return d};a.prototype.Lg=function(a){var c,b,d,k;this.scrollX=a.sx;this.scrollY=a.sy;this.scale=a.s;this.N=a.a;this.width=a.w;this.height=a.h;this.Tg=a.persist;"undefined"!==typeof a.fv&&(this.Vj=a.fv);var l=a.fx;c=0;for(b=l.length;c<b;c++)if(d=this.uo(l[c].name))d.sc=l[c].active,this.ob[d.index]=l[c].params;this.qg();c=a.layers;for(k in c)c.hasOwnProperty(k)&&(a=this.Zl(parseInt(k,10)))&&a.Lg(c[k])};nb=a;b.prototype.qg=function(){this.Fa.length=0;var a,
c,b;a=0;for(c=this.fa.length;a<c;a++)b=this.fa[a],b.sc&&this.Fa.push(b)};b.prototype.uo=function(a){var c,b,d;c=0;for(b=this.fa.length;c<b;c++)if(d=this.fa[c],d.name===a)return d;return null};b.prototype.Jv=function(){var a,c,b,h,k,l;c=a=0;for(b=this.Hi.length;a<b;a++){h=this.Hi[a];k=this.c.Q[h[1]];l=this.c.cq(k);k=!0;if(!l||this.Ta.Vj)h=this.c.zh(h,this,!0),d.push(h),h.type.global&&(k=!1);k&&(this.Hi[c]=this.Hi[a],c++)}this.Hi.length=c;this.c.pc();!this.c.$&&this.fa.length&&(this.Vc=this.gw);this.Oj=
Ra(this.Vc);this.c.P&&Sa(this,this.Vc,this.c.P)};b.prototype.dz=function(){if(this.qd){var a,c;a=0;for(c=this.A.length;a<c;a++)this.A[a].ii=a;this.qd=!1}};b.prototype.Pd=function(a){return this.Pw()*(this.c.Od||a?this.c.Lj:1)};b.prototype.Pw=function(){return(this.scale*this.Ta.scale-1)*this.sg+1};b.prototype.se=function(){return this.Ah?0:Ba(this.Ta.N+this.N)};b.prototype.Bh=function(a){this.Wg=this.po||1!==this.opacity||0!==this.Vc;var c=this.c.canvas,b=a,d=!1;this.Wg&&(this.c.rm||(this.c.rm=document.createElement("canvas"),
c=this.c.rm,c.width=this.c.ya,c.height=this.c.xa,this.c.Bs=c.getContext("2d"),d=!0),c=this.c.rm,b=this.c.Bs,c.width!==this.c.ya&&(c.width=this.c.ya,d=!0),c.height!==this.c.xa&&(c.height=this.c.xa,d=!0),d&&(b.webkitImageSmoothingEnabled=this.c.Oa,b.mozImageSmoothingEnabled=this.c.Oa,b.msImageSmoothingEnabled=this.c.Oa,b.imageSmoothingEnabled=this.c.Oa),this.hi&&b.clearRect(0,0,this.c.ya,this.c.xa));b.globalAlpha=1;b.globalCompositeOperation="source-over";this.hi||(b.fillStyle="rgb("+this.zg[0]+","+
this.zg[1]+","+this.zg[2]+")",b.fillRect(0,0,this.c.ya,this.c.xa));b.save();this.Ah=!0;var d=this.dd(0,0,!0,!0),k=this.dd(0,0,!1,!0);this.Ah=!1;this.c.Pk&&(d=d+0.5|0,k=k+0.5|0);this.Pp(d,k,b);var l=this.Pd();b.scale(l,l);b.translate(-d,-k);for(var m,d=0,k=this.A.length;d<k;d++)l=this.A[d],l.visible&&0!==l.width&&0!==l.height&&(l.Tb(),m=l.Uc,m.right<this.Qc||m.bottom<this.Rc||m.left>this.ie||m.top>this.he||(b.globalCompositeOperation=l.Oj,l.Bh(b)));b.restore();this.Wg&&(a.globalCompositeOperation=
this.Oj,a.globalAlpha=this.opacity,a.drawImage(c,0,0))};b.prototype.Pp=function(a,c,b){var d=this.Pd();this.Qc=a;this.Rc=c;this.ie=a+this.c.ya*(1/d);this.he=c+this.c.xa*(1/d);a=this.se();0!==a&&(b&&(b.translate(this.c.ya/2,this.c.xa/2),b.rotate(-a),b.translate(this.c.ya/-2,this.c.xa/-2)),this.ng.set(this.Qc,this.Rc,this.ie,this.he),this.ng.offset((this.Qc+this.ie)/-2,(this.Rc+this.he)/-2),this.St.It(this.ng,a),this.St.wr(this.ng),this.ng.offset((this.Qc+this.ie)/2,(this.Rc+this.he)/2),this.Qc=this.ng.left,
this.Rc=this.ng.top,this.ie=this.ng.right,this.he=this.ng.bottom)};b.prototype.Ue=function(a){var c=this.c.ya,b=this.c.xa,d=0,k=0;if(this.Wg=this.po||1!==this.opacity||0<this.Fa.length||0!==this.Vc){this.c.xd||(this.c.xd=a.Cg(this.c.ya,this.c.xa,this.c.Oa));if(this.c.xd.Nj!==this.c.ya||this.c.xd.Mj!==this.c.xa)a.deleteTexture(this.c.xd),this.c.xd=a.Cg(this.c.ya,this.c.xa,this.c.Oa);a.of(this.c.xd);this.hi&&a.clear(0,0,0,0)}this.hi||a.clear(this.zg[0]/255,this.zg[1]/255,this.zg[2]/255,1);this.Ah=!0;
var k=this.dd(0,0,!0,!0),l=this.dd(0,0,!1,!0);this.Ah=!1;this.c.Pk&&(k=k+0.5|0,l=l+0.5|0);this.Pp(k,l,null);l=this.Pd();a.Xg();a.scale(l,l);a.zt(-this.se());a.translate((this.Qc+this.ie)/-2,(this.Rc+this.he)/-2);a.gh();var m,n,q;m=0;for(n=this.A.length;m<n;m++)if(q=this.A[m],q.visible&&0!==q.width&&0!==q.height&&(q.Tb(),d=q.Uc,!(d.right<this.Qc||d.bottom<this.Rc||d.left>this.ie||d.top>this.he)))if(q.cu)if(d=q.Fa[0].mc,k=q.Fa[0].index,1!==q.Fa.length||a.Ip(d)||a.By(d)||(q.N||q.O.se())&&a.Rk(d)||1!==
q.opacity||q.type.zc.Ts)this.Ta.Op(a,this,q,this.Wg?this.c.xd:this.Ta.bk()),a.Xg(),a.scale(l,l),a.zt(-this.se()),a.translate((this.Qc+this.ie)/-2,(this.Rc+this.he)/-2),a.gh();else{a.pf(d);a.Yg(q.Bc,q.uc);a.Lm(d)&&(this.c.ub=!0);var p=0,s=0,u=0,x=0;a.Rk(d)&&(d=q.Uc,p=this.Rd(d.left,d.top,!0),s=this.Rd(d.left,d.top,!1),u=this.Rd(d.right,d.bottom,!0),d=this.Rd(d.right,d.bottom,!1),p/=c,s=1-s/b,u/=c,x=1-d/b);a.hj(this.Wg?this.c.xd:this.Ta.bk(),1/q.width,1/q.height,p,s,u,x,this.Pd(),this.se(),this.Qc,
this.Rc,q.ob[k]);q.Ue(a)}else a.pf(0),a.Yg(q.Bc,q.uc),q.Ue(a);this.Wg&&(d=this.Fa.length?this.Fa[0].mc:0,k=this.Fa.length?this.Fa[0].index:0,0===this.Fa.length||1===this.Fa.length&&!a.Ip(d)&&1===this.opacity?(1===this.Fa.length?(a.pf(d),a.hj(this.Ta.bk(),1/this.c.ya,1/this.c.xa,0,0,1,1,this.Pd(),this.se(),this.Qc,this.Rc,this.ob[k]),a.Lm(d)&&(this.c.ub=!0)):a.pf(0),a.of(this.Ta.bk()),a.Vk(this.opacity),a.$d(this.c.xd),a.Yg(this.Bc,this.uc),a.Xg(),a.gh(),c=this.c.ya/2,b=this.c.xa/2,a.tt(-c,b,c,b,c,
-b,-c,-b),a.$d(null)):this.Ta.Op(a,this,null,this.Ta.bk()))};b.prototype.dd=function(a,c,b,d){var k=this.c.devicePixelRatio;this.c.Kh&&(a*=k,c*=k);var k=this.c.ht,l=this.c.it,k=(this.Ta.scrollX-k)*this.ig+k,l=(this.Ta.scrollY-l)*this.jg+l,m=1/this.Pd(!d);d?(k-=this.c.ya*m/2,l-=this.c.xa*m/2):(k-=this.c.width*m/2,l-=this.c.height*m/2);k+=a*m;l+=c*m;c=this.se();0!==c&&(k-=this.Ta.scrollX,l-=this.Ta.scrollY,a=Math.cos(c),c=Math.sin(c),d=k*a-l*c,l=l*a+k*c,k=d+this.Ta.scrollX,l+=this.Ta.scrollY);return b?
k:l};b.prototype.Rd=function(a,c,b){var d=this.se();if(0!==d){a-=this.Ta.scrollX;c-=this.Ta.scrollY;var k=Math.cos(-d),d=Math.sin(-d),l=a*k-c*d;c=c*k+a*d;a=l+this.Ta.scrollX;c+=this.Ta.scrollY}k=this.c.ht;d=this.c.it;k=(this.Ta.scrollX-k)*this.ig+k;d=(this.Ta.scrollY-d)*this.jg+d;l=1/this.Pd(!1);k-=this.c.ya*l/2;d-=this.c.xa*l/2;k=(a-k)/l;d=(c-d)/l;a=this.c.devicePixelRatio;this.c.Kh&&(k/=a,d/=a);return b?k:d};b.prototype.nf=function(){var a,c,b,d={s:this.scale,a:this.N,vl:this.Qc,vt:this.Rc,vr:this.ie,
vb:this.he,v:this.visible,bc:this.zg,t:this.hi,px:this.ig,py:this.jg,o:this.opacity,zr:this.sg,fx:[],instances:[]};a=0;for(c=this.fa.length;a<c;a++)b=this.fa[a],d.fx.push({name:b.name,active:b.sc,params:this.ob[b.index]});return d};b.prototype.Lg=function(a){var b,d;this.scale=a.s;this.N=a.a;this.Qc=a.vl;this.Rc=a.vt;this.ie=a.vr;this.he=a.vb;this.visible=a.v;this.zg=a.bc;this.hi=a.t;this.ig=a.px;this.jg=a.py;this.opacity=a.o;this.sg=a.zr;var h=a.fx;a=0;for(b=h.length;a<b;a++)if(d=this.uo(h[a].name))d.sc=
h[a].active,this.ob[d.index]=h[a].params;this.qg();this.A.sort(c);this.qd=!0};Ab=b})();
(function(){function a(a,c){var b,d=a.length;switch(d){case 0:return!0;case 1:return a[0]===c[0];case 2:return a[0]===c[0]&&a[1]===c[1];default:for(b=0;b<d;b++)if(a[b]!==c[b])return!1;return!0}}function b(a,c){return a.index-c.index}function c(c){var d,e,n,f;2===c.length?c[0].index>c[1].index&&(d=c[0],c[0]=c[1],c[1]=d):2<c.length&&c.sort(b);c.length>=p.length&&(p.length=c.length+1);p[c.length]||(p[c.length]=[]);f=p[c.length];d=0;for(e=f.length;d<e;d++)if(n=f[d],a(c,n))return n;f.push(c);return c}
function d(a,c){this.c=a;this.Ut={};this.Tr={};this.Ao=!1;this.hs=new ca;this.co=[];this.Ln=[];this.name=c[0];var b=c[1];this.Fg=[];var d,e;d=0;for(e=b.length;d<e;d++)this.ls(b[d],null,this.Fg)}function e(a){this.type=a;this.A=[];this.Qa=[];this.Ib=!0}function g(a,c,b){this.sheet=a;this.parent=c;this.c=a.c;this.Bb=[];this.Zg=[];this.fs=this.$m=this.$p=this.Do=this.group=this.Mt=!1;this.tc=[];this.pe=[];this.de=[];this.dk="";this.dm=this.Do=this.group=!1;this.Gr=null;b[1]&&(this.dk=b[1][1].toLowerCase(),
this.group=!0,this.Do=!!b[1][0],this.Gr=[],this.dm=this.Do,this.c.xi.push(this),this.c.em[this.dk]=this);this.hg=b[2];this.Ia=b[4];this.group||(this.c.ur[this.Ia.toString()]=this);var d=b[5];a=0;for(c=d.length;a<c;a++){var e=new Bb(this,d[a]);e.index=a;this.tc.push(e);this.dr(e.type)}d=b[6];a=0;for(c=d.length;a<c;a++)e=new Cb(this,d[a]),e.index=a,this.pe.push(e);if(8===b.length)for(b=b[7],a=0,c=b.length;a<c;a++)this.sheet.ls(b[a],this,this.de);this.hm=!1;this.tc.length&&(this.hm=null==this.tc[0].type&&
this.tc[0].ic==N.prototype.wa.tu)}function f(a,c){var b,d,e;if(a&&(-1===c.indexOf(a)&&c.push(a),a.ve))for(b=0,d=a.fd.length;b<d;b++)e=a.fd[b],a!==e&&-1===c.indexOf(e)&&c.push(e)}function h(a,c){this.ud=a;this.sheet=a.sheet;this.c=a.c;this.ja=[];this.Ra=[];this.ha={};this.index=-1;this.Kj=!1;this.ic=c[1];this.trigger=0<c[3];this.Sr=2===c[3];this.Fo=c[5];this.Gx=c[6];this.Ia=c[7];this.c.Bi[this.Ia.toString()]=this;-1===c[0]?(this.type=null,this.Qb=this.Sp,this.vh=null,this.Ld=-1):(this.type=this.c.Q[c[0]],
this.Qb=this.Gx?this.Jy:this.Rp,c[2]?(this.vh=this.type.Yl(c[2]),this.Ld=this.type.to(c[2])):(this.vh=null,this.Ld=-1),this.ud.parent&&this.ud.parent.Qm());this.Sr&&(this.Qb=this.Ky);if(10===c.length){var b,d,e=c[9];b=0;for(d=e.length;b<d;b++){var n=new Db(this,e[b]);this.ja.push(n)}this.Ra.length=e.length}}function k(a,c){this.ud=a;this.sheet=a.sheet;this.c=a.c;this.ja=[];this.Ra=[];this.ha={};this.index=-1;this.Kj=!1;this.ic=c[1];-1===c[0]?(this.type=null,this.Qb=this.Sp,this.vh=null,this.Ld=-1):
(this.type=this.c.Q[c[0]],this.Qb=this.Rp,c[2]?(this.vh=this.type.Yl(c[2]),this.Ld=this.type.to(c[2])):(this.vh=null,this.Ld=-1));this.Ia=c[3];this.c.wi[this.Ia.toString()]=this;if(6===c.length){var b,d,e=c[5];b=0;for(d=e.length;b<d;b++){var n=new Db(this,e[b]);this.ja.push(n)}this.Ra.length=e.length}}function l(a,c){this.W=a;this.ud=a.ud;this.sheet=a.sheet;this.c=a.c;this.type=c[0];this.We=null;this.$g=0;this.get=null;this.Fr=0;this.Ta=null;this.key=0;this.object=null;this.index=0;this.al=this.ei=
this.al=this.ei=this.Ur=this.Eh=this.bl=null;this.ge=!1;var b,d,e;switch(c[0]){case 0:case 7:this.We=new Eb(this,c[1]);this.$g=0;this.get=this.Yw;break;case 1:this.We=new Eb(this,c[1]);this.$g=0;this.get=this.Zw;break;case 5:this.We=new Eb(this,c[1]);this.$g=0;this.get=this.cx;break;case 3:case 8:this.Fr=c[1];this.get=this.Ww;break;case 6:this.Ta=this.c.Yo[c[1]];this.get=this.dx;break;case 9:this.key=c[1];this.get=this.bx;break;case 4:this.object=this.c.Q[c[1]];this.get=this.gx;this.ud.dr(this.object);
this.W instanceof Cb?this.ud.Qm():this.ud.parent&&this.ud.parent.Qm();break;case 10:this.index=c[1];a.type.Ca?(this.get=this.$w,this.ge=!0):this.get=this.ax;break;case 11:this.bl=c[1];this.Eh=null;this.get=this.Xw;break;case 2:case 12:this.Ur=c[1];this.get=this.Vw;break;case 13:for(this.get=this.hx,this.ei=[],this.al=[],b=1,d=c.length;b<d;b++)e=new Db(this.W,c[b]),this.ei.push(e),this.al.push(0)}}function m(a,c,b){this.sheet=a;this.parent=c;this.c=a.c;this.Bb=[];this.name=b[1];this.Co=b[3];this.lk=
!!b[4];this.gm=!!b[5];this.Ia=b[6];this.c.nj[this.Ia.toString()]=this;this.data=this.Co;this.parent?(this.Sh=this.lk||this.gm?-1:this.c.Sy++,this.c.vv.push(this)):(this.Sh=-1,this.c.uv.push(this))}function n(a,c,b){this.sheet=a;this.parent=c;this.c=a.c;this.Bb=[];this.gk=null;this.nx=b[1];this.sc=!0}function q(){this.Pt=[];this.reset(null)}var p=[];d.prototype.toString=t("name");d.prototype.ls=function(a,c,b){switch(a[0]){case 0:a=new Fb(this,c,a);if(a.hg)for(b.push(a),b=0,c=a.tc.length;b<c;b++)a.tc[b].trigger&&
this.ms(a,b);else a.ts()?this.ms(a,0):b.push(a);break;case 1:a=new xb(this,c,a);b.push(a);break;case 2:a=new Gb(this,c,a),b.push(a)}};d.prototype.Ab=function(){var a,c;a=0;for(c=this.Fg.length;a<c;a++)this.Fg[a].Ab(a<c-1&&this.Fg[a+1].hm)};d.prototype.au=function(){this.co.length=0;this.Ln.length=0;this.cr(this);this.Ln.length=0};d.prototype.cr=function(a){var c,b,d,e,n=a.co,f=a.Ln,g=this.hs.lj();c=0;for(b=g.length;c<b;++c)d=g[c],e=d.gk,!d.sc||a===e||-1<f.indexOf(e)||(f.push(e),e.cr(a),n.push(e))};
d.prototype.Qb=function(a){this.c.RA||(this.Ao=!0,a||(this.c.Ko=!0));var c,b;c=0;for(b=this.Fg.length;c<b;c++){var d=this.Fg[c];d.Qb();this.c.Sn(d.Bb);this.c.Se.ue()&&!this.c.gd.length||this.c.pc()}a||(this.c.Ko=!1)};d.prototype.ms=function(a,c){a.hg||this.c.cn.push(a);var b,d,e=a.tc[c],n;n=e.type?e.type.name:"system";var f=(b=e.Sr)?this.Tr:this.Ut;f[n]||(f[n]=[]);n=f[n];f=e.ic;if(b){if(e.ja.length&&(e=e.ja[0],1===e.type&&2===e.We.type)){e=e.We.value.toLowerCase();b=0;for(d=n.length;b<d;b++)if(n[b].method==
f){b=n[b].Sj;b[e]?b[e].push([a,c]):b[e]=[[a,c]];return}b={};b[e]=[[a,c]];n.push({method:f,Sj:b})}}else{b=0;for(d=n.length;b<d;b++)if(n[b].method==f){n[b].Sj.push([a,c]);return}Jb.Wu&&f===Jb.Wu.prototype.wa.Yz?n.unshift({method:f,Sj:[[a,c]]}):n.push({method:f,Sj:[[a,c]]})}};ob=d;e.prototype.zo=function(){return this.Ib?this.type.A.length:this.A.length};e.prototype.Ye=function(){return this.Ib?this.type.A:this.A};e.prototype.Ok=function(a){a&&(a.c.vd().Re.hg?(this.Ib&&(this.A.length=0,xa(this.Qa,a.type.A),
this.Ib=!1),a=this.Qa.indexOf(a),-1!==a&&(this.A.push(this.Qa[a]),this.Qa.splice(a,1))):(this.Ib=!1,this.A.length=1,this.A[0]=a))};Xa=e;window._c2hh_="";g.prototype.Ab=function(a){var b,d=this.parent;if(this.group)for(this.$m=!0;d;){if(!d.group){this.$m=!1;break}d=d.parent}this.$p=!this.ts()&&(!this.parent||this.parent.group&&this.parent.$m);this.fs=!!a;this.Zg=this.Bb.slice(0);for(d=this.parent;d;){a=0;for(b=d.Bb.length;a<b;a++)this.sv(d.Bb[a]);d=d.parent}this.Bb=c(this.Bb);this.Zg=c(this.Zg);a=
0;for(b=this.tc.length;a<b;a++)this.tc[a].Ab();a=0;for(b=this.pe.length;a<b;a++)this.pe[a].Ab();a=0;for(b=this.de.length;a<b;a++)this.de[a].Ab(a<b-1&&this.de[a+1].hm)};g.prototype.dr=function(a){f(a,this.Bb)};g.prototype.sv=function(a){f(a,this.Zg)};g.prototype.Qm=function(){this.Mt=!0;this.parent&&this.parent.Qm()};g.prototype.ts=function(){return this.tc.length?this.tc[0].trigger:!1};g.prototype.Qb=function(){var a,c=!1,b,d=this.c,e=this.c.vd();e.Re=this;var n=this.tc;this.hm||(e.fo=!1);if(this.hg){0===
n.length&&(c=!0);e.Wc=0;for(a=n.length;e.Wc<a;e.Wc++)n[e.Wc].trigger||(b=n[e.Wc].Qb())&&(c=!0);(e.Nh=c)&&this.Qp()}else{e.Wc=0;for(a=n.length;e.Wc<a;e.Wc++)if(b=n[e.Wc].Qb(),!b){e.Nh=!1;!this.$p||d.Se.ue()&&!d.gd.length||d.pc();return}e.Nh=!0;this.Qp()}this.iw(e)};g.prototype.iw=function(a){a.Nh&&this.fs&&(a.fo=!0);!this.$p||this.c.Se.ue()&&!this.c.gd.length||this.c.pc()};g.prototype.Hy=function(a){this.c.vd().Re=this;this.tc[a].Qb()&&(this.Qp(),this.c.vd().Nh=!0)};g.prototype.Qp=function(){var a=
this.c.vd(),c;a.Kd=0;for(c=this.pe.length;a.Kd<c;a.Kd++)if(this.pe[a.Kd].Qb())return;this.At()};g.prototype.Fy=function(){var a=this.c.vd(),c;for(c=this.pe.length;a.Kd<c;a.Kd++)if(this.pe[a.Kd].Qb())return;this.At()};g.prototype.At=function(){if(this.de.length){var a,c,b,d,e=this.de.length-1;this.c.Kp(this);if(this.Mt)for(a=0,c=this.de.length;a<c;a++)b=this.de[a],(d=!this.$m||!this.group&&a<e)&&this.c.Jp(b.Bb),b.Qb(),d?this.c.fj(b.Bb):this.c.Sn(b.Bb);else for(a=0,c=this.de.length;a<c;a++)this.de[a].Qb();
this.c.kt()}};g.prototype.Iy=function(){var a=this.c.vd();a.Re=this;var c=!1,b;a.Wc=0;for(b=this.tc.length;a.Wc<b;a.Wc++)if(this.tc[a.Wc].Qb())c=!0;else if(!this.hg)return!1;return this.hg?c:!0};g.prototype.zx=function(a){var c=a.index;if(0===c)return!0;for(--c;0<=c;--c)if(this.tc[c].type===a.type)return!1;return!0};Fb=g;h.prototype.Ab=function(){var a,c,b;a=0;for(c=this.ja.length;a<c;a++)b=this.ja[a],b.Ab(),b.ge&&(this.Kj=!0)};h.prototype.Ky=v(!0);h.prototype.Sp=function(){var a,c;a=0;for(c=this.ja.length;a<
c;a++)this.Ra[a]=this.ja[a].get();return Ja(this.ic.apply(this.c.qf,this.Ra),this.Fo)};h.prototype.Jy=function(){var a,c;a=0;for(c=this.ja.length;a<c;a++)this.Ra[a]=this.ja[a].get();a=this.ic.apply(this.vh?this.vh:this.type,this.Ra);this.type.uh();return a};h.prototype.Rp=function(){var a,c,b,d,e,n,f,g,h=this.type,k=h.lb(),l=this.ud.hg&&!this.trigger;c=0;var m=h.ve,q=h.Ca,p=h.Mf,s=this.Ld,u=-1<s,na=this.Kj,K=this.ja,T=this.Ra,ea=this.Fo,ha=this.ic,Z;if(na)for(c=0,e=K.length;c<e;++c)n=K[c],n.ge||(T[c]=
n.get(0));else for(c=0,e=K.length;c<e;++c)T[c]=K[c].get(0);if(k.Ib){k.A.length=0;k.Qa.length=0;Z=h.A;a=0;for(d=Z.length;a<d;++a){g=Z[a];if(na)for(c=0,e=K.length;c<e;++c)n=K[c],n.ge&&(T[c]=n.get(a));u?(c=0,q&&(c=g.type.Fi[p]),c=ha.apply(g.ta[s+c],T)):c=ha.apply(g,T);(f=Ja(c,ea))?k.A.push(g):l&&k.Qa.push(g)}h.finish&&h.finish(!0);k.Ib=!1;h.uh();return k.zo()}b=0;Z=(f=l&&!this.ud.zx(this))?k.Qa:k.A;var jb=!1;a=0;for(d=Z.length;a<d;++a){g=Z[a];if(na)for(c=0,e=K.length;c<e;++c)n=K[c],n.ge&&(T[c]=n.get(a));
u?(c=0,q&&(c=g.type.Fi[p]),c=ha.apply(g.ta[s+c],T)):c=ha.apply(g,T);if(Ja(c,ea))if(jb=!0,f){if(k.A.push(g),m)for(c=0,e=g.siblings.length;c<e;c++)n=g.siblings[c],n.type.lb().A.push(n)}else{Z[b]=g;if(m)for(c=0,e=g.siblings.length;c<e;c++)n=g.siblings[c],n.type.lb().A[b]=n;b++}else if(f){Z[b]=g;if(m)for(c=0,e=g.siblings.length;c<e;c++)n=g.siblings[c],n.type.lb().Qa[b]=n;b++}else if(l&&(k.Qa.push(g),m))for(c=0,e=g.siblings.length;c<e;c++)n=g.siblings[c],n.type.lb().Qa.push(n)}Z.length=b;if(m)for(q=h.fd,
a=0,d=q.length;a<d;a++)g=q[a].lb(),f?g.Qa.length=b:g.A.length=b;b=jb;if(f&&!jb)for(a=0,d=k.A.length;a<d;a++){g=k.A[a];if(na)for(c=0,e=K.length;c<e;c++)n=K[c],n.ge&&(T[c]=n.get(a));c=u?ha.apply(g.ta[s],T):ha.apply(g,T);if(Ja(c,ea)){jb=!0;break}}h.finish&&h.finish(b||l);return l?jb:k.zo()};Bb=h;k.prototype.Ab=function(){var a,c,b;a=0;for(c=this.ja.length;a<c;a++)b=this.ja[a],b.Ab(),b.ge&&(this.Kj=!0)};k.prototype.Sp=function(){var a,c;a=0;for(c=this.ja.length;a<c;a++)this.Ra[a]=this.ja[a].get();return this.ic.apply(this.c.qf,
this.Ra)};k.prototype.Rp=function(){var a=this.type.lb().Ye(),c=this.type.Ca,b=this.type.Mf,d=this.Ld,e=-1<d,n=this.Kj,f=this.ja,g=this.Ra,h=this.ic,k,l,m,q,p,s;if(n)for(l=0,q=f.length;l<q;++l)p=f[l],p.ge||(g[l]=p.get(0));else for(l=0,q=f.length;l<q;++l)g[l]=f[l].get(0);k=0;for(m=a.length;k<m;++k){s=a[k];if(n)for(l=0,q=f.length;l<q;++l)p=f[l],p.ge&&(g[l]=p.get(k));e?(l=0,c&&(l=s.type.Fi[b]),h.apply(s.ta[d+l],g)):h.apply(s,g)}return!1};Cb=k;var s=[],u=-1;l.prototype.Ab=function(){var a,c;if(11===this.type)this.Eh=
this.c.$r(this.bl,this.ud.parent);else if(13===this.type)for(a=0,c=this.ei.length;a<c;a++)this.ei[a].Ab();this.We&&this.We.Ab()};l.prototype.hy=function(a){this.ge||!a||a.zc.Sm||(this.ge=!0)};l.prototype.Ht=function(){this.ge=!0};l.prototype.Pb=function(){u++;s.length===u&&s.push(new Hb);return s[u]};l.prototype.Hb=function(){u--};l.prototype.Yw=function(a){this.$g=a||0;a=this.Pb();this.We.get(a);this.Hb();return a.data};l.prototype.Zw=function(a){this.$g=a||0;a=this.Pb();this.We.get(a);this.Hb();
return I(a.data)?a.data:""};l.prototype.gx=t("object");l.prototype.Ww=t("Fr");l.prototype.cx=function(a){this.$g=a||0;a=this.Pb();this.We.get(a);this.Hb();return a.Zb()?this.c.$j(a.data):this.c.wo(a.data)};l.prototype.dx=t("Ta");l.prototype.bx=t("key");l.prototype.ax=t("index");l.prototype.$w=function(a){a=a||0;var c=this.W.type,b=null,b=c.lb(),d=b.Ye();if(d.length)b=d[a%d.length].type;else if(b.Qa.length)b=b.Qa[a%b.Qa.length].type;else if(c.A.length)b=c.A[a%c.A.length].type;else return 0;return this.index+
b.Sl[c.Mf]};l.prototype.Xw=t("Eh");l.prototype.Vw=t("Ur");l.prototype.hx=function(){var a,c;a=0;for(c=this.ei.length;a<c;a++)this.al[a]=this.ei[a].get();return this.al};Db=l;m.prototype.Ab=function(){this.Bb=c(this.Bb)};m.prototype.Oy=function(a){var c=this.c.Yr();this.parent&&!this.lk&&c?(this.Sh>=c.length&&(c.length=this.Sh+1),c[this.Sh]=a):this.data=a};m.prototype.Uw=function(){var a=this.c.Yr();return!this.parent||this.lk||!a||this.gm?this.data:this.Sh>=a.length||"undefined"===typeof a[this.Sh]?
this.Co:a[this.Sh]};m.prototype.Qb=function(){!this.parent||this.lk||this.gm||this.Oy(this.Co)};xb=m;n.prototype.toString=function(){return"include:"+this.gk.toString()};n.prototype.Ab=function(){this.gk=this.c.io[this.nx];this.sheet.hs.add(this);this.Bb=c(this.Bb);for(var a=this.parent;a;)a.group&&a.Gr.push(this),a=a.parent;this.cz()};n.prototype.Qb=function(){this.parent&&this.c.Sk(this.c.Q);this.gk.Ao||this.gk.Qb(!0);this.parent&&this.c.fj(this.c.Q)};n.prototype.cz=function(){for(var a=this.parent;a;){if(a.group&&
!a.dm){this.sc=!1;return}a=a.parent}this.sc=!0};Gb=n;q.prototype.reset=function(a){this.Re=a;this.Kd=this.Wc=0;this.Pt.length=0;this.fo=this.Nh=!1};wb=q})();
(function(){function a(a,b){this.W=a;this.c=a.c;this.type=b[0];this.get=[this.vw,this.rw,this.Dw,this.Gw,this.lw,this.Ew,this.zw,this.ow,this.yw,this.Cw,this.mw,this.Bw,this.pw,this.Aw,this.ww,this.xw,this.sw,this.tw,this.nw,this.Fw,this.Qr,this.uw,this.Qr,this.qw][this.type];var e=null;this.Zc=this.ja=this.Ra=this.ic=this.Xm=this.ec=this.first=this.value=null;this.Ld=-1;this.Of=null;this.hq=-1;this.Eh=this.bl=null;this.Uk=!1;switch(this.type){case 0:case 1:case 2:this.value=b[1];break;case 3:this.first=
new Eb(a,b[1]);break;case 18:this.first=new Eb(a,b[1]);this.ec=new Eb(a,b[2]);this.Xm=new Eb(a,b[3]);break;case 19:this.ic=b[1];this.ic!==N.prototype.Lf.random&&this.ic!==N.prototype.Lf.Gv||this.W.Ht();this.Ra=[];this.ja=[];3===b.length?(e=b[2],this.Ra.length=e.length+1):this.Ra.length=1;break;case 20:this.Zc=this.c.Q[b[1]];this.Ld=-1;this.ic=b[2];this.Uk=b[3];Jb.vu&&this.ic===Jb.vu.prototype.Lf.wz&&this.W.Ht();this.Of=b[4]?new Eb(a,b[4]):null;this.Ra=[];this.ja=[];6===b.length?(e=b[5],this.Ra.length=
e.length+1):this.Ra.length=1;break;case 21:this.Zc=this.c.Q[b[1]];this.Uk=b[2];this.Of=b[3]?new Eb(a,b[3]):null;this.hq=b[4];break;case 22:this.Zc=this.c.Q[b[1]];this.Zc.Yl(b[2]);this.Ld=this.Zc.to(b[2]);this.ic=b[3];this.Uk=b[4];this.Of=b[5]?new Eb(a,b[5]):null;this.Ra=[];this.ja=[];7===b.length?(e=b[6],this.Ra.length=e.length+1):this.Ra.length=1;break;case 23:this.bl=b[1],this.Eh=null}this.W.hy(this.Zc);4<=this.type&&17>=this.type&&(this.first=new Eb(a,b[1]),this.ec=new Eb(a,b[2]));if(e){var g,
f;g=0;for(f=e.length;g<f;g++)this.ja.push(new Eb(a,e[g]))}}function b(a,b){this.type=a||M.ti;this.data=b||0;this.dj=null;this.type==M.ti&&(this.data=Math.floor(this.data))}a.prototype.Ab=function(){23===this.type&&(this.Eh=this.W.c.$r(this.bl,this.W.ud.parent));this.first&&this.first.Ab();this.ec&&this.ec.Ab();this.Xm&&this.Xm.Ab();this.Of&&this.Of.Ab();if(this.ja){var a,b;a=0;for(b=this.ja.length;a<b;a++)this.ja[a].Ab()}};a.prototype.Fw=function(a){this.Ra[0]=a;a=this.W.Pb();var b,e;b=0;for(e=this.ja.length;b<
e;b++)this.ja[b].get(a),this.Ra[b+1]=a.data;this.W.Hb();this.ic.apply(this.c.qf,this.Ra)};a.prototype.Qr=function(a){var b=this.Zc.lb(),e=b.Ye();if(!e.length)if(b.Qa.length)e=b.Qa;else{this.Uk?a.ae(""):a.ab(0);return}this.Ra[0]=a;a.dj=this.Zc;a=this.W.Pb();var g,b=0;for(g=this.ja.length;b<g;b++)this.ja[b].get(a),this.Ra[b+1]=a.data;b=this.W.$g;this.Of&&(this.Of.get(a),a.Zb()&&(b=a.data,e=this.Zc.A));this.W.Hb();b%=e.length;0>b&&(b+=e.length);e=e[b];-1<this.Ld?(a=0,this.Zc.Ca&&(a=e.type.Fi[this.Zc.Mf]),
this.ic.apply(e.ta[this.Ld+a],this.Ra)):this.ic.apply(e,this.Ra)};a.prototype.uw=function(a){var b=this.Zc.lb(),e=b.Ye();if(!e.length)if(b.Qa.length)e=b.Qa;else{this.Uk?a.ae(""):a.ab(0);return}b=this.W.$g;if(this.Of){var g=this.W.Pb();this.Of.get(g);if(g.Zb()){b=g.data;e=this.Zc.A;b%=e.length;0>b&&(b+=e.length);e=e[b].Ob[this.hq];I(e)?a.ae(e):a.aa(e);this.W.Hb();return}this.W.Hb()}b%=e.length;0>b&&(b+=e.length);e=e[b];b=0;this.Zc.Ca&&(b=e.type.Sl[this.Zc.Mf]);e=e.Ob[this.hq+b];I(e)?a.ae(e):a.aa(e)};
a.prototype.vw=function(a){a.type=M.ti;a.data=this.value};a.prototype.rw=function(a){a.type=M.oi;a.data=this.value};a.prototype.Dw=function(a){a.type=M.Al;a.data=this.value};a.prototype.Gw=function(a){this.first.get(a);a.Zb()&&(a.data=-a.data)};a.prototype.lw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.Zb()&&b.Zb()&&(a.data+=b.data,b.Ji()&&a.Zi());this.W.Hb()};a.prototype.Ew=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.Zb()&&b.Zb()&&(a.data-=b.data,b.Ji()&&
a.Zi());this.W.Hb()};a.prototype.zw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.Zb()&&b.Zb()&&(a.data*=b.data,b.Ji()&&a.Zi());this.W.Hb()};a.prototype.ow=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.Zb()&&b.Zb()&&(a.data/=b.data,a.Zi());this.W.Hb()};a.prototype.yw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.Zb()&&b.Zb()&&(a.data%=b.data,b.Ji()&&a.Zi());this.W.Hb()};a.prototype.Cw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);
a.Zb()&&b.Zb()&&(a.data=Math.pow(a.data,b.data),b.Ji()&&a.Zi());this.W.Hb()};a.prototype.mw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.Zb()?b.jm()?a.ae(a.data.toString()+b.data):a.data&&b.data?a.ab(1):a.ab(0):a.jm()&&(a.data=b.jm()?a.data+b.data:a.data+(Math.round(1E10*b.data)/1E10).toString());this.W.Hb()};a.prototype.Bw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.Zb()&&b.Zb()&&(a.data||b.data?a.ab(1):a.ab(0));this.W.Hb()};a.prototype.nw=function(a){this.first.get(a);
a.data?this.ec.get(a):this.Xm.get(a)};a.prototype.pw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.ab(a.data===b.data?1:0);this.W.Hb()};a.prototype.Aw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.ab(a.data!==b.data?1:0);this.W.Hb()};a.prototype.ww=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.ab(a.data<b.data?1:0);this.W.Hb()};a.prototype.xw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.ab(a.data<=b.data?1:0);this.W.Hb()};
a.prototype.sw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.ab(a.data>b.data?1:0);this.W.Hb()};a.prototype.tw=function(a){this.first.get(a);var b=this.W.Pb();this.ec.get(b);a.ab(a.data>=b.data?1:0);this.W.Hb()};a.prototype.qw=function(a){var b=this.Eh.Uw();ia(b)?a.aa(b):a.ae(b)};Eb=a;b.prototype.Ji=function(){return this.type===M.oi};b.prototype.Zb=function(){return this.type===M.ti||this.type===M.oi};b.prototype.jm=function(){return this.type===M.Al};b.prototype.Zi=function(){this.Ji()||
(this.jm()&&(this.data=parseFloat(this.data)),this.type=M.oi)};b.prototype.ab=function(a){this.type=M.ti;this.data=Math.floor(a)};b.prototype.aa=function(a){this.type=M.oi;this.data=a};b.prototype.ae=function(a){this.type=M.Al;this.data=a};b.prototype.Py=function(a){ia(a)?(this.type=M.oi,this.data=a):I(a)?(this.type=M.Al,this.data=a.toString()):(this.type=M.ti,this.data=0)};Hb=b;M={ti:0,oi:1,Al:2}})();function N(a){this.c=a;this.pd=[]}
N.prototype.nf=function(){var a={},b,c,d,e,g,f,h,k;a.waits=[];var l=a.waits,m;b=0;for(c=this.pd.length;b<c;b++){f=this.pd[b];m={t:f.time,ev:f.Qj.Ia,sm:[],sols:{}};f.Qj.pe[f.Kd]&&(m.act=f.Qj.pe[f.Kd].Ia);d=0;for(e=f.Bb.length;d<e;d++)m.sm.push(f.Bb[d].Ia);for(g in f.od)if(f.od.hasOwnProperty(g)){h=this.c.Q[parseInt(g,10)];k={sa:f.od[g].Dt,insts:[]};d=0;for(e=f.od[g].Jh.length;d<e;d++)k.insts.push(f.od[g].Jh[d].uid);m.sols[h.Ia.toString()]=k}l.push(m)}return a};
N.prototype.Lg=function(a){a=a.waits;var b,c,d,e,g,f,h,k,l,m,n;b=this.pd.length=0;for(c=a.length;b<c;b++)if(f=a[b],k=this.c.ur[f.ev.toString()]){l=-1;d=0;for(e=k.pe.length;d<e;d++)if(k.pe[d].Ia===f.act){l=d;break}if(-1!==l){h={od:{},Bb:[],Or:!1};h.time=f.t;h.Qj=k;h.Kd=l;d=0;for(e=f.sm.length;d<e;d++)(k=this.c.$l(f.sm[d]))&&h.Bb.push(k);for(g in f.sols)if(f.sols.hasOwnProperty(g)&&(k=this.c.$l(parseInt(g,10)))){l=f.sols[g];m={Dt:l.sa,Jh:[]};d=0;for(e=l.insts.length;d<e;d++)(n=this.c.ak(l.insts[d]))&&
m.Jh.push(n);h.od[k.index.toString()]=m}this.pd.push(h)}}};
(function(){function a(){}function b(){}var c=N.prototype;a.prototype.Ku=v(!0);a.prototype.Ju=v(!0);a.prototype.tu=function(){var a=this.c.vd();return a.fo?!1:!a.Nh};a.prototype.Dq=v(!0);a.prototype.Gu=v(!0);a.prototype.xn=v(!0);a.prototype.Lu=v(!0);a.prototype.wn=v(!0);c.wa=new a;var d=[],e=[];c.qh=new (r());b.prototype["int"]=function(a,b){I(b)?(a.ab(parseInt(b,10)),isNaN(a.data)&&(a.data=0)):a.ab(b)};b.prototype["float"]=function(a,b){I(b)?(a.aa(parseFloat(b)),isNaN(a.data)&&(a.data=0)):a.aa(b)};
b.prototype.random=function(a,b,c){void 0===c?a.aa(Math.random()*b):a.aa(Math.random()*(c-b)+b)};b.prototype.sqrt=function(a,b){a.aa(Math.sqrt(b))};b.prototype.abs=function(a,b){a.aa(Math.abs(b))};b.prototype.round=function(a,b){a.ab(Math.round(b))};b.prototype.floor=function(a,b){a.ab(Math.floor(b))};b.prototype.ceil=function(a,b){a.ab(Math.ceil(b))};b.prototype.sin=function(a,b){a.aa(Math.sin(L(b)))};b.prototype.cos=function(a,b){a.aa(Math.cos(L(b)))};b.prototype.tan=function(a,b){a.aa(Math.tan(L(b)))};
b.prototype.asin=function(a,b){a.aa(za(Math.asin(b)))};b.prototype.acos=function(a,b){a.aa(za(Math.acos(b)))};b.prototype.max=function(a){var b=arguments[1],c,d;c=2;for(d=arguments.length;c<d;c++)b<arguments[c]&&(b=arguments[c]);a.aa(b)};b.prototype.min=function(a){var b=arguments[1],c,d;c=2;for(d=arguments.length;c<d;c++)b>arguments[c]&&(b=arguments[c]);a.aa(b)};b.prototype.la=function(a){a.aa(this.c.la)};b.prototype.gi=function(a){a.aa(this.c.gi)};b.prototype.time=function(a){a.aa(this.c.Ni.bh)};
b.prototype.dh=function(a){a.ab(this.c.dh)};b.prototype.Im=function(a){a.ab(this.c.Im)};b.prototype.qo=function(a){a.ab(this.c.qo)};b.prototype.Jf=function(a,b,c,d,e){a.aa(Ia(b,c,d,e))};b.prototype.N=function(a,b,c,d,e){a.aa(za(Ea(b,c,d,e)))};b.prototype.left=function(a,b,c){a.ae(I(b)?b.substr(0,c):"")};b.prototype.right=function(a,b,c){a.ae(I(b)?b.substr(b.length-c):"")};b.prototype.replace=function(a,b,c,d){I(b)&&I(c)&&I(d)?a.ae(b.replace(RegExp(Oa(c),"gi"),d)):a.ae(I(b)?b:"")};b.prototype.Gv=function(a){var b=
qa(Math.random()*(arguments.length-1));a.Py(arguments[b+1])};b.prototype.Xn=function(a){a.aa(this.c.Xn/1E3)};b.prototype.wm=function(a){a.aa(this.c.wm)};c.Lf=new b;c.Gy=function(){var a,b,c,k,l,m,n=this.c.vd();a=0;for(c=this.pd.length;a<c;a++)if(k=this.pd[a],!(k.time>this.c.Ni.bh)){n.Re=k.Qj;n.Kd=k.Kd;n.Wc=0;for(b in k.od)k.od.hasOwnProperty(b)&&(l=this.c.Q[parseInt(b,10)].lb(),m=k.od[b],l.Ib=m.Dt,xa(l.A,m.Jh),l=m,l.Jh.length=0,e.push(l));k.Qj.Fy();this.c.Sn(k.Bb);k.Or=!0}b=a=0;for(c=this.pd.length;a<
c;a++)k=this.pd[a],this.pd[b]=k,k.Or?(La(k.od),k.Bb.length=0,d.push(k)):b++;this.pd.length=b}})();
(function(){Wa=function(a){var c=a[0].prototype,d=a[1],e=a[3],g=a[4],f=a[5],h=a[6],k=a[7];a=a[8];c.wa||(c.wa={});c.qh||(c.qh={});c.Lf||(c.Lf={});var l=c.wa,m=c.qh,c=c.Lf;e&&(l.Bz=function(a,b){return Ib(this.x,a,b)},l.Cz=function(a,b){return Ib(this.y,a,b)},l.Kz=function(){var a=this.O;this.Tb();var b=this.Uc;return!(b.right<a.Qc||b.bottom<a.Rc||b.left>a.ie||b.top>a.he)},l.Lz=function(){this.Tb();var a=this.Uc,b=this.c.Pa;return 0>a.right||0>a.bottom||a.left>b.width||a.top>b.height},l.aA=function(a,
b,c){var d=this.lb(),e=d.Ye();if(!e.length)return!1;var f=e[0],g=f,h=Ia(f.x,f.y,b,c),k,l,m;k=1;for(l=e.length;k<l;k++)if(f=e[k],m=Ia(f.x,f.y,b,c),0===a&&m<h||1===a&&m>h)h=m,g=f;d.Ok(g);return!0},m.wA=function(a){this.x!==a&&(this.x=a,this.Rb())},m.xA=function(a){this.y!==a&&(this.y=a,this.Rb())},m.qA=function(a,b){if(this.x!==a||this.y!==b)this.x=a,this.y=b,this.Rb()},m.rA=function(a,b){var c=a.Qw(this);if(c){var d;c.Nf?(d=c.Nf(b,!0),c=c.Nf(b,!1)):(d=c.x,c=c.y);if(this.x!==d||this.y!==c)this.x=d,
this.y=c,this.Rb()}},m.Sz=function(a){0!==a&&(this.x+=Math.cos(this.N)*a,this.y+=Math.sin(this.N)*a,this.Rb())},m.Rz=function(a,b){0!==b&&(this.x+=Math.cos(L(a))*b,this.y+=Math.sin(L(a))*b,this.Rb())},c.av=function(a){a.aa(this.x)},c.bv=function(a){a.aa(this.y)},c.la=function(a){a.aa(this.c.Zr(this))});g&&(l.Az=function(a,b){return Ib(this.width,a,b)},l.xz=function(a,b){return Ib(this.height,a,b)},m.vA=function(a){this.width!==a&&(this.width=a,this.Rb())},m.nA=function(a){this.height!==a&&(this.height=
a,this.Rb())},m.sA=function(a,b){if(this.width!==a||this.height!==b)this.width=a,this.height=b,this.Rb()},c.CA=function(a){a.aa(this.width)},c.Ez=function(a){a.aa(this.height)},c.tz=function(a){this.Tb();a.aa(this.Uc.left)},c.vz=function(a){this.Tb();a.aa(this.Uc.top)},c.uz=function(a){this.Tb();a.aa(this.Uc.right)},c.sz=function(a){this.Tb();a.aa(this.Uc.bottom)});f&&(l.mz=function(a,b){return Fa(this.N,L(b))<=L(a)},l.Iz=function(a){return Ha(this.N,L(a))},l.Gz=function(a,b){var c=Da(a),d=Da(b),
e=Ba(this.N);return Ha(d,c)?Ha(e,c)&&!Ha(e,d):!(!Ha(e,c)&&Ha(e,d))},m.xl=function(a){a=L(Aa(a));isNaN(a)||this.N===a||(this.N=a,this.Rb())},m.gA=function(a){0===a||isNaN(a)||(this.N+=L(a),this.N=Ba(this.N),this.Rb())},m.hA=function(a){0===a||isNaN(a)||(this.N-=L(a),this.N=Ba(this.N),this.Rb())},m.iA=function(a,b){var c=Ga(this.N,L(b),L(a));isNaN(c)||this.N===c||(this.N=c,this.Rb())},m.jA=function(a,b,c){a=Ga(this.N,Math.atan2(c-this.y,b-this.x),L(a));isNaN(a)||this.N===a||(this.N=a,this.Rb())},m.tA=
function(a,b){var c=Math.atan2(b-this.y,a-this.x);isNaN(c)||this.N===c||(this.N=c,this.Rb())},c.lz=function(a){a.aa(Ca(this.N))});d||(l.yz=function(a,b,c){return Ib(this.Ob[a],b,c)},l.Hz=function(a){return this.Ob[a]},l.bA=function(a,b){var c=this.lb(),d=c.Ye();if(!d.length)return!1;var e=d[0],f=e,g=e.Ob[b],h,k,l;h=1;for(k=d.length;h<k;h++)if(e=d[h],l=e.Ob[b],0===a&&l<g||1===a&&l>g)g=l,f=e;c.Ok(f);return!0},l.$z=function(a){var b,c,d,e,f;if(this.c.Lw().Fo){f=this.lb();if(f.Ib)for(f.Ib=!1,f.A.length=
0,f.Qa.length=0,d=this.A,b=0,c=d.length;b<c;b++)e=d[b],e.uid===a?f.Qa.push(e):f.A.push(e);else{d=b=0;for(c=f.A.length;b<c;b++)e=f.A[b],f.A[d]=e,e.uid===a?f.Qa.push(e):d++;f.A.length=d}this.uh();return!!f.A.length}e=this.c.ak(a);if(!e)return!1;f=this.lb();if(!f.Ib&&-1===f.A.indexOf(e))return!1;if(this.Ca)for(a=e.type.eb,b=0,c=a.length;b<c;b++){if(a[b]===this)return f.Ok(e),this.uh(),!0}else if(e.type===this)return f.Ok(e),this.uh(),!0;return!1},l.Hu=v(!0),l.Iu=v(!0),m.oA=function(a,b){var c=this.Ob;
ia(c[a])?c[a]=ia(b)?b:parseFloat(b):I(c[a])&&(c[a]=I(b)?b:b.toString())},m.kz=function(a,b){var c=this.Ob;ia(c[a])?c[a]=ia(b)?c[a]+b:c[a]+parseFloat(b):I(c[a])&&(c[a]=I(b)?c[a]+b:c[a]+b.toString())},m.yA=function(a,b){var c=this.Ob;ia(c[a])&&(c[a]=ia(b)?c[a]-b:c[a]-parseFloat(b))},m.kA=function(a,b){this.Ob[a]=b?1:0},m.AA=function(a){this.Ob[a]=1-this.Ob[a]},m.Tc=function(){this.c.ni(this)},m.Bu||(m.Bu=function(a){var b,c;try{b=JSON.parse(a)}catch(d){return}this.c.vm(this,b,!0);this.Af&&this.Af();
if(this.ta)for(a=0,b=this.ta.length;a<b;++a)c=this.ta[a],c.Af&&c.Af()}),c.Dz=function(a){var b=a.dj.A.length,c,d,e;c=0;for(d=this.c.gd.length;c<d;c++)e=this.c.gd[c],a.dj.Ca?0<=e.type.eb.indexOf(a.dj)&&b++:e.type===a.dj&&b++;a.ab(b)},c.dA=function(a){a.ab(a.dj.lb().Ye().length)},c.BA=function(a){a.ab(this.uid)},c.Fz=function(a){a.ab(this.ck())},c.lu||(c.lu=function(a){a.ae(JSON.stringify(this.c.Tp(this,!0)))}));h&&(l.Nz=t("visible"),m.uA=function(a){!a!==!this.visible&&(this.visible=a,this.c.ub=!0)},
l.zz=function(a,b){return Ib(Ta(100*this.opacity),a,b)},m.pA=function(a){a/=100;0>a?a=0:1<a&&(a=1);a!==this.opacity&&(this.opacity=a,this.c.ub=!0)},c.Opacity=function(a){a.aa(Ta(100*this.opacity))});k&&(l.Jz=function(a){return a?this.O===a:!1},l.cA=function(a){var b=this.lb(),c=b.Ye();if(!c.length)return!1;var d=c[0],e=d,f,g;f=1;for(g=c.length;f<g;f++)if(d=c[f],0===a){if(d.O.index>e.O.index||d.O.index===e.O.index&&d.wd()>e.wd())e=d}else if(d.O.index<e.O.index||d.O.index===e.O.index&&d.wd()<e.wd())e=
d;b.Ok(e);return!0},m.Vz=function(){var a=this.wd();a!==this.O.A.length-1&&(wa(this.O.A,a),this.O.A.push(this),this.c.ub=!0,this.O.qd=!0)},m.Tz=function(){var a=this.wd();0!==a&&(wa(this.O.A,a),this.O.A.unshift(this),this.c.ub=!0,this.O.qd=!0)},m.Uz=function(a){a&&a!=this.O&&(wa(this.O.A,this.wd()),this.O.qd=!0,this.O=a,this.ii=a.A.length,a.A.push(this),this.c.ub=!0)},m.EA=function(a,b){var c=0===a;if(b){var d=b.Mw(this);if(d&&d.uid!==this.uid){this.O.index!==d.O.index&&(wa(this.O.A,this.wd()),this.O.qd=
!0,this.O=d.O,this.ii=d.O.A.length,d.O.A.push(this));var e=this.wd(),d=d.wd();wa(this.O.A,e);e<d&&d--;c&&d++;d===this.O.A.length?this.O.A.push(this):this.O.A.splice(d,0,this);this.O.qd=!0;this.c.ub=!0}}},c.Pz=function(a){a.ab(this.O.Xs)},c.Oz=function(a){a.ae(this.O.name)},c.DA=function(a){a.ab(this.wd())});a&&(m.lA=function(a,b){if(this.c.$){var c=this.type.vo(b);if(!(0>c)){var d=1===a;this.yg[c]!==d&&(this.yg[c]=d,this.qg(),this.c.ub=!0)}}},m.mA=function(a,b,c){if(this.c.$){var d=this.type.vo(a);
0>d||(a=this.type.fa[d],d=this.ob[d],b=Math.floor(b),0>b||b>=d.length||(1===this.c.$.Tw(a.mc,b)&&(c/=100),d[b]!==c&&(d[b]=c,a.sc&&(this.c.ub=!0))))}})};pb=function(){this.Qn=this.Mn=!0;this.type.ir=!0;this.c.ub=!0;var a,c,d=this.Nn;a=0;for(c=d.length;a<c;++a)d[a](this)};qb=function(a){a&&this.Nn.push(a)};sb=function(){if(this.Mn){var a=this.Uc,c=this.Ic;a.set(this.x,this.y,this.x+this.width,this.y+this.height);a.offset(-this.ek*this.width,-this.fk*this.height);this.N?(a.offset(-this.x,-this.y),c.It(a,
this.N),c.offset(this.x,this.y),c.wr(a)):c.Rm(a);a.normalize();this.Mn=!1}};var a=new ta(0,0,0,0);tb=function(){if(this.Qn&&this.Ci){this.Tb();var b=this.type.Dr,c=this.Gl,d=this.Uc;a.set(b.Xq(d.left),b.Yq(d.top),b.Xq(d.right),b.Yq(d.bottom));c.kw(a)||(c.right<c.left?b.update(this,null,a):b.update(this,c,a),c.copy(a),this.Qn=!1)}};rb=function(a,c){return this.Uc.Qe(a,c)&&this.Ic.Qe(a,c)?this.Pe&&!this.Pe.ss()?(this.Pe.Ar(this.width,this.height,this.N),this.Pe.Qe(a-this.x,c-this.y)):!0:!1};lb=function(){this.type.dn();
return this.Hh};ub=function(){this.O.dz();return this.ii};vb=function(){this.Fa.length=0;var a,c;a=0;for(c=this.yg.length;a<c;a++)this.yg[a]&&this.Fa.push(this.type.fa[a]);this.cu=!!this.Fa.length};mb=function(){return"Inst"+this.st};Za=function(a){if(a&&a.ve&&a.type!=this){var c,d,e;c=0;for(d=a.siblings.length;c<d;c++)if(e=a.siblings[c],e.type==this)return e}a=this.lb().Ye();return a.length?a[0]:null};$a=function(a){var c=this.lb().Ye();return c.length?c[a.ck()%c.length]:null};Ya=function(){if(this.jj&&
!this.Ca){var a,c;a=0;for(c=this.A.length;a<c;a++)this.A[a].Hh=a;var d=a,e=this.c.gd;a=0;for(c=e.length;a<c;++a)e[a].type===this&&(e[a].Hh=d++);this.jj=!1}};ib=function(a){if(a<this.A.length)return this.A[a];a-=this.A.length;var c=this.c.gd,d,e;d=0;for(e=c.length;d<e;++d)if(c[d].type===this){if(0===a)return c[d];--a}return null};ab=function(){return this.ah[this.If]};bb=function(){this.If++;this.If===this.ah.length?this.ah.push(new Xa(this)):this.ah[this.If].Ib=!0};cb=function(){this.If++;this.If===
this.ah.length&&this.ah.push(new Xa(this));var a=this.ah[this.If],c=this.ah[this.If-1];c.Ib?a.Ib=!0:(a.Ib=!1,xa(a.A,c.A),xa(a.Qa,c.Qa))};db=function(){this.If--};eb=function(a){var c,d,e,g,f,h=0;if(!this.Ca)for(c=0,d=this.eb.length;c<d;c++)for(f=this.eb[c],e=0,g=f.Db.length;e<g;e++){if(a===f.Db[e].name)return this.ha.vs=h,f.Db[e];h++}c=0;for(d=this.Db.length;c<d;c++){if(a===this.Db[c].name)return this.ha.vs=h,this.Db[c];h++}return null};fb=function(a){return this.Yl(a)?this.ha.vs:-1};gb=function(a){var c,
d;c=0;for(d=this.fa.length;c<d;c++)if(this.fa[c].name===a)return c;return-1};hb=function(){if(this.ve&&!this.Ca){var a,c,d,e,g,f,h;this.dn();f=this.lb();var k=f.Ib,l=(a=this.c.vd())&&a.Re&&a.Re.hg;a=0;for(c=this.fd.length;a<c;a++)if(g=this.fd[a],g!==this&&(g.dn(),h=g.lb(),h.Ib=k,!k)){h.A.length=f.A.length;d=0;for(e=f.A.length;d<e;d++)h.A[d]=g.as(f.A[d].Hh);if(l)for(h.Qa.length=f.Qa.length,d=0,e=f.Qa.length;d<e;d++)h.Qa[d]=g.as(f.Qa[d].Hh)}}};kb=function(){return"Type"+this.Ia};Ib=function(a,c,d){if("undefined"===
typeof a||"undefined"===typeof d)return!1;switch(c){case 0:return a===d;case 1:return a!==d;case 2:return a<d;case 3:return a<=d;case 4:return a>d;case 5:return a>=d;default:return!1}}})();var Rb={};function Tb(a){this.c=a}
(function(){var a=Tb.prototype;a.yf=function(a){this.zc=a;this.c=a.c};var b=a.yf.prototype;b.kc=function(){this.Ca||(this.nc=new Image,this.nc.idtkLoadDisposed=!0,this.nc.src=this.Qt,this.nc.Hv=this.Rt,this.c.jz(this.nc),this.Sc=this.pattern=null)};b.at=function(){this.Ca||(this.Sc=null)};b.dt=function(){if(!this.Ca&&this.A.length){this.Sc||(this.Sc=this.c.$.Ds(this.nc,this.c.Oa,this.Yp));var a,b;a=0;for(b=this.A.length;a<b;a++)this.A[a].Sc=this.Sc}};b.Jx=function(){this.Ca||this.Sc||!this.c.$||(this.Sc=
this.c.$.Ds(this.nc,this.c.Oa,this.Yp))};b.Zt=function(){this.Ca||this.A.length||!this.Sc||(this.c.$.deleteTexture(this.Sc),this.Sc=null)};b.nt=function(a){a.drawImage(this.nc,0,0)};a.Id=function(a){this.type=a;this.c=a.c};b=a.Id.prototype;b.kc=function(){this.visible=0===this.Ac[0];this.Tk=new ta(0,0,0,0);this.gs=!1;this.nc=this.type.nc;this.c.$?(this.type.Jx(),this.Sc=this.type.Sc):(this.type.pattern||(this.type.pattern=this.c.Na.createPattern(this.type.nc,"repeat")),this.pattern=this.type.pattern)};
b.Af=function(){this.gs=!1;this.nc=this.type.nc};b.Kk=function(){this.c.$&&this.gs&&this.Sc&&(this.c.$.deleteTexture(this.Sc),this.Sc=null)};b.Bh=function(a){a.globalAlpha=this.opacity;a.save();a.fillStyle=this.pattern;var b=this.x,e=this.y;this.c.Pk&&(b=b+0.5|0,e=e+0.5|0);var g=-(this.ek*this.width),f=-(this.fk*this.height),h=g%this.nc.width,k=f%this.nc.height;0>h&&(h+=this.nc.width);0>k&&(k+=this.nc.height);a.translate(b,e);a.rotate(this.N);a.translate(h,k);a.fillRect(g-h,f-k,this.width,this.height);
a.restore()};b.Ue=function(a){a.$d(this.Sc);a.Vk(this.opacity);var b=this.Tk;b.right=this.width/this.nc.width;b.bottom=this.height/this.nc.height;var e=this.Ic;if(this.c.Pk){var g=(this.x+0.5|0)-this.x,f=(this.y+0.5|0)-this.y;a.di(e.ee+g,e.fe+f,e.og+g,e.pg+f,e.Ef+g,e.Ff+f,e.Cf+g,e.Df+f,b)}else a.di(e.ee,e.fe,e.og,e.pg,e.Ef,e.Ff,e.Cf,e.Df,b)};a.wa=new (r());a.qh=new (r());a.Lf=new (r())})();function Ub(a){this.c=a}
(function(){function a(a){h=a.x;k=a.y;l=a.z}function b(a){m=a.x;n=a.y;q=a.z}function c(){}function d(){}var e=Ub.prototype;e.yf=function(a){this.zc=a;this.c=a.c};e.yf.prototype.kc=r();e.Id=function(a){this.type=a;this.c=a.c;this.touches=[];this.yp=!1};var g=e.Id.prototype,f={left:0,top:0};g.Uj=function(a){var b,c;b=0;for(c=this.touches.length;b<c;b++)if(this.touches[b].id===a)return b;return-1};var h=0,k=0,l=0,m=0,n=0,q=0;g.kc=function(){this.Bx=!("undefined"===typeof window.c2isWindows8||!window.c2isWindows8);
this.fh=this.ao=this.$n=this.br=this.ar=this.$q=this.qv=this.pv=this.ov=this.Nk=this.Mk=this.Lk=0;this.gz=0!==this.Ac[0];var c=0<this.c.hd?document:this.c.canvas,d=document;this.c.Qf?d=c=window.Canvas:this.c.Qd&&(d=c=window);var e=this;window.navigator.pointerEnabled?(c.addEventListener("pointerdown",function(a){e.ct(a)},!1),c.addEventListener("pointermove",function(a){e.bt(a)},!1),d.addEventListener("pointerup",function(a){e.Km(a)},!1),d.addEventListener("pointercancel",function(a){e.Km(a)},!1),
this.c.canvas&&(this.c.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),this.c.canvas.addEventListener("gesturehold",function(a){a.preventDefault()},!1),document.addEventListener("gesturehold",function(a){a.preventDefault()},!1))):window.navigator.msPointerEnabled?(c.addEventListener("MSPointerDown",function(a){e.ct(a)},!1),c.addEventListener("MSPointerMove",function(a){e.bt(a)},!1),d.addEventListener("MSPointerUp",
function(a){e.Km(a)},!1),d.addEventListener("MSPointerCancel",function(a){e.Km(a)},!1),this.c.canvas&&(this.c.canvas.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1),document.addEventListener("MSGestureHold",function(a){a.preventDefault()},!1))):(c.addEventListener("touchstart",function(a){e.ft(a)},!1),c.addEventListener("touchmove",function(a){e.et(a)},!1),d.addEventListener("touchend",function(a){e.Cp(a)},!1),d.addEventListener("touchcancel",function(a){e.Cp(a)},!1));if(this.Bx){var f=
function(a){a=a.reading;e.$q=a.accelerationX;e.ar=a.accelerationY;e.br=a.accelerationZ},g=function(a){a=a.reading;e.Lk=a.yawDegrees;e.Mk=a.pitchDegrees;e.Nk=a.rollDegrees},n=Windows.Devices.Sensors.Accelerometer.getDefault();n&&(n.reportInterval=Math.max(n.minimumReportInterval,16),n.addEventListener("readingchanged",f));var h=Windows.Devices.Sensors.Inclinometer.getDefault();h&&(h.reportInterval=Math.max(h.minimumReportInterval,16),h.addEventListener("readingchanged",g));document.addEventListener("visibilitychange",
function(){document.hidden||document.msHidden?(n&&n.removeEventListener("readingchanged",f),h&&h.removeEventListener("readingchanged",g)):(n&&n.addEventListener("readingchanged",f),h&&h.addEventListener("readingchanged",g))},!1)}else window.addEventListener("deviceorientation",function(a){e.Lk=a.alpha||0;e.Mk=a.beta||0;e.Nk=a.gamma||0},!1),window.addEventListener("devicemotion",function(a){a.accelerationIncludingGravity&&(e.ov=a.accelerationIncludingGravity.x||0,e.pv=a.accelerationIncludingGravity.y||
0,e.qv=a.accelerationIncludingGravity.z||0);a.acceleration&&(e.$q=a.acceleration.x||0,e.ar=a.acceleration.y||0,e.br=a.acceleration.z||0)},!1);this.gz&&!this.c.jc&&(jQuery(document).mousemove(function(a){e.ty(a)}),jQuery(document).mousedown(function(a){e.ry(a)}),jQuery(document).mouseup(function(a){e.uy(a)}));this.c.ik&&!this.c.Qf&&AppMobi.accelerometer.watchAcceleration(a,{frequency:40,adjustForRotation:!0});this.c.Ii&&navigator.accelerometer&&navigator.accelerometer.watchAcceleration&&navigator.accelerometer.watchAcceleration(b,
null,{frequency:40});this.c.Yy(this)};g.bt=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&a.preventDefault();var b=this.Uj(a.pointerId),c=Ma();if(0<=b){var d=this.c.jc?f:jQuery(this.c.canvas).offset(),b=this.touches[b];2>c-b.time||(b.qm=b.time,b.Wo=b.x,b.Xo=b.y,b.time=c,b.x=a.pageX-d.left,b.y=a.pageY-d.top)}}};g.ct=function(a){if(a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType){a.preventDefault&&a.preventDefault();var b=this.c.jc?
f:jQuery(this.c.canvas).offset(),c=a.pageX-b.left,b=a.pageY-b.top,d=Ma();this.fh=this.touches.length;this.touches.push({time:d,x:c,y:b,qm:d,Wo:c,Xo:b,id:a.pointerId,Wp:this.fh});this.c.Hg=!0;this.c.trigger(Ub.prototype.wa.Fq,this);this.c.trigger(Ub.prototype.wa.Hq,this);this.$n=c;this.ao=b;this.c.trigger(Ub.prototype.wa.yn,this);this.c.Hg=!1}};g.Km=function(a){a.pointerType!==a.MSPOINTER_TYPE_MOUSE&&"mouse"!==a.pointerType&&(a.preventDefault&&a.preventDefault(),a=this.Uj(a.pointerId),this.fh=0<=a?
this.touches[a].Wp:-1,this.c.Hg=!0,this.c.trigger(Ub.prototype.wa.Eq,this),this.c.trigger(Ub.prototype.wa.Gq,this),this.c.Hg=!1,0<=a&&this.touches.splice(a,1))};g.et=function(a){a.preventDefault&&a.preventDefault();var b=Ma(),c,d,e,g;c=0;for(d=a.changedTouches.length;c<d;c++)if(e=a.changedTouches[c],g=this.Uj(e.identifier),0<=g){var n=this.c.jc?f:jQuery(this.c.canvas).offset();g=this.touches[g];2>b-g.time||(g.qm=g.time,g.Wo=g.x,g.Xo=g.y,g.time=b,g.x=e.pageX-n.left,g.y=e.pageY-n.top)}};g.ft=function(a){a.preventDefault&&
a.preventDefault();var b=this.c.jc?f:jQuery(this.c.canvas).offset(),c=Ma();this.c.Hg=!0;var d,e,g,n;d=0;for(e=a.changedTouches.length;d<e;d++)if(g=a.changedTouches[d],n=this.Uj(g.identifier),-1===n){n=g.pageX-b.left;var h=g.pageY-b.top;this.fh=this.touches.length;this.touches.push({time:c,x:n,y:h,qm:c,Wo:n,Xo:h,id:g.identifier,Wp:this.fh});this.c.trigger(Ub.prototype.wa.Fq,this);this.c.trigger(Ub.prototype.wa.Hq,this);this.$n=n;this.ao=h;this.c.trigger(Ub.prototype.wa.yn,this)}this.c.Hg=!1};g.Cp=
function(a){a.preventDefault&&a.preventDefault();this.c.Hg=!0;var b,c,d;b=0;for(c=a.changedTouches.length;b<c;b++)d=a.changedTouches[b],d=this.Uj(d.identifier),0<=d&&(this.fh=this.touches[d].Wp,this.c.trigger(Ub.prototype.wa.Eq,this),this.c.trigger(Ub.prototype.wa.Gq,this),this.touches.splice(d,1));this.c.Hg=!1};g.KA=function(){return this.c.ik&&0===this.Lk&&0!==l?90*l:this.c.Ii&&0===this.Lk&&0!==q?90*q:this.Lk};g.LA=function(){return this.c.ik&&0===this.Mk&&0!==k?-90*k:this.c.Ii&&0===this.Mk&&0!==
n?-90*n:this.Mk};g.MA=function(){return this.c.ik&&0===this.Nk&&0!==h?90*h:this.c.Ii&&0===this.Nk&&0!==m?90*m:this.Nk};g.ry=function(a){a.preventDefault&&this.c.yo&&!this.c.Ig&&a.preventDefault();this.ft({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]});this.yp=!0};g.ty=function(a){this.yp&&this.et({changedTouches:[{pageX:a.pageX,pageY:a.pageY,identifier:0}]})};g.uy=function(a){a.preventDefault&&this.c.yo&&!this.c.Ig&&a.preventDefault();this.c.yo=!0;this.Cp({changedTouches:[{pageX:a.pageX,
pageY:a.pageY,identifier:0}]});this.yp=!1};g.Zp=function(){var a,b,c,d=Ma();a=0;for(b=this.touches.length;a<b;a++)c=this.touches[a],c.time<=d-50&&(c.qm=d)};c.prototype.Hq=v(!0);c.prototype.Gq=v(!0);c.prototype.yn=function(a){return a?this.c.Xy(a,this.$n,this.ao):!1};c.prototype.Fq=function(a){a=Math.floor(a);return a===this.fh};c.prototype.Eq=function(a){a=Math.floor(a);return a===this.fh};e.wa=new c;d.prototype.av=function(a,b){if(this.touches.length){var c,d,e,f,g;fa(b)?(c=this.c.$j(0),d=c.scale,
e=c.sg,f=c.ig,g=c.N,c.scale=this.c.Pa.scale,c.sg=1,c.ig=1,c.N=this.c.Pa.N,a.aa(c.dd(this.touches[0].x,this.touches[0].y,!0)),c.scale=d,c.sg=e,c.ig=f,c.N=g):(c=ia(b)?this.c.$j(b):this.c.wo(b))?a.aa(c.dd(this.touches[0].x,this.touches[0].y,!0)):a.aa(0)}else a.aa(0)};d.prototype.bv=function(a,b){if(this.touches.length){var c,d,e,f,g;fa(b)?(c=this.c.$j(0),d=c.scale,e=c.sg,f=c.jg,g=c.N,c.scale=this.c.Pa.scale,c.sg=1,c.jg=1,c.N=this.c.Pa.N,a.aa(c.dd(this.touches[0].x,this.touches[0].y,!1)),c.scale=d,c.sg=
e,c.jg=f,c.N=g):(c=ia(b)?this.c.$j(b):this.c.wo(b))?a.aa(c.dd(this.touches[0].x,this.touches[0].y,!1)):a.aa(0)}else a.aa(0)};e.Lf=new d})();function O(a,b){for(var c in b.prototype)b.prototype.hasOwnProperty(c)&&(a.prototype[c]=b.prototype[c])}
if(navigator.isCocoonJS&&"undefined"!==typeof window.cr_cjs_accelerated_physics)da("Using CocoonJS native physics"),window.ext&&"undefined"!==typeof window.ext.IDTK_SRV_BOX2D?function(){function a(a,c,d,e){this.type=b.Di;this.Ua=new m;this.Va=new m;this.He=null;void 0!==a&&(this.D=a);void 0!==c&&(this.G=c);void 0!==d&&this.Ua.u(d);void 0!==e&&this.Va.u(e);this.cj=this.Qs=this.dq=this.fp=this.kf=0;this.Ei=this.Ch=!1}function b(a){this.D=a.D;this.G=a.G;this.He=a.He;this.type=a.type;this.next=null}function c(a,
b){this.ym=[];this.$a=[];this.Vh=[];this.Yf=null;this.Wx=[];this.rb=window.ext.IDTK_SRV_BOX2D.makeCall("createWorld",a.x,a.y,b)}function d(){}function e(a,b,c){this.fb=a;this.Za=b;this.cy=c}function g(a,b){var c=a.He;a.He=null;this.oa=b;this.p=new k(a.position,l.pi(a.N));this.Ak=[];this.wk=a.sc;a.type===g.td&&(a.qe=0);this.Fb=window.ext.IDTK_SRV_BOX2D.makeCall("createBody",b.rb,a);a.He=c}function f(a,b,c,d){this.yk=a;this.kp=c;this.eg={};this.eg.Lc=m.m(0,0);this.Bm=!1;this.zm=d.qe;this.mp=d.Xe;this.Gk=
d.lf;this.Bm=d.Lo}function h(){}function k(a,b){this.position=m.m(0,0);this.j=new l;void 0===a&&(a=null);void 0===b&&(b=null);a&&(this.position.u(a),this.j.me(b))}function l(){this.f=m.m(0,0);this.g=m.m(0,0);this.wg()}function m(a,b){void 0===a&&(a=0);void 0===b&&(b=0);this.x=a;this.y=b}P=m;m.zf=[];m.m=function(a,b){if(0<P.zf.length){var c=P.zf.pop();c.Set(a,b);return c}return new P(a,b)};m.wb=function(a){1E4>P.zf.length&&P.zf.push(a)};m.prototype.U=function(){this.y=this.x=0};m.prototype.Set=function(a,
b){void 0===a&&(a=0);void 0===b&&(b=0);this.x=a;this.y=b};m.prototype.u=function(a){this.x=a.x;this.y=a.y};m.Qz=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);return m.m(a,b)};m.prototype.Cb=function(){return m.m(this.x,this.y)};m.prototype.uf=function(a){this.x+=a.x;this.y+=a.y};m.prototype.Fn=function(a){this.x-=a.x;this.y-=a.y};m.prototype.Fc=function(a){void 0===a&&(a=0);this.x*=a;this.y*=a};m.prototype.Le=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};m.prototype.wl=function(){return this.x*
this.x+this.y*this.y};m.prototype.Gc=function(){var a=Math.sqrt(this.x*this.x+this.y*this.y);if(a<Number.MIN_VALUE)return 0;var b=1/a;this.x*=b;this.y*=b;return a};m.prototype.vn=function(){this.x=-this.x;this.y=-this.y};S=l;l.pi=function(a){void 0===a&&(a=0);var b=new l;b.Set(a);return b};l.Ke=function(a,b){var c=new l;c.Dn(a,b);return c};l.prototype.Set=function(a){void 0===a&&(a=0);var b=Math.cos(a);a=Math.sin(a);this.f.x=b;this.g.x=-a;this.f.y=a;this.g.y=b};l.prototype.Dn=function(a,b){this.f.u(a);
this.g.u(b)};l.prototype.Cb=function(){var a=new l;a.me(this);return a};l.prototype.me=function(a){this.f.u(a.f);this.g.u(a.g)};l.prototype.fl=function(a){this.f.x+=a.f.x;this.f.y+=a.f.y;this.g.x+=a.g.x;this.g.y+=a.g.y};l.prototype.wg=function(){this.f.x=1;this.g.x=0;this.f.y=0;this.g.y=1};l.prototype.U=function(){this.f.x=0;this.g.x=0;this.f.y=0;this.g.y=0};l.prototype.Dc=function(){return Math.atan2(this.f.y,this.f.x)};l.prototype.nn=function(a){var b=this.f.x,c=this.g.x,d=this.f.y,e=this.g.y,f=
b*e-c*d;0!==f&&(f=1/f);a.f.x=f*e;a.g.x=-f*c;a.f.y=-f*d;a.g.y=f*b;return a};l.prototype.xg=function(a,b,c){void 0===b&&(b=0);void 0===c&&(c=0);var d=this.f.x,e=this.g.x,f=this.f.y,g=this.g.y,h=d*g-e*f;0!==h&&(h=1/h);a.x=h*(g*b-e*c);a.y=h*(d*c-f*b);return a};l.prototype.tf=function(){this.f.tf();this.g.tf()};Vb=k;k.prototype.xb=function(a,b){this.position.u(a);this.j.me(b)};k.prototype.wg=function(){this.position.U();this.j.wg()};k.prototype.Set=function(a){this.position.u(a.position);this.j.me(a.j)};
k.prototype.xl=function(){return Math.atan2(this.j.f.y,this.j.f.x)};U=h;h.ul=function(a){void 0===a&&(a=0);return isFinite(a)};h.bb=function(a,b){return a.x*b.x+a.y*b.y};h.hh=function(a,b){return a.x*b.y-a.y*b.x};h.vf=function(a,b){void 0===b&&(b=0);return m.m(b*a.y,-b*a.x)};h.jn=function(a,b){void 0===a&&(a=0);return m.m(-a*b.y,a*b.x)};h.mb=function(a,b){return m.m(a.f.x*b.x+a.g.x*b.y,a.f.y*b.x+a.g.y*b.y)};h.wf=function(a,b){return m.m(h.bb(b,a.f),h.bb(b,a.g))};h.Kb=function(a,b){var c=h.mb(a.j,
b);c.x+=a.position.x;c.y+=a.position.y;return c};h.tn=function(a,b){var c=h.Sa(b,a.position),d=c.x*a.j.f.x+c.y*a.j.f.y;c.y=c.x*a.j.g.x+c.y*a.j.g.y;c.x=d;return c};h.rj=function(a,b){return m.m(a.x+b.x,a.y+b.y)};h.Sa=function(a,b){return m.m(a.x-b.x,a.y-b.y)};h.su=function(a,b){var c=a.x-b.x,d=a.y-b.y;return Math.sqrt(c*c+d*d)};h.rq=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};h.Du=function(a,b){void 0===a&&(a=0);return m.m(a*b.x,a*b.y)};h.iu=function(a,b){return l.Ke(h.rj(a.f,b.f),h.rj(a.g,
b.g))};h.Eu=function(a,b){return l.Ke(h.mb(a,b.f),h.mb(a,b.g))};h.Fu=function(a,b){var c=m.m(h.bb(a.f,b.f),h.bb(a.g,b.f)),d=m.m(h.bb(a.f,b.g),h.bb(a.g,b.g));return l.Ke(c,d)};h.tf=function(a){void 0===a&&(a=0);return 0<a?a:-a};h.oj=function(a){return m.m(h.tf(a.x),h.tf(a.y))};h.gu=function(a){return l.Ke(h.oj(a.f),h.oj(a.g))};h.Bq=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);return a<b?a:b};h.Cq=function(a,b){return m.m(h.Bq(a.x,b.x),h.Bq(a.y,b.y))};h.zq=function(a,b){void 0===a&&(a=0);void 0===
b&&(b=0);return a>b?a:b};h.Aq=function(a,b){return m.m(h.zq(a.x,b.x),h.zq(a.y,b.y))};h.Xa=function(a,b,c){void 0===a&&(a=0);void 0===b&&(b=0);void 0===c&&(c=0);return a<b?b:a>c?c:a};h.mu=function(a,b,c){return h.Aq(b,h.Cq(a,c))};h.zA=function(a,b){var c=a[0];a[0]=b[0];b[0]=c};h.eA=function(){return 2*Math.random()-1};h.fA=function(a,b){void 0===a&&(a=0);void 0===b&&(b=0);var c=Math.random();return(b-a)*c+a};h.Wz=function(a){void 0===a&&(a=0);a|=a>>1&2147483647;a|=a>>2&1073741823;a|=a>>4&268435455;
a|=a>>8&16777215;return(a|a>>16&65535)+1};h.Mz=function(a){void 0===a&&(a=0);return 0<a&&0===(a&a-1)};h.zv=new m(0,0);h.yv=l.Ke(new m(1,0),new m(0,1));h.HA=new k(h.zv,h.yv);W=function(){this.position=m.m(0,0);this.ap=m.m(0,0);this.He=null;this.N=0;this.ap.Set(0,0);this.th=this.Oh=this.gr=0;this.lr=this.er=!0;this.wh=this.mo=!1;this.type=g.td;this.sc=!0;this.js=1};Wb=f;f.prototype.ua=t("yk");f.prototype.Jb=function(){console.log("fixture.GetShape not yet supported in CocoonJS Box2D binding");return null};
f.prototype.mh=t("Bm");Xb=g;g.prototype.mi=function(a){var b=a.He;a.He=null;var c=window.ext.IDTK_SRV_BOX2D.makeCall("createFixture",this.oa.rb,this.Fb,a);a.He=b;a=new f(this,0,c,a);this.oa.Vh[c]=a;this.Ak.push(a);return a};g.prototype.mn=function(){return 0===this.Ak.length?null:this.Ak[0]};g.prototype.qq=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("deleteFixture",this.oa.rb,a.kp);delete this.oa.Vh[a.kp]};g.prototype.Hj=function(a,b){window.ext.IDTK_SRV_BOX2D.makeCall("setBodyTransform",this.oa.rb,
this.Fb,a.x,a.y,b);this.p.j.Set(b);this.p.position.u(a)};g.prototype.Cn=function(a){this.Hj(a,this.Dc())};g.prototype.ih=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getLinearVelocity",this.oa.rb,this.Fb);return m.m(a[0],a[1])};g.prototype.ri=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getWorldCenter",this.oa.rb,this.Fb);return m.m(a[0],a[1])};g.prototype.jh=function(){var a=window.ext.IDTK_SRV_BOX2D.makeCall("getLocalCenter",this.oa.rb,this.Fb);return m.m(a[0],a[1])};g.prototype.qc=
function(a){return h.tn(this.p,a)};g.prototype.qi=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("getMass",this.oa.rb,this.Fb)};g.prototype.rc=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("isAwake",this.oa.rb,this.Fb)};g.prototype.pl=function(){return window.ext.IDTK_SRV_BOX2D.makeCall("getAngularVelocity",this.oa.rb,this.Fb)};g.prototype.hc=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setAwake",this.oa.rb,this.Fb,a)};g.prototype.oh=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setLinearVelocity",
this.oa.rb,this.Fb,a.x,a.y)};g.prototype.ke=function(a,b,c){window.ext.IDTK_SRV_BOX2D.makeCall("applyForce",this.oa.rb,this.Fb,a.x,a.y,b.x,b.y,c)};g.prototype.gl=function(a,b){window.ext.IDTK_SRV_BOX2D.makeCall("applyTorque",this.oa.rb,this.Fb,a,b)};g.prototype.Fj=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("setAngularVelocity",this.oa.rb,this.Fb,a)};g.prototype.lh=t("wk");g.prototype.Dc=function(){return this.p.j.Dc()};g.prototype.xl=function(a){void 0===a&&(a=0);this.Hj(this.p.position,a)};g.prototype.ug=
function(){for(var a=window.ext.IDTK_SRV_BOX2D.makeCall("getObjectContacts",this.oa.rb,this.Fb),b=[],c=0;c<a.length;c++)b.push(this.oa.ym[a[c]]);return b};Xb.td=0;Xb.nr=1;Xb.Lb=2;e.prototype.rn=t("cy");Yb=d;d.prototype.hl=r();Yb.mr=new d;Zb=r();$b=c;c.prototype.Oq=aa("Yf");c.prototype.Nq=function(a){var b=this;window.ext.IDTK_SRV_BOX2D.makeCall("setContactFilter",this.rb,function(c,d){return a.ph(b.Vh[c],b.Vh[d])})};c.prototype.hn=function(a){a=new g(a,this);return this.ym[a.Fb]=a};c.prototype.ml=
function(a){window.ext.IDTK_SRV_BOX2D.makeCall("deleteBody",this.rb,a.Fb);delete this.ym[a.Fb];for(var b=0;b<a.Ak.length;++b)delete this.Vh[a.Ak[b].kp]};c.prototype.ll=function(a){if(a.D.Fb!==a.G.Fb){var c=a.D,d=a.G;a.D=c.Fb;a.G=d.Fb;var e="createDistanceJoint";a.type===b.Di&&(e="createRevoluteJoint");var f=new b(a);f.Vx=window.ext.IDTK_SRV_BOX2D.makeCall(e,this.rb,a);a.D=c;a.G=d;this.Wx.push(f);return f}};c.prototype.nl=function(a){window.ext.IDTK_SRV_BOX2D.makeCall("destroyJoint",this.rb,a.Vx)};
c.prototype.xf=function(a,b,c){c=window.ext.IDTK_SRV_BOX2D.makeCall("step",this.rb,a,b,c);b=c[0];for(a=1;a<=4*b;a+=4){var d=this.ym[c[a+0]];if(null===d)break;d.p.position.Set(c[a+1],c[a+2]);d.p.j.Set(c[a+3])}if(null!==this.Yf)for(c=window.ext.IDTK_SRV_BOX2D.makeCall("getLastContacts",this.rb),b=c[0],a=1;a<=3*b;a+=3){var d=c[a+2],f=this.Vh[c[a+0]],g=this.Vh[c[a+1]];"undefined"===typeof f||"undefined"===typeof g?console.log("One of the fixtures in a contact DOESN'T EXIST!!"):this.Yf.hl(new e(f,g,d))}};
c.prototype.pq=function(){window.ext.IDTK_SRV_BOX2D.makeCall("clearForces",this.rb)};ac=function(a){this.Mm=a;this.type="circle"};X=r();X.prototype.yl=function(a,b){this.type="box";this.width=a;this.height=b};X.prototype.Lq=function(){this.type="edge"};X.prototype.Gj=function(a,b){this.type="polygon";this.eu=[];for(var c=0;c<b;c++)this.eu.push(a[c].x),this.eu.push(a[c].y)};bc=function(){this.He=this.shape=null;this.Xe=0.2;this.qe=this.lf=0;this.Lo=!1;this.filter={Ai:1,$i:65535,Gg:0}};Y=b;b.prototype.vj=
t("D");b.prototype.ln=t("G");b.prototype.Ub=t("type");b.eo=0;b.Di=1;cc=function(a,c,d,e){this.type=b.eo;this.Ua=m.m(0,0);this.Va=m.m(0,0);this.He=null;void 0!==a&&(this.D=a);void 0!==c&&(this.G=c);void 0!==d&&this.Ua.u(d);void 0!==e&&this.Va.u(e);void 0!==d&&void 0!==e&&(a=e.x-d.x,d=e.y-d.y,this.length=Math.sqrt(a*a+d*d));this.Nl=this.Xl=0};a.prototype.xb=function(a,b,c){this.D=a;this.G=b;this.Ua=this.D.qc(c);this.Va=this.G.qc(c);this.kf=this.G.Dc()-this.D.Dc()};dc=a}():console.log("The CocoonJS binding for Box2D has been ignored because ext.IDTK_SRV_BOX2D is not available");
else{var U={},ec=2/180*Math.PI,fc=8/180*Math.PI,gc=0.5*Math.PI,hc=gc*gc,ic=2/180*Math.PI,jc=Number.MIN_VALUE*Number.MIN_VALUE;U.bb=function(a,b){return a.x*b.x+a.y*b.y};U.hh=function(a,b){return a.x*b.y-a.y*b.x};U.vf=function(a,b){return P.m(b*a.y,-b*a.x)};U.jn=function(a,b){return P.m(-a*b.y,a*b.x)};U.mb=function(a,b){return P.m(a.f.x*b.x+a.g.x*b.y,a.f.y*b.x+a.g.y*b.y)};U.wf=function(a,b){return P.m(U.bb(b,a.f),U.bb(b,a.g))};U.Kb=function(a,b){var c=U.mb(a.j,b);c.x+=a.position.x;c.y+=a.position.y;
return c};U.tn=function(a,b){var c=U.Sa(b,a.position),d=c.x*a.j.f.x+c.y*a.j.f.y;c.y=c.x*a.j.g.x+c.y*a.j.g.y;c.x=d;return c};U.rj=function(a,b){return P.m(a.x+b.x,a.y+b.y)};U.Sa=function(a,b){return P.m(a.x-b.x,a.y-b.y)};U.su=function(a,b){return Math.sqrt(U.rq(a,b))};U.rq=function(a,b){var c=a.x-b.x,d=a.y-b.y;return c*c+d*d};U.Du=function(a,b){return P.m(a*b.x,a*b.y)};U.iu=function(a,b){return S.Ke(U.rj(a.f,b.f),U.rj(a.g,b.g))};U.Eu=function(a,b){return S.Ke(U.mb(a,b.f),U.mb(a,b.g))};U.Fu=function(a,
b){var c=P.m(U.bb(a.f,b.f),U.bb(a.g,b.f)),d=P.m(U.bb(a.f,b.g),U.bb(a.g,b.g));return S.Ke(c,d)};U.oj=function(a){return P.m(Math.abs(a.x),Math.abs(a.y))};U.gu=function(a){return S.Ke(U.oj(a.f),U.oj(a.g))};U.Xa=function(a,b,c){return a<b?b:a>c?c:a};U.mu=function(a,b,c){return P.m(U.Xa(a.x,b.x,c.x),U.Xa(a.y,b.y,c.y))};var S=function(){this.f=P.m(0,0);this.g=P.m(0,0);this.wg()};S.pi=function(a){var b=new S;b.Set(a);return b};S.Ke=function(a,b){var c=new S;c.Dn(a,b);return c};y=S.prototype;y.Set=function(a){var b=
Math.cos(a);a=Math.sin(a);this.f.Set(b,a);this.g.Set(-a,b)};y.Dn=function(a,b){this.f.u(a);this.g.u(b)};y.Cb=function(){var a=new S;a.me(this);return a};y.me=function(a){this.f.u(a.f);this.g.u(a.g)};y.fl=function(a){this.f.uf(a.f);this.g.uf(a.g)};y.wg=function(){this.f.Set(1,0);this.g.Set(0,1)};y.U=function(){this.f.Set(0,0);this.g.Set(0,0)};y.Dc=function(){return Math.atan2(this.f.y,this.f.x)};y.nn=function(a){var b=this.f.x*this.g.y-this.g.x*this.f.y;0!==b&&(b=1/b);a.f.x=b*this.g.y;a.g.x=-b*this.g.x;
a.f.y=-b*this.f.y;a.g.y=b*this.f.x;return a};y.xg=function(a,b,c){var d=this.f.x*this.g.y-this.g.x*this.f.y;0!==d&&(d=1/d);a.x=d*(this.g.y*b-this.g.x*c);a.y=d*(this.f.x*c-this.f.y*b);return a};y.tf=function(){this.f.tf();this.g.tf()};var lc=function(a,b,c){this.f=new kc(0,0,0);this.g=new kc(0,0,0);this.ba=new kc(0,0,0);a&&this.f.u(a);b&&this.g.u(b);c&&this.ba.u(c)};y=lc.prototype;y.Cb=function(){return new lc(this.f,this.g,this.ba)};y.me=function(a){this.f.u(a.f);this.g.u(a.g);this.ba.u(a.ba)};y.fl=
function(a){this.f.x+=a.f.x;this.f.y+=a.f.y;this.f.z+=a.f.z;this.g.x+=a.g.x;this.g.y+=a.g.y;this.g.z+=a.g.z;this.ba.x+=a.ba.x;this.ba.y+=a.ba.y;this.ba.z+=a.ba.z};y.wg=function(){this.f.Set(1,0,0);this.g.Set(0,1,0);this.ba.Set(0,0,1)};y.U=function(){this.f.Set(0,0,0);this.g.Set(0,0,0);this.ba.Set(0,0,0)};y.vi=function(a,b,c){var d=this.f.x,e=this.g.x,g=this.f.y,f=this.g.y,h=d*f-e*g;0!=h&&(h=1/h);a.x=h*(f*b-e*c);a.y=h*(d*c-g*b);return a};y.Ij=function(a,b,c,d){var e=this.f.x,g=this.f.y,f=this.f.z,
h=this.g.x,k=this.g.y,l=this.g.z,m=this.ba.x,n=this.ba.y,q=this.ba.z,p=e*(k*q-l*n)+g*(l*m-h*q)+f*(h*n-k*m);0!=p&&(p=1/p);a.x=p*(b*(k*q-l*n)+c*(l*m-h*q)+d*(h*n-k*m));a.y=p*(e*(c*q-d*n)+g*(d*m-b*q)+f*(b*n-c*m));a.z=p*(e*(k*d-l*c)+g*(l*b-h*d)+f*(h*c-k*b));return a};var mc=function(){this.H=P.m(0,0);this.Xb=P.m(0,0);this.n=P.m(0,0)};mc.prototype.Set=function(a){this.H.u(a.H);this.Xb.u(a.Xb);this.n.u(a.n);this.Jd=a.Jd;this.F=a.F;this.Cc=a.Cc};mc.prototype.Cb=function(){var a=new mc;a.H.u(this.H);a.Xb.u(this.Xb);
a.n.u(this.n);a.Jd=this.Jd;a.F=this.F;a.Cc=this.Cc;return a};mc.prototype.bd=function(a,b){void 0===b&&(b=0);a.position.x=(1-b)*this.Xb.x+b*this.n.x;a.position.y=(1-b)*this.Xb.y+b*this.n.y;a.j.Set((1-b)*this.Jd+b*this.F);var c=a.j;a.position.x-=c.f.x*this.H.x+c.g.x*this.H.y;a.position.y-=c.f.y*this.H.x+c.g.y*this.H.y};mc.prototype.tg=function(a){void 0===a&&(a=0);if(this.Cc<a&&1-this.Cc>Number.MIN_VALUE){var b=(a-this.Cc)/(1-this.Cc);this.Xb.x=(1-b)*this.Xb.x+b*this.n.x;this.Xb.y=(1-b)*this.Xb.y+
b*this.n.y;this.Jd=(1-b)*this.Jd+b*this.F;this.Cc=a}};var Vb=function(a,b){this.position=P.m(0,0);this.j=new S;a&&this.position.u(a);b&&this.j.me(b)};Vb.prototype.xb=function(a,b){this.position.u(a);this.j.me(b)};Vb.prototype.wg=function(){this.position.U();this.j.wg()};Vb.prototype.Set=function(a){this.position.u(a.position);this.j.me(a.j)};Vb.prototype.Dc=function(){return Math.atan2(this.j.f.y,this.j.f.x)};var P=function(a,b){this.x=a;this.y=b};P.zf=[];P.m=function(a,b){if(0<P.zf.length){var c=
P.zf.pop();c.Set(a,b);return c}return new P(a,b)};P.wb=function(a){P.zf.push(a)};y=P.prototype;y.U=function(){this.y=this.x=0};y.Set=function(a,b){this.x=a;this.y=b};y.u=function(a){this.x=a.x;this.y=a.y};y.vg=function(){return P.m(-this.x,-this.y)};y.vn=function(){this.x=-this.x;this.y=-this.y};y.Cb=function(){return P.m(this.x,this.y)};y.uf=function(a){this.x+=a.x;this.y+=a.y};y.Fn=function(a){this.x-=a.x;this.y-=a.y};y.Fc=function(a){this.x*=a;this.y*=a};y.vf=function(a){var b=this.x;this.x=a*
this.y;this.y=-a*b};y.jn=function(a){var b=this.x;this.x=-a*this.y;this.y=a*b};y.Cq=function(a){this.x=Math.min(this.x,a.x);this.y=Math.min(this.y,a.y)};y.Aq=function(a){this.x=Math.max(this.x,a.x);this.y=Math.max(this.y,a.y)};y.tf=function(){this.x=Math.abs(this.x);this.y=Math.abs(this.y)};y.Le=function(){return Math.sqrt(this.wl())};y.wl=function(){return this.x*this.x+this.y*this.y};y.Gc=function(){var a=this.Le();if(a<Number.MIN_VALUE)return 0;var b=1/a;this.x*=b;this.y*=b;return a};y.ul=function(){return isFinite(this.x)&&
isFinite(this.y)};var kc=function(a,b,c){this.x=a;this.y=b;this.z=c};y=kc.prototype;y.U=function(){this.z=this.y=this.x=0};y.Set=function(a,b,c){this.x=a;this.y=b;this.z=c};y.u=function(a){this.x=a.x;this.y=a.y;this.z=a.z};y.vg=function(){return new kc(-this.x,-this.y,-this.z)};y.vn=function(){this.x=-this.x;this.y=-this.y;this.z=-this.z};y.Cb=function(){return new kc(this.x,this.y,this.z)};y.uf=function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z};y.Fn=function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z};
y.Fc=function(a){this.x*=a;this.y*=a;this.z*=a};var nc=function(){this.Aa=0.005};y=nc.prototype;y.kh=r();y.Cb=r();y.Set=function(a){this.Aa=a.Aa};y.li=r();y.sj=r();y.kl=r();y.Bn=r();var ac=function(a){this.Aa=0.005;this.Aa=a;this.Xi=a*a;this.Ja=P.m(0,0)};O(ac,nc);y=ac.prototype;y.kh=function(){return ac.le};y.Cb=function(){var a=new ac(this.Aa);a.Set(this);return a};y.Set=function(a){nc.prototype.Set.call(this,a);a instanceof ac&&this.Ja.u(a.Ja)};y.li=function(a,b){var c=b.j,d=b.position.x+(c.f.x*
this.Ja.x+c.g.x*this.Ja.y),c=b.position.y+(c.f.y*this.Ja.x+c.g.y*this.Ja.y);a.ia.Set(d-this.Aa,c-this.Aa);a.ka.Set(d+this.Aa,c+this.Aa)};y.sj=function(a,b){a.hf=b*Math.PI*this.Xi;a.Gf.u(this.Ja);a.si=a.hf*(0.5*this.Xi+(this.Ja.x*this.Ja.x+this.Ja.y*this.Ja.y))};y.kl=function(a,b,c,d){c=U.Kb(c,this.Ja);var e=-(U.bb(a,c)-b);if(e<-this.Aa+Number.MIN_VALUE)return 0;if(e>this.Aa)return d.u(c),Math.PI*this.Xi;b=e*e;e=this.Xi*(Math.asin(e/this.Aa)+Math.PI/2)+e*Math.sqrt(this.Xi-b);b=-2/3*Math.pow(this.Xi-
b,1.5)/e;d.x=c.x+a.x*b;d.y=c.y+a.y*b;return e};y.Bn=function(a){a.C=[this.Ja];a.Y=1;a.Aa=this.Aa};ac.le="b2CircleShape";var oc=function(a,b){this.Aa=0.005;this.Z=a;this.na=b;this.Uh=P.m(this.na.x-this.Z.x,this.na.y-this.Z.y);this.np=this.Uh.Gc();this.da=P.m(this.Uh.y,-this.Uh.x);P.m(-0.04*(this.da.x-this.Uh.x)+this.Z.x,-0.04*(this.da.y-this.Uh.y)+this.Z.y);P.m(-0.04*(this.da.x+this.Uh.x)+this.na.x,-0.04*(this.da.y+this.Uh.y)+this.na.y);P.m(-this.da.x,-this.da.y)};O(oc,nc);oc.prototype.kh=v("b2EdgeShape");
oc.prototype.li=function(a,b){var c=b.j,d=b.position.x+(c.f.x*this.Z.x+c.g.x*this.Z.y),e=b.position.y+(c.f.y*this.Z.x+c.g.y*this.Z.y),g=b.position.x+(c.f.x*this.na.x+c.g.x*this.na.y),c=b.position.y+(c.f.y*this.na.x+c.g.y*this.na.y);d<g?(a.ia.x=d,a.ka.x=g):(a.ia.x=g,a.ka.x=d);e<c?(a.ia.y=e,a.ka.y=c):(a.ia.y=c,a.ka.y=e)};oc.prototype.sj=function(a){a.hf=0;a.Gf.u(this.Z);a.si=0};oc.prototype.kl=function(a,b,c,d){void 0===b&&(b=0);var e=P.m(a.x*b,a.y*b),g=U.Kb(c,this.Z);c=U.Kb(c,this.na);var f=U.bb(a,
g)-b;a=U.bb(a,c)-b;if(0<f){if(0<a)return 0;g.x=-a/(f-a)*g.x+f/(f-a)*c.x;g.y=-a/(f-a)*g.y+f/(f-a)*c.y}else 0<a&&(c.x=-a/(f-a)*g.x+f/(f-a)*c.x,c.y=-a/(f-a)*g.y+f/(f-a)*c.y);d.x=(e.x+g.x+c.x)/3;d.y=(e.y+g.y+c.y)/3;return 0.5*((g.x-e.x)*(c.y-e.y)-(g.y-e.y)*(c.x-e.x))};var pc=function(){this.hf=0;this.Gf=P.m(0,0);this.si=0},X=function(){this.Aa=0.005;this.Lc=P.m(0,0);this.C=[];this.ea=[]};O(X,nc);X.prototype.kh=function(){return X.le};X.prototype.Cb=function(){var a=new X;a.Set(this);return a};X.prototype.Set=
function(a){nc.prototype.Set.call(this,a);if(a instanceof X){this.Lc.u(a.Lc);this.ra=a.ra;this.Ej(this.ra);for(var b=0;b<this.ra;b++)this.C[b].u(a.C[b]),this.ea[b].u(a.ea[b])}};X.prototype.Gj=function(a){this.Mq(a)};X.nz=function(a){var b=new X;b.Gj(a);return b};X.prototype.Mq=function(a){var b=a.length;this.ra=b;this.Ej(b);for(b=b=0;b<this.ra;b++)this.C[b].u(a[b]);for(b=0;b<this.ra;++b)a=U.Sa(this.C[b+1<this.ra?b+1:0],this.C[b]),this.ea[b].u(U.vf(a,1)),this.ea[b].Gc();this.Lc=X.qu(this.C,this.ra)};
X.rz=function(a){var b=new X;b.Mq(a);return b};X.prototype.yl=function(a,b){this.ra=4;this.Ej(4);this.C[0].Set(-a,-b);this.C[1].Set(a,-b);this.C[2].Set(a,b);this.C[3].Set(-a,b);this.ea[0].Set(0,-1);this.ea[1].Set(1,0);this.ea[2].Set(0,1);this.ea[3].Set(-1,0);this.Lc.U()};X.oz=function(a,b){var c=new X;c.yl(a,b);return c};X.prototype.Qu=function(a,b,c,d){this.ra=4;this.Ej(4);this.C[0].Set(-a,-b);this.C[1].Set(a,-b);this.C[2].Set(a,b);this.C[3].Set(-a,b);this.ea[0].Set(0,-1);this.ea[1].Set(1,0);this.ea[2].Set(0,
1);this.ea[3].Set(-1,0);this.Lc=c;a=new S;a.Set(d);c=new Vb(c,a);for(d=0;d<this.ra;++d)this.C[d]=U.Kb(c,this.C[d]),this.ea[d]=U.mb(c.j,this.ea[d])};X.qz=function(a,b,c,d){var e=new X;e.Qu(a,b,c,d);return e};X.prototype.Lq=function(a,b){this.ra=2;this.Ej(2);this.C[0].u(a);this.C[1].u(b);this.Lc.x=0.5*(a.x+b.x);this.Lc.y=0.5*(a.y+b.y);this.ea[0]=U.vf(U.Sa(b,a),1);this.ea[0].Gc();this.ea[1].x=-this.ea[0].x;this.ea[1].y=-this.ea[0].y};X.pz=function(a,b){var c=new X;c.Lq(a,b);return c};y=X.prototype;y.li=
function(a,b){for(var c=b.j,d=this.C[0],e=b.position.x+(c.f.x*d.x+c.g.x*d.y),g=b.position.y+(c.f.y*d.x+c.g.y*d.y),f=e,h=g,k=1;k<this.ra;++k)var d=this.C[k],l=b.position.x+(c.f.x*d.x+c.g.x*d.y),d=b.position.y+(c.f.y*d.x+c.g.y*d.y),e=e<l?e:l,g=g<d?g:d,f=f>l?f:l,h=h>d?h:d;a.ia.x=e-this.Aa;a.ia.y=g-this.Aa;a.ka.x=f+this.Aa;a.ka.y=h+this.Aa};y.sj=function(a,b){if(2==this.ra)a.Gf.x=0.5*(this.C[0].x+this.C[1].x),a.Gf.y=0.5*(this.C[0].y+this.C[1].y),a.hf=0,a.si=0;else{for(var c=0,d=0,e=0,g=0,f=1/3,h=0;h<
this.ra;++h)var k=this.C[h],l=h+1<this.ra?this.C[h+1]:this.C[0],m=k.x-0,n=k.y-0,q=l.x-0,p=l.y-0,s=m*p-n*q,u=0.5*s,e=e+u,c=c+u*f*(0+k.x+l.x),d=d+u*f*(0+k.y+l.y),k=m,g=g+s*(f*(0.25*(k*k+q*k+q*q)+(0*k+0*q))+0+(f*(0.25*(n*n+p*n+p*p)+(0*n+0*p))+0));a.hf=b*e;a.Gf.Set(c*(1/e),d*(1/e));a.si=b*g}};y.kl=function(a,b,c,d){var e=U.wf(c.j,a),g=b-U.bb(a,c.position),f=[],h=0,k=-1;b=-1;var l=!1;for(a=a=0;a<this.ra;++a){f[a]=U.bb(e,this.C[a])-g;var m=f[a]<-Number.MIN_VALUE;0<a&&(m?l||(k=a-1,h++):l&&(b=a-1,h++));l=
m}switch(h){case 0:return l?(a=new pc,this.sj(a,1),d.u(U.Kb(c,a.Gf)),a.hf):0;case 1:-1==k?k=this.ra-1:b=this.ra-1}a=(k+1)%this.ra;e=(b+1)%this.ra;g=(0-f[k])/(f[a]-f[k]);f=(0-f[b])/(f[e]-f[b]);k=P.m(this.C[k].x*(1-g)+this.C[a].x*g,this.C[k].y*(1-g)+this.C[a].y*g);b=P.m(this.C[b].x*(1-f)+this.C[e].x*f,this.C[b].y*(1-f)+this.C[e].y*f);f=0;g=P.m(0,0);for(h=this.C[a];a!=e;)a=(a+1)%this.ra,l=a==e?b:this.C[a],m=0.5*((h.x-k.x)*(l.y-k.y)-(h.y-k.y)*(l.x-k.x)),f+=m,g.x+=m*(k.x+h.x+l.x)/3,g.y+=m*(k.y+h.y+l.y)/
3,h=l;g.Fc(1/f);d.u(U.Kb(c,g));return f};y.Bn=function(a){a.C=this.C;a.Y=this.ra;a.Aa=this.Aa};y.sl=function(a){for(var b=0,c=this.C[0].x*a.x+this.C[0].y*a.y,d=1;d<this.ra;++d){var e=this.C[d].x*a.x+this.C[d].y*a.y;e>c&&(b=d,c=e)}return b};y.yj=function(a){for(var b=0,c=this.C[0].x*a.x+this.C[0].y*a.y,d=1;d<this.ra;++d){var e=this.C[d].x*a.x+this.C[d].y*a.y;e>c&&(b=d,c=e)}return this.C[b]};y.Ej=function(a){this.C=[];this.ea=[];for(var b=this.C.length;b<a;b++)this.C[b]=P.m(0,0),this.ea[b]=P.m(0,0)};
X.qu=function(a,b){for(var c=P.m(0,0),d=0,e=1/3,g=0;g<b;++g){var f=a[g],h=g+1<b?a[g+1]:a[0],k=0.5*((f.x-0)*(h.y-0)-(f.y-0)*(h.x-0)),d=d+k;c.x+=k*e*(0+f.x+h.x);c.y+=k*e*(0+f.y+h.y)}c.x*=1/d;c.y*=1/d;return c};X.SA=new S;X.le="b2PolygonShape";var qc=function(){this.In=this.Hn=this.Jn=this.Hc=0};y=qc.prototype;y.nh=function(a){this.Hc=a;this.Jn=this.Hc&255;this.Hn=(this.Hc&65280)>>8&255;this.In=(this.Hc&16711680)>>16&255;this.Zq=(this.Hc&4278190080)>>24&255};y.Set=function(a){this.nh(a.Hc)};y.Rq=function(a){this.Jn=
a;this.Hc=this.Hc&4294967040|this.Jn&255};y.Pq=function(a){this.Hn=a;this.Hc=this.Hc&4294902015|this.Hn<<8&65280};y.Qq=function(a){this.In=a;this.Hc=this.Hc&4278255615|this.In<<16&16711680};y.Ru=function(a){this.Zq=a;this.Hc=this.Hc&16777215|this.Zq<<24&4278190080};y.Cb=function(){var a=new qc;a.Set(this);return a};var rc=function(){this.Fd=P.m(0,0);this.id=new qc};rc.prototype.Set=function(a){this.Fd.u(a.Fd);this.id.Set(a.id)};var sc=function(){this.ia=P.m(0,0);this.ka=P.m(0,0)},tc=[],uc=function(){if(0<
tc.length){var a=tc.pop();a.U();return a}return new sc};y=sc.prototype;y.U=function(){this.ia.Set(0,0);this.ka.Set(0,0)};y.ul=function(){return 0>this.ka.x-this.ia.x||0>this.ka.y-this.ia.y?!1:this.ia.ul()&&this.ka.ul()};y.xu=function(){return P.m((this.ia.x+this.ka.x)/2,(this.ia.y+this.ka.y)/2)};y.gn=function(a){var b;return b=(b=(b=(b=this.ia.x<=a.ia.x)&&this.ia.y<=a.ia.y)&&a.ka.x<=this.ka.x)&&a.ka.y<=this.ka.y};y.Jj=function(a){return 0<a.ia.x-this.ka.x||0<a.ia.y-this.ka.y||0<this.ia.x-a.ka.x||
0<this.ia.y-a.ka.y?!1:!0};y.jl=function(a,b){this.ia.x=Math.min(a.ia.x,b.ia.x);this.ia.y=Math.min(a.ia.y,b.ia.y);this.ka.x=Math.max(a.ka.x,b.ka.x);this.ka.y=Math.max(a.ka.y,b.ka.y)};var vc=function(a,b,c,d){var e=0,g=b[0].Fd,f=b[1].Fd,h=c.x*g.x+c.y*g.y-d;c=c.x*f.x+c.y*f.y-d;0>=h&&a[e++].Set(b[0]);0>=c&&a[e++].Set(b[1]);0>h*c&&(c=h/(h-c),d=a[e].Fd,d.x=g.x+c*(f.x-g.x),d.y=g.y+c*(f.y-g.y),a[e].id=0<h?b[0].id:b[1].id,e++);return e},wc=function(a,b,c,d,e){for(var g=b.j.f.x*a.ea[c].x+b.j.g.x*a.ea[c].y,
f=b.j.f.y*a.ea[c].x+b.j.g.y*a.ea[c].y,h=e.j.f.x*g+e.j.f.y*f,k=e.j.g.x*g+e.j.g.y*f,l=0,m=Number.MAX_VALUE,n=0;n<d.ra;n++){var q=d.C[n].x*h+d.C[n].y*k;q<m&&(m=q,l=n)}return(e.position.x+(e.j.f.x*d.C[l].x+e.j.g.x*d.C[l].y)-(b.position.x+(b.j.f.x*a.C[c].x+b.j.g.x*a.C[c].y)))*g+(e.position.y+(e.j.f.y*d.C[l].x+e.j.g.y*d.C[l].y)-(b.position.y+(b.j.f.y*a.C[c].x+b.j.g.y*a.C[c].y)))*f},xc=function(a,b,c,d){for(var e=d.position.x+(d.j.f.x*c.Lc.x+d.j.g.x*c.Lc.y),g=d.position.y+(d.j.f.y*c.Lc.x+d.j.g.y*c.Lc.y),
e=e-(b.position.x+(b.j.f.x*a.Lc.x+b.j.g.x*a.Lc.y)),g=g-(b.position.y+(b.j.f.y*a.Lc.x+b.j.g.y*a.Lc.y)),f=e*b.j.f.x+g*b.j.f.y,g=e*b.j.g.x+g*b.j.g.y,e=0,h=-Number.MAX_VALUE,k=0;k<a.ra;++k){var l=a.ea[k].x*f+a.ea[k].y*g;l>h&&(h=l,e=k)}f=wc(a,b,e,c,d);g=e-1;0>g&&(g=a.ra-1);h=wc(a,b,g,c,d);k=e+1;k>=a.ra&&(k=0);var l=wc(a,b,k,c,d),m=0,n=0;if(h>f&&h>l)for(m=g,n=h;;)if(e=m-1,0>e&&(e=a.ra-1),f=wc(a,b,e,c,d),f>n)m=e,n=f;else break;else if(l>f)for(m=k,n=l;;)if(e=m+1,e>=a.ra&&(e=0),f=wc(a,b,e,c,d),f>n)m=e,n=f;
else break;else m=e,n=f;return{tr:m,Pm:n}},zc=function(a,b,c){var d=new yc;d.Nu(b,c.kg,c.an,c.lg,c.bn);for(var e=0;20>e;){for(var g=[],f=0;f<d.Y;f++)g[f]={},g[f].yb=d.C[f].yb,g[f].zb=d.C[f].zb;2==d.Y?d.Su():3==d.Y&&d.Tu();if(3==d.Y)break;f=d.zu();if(f.wl()<jc)break;var h=f.vg();d.C[d.Y].yb=c.kg.sl(U.wf(c.an.j,h));d.C[d.Y].oc=U.Kb(c.an,c.kg.gc(d.C[d.Y].yb));d.C[d.Y].zb=c.lg.sl(U.wf(c.bn.j,f));d.C[d.Y].je=U.Kb(c.bn,c.lg.gc(d.C[d.Y].zb));d.C[d.Y].fc=U.Sa(d.C[d.Y].je,d.C[d.Y].oc);P.wb(f);P.wb(h);e++;
h=!1;for(f=0;f<g.length;f++)if(d.C[d.Y].yb==g[f].yb&&d.C[d.Y].zb==g[f].zb){h=!0;break}if(h)break;d.Y++}d.Au(a.De,a.Ee);a.Jf=U.Sa(a.De,a.Ee).Le();d.$u(b);c.bu&&(b=c.kg.Aa,c=c.lg.Aa,a.Jf>b+c&&a.Jf>Number.MIN_VALUE?(a.Jf-=b+c,d=U.Sa(a.Ee,a.De),d.Gc(),a.De.x+=b*d.x,a.De.y+=b*d.y,a.Ee.x-=c*d.x,a.Ee.y-=c*d.y,P.wb(d)):(c=P.m(0,0),c.x=0.5*(a.De.x+a.Ee.x),c.y=0.5*(a.De.y+a.Ee.y),a.De.x=a.Ee.x=c.x,a.De.y=a.Ee.y=c.y,a.Jf=0,P.wb(c)))},Ac=r(),Bc=function(){this.De=P.m(0,0);this.Ee=P.m(0,0);this.Jf=0},Cc=r();Cc.prototype.Set=
function(a){a.Bn(this)};Cc.prototype.sl=function(a){for(var b=0,c=this.C[0].x*a.x+this.C[0].y*a.y,d=1;d<this.Y;d++){var e=this.C[d].x*a.x+this.C[d].y*a.y;e>c&&(b=d,c=e)}return b};Cc.prototype.yj=function(a){return this.C[this.sl(a)]};Cc.prototype.gc=function(a){void 0===a&&(a=0);return this.C[a]};var Dc=function(){this.gf=null};y=Dc.prototype;y.tj=function(a,b){var c=Ec(b);c.va.ia.x=a.ia.x-0.1;c.va.ia.y=a.ia.y-0.1;c.va.ka.x=a.ka.x+0.1;c.va.ka.y=a.ka.y+0.1;this.xq(c);return c};y.uj=function(a){this.Iq(a);
a.Tc()};y.sn=function(a,b,c){if(a.va.gn(b))return!1;this.Iq(a);var d=0.1+2*Math.abs(c.x);c=0.1+2*Math.abs(c.y);a.va.ia.x=b.ia.x-d;a.va.ia.y=b.ia.y-c;a.va.ka.x=b.ka.x+d;a.va.ka.y=b.ka.y+c;this.xq(a);return!0};y.wj=function(a){return a.va};y.zn=function(a,b){if(null!==this.gf){var c=[];for(c.push(this.gf);0<c.length;){var d=c.pop();if(d.va.Jj(b))if(d.yq()){if(!a(d.Nd))break}else c.push(d.ed),c.push(d.Oe)}}};y.xq=function(a){if(null===this.gf)this.gf=a,this.gf.parent=null;else{var b=this.wu(a),c=b.parent,
d=Ec();d.parent=c;d.va.jl(a.va,b.va);if(c)for(b.parent.ed==b?c.ed=d:c.Oe=d,d.ed=b,d.Oe=a,b.parent=d,a.parent=d;c&&!c.va.gn(d.va);)c.va.jl(c.ed.va,c.Oe.va),d=c,c=c.parent;else d.ed=b,d.Oe=a,b.parent=d,this.gf=a.parent=d}};y.wu=function(a){a=a.va.xu();for(var b=this.gf;!b.yq();)var c=b.ed,b=b.Oe,d=Math.abs((c.va.ia.x+c.va.ka.x)/2-a.x)+Math.abs((c.va.ia.y+c.va.ka.y)/2-a.y),e=Math.abs((b.va.ia.x+b.va.ka.x)/2-a.x)+Math.abs((b.va.ia.y+b.va.ka.y)/2-a.y),b=d<e?c:b;P.wb(a);return b};y.Iq=function(a){if(a==
this.gf)this.gf=null;else{var b=a.parent,c=b.parent;a=b.ed==a?b.Oe:b.ed;if(c)for(c.ed==b?c.ed=a:c.Oe=a,a.parent=c;c;){a=c.va;c.va.jl(c.ed.va,c.Oe.va);if(a.gn(c.va))break;c=c.parent}else this.gf=a,a.parent=null;b.Tc()}};var Fc=function(){this.fg=new Dc;this.Fm=[]};y=Fc.prototype;y.tj=function(a,b){var c=this.fg.tj(a,b);this.oq(c);return c};y.uj=function(a){this.Yu(a);this.fg.uj(a)};y.sn=function(a,b,c){this.fg.sn(a,b,c)&&this.oq(a)};y.Jj=function(a,b){return this.fg.wj(a).Jj(this.fg.wj(b))};y.wj=function(a){return this.fg.wj(a)};
y.Zu=function(a){for(var b=[];0<this.Fm.length;){var c=this.Fm.pop();this.fg.zn(function(a){a!=c.Nd&&b.push(new Gc(c.Nd,a));return!0},this.fg.wj(c))}for(var d=0;d<b.length;){var e=b[d];a(e.Wj,e.Xj);for(d++;d<b.length;){var g=b[d];if(!(g.Wj==e.Wj&&g.Xj==e.Xj||g.Wj==e.Xj&&g.Xj==e.Wj))break;d++}}};y.zn=function(a,b){this.fg.zn(a,b)};y.oq=function(a){this.Fm.push(a)};y.Yu=function(a){ya(this.Fm,a)};var Hc=function(a){this.va=uc();this.Nd=this.parent=this.Oe=this.ed=null;"undefined"!=typeof a&&(this.Nd=
a)},Ic=[],Ec=function(a){if(0<Ic.length){var b=Ic.pop();"undefined"!=typeof a&&(b.Nd=a);b.va.U();return b}return new Hc(a)};Hc.prototype.Tc=function(){this.Nd=this.parent=this.Oe=this.ed=null;Ic.push(this)};Hc.prototype.yq=function(){return null===this.ed};var Gc=function(a,b){this.Wj=a;this.Xj=b},Kc=function(){this.Ba=this.qb=0;this.X=[];for(var a=0;2>a;a++)this.X[a]=new Jc;this.$b=P.m(0,0);this.ca=P.m(0,0)};Kc.prototype.Vb=function(){for(var a=0;2>a;a++)this.X[a].Vb();this.$b.U();this.ca.U();this.qb=
this.Ba=0};Kc.prototype.Set=function(a){this.qb=a.qb;for(var b=0;2>b;b++)this.X[b].Set(a.X[b]);this.$b.u(a.$b);this.ca.u(a.ca);this.Ba=a.Ba};Kc.prototype.Cb=function(){var a=new Kc;a.Set(this);return a};var Jc=function(){this.ca=P.m(0,0);this.Vd=new qc;this.Vb()};Jc.prototype.Vb=function(){this.ca.U();this.ai=this.Xh=0;this.Vd.nh(0)};Jc.prototype.Set=function(a){this.ca.u(a.ca);this.Xh=a.Xh;this.ai=a.ai;this.Vd.Set(a.Vd)};var Lc=function(){this.ca=P.m(0,0);this.J=P.m(0,0)};Lc.prototype.xb=function(a,
b,c,d,e){this.Qg=b;this.Rg=d;var g,f,h,k=h=f=0,l=0;d=b=0;var m,n,k=0;1==a.count?(this.Ba=Mc,g=this.Qg.gc(a.yb[0]),a=this.Rg.gc(a.zb[0]),n=g,m=c.j,f=c.position.x+(m.f.x*n.x+m.g.x*n.y),h=c.position.y+(m.f.y*n.x+m.g.y*n.y),n=a,m=e.j,k=e.position.x+(m.f.x*n.x+m.g.x*n.y),l=e.position.y+(m.f.y*n.x+m.g.y*n.y),this.J.x=k-f,this.J.y=l-h,this.J.Gc()):(a.zb[0]==a.zb[1]?(this.Ba=Nc,b=this.Qg.gc(a.yb[0]),d=this.Qg.gc(a.yb[1]),a=this.Rg.gc(a.zb[0]),this.ca.x=0.5*(b.x+d.x),this.ca.y=0.5*(b.y+d.y),this.J=U.vf(U.Sa(d,
b),1),this.J.Gc(),n=this.J,m=c.j,b=m.f.x*n.x+m.g.x*n.y,d=m.f.y*n.x+m.g.y*n.y,n=this.ca,m=c.j,f=c.position.x+(m.f.x*n.x+m.g.x*n.y),h=c.position.y+(m.f.y*n.x+m.g.y*n.y),n=a,m=e.j,k=e.position.x+(m.f.x*n.x+m.g.x*n.y),l=e.position.y+(m.f.y*n.x+m.g.y*n.y),k=(k-f)*b+(l-h)*d):a.yb[0]==a.yb[0]?(this.Ba=Oc,f=this.Rg.gc(a.zb[0]),h=this.Rg.gc(a.zb[1]),g=this.Qg.gc(a.yb[0]),this.ca.x=0.5*(f.x+h.x),this.ca.y=0.5*(f.y+h.y),this.J=U.vf(U.Sa(h,f),1),this.J.Gc(),n=this.J,m=e.j,b=m.f.x*n.x+m.g.x*n.y,d=m.f.y*n.x+m.g.y*
n.y,n=this.ca,m=e.j,k=e.position.x+(m.f.x*n.x+m.g.x*n.y),l=e.position.y+(m.f.y*n.x+m.g.y*n.y),n=g,m=c.j,f=c.position.x+(m.f.x*n.x+m.g.x*n.y),h=c.position.y+(m.f.y*n.x+m.g.y*n.y),k=(f-k)*b+(h-l)*d):(b=this.Qg.gc(a.yb[0]),d=this.Qg.gc(a.yb[1]),f=this.Rg.gc(a.zb[0]),h=this.Rg.gc(a.zb[1]),k=U.mb(c.j,U.Sa(d,b)),l=U.mb(e.j,U.Sa(h,f)),e=k.x*k.x+k.y*k.y,c=l.x*l.x+l.y*l.y,g=U.Sa(l,k),a=k.x*g.x+k.y*g.y,g=l.x*g.x+l.y*g.y,l=k.x*l.x+k.y*l.y,m=e*c-l*l,k=0,0!=m&&(k=U.Xa((l*g-a*c)/m,0,1)),0>(l*k+g)/c&&(k=U.Xa((l-
a)/e,0,1)),g=P.m(0,0),g.x=b.x+k*(d.x-b.x),g.y=b.y+k*(d.y-b.y),a=P.m(0,0),a.x=f.x+k*(h.x-f.x),a.y=f.y+k*(h.y-f.y),0==k||1==k?(this.Ba=Oc,this.J=U.vf(U.Sa(h,f),1),this.J.Gc(),this.ca=a):(this.Ba=Nc,this.J=U.vf(U.Sa(d,b),1),this.ca=g)),0>k&&this.J.vn())};Lc.prototype.Je=function(a,b){var c,d,e=0;switch(this.Ba){case Mc:c=U.wf(a.j,this.J);d=U.wf(b.j,this.J.vg());c=this.Qg.yj(c);d=this.Rg.yj(d);c=U.Kb(a,c);d=U.Kb(b,d);e=(d.x-c.x)*this.J.x+(d.y-c.y)*this.J.y;break;case Nc:e=U.mb(a.j,this.J);c=U.Kb(a,this.ca);
d=U.wf(b.j,e.vg());d=this.Rg.yj(d);d=U.Kb(b,d);e=(d.x-c.x)*e.x+(d.y-c.y)*e.y;break;case Oc:e=U.mb(b.j,this.J),d=U.Kb(b,this.ca),c=U.wf(a.j,e.vg()),c=this.Qg.yj(c),c=U.Kb(a,c),e=(c.x-d.x)*e.x+(c.y-d.y)*e.y}return e};var Mc=1,Nc=2,Oc=4,yc=function(){this.Z=new Pc;this.na=new Pc;this.md=new Pc;this.C=[this.Z,this.na,this.md]};y=yc.prototype;y.Nu=function(a,b,c,d,e){var g,f;this.Y=a.count;for(var h=this.C,k=0;k<this.Y;k++){var l=h[k];l.yb=a.yb[k];l.zb=a.zb[k];g=b.gc(l.yb);f=d.gc(l.zb);l.oc=U.Kb(c,g);
l.je=U.Kb(e,f);l.fc=U.Sa(l.je,l.oc);l.F=0}1<this.Y&&(a=a.iy,g=this.wq(),g<0.5*a||2*a<g||g<Number.MIN_VALUE)&&(this.Y=0);0==this.Y&&(l=h[0],l.yb=0,l.zb=0,g=b.gc(0),f=d.gc(0),l.oc=U.Kb(c,g),l.je=U.Kb(e,f),l.fc=U.Sa(l.je,l.oc),this.Y=1)};y.$u=function(a){a.iy=this.wq();a.count=this.Y;for(var b=this.C,c=0;c<this.Y;c++)a.yb[c]=b[c].yb,a.zb[c]=b[c].zb};y.zu=function(){if(1==this.Y)return this.Z.fc.vg();if(2==this.Y){var a=U.Sa(this.na.fc,this.Z.fc);return 0<U.hh(a,this.Z.fc.vg())?U.jn(1,a):U.vf(a,1)}return P.m(0,
0)};y.Au=function(a,b){1==this.Y?(a.u(this.Z.oc),b.u(this.Z.je)):2==this.Y?(a.x=this.Z.F*this.Z.oc.x+this.na.F*this.na.oc.x,a.y=this.Z.F*this.Z.oc.y+this.na.F*this.na.oc.y,b.x=this.Z.F*this.Z.je.x+this.na.F*this.na.je.x,b.y=this.Z.F*this.Z.je.y+this.na.F*this.na.je.y):3==this.Y&&(b.x=a.x=this.Z.F*this.Z.oc.x+this.na.F*this.na.oc.x+this.md.F*this.md.oc.x,b.y=a.y=this.Z.F*this.Z.oc.y+this.na.F*this.na.oc.y+this.md.F*this.md.oc.y)};y.wq=function(){return 1==this.Y?0:2==this.Y?U.Sa(this.Z.fc,this.na.fc).Le():
3==this.Y?U.hh(U.Sa(this.na.fc,this.Z.fc),U.Sa(this.md.fc,this.Z.fc)):0};y.Su=function(){var a=this.Z.fc,b=this.na.fc,c=U.Sa(b,a),a=-(a.x*c.x+a.y*c.y);0>=a?this.Y=this.Z.F=1:(b=b.x*c.x+b.y*c.y,0>=b?(this.Y=this.na.F=1,this.Z.Set(this.na)):(c=1/(b+a),this.Z.F=b*c,this.na.F=a*c,this.Y=2))};y.Tu=function(){var a=this.Z.fc,b=this.na.fc,c=this.md.fc,d=U.Sa(b,a),e=U.bb(b,d),g=-U.bb(a,d),f=U.Sa(c,a),h=U.bb(c,f),k=-U.bb(a,f),l=U.Sa(c,b),m=U.bb(c,l),l=-U.bb(b,l),f=U.hh(d,f),d=f*U.hh(b,c),c=f*U.hh(c,a),a=f*
U.hh(a,b);0>=g&&0>=k?this.Y=this.Z.F=1:0<e&&0<g&&0>=a?(h=1/(e+g),this.Z.F=e*h,this.na.F=g*h,this.Y=2):0<h&&0<k&&0>=c?(e=1/(h+k),this.Z.F=h*e,this.md.F=k*e,this.Y=2,this.na.Set(this.md)):0>=e&&0>=l?(this.Y=this.na.F=1,this.Z.Set(this.na)):0>=h&&0>=m?(this.Y=this.md.F=1,this.Z.Set(this.md)):0<m&&0<l&&0>=d?(e=1/(m+l),this.na.F=m*e,this.md.F=l*e,this.Y=2,this.Z.Set(this.md)):(e=1/(d+c+a),this.Z.F=d*e,this.na.F=c*e,this.md.F=a*e,this.Y=3)};var Qc=function(){this.yb=[0,0,0];this.zb=[0,0,0]},Pc=r();Pc.prototype.Set=
function(a){this.oc.u(a.oc);this.je.u(a.je);this.fc.u(a.fc);this.F=a.F;this.yb=a.yb;this.zb=a.zb};var Rc=function(){this.kg=new Cc;this.lg=new Cc;this.Nt=new mc;this.Ot=new mc},Sc=function(){this.da=P.m(0,0);this.X=[];for(var a=this.qb=0;2>a;a++)this.X[a]=P.m(0,0)};Sc.prototype.xb=function(a,b,c,d,e){if(0!=a.qb){var g=0,f,h,k=0,l=0,m=0,n=0,q=0;f=0;switch(a.Ba){case 1:h=b.j;f=a.ca;g=b.position.x+h.f.x*f.x+h.g.x*f.y;b=b.position.y+h.f.y*f.x+h.g.y*f.y;h=d.j;f=a.X[0].ca;a=d.position.x+h.f.x*f.x+h.g.x*
f.y;d=d.position.y+h.f.y*f.x+h.g.y*f.y;f=a-g;h=d-b;k=f*f+h*h;k>jc?(k=Math.sqrt(k),this.da.x=f/k,this.da.y=h/k):(this.da.x=1,this.da.y=0);f=b+c*this.da.y;d-=e*this.da.y;this.X[0].x=0.5*(g+c*this.da.x+(a-e*this.da.x));this.X[0].y=0.5*(f+d);break;case 2:h=b.j;f=a.$b;k=h.f.x*f.x+h.g.x*f.y;l=h.f.y*f.x+h.g.y*f.y;h=b.j;f=a.ca;m=b.position.x+h.f.x*f.x+h.g.x*f.y;n=b.position.y+h.f.y*f.x+h.g.y*f.y;this.da.x=k;this.da.y=l;for(g=0;g<a.qb;g++)h=d.j,f=a.X[g].ca,q=d.position.x+h.f.x*f.x+h.g.x*f.y,f=d.position.y+
h.f.y*f.x+h.g.y*f.y,this.X[g].x=q+0.5*(c-(q-m)*k-(f-n)*l-e)*k,this.X[g].y=f+0.5*(c-(q-m)*k-(f-n)*l-e)*l;break;case 4:for(h=d.j,f=a.$b,k=h.f.x*f.x+h.g.x*f.y,l=h.f.y*f.x+h.g.y*f.y,h=d.j,f=a.ca,m=d.position.x+h.f.x*f.x+h.g.x*f.y,n=d.position.y+h.f.y*f.x+h.g.y*f.y,this.da.x=-k,this.da.y=-l,g=0;g<a.qb;g++)h=b.j,f=a.X[g].ca,q=b.position.x+h.f.x*f.x+h.g.x*f.y,f=b.position.y+h.f.y*f.x+h.g.y*f.y,this.X[g].x=q+0.5*(e-(q-m)*k-(f-n)*l-c)*k,this.X[g].y=f+0.5*(e-(q-m)*k-(f-n)*l-c)*l}}};var Xb=function(a,b){this.Ec=
"Body"+Xb.un++;this.p=new Vb;this.p.position.u(a.position);this.p.j.Set(a.N);this.i=new mc;this.i.H.U();this.i.Cc=1;this.i.Jd=this.i.F=a.N;this.i.n.x=this.p.j.f.x*this.i.H.x+this.p.j.g.x*this.i.H.y;this.i.n.y=this.p.j.f.y*this.i.H.x+this.p.j.g.y*this.i.H.y;this.i.n.x+=this.p.position.x;this.i.n.y+=this.p.position.y;this.i.Xb.u(this.i.n);this.k=a.ap.Cb();this.$f=P.m(0,0);this.Si=a.wh;this.Qx=a.mo;this.hp=a.er;this.ip=a.lr;this.wk=a.sc;this.oa=b;this.$a=null;this.Xc=new Tc;this.yh=new Uc;this.r=a.gr;
this.Xx=a.Oh;this.Lx=a.th;this.Hk=this.bi=0;this.Ba=a.type;this.K=this.Ba==W.Lb?1:0;this.B=this.Ba==W.Lb?1:0;this.I=this.Td=0;this.Ux=a.js;this.Gi=new Vc;this.Dm=[]};y=Xb.prototype;y.mi=function(a){a=new Wb(this,this.p,a);this.wk&&a.tj(this.oa.Mc.Ri,this.p);this.Gi.hu(a);a.yk=this;0<a.zm&&this.Kq();this.oa.sp=!0;return a};y.Tc=function(){P.wb(this.k);P.wb(this.$f)};y.qq=function(a){this.Gi.Ou(a);for(var b=this.Xc.pa(Wc);b;b=b.next)a!=b.Mb.fb&&a!=b.Mb.Za||this.oa.Mc.Tc(b.Mb);this.wk&&a.uj(this.oa.Mc.Ri);
a.Tc();a.yk=null;this.Kq()};y.Hj=function(a,b){this.p.j.Set(b);this.p.position.u(a);var c=this.p.j,d=this.i.H;this.i.n.x=c.f.x*d.x+c.g.x*d.y;this.i.n.y=c.f.y*d.x+c.g.y*d.y;this.i.n.x+=this.p.position.x;this.i.n.y+=this.p.position.y;this.i.Xb.u(this.i.n);this.i.Jd=this.i.F=b;c=this.oa.Mc.Ri;for(d=this.Gi.pa();d;d=d.next)d.Nd.Sq(c,this.p,this.p);this.oa.Mc.ol()};y.bd=t("p");y.Cn=function(a){this.Hj(a,this.Dc())};y.Dc=function(){return this.i.F};y.xl=function(a){this.Hj(this.p.position,a)};y.ri=function(){return this.i.n};
y.jh=function(){return this.i.H};y.oh=function(a){this.Ba!=W.td&&this.k.u(a)};y.ih=t("k");y.Fj=function(a){void 0===a&&(a=0);this.Ba!=W.td&&(this.r=a)};y.pl=t("r");y.ke=function(a,b){this.Ba==W.Lb&&(this.hc(!0),this.$f.x+=a.x,this.$f.y+=a.y,this.bi+=(b.x-this.i.n.x)*a.y-(b.y-this.i.n.y)*a.x)};y.gl=function(a){void 0===a&&(a=0);this.Ba==W.Lb&&(this.hc(!0),this.bi+=a)};y.qi=t("K");y.vq=function(a){a||(a=new pc);a.hf=this.K;a.si=this.Td;a.Gf.u(this.i.H);return a};y.Kq=function(){this.I=this.Td=this.B=
this.K=0;this.i.H.U();if(this.Ba!=W.td&&this.Ba!=W.nr){for(var a=P.m(0,0),b=this.Gi.pa();b;b=b.next){var c=b.Nd;0!=c.zm&&(c=c.vq(),this.K+=c.hf,a.x+=c.Gf.x*c.hf,a.y+=c.Gf.y*c.hf,this.Td+=c.si)}0<this.K?(this.B=1/this.K,a.x*=this.B,a.y*=this.B):this.B=this.K=1;0<this.Td&&!this.Qx?(this.Td-=this.K*(a.x*a.x+a.y*a.y),this.Td*=this.Ux,this.I=1/this.Td):this.I=this.Td=0;b=this.i.n.Cb();this.i.H.u(a);this.i.Xb.u(U.Kb(this.p,this.i.H));this.i.n.u(this.i.Xb);this.k.x+=this.r*-(this.i.n.y-b.y);this.k.y+=this.r*
+(this.i.n.x-b.x);P.wb(a);P.wb(b)}};y.tl=function(a){var b=this.p.j;a=P.m(b.f.x*a.x+b.g.x*a.y,b.f.y*a.x+b.g.y*a.y);a.x+=this.p.position.x;a.y+=this.p.position.y;return a};y.pn=function(a){return U.mb(this.p.j,a)};y.qc=function(a){return U.tn(this.p,a)};y.on=function(a){return U.wf(this.p.j,a)};y.yu=function(a){return P.m(this.k.x-this.r*(a.y-this.i.n.y),this.k.y+this.r*(a.x-this.i.n.x))};y.Ub=t("Ba");y.hc=function(a){if(this.ip!=a)for(this.ip=a,this.Hk=0,a||(this.k.U(),this.r=0,this.$f.U(),this.bi=
0),a=0;a<this.Dm.length;a++)this.Dm[a].Vq(this)};y.rc=t("ip");y.lh=t("wk");y.mn=t("Gi");y.pj=function(a){this.yh.pj(a)};y.Dj=function(a){this.yh.Dj(a)};y.ug=t("Xc");y.Tq=function(){var a=Xb.Ly;a.j.Set(this.i.Jd);var b=a.j,c=this.i.H;a.position.x=this.i.Xb.x-(b.f.x*c.x+b.g.x*c.y);a.position.y=this.i.Xb.y-(b.f.y*c.x+b.g.y*c.y);b=this.oa.Mc.Ri;for(c=this.Gi.pa();c;c=c.next)c.Nd.Sq(b,a,this.p)};y.cb=function(){this.p.j.Set(this.i.F);var a=this.p.j,b=this.i.H;this.p.position.x=this.i.n.x-(a.f.x*b.x+a.g.x*
b.y);this.p.position.y=this.i.n.y-(a.f.y*b.x+a.g.y*b.y)};y.ph=function(a){if(this.Ba!=W.Lb&&a.Ba!=W.Lb)return!1;for(var b=this.$a;b;b=b.next)if(b.Ed==a&&!1==b.Vf.Is)return!1;return!0};y.tg=function(a){this.i.tg(a);this.i.n.u(this.i.Xb);this.i.F=this.i.Jd;this.cb()};Xb.un=0;var W=function(){this.position=P.m(0,0);this.ap=P.m(0,0);this.th=this.Oh=this.gr=this.N=0;this.lr=this.er=!0;this.wh=this.mo=!1;this.type=W.td;this.sc=!0;this.js=1};W.td=0;W.nr=1;W.Lb=2;var Yc=function(){this.Dl=[];for(var a=0;a<=
Xc;a++)this.Dl[a]=null;this.El=[];for(a=0;a<=Xc;a++)this.El[a]=null;this.yi={}};y=Yc.prototype;y.pa=function(a){return this.Dl[a]};y.ji=function(a){var b=a.Ec;null==this.yi[b]&&(this.Ie(a,b,Xc),this.Vq(a),a.Dm.push(this))};y.Vq=function(a){var b=a.Ub(),c=a.Ec,d=a.rc(),e=a.lh();b==W.Lb?this.Ie(a,c,Zc):this.Me(c,Zc);b!=W.td?this.Ie(a,c,$c):this.Me(c,$c);b!=W.td&&e&&d?this.Ie(a,c,ad):this.Me(c,ad);d?this.Ie(a,c,bd):this.Me(c,bd);e?this.Ie(a,c,cd):this.Me(c,cd)};y.Cj=function(a){var b=a.Ec;if(null!=this.yi[b]){ya(a.Dm,
this);for(a=0;a<=Xc;a++)this.Me(b,a);delete this.yi[b]}};y.Me=function(a,b){var c=this.yi[a];if(null!=c){var d=c[b];null!=d&&(c[b]=null,c=d.Zd,d=d.next,null==c?this.Dl[b]=d:c.ne(d),null==d?this.El[b]=c:d.oe(c))}};y.Ie=function(a,b,c){var d=this.yi[b];if(null==d){for(var d=[],e=0;e<=Xc;e++)d[e]=null;this.yi[b]=d}null==d[c]&&(d[c]=new dd(a),a=this.El[c],null!=a?a.ne(d[c]):this.Dl[c]=d[c],d[c].oe(a),this.El[c]=d[c])};var Zc=0,$c=1,cd=2,ad=3,bd=4,Xc=5,dd=function(a){this.body=a;this.Zd=this.next=null};
dd.prototype.ne=aa("next");dd.prototype.oe=aa("Zd");dd.prototype.ua=t("body");var Zb=r();Zb.prototype.ph=function(a,b){var c=a.uq(),d=b.uq();return c.Gg==d.Gg&&0!=c.Gg?0<c.Gg:0!=(c.$i&d.Ai)&&0!=(c.Ai&d.$i)};Zb.Av=new Zb;var ed=function(){this.ly=[];this.Vy=[]},Yb=r();Yb.prototype.hl=r();var gd=function(a){this.oa=a;this.jp=Zb.Av;this.Yf=Yb.mr;this.Js=new fd;this.Ri=new Fc};gd.prototype.ju=function(a,b){var c=a.ua(),d=b.ua();if(c!=d&&d.ph(c)&&this.jp.ph(a,b)){for(c=d.Xc.pa(Wc);c;c=c.next)if(d=c.Mb.fb,
d==a){if(d=c.Mb.Za,d==b)return}else if(d==b&&(d=c.Mb.Za,d==a))return;this.Js.Gd(a,b)}};gd.prototype.ol=function(){var a=this;this.Ri.Zu(function(b,c){a.ju(b,c)})};gd.prototype.Tc=function(a){0<a.Cd.qb&&(a.fb.ua().hc(!0),a.Za.ua().hc(!0));a.Pu();this.Js.Tc(a)};gd.prototype.ou=function(){for(var a=this.oa.Xc.pa(Wc);a;a=a.next){var b=a.Mb,c=b.fb,d=b.Za,e=c.ua(),g=d.ua();if(!1!=e.rc()||!1!=g.rc()){if(b.Tl){if(!1==g.ph(e)){this.Tc(b);continue}if(!1==this.jp.ph(c,d)){this.Tc(b);continue}b.nu()}!1==this.Ri.Jj(c.Yh,
d.Yh)?this.Tc(b):b.Uq(this.Yf)}}};var hd=function(){this.Ai=1;this.$i=65535;this.Gg=0};hd.prototype.Cb=function(){var a=new hd;a.Ai=this.Ai;a.$i=this.$i;a.Gg=this.Gg;return a};var Wb=function(a,b,c){this.Ec="Fixture"+Wb.un++;this.Px=c.filter.Cb();this.Th=uc();this.yk=a;this.eg=c.shape.Cb();this.zm=c.qe;this.mp=c.Xe;this.Gk=c.lf;this.Bm=c.Lo};y=Wb.prototype;y.Jb=t("eg");y.mh=t("Bm");y.uq=function(){return this.Px.Cb()};y.ua=t("yk");y.vq=function(a){a||(a=new pc);this.eg.sj(a,this.zm);return a};y.Tc=
function(){tc.push(this.Th)};y.tj=function(a,b){this.eg.li(this.Th,b);this.Yh=a.tj(this.Th,this)};y.uj=function(a){null!=this.Yh&&(a.uj(this.Yh),this.Yh=null)};y.Sq=function(a,b,c){if(this.Yh){var d=uc(),e=uc();this.eg.li(d,b);this.eg.li(e,c);this.Th.jl(d,e);tc.push(d);tc.push(e);b=U.Sa(c.position,b.position);a.sn(this.Yh,this.Th,b);P.wb(b)}};Wb.un=0;var bc=function(){this.filter=new hd;this.filter.Ai=1;this.filter.$i=65535;this.filter.Gg=0;this.shape=null;this.Xe=0.2;this.qe=this.lf=0;this.Lo=!1},
Vc=function(){this.oo=this.no=null;this.Vl={}};Vc.prototype.pa=t("no");Vc.prototype.hu=function(a){var b=a.Ec;if(null==this.Vl[b]){a=new id(a);var c=this.oo;null!=c?c.ne(a):this.no=a;a.oe(c);this.oo=a;this.Vl[b]=a}};Vc.prototype.Ou=function(a){a=a.Ec;var b=this.Vl[a];if(null!=b){var c=b.Zd,b=b.next;null==c?this.no=b:c.ne(b);null==b?this.oo=c:b.oe(c);delete this.Vl[a]}};var id=function(a){this.Nd=a;this.Zd=this.next=null};id.prototype.ne=aa("next");id.prototype.oe=aa("Zd");var jd=function(a,b){this.Yx=
a;this.ze=b;this.af=[];this.Am=[];this.Pg=[];this.Zf=[];this.xc=[]};y=jd.prototype;y.il=function(){this.af=[];this.Am=[];this.Pg=[];this.Zf=[];this.xc=[]};y.xg=function(a,b,c){this.hv(a,b);this.ze.xb(a,this.Zf,this.Zf.length);this.nv(a);this.jv(a);this.kv(a);this.Jq(this.ze.bf);c&&this.iv(a)};y.hv=function(a,b){for(var c=0;c<this.Am.length;c++){var d=this.Am[c];d.k.x+=a.la*(b.x+d.B*d.$f.x);d.k.y+=a.la*(b.y+d.B*d.$f.y);d.r+=a.la*d.I*d.bi;d.k.Fc(U.Xa(1-a.la*d.Xx,0,1));d.r*=U.Xa(1-a.la*d.Lx,0,1)}};y.nv=
function(a){this.ze.Hd(a);for(var b=0;b<this.xc.length;b++)this.xc[b].Hd(a);for(b=0;b<a.dl;b++){for(var c=0;c<this.xc.length;c++)this.xc[c].sd(a);this.ze.sd()}for(a=0;a<this.xc.length;a++)this.xc[a].kn();this.ze.kn()};y.jv=function(a){for(var b=0;b<this.Pg.length;++b){var c=this.Pg[b],d=a.la*c.k.x,e=a.la*c.k.y;4<d*d+e*e&&(c.k.Gc(),c.k.x=2*c.k.x*a.Pf,c.k.y=2*c.k.y*a.Pf);d=a.la*c.r;d*d>hc&&(c.r=0>c.r?-gc*a.Pf:gc*a.Pf);c.i.Xb.u(c.i.n);c.i.Jd=c.i.F;c.i.n.x+=a.la*c.k.x;c.i.n.y+=a.la*c.k.y;c.i.F+=a.la*
c.r;c.cb()}};y.kv=function(a){for(var b=0;b<a.Qk;b++){for(var c=this.ze.rd(0.2),d=!0,e=0;e<this.xc.length;e++)var g=this.xc[e].rd(0.2),d=d&&g;if(c&&d)break}};y.iv=function(a){for(var b=Number.MAX_VALUE,c=0;c<this.Pg.length;c++){var d=this.Pg[c];!d.hp||Math.abs(d.r)>ic||1E-4<U.bb(d.k,d.k)?b=d.Hk=0:(d.Hk+=a.la,b=Math.min(b,d.Hk))}if(0.5<=b)for(a=0;a<this.af.length;a++)this.af[a].hc(!1)};y.En=function(a){var b=0,c=0;this.ze.xb(a,this.Zf,this.Zf.length);for(var d=this.ze,b=0;b<this.xc.length;++b)this.xc[b].Hd(a);
for(b=0;b<a.dl;++b)for(d.sd(),c=0;c<this.xc.length;++c)this.xc[c].sd(a);for(b=0;b<this.Pg.length;++b){var c=this.Pg[b],e=a.la*c.k.x,g=a.la*c.k.y;4<e*e+g*g&&(c.k.Gc(),c.k.x=2*c.k.x*a.Pf,c.k.y=2*c.k.y*a.Pf);e=a.la*c.r;e*e>hc&&(c.r=0>c.r?-gc*a.Pf:gc*a.Pf);c.i.Xb.u(c.i.n);c.i.Jd=c.i.F;c.i.n.x+=a.la*c.k.x;c.i.n.y+=a.la*c.k.y;c.i.F+=a.la*c.r;c.cb()}for(b=0;b<a.Qk;++b){e=d.rd(0.75);g=!0;for(c=0;c<this.xc.length;++c)var f=this.xc[c].rd(0.2),g=g&&f;if(e&&g)break}this.Jq(d.bf)};y.Jq=function(a){if(null!=this.Yx)for(var b=
0;b<this.Zf.length;++b)for(var c=a[b],d=new ed,e=0;e<c.Yd;++e)d.ly[e]=c.tb[e].sb,d.Vy[e]=c.tb[e].rf};y.ji=function(a){this.af.push(a);a.Ub()!=W.td&&(this.Pg.push(a),a.Ub()==W.Lb&&this.Am.push(a))};y.ki=function(a){this.Zf.push(a)};y.mq=function(a){this.xc.push(a)};var kd=function(a,b,c,d,e){this.la=a;var g=0;0<a&&(g=1/a);this.Pf=g;this.Eb=b;this.Qk=c;this.dl=d;this.rg=e},$b=function(a,b){this.Mc=new gd(this);this.ze=new ld;this.sp=!1;this.Wb=new Yc;this.Xc=new Tc;this.$a=null;this.yh=new Uc;this.Cm=
0;this.Nx=this.dy=!0;this.hp=b;this.Ks=a;this.Ls=0;this.Tx=this.hn(new W)};$b.Cu=1-100*Number.MIN_VALUE;y=$b.prototype;y.Nq=function(a){this.Mc.jp=a};y.Oq=function(a){this.Mc.Yf=a};y.hn=function(a){a=new Xb(a,this);this.Wb.ji(a);return a};y.ml=function(a){for(var b=a.$a;b;){var c=b,b=b.next;this.nl(c.Vf)}for(b=a.yh.pa();b;b=b.next)b.Hr.Cj(a);for(b=a.Xc.pa(Wc);b;b=b.next)this.Mc.Tc(b.Mb);for(b=a.mn().pa();b;b=b.next)a.qq(b.Nd);a.Tc();this.Wb.Cj(a)};y.ll=function(a){var b=Y.Gd(a);b.Ui=null;if(b.Og=
this.$a)this.$a.Ui=b;this.$a=b;this.Cm++;b.Nc.Vf=b;b.Nc.Ed=b.M;b.Nc.prev=null;if(b.Nc.next=b.L.$a)b.L.$a.prev=b.Nc;b.L.$a=b.Nc;b.Oc.Vf=b;b.Oc.Ed=b.L;b.Oc.prev=null;if(b.Oc.next=b.M.$a)b.M.$a.prev=b.Oc;b.M.$a=b.Oc;var c=a.D,d=a.G;if(!a.Tn)for(a=d.Xc.pa(Wc);a;a=a.next)a.Mb.rl(d)==c&&a.Mb.sq();return b};y.nl=function(a){var b=a.Is;a.Ui&&(a.Ui.Og=a.Og);a.Og&&(a.Og.Ui=a.Ui);a==this.$a&&(this.$a=a.Og);var c=a.L,d=a.M;c.hc(!0);d.hc(!0);a.Nc.prev&&(a.Nc.prev.next=a.Nc.next);a.Nc.next&&(a.Nc.next.prev=a.Nc.prev);
a.Nc==c.$a&&(c.$a=a.Nc.next);a.Nc.prev=null;a.Nc.next=null;a.Oc.prev&&(a.Oc.prev.next=a.Oc.next);a.Oc.next&&(a.Oc.next.prev=a.Oc.prev);a.Oc==d.$a&&(d.$a=a.Oc.next);a.Oc.prev=null;a.Oc.next=null;this.Cm--;if(!b)for(a=d.Xc.pa(Wc);a;a=a.next)a.Mb.rl(d)==c&&a.Mb.sq()};y.pj=function(a){if(null!==a.oa&&a.oa!=this)throw Error("Controller can only be a member of one world");this.yh.pj(a);a.oa=this;return a};y.Dj=function(a){this.yh.Dj(a);a.oa=null;a.il()};y.xf=function(a,b,c){this.sp&&(this.Mc.ol(),this.sp=
!1);a=new kd(a,this.Ls*a,b,c,this.dy);this.Mc.ou();0<a.la&&(this.xg(a),this.Nx&&this.En(a),this.Ls=a.Pf)};y.pq=function(){for(var a=this.Wb.pa(Zc);a;a=a.next)a.body.$f.U(),a.body.bi=0};y.ug=t("Xc");var md=[];$b.prototype.xg=function(a){for(var b=this.yh.pa();b;b=b.next)b.Hr.xf(a);for(var b=new jd(this.Mc.Yf,this.ze),c=this.Wb.pa(Xc);c;c=c.next)c.body.Wa=!1;for(var d=this.Xc.pa(Wc);d;d=d.next)d.Mb.Wa=!1;for(c=this.$a;c;c=c.Og)c.Wa=!1;for(c=this.Wb.pa(ad);c;c=c.next)if(d=c.body,!d.Wa){b.il();md.length=
0;var e=md;e.push(d);for(d.Wa=!0;0<e.length;){var g=e.pop();b.ji(g);g.rc()||g.hc(!0);if(g.Ub()!=W.td){for(d=g.Xc.pa(nd);d;d=d.next){var f=d.Mb;f.Wa||(b.ki(f),f.Wa=!0,f=f.rl(g),f.Wa||(e.push(f),f.Wa=!0))}for(d=g.$a;d;d=d.next)!d.Vf.Wa&&d.Ed.lh()&&(b.mq(d.Vf),d.Vf.Wa=!0,d.Ed.Wa||(e.push(d.Ed),d.Ed.Wa=!0))}}b.xg(a,this.Ks,this.hp)}for(c=this.Wb.pa(ad);c;c=c.next)c.body.Tq();this.Mc.ol()};$b.prototype.En=function(a){for(var b=new jd(this.Mc.Yf,this.ze),c=this.Wb.pa(Xc);c;c=c.next){var d=c.body;d.Wa=!1;
d.i.Cc=0}for(var e=this.Xc.pa(Wc);e;e=e.next)e.Mb.Wa=!1,e.Mb.Yi=null;for(c=this.$a;c;c=c.Og)c.Wa=!1;for(;;){var c=this.lv(),g=c.jy,c=c.ky;if(null===g||$b.Cu<c)break;e=g.fb.ua();d=g.Za.ua();$b.Bt.Set(e.i);$b.Ct.Set(d.i);e.tg(c);d.tg(c);g.Uq(this.Mc.Yf);g.Yi=null;if(g.Om||!g.enabled)e.i.Set($b.Bt),d.i.Set($b.Ct),e.cb(),d.cb();else if(g.$k){e.Ub()!=W.Lb&&(e=d);b.il();md.length=0;g=md;g.push(e);for(e.Wa=!0;0<g.length;)if(d=g.pop(),b.ji(d),d.rc()||d.hc(!0),d.Ub()==W.Lb){for(e=d.Xc.pa(nd);e&&32!=b.Mx;e=
e.next){var f=e.Mb;f.Wa||(b.ki(f),f.Wa=!0,f=f.rl(d),f.Wa||(f.Ub()!=W.td&&(f.tg(c),f.hc(!0),g.push(f)),f.Wa=!0))}for(d=d.$a;d;d=d.next)32!=b.Cm&&!d.Vf.Wa&&d.Ed.lh()&&(b.mq(d.Vf),d.Vf.Wa=!0,d.Ed.Wa||(d.Ed.Ub()!=W.td&&(d.Ed.tg(c),d.Ed.hc(!0),g.push(d.Ed)),d.Ed.Wa=!0))}b.En(new kd((1-c)*a.la,0,a.dl,a.Qk,!1));for(c=0;c<b.af.length;c++)if(b.af[c].Wa=!1,b.af[c].rc()&&b.af[c].Ub()==W.Lb)for(b.af[c].Tq(),e=b.af[c].Xc.pa(Wc);e;e=e.next)e.Mb.Yi=null;for(c=0;c<b.Mx;c++)b.Zf[c].Wa=!1,b.Zf[c].Yi=null;for(c=0;c<
b.Cm;c++)b.xc[c].Wa=!1;this.Mc.ol()}}};$b.prototype.lv=function(){for(var a=null,b=1,c=this.Xc.pa(od);c;c=c.next){var d=c.Mb;if(!this.mv(d)){var e=1;if(null!=d.Yi)e=d.Yi;else{if(d.$k)e=1;else{var e=d.fb.ua(),g=d.Za.ua(),f=e.i.Cc;e.i.Cc<g.i.Cc?(f=g.i.Cc,e.i.tg(f)):g.i.Cc<e.i.Cc&&(f=e.i.Cc,g.i.tg(f));e=d.ru(e.i,g.i);0<e&&1>e&&(e=(1-e)*f+e)}d.Yi=e}Number.MIN_VALUE<e&&e<b&&(a=d,b=e)}}return{jy:a,ky:b}};$b.prototype.mv=function(a){var b=a.fb.ua();a=a.Za.ua();return b.Ub()==W.Lb&&b.rc()||a.Ub()==W.Lb&&
a.rc()?!1:!0};var qd=function(a,b){this.Ec="Contact"+pd++;this.Cd=new Kc;this.Ek=new Kc;this.$k=!1;var c=a.ua(),d=b.ua();this.Un=c.Ub()!=W.Lb||c.Si||d.Ub()!=W.Lb||d.Si;this.Om=a.mh()||b.mh();this.Tl=!1;this.fb=a;this.Za=b;this.enabled=!0;this.Bl=c.ug();this.Cl=d.ug();this.en=d.oa.ug();this.nq()};y=qd.prototype;y.Vb=function(a,b){this.Cd.Vb();this.Ek.Vb();this.$k=!1;var c=a.ua(),d=b.ua();this.Un=c.Ub()!=W.Lb||c.Si||d.Ub()!=W.Lb||d.Si;this.Om=a.mh()||b.mh();this.Tl=!1;this.fb=a;this.Za=b;this.enabled=
!0;this.Bl=c.ug();this.Cl=d.ug();this.en=d.oa.ug();this.nq()};y.nq=function(){this.Bl.ki(this);this.Cl.ki(this);this.en.ki(this);this.Wq()};y.Wq=function(){var a=!1,b=!1;!this.mh()&&this.qn()&&(this.rn()&&(a=!0),this.Un&&(b=!0));this.Bl.Gn(this,a,b);this.Cl.Gn(this,a,b);this.en.Gn(this,a,b)};y.Pu=function(){this.Bl.An(this);this.Cl.An(this);this.en.An(this)};y.rn=t("$k");y.mh=t("Om");y.qn=t("enabled");y.rl=function(a){var b=this.fb.ua();return b!=a?b:this.Za.ua()};y.sq=function(){this.Tl=!0};y.nu=
function(){this.Tl=!1};y.Uq=function(a){var b=this.Ek;this.Ek=this.Cd;this.Cd=b;this.enabled=!0;var c=!1,b=this.rn(),d=this.fb.ua(),e=this.Za.ua(),g=this.fb.Th.Jj(this.Za.Th);if(this.Om){if(g){var c=this.fb.Jb(),d=d.bd(),g=this.Za.Jb(),f=e.bd(),e=new Ac;e.kg=new Cc;e.kg.Set(c);e.lg=new Cc;e.lg.Set(g);e.an=d;e.bn=f;e.bu=!0;d=new Qc;d.count=0;c=new Bc;zc(c,d,e);c=c.Jf<10*Number.MIN_VALUE}this.Cd.qb=0}else{this.Un=d.Ub()!=W.Lb||d.Si||e.Ub()!=W.Lb||e.Si?!0:!1;if(g)for(this.Je(),c=0<this.Cd.qb,g=0;g<this.Cd.qb;g++){f=
this.Cd.X[g];f.Xh=0;for(var h=f.ai=0;h<this.Ek.qb;h++){var k=this.Ek.X[h];if(k.Vd.Hc==f.Vd.Hc){f.Xh=k.Xh;f.ai=k.ai;break}}}else this.Cd.qb=0;c!=b&&(d.hc(!0),e.hc(!0))}this.$k=c;c!=b&&this.Wq();!b&&c&&a.hl(this)};y.Je=r();y.ru=function(a,b){rd.kg.Set(this.fb.Jb());rd.lg.Set(this.Za.Jb());rd.Nt=a;rd.Ot=b;rd.bz=0.005;var c=rd;sd++;var d=c.kg,e=c.lg,g=c.Nt,f=c.Ot,h=d.Aa+e.Aa,c=c.bz,k=0,l=0,m=0;td.count=0;for(ud.bu=!1;;){g.bd(vd,k);f.bd(wd,k);ud.kg=d;ud.lg=e;ud.an=vd;ud.bn=wd;zc(xd,td,ud);if(0>=xd.Jf){k=
1;break}yd.xb(td,d,vd,e,wd);var n=yd.Je(vd,wd);if(0>=n){k=1;break}0==l&&(m=n>h?Math.max(h-c,0.75*h):Math.max(n-c,0.02*h));if(n-m<0.5*c){if(0==l){k=1;break}break}var q=k,p=k,s=1;g.bd(vd,s);f.bd(wd,s);var u=yd.Je(vd,wd);if(u>=m){k=1;break}for(var x=0;;){var A=0,A=x&1?p+(m-n)*(s-p)/(u-n):0.5*(p+s);g.bd(vd,A);f.bd(wd,A);var z=yd.Je(vd,wd);if(Math.abs(z-m)<0.025*c){q=A;break}z>m?(p=A,n=z):(s=A,u=z);x++;zd++;if(50==x)break}Ad=Math.max(Ad,x);if(q<(1+100*Number.MIN_VALUE)*k)break;k=q;l++;Bd++;if(1E3==l)break}Cd=
Math.max(Cd,l);return k};var rd=new Rc,pd=0,Dd=function(a,b){qd.call(this,a,b)};O(Dd,qd);Dd.prototype.Vb=function(a,b){qd.prototype.Vb.call(this,a,b)};Dd.prototype.Je=function(){var a=this.Cd,b=this.fb.Jb(),c=this.fb.ua().p,d=this.Za.Jb(),e=this.Za.ua().p;a.qb=0;var g=e.position.x+(e.j.f.x*d.Ja.x+e.j.g.x*d.Ja.y)-(c.position.x+(c.j.f.x*b.Ja.x+c.j.g.x*b.Ja.y)),c=e.position.y+(e.j.f.y*d.Ja.x+e.j.g.y*d.Ja.y)-(c.position.y+(c.j.f.y*b.Ja.x+c.j.g.y*b.Ja.y)),e=b.Aa+d.Aa;g*g+c*c>e*e||(a.Ba=1,a.ca.u(b.Ja),
a.$b.U(),a.qb=1,a.X[0].ca.u(d.Ja),a.X[0].Vd.nh(0))};var Fd=function(){this.$e=P.m(0,0);this.pb=P.m(0,0);this.yc=P.m(0,0);this.gg=new S;this.cd=new S;this.tb=[];for(var a=0;2>a;a++)this.tb[a]=new Ed},Ed=function(){this.pb=P.m(0,0);this.jb=P.m(0,0);this.kb=P.m(0,0)};Ed.prototype.Vb=function(){this.pb.Set(0,0);this.jb.Set(0,0);this.kb.Set(0,0)};var fd=function(){this.Be={};this.ag={};this.qj(Dd,ac.le,ac.le);this.qj(Gd,X.le,ac.le);this.qj(Hd,X.le,X.le);this.qj(Id,"b2EdgeShape",ac.le);this.qj(Jd,X.le,
"b2EdgeShape")};fd.prototype.qj=function(a,b,c){this.ag[b]=this.ag[b]||{};this.ag[b][c]=this.ag[b][c]||[];this.Be[b]=this.Be[b]||{};this.Be[b][c]=new Kd;this.Be[b][c].Jr=a;this.Be[b][c].ot=!0;b!=c&&(this.Be[c]=this.Be[c]||{},this.Be[c][b]=new Kd,this.Be[c][b].Jr=a,this.Be[c][b].ot=!1)};fd.prototype.Gd=function(a,b){var c=a.Jb().kh(),d=b.Jb().kh(),e=this.Be[c][d],g=e.Jr;return null!=g?e.ot?0<this.ag[c][d].length?(c=this.ag[c][d].pop(),c.Vb(a,b),c):new g(a,b):0<this.ag[d][c].length?(c=this.ag[d][c].pop(),
c.Vb(b,a),c):new g(b,a):null};fd.prototype.Tc=function(a){var b=a.fb.Jb().kh(),c=a.Za.Jb().kh();this.ag[b][c].push(a)};var Tc=function(){this.Hl=[];for(var a=0;a<=Wc;a++)this.Hl[a]=null;this.Il=[];for(a=0;a<=Wc;a++)this.Il[a]=null;this.xh={}};y=Tc.prototype;y.pa=function(a){return this.Hl[a]};y.ki=function(a){var b=a.Ec;if(null==this.xh[b]){this.xh[b]=[];for(var c=0;c<=Wc;c++)this.xh[b][c]=null;this.Ie(a,b,Wc)}};y.Gn=function(a,b,c){b?this.Ie(a,a.Ec,nd):this.Me(a.Ec,nd);c?this.Ie(a,a.Ec,od):this.Me(a.Ec,
od)};y.An=function(a){a=a.Ec;if(null!=this.xh[a]){for(var b=0;b<=Wc;b++)this.Me(a,b);delete this.xh[a]}};y.Me=function(a,b){var c=this.xh[a];if(null!=c){var d=c[b];if(null!=d){c[b]=null;var c=d.Zd,e=d.next;null==c?this.Hl[b]=e:c.ne(e);null==e?this.Il[b]=c:e.oe(c);Ld.push(d)}}};y.Ie=function(a,b,c){b=this.xh[b];if(null==b[c]){if(0<Ld.length){var d=Ld.pop();d.next=null;d.Zd=null;d.Mb=a;a=d}else a=new Md(a);b[c]=a;a=this.Il[c];null!=a?(a.ne(b[c]),b[c].oe(a)):this.Hl[c]=b[c];this.Il[c]=b[c]}};var nd=
0,od=1,Wc=2,Md=function(a){this.Mb=a;this.Zd=this.next=null},Ld=[];Md.prototype.ne=aa("next");Md.prototype.oe=aa("Zd");var Kd=r(),Nd=function(){this.da=P.m(0,0);this.Hm=[];this.X=[];for(var a=0;2>a;a++)this.X[a]=P.m(0,0)};Nd.prototype.xb=function(a){switch(a.type){case 1:this.cv(a);break;case 2:this.dv(a);break;case 4:this.gv(a)}};Nd.prototype.cv=function(a){var b=a.D.p.j,c=a.pb,d=a.D.p.position.x+(b.f.x*c.x+b.g.x*c.y),e=a.D.p.position.y+(b.f.y*c.x+b.g.y*c.y),b=a.G.p.j,c=a.tb[0].pb,g=a.G.p.position.x+
(b.f.x*c.x+b.g.x*c.y),b=a.G.p.position.y+(b.f.y*c.x+b.g.y*c.y),c=g-d,f=b-e,h=c*c+f*f;h>jc?(h=Math.sqrt(h),this.da.x=c/h,this.da.y=f/h):(this.da.x=1,this.da.y=0);this.X[0].x=0.5*(d+g);this.X[0].y=0.5*(e+b);this.Hm[0]=c*this.da.x+f*this.da.y-a.Mm};Nd.prototype.dv=function(a){this.da.x=a.D.p.j.f.x*a.$e.x+a.D.p.j.g.x*a.$e.y;this.da.y=a.D.p.j.f.y*a.$e.x+a.D.p.j.g.y*a.$e.y;for(var b=a.D.p.position.x+(a.D.p.j.f.x*a.pb.x+a.D.p.j.g.x*a.pb.y),c=a.D.p.position.y+(a.D.p.j.f.y*a.pb.x+a.D.p.j.g.y*a.pb.y),d=0;d<
a.Yd;d++){var e=a.G.p.position.x+(a.G.p.j.f.x*a.tb[d].pb.x+a.G.p.j.g.x*a.tb[d].pb.y),g=a.G.p.position.y+(a.G.p.j.f.y*a.tb[d].pb.x+a.G.p.j.g.y*a.tb[d].pb.y);this.Hm[d]=(e-b)*this.da.x+(g-c)*this.da.y-a.Mm;this.X[d].x=e;this.X[d].y=g}};Nd.prototype.gv=function(a){this.da.x=a.G.p.j.f.x*a.$e.x+a.G.p.j.g.x*a.$e.y;this.da.y=a.G.p.j.f.y*a.$e.x+a.G.p.j.g.y*a.$e.y;for(var b=a.G.p.position.x+(a.G.p.j.f.x*a.pb.x+a.G.p.j.g.x*a.pb.y),c=a.G.p.position.y+(a.G.p.j.f.y*a.pb.x+a.G.p.j.g.y*a.pb.y),d=0;d<a.Yd;d++){var e=
a.D.p.position.x+(a.D.p.j.f.x*a.tb[d].pb.x+a.D.p.j.g.x*a.tb[d].pb.y),g=a.D.p.position.y+(a.D.p.j.f.y*a.tb[d].pb.x+a.D.p.j.g.y*a.tb[d].pb.y);this.Hm[d]=(e-b)*this.da.x+(g-c)*this.da.y-a.Mm;this.X[d].Set(e,g)}this.da.x*=-1;this.da.y*=-1};var ld=function(){this.bf=[]};y=ld.prototype;y.xb=function(a,b,c){for(this.zk=c;this.bf.length<this.zk;)this.bf[this.bf.length]=new Fd;for(a=0;a<c;a++){var d=b[a],e=d.fb,g=d.Za,f=e.eg.Aa,h=g.eg.Aa,k=e.ua(),l=g.ua(),m=d.Cd,n=Math.sqrt(e.mp*g.mp),q=e.Gk>g.Gk?e.Gk:g.Gk,
p=k.k.x,s=k.k.y,u=l.k.x,x=l.k.y,A=k.r,z=l.r;Od.xb(m,k.p,f,l.p,h);g=Od.da.x;d=Od.da.y;e=this.bf[a];e.D=k;e.G=l;e.ey=m;e.yc.x=g;e.yc.y=d;e.Yd=m.qb;e.Xe=n;e.lf=q;e.$e.x=m.$b.x;e.$e.y=m.$b.y;e.pb.x=m.ca.x;e.pb.y=m.ca.y;e.Mm=f+h;e.type=m.Ba;for(f=0;f<e.Yd;++f){n=m.X[f];h=e.tb[f];h.sb=n.Xh;h.rf=n.ai;h.pb.u(n.ca);var n=h.jb.x=Od.X[f].x-k.i.n.x,q=h.jb.y=Od.X[f].y-k.i.n.y,H=h.kb.x=Od.X[f].x-l.i.n.x,J=h.kb.y=Od.X[f].y-l.i.n.y,E=n*d-q*g,C=H*d-J*g,E=E*E,C=C*C;h.gg=1/(k.B+l.B+k.I*E+l.I*C);var B=k.K*k.B+l.K*l.B,
B=B+(k.K*k.I*E+l.K*l.I*C);h.jw=1/B;C=d;B=-g;E=n*B-q*C;C=H*B-J*C;E*=E;C*=C;h.Wy=1/(k.B+l.B+k.I*E+l.I*C);h.cl=0;n=e.yc.x*(u+-z*J-p- -A*q)+e.yc.y*(x+z*H-s-A*n);-1>n&&(h.cl+=-e.lf*n)}2==e.Yd&&(x=e.tb[0],u=e.tb[1],m=k.B,k=k.I,p=l.B,l=l.I,s=x.jb.x*d-x.jb.y*g,x=x.kb.x*d-x.kb.y*g,A=u.jb.x*d-u.jb.y*g,u=u.kb.x*d-u.kb.y*g,g=m+p+k*s*s+l*x*x,d=m+p+k*A*A+l*u*u,l=m+p+k*s*A+l*x*u,g*g<100*(g*d-l*l)?(e.cd.f.Set(g,l),e.cd.g.Set(l,d),e.cd.nn(e.gg)):e.Yd=1)}};y.Hd=function(a){for(var b=0;b<this.zk;++b){var c=this.bf[b],
d=c.D,e=c.G,g=d.B,f=d.I,h=e.B,k=e.I,l=c.yc.x,m=c.yc.y,n=m,q=-l,p=0,s=0;if(a.rg)for(s=c.Yd,p=0;p<s;++p){var u=c.tb[p];u.sb*=a.Eb;u.rf*=a.Eb;var x=u.sb*l+u.rf*n,A=u.sb*m+u.rf*q;d.r-=f*(u.jb.x*A-u.jb.y*x);d.k.x-=g*x;d.k.y-=g*A;e.r+=k*(u.kb.x*A-u.kb.y*x);e.k.x+=h*x;e.k.y+=h*A}else for(s=c.Yd,p=0;p<s;++p)d=c.tb[p],d.sb=0,d.rf=0}};y.sd=function(){for(var a=0;a<this.zk;a++)this.Uu(this.bf[a])};y.Uu=function(a){for(var b=a.yc.x,c=a.yc.y,d=0;d<a.Yd;d++)ld.prototype.Vu(a,a.tb[d]);if(1==a.Yd){var d=a.tb[0],
e=d.sb-d.gg*((a.G.k.x-a.G.r*d.kb.y-a.D.k.x+a.D.r*d.jb.y)*b+(a.G.k.y+a.G.r*d.kb.x-a.D.k.y-a.D.r*d.jb.x)*c-d.cl),e=0<e?e:0,g=e-d.sb,f=g*b,c=g*c;a.D.k.x-=a.D.B*f;a.D.k.y-=a.D.B*c;a.D.r-=a.D.I*(d.jb.x*c-d.jb.y*f);a.G.k.x+=a.G.B*f;a.G.k.y+=a.G.B*c;a.G.r+=a.G.I*(d.kb.x*c-d.kb.y*f);d.sb=e}else for(var d=a.tb[0],e=a.tb[1],g=d.sb,f=e.sb,h=(a.G.k.x-a.G.r*d.kb.y-a.D.k.x+a.D.r*d.jb.y)*b+(a.G.k.y+a.G.r*d.kb.x-a.D.k.y-a.D.r*d.jb.x)*c-d.cl,c=(a.G.k.x-a.G.r*e.kb.y-a.D.k.x+a.D.r*e.jb.y)*b+(a.G.k.y+a.G.r*e.kb.x-a.D.k.y-
a.D.r*e.jb.x)*c-e.cl,h=h-(a.cd.f.x*g+a.cd.g.x*f),c=c-(a.cd.f.y*g+a.cd.g.y*f);;){b=-(a.gg.f.x*h+a.gg.g.x*c);if(0<=b){var k=-(a.gg.f.y*h+a.gg.g.y*c);if(0<=k){this.zl(a,d,e,b-g,k-f);d.sb=b;e.sb=k;break}}b=-d.gg*h;if(0<=b&&0<=a.cd.f.y*b+c){this.zl(a,d,e,b-g,-f);d.sb=b;e.sb=0;break}b=-e.gg*c;if(0<=b&&0<=a.cd.g.x*b+h){this.zl(a,d,e,-g,b-f);d.sb=0;e.sb=b;break}if(0<=h&&0<=c){this.zl(a,d,e,-g,-f);d.sb=0;e.sb=0;break}break}};y.Vu=function(a,b){var c=a.yc.y,d=-a.yc.x,e=a.Xe*b.sb,e=U.Xa(b.rf-b.Wy*((a.G.k.x-
a.G.r*b.kb.y-a.D.k.x+a.D.r*b.jb.y)*c+(a.G.k.y+a.G.r*b.kb.x-a.D.k.y-a.D.r*b.jb.x)*d),-e,e),g=e-b.rf,c=g*c,d=g*d;a.D.k.x-=a.D.B*c;a.D.k.y-=a.D.B*d;a.D.r-=a.D.I*(b.jb.x*d-b.jb.y*c);a.G.k.x+=a.G.B*c;a.G.k.y+=a.G.B*d;a.G.r+=a.G.I*(b.kb.x*d-b.kb.y*c);b.rf=e};y.zl=function(a,b,c,d,e){var g=d*a.yc.x;d*=a.yc.y;var f=e*a.yc.x;e*=a.yc.y;a.D.k.x-=a.D.B*(g+f);a.D.k.y-=a.D.B*(d+e);a.D.r-=a.D.I*(b.jb.x*d-b.jb.y*g+c.jb.x*e-c.jb.y*f);a.G.k.x+=a.G.B*(g+f);a.G.k.y+=a.G.B*(d+e);a.G.r+=a.G.I*(b.kb.x*d-b.kb.y*g+c.kb.x*
e-c.kb.y*f);b.sb=0;c.sb=0};y.kn=function(){for(var a=0;a<this.zk;++a)for(var b=this.bf[a],c=b.ey,d=0;d<b.Yd;++d){var e=c.X[d],g=b.tb[d];e.Xh=g.sb;e.ai=g.rf}};y.rd=function(a){void 0===a&&(a=0);for(var b=0,c=0;c<this.zk;c++){var d=this.bf[c],e=d.D,g=d.G,f=e.K*e.B,h=e.K*e.I,k=g.K*g.B,l=g.K*g.I;Pd.xb(d);for(var m=Pd.da,n=0;n<d.Yd;n++){var q=d.tb[n],p=Pd.X[n],s=Pd.Hm[n],u=p.x-e.i.n.x,x=p.y-e.i.n.y,A=p.x-g.i.n.x,p=p.y-g.i.n.y,b=b<s?b:s,s=-q.jw*U.Xa(a*(s+0.005),-0.2,0),q=s*m.x,s=s*m.y;e.i.n.x-=f*q;e.i.n.y-=
f*s;e.i.F-=h*(u*s-x*q);e.cb();g.i.n.x+=k*q;g.i.n.y+=k*s;g.i.F+=l*(A*s-p*q);g.cb()}}return-0.0075<b};var Id=function(a,b){qd.call(this,a,b)};O(Id,qd);Id.prototype.Vb=function(a,b){qd.prototype.Vb.call(this,a,b)};Id.prototype.Je=function(){this.fb.Jb();this.Za.Jb()};var Gd=function(a,b){qd.call(this,a,b)};O(Gd,qd);Gd.prototype.Vb=function(a,b){qd.prototype.Vb.call(this,a,b)};Gd.prototype.Je=function(){a:{var a=this.Cd,b=this.fb.Jb(),c=this.fb.ua().p,d=this.Za.Jb(),e=this.Za.ua().p;a.qb=0;for(var g=
e.position.x+(e.j.f.x*d.Ja.x+e.j.g.x*d.Ja.y)-c.position.x,f=e.position.y+(e.j.f.y*d.Ja.x+e.j.g.y*d.Ja.y)-c.position.y,e=g*c.j.f.x+f*c.j.f.y,c=g*c.j.g.x+f*c.j.g.y,g=0,f=-Number.MAX_VALUE,h=b.Aa+d.Aa,k=0;k<b.ra;++k){var l=b.ea[k].x*(e-b.C[k].x)+b.ea[k].y*(c-b.C[k].y);if(l>h)break a;l>f&&(f=l,g=k)}l=g+1;l>=b.ra&&(l=0);var k=b.C[g],m=b.C[l];f<Number.MIN_VALUE?(a.qb=1,a.Ba=2,a.$b.u(b.ea[g]),a.ca.x=0.5*(k.x+m.x),a.ca.y=0.5*(k.y+m.y),a.X[0].ca.u(d.Ja),a.X[0].Vd.nh(0)):0>=(e-k.x)*(m.x-k.x)+(c-k.y)*(m.y-k.y)?
(e-k.x)*(e-k.x)+(c-k.y)*(c-k.y)>h*h||(a.qb=1,a.Ba=2,a.$b.x=e-k.x,a.$b.y=c-k.y,a.$b.Gc(),a.ca.u(k),a.X[0].ca.u(d.Ja),a.X[0].Vd.nh(0)):0>=(e-m.x)*(k.x-m.x)+(c-m.y)*(k.y-m.y)?(e-m.x)*(e-m.x)+(c-m.y)*(c-m.y)>h*h||(a.qb=1,a.Ba=2,a.$b.x=e-m.x,a.$b.y=c-m.y,a.$b.Gc(),a.ca.u(m),a.X[0].ca.u(d.Ja),a.X[0].Vd.nh(0)):(l=0.5*(k.x+m.x),k=0.5*(k.y+m.y),f=(e-l)*b.ea[g].x+(c-k)*b.ea[g].y,f>h||(a.qb=1,a.Ba=2,a.$b.x=b.ea[g].x,a.$b.y=b.ea[g].y,a.$b.Gc(),a.ca.Set(l,k),a.X[0].ca.u(d.Ja),a.X[0].Vd.nh(0)))}};var Jd=function(a,
b){qd.call(this,a,b)};O(Jd,qd);Jd.prototype.Vb=function(a,b){qd.prototype.Vb.call(this,a,b)};Jd.prototype.Je=function(){this.fb.Jb();this.Za.Jb()};var Hd=function(a,b){qd.call(this,a,b)};O(Hd,qd);Hd.prototype.Vb=function(a,b){qd.prototype.Vb.call(this,a,b)};Hd.prototype.Je=function(){var a=this.Cd,b=this.fb.Jb(),c=this.fb.ua().p,d=this.Za.Jb(),e=this.Za.ua().p;a.qb=0;var g=b.Aa+d.Aa,f=xc(b,c,d,e),h=f.tr;if(!(f.Pm>g)){var k=xc(d,e,b,c);if(!(k.Pm>g)){var l=b,m=d,n=c,q=e,p=0;a.Ba=2;k.Pm>0.98*f.Pm+0.001&&
(l=d,m=b,n=e,q=c,h=k.tr,a.Ba=4,p=1);b=h;c=q;d=Qd;void 0===b&&(b=0);for(var e=n.j.f.x*l.ea[b].x+n.j.g.x*l.ea[b].y,f=n.j.f.y*l.ea[b].x+n.j.g.y*l.ea[b].y,k=c.j.f.x*e+c.j.f.y*f,f=c.j.g.x*e+c.j.g.y*f,e=k,k=0,s=Number.MAX_VALUE,u=0;u<m.ra;u++){var x=e*m.ea[u].x+f*m.ea[u].y;x<s&&(s=x,k=u)}e=k+1;e>=m.ra&&(e=0);d[0].Fd.x=c.position.x+(c.j.f.x*m.C[k].x+c.j.g.x*m.C[k].y);d[0].Fd.y=c.position.y+(c.j.f.y*m.C[k].x+c.j.g.y*m.C[k].y);d[0].id.Rq(b);d[0].id.Pq(k);d[0].id.Qq(0);d[1].Fd.x=c.position.x+(c.j.f.x*m.C[e].x+
c.j.g.x*m.C[e].y);d[1].Fd.y=c.position.y+(c.j.f.y*m.C[e].x+c.j.g.y*m.C[e].y);d[1].id.Rq(b);d[1].id.Pq(e);d[1].id.Qq(1);b=l.C[h];h=h+1<l.ra?l.C[h+1]:l.C[0];Rd.Set(h.x-b.x,h.y-b.y);Rd.Gc();Sd.x=Rd.y;Sd.y=-Rd.x;Td.Set(0.5*(b.x+h.x),0.5*(b.y+h.y));Ud.x=n.j.f.x*Rd.x+n.j.g.x*Rd.y;Ud.y=n.j.f.y*Rd.x+n.j.g.y*Rd.y;Vd.x=-Ud.x;Vd.y=-Ud.y;Wd.x=Ud.y;Wd.y=-Ud.x;Xd.x=n.position.x+(n.j.f.x*b.x+n.j.g.x*b.y);Xd.y=n.position.y+(n.j.f.y*b.x+n.j.g.y*b.y);Yd.x=n.position.x+(n.j.f.x*h.x+n.j.g.x*h.y);Yd.y=n.position.y+(n.j.f.y*
h.x+n.j.g.y*h.y);if(!(2>vc(Zd,Qd,Vd,-Ud.x*Xd.x-Ud.y*Xd.y+g)||2>vc($d,Zd,Ud,Ud.x*Yd.x+Ud.y*Yd.y+g))){a.$b.u(Sd);a.ca.u(Td);n=Wd.x*Xd.x+Wd.y*Xd.y;for(l=h=0;2>l;++l)Wd.x*$d[l].Fd.x+Wd.y*$d[l].Fd.y-n<=g&&(b=$d[l].Fd.x-q.position.x,m=$d[l].Fd.y-q.position.y,a.X[h].ca.x=b*q.j.f.x+m*q.j.f.y,a.X[h].ca.y=b*q.j.g.x+m*q.j.g.y,a.X[h].Vd.Set($d[l].id),a.X[h].Vd.Ru(p),h++);a.qb=h}}}};var be=function(){this.Ec="Controller"+ae++;this.oa=null;this.Wb=new Yc};be.prototype.xf=r();be.prototype.ji=function(a){this.Wb.ji(a);
a.pj(this)};be.prototype.Cj=function(a){this.Wb.Cj(a);a.Dj(this)};be.prototype.il=function(){for(var a=this.Wb.pa(Xc);a;a=a.next)this.Cj(a.body)};var ae=0,ce=function(){be.call(this);this.yc=P.m(0,-1);this.qe=this.offset=0;this.du=P.m(0,0);this.Hx=2;this.wv=1;this.hz=!0;this.ds=null};O(ce,be);ce.prototype.xf=function(){this.hz&&(this.ds=this.oa.Ks.Cb());for(var a=this.Wb.pa(bd);a;a=a.next){for(var b=a.body,c=P.m(0,0),d=P.m(0,0),e=0,g=0,f=b.mn().pa();f;f=f.next){var h=P.m(0,0),k=f.Nd.Jb().kl(this.yc,
this.offset,b.bd(),h),e=e+k;c.x+=k*h.x;c.y+=k*h.y;var l=0,l=1,g=g+k*l;d.x+=k*h.x*l;d.y+=k*h.y*l}e<Number.MIN_VALUE||(c.x/=e,c.y/=e,d.x/=g,d.y/=g,g=this.ds.vg(),g.Fc(this.qe*e),b.ke(g,d),g=b.yu(c),g.Fn(this.du),g.Fc(-this.Hx*e),b.ke(g,c),b.gl(-b.Td/b.qi()*e*b.pl()*this.wv),P.wb(c),P.wb(d))}};var de=function(){be.call(this);this.lq=P.m(0,0)};O(de,be);de.prototype.xf=function(a){a=P.m(this.lq.x*a.la,this.lq.y*a.la);for(var b=this.Wb.pa(bd);b;b=b.next){var c=b.body,d=c.ih();c.oh(P.m(d.x+a.x,d.y+a.y))}P.wb(a)};
var ee=function(){be.call(this);this.uu=P.m(0,0)};O(ee,be);ee.prototype.xf=function(){for(var a=this.Wb.pa(bd);a;a=a.next){var b=a.body;b.ke(this.uu,b.ri())}};var Uc=function(){this.Wn=this.Vn=null;this.Jl={}};Uc.prototype.pa=t("Vn");Uc.prototype.pj=function(a){var b=a.Ec;if(null==this.Jl[b]){a=new fe(a);var c=this.Wn;null!=c?c.ne(a):this.Vn=a;a.oe(c);this.Wn=a;this.Jl[b]=a}};Uc.prototype.Dj=function(a){a=a.Ec;var b=this.Jl[a];if(null!=b){var c=b.Zd,b=b.next;null==c?this.Vn=b:c.ne(b);null==b?this.Wn=
c:b.oe(c);delete this.Jl[a]}};var fe=function(a){this.Hr=a;this.Zd=this.next=null};fe.prototype.ne=aa("next");fe.prototype.oe=aa("Zd");var ge=function(){be.call(this);this.tq=1;this.rx=!0};O(ge,be);ge.prototype.xf=function(){var a=null,b=null,c=0,d=null,e=null,g=0,f=0,h=0,g=null;if(this.rx)for(var k=this.Wb.pa(Xc);k;k=k.next)for(var a=k.body,b=a.ri(),c=a.qi(),l=this.Wb.pa(Xc);l;l=l.next){if(d=l.body,a.rc()||d.rc())e=d.ri(),g=e.x-b.x,f=e.y-b.y,h=g*g+f*f,h<Number.MIN_VALUE||(g=P.m(g,f),g.Fc(this.tq/
h/Math.sqrt(h)*c*d.qi()),a.rc()&&a.ke(g,b),g.Fc(-1),d.rc()&&d.ke(g,e),P.wb(g))}else for(k=this.Wb.pa(Xc);k;k=k.next)for(a=bodyNode.body,b=a.ri(),c=a.qi(),l=this.Wb.pa(Xc);l;l=l.next)if(d=bodyNode.body,a.rc()||d.rc())e=d.ri(),g=e.x-b.x,f=e.y-b.y,h=g*g+f*f,h<Number.MIN_VALUE||(g=P.m(g,f),g.Fc(this.tq/h*c*d.qi()),a.rc()&&a.ke(g,b),g.Fc(-1),d.rc()&&d.ke(g,e),P.wb(g))};var he=function(){be.call(this);this.Xu=new S;this.xp=0};O(he,be);he.prototype.xf=function(a){a=a.la;if(!(a<=Number.MIN_VALUE)){a>this.xp&&
0<this.xp&&(a=this.xp);for(var b=this.Wb.pa(bd);b;b=b.next){var c=b.body,d=c.pn(U.mb(this.Xu,c.on(c.ih())));c.oh(P.m(c.ih().x+d.x*a,c.ih().y+d.y*a))}}};var Y=function(a){this.Nc=new ie;this.Oc=new ie;this.ef=P.m(0,0);this.ff=P.m(0,0);this.Ba=a.type;this.Og=this.Ui=null;this.L=a.D;this.M=a.G;this.Is=a.Tn};Y.prototype.Ub=t("Ba");Y.prototype.vj=t("L");Y.prototype.ln=t("M");Y.prototype.lh=function(){return this.L.lh()&&this.M.lh()};Y.Gd=function(a){return a.Gd()};Y.prototype.Hd=r();Y.prototype.sd=r();
Y.prototype.kn=r();Y.prototype.rd=v(!1);Y.ew=0;Y.Di=1;Y.cw=2;Y.eo=3;Y.dw=4;Y.IA=5;Y.aw=6;Y.bw=7;Y.fw=8;Y.$v=9;Y.Jc=0;Y.Ve=1;Y.Yb=2;Y.Eg=3;var je=function(){this.type=Y.ew;this.G=this.D=null;this.Tn=!1},ie=r(),ke=function(a){Y.call(this,a);this.S=P.m(0,0);this.T=P.m(0,0);this.Gb=P.m(0,0);this.S.u(a.Ua);this.T.u(a.Va);this.np=a.length;this.lp=a.Xl;this.Ox=a.Nl;this.Hs=this.Wh=this.q=0};O(ke,Y);ke.prototype.Hd=function(a){var b,c=0,d=this.L,e=this.M;b=d.p.j;var g=this.S.x-d.i.H.x,f=this.S.y-d.i.H.y,
c=b.f.x*g+b.g.x*f,f=b.f.y*g+b.g.y*f,g=c;b=e.p.j;var h=this.T.x-e.i.H.x,k=this.T.y-e.i.H.y,c=b.f.x*h+b.g.x*k,k=b.f.y*h+b.g.y*k,h=c;this.Gb.x=e.i.n.x+h-d.i.n.x-g;this.Gb.y=e.i.n.y+k-d.i.n.y-f;c=Math.sqrt(this.Gb.x*this.Gb.x+this.Gb.y*this.Gb.y);0.005<c?this.Gb.Fc(1/c):this.Gb.U();b=g*this.Gb.y-f*this.Gb.x;var l=h*this.Gb.y-k*this.Gb.x;b=d.B+d.I*b*b+e.B+e.I*l*l;this.K=0!=b?1/b:0;if(0<this.lp){var c=c-this.np,l=2*Math.PI*this.lp,m=this.K*l*l;this.Wh=a.la*(2*this.K*this.Ox*l+a.la*m);this.Wh=0!=this.Wh?
1/this.Wh:0;this.Hs=c*a.la*m*this.Wh;this.K=b+this.Wh;this.K=0!=this.K?1/this.K:0}a.rg?(this.q*=a.Eb,a=this.q*this.Gb.x,b=this.q*this.Gb.y,d.k.x-=d.B*a,d.k.y-=d.B*b,d.r-=d.I*(g*b-f*a),e.k.x+=e.B*a,e.k.y+=e.B*b,e.r+=e.I*(h*b-k*a)):this.q=0};ke.prototype.sd=function(){var a=this.S.x-this.L.i.H.x,b=this.S.y-this.L.i.H.y,c=this.L.p.j.f.x*a+this.L.p.j.g.x*b,b=this.L.p.j.f.y*a+this.L.p.j.g.y*b,a=c,d=this.T.x-this.M.i.H.x,e=this.T.y-this.M.i.H.y,c=this.M.p.j.f.x*d+this.M.p.j.g.x*e,e=this.M.p.j.f.y*d+this.M.p.j.g.y*
e,d=c,g=-this.K*(this.Gb.x*(this.M.k.x-this.M.r*e-(this.L.k.x-this.L.r*b))+this.Gb.y*(this.M.k.y+this.M.r*d-(this.L.k.y+this.L.r*a))+this.Hs+this.Wh*this.q);this.q+=g;c=g*this.Gb.x;g*=this.Gb.y;this.L.k.x-=this.L.B*c;this.L.k.y-=this.L.B*g;this.L.r-=this.L.I*(a*g-b*c);this.M.k.x+=this.M.B*c;this.M.k.y+=this.M.B*g;this.M.r+=this.M.I*(d*g-e*c)};ke.prototype.rd=function(){if(0<this.lp)return!0;var a=this.S.x-this.L.i.H.x,b=this.S.y-this.L.i.H.y,c=this.L.p.j.f.x*a+this.L.p.j.g.x*b,b=this.L.p.j.f.y*a+
this.L.p.j.g.y*b,a=c,d=this.T.x-this.M.i.H.x,e=this.T.y-this.M.i.H.y,c=this.M.p.j.f.x*d+this.M.p.j.g.x*e,e=this.M.p.j.f.y*d+this.M.p.j.g.y*e,d=c,g=this.M.i.n.x+d-this.L.i.n.x-a,f=this.M.i.n.y+e-this.L.i.n.y-b,h=Math.sqrt(g*g+f*f),c=U.Xa(h-this.np,-0.2,0.2),k=-this.K*c;this.Gb.Set(g/h,f/h);g=k*this.Gb.x;k*=this.Gb.y;this.L.i.n.x-=this.L.B*g;this.L.i.n.y-=this.L.B*k;this.L.i.F-=this.L.I*(a*k-b*g);this.M.i.n.x+=this.M.B*g;this.M.i.n.y+=this.M.B*k;this.M.i.F+=this.M.I*(d*k-e*g);this.L.cb();this.M.cb();
return 0.005>Math.abs(c)};var cc=function(){je.call(this);this.Ua=P.m(0,0);this.Va=P.m(0,0);this.type=Y.eo;this.length=1;this.Nl=this.Xl=0};O(cc,je);cc.prototype.xb=function(a,b,c,d){this.D=a;this.G=b;this.Ua.u(this.D.qc(c));this.Va.u(this.G.qc(d));a=d.x-c.x;c=d.y-c.y;this.length=Math.sqrt(a*a+c*c);this.Nl=this.Xl=0};cc.prototype.Gd=function(){return new ke(this)};var le=function(a){Y.call(this,a);this.zd=P.m(0,0);this.Ad=P.m(0,0);this.qp=new S;this.yd=P.m(0,0);this.zd.u(a.Ua);this.Ad.u(a.Va);this.qp.U();
this.xk=0;this.yd.U();this.Xf=0;this.Zx=a.fy;this.ay=a.gy};O(le,Y);le.prototype.Hd=function(a){var b,c=0,d=this.L,e=this.M;b=d.p.j;var g=this.zd.x-d.i.H.x,f=this.zd.y-d.i.H.y,c=b.f.x*g+b.g.x*f,f=b.f.y*g+b.g.y*f,g=c;b=e.p.j;var h=this.Ad.x-e.i.H.x,k=this.Ad.y-e.i.H.y,c=b.f.x*h+b.g.x*k,k=b.f.y*h+b.g.y*k,h=c;b=d.B;var c=e.B,l=d.I,m=e.I,n=new S;n.f.x=b+c;n.g.x=0;n.f.y=0;n.g.y=b+c;n.f.x+=l*f*f;n.g.x+=-l*g*f;n.f.y+=-l*g*f;n.g.y+=l*g*g;n.f.x+=m*k*k;n.g.x+=-m*h*k;n.f.y+=-m*h*k;n.g.y+=m*h*h;n.nn(this.qp);
this.xk=l+m;0<this.xk&&(this.xk=1/this.xk);a.rg?(this.yd.x*=a.Eb,this.yd.y*=a.Eb,this.Xf*=a.Eb,a=this.yd,d.k.x-=b*a.x,d.k.y-=b*a.y,d.r-=l*(g*a.y-f*a.x+this.Xf),e.k.x+=c*a.x,e.k.y+=c*a.y,e.r+=m*(h*a.y-k*a.x+this.Xf)):(this.yd.U(),this.Xf=0)};le.prototype.sd=function(a){var b,c=0,d=this.L,e=this.M,g=d.k,f=d.r,h=e.k,k=e.r,l=d.B,m=e.B,n=d.I,q=e.I;b=d.p.j;var p=this.zd.x-d.i.H.x,s=this.zd.y-d.i.H.y,c=b.f.x*p+b.g.x*s,s=b.f.y*p+b.g.y*s,p=c;b=e.p.j;var u=this.Ad.x-e.i.H.x,x=this.Ad.y-e.i.H.y,c=b.f.x*u+b.g.x*
x,x=b.f.y*u+b.g.y*x,u=c;b=0;var c=-this.xk*(k-f),A=this.Xf;b=a.la*this.ay;this.Xf=U.Xa(this.Xf+c,-b,b);c=this.Xf-A;f-=n*c;k+=q*c;b=U.mb(this.qp,P.m(-(h.x-k*x-g.x+f*s),-(h.y+k*u-g.y-f*p)));c=this.yd.Cb();this.yd.uf(b);b=a.la*this.Zx;this.yd.wl()>b*b&&(this.yd.Gc(),this.yd.Fc(b));b=U.Sa(this.yd,c);g.x-=l*b.x;g.y-=l*b.y;f-=n*(p*b.y-s*b.x);h.x+=m*b.x;h.y+=m*b.y;k+=q*(u*b.y-x*b.x);d.r=f;e.r=k};le.prototype.rd=v(!0);var me=function(){je.call(this);this.Ua=P.m(0,0);this.Va=P.m(0,0);this.type=Y.$v;this.gy=
this.fy=0};O(me,je);me.prototype.xb=function(a,b,c){this.D=a;this.G=b;this.Ua.u(this.D.qc(c));this.Va.u(this.G.qc(c))};me.prototype.Gd=function(){return new le(this)};var oe=function(a){Y.call(this,a);this.bg=P.m(0,0);this.cg=P.m(0,0);this.S=P.m(0,0);this.T=P.m(0,0);this.Ya=new ne;var b=a.Li.Ba,c=a.Mi.Ba;this.Wi=this.$h=this.Vi=this.Zh=null;var d=0,e=0;this.Rx=a.Li.vj();this.L=a.Li.ln();b==Y.Di?(this.Zh=a.Li,this.bg.u(this.Zh.S),this.S.u(this.Zh.T),d=this.Zh.ql()):(this.Vi=a.Li,this.bg.u(this.Vi.S),
this.S.u(this.Vi.T),d=this.Vi.xj());this.Sx=a.Mi.vj();this.M=a.Mi.ln();c==Y.Di?(this.$h=a.Mi,this.cg.u(this.$h.S),this.T.u(this.$h.T),e=this.$h.ql()):(this.Wi=a.Mi,this.cg.u(this.Wi.S),this.T.u(this.Wi.T),e=this.Wi.xj());this.ib=a.Vg;this.Ti=d+this.ib*e;this.q=0};O(oe,Y);oe.prototype.Hd=function(a){var b=this.Rx,c=this.Sx,d=this.L,e=this.M,g=0,f=0,h=0,k=0,l=h=0,m=0;this.Ya.U();this.Zh?(this.Ya.rh=-1,m+=d.I):(b=b.p.j,f=this.Vi.Yc,g=b.f.x*f.x+b.g.x*f.y,f=b.f.y*f.x+b.g.y*f.y,b=d.p.j,h=this.S.x-d.i.H.x,
k=this.S.y-d.i.H.y,l=b.f.x*h+b.g.x*k,k=b.f.y*h+b.g.y*k,h=l*f-k*g,this.Ya.xe.Set(-g,-f),this.Ya.rh=-h,m+=d.B+d.I*h*h);this.$h?(this.Ya.sh=-this.ib,m+=this.ib*this.ib*e.I):(b=c.p.j,f=this.Wi.Yc,g=b.f.x*f.x+b.g.x*f.y,f=b.f.y*f.x+b.g.y*f.y,b=e.p.j,h=this.T.x-e.i.H.x,k=this.T.y-e.i.H.y,l=b.f.x*h+b.g.x*k,k=b.f.y*h+b.g.y*k,h=l*f-k*g,this.Ya.ye.Set(-this.ib*g,-this.ib*f),this.Ya.sh=-this.ib*h,m+=this.ib*this.ib*(e.B+e.I*h*h));this.K=0<m?1/m:0;a.rg?(d.k.x+=d.B*this.q*this.Ya.xe.x,d.k.y+=d.B*this.q*this.Ya.xe.y,
d.r+=d.I*this.q*this.Ya.rh,e.k.x+=e.B*this.q*this.Ya.ye.x,e.k.y+=e.B*this.q*this.Ya.ye.y,e.r+=e.I*this.q*this.Ya.sh):this.q=0};oe.prototype.sd=function(){var a=this.L,b=this.M,c=-this.K*this.Ya.pu(a.k,a.r,b.k,b.r);this.q+=c;a.k.x+=a.B*c*this.Ya.xe.x;a.k.y+=a.B*c*this.Ya.xe.y;a.r+=a.I*c*this.Ya.rh;b.k.x+=b.B*c*this.Ya.ye.x;b.k.y+=b.B*c*this.Ya.ye.y;b.r+=b.I*c*this.Ya.sh};oe.prototype.rd=function(){var a=this.L,b=this.M,c=0,d=0,c=this.Zh?this.Zh.ql():this.Vi.xj(),d=this.$h?this.$h.ql():this.Wi.xj(),
c=-this.K*(this.Ti-(c+this.ib*d));a.i.n.x+=a.B*c*this.Ya.xe.x;a.i.n.y+=a.B*c*this.Ya.xe.y;a.i.F+=a.I*c*this.Ya.rh;b.i.n.x+=b.B*c*this.Ya.ye.x;b.i.n.y+=b.B*c*this.Ya.ye.y;b.i.F+=b.I*c*this.Ya.sh;a.cb();b.cb();return!0};var pe=function(){je.call(this);this.type=Y.aw;this.Mi=this.Li=null;this.Vg=1};O(pe,je);pe.prototype.xb=function(a,b,c){this.Li=a;this.D=a.vj();this.Mi=b;this.G=b.vj();this.Vg=c};pe.prototype.Gd=function(){return new oe(this)};var ne=function(){this.xe=P.m(0,0);this.ye=P.m(0,0)};ne.prototype.U=
function(){this.xe.U();this.rh=0;this.ye.U();this.sh=0};ne.prototype.Set=function(a,b,c,d){void 0===b&&(b=0);void 0===d&&(d=0);this.xe.u(a);this.rh=b;this.ye.u(c);this.sh=d};ne.prototype.pu=function(a,b,c,d){void 0===b&&(b=0);void 0===d&&(d=0);return this.xe.x*a.x+this.xe.y*a.y+this.rh*b+(this.ye.x*c.x+this.ye.y*c.y)+this.sh*d};var qe=function(a){Y.call(this,a);this.S=P.m(0,0);this.T=P.m(0,0);this.Yc=P.m(0,0);this.dg=P.m(0,0);this.J=P.m(0,0);this.V=P.m(0,0);this.R=new S;this.q=P.m(0,0);this.S.u(a.Ua);
this.T.u(a.Va);this.Yc.u(a.Rh);this.dg.x=-this.Yc.y;this.dg.y=this.Yc.x;this.q.U();this.qa=this.Pc=0;this.Bd=a.gp;this.Dd=a.fq;this.rp=a.wp;this.Dk=a.cj;this.Ae=a.Ch;this.Ng=a.Ei;this.ga=Y.Jc;this.J.U();this.V.U()};O(qe,Y);qe.prototype.xj=function(){var a=this.L,b=this.M,c=a.tl(this.S),d=b.tl(this.T),b=d.x-c.x,c=d.y-c.y,a=a.pn(this.Yc);return a.x*b+a.y*c};qe.prototype.Hd=function(a){var b=this.L,c=this.M,d,e=0;this.ef.u(b.jh());this.ff.u(c.jh());var g=b.bd();c.bd();d=b.p.j;var f=this.S.x-this.ef.x,
h=this.S.y-this.ef.y,e=d.f.x*f+d.g.x*h,h=d.f.y*f+d.g.y*h,f=e;d=c.p.j;var k=this.T.x-this.ff.x,l=this.T.y-this.ff.y,e=d.f.x*k+d.g.x*l,l=d.f.y*k+d.g.y*l,k=e;d=c.i.n.x+k-b.i.n.x-f;e=c.i.n.y+l-b.i.n.y-h;this.gb=b.B;this.hb=c.B;this.vc=b.I;this.wc=c.I;this.J.u(U.mb(g.j,this.Yc));this.Da=(d+f)*this.J.y-(e+h)*this.J.x;this.Ea=k*this.J.y-l*this.J.x;this.Pc=this.gb+this.hb+this.vc*this.Da*this.Da+this.wc*this.Ea*this.Ea;this.Pc=this.Pc>Number.MIN_VALUE?1/this.Pc:0;this.V.u(U.mb(g.j,this.dg));this.Ga=(d+f)*
this.V.y-(e+h)*this.V.x;this.Ha=k*this.V.y-l*this.V.x;g=this.gb;f=this.hb;h=this.vc;k=this.wc;this.R.f.x=g+f+h*this.Ga*this.Ga+k*this.Ha*this.Ha;this.R.f.y=h*this.Ga*this.Da+k*this.Ha*this.Ea;this.R.g.x=this.R.f.y;this.R.g.y=g+f+h*this.Da*this.Da+k*this.Ea*this.Ea;this.Ae?(d=this.J.x*d+this.J.y*e,0.01>Math.abs(this.Dd-this.Bd)?this.ga=Y.Eg:d<=this.Bd?this.ga!=Y.Ve&&(this.ga=Y.Ve,this.q.y=0):d>=this.Dd?this.ga!=Y.Yb&&(this.ga=Y.Yb,this.q.y=0):(this.ga=Y.Jc,this.q.y=0)):this.ga=Y.Jc;!1==this.Ng&&(this.qa=
0);a.rg?(this.q.x*=a.Eb,this.q.y*=a.Eb,this.qa*=a.Eb,a=this.q.x*this.V.x+(this.qa+this.q.y)*this.J.x,d=this.q.x*this.V.y+(this.qa+this.q.y)*this.J.y,e=this.q.x*this.Ga+(this.qa+this.q.y)*this.Da,g=this.q.x*this.Ha+(this.qa+this.q.y)*this.Ea,b.k.x-=this.gb*a,b.k.y-=this.gb*d,b.r-=this.vc*e,c.k.x+=this.hb*a,c.k.y+=this.hb*d,c.r+=this.wc*g):(this.q.U(),this.qa=0)};qe.prototype.sd=function(a){var b=this.L,c=this.M,d=b.k,e=b.r,g=c.k,f=c.r,h=0,k=0,l=0,m=0;this.Ng&&this.ga!=Y.Eg&&(m=this.Pc*(this.Dk-(this.J.x*
(g.x-d.x)+this.J.y*(g.y-d.y)+this.Ea*f-this.Da*e)),h=this.qa,k=a.la*this.rp,this.qa=U.Xa(this.qa+m,-k,k),m=this.qa-h,h=m*this.J.x,k=m*this.J.y,l=m*this.Da,m*=this.Ea,d.x-=this.gb*h,d.y-=this.gb*k,e-=this.vc*l,g.x+=this.hb*h,g.y+=this.hb*k,f+=this.wc*m);k=this.V.x*(g.x-d.x)+this.V.y*(g.y-d.y)+this.Ha*f-this.Ga*e;this.Ae&&this.ga!=Y.Jc?(l=this.J.x*(g.x-d.x)+this.J.y*(g.y-d.y)+this.Ea*f-this.Da*e,h=this.q.Cb(),a=this.R.xg(P.m(0,0),-k,-l),this.q.uf(a),this.ga==Y.Ve?this.q.y=Math.max(this.q.y,0):this.ga==
Y.Yb&&(this.q.y=Math.min(this.q.y,0)),k=-k-(this.q.y-h.y)*this.R.g.x,l=0,l=0!=this.R.f.x?k/this.R.f.x+h.x:h.x,this.q.x=l,a.x=this.q.x-h.x,a.y=this.q.y-h.y,h=a.x*this.V.x+a.y*this.J.x,k=a.x*this.V.y+a.y*this.J.y,l=a.x*this.Ga+a.y*this.Da,m=a.x*this.Ha+a.y*this.Ea):(a=0,a=0!=this.R.f.x?-k/this.R.f.x:0,this.q.x+=a,h=a*this.V.x,k=a*this.V.y,l=a*this.Ga,m=a*this.Ha);d.x-=this.gb*h;d.y-=this.gb*k;e-=this.vc*l;g.x+=this.hb*h;g.y+=this.hb*k;f+=this.wc*m;b.k.u(d);b.r=e;c.k.u(g);c.r=f};qe.prototype.rd=function(){var a=
this.L,b=this.M,c=a.i.n,d=a.i.F,e=b.i.n,g=b.i.F,f,h=0,k=0,l=0,m=0,n=f=0,q=0,k=!1,p=0,s=S.pi(d),l=S.pi(g);f=s;var q=this.S.x-this.ef.x,u=this.S.y-this.ef.y,h=f.f.x*q+f.g.x*u,u=f.f.y*q+f.g.y*u,q=h;f=l;l=this.T.x-this.ff.x;m=this.T.y-this.ff.y;h=f.f.x*l+f.g.x*m;m=f.f.y*l+f.g.y*m;l=h;f=e.x+l-c.x-q;h=e.y+m-c.y-u;if(this.Ae){this.J=U.mb(s,this.Yc);this.Da=(f+q)*this.J.y-(h+u)*this.J.x;this.Ea=l*this.J.y-m*this.J.x;var x=this.J.x*f+this.J.y*h;0.01>Math.abs(this.Dd-this.Bd)?(p=U.Xa(x,-0.2,0.2),n=Math.abs(x),
k=!0):x<=this.Bd?(p=U.Xa(x-this.Bd+0.005,-0.2,0),n=this.Bd-x,k=!0):x>=this.Dd&&(p=U.Xa(x-this.Dd+0.005,0,0.2),n=x-this.Dd,k=!0)}this.V=U.mb(s,this.dg);this.Ga=(f+q)*this.V.y-(h+u)*this.V.x;this.Ha=l*this.V.y-m*this.V.x;s=P.m(0,0);u=this.V.x*f+this.V.y*h;n=Math.max(n,Math.abs(u));q=0;k?(k=this.gb,l=this.hb,m=this.vc,f=this.wc,this.R.f.x=k+l+m*this.Ga*this.Ga+f*this.Ha*this.Ha,this.R.f.y=m*this.Ga*this.Da+f*this.Ha*this.Ea,this.R.g.x=this.R.f.y,this.R.g.y=k+l+m*this.Da*this.Da+f*this.Ea*this.Ea,this.R.xg(s,
-u,-p)):(k=this.gb,l=this.hb,m=this.vc,f=this.wc,p=k+l+m*this.Ga*this.Ga+f*this.Ha*this.Ha,s.x=0!=p?-u/p:0,s.y=0);p=s.x*this.V.x+s.y*this.J.x;k=s.x*this.V.y+s.y*this.J.y;u=s.x*this.Ga+s.y*this.Da;s=s.x*this.Ha+s.y*this.Ea;c.x-=this.gb*p;c.y-=this.gb*k;d-=this.vc*u;e.x+=this.hb*p;e.y+=this.hb*k;g+=this.wc*s;a.i.F=d;b.i.F=g;a.cb();b.cb();return 0.005>=n&&q<=ec};var re=function(){je.call(this);this.Ua=P.m(0,0);this.Va=P.m(0,0);this.Rh=P.m(0,0);this.type=Y.bw;this.Rh.Set(1,0);this.Ch=!1;this.fq=this.gp=
0;this.Ei=!1;this.cj=this.wp=0};O(re,je);re.prototype.xb=function(a,b,c,d){this.D=a;this.G=b;this.Ua=this.D.qc(c);this.Va=this.G.qc(c);this.Rh=this.D.on(d)};re.prototype.Gd=function(){return new qe(this)};var se=function(a){Y.call(this,a);this.S=P.m(0,0);this.T=P.m(0,0);this.Yc=P.m(0,0);this.dg=P.m(0,0);this.J=P.m(0,0);this.V=P.m(0,0);this.R=new lc;this.q=new kc(0,0,0);this.S.u(a.Ua);this.T.u(a.Va);this.Yc.u(a.Rh);this.dg.x=-this.Yc.y;this.dg.y=this.Yc.x;this.by=a.kf;this.q.U();this.qa=this.Pc=0;
this.Bd=a.gp;this.Dd=a.fq;this.rp=a.wp;this.Dk=a.cj;this.Ae=a.Ch;this.Ng=a.Ei;this.ga=Y.Jc;this.J.U();this.V.U()};O(se,Y);se.prototype.xj=function(){var a=this.L,b=this.M,c=a.tl(this.S),d=b.tl(this.T),b=d.x-c.x,c=d.y-c.y,a=a.pn(this.Yc);return a.x*b+a.y*c};se.prototype.Hd=function(a){var b=this.L,c=this.M,d,e=0;this.ef.u(b.jh());this.ff.u(c.jh());var g=b.bd();c.bd();d=b.p.j;var f=this.S.x-this.ef.x,h=this.S.y-this.ef.y,e=d.f.x*f+d.g.x*h,h=d.f.y*f+d.g.y*h,f=e;d=c.p.j;var k=this.T.x-this.ff.x,l=this.T.y-
this.ff.y,e=d.f.x*k+d.g.x*l,l=d.f.y*k+d.g.y*l,k=e;d=c.i.n.x+k-b.i.n.x-f;e=c.i.n.y+l-b.i.n.y-h;this.gb=b.B;this.hb=c.B;this.vc=b.I;this.wc=c.I;this.J.u(U.mb(g.j,this.Yc));this.Da=(d+f)*this.J.y-(e+h)*this.J.x;this.Ea=k*this.J.y-l*this.J.x;this.Pc=this.gb+this.hb+this.vc*this.Da*this.Da+this.wc*this.Ea*this.Ea;this.Pc>Number.MIN_VALUE&&(this.Pc=1/this.Pc);this.V.u(U.mb(g.j,this.dg));this.Ga=(d+f)*this.V.y-(e+h)*this.V.x;this.Ha=k*this.V.y-l*this.V.x;g=this.gb;f=this.hb;h=this.vc;k=this.wc;this.R.f.x=
g+f+h*this.Ga*this.Ga+k*this.Ha*this.Ha;this.R.f.y=h*this.Ga+k*this.Ha;this.R.f.z=h*this.Ga*this.Da+k*this.Ha*this.Ea;this.R.g.x=this.R.f.y;this.R.g.y=h+k;this.R.g.z=h*this.Da+k*this.Ea;this.R.ba.x=this.R.f.z;this.R.ba.y=this.R.g.z;this.R.ba.z=g+f+h*this.Da*this.Da+k*this.Ea*this.Ea;this.Ae?(d=this.J.x*d+this.J.y*e,0.01>Math.abs(this.Dd-this.Bd)?this.ga=Y.Eg:d<=this.Bd?this.ga!=Y.Ve&&(this.ga=Y.Ve,this.q.z=0):d>=this.Dd?this.ga!=Y.Yb&&(this.ga=Y.Yb,this.q.z=0):(this.ga=Y.Jc,this.q.z=0)):this.ga=Y.Jc;
!1==this.Ng&&(this.qa=0);a.rg?(this.q.x*=a.Eb,this.q.y*=a.Eb,this.qa*=a.Eb,a=this.q.x*this.V.x+(this.qa+this.q.z)*this.J.x,d=this.q.x*this.V.y+(this.qa+this.q.z)*this.J.y,e=this.q.x*this.Ga+this.q.y+(this.qa+this.q.z)*this.Da,g=this.q.x*this.Ha+this.q.y+(this.qa+this.q.z)*this.Ea,b.k.x-=this.gb*a,b.k.y-=this.gb*d,b.r-=this.vc*e,c.k.x+=this.hb*a,c.k.y+=this.hb*d,c.r+=this.wc*g):(this.q.U(),this.qa=0)};se.prototype.sd=function(a){var b=this.L,c=this.M,d=b.k,e=b.r,g=c.k,f=c.r,h=0,k=0,l=0,m=0;this.Ng&&
this.ga!=Y.Eg&&(m=this.Pc*(this.Dk-(this.J.x*(g.x-d.x)+this.J.y*(g.y-d.y)+this.Ea*f-this.Da*e)),h=this.qa,a=a.la*this.rp,this.qa=U.Xa(this.qa+m,-a,a),m=this.qa-h,h=m*this.J.x,k=m*this.J.y,l=m*this.Da,m*=this.Ea,d.x-=this.gb*h,d.y-=this.gb*k,e-=this.vc*l,g.x+=this.hb*h,g.y+=this.hb*k,f+=this.wc*m);l=this.V.x*(g.x-d.x)+this.V.y*(g.y-d.y)+this.Ha*f-this.Ga*e;k=f-e;this.Ae&&this.ga!=Y.Jc?(a=this.J.x*(g.x-d.x)+this.J.y*(g.y-d.y)+this.Ea*f-this.Da*e,h=this.q.Cb(),a=this.R.Ij(new kc(0,0,0),-l,-k,-a),this.q.uf(a),
this.ga==Y.Ve?this.q.z=Math.max(this.q.z,0):this.ga==Y.Yb&&(this.q.z=Math.min(this.q.z,0)),l=-l-(this.q.z-h.z)*this.R.ba.x,k=-k-(this.q.z-h.z)*this.R.ba.y,k=this.R.vi(P.m(0,0),l,k),k.x+=h.x,k.y+=h.y,this.q.x=k.x,this.q.y=k.y,a.x=this.q.x-h.x,a.y=this.q.y-h.y,a.z=this.q.z-h.z,h=a.x*this.V.x+a.z*this.J.x,k=a.x*this.V.y+a.z*this.J.y,l=a.x*this.Ga+a.y+a.z*this.Da,m=a.x*this.Ha+a.y+a.z*this.Ea):(a=this.R.vi(P.m(0,0),-l,-k),this.q.x+=a.x,this.q.y+=a.y,h=a.x*this.V.x,k=a.x*this.V.y,l=a.x*this.Ga+a.y,m=a.x*
this.Ha+a.y);d.x-=this.gb*h;d.y-=this.gb*k;e-=this.vc*l;g.x+=this.hb*h;g.y+=this.hb*k;f+=this.wc*m;b.k.u(d);b.r=e;c.k.u(g);c.r=f};se.prototype.rd=function(){var a=this.L,b=this.M,c=a.i.n,d=a.i.F,e=b.i.n,g=b.i.F,f,h=0,k=0,l=0,m=h=f=0,n=0,k=!1,q=0,p=S.pi(d),s=S.pi(g);f=p;var n=this.S.x-this.ef.x,u=this.S.y-this.ef.y,h=f.f.x*n+f.g.x*u,u=f.f.y*n+f.g.y*u,n=h;f=s;s=this.T.x-this.ff.x;l=this.T.y-this.ff.y;h=f.f.x*s+f.g.x*l;l=f.f.y*s+f.g.y*l;s=h;f=e.x+s-c.x-n;h=e.y+l-c.y-u;if(this.Ae){this.J=U.mb(p,this.Yc);
this.Da=(f+n)*this.J.y-(h+u)*this.J.x;this.Ea=s*this.J.y-l*this.J.x;var x=this.J.x*f+this.J.y*h;0.01>Math.abs(this.Dd-this.Bd)?(q=U.Xa(x,-0.2,0.2),m=Math.abs(x),k=!0):x<=this.Bd?(q=U.Xa(x-this.Bd+0.005,-0.2,0),m=this.Bd-x,k=!0):x>=this.Dd&&(q=U.Xa(x-this.Dd+0.005,0,0.2),m=x-this.Dd,k=!0)}this.V=U.mb(p,this.dg);this.Ga=(f+n)*this.V.y-(h+u)*this.V.x;this.Ha=s*this.V.y-l*this.V.x;p=new kc(0,0,0);u=this.V.x*f+this.V.y*h;s=g-d-this.by;m=Math.max(m,Math.abs(u));n=Math.abs(s);k?(k=this.gb,l=this.hb,f=this.vc,
h=this.wc,this.R.f.x=k+l+f*this.Ga*this.Ga+h*this.Ha*this.Ha,this.R.f.y=f*this.Ga+h*this.Ha,this.R.f.z=f*this.Ga*this.Da+h*this.Ha*this.Ea,this.R.g.x=this.R.f.y,this.R.g.y=f+h,this.R.g.z=f*this.Da+h*this.Ea,this.R.ba.x=this.R.f.z,this.R.ba.y=this.R.g.z,this.R.ba.z=k+l+f*this.Da*this.Da+h*this.Ea*this.Ea,this.R.Ij(p,-u,-s,-q)):(k=this.gb,l=this.hb,f=this.vc,h=this.wc,q=f*this.Ga+h*this.Ha,x=f+h,this.R.f.Set(k+l+f*this.Ga*this.Ga+h*this.Ha*this.Ha,q,0),this.R.g.Set(q,x,0),q=this.R.vi(P.m(0,0),-u,-s),
p.x=q.x,p.y=q.y,p.z=0);q=p.x*this.V.x+p.z*this.J.x;k=p.x*this.V.y+p.z*this.J.y;u=p.x*this.Ga+p.y+p.z*this.Da;p=p.x*this.Ha+p.y+p.z*this.Ea;c.x-=this.gb*q;c.y-=this.gb*k;d-=this.vc*u;e.x+=this.hb*q;e.y+=this.hb*k;g+=this.wc*p;a.i.F=d;b.i.F=g;a.cb();b.cb();return 0.005>=m&&n<=ec};var te=function(){je.call(this);this.Ua=P.m(0,0);this.Va=P.m(0,0);this.Rh=P.m(0,0);this.type=Y.cw;this.Rh.Set(1,0);this.kf=0;this.Ch=!1;this.fq=this.gp=0;this.Ei=!1;this.cj=this.wp=0};O(te,je);te.prototype.xb=function(a,b,
c,d){this.D=a;this.G=b;this.Ua=this.D.qc(c);this.Va=this.G.qc(c);this.Rh=this.D.on(d);this.kf=this.G.Dc()-this.D.Dc()};te.prototype.Gd=function(){return new se(this)};var ve=function(a){Y.call(this,a);this.bg=P.m(0,0);this.cg=P.m(0,0);this.S=P.m(0,0);this.T=P.m(0,0);this.Ka=P.m(0,0);this.La=P.m(0,0);this.Ud=this.L.oa.Tx;this.bg.x=a.am.x-this.Ud.p.position.x;this.bg.y=a.am.y-this.Ud.p.position.y;this.cg.x=a.cm.x-this.Ud.p.position.x;this.cg.y=a.cm.y-this.Ud.p.position.y;this.S.u(a.Ua);this.T.u(a.Va);
this.ib=a.Vg;this.Ti=a.Zo+this.ib*a.$o;this.Ms=Math.min(a.Os,this.Ti-this.ib*ue);this.Ns=Math.min(a.Ps,(this.Ti-ue)/this.ib);this.df=this.cf=this.q=0};O(ve,Y);ve.prototype.Hd=function(a){var b=this.L,c=this.M,d;d=b.p.j;var e=this.S.x-b.i.H.x,g=this.S.y-b.i.H.y,f=d.f.x*e+d.g.x*g,g=d.f.y*e+d.g.y*g,e=f;d=c.p.j;var h=this.T.x-c.i.H.x,k=this.T.y-c.i.H.y,f=d.f.x*h+d.g.x*k,k=d.f.y*h+d.g.y*k,h=f;d=c.i.n.x+h;var f=c.i.n.y+k,l=this.Ud.p.position.x+this.cg.x,m=this.Ud.p.position.y+this.cg.y;this.Ka.Set(b.i.n.x+
e-(this.Ud.p.position.x+this.bg.x),b.i.n.y+g-(this.Ud.p.position.y+this.bg.y));this.La.Set(d-l,f-m);d=this.Ka.Le();f=this.La.Le();0.005<d?this.Ka.Fc(1/d):this.Ka.U();0.005<f?this.La.Fc(1/f):this.La.U();0<this.Ti-d-this.ib*f?(this.tp=Y.Jc,this.q=0):this.tp=Y.Yb;d<this.Ms?(this.op=Y.Jc,this.cf=0):this.op=Y.Yb;f<this.Ns?(this.pp=Y.Jc,this.df=0):this.pp=Y.Yb;d=e*this.Ka.y-g*this.Ka.x;f=h*this.La.y-k*this.La.x;this.Bk=b.B+b.I*d*d;this.Ck=c.B+c.I*f*f;this.Gm=this.Bk+this.ib*this.ib*this.Ck;this.Bk=1/this.Bk;
this.Ck=1/this.Ck;this.Gm=1/this.Gm;a.rg?(this.q*=a.Eb,this.cf*=a.Eb,this.df*=a.Eb,a=(-this.q-this.cf)*this.Ka.x,d=(-this.q-this.cf)*this.Ka.y,f=(-this.ib*this.q-this.df)*this.La.x,l=(-this.ib*this.q-this.df)*this.La.y,b.k.x+=b.B*a,b.k.y+=b.B*d,b.r+=b.I*(e*d-g*a),c.k.x+=c.B*f,c.k.y+=c.B*l,c.r+=c.I*(h*l-k*f)):this.df=this.cf=this.q=0};ve.prototype.sd=function(){var a=this.L,b=this.M,c;c=a.p.j;var d=this.S.x-a.i.H.x,e=this.S.y-a.i.H.y,g=c.f.x*d+c.g.x*e,e=c.f.y*d+c.g.y*e,d=g;c=b.p.j;var f=this.T.x-b.i.H.x,
h=this.T.y-b.i.H.y,g=c.f.x*f+c.g.x*h,h=c.f.y*f+c.g.y*h,f=g,k=g=c=0,l=0;c=l=c=l=k=g=c=0;this.tp==Y.Yb&&(c=a.k.x+-a.r*e,g=a.k.y+a.r*d,k=b.k.x+-b.r*h,l=b.k.y+b.r*f,c=-(this.Ka.x*c+this.Ka.y*g)-this.ib*(this.La.x*k+this.La.y*l),l=this.Gm*-c,c=this.q,this.q=Math.max(0,this.q+l),l=this.q-c,c=-l*this.Ka.x,g=-l*this.Ka.y,k=-this.ib*l*this.La.x,l=-this.ib*l*this.La.y,a.k.x+=a.B*c,a.k.y+=a.B*g,a.r+=a.I*(d*g-e*c),b.k.x+=b.B*k,b.k.y+=b.B*l,b.r+=b.I*(f*l-h*k));this.op==Y.Yb&&(c=a.k.x+-a.r*e,g=a.k.y+a.r*d,c=-(this.Ka.x*
c+this.Ka.y*g),l=-this.Bk*c,c=this.cf,this.cf=Math.max(0,this.cf+l),l=this.cf-c,c=-l*this.Ka.x,g=-l*this.Ka.y,a.k.x+=a.B*c,a.k.y+=a.B*g,a.r+=a.I*(d*g-e*c));this.pp==Y.Yb&&(k=b.k.x+-b.r*h,l=b.k.y+b.r*f,c=-(this.La.x*k+this.La.y*l),l=-this.Ck*c,c=this.df,this.df=Math.max(0,this.df+l),l=this.df-c,k=-l*this.La.x,l=-l*this.La.y,b.k.x+=b.B*k,b.k.y+=b.B*l,b.r+=b.I*(f*l-h*k))};ve.prototype.rd=function(){var a=this.L,b=this.M,c,d=this.Ud.p.position.x+this.bg.x,e=this.Ud.p.position.y+this.bg.y,g=this.Ud.p.position.x+
this.cg.x,f=this.Ud.p.position.y+this.cg.y,h=0,k=0,l=0,m=0,n=c=0,q=0,p=0,s=n=p=c=n=c=0;this.tp==Y.Yb&&(c=a.p.j,h=this.S.x-a.i.H.x,k=this.S.y-a.i.H.y,n=c.f.x*h+c.g.x*k,k=c.f.y*h+c.g.y*k,h=n,c=b.p.j,l=this.T.x-b.i.H.x,m=this.T.y-b.i.H.y,n=c.f.x*l+c.g.x*m,m=c.f.y*l+c.g.y*m,l=n,c=a.i.n.x+h,n=a.i.n.y+k,q=b.i.n.x+l,p=b.i.n.y+m,this.Ka.Set(c-d,n-e),this.La.Set(q-g,p-f),c=this.Ka.Le(),n=this.La.Le(),0.005<c?this.Ka.Fc(1/c):this.Ka.U(),0.005<n?this.La.Fc(1/n):this.La.U(),c=this.Ti-c-this.ib*n,s=Math.max(s,
-c),c=U.Xa(c+0.005,-0.2,0),p=-this.Gm*c,c=-p*this.Ka.x,n=-p*this.Ka.y,q=-this.ib*p*this.La.x,p=-this.ib*p*this.La.y,a.i.n.x+=a.B*c,a.i.n.y+=a.B*n,a.i.F+=a.I*(h*n-k*c),b.i.n.x+=b.B*q,b.i.n.y+=b.B*p,b.i.F+=b.I*(l*p-m*q),a.cb(),b.cb());this.op==Y.Yb&&(c=a.p.j,h=this.S.x-a.i.H.x,k=this.S.y-a.i.H.y,n=c.f.x*h+c.g.x*k,k=c.f.y*h+c.g.y*k,h=n,c=a.i.n.x+h,n=a.i.n.y+k,this.Ka.Set(c-d,n-e),c=this.Ka.Le(),0.005<c?(this.Ka.x*=1/c,this.Ka.y*=1/c):this.Ka.U(),c=this.Ms-c,s=Math.max(s,-c),c=U.Xa(c+0.005,-0.2,0),p=
-this.Bk*c,c=-p*this.Ka.x,n=-p*this.Ka.y,a.i.n.x+=a.B*c,a.i.n.y+=a.B*n,a.i.F+=a.I*(h*n-k*c),a.cb());this.pp==Y.Yb&&(c=b.p.j,l=this.T.x-b.i.H.x,m=this.T.y-b.i.H.y,n=c.f.x*l+c.g.x*m,m=c.f.y*l+c.g.y*m,l=n,q=b.i.n.x+l,p=b.i.n.y+m,this.La.Set(q-g,p-f),n=this.La.Le(),0.005<n?(this.La.x*=1/n,this.La.y*=1/n):this.La.U(),c=this.Ns-n,s=Math.max(s,-c),c=U.Xa(c+0.005,-0.2,0),p=-this.Ck*c,q=-p*this.La.x,p=-p*this.La.y,b.i.n.x+=b.B*q,b.i.n.y+=b.B*p,b.i.F+=b.I*(l*p-m*q),b.cb());return 0.005>s};var ue=1,we=function(){je.call(this);
this.am=P.m(0,0);this.cm=P.m(0,0);this.Ua=P.m(0,0);this.Va=P.m(0,0);this.type=Y.dw;this.am.Set(-1,1);this.cm.Set(1,1);this.Ua.Set(-1,0);this.Va.Set(1,0);this.Ps=this.$o=this.Os=this.Zo=0;this.Vg=1;this.Tn=!0};O(we,je);we.prototype.xb=function(a,b,c,d,e,g,f){void 0===f&&(f=0);this.D=a;this.G=b;this.am.u(c);this.cm.u(d);this.Ua=this.D.qc(e);this.Va=this.G.qc(g);a=e.x-c.x;c=e.y-c.y;this.Zo=Math.sqrt(a*a+c*c);c=g.x-d.x;d=g.y-d.y;this.$o=Math.sqrt(c*c+d*d);this.Vg=f;f=this.Zo+this.Vg*this.$o;this.Os=f-
this.Vg*ue;this.Ps=(f-ue)/this.Vg};we.prototype.Gd=function(){return new ve(this)};var xe=function(a){Y.call(this,a);this.cd=new S;this.zj=new S;this.Aj=new S;this.Bj=new S;this.Nb=new kc(0,0,0);this.te=P.m(0,0);this.jf=P.m(0,0);this.S=P.m(0,0);this.T=P.m(0,0);this.q=new kc(0,0,0);this.K=new lc;this.S.u(a.Ua);this.T.u(a.Va);this.Fk=a.kf;this.q.U();this.qa=0;this.Em=a.fp;this.up=a.dq;this.$x=a.Qs;this.Dk=a.cj;this.Ae=a.Ch;this.Ng=a.Ei;this.ga=Y.Jc};O(xe,Y);xe.prototype.ql=function(){return this.M.i.F-
this.L.i.F-this.Fk};xe.prototype.Hd=function(a){var b=this.L,c=this.M,d,e=0;d=b.p.j;var g=this.S.x-b.i.H.x,f=this.S.y-b.i.H.y,e=d.f.x*g+d.g.x*f,f=d.f.y*g+d.g.y*f,g=e;d=c.p.j;var h=this.T.x-c.i.H.x,k=this.T.y-c.i.H.y,e=d.f.x*h+d.g.x*k,k=d.f.y*h+d.g.y*k,h=e;d=b.B;var e=c.B,l=b.I,m=c.I;this.K.f.x=d+e+f*f*l+k*k*m;this.K.g.x=-f*g*l-k*h*m;this.K.ba.x=-f*l-k*m;this.K.f.y=this.K.g.x;this.K.g.y=d+e+g*g*l+h*h*m;this.K.ba.y=g*l+h*m;this.K.f.z=this.K.ba.x;this.K.g.z=this.K.ba.y;this.K.ba.z=l+m;this.Pc=1/(l+m);
this.Ng||(this.qa=0);if(this.Ae){var n=c.i.F-b.i.F-this.Fk;Math.abs(this.up-this.Em)<2*ec?this.ga=Y.Eg:n<=this.Em?(this.ga!=Y.Ve&&(this.q.z=0),this.ga=Y.Ve):n>=this.up?(this.ga!=Y.Yb&&(this.q.z=0),this.ga=Y.Yb):(this.ga=Y.Jc,this.q.z=0)}else this.ga=Y.Jc;a.rg?(this.q.x*=a.Eb,this.q.y*=a.Eb,this.qa*=a.Eb,a=this.q.x,n=this.q.y,b.k.x-=d*a,b.k.y-=d*n,b.r-=l*(g*n-f*a+this.qa+this.q.z),c.k.x+=e*a,c.k.y+=e*n,c.r+=m*(h*n-k*a+this.qa+this.q.z)):(this.q.U(),this.qa=0)};xe.prototype.sd=function(a){var b=this.L,
c=this.M,d=0,e=d=0,g=0,f=0,h=0,k=b.k,l=b.r,m=c.k,n=c.r,q=b.B,p=c.B,s=b.I,u=c.I;this.Ng&&this.ga!=Y.Eg&&(e=this.Pc*-(n-l-this.Dk),g=this.qa,f=a.la*this.$x,this.qa=U.Xa(this.qa+e,-f,f),e=this.qa-g,l-=s*e,n+=u*e);if(this.Ae&&this.ga!=Y.Jc){a=b.p.j;e=this.S.x-b.i.H.x;g=this.S.y-b.i.H.y;d=a.f.x*e+a.g.x*g;g=a.f.y*e+a.g.y*g;e=d;a=c.p.j;f=this.T.x-c.i.H.x;h=this.T.y-c.i.H.y;d=a.f.x*f+a.g.x*h;h=a.f.y*f+a.g.y*h;f=d;a=m.x+-n*h-k.x- -l*g;var x=m.y+n*f-k.y-l*e;this.K.Ij(this.Nb,-a,-x,-(n-l));this.ga==Y.Eg?this.q.uf(this.Nb):
this.ga==Y.Ve?(d=this.q.z+this.Nb.z,0>d&&(this.K.vi(this.jf,-a,-x),this.Nb.x=this.jf.x,this.Nb.y=this.jf.y,this.Nb.z=-this.q.z,this.q.x+=this.jf.x,this.q.y+=this.jf.y,this.q.z=0)):this.ga==Y.Yb&&(d=this.q.z+this.Nb.z,0<d&&(this.K.vi(this.jf,-a,-x),this.Nb.x=this.jf.x,this.Nb.y=this.jf.y,this.Nb.z=-this.q.z,this.q.x+=this.jf.x,this.q.y+=this.jf.y,this.q.z=0));k.x-=q*this.Nb.x;k.y-=q*this.Nb.y;l-=s*(e*this.Nb.y-g*this.Nb.x+this.Nb.z);m.x+=p*this.Nb.x;m.y+=p*this.Nb.y;n+=u*(f*this.Nb.y-h*this.Nb.x+this.Nb.z)}else a=
b.p.j,e=this.S.x-b.i.H.x,g=this.S.y-b.i.H.y,d=a.f.x*e+a.g.x*g,g=a.f.y*e+a.g.y*g,e=d,a=c.p.j,f=this.T.x-c.i.H.x,h=this.T.y-c.i.H.y,d=a.f.x*f+a.g.x*h,h=a.f.y*f+a.g.y*h,f=d,this.K.vi(this.te,-(m.x+-n*h-k.x- -l*g),-(m.y+n*f-k.y-l*e)),this.q.x+=this.te.x,this.q.y+=this.te.y,k.x-=q*this.te.x,k.y-=q*this.te.y,l-=s*(e*this.te.y-g*this.te.x),m.x+=p*this.te.x,m.y+=p*this.te.y,n+=u*(f*this.te.y-h*this.te.x);b.k.u(k);b.r=l;c.k.u(m);c.r=n};xe.prototype.rd=function(){var a=0,b,c=this.L,d=this.M,e=0,g=b=0,f=0,h=
0;if(this.Ae&&this.ga!=Y.Jc){var a=d.i.F-c.i.F-this.Fk,k=0;this.ga==Y.Eg?(a=U.Xa(a-this.Em,-fc,fc),k=-this.Pc*a,e=Math.abs(a)):this.ga==Y.Ve?(a-=this.Em,e=-a,a=U.Xa(a+ec,-fc,0),k=-this.Pc*a):this.ga==Y.Yb&&(e=a-=this.up,a=U.Xa(a-ec,0,fc),k=-this.Pc*a);c.i.F-=c.I*k;d.i.F+=d.I*k;c.cb();d.cb()}b=c.p.j;k=this.S.x-c.i.H.x;a=this.S.y-c.i.H.y;g=b.f.x*k+b.g.x*a;a=b.f.y*k+b.g.y*a;k=g;b=d.p.j;var l=this.T.x-d.i.H.x,m=this.T.y-d.i.H.y,g=b.f.x*l+b.g.x*m,m=b.f.y*l+b.g.y*m,l=g,f=d.i.n.x+l-c.i.n.x-k,h=d.i.n.y+m-
c.i.n.y-a,n=f*f+h*h;b=Math.sqrt(n);var g=c.B,q=d.B,p=c.I,s=d.I;n>0.05*0.05&&(n=1/(g+q),f=n*-f,h=n*-h,c.i.n.x-=0.5*g*f,c.i.n.y-=0.5*g*h,d.i.n.x+=0.5*q*f,d.i.n.y+=0.5*q*h,f=d.i.n.x+l-c.i.n.x-k,h=d.i.n.y+m-c.i.n.y-a);this.zj.f.x=g+q;this.zj.g.x=0;this.zj.f.y=0;this.zj.g.y=g+q;this.Aj.f.x=p*a*a;this.Aj.g.x=-p*k*a;this.Aj.f.y=-p*k*a;this.Aj.g.y=p*k*k;this.Bj.f.x=s*m*m;this.Bj.g.x=-s*l*m;this.Bj.f.y=-s*l*m;this.Bj.g.y=s*l*l;this.cd.me(this.zj);this.cd.fl(this.Aj);this.cd.fl(this.Bj);this.cd.xg(ye,-f,-h);
f=ye.x;h=ye.y;c.i.n.x-=c.B*f;c.i.n.y-=c.B*h;c.i.F-=c.I*(k*h-a*f);d.i.n.x+=d.B*f;d.i.n.y+=d.B*h;d.i.F+=d.I*(l*h-m*f);c.cb();d.cb();return 0.005>=b&&e<=ec};var ye=P.m(0,0),dc=function(){je.call(this);this.Ua=P.m(0,0);this.Va=P.m(0,0);this.type=Y.Di;this.Ua.U();this.Va.U();this.cj=this.Qs=this.dq=this.fp=this.kf=0;this.Ei=this.Ch=!1};O(dc,je);dc.prototype.xb=function(a,b,c){this.D=a;this.G=b;this.Ua=this.D.qc(c);this.Va=this.G.qc(c);this.kf=this.G.Dc()-this.D.Dc()};dc.prototype.Gd=function(){return new xe(this)};
var ze=function(a){Y.call(this,a);this.zd=P.m(0,0);this.Ad=P.m(0,0);this.q=new kc(0,0,0);this.K=new lc;this.zd.u(a.Ua);this.Ad.u(a.Va);this.Fk=a.kf};O(ze,Y);ze.prototype.Hd=function(a){var b,c=0,d=this.L,e=this.M;b=d.p.j;var g=this.zd.x-d.i.H.x,f=this.zd.y-d.i.H.y,c=b.f.x*g+b.g.x*f,f=b.f.y*g+b.g.y*f,g=c;b=e.p.j;var h=this.Ad.x-e.i.H.x,k=this.Ad.y-e.i.H.y,c=b.f.x*h+b.g.x*k,k=b.f.y*h+b.g.y*k,h=c;b=d.B;var c=e.B,l=d.I,m=e.I;this.K.f.x=b+c+f*f*l+k*k*m;this.K.g.x=-f*g*l-k*h*m;this.K.ba.x=-f*l-k*m;this.K.f.y=
this.K.g.x;this.K.g.y=b+c+g*g*l+h*h*m;this.K.ba.y=g*l+h*m;this.K.f.z=this.K.ba.x;this.K.g.z=this.K.ba.y;this.K.ba.z=l+m;a.rg?(this.q.x*=a.Eb,this.q.y*=a.Eb,this.q.z*=a.Eb,d.k.x-=b*this.q.x,d.k.y-=b*this.q.y,d.r-=l*(g*this.q.y-f*this.q.x+this.q.z),e.k.x+=c*this.q.x,e.k.y+=c*this.q.y,e.r+=m*(h*this.q.y-k*this.q.x+this.q.z)):this.q.U()};ze.prototype.sd=function(){var a,b=0,c=this.L,d=this.M,e=c.k,g=c.r,f=d.k,h=d.r,k=c.B,l=d.B,m=c.I,n=d.I;a=c.p.j;var q=this.zd.x-c.i.H.x,p=this.zd.y-c.i.H.y,b=a.f.x*q+
a.g.x*p,p=a.f.y*q+a.g.y*p,q=b;a=d.p.j;var s=this.Ad.x-d.i.H.x,u=this.Ad.y-d.i.H.y,b=a.f.x*s+a.g.x*u,u=a.f.y*s+a.g.y*u,s=b;a=new kc(0,0,0);this.K.Ij(a,-(f.x-h*u-e.x+g*p),-(f.y+h*s-e.y-g*q),-(h-g));this.q.uf(a);e.x-=k*a.x;e.y-=k*a.y;g-=m*(q*a.y-p*a.x+a.z);f.x+=l*a.x;f.y+=l*a.y;h+=n*(s*a.y-u*a.x+a.z);c.r=g;d.r=h};ze.prototype.rd=function(){var a,b=0,c=this.L,d=this.M;a=c.p.j;var e=this.zd.x-c.i.H.x,g=this.zd.y-c.i.H.y,b=a.f.x*e+a.g.x*g,g=a.f.y*e+a.g.y*g,e=b;a=d.p.j;var f=this.Ad.x-d.i.H.x,h=this.Ad.y-
d.i.H.y,b=a.f.x*f+a.g.x*h,h=a.f.y*f+a.g.y*h,f=b;a=c.B;var b=d.B,k=c.I,l=d.I,m=d.i.n.x+f-c.i.n.x-e,n=d.i.n.y+h-c.i.n.y-g,q=d.i.F-c.i.F-this.Fk,p=Math.sqrt(m*m+n*n),s=Math.abs(q);0.05<p&&(k*=1,l*=1);this.K.f.x=a+b+g*g*k+h*h*l;this.K.g.x=-g*e*k-h*f*l;this.K.ba.x=-g*k-h*l;this.K.f.y=this.K.g.x;this.K.g.y=a+b+e*e*k+f*f*l;this.K.ba.y=e*k+f*l;this.K.f.z=this.K.ba.x;this.K.g.z=this.K.ba.y;this.K.ba.z=k+l;var u=new kc(0,0,0);this.K.Ij(u,-m,-n,-q);c.i.n.x-=a*u.x;c.i.n.y-=a*u.y;c.i.F-=k*(e*u.y-g*u.x+u.z);d.i.n.x+=
b*u.x;d.i.n.y+=b*u.y;d.i.F+=l*(f*u.y-h*u.x+u.z);c.cb();d.cb();return 0.005>=p&&s<=ec};var Ae=function(){je.call(this);this.Ua=P.m(0,0);this.Va=P.m(0,0);this.type=Y.fw;this.kf=0};O(Ae,je);Ae.prototype.xb=function(a,b,c){this.D=a;this.G=b;this.Ua.u(this.D.qc(c));this.Va.u(this.G.qc(c));this.kf=this.G.Dc()-this.D.Dc()};Ae.prototype.Gd=function(){return new ze(this)};var Qd=[new rc,new rc],Zd=[new rc,new rc],$d=[new rc,new rc],Rd=P.m(0,0),Sd=P.m(0,0),Td=P.m(0,0),Wd=P.m(0,0),Ud=P.m(0,0),Vd=P.m(0,0),Xd=
P.m(0,0),Yd=P.m(0,0),sd=0,Bd=0,Cd=0,zd=0,Ad=0,td=new Qc,ud=new Ac,vd=new Vb,wd=new Vb,yd=new Lc,xd=new Bc;Xb.Ly=new Vb;Yb.mr=new Yb;new function(){this.position=P.m(0,0);this.du=P.m(0,0);this.yc=P.m(0,0);this.id=new qc};$b.TA=new Vb;$b.Bt=new mc;$b.Ct=new mc;var rd=new Rc,Od=new Sc,Pd=new Nd}function Be(a,b,c,d,e,g){return(c+0.1>=a&&a>=e-0.1||c-0.1<=a&&a<=e+0.1)&&(d+0.1>=b&&b>=g-0.1||d-0.1<=b&&b<=g+0.1)&&(0.1<Math.abs(e-c)?0.1>Math.abs((g-d)/(e-c)*(a-c)+d-b):0.1>Math.abs(a-c))}
function Ce(a,b){var c=P,d=De(a),e=[],g,f,h,k,l,m,n,q,p;l=0;for(m=d.length;l<m;l++){f=d[l];g=[];g.length=f.length;n=p=0;for(q=f.length;n<q;n++)h=f[n],k=f[(n+1)%q],p+=h.x*k.y-h.y*k.x,g[n]=c.m(h.x,h.y);p=Math.abs(p/2);p>=0.001*b&&e.push(g)}return e}
function De(a){var b=[],c=0,d=0,e=0,g=0,f=0,h=f=0,k=0,l=0,m=0,g=0,n,q,p,s,u,x=g=c=0,A=0,e=[],k=[],z=!1,H=[],J=[];for(J.push(a);J.length;){b=J[0];d=b.length;z=!0;for(c=0;c<d;c++)if(l=c,m=c<d-1?c+1:c+1-d,g=c<d-2?c+2:c+2-d,a=b[l],n=b[m],g=b[g],g=a.x*n.y+n.x*g.y+g.x*a.y-a.y*n.x-n.y*g.x-g.y*a.x,0>g){z=!1;k=1E9;for(e=0;e<d;e++)if(e!==l&&e!==m){c=e;g=e<d-1?e+1:0;q=b[c];p=b[g];h=a.x;s=a.y;var E=n.x,C=n.y,f=q.x;q=q.y;var B=p.x;p=p.y;var w=E-h,D=C-s,F=B-f,G=p-q,F=(F*(q-s)-G*(f-h))/(D*F-w*G),w=h+F*w,D=s+F*D,
h=Be(E,C,h,s,w,D),f=Be(w,D,f,q,B,p);if(s=h&&f?P.m(w,D):null)f=n.x-s.x,h=n.y-s.y,f=f*f+h*h,f<k&&(A=c,x=g,u=s,k=f)}if(1E9===k)return[];e=[];k=[];c=A;g=x;q=b[c];p=b[g];0.1>Math.abs(p.x-u.x)&&0.1>Math.abs(p.y-u.y)||e.push(u);0.1>Math.abs(q.x-u.x)&&0.1>Math.abs(q.y-u.y)||k.push(u);A=-1;for(x=l;;){if(x!==g)e.push(b[x]);else{if(0>A||A>=d)return[];Be(p.x,p.y,b[A].x,b[A].y,a.x,a.y)||e.push(b[x]);break}A=x;0>x-1?x=d-1:x--}e.reverse();A=-1;for(x=m;;){if(x!==c)k.push(b[x]);else{if(0>A||A>=d)return[];x!==c||Be(q.x,
q.y,b[A].x,b[A].y,n.x,n.y)||k.push(b[x]);break}A=x;x+1>d-1?x=0:x++}J.push(e,k);J.shift();break}z&&H.push(J.shift())}return H}
function Ee(a){for(var b=0;4E3>b;b++)P.zf.push(new P(0,0));this.c=a;this.$c=new $b(P.m(0,10),!0);this.Uo=-1;a=new Yb;a.nb=this;a.hl=function(a){this.nb.c.Dy(a.fb.ua().Ne.ma,a.Za.ua().Ne.ma)};this.$c.Oq(a);a=new Zb;a.nb=this;a.ph=function(a,b){if(this.nb.tv)return!0;var e=a.ua().Ne.ma.type,g=b.ua().Ne.ma.type,f=e.ha.Mu;return f&&f.contains(g)?!1:(f=g.ha.Mu)&&f.contains(e)?!1:!0};this.$c.Nq(a);this.Ty=0;this.dl=8;this.Qk=3;this.tv=!0}
(function(){function a(){}function b(){}var c=P,d=W,e=bc,g=X,f=ac,h=cc,k=dc,l=Ee.prototype;l.yf=function(a){this.nb=a;this.c=a.c};l.yf.prototype.kc=r();l.Id=function(a,b){this.type=a;this.nb=a.nb;this.ma=b;this.c=a.c;this.$c=this.nb.$c};var m=l.Id.prototype;m.kc=function(){this.Bo=0!==this.Ac[0];this.Er=this.Ac[1];this.Hp=0!==this.Ac[2];this.qe=this.Ac[3];this.Xe=this.Ac[4];this.lf=this.Ac[5];this.Oh=this.Ac[6];this.th=this.Ac[7];this.wh=0!==this.Ac[8];this.enabled=0!==this.Ac[9];this.body=null;this.ma.Tb();
this.mm=this.ma.x;this.nm=this.ma.y;this.Ro=this.ma.N;this.Qo=this.Vo=0;this.ut=this.To=!1;this.Oo=null;this.Po=-1;this.nd?(this.nd.length=0,this.Xd.length=0,this.Uf.clear()):(this.nd=[],this.Xd=[],this.Uf=new ca);var a=this;this.mg||(this.Us=function(b){a.qy(b)});this.c.rv(this.Us)};m.mt=function(){this.ma.Tb();this.Yn();this.Oo=this.ma.Kr;this.Po=this.ma.Lr};m.Kk=function(){this.Pl();this.Xd.length=0;this.Uf.clear();this.body&&(this.$c.ml(this.body),this.body=null);this.c.Ey(this.Us)};m.nf=function(){var a=
{e:this.enabled,im:this.Bo,pr:this.Hp,d:this.qe,fr:this.Xe,re:this.lf,ld:this.Oh,ad:this.th,b:this.wh,mcj:this.Xd};if(this.enabled){var b=c.m(0,0);b.u(this.body.ih());a.vx=b.x;a.vy=b.y;a.om=this.body.pl()}return a};m.Lg=function(a){this.Pl();this.Xd.length=0;this.Uf.clear();this.body&&(this.$c.ml(this.body),this.body=null);this.enabled=a.e;this.Bo=a.im;this.Hp=a.pr;this.qe=a.d;this.Xe=a.fr;this.lf=a.re;this.Oh=a.ld;this.th=a.ad;this.wh=a.b;this.mm=this.ma.x;this.nm=this.ma.y;this.Ro=this.ma.N;this.Vo=
this.ma.width;this.Qo=this.ma.height;this.enabled&&(this.Yn(),this.body.oh(c.m(a.vx,a.vy)),this.body.Fj(a.om),0===a.vx&&0===a.vy&&0===a.om||this.body.hc(!0),this.Xd=a.mcj)};m.Af=function(){this.enabled&&this.Np();this.nb.Uo=this.c.dh-1};m.qy=function(a){var b,c,d,e=a.uid;d=b=0;for(c=this.Xd.length;b<c;b++)this.Xd[d]=this.Xd[b],d<this.nd.length&&(this.nd[d]=this.nd[b]),this.Xd[b].Ce[1]==e?this.$c.nl(this.nd[b]):d++;this.Xd.length=d;d<this.nd.length&&(this.nd.length=d);this.Uf.remove(a)};m.Pl=function(){var a,
b;a=0;for(b=this.nd.length;a<b;a++)this.$c.nl(this.nd[a]);this.nd.length=0};m.Np=function(){var a,b,c;a=0;for(b=this.Xd.length;a<b;a++)switch(c=this.Xd[a],c.type){case 0:this.Nv(c.Ce[0],c.Ce[1],c.Ce[2],c.Ce[3],c.Ce[4]);break;case 1:this.Pv(c.Ce[0],c.Ce[1]);break;case 2:this.Ov(c.Ce[0],c.Ce[1],c.Ce[2],c.Ce[3])}};m.Lv=function(){this.body&&(this.Pl(),this.$c.ml(this.body),this.body=null,this.ma.ha.Md=null)};var n=[];m.Yn=function(){if(this.enabled){var a=this.ma,b=!1,h=null,k=null,l,m,z,H,J,E,C,B,w,
D,F,G,V;if(this.body){b=!0;h=c.m(0,0);h.u(this.body.ih());k=this.body.pl();B=this.Uf.lj();l=0;for(m=B.length;l<m;l++)w=B[l].ha.Md.Ne,w.Pl();this.Lv()}w=new e;w.qe=this.qe;w.Xe=this.Xe;w.lf=this.lf;l=new d;l.type=this.Bo?0:2;a.Tb();l.position.x=0.02*a.Ic.aj();l.position.y=0.02*a.Ic.bj();l.N=a.N;l.mo=this.Hp;l.Oh=this.Oh;l.th=this.th;l.wh=this.wh;B=this.ma.Pe&&!this.ma.Pe.ss();this.body=this.$c.hn(l);this.body.Ne=this;l=this.Er;B||this.ma.Zk||0!==this.Er||(l=1);m=Math.max(Math.abs(a.width),1);z=Math.max(Math.abs(a.height),
1);D=0>a.width;F=0>a.height;if(0===l)if(a.Zk)for(G=a.Ic.aj()-a.x,C=a.Ic.bj()-a.y,a.JA(n),B=[],l=0,m=n.length;l<m;++l){D=n[l];F=D.QA;if(D.ej){if(!D.ej.Kl){J=D.ej.Ug;H=D.ej.gj;for(z=0;z<H;++z)B.push(c.m(J[2*z],J[2*z+1]));z=D.id&3758096384;(-2147483648===z||1073741824===z||536870912===z||z&-2147483648&&z&1073741824&&z&536870912)&&B.reverse();D.ej.Kl=Ce(B,(F.right-F.left)*(F.bottom-F.top));z=0;for(H=B.length;z<H;++z)c.wb(B[z]);B.length=0}z=0;for(H=D.ej.Kl.length;z<H;++z){V=D.ej.Kl[z];J=0;for(E=V.length;J<
E;++J)B.push(c.m(0.02*(F.left+V[J].x-G),0.02*(F.top+V[J].y-C)));w.shape=new g;w.shape.Gj(B,B.length);this.body.mi(w);J=0;for(E=B.length;J<E;++J)c.wb(B[J]);B.length=0}}else B.push(c.m(0.02*(F.left-G),0.02*(F.top-C))),B.push(c.m(0.02*(F.right-G),0.02*(F.top-C))),B.push(c.m(0.02*(F.right-G),0.02*(F.bottom-C))),B.push(c.m(0.02*(F.left-G),0.02*(F.bottom-C))),w.shape=new g,w.shape.Gj(B,B.length),this.body.mi(w);z=0;for(H=B.length;z<H;++z)c.wb(B[z]);B.length=0}else{l=a.N;a.N=0;a.Rb();a.Tb();G=a.Ic.aj()-
a.x;C=a.Ic.bj()-a.y;a.N=l;a.Rb();a.Pe.Ar(D?-m:m,F?-z:z,0);J=a.Pe.Ug;H=a.Pe.gj;B=[];B.length=H;for(l=0;l<H;l++)B[l]=c.m(J[2*l]-G,J[2*l+1]-C);D!==F&&B.reverse();G=Ce(B,m*z);for(l=0;l<H;l++)c.wb(B[l]);if(G.length)for(l=0,m=G.length;l<m;l++){B=G[l];z=0;for(H=B.length;z<H;z++)C=B[z],C.x*=0.02,C.y*=0.02;w.shape=new g;w.shape.Gj(B,B.length);this.body.mi(w);z=0;for(H=B.length;z<H;z++)c.wb(B[z])}else w.shape=new g,w.shape.yl(0.01*m,0.01*z),this.body.mi(w)}else 1===l?(w.shape=new g,w.shape.yl(0.01*m,0.01*z)):
w.shape=new f(0.01*Math.min(m,z)),this.body.mi(w);a.ha.Md=this.body;this.Vo=a.width;this.Qo=a.height;if(b)for(this.body.oh(h),this.body.Fj(k),c.wb(h),this.Np(),B=this.Uf.lj(),l=0,m=B.length;l<m;l++)w=B[l].ha.Md.Ne,w.Np();n.length=0}};m.fi=function(){if(this.enabled){var a=this.ma,b;0===this.nb.Ty?b=this.c.gi/60:(b=this.c.Zr(this.ma),b>1/30&&(b=1/30));this.c.dh>this.nb.Uo&&0<this.c.gi&&(this.$c.xf(b,this.nb.dl,this.nb.Qk),this.$c.pq(),this.nb.Uo=this.c.dh);if(this.ut||a.width!==this.Vo||a.height!==
this.Qo||a.Kr!==this.Oo||a.Lr!==this.Po||a.Zk&&a.jt)this.Yn(),this.ut=!1,this.Oo=a.Kr,this.Po=a.Lr,a.Zk&&a.jt&&(a.jt=!1);b=a.N!==this.Ro;if(a.x!==this.mm||a.y!==this.nm){a.Tb();var d=a.Ic.aj(),e=a.Ic.bj(),f=d-this.mm,g=e-this.nm;this.body.Cn(c.m(0.02*d,0.02*e));this.body.oh(c.m(f,g));this.To=!0;this.body.hc(!0)}else this.To&&(this.To=!1,this.body.oh(c.m(0,0)),this.body.Cn(c.m(0.02*a.Ic.aj(),0.02*a.Ic.bj())));b&&(this.body.xl(a.N),this.body.hc(!0));d=this.body.p.position;b=d.x/0.02;d=d.y/0.02;e=this.body.Dc();
if(b!==a.x||d!==a.y||e!==a.N)if(a.x=b,a.y=d,a.N=e,a.Rb(),a.Tb(),b=a.Ic.aj()-a.x,d=a.Ic.bj()-a.y,0!==b||0!==d)a.x-=b,a.y-=d,a.Rb();this.mm=a.x;this.nm=a.y;this.Ro=a.N}};m.Yj=function(a){return-1!==a&&this.ma.Nf?0===a&&this.body?(this.body.p.position.x+this.body.jh().x)/0.02:this.ma.Nf(a,!0):this.ma.x};m.Zj=function(a){return-1!==a&&this.ma.Nf?0===a&&this.body?(this.body.p.position.y+this.body.jh().y)/0.02:this.ma.Nf(a,!1):this.ma.y};a.prototype.qn=t("enabled");l.wa=new a;b.prototype.ke=function(a,
b,d){if(this.enabled){var e=this.Yj(d);d=this.Zj(d);this.body.ke(c.m(a,b),c.m(0.02*e,0.02*d))}};b.prototype.ku=function(a,b,d){if(this.enabled){b=L(b);var e=this.Yj(d);d=this.Zj(d);this.body.ke(c.m(Math.cos(b)*a,Math.sin(b)*a),c.m(0.02*e,0.02*d))}};b.prototype.gl=function(a){this.enabled&&this.body.gl(L(a))};b.prototype.Fj=function(a){this.enabled&&(this.body.Fj(L(a)),this.body.hc(!0))};m.Nv=function(a,b,d,e,f){if(this.enabled&&(b=this.c.ak(b))&&b!=this.ma&&b.ha.Md){b.ha.Md.Ne.Uf.add(this.ma);var g=
this.Yj(a);a=this.Zj(a);var k;b.Nf?(k=b.Nf(d,!0),d=b.Nf(d,!1)):(k=b.x,d=b.y);var l=g-k,m=a-d,n=new h;n.xb(this.body,b.ha.Md,c.m(0.02*g,0.02*a),c.m(0.02*k,0.02*d));n.length=0.02*Math.sqrt(l*l+m*m);n.Nl=e;n.Xl=f;this.nd.push(this.$c.ll(n))}};m.Pv=function(a,b){if(this.enabled){var d=this.c.ak(b);if(d&&d!=this.ma&&d.ha.Md){d.ha.Md.Ne.Uf.add(this.ma);var e=this.Yj(a),f=this.Zj(a),g=new k;g.xb(this.body,d.ha.Md,c.m(0.02*e,0.02*f));this.nd.push(this.$c.ll(g))}}};m.Ov=function(a,b,d,e){if(this.enabled&&
(b=this.c.ak(b))&&b!=this.ma&&b.ha.Md){b.ha.Md.Ne.Uf.add(this.ma);var f=this.Yj(a);a=this.Zj(a);var g=new k;g.xb(this.body,b.ha.Md,c.m(0.02*f,0.02*a));g.Ch=!0;g.fp=L(d);g.dq=L(e);this.nd.push(this.$c.ll(g))}};l.qh=new b;l.Lf=new (r())})();function Fe(a){this.c=a}
(function(){function a(){}var b=Fe.prototype;b.yf=function(a){this.nb=a;this.c=a.c};b.yf.prototype.kc=r();b.Id=function(a,b){this.type=a;this.nb=a.nb;this.ma=b;this.c=a.c};var c=b.Id.prototype;c.kc=function(){this.ma.ha.Ry=0!==this.Ac[0]};c.fi=r();a.prototype.qn=function(){return this.ma.ha.Ry};b.wa=new a;b.qh=new (r())})();
function Sb(){return[null,null,[[Tb,!1,!0,!0,!0,!0,!0,!0,!0,!0],[Ub,!0,!1,!1,!1,!1,!1,!1,!1,!1]],[["t0",Tb,!1,[],0,0,["images/background.png",1740465,1],null,[],!1,!1,0xf1d16365e50c3,[],null],["t1",Tb,!1,[],2,0,["images/rightedge.png",93,4],null,[["Solid",Fe,0xd8eee37297084],["Physics",Ee,364105256720481]],!1,!1,0xbc286e86602ff,[],null],["t2",Tb,!1,[],2,0,["images/rightedge.png",93,4],null,[["Solid",Fe,0xd68b05a463539],["Physics",Ee,0xdd5e01b94250a]],!1,!1,8461391962799083,[],null],["t3",Tb,!1,[],
2,0,["images/rightedge.png",93,4],null,[["Solid",Fe,5733865587235907],["Physics",Ee,5623059632379178]],!1,!1,5802082416044535,[],null],["t4",Tb,!1,[],2,0,["images/rightedge.png",93,4],null,[["Solid",Fe,0x8159e984cdf0e],["Physics",Ee,9621353944563516]],!1,!1,0xdf5234a452cde,[],null],["t5",Tb,!1,[],1,0,["images/ball.png",24065,0],null,[["Physics",Ee,5914776501010192]],!1,!1,0x688bfb3f4896a,[],null],["t6",Ub,!1,[],0,0,null,null,[],!1,!1,0x9dcd950229ea5,[],null,[1]]],[],[["Layout 1",960,1708,!1,"Event sheet 1",
8873350371196689,[["Layer 0",0,8722530541249526,!0,[255,255,255],!1,1,1,1,!1,1,0,0,[[[0,0,0,720,1296,0,0,1,0,0,0,0,[]],0,1,[],[],[0,0]],[[721,0,0,1,1280,0,0,0,0,0,0,0,[]],1,0,[],[[1],[1,0,0,1,0.5,0.2,0,0.01,0,1]],[0,0]],[[-1,0,0,1,1280,0,0,0,0,0,0,0,[]],2,2,[],[[1],[1,0,0,1,0.5,0.2,0,0.01,0,1]],[0,0]],[[-1,0,0,720,1,0,0,0,0,0,0,0,[]],3,3,[],[[1],[1,0,0,1,0.5,0.2,0,0.01,0,1]],[0,0]],[[0,1280,0,720,1,0,0,0,0,0,0,0,[]],4,4,[],[[1],[1,0,0,1,0.5,0.2,0,0.01,0,1]],[0,0]],[[278,263,0,196,196,0,0,1,0,0,0,
0,[]],5,5,[],[[0,0,0,1,0.5,0.5,0,0.01,0,1]],[0,0]]],[]]],[],[]]],[["Event sheet 1",[[0,null,!1,null,6847795587834391,[[6,Ub.prototype.wa.yn,null,1,!1,!1,!1,0x5eab01dc30189,!1,[[4,5]]]],[[5,Ee.prototype.qh.ku,"Physics",4532176028039897,!1,[[0,[0,1E4]],[0,[0,270]],[7,[0,0]]]]]]]]],"media/",!1,720,1280,4,!0,!0,!0,"1.0.0",!0,!1,0,1,7,!1,!0,[]]};
