// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com
'use strict';
var gscore=0;
function f() {
return function() {}
}
function ba(h) {
return function(p) {
this[h] = p
}
}
function ea(h) {
return function() {
return this[h]
}
}
function k(h) {
return function() {
return h
}
}
var fa, ga, ha, ia, ja, la, ma, na, oa, ra, sa, ta, ua, va, wa, xa, ya, za, Aa, Ba, Ca, Da, Ea, Fa, Ga, Ha, Ia, Ja, La, Ma, Na, Oa, Pa, Sa, Ua, Va, Wa, Xa, Ya, Za, $a, ab, bb, db, eb, fb, gb, kb, lb, mb, nb, ob, tb, ub, vb, wb, xb, yb, zb, Ab, Bb, Cb, Eb, Fb, Gb, Hb, Ib, Jb, Kb, Lb, Mb, Nb, Ob, Pb, Qb, Rb, Sb, Tb, Xb, Yb, Zb, $b, ac, bc, cc, dc, ec, fc, gc, hc, ic, jc, kc, lc, mc, nc = {},
oc = {};
"function" !== typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === typeof "test".__proto__ ?
function(h) {
return h.__proto__
}: function(h) {
return h.constructor.prototype
}); (function() {
function h(b, a, d, t) {
this.set(b, a, d, t)
}
function p() {
this.fc = this.ec = this.hc = this.gc = this.qc = this.pc = this.Hb = this.Gb = 0
}
function e(b, a, d, t) {
b < a ? d < t ? (q = b < d ? b: d, n = a > t ? a: t) : (q = b < t ? b: t, n = a > d ? a: d) : d < t ? (q = a < d ? a: d, n = b > t ? b: t) : (q = a < t ? a: t, n = b > d ? b: d)
}
function m() {
this.xg = this.Tf = null;
this.Rj = 0;
z && (this.Tf = new Set);
this.xk = [];
this.gh = !0
}
function a(b) {
x[y++] = b
}
function d() {
this.kb = this.So = this.y = this.Mp = 0
}
function c(b) {
this.Lc = [];
this.Zm = this.an = this.bn = this.$m = 0;
this.em(b)
}
function g(b, a) {
this.Vx = b;
this.Ux = a;
this.cells = {}
}
function b(b, a, d) {
var t;
return H.length ? (t = H.pop(), t.Cz = b, t.x = a, t.y = d, t) : new ga(b, a, d)
}
function l(b, a, d) {
this.Cz = b;
this.x = a;
this.y = d;
this.Jl = new ha
}
ia = function(b) {
window.console && window.console.log && window.console.log(b)
};
fa = function(b) {
return b
};
ja = function(b) {
return "undefined" === typeof b
};
la = function(b) {
return "number" === typeof b
};
ma = function(b) {
return "string" === typeof b
};
na = function(b) {
return 0 < b && 0 === (b - 1 & b)
};
oa = function(b) {--b;
for (var a = 1; 32 > a; a <<= 1) b |= b >> a;
return b + 1
};
ra = function(b) {
return 0 > b ? -b: b
};
sa = function(b, a) {
return b > a ? b: a
};
ta = function(b, a) {
return b < a ? b: a
};
ua = Math.PI;
va = function(b) {
return b + 0.5 | 0
};
wa = function(b) {
return 0 <= b ? b | 0 : (b | 0) - 1
};
xa = function(b) {
var a = b | 0;
return a === b ? a: a + 1
};
ya = function(b, a, d, t, l, c, g, x) {
var z, y, e, q;
b < d ? (y = b, z = d) : (y = d, z = b);
l < g ? (q = l, e = g) : (q = g, e = l);
if (z < q || y > e) return ! 1;
a < t ? (y = a, z = t) : (y = t, z = a);
c < x ? (q = c, e = x) : (q = x, e = c);
if (z < q || y > e) return ! 1;
z = l - b + g - d;
y = c - a + x - t;
b = d - b;
a = t - a;
l = g - l;
c = x - c;
x = ra(a * l - c * b);
return ra(l * y - c * z) > x ? !1 : ra(b * y - a * z) <= x
};
h.prototype.set = function(b, a, d, t) {
this.left = b;
this.top = a;
this.right = d;
this.bottom = t
};
h.prototype.copy = function(b) {
this.left = b.left;
this.top = b.top;
this.right = b.right;
this.bottom = b.bottom
};
h.prototype.width = function() {
return this.right - this.left
};
h.prototype.height = function() {
return this.bottom - this.top
};
h.prototype.offset = function(b, a) {
this.left += b;
this.top += a;
this.right += b;
this.bottom += a;
return this
};
h.prototype.normalize = function() {
var b = 0;
this.left > this.right && (b = this.left, this.left = this.right, this.right = b);
this.top > this.bottom && (b = this.top, this.top = this.bottom, this.bottom = b)
};
h.prototype.Lz = function(b) {
return ! (b.right < this.left || b.bottom < this.top || b.left > this.right || b.top > this.bottom)
};
h.prototype.Mz = function(b, a, d) {
return ! (b.right + a < this.left || b.bottom + d < this.top || b.left + a > this.right || b.top + d > this.bottom)
};
h.prototype.ae = function(b, a) {
return b >= this.left && b <= this.right && a >= this.top && a <= this.bottom
};
h.prototype.By = function(b) {
return this.left === b.left && this.top === b.top && this.right === b.right && this.bottom === b.bottom
};
za = h;
p.prototype.dm = function(b) {
this.Gb = b.left;
this.Hb = b.top;
this.pc = b.right;
this.qc = b.top;
this.gc = b.right;
this.hc = b.bottom;
this.ec = b.left;
this.fc = b.bottom
};
p.prototype.nv = function(b, a) {
if (0 === a) this.dm(b);
else {
var d = Math.sin(a),
t = Math.cos(a),
l = b.left * d,
c = b.top * d,
g = b.right * d,
d = b.bottom * d,
x = b.left * t,
z = b.top * t,
y = b.right * t,
t = b.bottom * t;
this.Gb = x - c;
this.Hb = z + l;
this.pc = y - c;
this.qc = z + g;
this.gc = y - d;
this.hc = t + g;
this.ec = x - d;
this.fc = t + l
}
};
p.prototype.offset = function(b, a) {
this.Gb += b;
this.Hb += a;
this.pc += b;
this.qc += a;
this.gc += b;
this.hc += a;
this.ec += b;
this.fc += a;
return this
};
var q = 0,
n = 0;
p.prototype.dt = function(b) {
e(this.Gb, this.pc, this.gc, this.ec);
b.left = q;
b.right = n;
e(this.Hb, this.qc, this.hc, this.fc);
b.top = q;
b.bottom = n
};
p.prototype.ae = function(b, a) {
var d = this.pc - this.Gb,
t = this.qc - this.Hb,
l = this.gc - this.Gb,
c = this.hc - this.Hb,
g = b - this.Gb,
x = a - this.Hb,
z = d * d + t * t,
y = d * l + t * c,
t = d * g + t * x,
e = l * l + c * c,
q = l * g + c * x,
n = 1 / (z * e - y * y),
d = (e * t - y * q) * n,
z = (z * q - y * t) * n;
if (0 <= d && 0 < z && 1 > d + z) return ! 0;
d = this.ec - this.Gb;
t = this.fc - this.Hb;
z = d * d + t * t;
y = d * l + t * c;
t = d * g + t * x;
n = 1 / (z * e - y * y);
d = (e * t - y * q) * n;
z = (z * q - y * t) * n;
return 0 <= d && 0 < z && 1 > d + z
};
p.prototype.hf = function(b, a) {
if (a) switch (b) {
case 0:
return this.Gb;
case 1:
return this.pc;
case 2:
return this.gc;
case 3:
return this.ec;
case 4:
return this.Gb;
default:
return this.Gb
} else switch (b) {
case 0:
return this.Hb;
case 1:
return this.qc;
case 2:
return this.hc;
case 3:
return this.fc;
case 4:
return this.Hb;
default:
return this.Hb
}
};
p.prototype.tu = function() {
return (this.Gb + this.pc + this.gc + this.ec) / 4
};
p.prototype.uu = function() {
return (this.Hb + this.qc + this.hc + this.fc) / 4
};
p.prototype.Zt = function(b) {
var a = b.tu(),
d = b.uu();
if (this.ae(a, d)) return ! 0;
a = this.tu();
d = this.uu();
if (b.ae(a, d)) return ! 0;
var t, l, c, g, x, z, y, e;
for (y = 0; 4 > y; y++) for (e = 0; 4 > e; e++) if (a = this.hf(y, !0), d = this.hf(y, !1), t = this.hf(y + 1, !0), l = this.hf(y + 1, !1), c = b.hf(e, !0), g = b.hf(e, !1), x = b.hf(e + 1, !0), z = b.hf(e + 1, !1), ya(a, d, t, l, c, g, x, z)) return ! 0;
return ! 1
};
Aa = p;
Ba = function(b, a) {
for (var d in a) a.hasOwnProperty(d) && (b[d] = a[d]);
return b
};
Ca = function(b, a) {
var d, t;
a = wa(a);
if (! (0 > a || a >= b.length)) if (0 === a) b.shift();
else if (a === b.length - 1) b.pop();
else {
d = a;
for (t = b.length - 1; d < t; d++) b[d] = b[d + 1];
b.length = t
}
};
Da = function(b, a) {
b.length = a.length;
var d, t;
d = 0;
for (t = a.length; d < t; d++) b[d] = a[d]
};
Ea = function(b, a) {
b.push.apply(b, a)
};
Fa = function(b, a) {
var d = b.indexOf(a); - 1 !== d && Ca(b, d)
};
Ga = function(b) {
return b / (180 / ua)
};
Ha = function(b) {
return b * (180 / ua)
};
Ia = function(b) {
b %= 360;
0 > b && (b += 360);
return b
};
Ja = function(b) {
b %= 2 * ua;
0 > b && (b += 2 * ua);
return b
};
La = function(b) {
return Ia(Ha(b))
};
Ma = function(b) {
return Ja(Ga(b))
};
Na = function(b, a, d, t) {
return Math.atan2(t - a, d - b)
};
Oa = function(b, a) {
if (b === a) return 0;
var d = Math.sin(b),
t = Math.cos(b),
l = Math.sin(a),
c = Math.cos(a),
d = d * l + t * c;
return 1 <= d ? 0 : -1 >= d ? ua: Math.acos(d)
};
Pa = function(b, a, d) {
var t = Math.sin(b),
l = Math.cos(b),
c = Math.sin(a),
g = Math.cos(a);
return Math.acos(t * c + l * g) > d ? 0 < l * c - t * g ? Ja(b + d) : Ja(b - d) : Ja(a)
};
Sa = function(b, a) {
var d = Math.sin(b),
t = Math.cos(b),
l = Math.sin(a),
c = Math.cos(a);
return 0 >= t * l - d * c
};
Ua = function(b, a, d, t, l, c) {
if (0 === d) return c ? b: a;
var g = Math.sin(d);
d = Math.cos(d);
b -= t;
a -= l;
var x = b * g;
b = b * d - a * g;
a = a * d + x;
return c ? b + t: a + l
};
Va = function(b, a, d, t) {
b = d - b;
a = t - a;
return Math.sqrt(b * b + a * a)
};
Wa = function(b, a) {
return ! b !== !a
};
Xa = function(b, a, d) {
return b + (a - b) * d
};
Ya = function(b, a, d) {
return b === a ? 0 : (d - b) / (a - b)
};
Za = function(b, a, d, t) {
return Xa(Xa(b, a, t), Xa(a, d, t), t)
};
$a = function(b, a, d, t, l) {
return Xa(Za(b, a, d, l), Za(a, d, t, l), l)
};
ab = function(b) {
for (var a in b) if (b.hasOwnProperty(a)) return ! 0;
return ! 1
};
bb = function(b) {
for (var a in b) b.hasOwnProperty(a) && delete b[a]
};
var D = +new Date;
db = function() {
if ("undefined" !== typeof window.performance) {
var b = window.performance;
if ("undefined" !== typeof b.now) return b.now();
if ("undefined" !== typeof b.webkitNow) return b.webkitNow();
if ("undefined" !== typeof b.mozNow) return b.mozNow();
if ("undefined" !== typeof b.msNow) return b.msNow()
}
return Date.now() - D
};
var A = !1,
t = A = !1;
"undefined" !== typeof window && (A = /chrome/i.test(navigator.userAgent) || /chromium/i.test(navigator.userAgent), A = !A && /safari/i.test(navigator.userAgent), t = window.c2ejecta);
var z = !A && !t && "undefined" !== typeof Set && "undefined" !== typeof Set.prototype.forEach;
m.prototype.contains = function(b) {
return this.nf() ? !1 : z ? this.Tf.has(b) : this.xg && this.xg.hasOwnProperty(b)
};
m.prototype.add = function(b) {
if (z) this.Tf.has(b) || (this.Tf.add(b), this.gh = !1);
else {
var a = b.toString(),
d = this.xg;
d ? d.hasOwnProperty(a) || (d[a] = b, this.Rj++, this.gh = !1) : (this.xg = {},
this.xg[a] = b, this.Rj = 1, this.gh = !1)
}
};
m.prototype.remove = function(b) {
if (!this.nf()) if (z) this.Tf.has(b) && (this.Tf["delete"](b), this.gh = !1);
else if (this.xg) {
b = b.toString();
var a = this.xg;
a.hasOwnProperty(b) && (delete a[b], this.Rj--, this.gh = !1)
}
};
m.prototype.clear = function() {
this.nf() || (z ? this.Tf.clear() : (this.xg = null, this.Rj = 0), this.xk.length = 0, this.gh = !0)
};
m.prototype.nf = function() {
return 0 === this.count()
};
m.prototype.count = function() {
return z ? this.Tf.size: this.Rj
};
var x = null,
y = 0;
m.prototype.bB = function() {
if (!this.gh) {
if (z) this.xk.length = this.Tf.size,
x = this.xk,
y = 0,
this.Tf.forEach(a),
x = null,
y = 0;
else {
var b = this.xk;
b.length = this.Rj;
var d, t = 0,
l = this.xg;
if (l) for (d in l) l.hasOwnProperty(d) && (b[t++] = l[d])
}
this.gh = !0
}
};
m.prototype.wk = function() {
this.bB();
return this.xk
};
ha = m;
new ha;
d.prototype.add = function(b) {
this.y = b - this.Mp;
this.So = this.kb + this.y;
this.Mp = this.So - this.kb - this.y;
this.kb = this.So
};
d.prototype.reset = function() {
this.kb = this.So = this.y = this.Mp = 0
};
eb = d;
fb = function(b) {
return b.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
};
c.prototype.em = function(b) {
this.Yu = b;
this.uf = b.length / 2;
this.Lc.length = b.length;
this.dn = this.gn = -1;
this.ft = 0
};
c.prototype.Nj = function() {
return ! this.Yu.length
};
c.prototype.Rb = function() {
for (var b = this.Lc,
a = b[0], d = a, t = b[1], l = t, c, g, x = 1, z = this.uf; x < z; ++x) g = 2 * x,
c = b[g],
g = b[g + 1],
c < a && (a = c),
c > d && (d = c),
g < t && (t = g),
g > l && (l = g);
this.$m = a;
this.an = d;
this.bn = t;
this.Zm = l
};
c.prototype.dm = function(b, a, d) {
this.Lc.length = 8;
this.uf = 4;
var t = this.Lc;
t[0] = b.left - a;
t[1] = b.top - d;
t[2] = b.right - a;
t[3] = b.top - d;
t[4] = b.right - a;
t[5] = b.bottom - d;
t[6] = b.left - a;
t[7] = b.bottom - d;
this.gn = b.right - b.left;
this.dn = b.bottom - b.top;
this.Rb()
};
c.prototype.nk = function(b, a, d, t, l) {
this.Lc.length = 8;
this.uf = 4;
var c = this.Lc;
c[0] = b.Gb - a;
c[1] = b.Hb - d;
c[2] = b.pc - a;
c[3] = b.qc - d;
c[4] = b.gc - a;
c[5] = b.hc - d;
c[6] = b.ec - a;
c[7] = b.fc - d;
this.gn = t;
this.dn = l;
this.Rb()
};
c.prototype.lv = function(b) {
this.uf = b.uf;
Da(this.Lc, b.Lc);
this.$m = b.$m;
this.bn - b.bn;
this.an = b.an;
this.Zm = b.Zm
};
c.prototype.xj = function(b, a, d) {
if (this.gn !== b || this.dn !== a || this.ft !== d) {
this.gn = b;
this.dn = a;
this.ft = d;
var t, l, c, g, x, z = 0,
y = 1,
e = this.Yu,
q = this.Lc;
0 !== d && (z = Math.sin(d), y = Math.cos(d));
d = 0;
for (c = this.uf; d < c; d++) t = 2 * d,
l = t + 1,
g = e[t] * b,
x = e[l] * a,
q[t] = g * y - x * z,
q[l] = x * y + g * z;
this.Rb()
}
};
c.prototype.ae = function(b, a) {
var d = this.Lc;
if (b === d[0] && a === d[1]) return ! 0;
var t, l, c, g = this.uf,
x = this.$m - 110,
z = this.bn - 101,
y = this.an + 131,
e = this.Zm + 120,
q, n, H = 0,
m = 0;
for (t = 0; t < g; t++) l = 2 * t,
c = 2 * ((t + 1) % g),
q = d[l],
l = d[l + 1],
n = d[c],
c = d[c + 1],
ya(x, z, b, a, q, l, n, c) && H++,
ya(y, e, b, a, q, l, n, c) && m++;
return 1 === H % 2 || 1 === m % 2
};
c.prototype.il = function(b, a, d) {
var t = b.Lc,
l = this.Lc;
if (this.ae(t[0] + a, t[1] + d) || b.ae(l[0] - a, l[1] - d)) return ! 0;
var c, g, x, z, y, e, q, n, H, m, h, D;
c = 0;
for (z = this.uf; c < z; c++) for (g = 2 * c, x = 2 * ((c + 1) % z), n = l[g], g = l[g + 1], H = l[x], m = l[x + 1], x = 0, q = b.uf; x < q; x++) if (y = 2 * x, e = 2 * ((x + 1) % q), h = t[y] + a, y = t[y + 1] + d, D = t[e] + a, e = t[e + 1] + d, ya(n, g, H, m, h, y, D, e)) return ! 0;
return ! 1
};
gb = c;
g.prototype.mq = function(a, d, t) {
var l;
l = this.cells[a];
return l ? (l = l[d]) ? l: t ? (l = b(this, a, d), this.cells[a][d] = l) : null: t ? (l = b(this, a, d), this.cells[a] = {},
this.cells[a][d] = l) : null
};
g.prototype.Sm = function(b) {
return wa(b / this.Vx)
};
g.prototype.Tm = function(b) {
return wa(b / this.Ux)
};
g.prototype.update = function(b, a, d) {
var t, l, c, g, x;
if (a) for (t = a.left, l = a.right; t <= l; ++t) for (c = a.top, g = a.bottom; c <= g; ++c) if (!d || !d.ae(t, c)) if (x = this.mq(t, c, !1)) x.remove(b),
x.nf() && (x.Jl.clear(), 1E3 > H.length && H.push(x), this.cells[t][c] = null);
if (d) for (t = d.left, l = d.right; t <= l; ++t) for (c = d.top, g = d.bottom; c <= g; ++c) a && a.ae(t, c) || this.mq(t, c, !0).Kz(b)
};
g.prototype.av = function(b, a) {
var d, t, l, c, g, x;
d = this.Sm(b.left);
l = this.Tm(b.top);
t = this.Sm(b.right);
for (g = this.Tm(b.bottom); d <= t; ++d) for (c = l; c <= g; ++c)(x = this.mq(d, c, !1)) && x.wy(a)
};
kb = g;
var H = [];
l.prototype.nf = function() {
return this.Jl.nf()
};
l.prototype.Kz = function(b) {
this.Jl.add(b)
};
l.prototype.remove = function(b) {
this.Jl.remove(b)
};
l.prototype.wy = function(b) {
Ea(b, this.Jl.wk())
};
ga = l;
var N = "lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" ");
lb = function(b) {
return 0 >= b || 11 <= b ? "source-over": N[b - 1]
};
mb = function(b, a, d) {
if (d) switch (b.qd = d.ONE, b.md = d.ONE_MINUS_SRC_ALPHA, a) {
case 1:
b.qd = d.ONE;
b.md = d.ONE;
break;
case 3:
b.qd = d.ONE;
b.md = d.ZERO;
break;
case 4:
b.qd = d.ONE_MINUS_DST_ALPHA;
b.md = d.ONE;
break;
case 5:
b.qd = d.DST_ALPHA;
b.md = d.ZERO;
break;
case 6:
b.qd = d.ZERO;
b.md = d.SRC_ALPHA;
break;
case 7:
b.qd = d.ONE_MINUS_DST_ALPHA;
b.md = d.ZERO;
break;
case 8:
b.qd = d.ZERO;
b.md = d.ONE_MINUS_SRC_ALPHA;
break;
case 9:
b.qd = d.DST_ALPHA;
b.md = d.ONE_MINUS_SRC_ALPHA;
break;
case 10:
b.qd = d.ONE_MINUS_DST_ALPHA,
b.md = d.SRC_ALPHA
}
};
nb = function(b) {
return va(1E6 * b) / 1E6
};
ob = function(b, a) {
return "string" !== typeof b || "string" !== typeof a || b.length !== a.length ? !1 : b === a ? !0 : b.toLowerCase() === a.toLowerCase()
}
})();
var pc = "undefined" !== typeof Float32Array ? Float32Array: Array;
function qc(h) {
var p = new pc(3);
h && (p[0] = h[0], p[1] = h[1], p[2] = h[2]);
return p
}
function rc(h) {
var p = new pc(16);
h && (p[0] = h[0], p[1] = h[1], p[2] = h[2], p[3] = h[3], p[4] = h[4], p[5] = h[5], p[6] = h[6], p[7] = h[7], p[8] = h[8], p[9] = h[9], p[10] = h[10], p[11] = h[11], p[12] = h[12], p[13] = h[13], p[14] = h[14], p[15] = h[15]);
return p
}
function sc(h, p) {
p[0] = h[0];
p[1] = h[1];
p[2] = h[2];
p[3] = h[3];
p[4] = h[4];
p[5] = h[5];
p[6] = h[6];
p[7] = h[7];
p[8] = h[8];
p[9] = h[9];
p[10] = h[10];
p[11] = h[11];
p[12] = h[12];
p[13] = h[13];
p[14] = h[14];
p[15] = h[15]
}
function tc(h, p) {
var e = p[0],
m = p[1];
p = p[2];
h[0] *= e;
h[1] *= e;
h[2] *= e;
h[3] *= e;
h[4] *= m;
h[5] *= m;
h[6] *= m;
h[7] *= m;
h[8] *= p;
h[9] *= p;
h[10] *= p;
h[11] *= p
}
function uc(h, p, e, m) {
m || (m = rc());
var a, d, c, g, b, l, q, n, D = h[0],
A = h[1];
h = h[2];
d = e[0];
c = e[1];
a = e[2];
e = p[1];
l = p[2];
D === p[0] && A === e && h === l ? (h = m, h[0] = 1, h[1] = 0, h[2] = 0, h[3] = 0, h[4] = 0, h[5] = 1, h[6] = 0, h[7] = 0, h[8] = 0, h[9] = 0, h[10] = 1, h[11] = 0, h[12] = 0, h[13] = 0, h[14] = 0, h[15] = 1) : (e = D - p[0], l = A - p[1], q = h - p[2], n = 1 / Math.sqrt(e * e + l * l + q * q), e *= n, l *= n, q *= n, p = c * q - a * l, a = a * e - d * q, d = d * l - c * e, (n = Math.sqrt(p * p + a * a + d * d)) ? (n = 1 / n, p *= n, a *= n, d *= n) : d = a = p = 0, c = l * d - q * a, g = q * p - e * d, b = e * a - l * p, (n = Math.sqrt(c * c + g * g + b * b)) ? (n = 1 / n, c *= n, g *= n, b *= n) : b = g = c = 0, m[0] = p, m[1] = c, m[2] = e, m[3] = 0, m[4] = a, m[5] = g, m[6] = l, m[7] = 0, m[8] = d, m[9] = b, m[10] = q, m[11] = 0, m[12] = -(p * D + a * A + d * h), m[13] = -(c * D + g * A + b * h), m[14] = -(e * D + l * A + q * h), m[15] = 1)
} (function() {
function h(a) {
this.Tn = /msie/i.test(navigator.userAgent) || /trident/i.test(navigator.userAgent);
this.height = this.width = 0;
this.gt = qc([0, 0, 100]);
this.qu = qc([0, 0, 0]);
this.Gv = qc([0, 1, 0]);
this.es = qc([1, 1, 1]);
this.yt = !0;
this.Uq = rc();
this.Qe = rc();
this.iu = rc();
this.Vp = rc();
this.ba = a;
this.Vt()
}
function p(a, c, g) {
this.ba = a;
this.fm = c;
this.name = g;
this.Pe = a.getAttribLocation(c, "aPos");
this.Bh = a.getAttribLocation(c, "aTex");
this.ou = a.getUniformLocation(c, "matP");
this.Vj = a.getUniformLocation(c, "matMV");
this.Wj = a.getUniformLocation(c, "opacity");
this.pu = a.getUniformLocation(c, "samplerFront");
this.Cl = a.getUniformLocation(c, "samplerBack");
this.Pi = a.getUniformLocation(c, "destStart");
this.Oi = a.getUniformLocation(c, "destEnd");
this.Rq = a.getUniformLocation(c, "seconds");
this.Qq = a.getUniformLocation(c, "pixelWidth");
this.Pq = a.getUniformLocation(c, "pixelHeight");
this.Bl = a.getUniformLocation(c, "layerScale");
this.Al = a.getUniformLocation(c, "layerAngle");
this.Dl = a.getUniformLocation(c, "viewOrigin");
this.Fz = !!(this.Qq || this.Pq || this.Rq || this.Cl || this.Pi || this.Oi || this.Bl || this.Al || this.Dl);
this.Wj && a.uniform1f(this.Wj, 1);
this.pu && a.uniform1i(this.pu, 0);
this.Cl && a.uniform1i(this.Cl, 1);
this.Pi && a.uniform2f(this.Pi, 0, 0);
this.Oi && a.uniform2f(this.Oi, 1, 1);
this.Bl && a.uniform1f(this.Bl, 1);
this.Al && a.uniform1f(this.Al, 0);
this.Dl && a.uniform2f(this.Dl, 0, 0);
this.Ai = !1
}
function e(a, c) {
this.type = a;
this.fa = c;
this.ba = c.ba;
this.Jf = this.Ve = this.Ku = 0;
this.Cb = this.zf = null;
this.ov = []
}
h.prototype.Vt = function() {
var a = this.ba,
c;
this.ju = 1;
this.Ji = this.yh = null;
this.ot = 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.ku = a.ONE;
this.hu = a.ONE_MINUS_SRC_ALPHA;
this.or = a.createBuffer();
a.bindBuffer(a.ARRAY_BUFFER, this.or);
this.rm = Array(4);
this.im = Array(4);
for (c = 0; 4 > c; c++) this.rm[c] = a.createBuffer(),
a.bindBuffer(a.ARRAY_BUFFER, this.rm[c]),
this.im[c] = a.createBuffer(),
a.bindBuffer(a.ARRAY_BUFFER, this.im[c]);
this.mg = 0;
this.Jz = a.createBuffer();
a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.Jz);
this.as = new Float32Array(16E3);
this.Rr = new Float32Array(16E3);
this.oA = new Float32Array(32E3);
for (var g = new Uint16Array(12E3), b = c = 0; 12E3 > c;) g[c++] = b,
g[c++] = b + 1,
g[c++] = b + 2,
g[c++] = b,
g[c++] = b + 2,
g[c++] = b + 3,
b += 4;
a.bufferData(a.ELEMENT_ARRAY_BUFFER, g, a.STATIC_DRAW);
this.pr = this.cg = 0;
this.Nc = [];
c = this.Sp({
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}", "");
this.Nc.push(c);
c = this.Sp({
src: "uniform mediump sampler2D samplerFront;\nvarying lowp float opacity;\nvoid main(void) {\n\tgl_FragColor = texture2D(samplerFront, gl_PointCoord);\n\tgl_FragColor *= opacity;\n}"
},
"attribute vec4 aPos;\nvarying float opacity;\nuniform mat4 matP;\nuniform mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tgl_PointSize = aPos.z;\n\topacity = aPos.w;\n}", "");
this.Nc.push(c);
for (var l in vc) vc.hasOwnProperty(l) && this.Nc.push(this.Sp(vc[l], "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}", l));
a.activeTexture(a.TEXTURE0);
a.bindTexture(a.TEXTURE_2D, null);
this.fh = [];
this.jg = 0;
this.fe = !1;
this.pt = this.rl = -1;
this.Vk = null;
this.Zy = a.createFramebuffer();
this.cv = null;
this.Yh = qc([0, 0, 0]);
this.ru = a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1];
2048 < this.ru && (this.ru = 2048);
this.Xf(0)
};
h.prototype.Sp = function(a, c, g) {
var b = this.ba,
l = b.createShader(b.FRAGMENT_SHADER);
b.shaderSource(l, a.src);
b.compileShader(l);
if (!b.getShaderParameter(l, b.COMPILE_STATUS)) return b.deleteShader(l),
null;
var e = b.createShader(b.VERTEX_SHADER);
b.shaderSource(e, c);
b.compileShader(e);
if (!b.getShaderParameter(e, b.COMPILE_STATUS)) return b.deleteShader(l),
b.deleteShader(e),
null;
c = b.createProgram();
b.attachShader(c, l);
b.attachShader(c, e);
b.linkProgram(c);
if (!b.getProgramParameter(c, b.LINK_STATUS)) return b.deleteShader(l),
b.deleteShader(e),
b.deleteProgram(c),
null;
b.useProgram(c);
b.deleteShader(l);
b.deleteShader(e);
g = new p(b, c, g);
g.bq = a.bq || 0;
g.cq = a.cq || 0;
g.mt = !!a.mt;
g.$s = !!a.$s;
g.Ka = a.Ka || [];
a = 0;
for (l = g.Ka.length; a < l; a++) g.Ka[a][1] = b.getUniformLocation(c, g.Ka[a][0]),
b.uniform1f(g.Ka[a][1], 0);
return g
};
h.prototype.sq = function(a) {
var c, g;
c = 0;
for (g = this.Nc.length; c < g; c++) if (this.Nc[c].name === a) return c;
return - 1
};
h.prototype.Xu = function(a, c, g) {
var b = this.Qe,
l = this.Uq,
e = [0, 0, 0, 0, 0, 0, 0, 0];
e[0] = b[0] * a + b[4] * c + b[12];
e[1] = b[1] * a + b[5] * c + b[13];
e[2] = b[2] * a + b[6] * c + b[14];
e[3] = b[3] * a + b[7] * c + b[15];
e[4] = l[0] * e[0] + l[4] * e[1] + l[8] * e[2] + l[12] * e[3];
e[5] = l[1] * e[0] + l[5] * e[1] + l[9] * e[2] + l[13] * e[3];
e[6] = l[2] * e[0] + l[6] * e[1] + l[10] * e[2] + l[14] * e[3];
e[7] = -e[2];
0 !== e[7] && (e[7] = 1 / e[7], e[4] *= e[7], e[5] *= e[7], e[6] *= e[7], g[0] = (0.5 * e[4] + 0.5) * this.width, g[1] = (0.5 * e[5] + 0.5) * this.height)
};
h.prototype.Lh = function(a, c, g) {
if (this.width !== a || this.height !== c || g) {
this.ph();
this.width = a;
this.height = c;
this.ba.viewport(0, 0, a, c);
c = a / c;
var b = this.Uq,
l;
l = 1 * Math.tan(45 * Math.PI / 360);
c *= l;
a = -c;
g = -l;
b || (b = rc());
var e = c - a,
n = l - g;
b[0] = 2 / e;
b[1] = 0;
b[2] = 0;
b[3] = 0;
b[4] = 0;
b[5] = 2 / n;
b[6] = 0;
b[7] = 0;
b[8] = (c + a) / e;
b[9] = (l + g) / n;
b[10] = -1001 / 999;
b[11] = -1;
b[12] = 0;
b[13] = 0;
b[14] = -2E3 / 999;
b[15] = 0;
uc(this.gt, this.qu, this.Gv, this.Qe);
a = [0, 0];
c = [0, 0];
this.Xu(0, 0, a);
this.Xu(1, 1, c);
this.es[0] = 1 / (c[0] - a[0]);
this.es[1] = -1 / (c[1] - a[1]);
a = 0;
for (c = this.Nc.length; a < c; a++) g = this.Nc[a],
g.Ai = !1,
g.ou && (this.ba.useProgram(g.fm), this.ba.uniformMatrix4fv(g.ou, !1, this.Uq));
this.ba.useProgram(this.Nc[this.rl].fm);
this.ba.bindTexture(this.ba.TEXTURE_2D, null);
this.ba.activeTexture(this.ba.TEXTURE1);
this.ba.bindTexture(this.ba.TEXTURE_2D, null);
this.ba.activeTexture(this.ba.TEXTURE0);
this.Ji = this.yh = null
}
};
h.prototype.Sf = function() {
uc(this.gt, this.qu, this.Gv, this.Qe);
tc(this.Qe, this.es)
};
h.prototype.translate = function(a, c) {
if (0 !== a || 0 !== c) {
this.Yh[0] = a;
this.Yh[1] = c;
this.Yh[2] = 0;
var g = this.Qe,
b = this.Yh,
l = b[0],
e = b[1],
b = b[2];
g[12] = g[0] * l + g[4] * e + g[8] * b + g[12];
g[13] = g[1] * l + g[5] * e + g[9] * b + g[13];
g[14] = g[2] * l + g[6] * e + g[10] * b + g[14];
g[15] = g[3] * l + g[7] * e + g[11] * b + g[15]
}
};
h.prototype.scale = function(a, c) {
if (1 !== a || 1 !== c) this.Yh[0] = a,
this.Yh[1] = c,
this.Yh[2] = 1,
tc(this.Qe, this.Yh)
};
h.prototype.Dr = function(a) {
if (0 !== a) {
var c = this.Qe,
g, b = Math.sin(a);
a = Math.cos(a);
var l = c[0],
e = c[1],
n = c[2],
m = c[3],
h = c[4],
t = c[5],
z = c[6],
x = c[7];
g ? c !== g && (g[8] = c[8], g[9] = c[9], g[10] = c[10], g[11] = c[11], g[12] = c[12], g[13] = c[13], g[14] = c[14], g[15] = c[15]) : g = c;
g[0] = l * a + h * b;
g[1] = e * a + t * b;
g[2] = n * a + z * b;
g[3] = m * a + x * b;
g[4] = l * -b + h * a;
g[5] = e * -b + t * a;
g[6] = n * -b + z * a;
g[7] = m * -b + x * a
}
};
h.prototype.bg = function() {
for (var a = !1,
c = 0; 16 > c; c++) if (this.iu[c] !== this.Qe[c]) {
a = !0;
break
}
a && (a = this.vf(), a.type = 5, a.Cb ? sc(this.Qe, a.Cb) : a.Cb = rc(this.Qe), sc(this.Qe, this.iu), this.fe = !1)
};
e.prototype.ry = function() {
this.ba.bindTexture(this.ba.TEXTURE_2D, this.zf)
};
e.prototype.ty = function() {
var a = this.ba;
a.activeTexture(a.TEXTURE1);
a.bindTexture(a.TEXTURE_2D, this.zf);
a.activeTexture(a.TEXTURE0)
};
e.prototype.ny = function() {
var a = this.Ku,
c = this.fa;
c.ot = a;
c = c.Vk;
c.Wj && this.ba.uniform1f(c.Wj, a)
};
e.prototype.jy = function() {
this.ba.drawElements(this.ba.TRIANGLES, this.Jf, this.ba.UNSIGNED_SHORT, 2 * this.Ve)
};
e.prototype.my = function() {
this.ba.blendFunc(this.Ve, this.Jf)
};
e.prototype.uy = function() {
var a, c, g, b = this.fa.Nc,
l = this.fa.pt;
a = 0;
for (c = b.length; a < c; a++) g = b[a],
a === l && g.Vj ? (this.ba.uniformMatrix4fv(g.Vj, !1, this.Cb), g.Ai = !0) : g.Ai = !1;
sc(this.Cb, this.fa.Vp)
};
e.prototype.ky = function() {
var a = this.ba,
c = this.fa;
this.zf ? (c.Ji === this.zf && (a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, null), c.Ji = null, a.activeTexture(a.TEXTURE0)), a.bindFramebuffer(a.FRAMEBUFFER, c.Zy), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, this.zf, 0)) : (a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, null, 0), a.bindFramebuffer(a.FRAMEBUFFER, null))
};
e.prototype.gy = function() {
var a = this.ba;
0 === this.Ve ? (a.clearColor(this.Cb[0], this.Cb[1], this.Cb[2], this.Cb[3]), a.clear(a.COLOR_BUFFER_BIT)) : (a.enable(a.SCISSOR_TEST), a.scissor(this.Cb[0], this.Cb[1], this.Cb[2], this.Cb[3]), a.clearColor(0, 0, 0, 0), a.clear(this.ba.COLOR_BUFFER_BIT), a.disable(a.SCISSOR_TEST))
};
e.prototype.iy = function() {
var a = this.ba,
c = this.fa,
g = c.Nc[1];
a.useProgram(g.fm); ! g.Ai && g.Vj && (a.uniformMatrix4fv(g.Vj, !1, c.Vp), g.Ai = !0);
a.enableVertexAttribArray(g.Pe);
a.bindBuffer(a.ARRAY_BUFFER, c.or);
a.vertexAttribPointer(g.Pe, 4, a.FLOAT, !1, 0, 0);
a.drawArrays(a.POINTS, this.Ve / 4, this.Jf);
g = c.Vk;
a.useProgram(g.fm);
0 <= g.Pe && (a.enableVertexAttribArray(g.Pe), a.bindBuffer(a.ARRAY_BUFFER, c.rm[c.mg]), a.vertexAttribPointer(g.Pe, 2, a.FLOAT, !1, 0, 0));
0 <= g.Bh && (a.enableVertexAttribArray(g.Bh), a.bindBuffer(a.ARRAY_BUFFER, c.im[c.mg]), a.vertexAttribPointer(g.Bh, 2, a.FLOAT, !1, 0, 0))
};
e.prototype.oy = function() {
var a = this.ba,
c = this.fa,
g = c.Nc[this.Ve];
c.pt = this.Ve;
c.Vk = g;
a.useProgram(g.fm); ! g.Ai && g.Vj && (a.uniformMatrix4fv(g.Vj, !1, c.Vp), g.Ai = !0);
g.Wj && a.uniform1f(g.Wj, c.ot);
0 <= g.Pe && (a.enableVertexAttribArray(g.Pe), a.bindBuffer(a.ARRAY_BUFFER, c.rm[c.mg]), a.vertexAttribPointer(g.Pe, 2, a.FLOAT, !1, 0, 0));
0 <= g.Bh && (a.enableVertexAttribArray(g.Bh), a.bindBuffer(a.ARRAY_BUFFER, c.im[c.mg]), a.vertexAttribPointer(g.Bh, 2, a.FLOAT, !1, 0, 0))
};
e.prototype.qy = function() {
var a, c, g = this.fa.Vk,
b = this.ba;
a = this.Cb;
g.Cl && this.fa.Ji !== this.zf && (b.activeTexture(b.TEXTURE1), b.bindTexture(b.TEXTURE_2D, this.zf), this.fa.Ji = this.zf, b.activeTexture(b.TEXTURE0));
g.Qq && b.uniform1f(g.Qq, a[0]);
g.Pq && b.uniform1f(g.Pq, a[1]);
g.Pi && b.uniform2f(g.Pi, a[2], a[3]);
g.Oi && b.uniform2f(g.Oi, a[4], a[5]);
g.Bl && b.uniform1f(g.Bl, a[6]);
g.Al && b.uniform1f(g.Al, a[7]);
g.Dl && b.uniform2f(g.Dl, a[8], a[9]);
g.Rq && b.uniform1f(g.Rq, db() / 1E3);
if (g.Ka.length) for (a = 0, c = g.Ka.length; a < c; a++) b.uniform1f(g.Ka[a][1], this.ov[a])
};
h.prototype.vf = function() {
this.jg === this.fh.length && this.fh.push(new e(0, this));
return this.fh[this.jg++]
};
h.prototype.ph = function() {
if (0 !== this.jg && !this.ba.isContextLost()) {
var a = this.ba;
0 < this.pr && (a.bindBuffer(a.ARRAY_BUFFER, this.or), a.bufferData(a.ARRAY_BUFFER, this.oA.subarray(0, this.pr), a.STREAM_DRAW), c && 0 <= c.Pe && "" === c.name && a.vertexAttribPointer(c.Pe, 4, a.FLOAT, !1, 0, 0));
if (0 < this.cg) {
var c = this.Vk;
a.bindBuffer(a.ARRAY_BUFFER, this.rm[this.mg]);
a.bufferData(a.ARRAY_BUFFER, this.as.subarray(0, this.cg), a.STREAM_DRAW);
c && 0 <= c.Pe && "" !== c.name && a.vertexAttribPointer(c.Pe, 2, a.FLOAT, !1, 0, 0);
a.bindBuffer(a.ARRAY_BUFFER, this.im[this.mg]);
a.bufferData(a.ARRAY_BUFFER, this.Rr.subarray(0, this.cg), a.STREAM_DRAW);
c && 0 <= c.Bh && "" !== c.name && a.vertexAttribPointer(c.Bh, 2, a.FLOAT, !1, 0, 0)
}
for (var g, a = 0,
c = this.jg; a < c; a++) switch (g = this.fh[a], g.type) {
case 1:
g.jy();
break;
case 2:
g.ry();
break;
case 3:
g.ny();
break;
case 4:
g.my();
break;
case 5:
g.uy();
break;
case 6:
g.ky();
break;
case 7:
g.gy();
break;
case 8:
g.iy();
break;
case 9:
g.oy();
break;
case 10:
g.qy();
break;
case 11:
g.ty()
}
this.pr = this.cg = this.jg = 0;
this.fe = !1;
this.mg++;
4 <= this.mg && (this.mg = 0)
}
};
h.prototype.Kh = function(a) {
if (a !== this.ju) {
var c = this.vf();
c.type = 3;
this.ju = c.Ku = a;
this.fe = !1
}
};
h.prototype.Qd = function(a) {
if (a !== this.yh) {
var c = this.vf();
c.type = 2;
this.yh = c.zf = a;
this.fe = !1
}
};
h.prototype.Jh = function(a, c) {
if (a !== this.ku || c !== this.hu) {
var g = this.vf();
g.type = 4;
g.Ve = a;
g.Jf = c;
this.ku = a;
this.hu = c;
this.fe = !1
}
};
h.prototype.gv = function() {
this.Jh(this.ba.ONE, this.ba.ONE_MINUS_SRC_ALPHA)
};
h.prototype.Do = function(a, c, g, b, l, e, n, m) {
15992 <= this.cg && this.ph();
var h = this.cg,
t = this.as,
z = this.Rr;
if (this.fe) this.fh[this.jg - 1].Jf += 6;
else {
var x = this.vf();
x.type = 1;
x.Ve = 3 * (h / 4);
x.Jf = 6;
this.fe = !0
}
t[h] = a;
z[h++] = 0;
t[h] = c;
z[h++] = 0;
t[h] = g;
z[h++] = 1;
t[h] = b;
z[h++] = 0;
t[h] = l;
z[h++] = 1;
t[h] = e;
z[h++] = 1;
t[h] = n;
z[h++] = 0;
t[h] = m;
z[h++] = 1;
this.cg = h
};
h.prototype.wf = function(a, c, g, b, l, e, n, m, h) {
15992 <= this.cg && this.ph();
var t = this.cg,
z = this.as,
x = this.Rr;
if (this.fe) this.fh[this.jg - 1].Jf += 6;
else {
var y = this.vf();
y.type = 1;
y.Ve = 3 * (t / 4);
y.Jf = 6;
this.fe = !0
}
var y = h.left,
H = h.top,
p = h.right;
h = h.bottom;
z[t] = a;
x[t++] = y;
z[t] = c;
x[t++] = H;
z[t] = g;
x[t++] = p;
z[t] = b;
x[t++] = H;
z[t] = l;
x[t++] = p;
z[t] = e;
x[t++] = h;
z[t] = n;
x[t++] = y;
z[t] = m;
x[t++] = h;
this.cg = t
};
h.prototype.Xf = function(a) {
if (this.rl !== a) {
if (!this.Nc[a]) {
if (0 === this.rl) return;
a = 0
}
var c = this.vf();
c.type = 9;
this.rl = c.Ve = a;
this.fe = !1
}
};
h.prototype.Vl = function(a) {
a = this.Nc[a];
return ! (!a.Pi && !a.Oi)
};
h.prototype.rr = function(a) {
a = this.Nc[a];
return !! (a.Pi || a.Oi || a.mt)
};
h.prototype.tA = function(a) {
a = this.Nc[a];
return 0 !== a.bq || 0 !== a.cq
};
h.prototype.kz = function(a) {
return this.Nc[a].bq
};
h.prototype.lz = function(a) {
return this.Nc[a].cq
};
h.prototype.mz = function(a, c) {
return this.Nc[a].Ka[c][2]
};
h.prototype.Bo = function(a) {
return this.Nc[a].$s
};
h.prototype.mk = function(a, c, g, b, l, e, n, m, h, t, z, x) {
var y = this.Nc[this.rl],
H,
p;
if (y.Fz || x.length) {
H = this.vf();
H.type = 10;
H.Cb ? sc(this.Qe, H.Cb) : H.Cb = rc();
p = H.Cb;
p[0] = c;
p[1] = g;
p[2] = b;
p[3] = l;
p[4] = e;
p[5] = n;
p[6] = m;
p[7] = h;
p[8] = t;
p[9] = z;
H.zf = y.Cl ? a: null;
if (x.length) for (g = H.ov, g.length = x.length, a = 0, c = x.length; a < c; a++) g[a] = x[a];
this.fe = !1
}
};
h.prototype.clear = function(a, c, g, b) {
var l = this.vf();
l.type = 7;
l.Ve = 0;
l.Cb || (l.Cb = rc());
l.Cb[0] = a;
l.Cb[1] = c;
l.Cb[2] = g;
l.Cb[3] = b;
this.fe = !1
};
h.prototype.clearRect = function(a, c, g, b) {
if (! (0 > g || 0 > b)) {
var l = this.vf();
l.type = 7;
l.Ve = 1;
l.Cb || (l.Cb = rc());
l.Cb[0] = a;
l.Cb[1] = c;
l.Cb[2] = g;
l.Cb[3] = b;
this.fe = !1
}
};
h.prototype.sA = function() {
this.ph();
this.ba.flush()
};
var m = [],
a = {};
h.prototype.Tj = function(d, c, g, b) {
c = !!c;
g = !!g;
var l = d.src + "," + c + "," + g + (c ? ",undefined": ""),
e = null;
if ("undefined" !== typeof d.src && a.hasOwnProperty(l)) return e = a[l],
e.cn++,
e;
this.ph();
var n = this.ba,
h = na(d.width) && na(d.height),
e = n.createTexture();
n.bindTexture(n.TEXTURE_2D, e);
n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);
var A = n.RGBA,
t = n.RGBA,
z = n.UNSIGNED_BYTE;
if (b && !this.Tn) switch (b) {
case 1:
t = A = n.RGB;
break;
case 2:
z = n.UNSIGNED_SHORT_4_4_4_4;
break;
case 3:
z = n.UNSIGNED_SHORT_5_5_5_1;
break;
case 4:
t = A = n.RGB,
z = n.UNSIGNED_SHORT_5_6_5
}
if (!h && c) {
b = document.createElement("canvas");
b.width = oa(d.width);
b.height = oa(d.height);
var x = b.getContext("2d");
x.webkitImageSmoothingEnabled = g;
x.mozImageSmoothingEnabled = g;
x.msImageSmoothingEnabled = g;
x.imageSmoothingEnabled = g;
x.drawImage(d, 0, 0, d.width, d.height, 0, 0, b.width, b.height);
n.texImage2D(n.TEXTURE_2D, 0, A, t, z, b)
} else n.texImage2D(n.TEXTURE_2D, 0, A, t, z, d);
c ? (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));
g ? (n.texParameteri(n.TEXTURE_2D, n.TEXTURE_MAG_FILTER, n.LINEAR), h && this.yt ? (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.yh = null;
e.Sk = d.width;
e.Rk = d.height;
e.cn = 1;
e.et = l;
m.push(e);
return a[l] = e
};
h.prototype.lg = function(a, c, g, b) {
this.ph();
var l = this.ba;
this.Tn && (b = !1);
var e = l.createTexture();
l.bindTexture(l.TEXTURE_2D, e);
l.texImage2D(l.TEXTURE_2D, 0, l.RGBA, a, c, 0, l.RGBA, b ? 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, g ? l.LINEAR: l.NEAREST);
l.texParameteri(l.TEXTURE_2D, l.TEXTURE_MIN_FILTER, g ? l.LINEAR: l.NEAREST);
l.bindTexture(l.TEXTURE_2D, null);
this.yh = null;
e.Sk = a;
e.Rk = c;
m.push(e);
return e
};
h.prototype.fB = function(a, c, g) {
this.ph();
var b = this.ba;
this.Tn && (g = !1);
b.bindTexture(b.TEXTURE_2D, c);
b.pixelStorei(b.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0);
b.texImage2D(b.TEXTURE_2D, 0, b.RGBA, b.RGBA, g ? b.UNSIGNED_SHORT_4_4_4_4: b.UNSIGNED_BYTE, a);
b.bindTexture(b.TEXTURE_2D, null);
this.yh = null
};
h.prototype.deleteTexture = function(d) {
d && ("undefined" !== typeof d.cn && 1 < d.cn ? d.cn--:(this.ph(), d === this.yh && (this.ba.bindTexture(this.ba.TEXTURE_2D, null), this.yh = null), d === this.Ji && (this.ba.activeTexture(this.ba.TEXTURE1), this.ba.bindTexture(this.ba.TEXTURE_2D, null), this.ba.activeTexture(this.ba.TEXTURE0), this.Ji = null), Fa(m, d), "undefined" !== typeof d.et && delete a[d.et], this.ba.deleteTexture(d)))
};
h.prototype.Uf = function(a) {
if (a !== this.cv) {
var c = this.vf();
c.type = 6;
this.cv = c.zf = a;
this.fe = !1
}
};
tb = h
})(); (function() {
function h(a) {
if (a && (a.getContext || a.dc) && !a.c2runtime) {
a.c2runtime = this;
var b = this;
this.Sn = /crosswalk/i.test(navigator.userAgent) || /xwalk/i.test(navigator.userAgent) || !("undefined" === typeof window.c2isCrosswalk || !window.c2isCrosswalk);
this.of = !this.Sn && "undefined" !== typeof window.device && ("undefined" !== typeof window.device.cordova || "undefined" !== typeof window.device.phonegap) || "undefined" !== typeof window.c2isphonegap && window.c2isphonegap;
this.ad = !!a.dc;
this.Mj = "undefined" !== typeof window.AppMobi || this.ad;
this.ue = !!window.c2cocoonjs;
this.Kf = !!window.c2ejecta;
this.ue && (CocoonJS.App.onSuspended.addEventListener(function() {
b.setSuspended(!0)
}), CocoonJS.App.onActivated.addEventListener(function() {
b.setSuspended(!1)
}));
this.Kf && (document.addEventListener("pagehide",
function() {
b.setSuspended(!0)
}), document.addEventListener("pageshow",
function() {
b.setSuspended(!1)
}), document.addEventListener("resize",
function() {
b.setSize(window.innerWidth, window.innerHeight)
}));
this.Zb = this.ad || this.ue || this.Kf;
this.du = /tizen/i.test(navigator.userAgent);
this.Rn = /android/i.test(navigator.userAgent) && !this.du;
this.Tn = /msie/i.test(navigator.userAgent) || /trident/i.test(navigator.userAgent);
this.Jq = /iphone/i.test(navigator.userAgent) || /ipod/i.test(navigator.userAgent);
this.fu = /ipad/i.test(navigator.userAgent);
this.Xn = this.Jq || this.fu || this.Kf;
this.Yz = this.Jq && /os\s6/i.test(navigator.userAgent);
this.jl = /chrome/i.test(navigator.userAgent) || /chromium/i.test(navigator.userAgent);
this.Nz = /amazonwebappplatform/i.test(navigator.userAgent);
this.au = /firefox/i.test(navigator.userAgent);
this.cu = !this.jl && /safari/i.test(navigator.userAgent);
this.Sz = /windows/i.test(navigator.userAgent);
this.xh = "undefined" !== typeof window.c2nodewebkit || /nodewebkit/i.test(navigator.userAgent);
this.Uz = !("undefined" === typeof window.c2isWindows8 || !window.c2isWindows8);
this.Vz = !("undefined" === typeof window.c2isWindows8Capable || !window.c2isWindows8Capable);
this.Fq = !("undefined" === typeof window.c2isWindowsPhone8 || !window.c2isWindowsPhone8);
this.Gq = !("undefined" === typeof window.c2isWindowsPhone81 || !window.c2isWindowsPhone81);
this.Eq = this.Uz || this.Vz || this.Gq;
this.Oz = !("undefined" === typeof window.c2isBlackberry10 || !window.c2isBlackberry10);
this.$t = this.Rn && !this.jl && !this.au && !this.Nz && !this.Zb;
this.devicePixelRatio = 1;
this.we = this.of || this.Sn || this.Mj || this.ue || this.Rn || this.Xn || this.Fq || this.Gq || this.Oz || this.du || this.Kf;
this.we || (this.we = /(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent));
"undefined" === typeof cr_is_preview || this.xh || "?nw" !== window.location.search && !/nodewebkit/i.test(navigator.userAgent) || (this.xh = !0);
this.Pz = "undefined" !== typeof cr_is_preview && -1 < window.location.search.indexOf("debug");
this.canvas = a;
this.ht = document.getElementById("c2canvasdiv");
this.Eb = this.fa = this.ba = null;
this.hq = "";
this.En = !1;
this.Du = this.Eu = 0;
this.canvas.oncontextmenu = function(a) {
a.preventDefault && a.preventDefault();
return ! 1
};
this.canvas.onselectstart = function(a) {
a.preventDefault && a.preventDefault();
return ! 1
};
this.ad && (window.c2runtime = this);
this.xh && (window.ondragover = function(a) {
a.preventDefault();
return ! 1
},
window.ondrop = function(a) {
a.preventDefault();
return ! 1
},
require("nw.gui").App.clearCache());
this.width = a.width;
this.height = a.height;
this.eb = this.width;
this.cb = this.height;
this.rn = this.width;
this.qn = this.height;
this.tl = window.innerWidth;
this.sl = window.innerHeight;
this.Ga = !0;
this.ll = !1;
Date.now || (Date.now = function() {
return + new Date
});
this.plugins = [];
this.types = {};
this.ea = [];
this.uc = [];
this.Sj = {};
this.rf = [];
this.aq = {};
this.qg = [];
this.zk = [];
this.$o = [];
this.Kx = [];
this.Lx = [];
this.sv = null;
this.Gf = new ha;
this.Bq = !1;
this.ve = 0;
this.Dq = !1;
this.Jd = [];
this.yg = this.Bd = this.io = this.Hr = "";
this.gm = this.rv = !1;
this.Qp = this.Fl = this.oh = this.Ra = 0;
this.cj = 1;
this.xe = new eb;
this.ao = 0;
this.su = !0;
this.ck = this.Gn = this.An = this.Xe = this.ul = this.rh = 0;
this.kg = null;
this.xn = [];
this.$p = [];
this.zn = -1;
this.Sq = [[]];
this.Vr = this.lo = 0;
this.Co(null);
this.Yj = [];
this.no = -1;
this.zu = this.Il = 0;
this.Mq = !0;
this.Zk = 0;
this.hm = [];
this.Xo = this.Eo = -1;
this.Ii = !0;
this.Ni = 0;
this.kl = !1;
this.SA = 0;
this.Dz = !1;
this.Lq = 0;
this.kc = this.Ij = this.tr = !1;
this.cr = new ha;
this.dr = new ha;
this.Fo = [];
this.yf = new gb([]);
this.Pr = new gb([]);
this.bh = [];
this.Hj = {};
this.zj = {};
this.wj = {};
this.yk = {};
this.ct = {};
this.nu = this.ho = this.ge = this.Ae = this.mu = this.fo = this.ra = null;
this.vk = this.Hq = !1;
this.iq = [null, null];
this.wi = 0;
this.dq = "";
this.Ch = {};
this.Qo = this.Uj = null;
this.load();
this.devicePixelRatio = (this.Gi = (!this.Zb || this.Kf) && this.cB && !this.$t) ? window.devicePixelRatio || window.webkitDevicePixelRatio || window.mozDevicePixelRatio || window.msDevicePixelRatio || 1 : 1;
this.hd();
var l, c = this.Gp && !(this.xh || this.Eq || this.Fq || this.Sn);
0 < this.Ld && this.setSize(window.innerWidth, window.innerHeight, !0);
try {
this.zy && (this.ue || this.Kf || !this.Zb) && (l = {
alpha: c,
depth: !1,
antialias: !1,
failIfMajorPerformanceCaveat: !0
},
this.ba = a.getContext("webgl", l) || a.getContext("experimental-webgl", l))
} catch(g) {}
if (this.ba) {
this.Zb || (this.cd = document.createElement("canvas"), jQuery(this.cd).appendTo(this.canvas.parentNode), this.cd.oncontextmenu = k(!1), this.cd.onselectstart = k(!1), this.cd.width = this.rn, this.cd.height = this.qn, jQuery(this.cd).css({
width: this.rn + "px",
height: this.qn + "px"
}), this.Wu(), this.mr = this.cd.getContext("2d"));
this.fa = new tb(this.ba, this.we);
this.fa.Lh(a.width, a.height);
this.fa.yt = 0 !== this.vy;
this.Eb = null;
this.canvas.addEventListener("webglcontextlost",
function(a) {
a.preventDefault();
b.fA();
console.log("[Construct 2] WebGL context lost");
window.cr_setSuspended(!0)
},
!1);
this.canvas.addEventListener("webglcontextrestored",
function() {
b.fa.Vt();
b.fa.Lh(b.fa.width, b.fa.height, !0);
b.Ae = null;
b.ge = null;
b.iq[0] = null;
b.iq[1] = null;
b.gA();
b.Ga = !0;
console.log("[Construct 2] WebGL context restored");
window.cr_setSuspended(!1)
},
!1);
var d, e, n, m, h, q;
a = 0;
for (l = this.ea.length; a < l; a++) for (e = this.ea[a], c = 0, d = e.Sa.length; c < d; c++) m = e.Sa[c],
m.dd = this.fa.sq(m.id),
this.vk = this.vk || this.fa.Vl(m.dd);
a = 0;
for (l = this.rf.length; a < l; a++) {
h = this.rf[a];
c = 0;
for (d = h.Sa.length; c < d; c++) m = h.Sa[c],
m.dd = this.fa.sq(m.id);
c = 0;
for (d = h.Wa.length; c < d; c++) for (q = h.Wa[c], e = 0, n = q.Sa.length; e < n; e++) m = q.Sa[e],
m.dd = this.fa.sq(m.id),
this.vk = this.vk || this.fa.Vl(m.dd)
}
} else {
if (0 < this.Ld && this.ad) {
this.canvas = null;
document.oncontextmenu = k(!1);
document.onselectstart = k(!1);
this.Eb = AppMobi.canvas.getContext("2d");
try {
this.Eb.samplingMode = this.qb ? "smooth": "sharp",
this.Eb.globalScale = 1,
this.Eb.HTML5CompatibilityMode = !0,
this.Eb.imageSmoothingEnabled = this.qb
} catch(D) {}
0 !== this.width && 0 !== this.height && (this.Eb.width = this.width, this.Eb.height = this.height)
}
this.Eb || (l = this.ue ? {
antialias: !!this.qb,
alpha: c
}: {
alpha: c
},
this.Eb = a.getContext("2d", l), this.Eb.webkitImageSmoothingEnabled = this.qb, this.Eb.mozImageSmoothingEnabled = this.qb, this.Eb.msImageSmoothingEnabled = this.qb, this.Eb.imageSmoothingEnabled = this.qb);
this.mr = this.cd = null
}
this.Wo = function() {
b.Fb(!1)
};
window == window.top || this.Zb || this.Eq || this.Fq || (document.addEventListener("mousedown",
function() {
window.focus()
},
!0), document.addEventListener("touchstart",
function() {
window.focus()
},
!0));
"undefined" !== typeof cr_is_preview && (this.ue && console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"), -1 < window.location.search.indexOf("continuous") && (ia("Reloading for continuous preview"), this.io = "__c2_continuouspreview", this.gm = !0), this.nA && !this.we && (jQuery(window).focus(function() {
b.setSuspended(!1)
}), jQuery(window).blur(function() {
b.setSuspended(!0)
})));
0 === this.Ld && this.Gi && 1 < this.devicePixelRatio && this.setSize(this.Bc, this.Ac, !0);
this.Bv();
this.go();
this.Jb = {}
}
}
function p(a) {
a.target.result.createObjectStore("saves", {
keyPath: "slot"
})
}
function e(a, b, l, c) {
var g = indexedDB.open("_C2SaveStates");
g.onupgradeneeded = p;
g.onerror = c;
g.onsuccess = function(g) {
g = g.target.result;
g.onerror = c;
g.transaction(["saves"], "readwrite").objectStore("saves").put({
slot: a,
data: b
}).onsuccess = l
}
}
function m(a, b, l) {
var c = indexedDB.open("_C2SaveStates");
c.onupgradeneeded = p;
c.onerror = l;
c.onsuccess = function(c) {
c = c.target.result;
c.onerror = l;
var g = c.transaction(["saves"]).objectStore("saves").get(a);
g.onsuccess = function() {
g.result ? b(g.result.data) : b(null)
}
}
}
function a() {
ia("Reloading for continuous preview");
window.c2cocoonjs ? CocoonJS.App.reload() : -1 < window.location.search.indexOf("continuous") ? window.location.reload(!0) : window.location += "?continuous"
}
function d(a) {
var b, l = {};
for (b in a) ! a.hasOwnProperty(b) || a[b] instanceof ha || a[b] && "undefined" !== typeof a[b].iC || (l[b] = a[b]);
return l
}
h.prototype.setSize = function(a, b, l) {
var c = 0,
g = 0,
d = 0,
e = 0,
e = 0,
n = this.Yz && this.cu && !navigator.standalone && !this.Zb && !this.of;
n && (b += 60);
if (this.tl !== a || this.sl !== b || l) {
this.tl = a;
this.sl = b;
var m = this.Ld,
h = (document.mozFullScreen || document.webkitIsFullScreen || !!document.msFullscreenElement || document.fullScreen || this.kl) && !this.of;
if (h || 0 !== this.Ld || l) h && 0 < this.wi && (m = this.wi),
4 <= m ? (l = this.Bc / this.Ac, a / b > l ? (d = b * l, 5 === m ? (e = d / this.Bc, 1 < e ? e = Math.floor(e) : 1 > e && (e = 1 / Math.ceil(1 / e)), d = this.Bc * e, e *= this.Ac, c = (a - d) / 2, g = (b - e) / 2, a = d, b = e) : (c = (a - d) / 2, a = d)) : (e = a / l, 5 === m ? (e /= this.Ac, 1 < e ? e = Math.floor(e) : 1 > e && (e = 1 / Math.ceil(1 / e)), d = this.Bc * e, e *= this.Ac, c = (a - d) / 2, g = (b - e) / 2, a = d) : g = (b - e) / 2, b = e), h && !this.xh && (g = c = 0), c = Math.floor(c), g = Math.floor(g), a = Math.floor(a), b = Math.floor(b)) : this.xh && this.kl && 0 === this.Ft && (c = Math.floor((a - this.Bc) / 2), g = Math.floor((b - this.Ac) / 2), a = this.Bc, b = this.Ac),
2 > m && (this.Pk = this.devicePixelRatio),
this.Gi && this.fu && 1 < this.devicePixelRatio && (1024 <= a && (a = 1023), 1024 <= b && (b = 1023)),
h = this.devicePixelRatio,
this.rn = a,
this.qn = b,
this.width = Math.round(a * h),
this.height = Math.round(b * h),
this.Ga = !0,
this.Pv ? (this.eb = this.width, this.cb = this.height, this.Ne = !0) : this.width < this.Bc && this.height < this.Ac || 1 === m ? (this.eb = this.width, this.cb = this.height, this.Ne = !0) : (this.eb = this.Bc, this.cb = this.Ac, this.Ne = !1, 2 === m ? (l = this.Bc / this.Ac, m = this.tl / this.sl, m < l ? this.eb = this.cb * m: m > l && (this.cb = this.eb / m)) : 3 === m && (l = this.Bc / this.Ac, m = this.tl / this.sl, m > l ? this.eb = this.cb * m: m < l && (this.cb = this.eb / m))),
this.ht && !this.Zb && (jQuery(this.ht).css({
width: a + "px",
height: b + "px",
"margin-left": c,
"margin-top": g
}), "undefined" !== typeof cr_is_preview && jQuery("#borderwrap").css({
width: a + "px",
height: b + "px"
})),
this.canvas && (this.canvas.width = Math.round(a * h), this.canvas.height = Math.round(b * h), this.Kf ? (this.canvas.style.left = c + "px", this.canvas.style.top = g + "px", this.canvas.style.width = a + "px", this.canvas.style.height = b + "px") : this.Gi && !this.Zb && jQuery(this.canvas).css({
width: a + "px",
height: b + "px"
})),
this.cd && (this.cd.width = a, this.cd.height = b, jQuery(this.cd).css({
width: a + "px",
height: b + "px"
})),
this.fa && this.fa.Lh(Math.round(a * h), Math.round(b * h)),
this.ad && this.Eb && (this.Eb.width = a, this.Eb.height = b),
this.Eb && (this.Eb.webkitImageSmoothingEnabled = this.qb, this.Eb.mozImageSmoothingEnabled = this.qb, this.Eb.msImageSmoothingEnabled = this.qb, this.Eb.imageSmoothingEnabled = this.qb),
this.Bv(),
this.Zb || !n && !this.Jq || window.setTimeout(function() {
window.scrollTo(0, 1)
},
100)
}
};
h.prototype.Bv = function() {
if (this.Mx && 0 !== this.kr) {
var a = "portrait";
2 === this.kr && (a = "landscape");
screen.lockOrientation ? screen.lockOrientation(a) : screen.webkitLockOrientation ? screen.webkitLockOrientation(a) : screen.mozLockOrientation ? screen.mozLockOrientation(a) : screen.msLockOrientation && screen.msLockOrientation(a)
}
};
h.prototype.fA = function() {
this.Hq = !0;
var a, b, l;
a = 0;
for (b = this.ea.length; a < b; a++) l = this.ea[a],
l.Ml && l.Ml()
};
h.prototype.gA = function() {
this.Hq = !1;
var a, b, l;
a = 0;
for (b = this.ea.length; a < b; a++) l = this.ea[a],
l.ro && l.ro()
};
h.prototype.Wu = function() {
if (!this.Zb) {
var a = (document.mozFullScreen || document.webkitIsFullScreen || document.fullScreen || document.msFullscreenElement || this.kl) && !this.of ? jQuery(this.canvas).offset() : jQuery(this.canvas).position();
a.position = "absolute";
jQuery(this.cd).css(a)
}
};
var c = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame;
h.prototype.setSuspended = function(a) {
var b;
if (a && !this.ll) for (ia("[Construct 2] Suspending"), this.ll = !0, -1 !== this.Eo && c && c(this.Eo), -1 !== this.Xo && clearTimeout(this.Xo), a = 0, b = this.hm.length; a < b; a++) this.hm[a](!0);
else if (!a && this.ll) {
ia("[Construct 2] Resuming");
this.ll = !1;
this.ao = db();
this.ul = db();
a = this.Fl = this.Gn = 0;
for (b = this.hm.length; a < b; a++) this.hm[a](!1);
this.Fb(!1)
}
};
h.prototype.Ws = function(a) {
this.hm.push(a)
};
h.prototype.load = function() {
var a = wc();
this.name = a[0];
this.Et = a[1];
this.Ld = a[11];
this.Ft = a[11];
this.Bc = a[9];
this.Ac = a[10];
this.Ru = this.Bc / 2;
this.Su = this.Ac / 2;
this.Zb && !this.Kf && (4 <= a[11] || 0 === a[11]) && (ia("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"), this.Ft = this.Ld = 3);
this.Zr = a[17];
this.zl = a[18];
0 === this.zl && (this.Uj = new Image, this.Uj.src = "loading-logo.png");
this.Il = a[20];
this.Yf = new r(this);
var b, l, c, g, d, e, n, m, h;
b = 0;
for (l = a[2].length; b < l; b++) n = a[2][b],
ub(n),
h = new n[0](this),
h.Po = n[1],
h.Lf = n[2],
h.wu = n[9],
h.U && h.U(),
this.plugins.push(h);
a = wc();
b = 0;
for (l = a[3].length; b < l; b++) {
n = a[3][b];
d = n[1];
h = null;
c = 0;
for (g = this.plugins.length; c < g; c++) if (this.plugins[c] instanceof d) {
h = this.plugins[c];
break
}
var q = new h.ga(h);
q.name = n[0];
q.za = n[2];
q.Aq = n[3].slice(0);
q.eB = n[3].length;
q.Nx = n[4];
q.bz = n[5];
q.jb = n[11];
q.za ? (q.Si = [], q.rg = this.Zk++, q.Ub = null) : (q.Si = null, q.rg = -1, q.Ub = []);
q.Cn = null;
q.Cj = null;
q.At = null;
q.nd = !1;
q.$d = null;
n[6] ? (q.To = n[6][0], q.Sr = n[6][1], q.jm = n[6][2]) : (q.To = null, q.Sr = 0, q.jm = 0);
q.Zd = n[7] ? n[7] : null;
q.index = b;
q.A = [];
q.vn = [];
q.Th = [new vb(q)];
q.ng = 0;
q.Le = null;
q.ey = 0;
q.qk = !0;
q.dp = wb;
q.qq = xb;
q.jz = yb;
q.Ea = zb;
q.Xl = Ab;
q.Eh = Bb;
q.tf = Cb;
q.In = Eb;
q.lq = Fb;
q.pq = Gb;
q.pe = Hb;
q.Lt = Ib;
q.Tk = new kb(this.Bc, this.Ac);
q.Xm = !0;
q.Ym = !1;
q.Jb = {};
q.toString = Jb;
q.uc = [];
c = 0;
for (g = n[8].length; c < g; c++) {
m = n[8][c];
var D = m[1],
A = null;
d = 0;
for (e = this.uc.length; d < e; d++) if (this.uc[d] instanceof D) {
A = this.uc[d];
break
}
A || (A = new D(this), A.$q = [], A.Zq = new ha, A.U && A.U(), this.uc.push(A), oc.RA && A instanceof oc.RA && (this.sv = A)); - 1 === A.$q.indexOf(q) && A.$q.push(q);
d = new A.ga(A, q);
d.name = m[0];
d.jb = m[2];
d.U();
q.uc.push(d)
}
q.global = n[9];
q.Cq = n[10];
q.Sa = [];
c = 0;
for (g = n[12].length; c < g; c++) q.Sa.push({
id: n[12][c][0],
name: n[12][c][1],
dd: -1,
$: !0,
index: c
});
q.zC = n[13];
this.Zr && !q.za && !q.Cq && h.Lf || q.U();
q.name && (this.types[q.name] = q);
this.ea.push(q);
h.Po && (c = new h.X(q), c.uid = this.Il++, c.Zu = this.zu++, c.Bi = 0, c.el = Kb, c.toString = Lb, c.L = n[14], c.U(), q.A.push(c), this.Ch[c.uid.toString()] = c)
}
b = 0;
for (l = a[4].length; b < l; b++) for (d = a[4][b], e = this.ea[d[0]], c = 1, g = d.length; c < g; c++) n = this.ea[d[c]],
n.Ub.push(e),
e.Si.push(n);
b = 0;
for (l = a[24].length; b < l; b++) {
d = a[24][b];
e = [];
c = 0;
for (g = d.length; c < g; c++) e.push(this.ea[d[c]]);
c = 0;
for (g = e.length; c < g; c++) e[c].nd = !0,
e[c].$d = e
}
if (0 < this.Zk) for (b = 0, l = this.ea.length; b < l; b++) if (n = this.ea[b], !n.za && n.Ub.length) {
n.Cn = Array(this.Zk);
n.Cj = Array(this.Zk);
n.At = Array(this.Zk);
q = [];
c = A = D = m = 0;
for (g = n.Ub.length; c < g; c++) for (h = n.Ub[c], n.Cn[h.rg] = m, m += h.eB, n.Cj[h.rg] = D, D += h.Nx, n.At[h.rg] = A, A += h.bz, d = 0, e = h.Sa.length; d < e; d++) q.push(Ba({},
h.Sa[d]));
n.Sa = q.concat(n.Sa);
c = 0;
for (g = n.Sa.length; c < g; c++) n.Sa[c].index = c
}
b = 0;
for (l = a[5].length; b < l; b++) n = a[5][b],
c = new Mb(this, n),
this.Sj[c.name] = c,
this.rf.push(c);
b = 0;
for (l = a[6].length; b < l; b++) n = a[6][b],
c = new Nb(this, n),
this.aq[c.name] = c,
this.qg.push(c);
b = 0;
for (l = this.qg.length; b < l; b++) this.qg[b].nc();
b = 0;
for (l = this.qg.length; b < l; b++) this.qg[b].Yr();
b = 0;
for (l = this.$o.length; b < l; b++) this.$o[b].nc();
this.$o.length = 0;
this.dq = a[7];
this.Se = a[8];
this.Pk = 1;
this.zy = a[12];
this.qb = a[13];
this.Gp = a[14];
this.cB = a[16];
this.kr = a[19];
this.Mx = 0 < this.kr;
this.nA = a[21];
this.Ne = this.Pv = a[22];
this.vy = a[23];
this.Ro = Date.now()
};
var g = !1;
h.prototype.cs = function(a) {
a.onerror = function(b) {
g = a.Qx = !0;
console && console.error && console.error("Error loading image '" + a.src + "': ", b)
};
this.zk.push(a)
};
h.prototype.$y = function(a) {
var b, c;
b = 0;
for (c = this.zk.length; b < c; b++) if (this.zk[b].$x === a) return this.zk[b];
return null
};
h.prototype.bt = function() {
var a = 0,
b = 0,
c = !0,
l, g, d;
l = 0;
for (g = this.zk.length; l < g; l++) {
d = this.zk[l];
var e = d.kt;
if (!e || 0 >= e) e = 5E4;
a += e; ! d.complete && !d.loaded || d.Qx ? c = !1 : b += e
}
this.Dd = 0 == a ? 0 : b / a;
return c
};
h.prototype.go = function() {
if (this.Eb || this.fa) {
var a = this.Eb || this.mr;
this.cd && this.Wu();
this.Dd = 0;
this.lu = -1;
if (this.bt()) this.Bz();
else {
var b = Date.now() - this.Ro;
if (a) {
var c = this.width,
l = this.height,
d = this.devicePixelRatio;
this.cd && (c = this.rn, l = this.qn, d = 1);
if (3 !== this.zl && (this.ue || 500 <= b && this.lu != this.Dd)) {
a.clearRect(0, 0, c, l);
var b = c / 2,
l = l / 2,
c = 0 === this.zl && this.Uj.complete,
e = 40 * d,
n = 0,
q = 80 * d,
m;
c && (q = this.Uj.width * d, m = this.Uj.height * d, e = q / 2, n = m / 2, a.drawImage(this.Uj, wa(b - e), wa(l - n), q, m));
1 >= this.zl ? (b = wa(b - e) + 0.5, l = wa(l + (n + (c ? 12 * d: 0))) + 0.5, a.fillStyle = g ? "red": "DodgerBlue", a.fillRect(b, l, Math.floor(q * this.Dd), 6 * d), a.strokeStyle = "black", a.strokeRect(b, l, q, 6 * d), a.strokeStyle = "white", a.strokeRect(b - 1 * d, l - 1 * d, q + 2 * d, 8 * d)) : 2 === this.zl && (a.font = this.Kf ? "12pt ArialMT": "12pt Arial", a.fillStyle = g ? "#f00": "#999", a.yC = "middle", d = Math.round(100 * this.Dd) + "%", c = a.measureText ? a.measureText(d) : null, a.fillText(d, b - (c ? c.width: 0) / 2, l))
}
this.lu = this.Dd
}
setTimeout(function(a) {
return function() {
a.go()
}
} (this), this.ue ? 10 : 100)
}
}
};
h.prototype.Bz = function() {
this.cd && (this.canvas.parentNode.removeChild(this.cd), this.cd = this.mr = null);
this.Ro = Date.now();
this.ul = db();
var a, b, c;
if (this.Zr) for (a = 0, b = this.ea.length; a < b; a++) c = this.ea[a],
c.za || c.Cq || !c.wa.Lf || c.U();
else this.Ii = !1;
a = 0;
for (b = this.rf.length; a < b; a++) this.rf[a].ay();
2 <= this.Ld && (a = this.Bc / this.Ac, b = this.width / this.height, this.Pk = 2 !== this.Ld && b > a || 2 === this.Ld && b < a ? this.height / this.Ac: this.width / this.Bc);
this.Et ? this.Sj[this.Et].Nr() : this.rf[0].Nr();
this.Zr || (this.Ni = 1, this.trigger(r.prototype.k.np, null));
navigator.splashscreen && navigator.splashscreen.hide && navigator.splashscreen.hide();
a = 0;
for (b = this.ea.length; a < b; a++) c = this.ea[a],
c.eA && c.eA();
this.Fb(!1);
this.ad && AppMobi.webview.execute("onGameReady();")
};
var b = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame;
h.prototype.Fb = function(a) {
if (this.ra) {
var c = db();
if (this.Dz && this.tr && 29 > c - this.Lq) this.tr = !1,
this.Lq = c,
b ? this.Eo = b(this.Wo, this.canvas) : this.Xo = setTimeout(this.Wo, this.we ? 1 : 16);
else {
this.tr = !0;
this.Lq = c;
var l = this.Ld,
d = (document.mozFullScreen || document.webkitIsFullScreen || document.fullScreen || !!document.msFullscreenElement) && !this.of; (d || this.kl) && 0 < this.wi && (l = this.wi);
if (0 < l && (!this.Xn || window.self !== window.top)) {
var l = window.innerWidth,
g = window.innerHeight;
this.tl === l && this.sl === g || this.setSize(l, g)
}
this.Zb || (d ? (this.En || (this.hq = jQuery(this.canvas).css("margin") || "0", this.En = !0), this.jl || this.xh || 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.En ? (this.jl || this.xh || jQuery(this.canvas).css("margin", this.hq), this.hq = "", this.En = !1, 0 === this.Ld && this.setSize(Math.round(this.Eu / this.devicePixelRatio), Math.round(this.Du / this.devicePixelRatio), !0)) : (this.Eu = this.width, this.Du = this.height));
this.Ii && (d = this.bt(), this.Ni = this.Dd, d && (this.Ii = !1, this.Dd = 1, this.trigger(r.prototype.k.np, null)));
this.aA(); ! this.Ga && !this.ue || this.Hq || this.gm || a || (this.Ga = !1, this.fa ? this.wd() : this.de(), this.Qo && (this.canvas && this.canvas.toDataURL && (this.canvas.toDataURL(this.Qo[0], this.Qo[1]), this.trigger(r.prototype.k.vw, null)), this.Qo = null));
this.sC || (this.Xe++, this.An++, this.Gn++);
this.Fl += db() - c;
this.ll || a || (b ? this.Eo = b(this.Wo, this.canvas) : this.Xo = setTimeout(this.Wo, this.we ? 1 : 16))
}
}
};
h.prototype.aA = function() {
var a, b, c, l, d, g, e, n, q;
a = db();
1E3 <= a - this.ul && (this.ul += 1E3, this.rh = this.Gn, this.Gn = 0, this.Qp = this.Fl, this.Fl = 0);
this.su && (0 !== this.ao && (b = a - this.ao, 0 !== b || this.Pz ? (this.oh = b / 1E3, 0.5 < this.oh ? this.oh = 0 : 0.1 < this.oh && (this.oh = 0.1)) : (10 <= this.BC && (this.su = !1), this.oh = 1 / 60)), this.ao = a);
this.Ra = this.oh * this.cj;
this.xe.add(this.Ra);
a = (document.mozFullScreen || document.webkitIsFullScreen || document.fullScreen || !!document.msFullscreenElement || this.kl) && !this.of;
2 <= this.Ld || a && 0 < this.wi ? (b = this.Bc / this.Ac, c = this.width / this.height, l = this.Ld, a && 0 < this.wi && (l = this.wi), this.Pk = 2 !== l && c > b || 2 === l && c < b ? this.height / this.Ac: this.width / this.Bc, this.ra && (this.ra.Lo(this.ra.scrollX), this.ra.$l(this.ra.scrollY))) : this.Pk = this.Gi ? this.devicePixelRatio: 1;
this.hd();
this.ve++;
this.Yf.FA();
this.ve--;
this.hd();
this.ve++;
a = 0;
for (b = this.ea.length; a < b; a++) if (e = this.ea[a], !e.za && (e.uc.length || e.Ub.length)) for (c = 0, l = e.A.length; c < l; c++) for (n = e.A[c], d = 0, g = n.$a.length; d < g; d++) n.$a[d].Fb();
a = 0;
for (b = this.ea.length; a < b; a++) if (e = this.ea[a], !e.za && (e.uc.length || e.Ub.length)) for (c = 0, l = e.A.length; c < l; c++) for (n = e.A[c], d = 0, g = n.$a.length; d < g; d++) q = n.$a[d],
q.rA && q.rA();
c = this.cr.wk();
a = 0;
for (b = c.length; a < b; a++) c[a].Fb();
this.ve--;
this.Ez();
for (a = 0; this.kg && 10 > a++;) this.xt(this.kg);
a = 0;
for (b = this.qg.length; a < b; a++) this.qg[a].xq = !1;
this.ra.si && this.ra.si.Ec();
this.Fo.length = 0;
this.Mq = !1;
this.ve++;
a = 0;
for (b = this.ea.length; a < b; a++) if (e = this.ea[a], !e.za && (e.uc.length || e.Ub.length)) for (c = 0, l = e.A.length; c < l; c++) for (n = e.A[c], d = 0, g = n.$a.length; d < g; d++) q = n.$a[d],
q.rk && q.rk();
c = this.dr.wk();
a = 0;
for (b = c.length; a < b; a++) c[a].rk();
this.ve--
};
h.prototype.xt = function(a) {
var b = this.ra;
this.ra.TA();
var c, l, d, g, e, n, q;
if (this.fa) for (c = 0, l = this.ea.length; c < l; c++) e = this.ea[c],
e.za || !e.cp || e.global && 0 !== e.A.length || -1 !== a.hl.indexOf(e) || e.cp();
b == a && (this.Yf.Td.length = 0);
a.Nr();
c = 0;
for (l = this.ea.length; c < l; c++) if (e = this.ea[c], e.global || e.wa.Po) for (a = 0, b = e.A.length; a < b; a++) if (n = e.A[a], n.po && n.po(), n.$a) for (d = 0, g = n.$a.length; d < g; d++) q = n.$a[d],
q.po && q.po();
this.Mq = this.Ga = !0;
this.hd()
};
h.prototype.Xh = function(a) {
this.cr.add(a)
};
h.prototype.VA = function(a) {
this.dr.add(a)
};
h.prototype.mf = function(a) {
return a && -1 !== a.Ui ? this.oh * a.Ui: this.Ra
};
h.prototype.de = function() {
this.ra.de(this.Eb);
this.ad && this.Eb.present()
};
h.prototype.wd = function() {
this.ra.wd(this.fa);
this.fa.sA()
};
h.prototype.Fp = function(a) {
a && this.xn.push(a)
};
h.prototype.AA = function(a) {
Fa(this.xn, a)
};
h.prototype.uh = function(a) {
a = a.toString();
return this.Ch.hasOwnProperty(a) ? this.Ch[a] : null
};
h.prototype.Af = function(a) {
var b, c;
if (!this.Gf.contains(a)) {
this.Gf.add(a);
if (a.nd) for (b = 0, c = a.siblings.length; b < c; b++) this.Af(a.siblings[b]);
this.Bq && this.Gf.xk.push(a);
this.ve++;
this.trigger(Object.getPrototypeOf(a.type.wa).k.ss, a);
this.ve--
}
};
h.prototype.hd = function() {
var a, b, c, l, d, g, e, n, q, m;
this.Bq = !0;
l = 0;
for (g = this.Jd.length; l < g; l++) for (a = this.Jd[l], b = a.type, b.A.push(a), d = 0, e = b.Ub.length; d < e; d++) b.Ub[d].A.push(a),
b.Ub[d].qk = !0;
this.Jd.length = 0;
g = this.Gf.wk();
for (l = 0; l < g.length; l++) {
a = g[l];
b = a.type;
c = b.A;
d = 0;
for (e = this.xn.length; d < e; d++) this.xn[d](a);
Fa(c, a);
0 === c.length && (b.Ym = !1);
a.kh && b.Tk.update(a, a.kh, null);
a.F && (Ca(a.F.A, a.te()), a.F.Ud = !0);
d = 0;
for (e = b.Ub.length; d < e; d++) Fa(b.Ub[d].A, a),
b.Ub[d].qk = !0;
if (a.$a) for (d = 0, e = a.$a.length; d < e; d++) c = a.$a[d],
c.sf && c.sf(),
c.tb.Zq.remove(a);
this.cr.remove(a);
this.dr.remove(a);
d = 0;
for (e = this.Yf.Td.length; d < e; d++) if (q = this.Yf.Td[d], q.Fd.hasOwnProperty(b.index) && Fa(q.Fd[b.index].wg, a), !b.za) for (c = 0, n = b.Ub.length; c < n; c++) m = b.Ub[c],
q.Fd.hasOwnProperty(m.index) && Fa(q.Fd[m.index].wg, a);
a.sf && a.sf();
this.Ch.hasOwnProperty(a.uid.toString()) && delete this.Ch[a.uid.toString()];
this.ck--;
64 > b.vn.length && b.vn.push(a);
b.qk = !0
}
this.Gf.nf() || (this.Ga = !0);
this.Gf.clear();
this.Bq = !1
};
h.prototype.Rp = function(a, b, c, l) {
if (a.za) {
var d = wa(Math.random() * a.Si.length);
return this.Rp(a.Si[d], b, c, l)
}
return a.Le ? this.mh(a.Le, b, !1, c, l, !1) : null
};
var l = [];
h.prototype.mh = function(a, b, c, d, g, e) {
var n, q, m, h;
if (!a) return null;
var D = this.ea[a[1]],
A = D.wa.Lf;
if (this.Ii && A && !D.Cq || A && !this.fa && 11 === a[0][11]) return null;
var p = b;
A || (b = null);
var w;
D.vn.length ? (w = D.vn.pop(), w.Ed = !0, D.wa.X.call(w, D)) : (w = new D.wa.X(D), w.Ed = !1);
w.uid = c && !e ? a[2] : this.Il++;
this.Ch[w.uid.toString()] = w;
w.Zu = this.zu++;
w.Bi = D.A.length;
n = 0;
for (q = this.Jd.length; n < q; ++n) this.Jd[n].type === D && w.Bi++;
w.el = Kb;
m = a[3];
if (w.Ed) bb(w.Jb);
else {
w.Jb = {};
if ("undefined" !== typeof cr_is_preview) for (w.Yt = [], w.Yt.length = m.length, n = 0, q = m.length; n < q; n++) w.Yt[n] = m[n][1];
w.jc = [];
w.jc.length = m.length
}
n = 0;
for (q = m.length; n < q; n++) w.jc[n] = m[n][0];
if (A) {
var u = a[0];
w.x = ja(d) ? u[0] : d;
w.y = ja(g) ? u[1] : g;
w.z = u[2];
w.width = u[3];
w.height = u[4];
w.depth = u[5];
w.B = u[6];
w.opacity = u[7];
w.yd = u[8];
w.zd = u[9];
w.Id = u[10];
n = u[11]; ! this.fa && D.Sa.length && (w.Id = n);
w.Uk = lb(w.Id);
this.ba && mb(w, w.Id, this.ba);
if (w.Ed) {
n = 0;
for (q = u[12].length; n < q; n++) for (m = 0, h = u[12][n].length; m < h; m++) w.cc[n][m] = u[12][n][m];
w.Bb.set(0, 0, 0, 0);
w.kh.set(0, 0, -1, -1);
w.kd.dm(w.Bb);
w.Kp.length = 0
} else {
w.cc = u[12].slice(0);
n = 0;
for (q = w.cc.length; n < q; n++) w.cc[n] = u[12][n].slice(0);
w.wb = [];
w.ah = [];
w.ah.length = D.Sa.length;
w.Bb = new za(0, 0, 0, 0);
w.kh = new za(0, 0, -1, -1);
w.kd = new Aa;
w.Kp = [];
w.Ta = Ob;
w.hC = Pb;
w.ae = Qb;
w.Rb = Rb;
w.Lv = Sb;
w.te = Tb
}
w.km = !1;
w.YA = 0;
w.XA = 0;
w.WA = null;
14 === u.length && (w.km = !0, w.YA = u[13][0], w.XA = u[13][1], w.WA = u[13][2]);
n = 0;
for (q = D.Sa.length; n < q; n++) w.ah[n] = !0;
w.Mg = Xb;
w.Mg();
w.Mv = !!w.wb.length;
w.Jp = !0;
w.Np = !0;
D.Xm = !0;
w.visible = !0;
w.Ui = -1;
w.F = b;
w.hj = b.A.length;
"undefined" === typeof w.zb && (w.zb = null);
this.Ga = w.Je = !0
}
w.toString = Lb;
var M;
n = l.length = 0;
for (q = D.Ub.length; n < q; n++) l.push.apply(l, D.Ub[n].uc);
l.push.apply(l, D.uc);
if (w.Ed) for (n = 0, q = l.length; n < q; n++) {
var da = l[n];
M = w.$a[n];
M.Ed = !0;
da.tb.X.call(M, da, w);
u = a[4][n];
m = 0;
for (h = u.length; m < h; m++) M.L[m] = u[m];
M.U();
da.tb.Zq.add(w)
} else for (w.$a = [], n = 0, q = l.length; n < q; n++) da = l[n],
M = new da.tb.X(da, w),
M.Ed = !1,
M.L = a[4][n].slice(0),
M.U(),
w.$a.push(M),
da.tb.Zq.add(w);
u = a[5];
if (w.Ed) for (n = 0, q = u.length; n < q; n++) w.L[n] = u[n];
else w.L = u.slice(0);
this.Jd.push(w);
b && (b.A.push(w), 1 !== b.Od || 1 !== b.Pd) && (D.Ym = !0);
this.ck++;
if (D.nd) {
if (w.nd = !0, w.Ed ? w.siblings.length = 0 : w.siblings = [], !c && !e) {
n = 0;
for (q = D.$d.length; n < q; n++) if (D.$d[n] !== D) {
if (!D.$d[n].Le) return null;
w.siblings.push(this.mh(D.$d[n].Le, p, !1, A ? w.x: d, A ? w.y: g, !0))
}
n = 0;
for (q = w.siblings.length; n < q; n++) for (w.siblings[n].siblings.push(w), m = 0; m < q; m++) n !== m && w.siblings[n].siblings.push(w.siblings[m])
}
} else w.nd = !1,
w.siblings = null;
w.U();
n = 0;
for (q = w.$a.length; n < q; n++) w.$a[n].qA && w.$a[n].qA();
return w
};
h.prototype.Gj = function(a) {
var b, c;
b = 0;
for (c = this.ra.Wa.length; b < c; b++) {
var l = this.ra.Wa[b];
if (ob(l.name, a)) return l
}
return null
};
h.prototype.Oe = function(a) {
a = wa(a);
0 > a && (a = 0);
a >= this.ra.Wa.length && (a = this.ra.Wa.length - 1);
return this.ra.Wa[a]
};
h.prototype.Jn = function(a) {
return la(a) ? this.Oe(a) : this.Gj(a.toString())
};
h.prototype.Op = function(a) {
var b, c;
b = 0;
for (c = a.length; b < c; b++) a[b].Ea().Ha = !0
};
h.prototype.Xl = function(a) {
var b, c;
b = 0;
for (c = a.length; b < c; b++) a[b].Xl()
};
h.prototype.Eh = function(a) {
var b, c;
b = 0;
for (c = a.length; b < c; b++) a[b].Eh()
};
h.prototype.tf = function(a) {
var b, c;
b = 0;
for (c = a.length; b < c; b++) a[b].tf()
};
h.prototype.Iv = function(a) {
if (a.Xm) {
var b, c, l = a.A;
b = 0;
for (c = l.length; b < c; ++b) l[b].Lv();
l = this.Jd;
b = 0;
for (c = l.length; b < c; ++b) l[b].type === a && l[b].Lv();
a.Xm = !1
}
};
h.prototype.nq = function(a, b, c, l) {
var d, g, e = a ? 1 !== a.Od || 1 !== a.Pd: !1;
if (b.za) for (a = 0, d = b.Si.length; a < d; ++a) g = b.Si[a],
e || g.Ym ? Ea(l, g.A) : (this.Iv(g), g.Tk.av(c, l));
else e || b.Ym ? Ea(l, b.A) : (this.Iv(b), b.Tk.av(c, l))
};
h.prototype.oz = function(a, b, c, l) {
var d, g;
d = 0;
for (g = b.length; d < g; ++d) this.nq(a, b[d], c, l)
};
h.prototype.nz = function(a, b, c) {
var l = this.sv;
l && this.oz(a, l.$q, b, c)
};
h.prototype.Qr = function(a, b, c, l) {
var d = a.Ea(),
g,
e,
n,
q,
m,
h;
if (d.Ha) for (l || (d.Ha = !1, d.A.length = 0), g = 0, q = a.A.length; g < q; g++) {
if (n = a.A[g], n.Rb(), m = n.F.Zc(b, c, !0), h = n.F.Zc(b, c, !1), n.ae(m, h)) {
if (l) return ! 1;
d.A.push(n)
}
} else {
g = e = 0;
for (q = d.A.length; g < q; g++) if (n = d.A[g], n.Rb(), m = n.F.Zc(b, c, !0), h = n.F.Zc(b, c, !1), n.ae(m, h)) {
if (l) return ! 1;
d.A[e] = d.A[g];
e++
}
l || (d.A.length = e)
}
a.pe();
return l ? !0 : d.wq()
};
h.prototype.Wh = function(a, b) {
if (! (a && b && a !== b && a.Je && b.Je)) return ! 1;
a.Rb();
b.Rb();
var c = a.F,
l = b.F,
d, g, e, n, q, m, h, D;
if (c === l || c.Od === l.Od && l.Pd === l.Pd && c.scale === l.scale && c.B === l.B && c.td === l.td) {
if (!a.Bb.Lz(b.Bb) || !a.kd.Zt(b.kd) || a.km && b.km) return ! 1;
if (a.km) return this.vv(a, b);
if (b.km) return this.vv(b, a);
h = a.zb && !a.zb.Nj();
d = b.zb && !b.zb.Nj();
if (!h && !d) return ! 0;
h ? (a.zb.xj(a.width, a.height, a.B), h = a.zb) : (this.yf.nk(a.kd, a.x, a.y, a.width, a.height), h = this.yf);
d ? (b.zb.xj(b.width, b.height, b.B), D = b.zb) : (this.yf.nk(b.kd, b.x, b.y, b.width, b.height), D = this.yf);
return h.il(D, b.x - a.x, b.y - a.y)
}
h = a.zb && !a.zb.Nj();
d = b.zb && !b.zb.Nj();
h ? (a.zb.xj(a.width, a.height, a.B), this.yf.lv(a.zb)) : this.yf.nk(a.kd, a.x, a.y, a.width, a.height);
h = this.yf;
d ? (b.zb.xj(b.width, b.height, b.B), this.Pr.lv(b.zb)) : this.Pr.nk(b.kd, b.x, b.y, b.width, b.height);
D = this.Pr;
d = 0;
for (g = h.uf; d < g; d++) e = 2 * d,
n = e + 1,
q = h.Lc[e],
m = h.Lc[n],
h.Lc[e] = c.xb(q + a.x, m + a.y, !0),
h.Lc[n] = c.xb(q + a.x, m + a.y, !1);
h.Rb();
d = 0;
for (g = D.uf; d < g; d++) e = 2 * d,
n = e + 1,
q = D.Lc[e],
m = D.Lc[n],
D.Lc[e] = l.xb(q + b.x, m + b.y, !0),
D.Lc[n] = l.xb(q + b.x, m + b.y, !1);
D.Rb();
return h.il(D, 0, 0)
};
var q = new Aa;
new za(0, 0, 0, 0);
var n = [];
h.prototype.vv = function(a, b) {
var c, l, d, g, e = b.Bb,
m = a.x,
h = a.y;
a.nC(e, n);
var D = b.zb && !b.zb.Nj();
c = 0;
for (l = n.length; c < l; ++c) if (d = n[c], g = d.uC, e.Mz(g, m, h) && (q.dm(g), q.offset(m, h), q.Zt(b.kd))) if (D) if (b.zb.xj(b.width, b.height, b.B), d.qr) {
if (d.qr.il(b.zb, b.x - (m + g.left), b.y - (h + g.top))) return n.length = 0,
!0
} else {
if (this.yf.nk(q, 0, 0, g.right - g.left, g.bottom - g.top), this.yf.il(b.zb, b.x, b.y)) return n.length = 0,
!0
} else if (d.qr) {
if (this.yf.nk(b.kd, 0, 0, b.width, b.height), d.qr.il(this.yf, -(m + g.left), -(h + g.top))) return n.length = 0,
!0
} else return n.length = 0,
!0;
n.length = 0;
return ! 1
};
h.prototype.Dv = function(a, b) {
if (!b) return ! 1;
var c, l, d, g, e;
c = 0;
for (l = a.uc.length; c < l; c++) if (a.uc[c].tb instanceof b) return ! 0;
if (!a.za) for (c = 0, l = a.Ub.length; c < l; c++) for (e = a.Ub[c], d = 0, g = e.uc.length; d < g; d++) if (e.uc[d].tb instanceof b) return ! 0;
return ! 1
};
h.prototype.Ev = function(a) {
return this.Dv(a, oc.GB)
};
h.prototype.Wr = function(a) {
return this.Dv(a, oc.IB)
};
var D = [];
h.prototype.bj = function(a) {
var b, c, l;
a.Rb();
this.nz(a.F, a.Bb, D);
b = 0;
for (c = D.length; b < c; ++b) if (l = D[b], l.Jb.xC && this.Wh(a, l)) return D.length = 0,
l;
D.length = 0;
return null
};
h.prototype.wA = function(a, b, c, l) {
l = l || 50;
var d = a.x,
g = a.y,
e, n = null,
q = null;
for (e = 0; e < l; e++) if (a.x = d + b * e, a.y = g + c * e, a.Ta(), !this.Wh(a, n) && ((n = this.bj(a)) && (q = n), !n && !n)) return q && this.uA(a, b, c, q),
!0;
a.x = d;
a.y = g;
a.Ta();
return ! 1
};
h.prototype.uA = function(a, b, c, l) {
var d = 2,
g, e = !1;
g = !1;
for (var n = a.x,
q = a.y; 16 >= d;) g = 1 / d,
d *= 2,
a.x += b * g * (e ? 1 : -1),
a.y += c * g * (e ? 1 : -1),
a.Ta(),
this.Wh(a, l) ? g = e = !0 : (g = e = !1, n = a.x, q = a.y);
g && (a.x = n, a.y = q, a.Ta())
};
h.prototype.xA = function(a) {
var b = 0,
c = a.x,
l = a.y,
d = 0,
g = 0,
e = 0,
n = this.bj(a);
if (n) {
for (; 100 >= b;) {
switch (d) {
case 0:
g = 0;
e = -1;
b++;
break;
case 1:
g = 1;
e = -1;
break;
case 2:
g = 1;
e = 0;
break;
case 3:
e = g = 1;
break;
case 4:
g = 0;
e = 1;
break;
case 5:
g = -1;
e = 1;
break;
case 6:
g = -1;
e = 0;
break;
case 7:
e = g = -1
}
d = (d + 1) % 8;
a.x = wa(c + g * b);
a.y = wa(l + e * b);
a.Ta();
if (!this.Wh(a, n) && (n = this.bj(a), !n)) return
}
a.x = c;
a.y = l;
a.Ta()
}
};
h.prototype.zA = function(a, b) {
a.Je && b.Je && this.Fo.push([a, b])
};
h.prototype.Wx = function(a, b) {
var c, l, d;
c = 0;
for (l = this.Fo.length; c < l; c++) if (d = this.Fo[c], d[0] == a && d[1] == b || d[0] == b && d[1] == a) return ! 0;
return ! 1
};
h.prototype.Sx = function(a, b, c) {
var l = a.x,
d = a.y,
g = sa(10, Va(b, c, l, d)),
e = Na(b, c, l, d),
n = this.bj(a);
if (!n) return Ja(e + ua);
var q = n,
m, h, D, A, p = Ga(5);
for (m = 1; 36 > m; m++) if (h = e - m * p, a.x = b + Math.cos(h) * g, a.y = c + Math.sin(h) * g, a.Ta(), !this.Wh(a, q) && (q = this.bj(a), !q)) {
D = h;
break
}
36 === m && (D = Ja(e + ua));
q = n;
for (m = 1; 36 > m; m++) if (h = e + m * p, a.x = b + Math.cos(h) * g, a.y = c + Math.sin(h) * g, a.Ta(), !this.Wh(a, q) && (q = this.bj(a), !q)) {
A = h;
break
}
36 === m && (A = Ja(e + ua));
a.x = l;
a.y = d;
a.Ta();
if (A === D) return A;
a = Oa(A, D) / 2;
a = Sa(A, D) ? Ja(D + a + ua) : Ja(A + a);
D = Math.cos(e);
e = Math.sin(e);
A = Math.cos(a);
a = Math.sin(a);
b = D * A + e * a;
return Na(0, 0, D - 2 * b * A, e - 2 * b * a)
};
var A = -1;
h.prototype.trigger = function(a, b, c) {
if (!this.ra) return ! 1;
var l = this.ra.si;
if (!l) return ! 1;
var d = !1,
g, e, n;
A++;
var q = l.Xp;
e = 0;
for (n = q.length; e < n; ++e) g = this.zv(a, b, q[e], c),
d = d || g;
g = this.zv(a, b, l, c);
A--;
return d || g
};
h.prototype.zv = function(a, b, c, l) {
var d = !1,
g, e, n, q;
if (b) for (n = this.Ur(a, b, b.type.name, c, l), d = d || n, q = b.type.Ub, g = 0, e = q.length; g < e; ++g) n = this.Ur(a, b, q[g].name, c, l),
d = d || n;
else n = this.Ur(a, b, "system", c, l),
d = d || n;
return d
};
h.prototype.Ur = function(a, b, c, l, d) {
var g, e = !1,
n = !1,
n = "undefined" !== typeof d,
q = (n ? l.Ct: l.Av)[c];
if (!q) return e;
var m = null;
l = 0;
for (g = q.length; l < g; ++l) if (q[l].method == a) {
m = q[l].Xk;
break
}
if (!m) return e;
a = n ? m[d] : m;
if (!a) return null;
l = 0;
for (g = a.length; l < g; l++) d = a[l][0],
n = a[l][1],
n = this.Yy(b, c, d, n),
e = e || n;
return e
};
h.prototype.Yy = function(a, b, c, l) {
var d, g, e = !1;
this.Vr++;
var n = this.Jc().Ic;
n && this.Xl(n.Rh);
var q = 1 < this.Vr;
this.Xl(c.Rh);
q && this.vA();
var m = this.Co(c);
m.Ic = c;
a && (d = this.types[b].Ea(), d.Ha = !1, d.A.length = 1, d.A[0] = a, this.types[b].pe());
a = !0;
if (c.parent) {
b = m.uv;
for (d = c.parent; d;) b.push(d),
d = d.parent;
b.reverse();
d = 0;
for (g = b.length; d < g; d++) if (!b[d].HA()) {
a = !1;
break
}
}
a && (this.An++, c.Re ? c.GA(l) : c.Ec(), e = e || m.Ki);
this.xo();
q && this.pA();
this.tf(c.Rh);
n && this.tf(n.Rh);
0 !== this.ve || 0 !== A || this.Dq || this.Gf.nf() && !this.Jd.length || this.hd();
this.Vr--;
return e
};
h.prototype.Fj = function() {
var a = this.Jc();
return a.Ic.Hc[a.vc]
};
h.prototype.vA = function() {
this.lo++;
this.lo >= this.Sq.length && this.Sq.push([])
};
h.prototype.pA = function() {
this.lo--
};
h.prototype.It = function() {
return this.Sq[this.lo]
};
h.prototype.Co = function(a) {
this.zn++;
this.zn >= this.$p.length && this.$p.push(new Yb);
var b = this.Jc();
b.reset(a);
return b
};
h.prototype.xo = function() {
this.zn--
};
h.prototype.Jc = function() {
return this.$p[this.zn]
};
h.prototype.$u = function(a) {
this.no++;
this.no >= this.Yj.length && this.Yj.push(fa({
name: a,
index: 0,
Fc: !1
}));
var b = this.Jt();
b.name = a;
b.index = 0;
b.Fc = !1;
return b
};
h.prototype.Vu = function() {
this.no--
};
h.prototype.Jt = function() {
return this.Yj[this.no]
};
h.prototype.Kt = function(a, b) {
for (var c, l, d, g, e, n; b;) {
c = 0;
for (l = b.We.length; c < l; c++) if (n = b.We[c], n instanceof Zb && ob(a, n.name)) return n;
b = b.parent
}
c = 0;
for (l = this.qg.length; c < l; c++) for (e = this.qg[c], d = 0, g = e.qh.length; d < g; d++) if (n = e.qh[d], n instanceof Zb && ob(a, n.name)) return n;
return null
};
h.prototype.Mt = function(a) {
var b, c;
b = 0;
for (c = this.rf.length; b < c; b++) if (this.rf[b].jb === a) return this.rf[b];
return null
};
h.prototype.Ln = function(a) {
var b, c;
b = 0;
for (c = this.ea.length; b < c; b++) if (this.ea[b].jb === a) return this.ea[b];
return null
};
h.prototype.fz = function(a) {
var b, c;
b = 0;
for (c = this.bh.length; b < c; b++) if (this.bh[b].jb === a) return this.bh[b];
return null
};
h.prototype.Ez = function() {
var b = this,
c = this.Hr,
l = this.yg,
d = this.io,
g = !1;
this.rv && (g = !0, c = "__c2_continuouspreview", this.rv = !1);
if (c.length) {
this.hd();
l = this.LA();
if (window.indexedDB && !this.ue) e(c, l,
function() {
ia("Saved state to IndexedDB storage (" + l.length + " bytes)");
b.yg = l;
b.trigger(r.prototype.k.op, null);
b.yg = "";
g && a()
},
function(d) {
try {
localStorage.setItem("__c2save_" + c, l),
ia("Saved state to WebStorage (" + l.length + " bytes)"),
b.yg = l,
b.trigger(r.prototype.k.op, null),
b.yg = "",
g && a()
} catch(e) {
ia("Failed to save game state: " + d + "; " + e)
}
});
else try {
localStorage.setItem("__c2save_" + c, l),
ia("Saved state to WebStorage (" + l.length + " bytes)"),
b.yg = l,
this.trigger(r.prototype.k.op, null),
b.yg = "",
g && a()
} catch(n) {
ia("Error saving to WebStorage: " + n)
}
this.Bd = this.io = this.Hr = ""
}
d.length && (window.indexedDB && !this.ue ? m(d,
function(a) {
a ? (b.Bd = a, ia("Loaded state from IndexedDB storage (" + b.Bd.length + " bytes)")) : (b.Bd = localStorage.getItem("__c2save_" + d) || "", ia("Loaded state from WebStorage (" + b.Bd.length + " bytes)"));
b.gm = !1;
b.Bd.length || b.trigger(r.prototype.k.mp, null)
},
function() {
b.Bd = localStorage.getItem("__c2save_" + d) || "";
ia("Loaded state from WebStorage (" + b.Bd.length + " bytes)");
b.gm = !1;
b.Bd.length || b.trigger(r.prototype.k.mp, null)
}) : (this.Bd = localStorage.getItem("__c2save_" + d) || "", ia("Loaded state from WebStorage (" + this.Bd.length + " bytes)"), this.gm = !1, b.Bd.length || b.trigger(r.prototype.k.mp, null)), this.Hr = this.io = "");
this.Bd.length && (this.hd(), this.$z(this.Bd), this.yg = this.Bd, this.trigger(r.prototype.k.Fw, null), this.Bd = this.yg = "")
};
h.prototype.LA = function() {
var a, b, c, l, g, e, n, q = {
c2save: !0,
version: 1,
rt: {
time: this.xe.kb,
timescale: this.cj,
tickcount: this.Xe,
execcount: this.An,
next_uid: this.Il,
running_layout: this.ra.jb,
start_time_offset: Date.now() - this.Ro
},
types: {},
layouts: {},
events: {
groups: {},
cnds: {},
acts: {},
vars: {}
}
};
a = 0;
for (b = this.ea.length; a < b; a++) if (g = this.ea[a], !g.za && !this.Ev(g)) {
e = {
instances: []
};
ab(g.Jb) && (e.ex = d(g.Jb));
c = 0;
for (l = g.A.length; c < l; c++) e.instances.push(this.Gr(g.A[c]));
q.types[g.jb.toString()] = e
}
a = 0;
for (b = this.rf.length; a < b; a++) c = this.rf[a],
q.layouts[c.jb.toString()] = c.Mb();
l = q.events.groups;
a = 0;
for (b = this.bh.length; a < b; a++) c = this.bh[a],
l[c.jb.toString()] = this.Hj[c.fl].vh;
b = q.events.cnds;
for (n in this.zj) this.zj.hasOwnProperty(n) && (a = this.zj[n], ab(a.Jb) && (b[n] = {
ex: d(a.Jb)
}));
b = q.events.acts;
for (n in this.wj) this.wj.hasOwnProperty(n) && (a = this.wj[n], ab(a.Jb) && (b[n] = {
ex: a.Jb
}));
b = q.events.vars;
for (n in this.yk) this.yk.hasOwnProperty(n) && (a = this.yk[n], a.Un || a.parent && !a.pl || (b[n] = a.data));
q.system = this.Yf.Mb();
return JSON.stringify(q)
};
h.prototype.bv = function() {
var a, b, c, l, d, g;
this.Ch = {};
a = 0;
for (b = this.ea.length; a < b; a++) if (c = this.ea[a], !c.za) for (l = 0, d = c.A.length; l < d; l++) g = c.A[l],
this.Ch[g.uid.toString()] = g
};
h.prototype.$z = function(a) {
a = JSON.parse(a);
if (a.c2save && !(1 < a.version)) {
var b = a.rt;
this.xe.reset();
this.xe.kb = b.time;
this.cj = b.timescale;
this.Xe = b.tickcount;
this.Ro = Date.now() - b.start_time_offset;
var c = b.running_layout;
if (c !== this.ra.jb) if (c = this.Mt(c)) this.xt(c);
else return;
var l, d, g, e, n, q, m;
q = a.types;
for (d in q) if (q.hasOwnProperty(d) && (e = this.Ln(parseInt(d, 10))) && !e.za && !this.Ev(e)) {
q[d].ex ? e.Jb = q[d].ex: bb(e.Jb);
n = e.A;
g = q[d].instances;
c = 0;
for (l = ta(n.length, g.length); c < l; c++) this.jo(n[c], g[c]);
c = g.length;
for (l = n.length; c < l; c++) this.Af(n[c]);
c = n.length;
for (l = g.length; c < l; c++) {
n = null;
if (e.wa.Lf && (n = this.ra.Kn(g[c].w.l), !n)) continue;
n = this.mh(e.Le, n, !1, 0, 0, !0);
this.jo(n, g[c])
}
e.qk = !0
}
this.hd();
this.bv();
l = a.layouts;
for (d in l) l.hasOwnProperty(d) && (c = this.Mt(parseInt(d, 10))) && c.Vb(l[d]);
l = a.events.groups;
for (d in l) l.hasOwnProperty(d) && (c = this.fz(parseInt(d, 10))) && this.Hj[c.fl] && (this.Hj[c.fl].vh = l[d]);
c = a.events.cnds;
for (d in c) c.hasOwnProperty(d) && this.zj.hasOwnProperty(d) && (this.zj[d].Jb = c[d].ex);
c = a.events.acts;
for (d in c) c.hasOwnProperty(d) && this.wj.hasOwnProperty(d) && (this.wj[d].Jb = c[d].ex);
c = a.events.vars;
for (d in c) c.hasOwnProperty(d) && this.yk.hasOwnProperty(d) && (this.yk[d].data = c[d]);
this.Il = b.next_uid;
this.Yf.Vb(a.system);
c = 0;
for (l = this.ea.length; c < l; c++) if (e = this.ea[c], !e.za) for (d = 0, a = e.A.length; d < a; d++) {
n = e.A[d];
if (e.nd) for (q = n.el(), b = n.siblings.length = 0, g = e.$d.length; b < g; b++) m = e.$d[b],
e !== m && n.siblings.push(m.A[q]);
n.ef && n.ef();
if (n.$a) for (b = 0, g = n.$a.length; b < g; b++) q = n.$a[b],
q.ef && q.ef()
}
this.Ga = !0
}
};
h.prototype.Gr = function(a, b) {
var c, l, g, e, n;
e = a.type;
g = e.wa;
var q = {};
b ? q.c2 = !0 : q.uid = a.uid;
ab(a.Jb) && (q.ex = d(a.Jb));
if (a.jc && a.jc.length) for (q.ivs = {},
c = 0, l = a.jc.length; c < l; c++) q.ivs[a.type.Aq[c].toString()] = a.jc[c];
if (g.Lf) {
g = {
x: a.x,
y: a.y,
w: a.width,
h: a.height,
l: a.F.jb,
zi: a.te()
};
0 !== a.B && (g.a = a.B);
1 !== a.opacity && (g.o = a.opacity);
0.5 !== a.yd && (g.hX = a.yd);
0.5 !== a.zd && (g.hY = a.zd);
0 !== a.Id && (g.bm = a.Id);
a.visible || (g.v = a.visible);
a.Je || (g.ce = a.Je); - 1 !== a.Ui && (g.mts = a.Ui);
if (e.Sa.length) for (g.fx = [], c = 0, l = e.Sa.length; c < l; c++) n = e.Sa[c],
g.fx.push({
name: n.name,
active: a.ah[n.index],
params: a.cc[n.index]
});
q.w = g
}
if (a.$a && a.$a.length) for (q.behs = {},
c = 0, l = a.$a.length; c < l; c++) e = a.$a[c],
e.Mb && (q.behs[e.type.jb.toString()] = e.Mb());
a.Mb && (q.data = a.Mb());
return q
};
h.prototype.hz = function(a, b) {
var c, l;
c = 0;
for (l = a.Aq.length; c < l; c++) if (a.Aq[c] === b) return c;
return - 1
};
h.prototype.ez = function(a, b) {
var c, l;
c = 0;
for (l = a.$a.length; c < l; c++) if (a.$a[c].type.jb === b) return c;
return - 1
};
h.prototype.jo = function(a, b, c) {
var l, d, g, e, n;
n = a.type;
g = n.wa;
if (c) {
if (!b.c2) return
} else a.uid = b.uid;
b.ex ? a.Jb = b.ex: bb(a.Jb);
if (d = b.ivs) for (l in d) d.hasOwnProperty(l) && (c = this.hz(n, parseInt(l, 10)), 0 > c || c >= a.jc.length || (a.jc[c] = d[l]));
if (g.Lf) {
g = b.w;
a.F.jb !== g.l && (c = a.F, a.F = this.ra.Kn(g.l), a.F ? (a.F.A.push(a), a.F.Ud = !0, Fa(c.A, a), c.Ud = !0) : (a.F = c, this.Af(a)));
a.x = g.x;
a.y = g.y;
a.width = g.w;
a.height = g.h;
a.hj = g.zi;
a.B = g.hasOwnProperty("a") ? g.a: 0;
a.opacity = g.hasOwnProperty("o") ? g.o: 1;
a.yd = g.hasOwnProperty("hX") ? g.hX: 0.5;
a.zd = g.hasOwnProperty("hY") ? g.hY: 0.5;
a.visible = g.hasOwnProperty("v") ? g.v: !0;
a.Je = g.hasOwnProperty("ce") ? g.ce: !0;
a.Ui = g.hasOwnProperty("mts") ? g.mts: -1;
a.Id = g.hasOwnProperty("bm") ? g.bm: 0;
a.Uk = lb(a.Id);
this.ba && mb(a, a.Id, this.ba);
a.Ta();
if (g.hasOwnProperty("fx")) for (c = 0, d = g.fx.length; c < d; c++) e = n.pq(g.fx[c].name),
0 > e || (a.ah[e] = g.fx[c].active, a.cc[e] = g.fx[c].params);
a.Mg()
}
if (n = b.behs) for (l in n) n.hasOwnProperty(l) && (g = this.ez(a, parseInt(l, 10)), 0 > g || a.$a[g].Vb(n[l]));
b.data && a.Vb(b.data)
};
$b = function(a) {
return new h(document.getElementById(a))
};
ac = function(a, b) {
return new h({
dc: !0,
width: a,
height: b
})
};
window.cr_createRuntime = $b;
window.cr_createDCRuntime = ac;
window.createCocoonJSRuntime = function() {
window.c2cocoonjs = !0;
var a = document.createElement("screencanvas") || document.createElement("canvas");
a.wC = !0;
document.body.appendChild(a);
a = new h(a);
window.c2runtime = a;
window.addEventListener("orientationchange",
function() {
window.c2runtime.setSize(window.innerWidth, window.innerHeight)
});
window.c2runtime.setSize(window.innerWidth, window.innerHeight);
return a
};
window.createEjectaRuntime = function() {
var a = new h(document.getElementById("canvas"));
window.c2runtime = a;
window.c2runtime.setSize(window.innerWidth, window.innerHeight);
return a
}
})();
window.cr_getC2Runtime = function() {
var h = document.getElementById("c2canvas");
return h ? h.c2runtime: window.c2runtime ? window.c2runtime: null
};
window.cr_sizeCanvas = function(h, p) {
if (0 !== h && 0 !== p) {
var e = window.cr_getC2Runtime();
e && e.setSize(h, p)
}
};
window.cr_setSuspended = function(h) {
var p = window.cr_getC2Runtime();
p && p.setSuspended(h)
}; (function() {
function h(a, d) {
this.n = a;
this.si = null;
this.scrollX = this.n.Bc / 2;
this.scrollY = this.n.Ac / 2;
this.scale = 1;
this.B = 0;
this.al = !0;
this.name = d[0];
this.width = d[1];
this.height = d[2];
this.Fv = d[3];
this.pv = d[4];
this.jb = d[5];
var c = d[6],
g,
b;
this.Wa = [];
this.hl = [];
g = 0;
for (b = c.length; g < b; g++) {
var l = new bc(this, c[g]);
l.Bu = g;
this.Wa.push(l)
}
c = d[7];
this.Di = [];
g = 0;
for (b = c.length; g < b; g++) {
var l = c[g],
e = this.n.ea[l[1]];
e.Le || (e.Le = l);
this.Di.push(l); - 1 === this.hl.indexOf(e) && this.hl.push(e)
}
this.Sa = [];
this.wb = [];
this.cc = [];
g = 0;
for (b = d[8].length; g < b; g++) this.Sa.push({
id: d[8][g][0],
name: d[8][g][1],
dd: -1,
$: !0,
index: g
}),
this.cc.push(d[8][g][2].slice(0));
this.Mg();
this.Fh = new za(0, 0, 1, 1);
this.ur = new za(0, 0, 1, 1);
this.Dh = {}
}
function p(a, d) {
this.Lb = a;
this.n = a.n;
this.A = [];
this.scale = 1;
this.B = 0;
this.ri = !1;
this.Kg = new za(0, 0, 0, 0);
this.xv = new Aa;
this.Rd = this.Yc = this.Sd = this.Xc = 0;
this.Ud = !1;
this.name = d[0];
this.index = d[1];
this.jb = d[2];
this.visible = d[3];
this.dh = d[4];
this.dj = d[5];
this.Od = d[6];
this.Pd = d[7];
this.opacity = d[8];
this.gq = d[9];
this.td = d[10];
this.Id = d[11];
this.yy = d[12];
this.Uk = "source-over";
this.md = this.qd = 0;
this.Gh = !1;
var c = d[13],
g,
b;
this.Kj = [];
g = 0;
for (b = c.length; g < b; g++) {
var l = c[g],
e = this.n.ea[l[1]];
e.Le || (e.Le = l, e.ey = this.index);
this.Kj.push(l); - 1 === this.Lb.hl.indexOf(e) && this.Lb.hl.push(e)
}
this.Sa = [];
this.wb = [];
this.cc = [];
g = 0;
for (b = d[14].length; g < b; g++) this.Sa.push({
id: d[14][g][0],
name: d[14][g][1],
dd: -1,
$: !0,
index: g
}),
this.cc.push(d[14][g][2].slice(0));
this.Mg();
this.Fh = new za(0, 0, 1, 1);
this.ur = new za(0, 0, 1, 1)
}
function e(a, d) {
return a.hj - d.hj
}
h.prototype.KA = function(a) {
var d = a.type.jb.toString();
this.Dh.hasOwnProperty(d) || (this.Dh[d] = []);
this.Dh[d].push(this.n.Gr(a))
};
h.prototype.Rt = function() {
var a = this.Wa[0];
return ! a.dj && 1 === a.opacity && !a.gq && a.visible
};
h.prototype.Mg = function() {
this.wb.length = 0;
var a, d, c;
a = 0;
for (d = this.Sa.length; a < d; a++) c = this.Sa[a],
c.$ && this.wb.push(c)
};
h.prototype.oq = function(a) {
var d, c, g;
d = 0;
for (c = this.Sa.length; d < c; d++) if (g = this.Sa[d], g.name === a) return g;
return null
};
var m = [];
h.prototype.Nr = function() {
this.pv && (this.si = this.n.aq[this.pv], this.si.Yr());
this.n.ra = this;
this.scrollX = this.n.Bc / 2;
this.scrollY = this.n.Ac / 2;
var a, d, c, g, b, l, q;
a = 0;
for (c = this.n.ea.length; a < c; a++) if (d = this.n.ea[a], !d.za) for (b = d.A, d = 0, g = b.length; d < g; d++) if (l = b[d], l.F) {
var n = l.F.Bu;
n >= this.Wa.length && (n = this.Wa.length - 1);
l.F = this.Wa[n];
l.F.A.push(l);
l.F.Ud = !0
}
m.length = 0;
this.Px();
a = 0;
for (c = this.Wa.length; a < c; a++) l = this.Wa[a],
l.by(),
l.ri = !0,
d = l.Zc(0, 0, !0, !0),
g = l.Zc(0, 0, !1, !0),
l.ri = !1,
this.n.Se && (d = d + 0.5 | 0, g = g + 0.5 | 0),
l.Cr(d, g, null);
b = !1;
if (!this.al) {
for (q in this.Dh) if (this.Dh.hasOwnProperty(q) && (d = this.n.Ln(parseInt(q, 10))) && !d.za && this.n.Wr(d)) {
g = this.Dh[q];
a = 0;
for (c = g.length; a < c; a++) {
l = null;
if (d.wa.Lf && (l = this.Kn(g[a].w.l), !l)) continue;
l = this.n.mh(d.Le, l, !1, 0, 0, !0);
this.n.jo(l, g[a]);
b = !0;
m.push(l)
}
g.length = 0
}
a = 0;
for (c = this.Wa.length; a < c; a++) this.Wa[a].A.sort(e),
this.Wa[a].Ud = !0
}
b && (this.n.hd(), this.n.bv());
for (a = 0; a < m.length; a++) if (l = m[a], l.type.nd) for (c = l.el(), d = 0, g = l.type.$d.length; d < g; d++) q = l.type.$d[d],
l.type !== q && (q.A.length > c ? l.siblings.push(q.A[c]) : q.Le && (b = this.n.mh(q.Le, l.F, !0, l.x, l.y, !0), this.n.hd(), q.dp(), l.siblings.push(b), m.push(b)));
a = 0;
for (c = this.Di.length; a < c; a++) this.n.mh(this.Di[a], null, !0);
this.n.kg = null;
this.n.hd();
if (this.n.Eb && !this.n.Zb) for (a = 0, c = this.n.ea.length; a < c; a++) q = this.n.ea[a],
!q.za && q.A.length && q.Ao && q.Ao(this.n.Eb);
a = 0;
for (c = m.length; a < c; a++) l = m[a],
this.n.trigger(Object.getPrototypeOf(l.type.wa).k.Oa, l);
m.length = 0;
this.n.trigger(r.prototype.k.je, null);
this.al = !1
};
h.prototype.ay = function() {
var a, d, c, g, b;
d = a = 0;
for (c = this.Di.length; a < c; a++) g = this.Di[a],
b = this.n.ea[g[1]],
b.global ? this.n.mh(g, null, !0) : (this.Di[d] = g, d++);
this.Di.length = d
};
h.prototype.TA = function() {
this.n.trigger(r.prototype.k.Dw, null);
this.n.Yf.Td.length = 0;
var a, d, c, g, b, l;
a = 0;
for (d = this.Wa.length; a < d; a++) {
b = this.Wa[a].A;
c = 0;
for (g = b.length; c < g; c++) l = b[c],
l.type.global || (this.n.Wr(l.type) && this.KA(l), this.n.Af(l));
this.n.hd();
b.length = 0;
this.Wa[a].Ud = !0
}
a = 0;
for (d = this.n.ea.length; a < d; a++) if (b = this.n.ea[a], !(b.global || b.wa.Lf || b.wa.Po || b.za)) {
c = 0;
for (g = b.A.length; c < g; c++) this.n.Af(b.A[c]);
this.n.hd()
}
};
h.prototype.de = function(a) {
var d, c = a,
g = !1,
b = !this.n.Ne;
b && (this.n.ho || (this.n.ho = document.createElement("canvas"), d = this.n.ho, d.width = this.n.eb, d.height = this.n.cb, this.n.nu = d.getContext("2d"), g = !0), d = this.n.ho, c = this.n.nu, d.width !== this.n.eb && (d.width = this.n.eb, g = !0), d.height !== this.n.cb && (d.height = this.n.cb, g = !0), g && (c.webkitImageSmoothingEnabled = this.n.qb, c.mozImageSmoothingEnabled = this.n.qb, c.msImageSmoothingEnabled = this.n.qb, c.imageSmoothingEnabled = this.n.qb));
c.globalAlpha = 1;
c.globalCompositeOperation = "source-over";
this.n.Gp && !this.Rt() && c.clearRect(0, 0, this.n.eb, this.n.cb);
var l, e, g = 0;
for (l = this.Wa.length; g < l; g++) e = this.Wa[g],
e.visible && 0 < e.opacity && 11 !== e.Id && e.de(c);
b && a.drawImage(d, 0, 0, this.n.width, this.n.height)
};
h.prototype.wd = function(a) {
var d = 0 < this.wb.length || this.n.vk || !this.n.Ne;
if (d) {
this.n.ge || (this.n.ge = a.lg(this.n.eb, this.n.cb, this.n.qb));
if (this.n.ge.Sk !== this.n.eb || this.n.ge.Rk !== this.n.cb) a.deleteTexture(this.n.ge),
this.n.ge = a.lg(this.n.eb, this.n.cb, this.n.qb);
a.Uf(this.n.ge);
this.n.Ne || a.Lh(this.n.eb, this.n.cb)
} else this.n.ge && (a.Uf(null), a.deleteTexture(this.n.ge), this.n.ge = null);
this.n.Gp && !this.Rt() && a.clear(0, 0, 0, 0);
var c, g;
c = 0;
for (g = this.Wa.length; c < g; c++) this.Wa[c].visible && 0 < this.Wa[c].opacity && this.Wa[c].wd(a);
d && (0 === this.wb.length || 1 === this.wb.length && this.n.Ne ? (1 === this.wb.length ? (d = this.wb[0].index, a.Xf(this.wb[0].dd), a.mk(null, 1 / this.n.eb, 1 / this.n.cb, 0, 0, 1, 1, this.scale, this.B, 0, 0, this.cc[d]), a.Bo(this.wb[0].dd) && (this.n.Ga = !0)) : a.Xf(0), this.n.Ne || a.Lh(this.n.width, this.n.height), a.Uf(null), a.Kh(1), a.Qd(this.n.ge), a.gv(), a.Sf(), a.bg(), d = this.n.width / 2, c = this.n.height / 2, a.Do( - d, c, d, c, d, -c, -d, -c), a.Qd(null)) : this.Ar(a, null, null, null))
};
h.prototype.dl = function() {
return 0 < this.wb.length || this.n.vk || !this.n.Ne ? this.n.ge: null
};
h.prototype.Nt = function() {
var a = this.Wa[0].ee(),
d,
c,
g;
d = 1;
for (c = this.Wa.length; d < c; d++) g = this.Wa[d],
(0 !== g.Od || 0 !== g.Pd) && g.ee() < a && (a = g.ee());
return a
};
h.prototype.Lo = function(a) {
if (!this.Fv) {
var d = this.n.eb * (1 / this.Nt()) / 2;
a > this.width - d && (a = this.width - d);
a < d && (a = d)
}
this.scrollX !== a && (this.scrollX = a, this.n.Ga = !0)
};
h.prototype.$l = function(a) {
if (!this.Fv) {
var d = this.n.cb * (1 / this.Nt()) / 2;
a > this.height - d && (a = this.height - d);
a < d && (a = d)
}
this.scrollY !== a && (this.scrollY = a, this.n.Ga = !0)
};
h.prototype.Px = function() {
this.Lo(this.scrollX);
this.$l(this.scrollY)
};
h.prototype.Ar = function(a, d, c, g) {
var b = c ? c.wb: d ? d.wb: this.wb,
l = 1,
e = 0,
n = 0,
m = 0;
c ? (l = c.F.ee(), e = c.F.yc(), n = c.F.Xc, m = c.F.Yc) : d && (l = d.ee(), e = d.yc(), n = d.Xc, m = d.Yc);
var h = this.n.iq,
p, z, x, y, H = 0,
N = 1,
S, K = this.n.eb,
F = this.n.cb,
T = K / 2,
ca = F / 2,
R = d ? d.Fh: this.Fh,
W = d ? d.ur: this.ur,
w = 0,
u = 0,
M = 0,
da = 0,
X = K,
V = K,
G = F,
Q = F,
aa = x = 0,
Y = c ? c.F.yc() : 0;
if (c) {
p = 0;
for (z = b.length; p < z; p++) x += a.kz(b[p].dd),
aa += a.lz(b[p].dd);
y = c.Bb;
w = d.xb(y.left, y.top, !0, !0);
M = d.xb(y.left, y.top, !1, !0);
X = d.xb(y.right, y.bottom, !0, !0);
G = d.xb(y.right, y.bottom, !1, !0);
0 !== Y && (p = d.xb(y.right, y.top, !0, !0), z = d.xb(y.right, y.top, !1, !0), u = d.xb(y.left, y.bottom, !0, !0), da = d.xb(y.left, y.bottom, !1, !0), y = Math.min(w, X, p, u), X = Math.max(w, X, p, u), w = y, y = Math.min(M, G, z, da), G = Math.max(M, G, z, da), M = y);
w -= x;
M -= aa;
X += x;
G += aa;
W.left = w / K;
W.top = 1 - M / F;
W.right = X / K;
W.bottom = 1 - G / F;
u = w = wa(w);
da = M = wa(M);
V = X = xa(X);
Q = G = xa(G);
u -= x;
da -= aa;
V += x;
Q += aa;
0 > w && (w = 0);
0 > M && (M = 0);
X > K && (X = K);
G > F && (G = F);
0 > u && (u = 0);
0 > da && (da = 0);
V > K && (V = K);
Q > F && (Q = F);
R.left = w / K;
R.top = 1 - M / F;
R.right = X / K;
R.bottom = 1 - G / F
} else R.left = W.left = 0,
R.top = W.top = 0,
R.right = W.right = 1,
R.bottom = W.bottom = 1;
aa = c && ((c.B || Y) && a.Vl(b[0].dd) || 0 !== x || 0 !== aa || 1 !== c.opacity || c.type.wa.wu) || d && !c && 1 !== d.opacity;
a.gv();
if (aa) {
h[H] || (h[H] = a.lg(K, F, this.n.qb));
if (h[H].Sk !== K || h[H].Rk !== F) a.deleteTexture(h[H]),
h[H] = a.lg(K, F, this.n.qb);
a.Xf(0);
a.Uf(h[H]);
S = Q - da;
a.clearRect(u, F - da - S, V - u, S);
S = S;
c ? c.wd(a) : (a.Qd(this.n.Ae), a.Kh(d.opacity), a.Sf(), a.translate( - T, -ca), a.bg(), a.wf(w, G, X, G, X, M, w, M, R));
W.left = W.top = 0;
W.right = W.bottom = 1;
c && (y = R.top, R.top = R.bottom, R.bottom = y);
H = 1;
N = 0
}
a.Kh(1);
x = b.length - 1;
var Y = a.rr(b[x].dd) || !d && !c && !this.n.Ne,
L = 0;
p = 0;
for (z = b.length; p < z; p++) {
h[H] || (h[H] = a.lg(K, F, this.n.qb));
if (h[H].Sk !== K || h[H].Rk !== F) a.deleteTexture(h[H]),
h[H] = a.lg(K, F, this.n.qb);
a.Xf(b[p].dd);
L = b[p].index;
a.Bo(b[p].dd) && (this.n.Ga = !0);
0 != p || aa ? (a.mk(g, 1 / K, 1 / F, W.left, W.top, W.right, W.bottom, l, e, n, m, c ? c.cc[L] : d ? d.cc[L] : this.cc[L]), a.Qd(null), p !== x || Y ? (a.Uf(h[H]), S = Q - da, y = F - da - S, a.clearRect(u, y, V - u, S)) : (c ? a.Jh(c.qd, c.md) : d && a.Jh(d.qd, d.md), a.Uf(g)), a.Qd(h[N]), a.Sf(), a.translate( - T, -ca), a.bg(), a.wf(w, G, X, G, X, M, w, M, R), p !== x || Y || a.Qd(null)) : (a.Uf(h[H]), S = Q - da, y = F - da - S, a.clearRect(u, y, V - u, S), c ? (a.mk(g, 1 / c.width, 1 / c.height, W.left, W.top, W.right, W.bottom, l, e, n, m, c.cc[L]), c.wd(a)) : (a.mk(g, 1 / K, 1 / F, 0, 0, 1, 1, l, e, n, m, d ? d.cc[L] : this.cc[L]), a.Qd(d ? this.n.Ae: this.n.ge), a.Sf(), a.translate( - T, -ca), a.bg(), a.wf(w, G, X, G, X, M, w, M, R)), W.left = W.top = 0, W.right = W.bottom = 1, c && !Y && (y = G, G = M, M = y));
H = 0 === H ? 1 : 0;
N = 0 === H ? 1 : 0
}
Y && (a.Xf(0), c ? a.Jh(c.qd, c.md) : d ? a.Jh(d.qd, d.md) : this.n.Ne || (a.Lh(this.n.width, this.n.height), T = this.n.width / 2, ca = this.n.height / 2, M = w = 0, X = this.n.width, G = this.n.height), a.Uf(g), a.Qd(h[N]), a.Sf(), a.translate( - T, -ca), a.bg(), c && 1 === b.length && !aa ? a.wf(w, M, X, M, X, G, w, G, R) : a.wf(w, G, X, G, X, M, w, M, R), a.Qd(null))
};
h.prototype.Kn = function(a) {
var d, c;
d = 0;
for (c = this.Wa.length; d < c; d++) if (this.Wa[d].jb === a) return this.Wa[d];
return null
};
h.prototype.Mb = function() {
var a, d, c, g = {
sx: this.scrollX,
sy: this.scrollY,
s: this.scale,
a: this.B,
w: this.width,
h: this.height,
fv: this.al,
persist: this.Dh,
fx: [],
layers: {}
};
a = 0;
for (d = this.Sa.length; a < d; a++) c = this.Sa[a],
g.fx.push({
name: c.name,
active: c.$,
params: this.cc[c.index]
});
a = 0;
for (d = this.Wa.length; a < d; a++) c = this.Wa[a],
g.layers[c.jb.toString()] = c.Mb();
return g
};
h.prototype.Vb = function(a) {
var d, c, g, b;
this.scrollX = a.sx;
this.scrollY = a.sy;
this.scale = a.s;
this.B = a.a;
this.width = a.w;
this.height = a.h;
this.Dh = a.persist;
"undefined" !== typeof a.fv && (this.al = a.fv);
var l = a.fx;
d = 0;
for (c = l.length; d < c; d++) if (g = this.oq(l[d].name)) g.$ = l[d].active,
this.cc[g.index] = l[d].params;
this.Mg();
d = a.layers;
for (b in d) d.hasOwnProperty(b) && (a = this.Kn(parseInt(b, 10))) && a.Vb(d[b])
};
Mb = h;
p.prototype.Mg = function() {
this.wb.length = 0;
var a, d, c;
a = 0;
for (d = this.Sa.length; a < d; a++) c = this.Sa[a],
c.$ && this.wb.push(c)
};
p.prototype.oq = function(a) {
var d, c, g;
d = 0;
for (c = this.Sa.length; d < c; d++) if (g = this.Sa[d], g.name === a) return g;
return null
};
p.prototype.by = function() {
var a, d, c, g, b, l;
d = a = 0;
for (c = this.Kj.length; a < c; a++) {
g = this.Kj[a];
b = this.n.ea[g[1]];
l = this.n.Wr(b);
b = !0;
if (!l || this.Lb.al) g = this.n.mh(g, this, !0),
m.push(g),
g.type.global && (b = !1);
b && (this.Kj[d] = this.Kj[a], d++)
}
this.Kj.length = d;
this.n.hd(); ! this.n.fa && this.Sa.length && (this.Id = this.yy);
this.Uk = lb(this.Id);
this.n.ba && mb(this, this.Id, this.n.ba)
};
p.prototype.aB = function() {
if (this.Ud) {
var a, d;
a = 0;
for (d = this.A.length; a < d; a++) this.A[a].hj = a;
this.Ud = !1
}
};
p.prototype.ee = function(a) {
return this.iz() * (this.n.Ne || a ? this.n.Pk: 1)
};
p.prototype.iz = function() {
return (this.scale * this.Lb.scale - 1) * this.td + 1
};
p.prototype.yc = function() {
return this.ri ? 0 : Ja(this.Lb.B + this.B)
};
p.prototype.de = function(a) {
this.Gh = this.gq || 1 !== this.opacity || 0 !== this.Id;
var d = this.n.canvas,
c = a,
g = !1;
this.Gh && (this.n.fo || (this.n.fo = document.createElement("canvas"), d = this.n.fo, d.width = this.n.eb, d.height = this.n.cb, this.n.mu = d.getContext("2d"), g = !0), d = this.n.fo, c = this.n.mu, d.width !== this.n.eb && (d.width = this.n.eb, g = !0), d.height !== this.n.cb && (d.height = this.n.cb, g = !0), g && (c.webkitImageSmoothingEnabled = this.n.qb, c.mozImageSmoothingEnabled = this.n.qb, c.msImageSmoothingEnabled = this.n.qb, c.imageSmoothingEnabled = this.n.qb), this.dj && c.clearRect(0, 0, this.n.eb, this.n.cb));
c.globalAlpha = 1;
c.globalCompositeOperation = "source-over";
this.dj || (c.fillStyle = "rgb(" + this.dh[0] + "," + this.dh[1] + "," + this.dh[2] + ")", c.fillRect(0, 0, this.n.eb, this.n.cb));
c.save();
this.ri = !0;
var g = this.Zc(0, 0, !0, !0),
b = this.Zc(0, 0, !1, !0);
this.ri = !1;
this.n.Se && (g = g + 0.5 | 0, b = b + 0.5 | 0);
this.Cr(g, b, c);
var l = this.ee();
c.scale(l, l);
c.translate( - g, -b);
for (var e, g = 0,
b = this.A.length; g < b; g++) l = this.A[g],
l.visible && 0 !== l.width && 0 !== l.height && (l.Rb(), e = l.Bb, e.right < this.Xc || e.bottom < this.Yc || e.left > this.Sd || e.top > this.Rd || (c.globalCompositeOperation = l.Uk, l.de(c)));
c.restore();
this.Gh && (a.globalCompositeOperation = this.Uk, a.globalAlpha = this.opacity, a.drawImage(d, 0, 0))
};
p.prototype.Cr = function(a, d, c) {
var g = this.ee();
this.Xc = a;
this.Yc = d;
this.Sd = a + this.n.eb * (1 / g);
this.Rd = d + this.n.cb * (1 / g);
a = this.yc();
0 !== a && (c && (c.translate(this.n.eb / 2, this.n.cb / 2), c.rotate( - a), c.translate(this.n.eb / -2, this.n.cb / -2)), this.Kg.set(this.Xc, this.Yc, this.Sd, this.Rd), this.Kg.offset((this.Xc + this.Sd) / -2, (this.Yc + this.Rd) / -2), this.xv.nv(this.Kg, a), this.xv.dt(this.Kg), this.Kg.offset((this.Xc + this.Sd) / 2, (this.Yc + this.Rd) / 2), this.Xc = this.Kg.left, this.Yc = this.Kg.top, this.Sd = this.Kg.right, this.Rd = this.Kg.bottom)
};
p.prototype.wd = function(a) {
var d = this.n.eb,
c = this.n.cb,
g = 0,
b = 0;
if (this.Gh = this.gq || 1 !== this.opacity || 0 < this.wb.length || 0 !== this.Id) {
this.n.Ae || (this.n.Ae = a.lg(this.n.eb, this.n.cb, this.n.qb));
if (this.n.Ae.Sk !== this.n.eb || this.n.Ae.Rk !== this.n.cb) a.deleteTexture(this.n.Ae),
this.n.Ae = a.lg(this.n.eb, this.n.cb, this.n.qb);
a.Uf(this.n.Ae);
this.dj && a.clear(0, 0, 0, 0)
}
this.dj || a.clear(this.dh[0] / 255, this.dh[1] / 255, this.dh[2] / 255, 1);
this.ri = !0;
var b = this.Zc(0, 0, !0, !0),
l = this.Zc(0, 0, !1, !0);
this.ri = !1;
this.n.Se && (b = b + 0.5 | 0, l = l + 0.5 | 0);
this.Cr(b, l, null);
l = this.ee();
a.Sf();
a.scale(l, l);
a.Dr( - this.yc());
a.translate((this.Xc + this.Sd) / -2, (this.Yc + this.Rd) / -2);
a.bg();
var e, n, m;
e = 0;
for (n = this.A.length; e < n; e++) if (m = this.A[e], m.visible && 0 !== m.width && 0 !== m.height && (m.Rb(), g = m.Bb, !(g.right < this.Xc || g.bottom < this.Yc || g.left > this.Sd || g.top > this.Rd))) if (m.Mv) if (g = m.wb[0].dd, b = m.wb[0].index, 1 !== m.wb.length || a.rr(g) || a.tA(g) || (m.B || m.F.yc()) && a.Vl(g) || 1 !== m.opacity || m.type.wa.wu) this.Lb.Ar(a, this, m, this.Gh ? this.n.Ae: this.Lb.dl()),
a.Sf(),
a.scale(l, l),
a.Dr( - this.yc()),
a.translate((this.Xc + this.Sd) / -2, (this.Yc + this.Rd) / -2),
a.bg();
else {
a.Xf(g);
a.Jh(m.qd, m.md);
a.Bo(g) && (this.n.Ga = !0);
var h = 0,
p = 0,
z = 0,
x = 0;
a.Vl(g) && (g = m.Bb, h = this.xb(g.left, g.top, !0, !0), p = this.xb(g.left, g.top, !1, !0), z = this.xb(g.right, g.bottom, !0, !0), g = this.xb(g.right, g.bottom, !1, !0), h /= d, p = 1 - p / c, z /= d, x = 1 - g / c);
a.mk(this.Gh ? this.n.Ae: this.Lb.dl(), 1 / m.width, 1 / m.height, h, p, z, x, this.ee(), this.yc(), this.Xc, this.Yc, m.cc[b]);
m.wd(a)
} else a.Xf(0),
a.Jh(m.qd, m.md),
m.wd(a);
this.Gh && (g = this.wb.length ? this.wb[0].dd: 0, b = this.wb.length ? this.wb[0].index: 0, 0 === this.wb.length || 1 === this.wb.length && !a.rr(g) && 1 === this.opacity ? (1 === this.wb.length ? (a.Xf(g), a.mk(this.Lb.dl(), 1 / this.n.eb, 1 / this.n.cb, 0, 0, 1, 1, this.ee(), this.yc(), this.Xc, this.Yc, this.cc[b]), a.Bo(g) && (this.n.Ga = !0)) : a.Xf(0), a.Uf(this.Lb.dl()), a.Kh(this.opacity), a.Qd(this.n.Ae), a.Jh(this.qd, this.md), a.Sf(), a.bg(), d = this.n.eb / 2, c = this.n.cb / 2, a.Do( - d, c, d, c, d, -c, -d, -c), a.Qd(null)) : this.Lb.Ar(a, this, null, this.Lb.dl()))
};
p.prototype.Zc = function(a, d, c, g) {
var b = this.n.devicePixelRatio;
this.n.Gi && (a *= b, d *= b);
var b = this.n.Ru,
l = this.n.Su,
b = (this.Lb.scrollX - b) * this.Od + b,
l = (this.Lb.scrollY - l) * this.Pd + l,
e = 1 / this.ee(!g);
g ? (b -= this.n.eb * e / 2, l -= this.n.cb * e / 2) : (b -= this.n.width * e / 2, l -= this.n.height * e / 2);
b += a * e;
l += d * e;
d = this.yc();
0 !== d && (b -= this.Lb.scrollX, l -= this.Lb.scrollY, a = Math.cos(d), d = Math.sin(d), g = b * a - l * d, l = l * a + b * d, b = g + this.Lb.scrollX, l += this.Lb.scrollY);
return c ? b: l
};
p.prototype.xb = function(a, d, c, g) {
var b = this.yc();
if (0 !== b) {
a -= this.Lb.scrollX;
d -= this.Lb.scrollY;
var l = Math.cos( - b),
b = Math.sin( - b),
e = a * l - d * b;
d = d * l + a * b;
a = e + this.Lb.scrollX;
d += this.Lb.scrollY
}
l = this.n.Ru;
b = this.n.Su;
l = (this.Lb.scrollX - l) * this.Od + l;
b = (this.Lb.scrollY - b) * this.Pd + b;
e = 1 / this.ee(!g);
g ? (l -= this.n.eb * e / 2, b -= this.n.cb * e / 2) : (l -= this.n.width * e / 2, b -= this.n.height * e / 2);
l = (a - l) / e;
b = (d - b) / e;
a = this.n.devicePixelRatio;
this.n.Gi && !g && (l /= a, b /= a);
return c ? l: b
};
p.prototype.Mb = function() {
var a, d, c, g = {
s: this.scale,
a: this.B,
vl: this.Xc,
vt: this.Yc,
vr: this.Sd,
vb: this.Rd,
v: this.visible,
bc: this.dh,
t: this.dj,
px: this.Od,
py: this.Pd,
o: this.opacity,
zr: this.td,
fx: [],
instances: []
};
a = 0;
for (d = this.Sa.length; a < d; a++) c = this.Sa[a],
g.fx.push({
name: c.name,
active: c.$,
params: this.cc[c.index]
});
return g
};
p.prototype.Vb = function(a) {
var d, c;
this.scale = a.s;
this.B = a.a;
this.Xc = a.vl;
this.Yc = a.vt;
this.Sd = a.vr;
this.Rd = a.vb;
this.visible = a.v;
this.dh = a.bc;
this.dj = a.t;
this.Od = a.px;
this.Pd = a.py;
this.opacity = a.o;
this.td = a.zr;
var g = a.fx;
a = 0;
for (d = g.length; a < d; a++) if (c = this.oq(g[a].name)) c.$ = g[a].active,
this.cc[c.index] = g[a].params;
this.Mg();
this.A.sort(e);
this.Ud = !0
};
bc = p
})(); (function() {
function h(a, b) {
var c, l = a.length;
switch (l) {
case 0:
return ! 0;
case 1:
return a[0] === b[0];
case 2:
return a[0] === b[0] && a[1] === b[1];
default:
for (c = 0; c < l; c++) if (a[c] !== b[c]) return ! 1;
return ! 0
}
}
function p(a, b) {
return a.index - b.index
}
function e(a) {
var b, c, l, d;
2 === a.length ? a[0].index > a[1].index && (b = a[0], a[0] = a[1], a[1] = b) : 2 < a.length && a.sort(p);
a.length >= A.length && (A.length = a.length + 1);
A[a.length] || (A[a.length] = []);
d = A[a.length];
b = 0;
for (c = d.length; b < c; b++) if (l = d[b], h(a, l)) return l;
d.push(a);
return a
}
function m(a, b) {
this.n = a;
this.Av = {};
this.Ct = {};
this.xq = !1;
this.Ut = new ha;
this.Xp = [];
this.Hp = [];
this.name = b[0];
var c = b[1];
this.qh = [];
var l, d;
l = 0;
for (d = c.length; l < d; l++) this.Wt(c[l], null, this.qh)
}
function a(a) {
this.type = a;
this.A = [];
this.nb = [];
this.Ha = !0
}
function d(a, b, c) {
this.sheet = a;
this.parent = b;
this.n = a.n;
this.gb = [];
this.Rh = [];
this.St = this.Yo = this.Tr = this.Qn = this.group = this.Mr = !1;
this.Hc = [];
this.df = [];
this.We = [];
this.fl = "";
this.vh = this.Qn = this.group = !1;
this.nn = null;
c[1] && (this.fl = c[1][1].toLowerCase(), this.group = !0, this.Qn = !!c[1][0], this.nn = [], this.vh = this.Qn, this.n.bh.push(this), this.n.Hj[this.fl] = this);
this.Re = c[2];
this.jb = c[4];
this.group || (this.n.ct[this.jb.toString()] = this);
var l = c[5];
a = 0;
for (b = l.length; a < b; a++) {
var d = new cc(this, l[a]);
d.index = a;
this.Hc.push(d);
this.Vs(d.type)
}
l = c[6];
a = 0;
for (b = l.length; a < b; a++) d = new dc(this, l[a]),
d.index = a,
this.df.push(d);
if (8 === c.length) for (c = c[7], a = 0, b = c.length; a < b; a++) this.sheet.Wt(c[a], this, this.We);
this.Vn = !1;
this.Hc.length && (this.Vn = null == this.Hc[0].type && this.Hc[0].$c == r.prototype.k.Nb)
}
function c(a, b) {
var c, l, d;
if (a && ( - 1 === b.indexOf(a) && b.push(a), a.nd)) for (c = 0, l = a.$d.length; c < l; c++) d = a.$d[c],
a !== d && -1 === b.indexOf(d) && b.push(d)
}
function g(a, b) {
this.qe = a;
this.sheet = a.sheet;
this.n = a.n;
this.Ka = [];
this.Kb = [];
this.Jb = {};
this.index = -1;
this.Ok = !1;
this.$c = b[1];
this.trigger = 0 < b[3];
this.Bt = 2 === b[3];
this.Mf = b[4];
this.Lj = b[5];
this.Zz = b[6];
this.jb = b[7];
this.n.zj[this.jb.toString()] = this; - 1 === b[0] ? (this.type = null, this.Ec = this.Fr, this.oi = null, this.Ie = -1) : (this.type = this.n.ea[b[0]], this.Ec = this.Zz ? this.IA: this.Er, b[2] ? (this.oi = this.type.In(b[2]), this.Ie = this.type.lq(b[2])) : (this.oi = null, this.Ie = -1), this.qe.parent && this.qe.parent.Oo());
this.Bt && (this.Ec = this.JA);
if (10 === b.length) {
var c, l, d = b[9];
c = 0;
for (l = d.length; c < l; c++) {
var g = new ec(this, d[c]);
this.Ka.push(g)
}
this.Kb.length = d.length
}
}
function b(a, b) {
this.qe = a;
this.sheet = a.sheet;
this.n = a.n;
this.Ka = [];
this.Kb = [];
this.Jb = {};
this.index = -1;
this.Ok = !1;
this.$c = b[1]; - 1 === b[0] ? (this.type = null, this.Ec = this.Fr, this.oi = null, this.Ie = -1) : (this.type = this.n.ea[b[0]], this.Ec = this.Er, b[2] ? (this.oi = this.type.In(b[2]), this.Ie = this.type.lq(b[2])) : (this.oi = null, this.Ie = -1));
this.jb = b[3];
this.n.wj[this.jb.toString()] = this;
if (6 === b.length) {
var c, l, d = b[5];
c = 0;
for (l = d.length; c < l; c++) {
var g = new ec(this, d[c]);
this.Ka.push(g)
}
this.Kb.length = d.length
}
}
function l(a, b) {
this.Aa = a;
this.qe = a.qe;
this.sheet = a.sheet;
this.n = a.n;
this.type = b[0];
this.If = null;
this.Sh = 0;
this.get = null;
this.jt = 0;
this.Lb = null;
this.key = 0;
this.object = null;
this.index = 0;
this.om = this.aj = this.om = this.aj = this.Dt = this.ti = this.pm = null;
this.Ye = !1;
var c, l, d;
switch (b[0]) {
case 0:
case 7:
this.If = new fc(this, b[1]);
this.Sh = 0;
this.get = this.sz;
break;
case 1:
this.If = new fc(this, b[1]);
this.Sh = 0;
this.get = this.tz;
break;
case 5:
this.If = new fc(this, b[1]);
this.Sh = 0;
this.get = this.xz;
break;
case 3:
case 8:
this.jt = b[1];
this.get = this.qz;
break;
case 6:
this.Lb = this.n.Sj[b[1]];
this.get = this.yz;
break;
case 9:
this.key = b[1];
this.get = this.wz;
break;
case 4:
this.object = this.n.ea[b[1]];
this.get = this.zz;
this.qe.Vs(this.object);
this.Aa instanceof dc ? this.qe.Oo() : this.qe.parent && this.qe.parent.Oo();
break;
case 10:
this.index = b[1];
a.type.za ? (this.get = this.uz, this.Ye = !0) : this.get = this.vz;
break;
case 11:
this.pm = b[1];
this.ti = null;
this.get = this.rz;
break;
case 2:
case 12:
this.Dt = b[1];
this.get = this.pz;
break;
case 13:
for (this.get = this.Az, this.aj = [], this.om = [], c = 1, l = b.length; c < l; c++) d = new ec(this.Aa, b[c]),
this.aj.push(d),
this.om.push(0)
}
}
function q(a, b, c) {
this.sheet = a;
this.parent = b;
this.n = a.n;
this.gb = [];
this.name = c[1];
this.qm = c[2];
this.T = c[3];
this.pl = !!c[4];
this.Un = !!c[5];
this.jb = c[6];
this.n.yk[this.jb.toString()] = this;
this.data = this.T;
this.parent ? (this.Qi = this.pl || this.Un ? -1 : this.n.SA++, this.n.Lx.push(this)) : (this.Qi = -1, this.n.Kx.push(this))
}
function n(a, b, c) {
this.sheet = a;
this.parent = b;
this.n = a.n;
this.gb = [];
this.gl = null;
this.Iz = c[1];
this.$ = !0
}
function D() {
this.uv = [];
this.reset(null)
}
var A = [];
m.prototype.toString = ea("name");
m.prototype.Wt = function(a, b, c) {
switch (a[0]) {
case 0:
a = new gc(this, b, a);
if (a.Re) for (c.push(a), c = 0, b = a.Hc.length; c < b; c++) a.Hc[c].trigger && this.Xt(a, c);
else a.eu() ? this.Xt(a, 0) : c.push(a);
break;
case 1:
a = new Zb(this, b, a);
c.push(a);
break;
case 2:
a = new hc(this, b, a),
c.push(a)
}
};
m.prototype.nc = function() {
var a, b;
a = 0;
for (b = this.qh.length; a < b; a++) this.qh[a].nc(a < b - 1 && this.qh[a + 1].Vn)
};
m.prototype.Yr = function() {
this.Xp.length = 0;
this.Hp.length = 0;
this.Us(this);
this.Hp.length = 0
};
m.prototype.Us = function(a) {
var b, c, l, d, g = a.Xp,
e = a.Hp,
n = this.Ut.wk();
b = 0;
for (c = n.length; b < c; ++b) l = n[b],
d = l.gl,
!l.$ || a === d || -1 < e.indexOf(d) || (e.push(d), d.Us(a), g.push(d))
};
m.prototype.Ec = function(a) {
this.n.vC || (this.xq = !0, a || (this.n.Dq = !0));
var b, c;
b = 0;
for (c = this.qh.length; b < c; b++) {
var l = this.qh[b];
l.Ec();
this.n.Op(l.gb);
this.n.Gf.nf() && !this.n.Jd.length || this.n.hd()
}
a || (this.n.Dq = !1)
};
m.prototype.Xt = function(a, b) {
a.Re || this.n.$o.push(a);
var c, l, d = a.Hc[b],
g;
g = d.type ? d.type.name: "system";
var e = (c = d.Bt) ? this.Ct: this.Av;
e[g] || (e[g] = []);
g = e[g];
e = d.$c;
if (c) {
if (d.Ka.length && (d = d.Ka[0], 1 === d.type && 2 === d.If.type)) {
d = d.If.value.toLowerCase();
c = 0;
for (l = g.length; c < l; c++) if (g[c].method == e) {
c = g[c].Xk;
c[d] ? c[d].push([a, b]) : c[d] = [[a, b]];
return
}
c = {};
c[d] = [[a, b]];
g.push({
method: e,
Xk: c
})
}
} else {
c = 0;
for (l = g.length; c < l; c++) if (g[c].method == e) {
g[c].Xk.push([a, b]);
return
}
s && e === s.prototype.k.rj ? g.unshift({
method: e,
Xk: [[a, b]]
}) : g.push({
method: e,
Xk: [[a, b]]
})
}
};
Nb = m;
a.prototype.wq = function() {
return this.Ha ? this.type.A.length: this.A.length
};
a.prototype.xd = function() {
return this.Ha ? this.type.A: this.A
};
a.prototype.Wi = function(a) {
a && (a.n.Jc().Ic.Re ? (this.Ha && (this.A.length = 0, Da(this.nb, a.type.A), this.Ha = !1), a = this.nb.indexOf(a), -1 !== a && (this.A.push(this.nb[a]), this.nb.splice(a, 1))) : (this.Ha = !1, this.A.length = 1, this.A[0] = a))
};
vb = a;
window._c2hh_ = "1A692C8C5A043401607D629CD5B9CCC88ED60FBD";
d.prototype.nc = function(a) {
var b, c = this.parent;
if (this.group) for (this.Yo = !0; c;) {
if (!c.group) {
this.Yo = !1;
break
}
c = c.parent
}
this.Tr = !this.eu() && (!this.parent || this.parent.group && this.parent.Yo);
this.St = !!a;
this.Rh = this.gb.slice(0);
for (c = this.parent; c;) {
a = 0;
for (b = c.gb.length; a < b; a++) this.Hx(c.gb[a]);
c = c.parent
}
this.gb = e(this.gb);
this.Rh = e(this.Rh);
a = 0;
for (b = this.Hc.length; a < b; a++) this.Hc[a].nc();
a = 0;
for (b = this.df.length; a < b; a++) this.df[a].nc();
a = 0;
for (b = this.We.length; a < b; a++) this.We[a].nc(a < b - 1 && this.We[a + 1].Vn)
};
d.prototype.No = function(a) {
if (this.vh !== !!a) {
this.vh = !!a;
var b;
a = 0;
for (b = this.nn.length; a < b; ++a) this.nn[a].Hv();
0 < b && this.n.ra.si && this.n.ra.si.Yr()
}
};
d.prototype.Vs = function(a) {
c(a, this.gb)
};
d.prototype.Hx = function(a) {
c(a, this.Rh)
};
d.prototype.Oo = function() {
this.Mr = !0;
this.parent && this.parent.Oo()
};
d.prototype.eu = function() {
return this.Hc.length ? this.Hc[0].trigger: !1
};
d.prototype.Ec = function() {
var a, b = !1,
c, l = this.n,
d = this.n.Jc();
d.Ic = this;
var g = this.Hc;
this.Vn || (d.Zp = !1);
if (this.Re) {
0 === g.length && (b = !0);
d.vc = 0;
for (a = g.length; d.vc < a; d.vc++) g[d.vc].trigger || (c = g[d.vc].Ec()) && (b = !0); (d.Ki = b) && this.Jo()
} else {
d.vc = 0;
for (a = g.length; d.vc < a; d.vc++) if (c = g[d.vc].Ec(), !c) {
d.Ki = !1; ! this.Tr || l.Gf.nf() && !l.Jd.length || l.hd();
return
}
d.Ki = !0;
this.Jo()
}
this.Ay(d)
};
d.prototype.Ay = function(a) {
a.Ki && this.St && (a.Zp = !0); ! this.Tr || this.n.Gf.nf() && !this.n.Jd.length || this.n.hd()
};
d.prototype.GA = function(a) {
this.n.Jc().Ic = this;
this.Hc[a].Ec() && (this.Jo(), this.n.Jc().Ki = !0)
};
d.prototype.Jo = function() {
var a = this.n.Jc(),
b;
a.Xd = 0;
for (b = this.df.length; a.Xd < b; a.Xd++) if (this.df[a.Xd].Ec()) return;
this.dv()
};
d.prototype.CA = function() {
var a = this.n.Jc(),
b;
for (b = this.df.length; a.Xd < b; a.Xd++) if (this.df[a.Xd].Ec()) return;
this.dv()
};
d.prototype.dv = function() {
if (this.We.length) {
var a, b, c, l, d = this.We.length - 1;
this.n.Co(this);
if (this.Mr) for (a = 0, b = this.We.length; a < b; a++) c = this.We[a],
(l = !this.Yo || !this.group && a < d) && this.n.Eh(c.gb),
c.Ec(),
l ? this.n.tf(c.gb) : this.n.Op(c.gb);
else for (a = 0, b = this.We.length; a < b; a++) this.We[a].Ec();
this.n.xo()
}
};
d.prototype.HA = function() {
var a = this.n.Jc();
a.Ic = this;
var b = !1,
c;
a.vc = 0;
for (c = this.Hc.length; a.vc < c; a.vc++) if (this.Hc[a.vc].Ec()) b = !0;
else if (!this.Re) return ! 1;
return this.Re ? b: !0
};
d.prototype.Hh = function() {
this.n.An++;
var a = this.n.Jc().vc,
b = this.n.Co(this);
if (!this.Re) for (b.vc = a + 1, a = this.Hc.length; b.vc < a; b.vc++) if (!this.Hc[b.vc].Ec()) {
this.n.xo();
return
}
this.Jo();
this.n.xo()
};
d.prototype.Qz = function(a) {
var b = a.index;
if (0 === b) return ! 0;
for (--b; 0 <= b; --b) if (this.Hc[b].type === a.type) return ! 1;
return ! 0
};
gc = d;
g.prototype.nc = function() {
var a, b, c;
a = 0;
for (b = this.Ka.length; a < b; a++) c = this.Ka[a],
c.nc(),
c.Ye && (this.Ok = !0)
};
g.prototype.JA = k(!0);
g.prototype.Fr = function() {
var a, b;
a = 0;
for (b = this.Ka.length; a < b; a++) this.Kb[a] = this.Ka[a].get();
return Wa(this.$c.apply(this.n.Yf, this.Kb), this.Lj)
};
g.prototype.IA = function() {
var a, b;
a = 0;
for (b = this.Ka.length; a < b; a++) this.Kb[a] = this.Ka[a].get();
a = this.$c.apply(this.oi ? this.oi: this.type, this.Kb);
this.type.pe();
return a
};
g.prototype.Er = function() {
var a, b, c, l, d, g, e, n, m = this.type,
q = m.Ea(),
h = this.qe.Re && !this.trigger;
b = 0;
var D = m.nd,
p = m.za,
A = m.rg,
t = this.Ie,
z = -1 < t,
V = this.Ok,
G = this.Ka,
Q = this.Kb,
aa = this.Lj,
Y = this.$c,
L;
if (V) for (b = 0, d = G.length; b < d; ++b) g = G[b],
g.Ye || (Q[b] = g.get(0));
else for (b = 0, d = G.length; b < d; ++b) Q[b] = G[b].get(0);
if (q.Ha) {
q.A.length = 0;
q.nb.length = 0;
L = m.A;
a = 0;
for (l = L.length; a < l; ++a) {
n = L[a];
if (V) for (b = 0, d = G.length; b < d; ++b) g = G[b],
g.Ye && (Q[b] = g.get(a));
z ? (b = 0, p && (b = n.type.Cj[A]), b = Y.apply(n.$a[t + b], Q)) : b = Y.apply(n, Q); (e = Wa(b, aa)) ? q.A.push(n) : h && q.nb.push(n)
}
m.finish && m.finish(!0);
q.Ha = !1;
m.pe();
return q.wq()
}
c = 0;
L = (e = h && !this.qe.Qz(this)) ? q.nb: q.A;
var Ka = !1;
a = 0;
for (l = L.length; a < l; ++a) {
n = L[a];
if (V) for (b = 0, d = G.length; b < d; ++b) g = G[b],
g.Ye && (Q[b] = g.get(a));
z ? (b = 0, p && (b = n.type.Cj[A]), b = Y.apply(n.$a[t + b], Q)) : b = Y.apply(n, Q);
if (Wa(b, aa)) if (Ka = !0, e) {
if (q.A.push(n), D) for (b = 0, d = n.siblings.length; b < d; b++) g = n.siblings[b],
g.type.Ea().A.push(g)
} else {
L[c] = n;
if (D) for (b = 0, d = n.siblings.length; b < d; b++) g = n.siblings[b],
g.type.Ea().A[c] = g;
c++
} else if (e) {
L[c] = n;
if (D) for (b = 0, d = n.siblings.length; b < d; b++) g = n.siblings[b],
g.type.Ea().nb[c] = g;
c++
} else if (h && (q.nb.push(n), D)) for (b = 0, d = n.siblings.length; b < d; b++) g = n.siblings[b],
g.type.Ea().nb.push(g)
}
L.length = c;
if (D) for (p = m.$d, a = 0, l = p.length; a < l; a++) n = p[a].Ea(),
e ? n.nb.length = c: n.A.length = c;
c = Ka;
if (e && !Ka) for (a = 0, l = q.A.length; a < l; a++) {
n = q.A[a];
if (V) for (b = 0, d = G.length; b < d; b++) g = G[b],
g.Ye && (Q[b] = g.get(a));
b = z ? Y.apply(n.$a[t], Q) : Y.apply(n, Q);
if (Wa(b, aa)) {
Ka = !0;
break
}
}
m.finish && m.finish(c || h);
return h ? Ka: q.wq()
};
cc = g;
b.prototype.nc = function() {
var a, b, c;
a = 0;
for (b = this.Ka.length; a < b; a++) c = this.Ka[a],
c.nc(),
c.Ye && (this.Ok = !0)
};
b.prototype.Fr = function() {
var a, b;
a = 0;
for (b = this.Ka.length; a < b; a++) this.Kb[a] = this.Ka[a].get();
return this.$c.apply(this.n.Yf, this.Kb)
};
b.prototype.Er = function() {
var a = this.type.Ea().xd(),
b = this.type.za,
c = this.type.rg,
l = this.Ie,
d = -1 < l,
g = this.Ok,
e = this.Ka,
n = this.Kb,
m = this.$c,
q,
h,
D,
p,
A,
t;
if (g) for (h = 0, p = e.length; h < p; ++h) A = e[h],
A.Ye || (n[h] = A.get(0));
else for (h = 0, p = e.length; h < p; ++h) n[h] = e[h].get(0);
q = 0;
for (D = a.length; q < D; ++q) {
t = a[q];
if (g) for (h = 0, p = e.length; h < p; ++h) A = e[h],
A.Ye && (n[h] = A.get(q));
d ? (h = 0, b && (h = t.type.Cj[c]), m.apply(t.$a[l + h], n)) : m.apply(t, n)
}
return ! 1
};
dc = b;
var t = [],
z = -1;
l.prototype.nc = function() {
var a, b;
if (11 === this.type) this.ti = this.n.Kt(this.pm, this.qe.parent);
else if (13 === this.type) for (a = 0, b = this.aj.length; a < b; a++) this.aj[a].nc();
this.If && this.If.nc()
};
l.prototype.cA = function(a) {
this.Ye || !a || a.wa.Po || (this.Ye = !0)
};
l.prototype.kv = function() {
this.Ye = !0
};
l.prototype.Mc = function() {
z++;
t.length === z && t.push(new ic);
return t[z]
};
l.prototype.Dc = function() {
z--
};
l.prototype.sz = function(a) {
this.Sh = a || 0;
a = this.Mc();
this.If.get(a);
this.Dc();
return a.data
};
l.prototype.tz = function(a) {
this.Sh = a || 0;
a = this.Mc();
this.If.get(a);
this.Dc();
return ma(a.data) ? a.data: ""
};
l.prototype.zz = ea("object");
l.prototype.qz = ea("jt");
l.prototype.xz = function(a) {
this.Sh = a || 0;
a = this.Mc();
this.If.get(a);
this.Dc();
return a.Tc() ? this.n.Oe(a.data) : this.n.Gj(a.data)
};
l.prototype.yz = ea("Lb");
l.prototype.wz = ea("key");
l.prototype.vz = ea("index");
l.prototype.uz = function(a) {
a = a || 0;
var b = this.Aa.type,
c = null,
c = b.Ea(),
l = c.xd();
if (l.length) c = l[a % l.length].type;
else if (c.nb.length) c = c.nb[a % c.nb.length].type;
else if (b.A.length) c = b.A[a % b.A.length].type;
else return 0;
return this.index + c.Cn[b.rg]
};
l.prototype.rz = ea("ti");
l.prototype.pz = ea("Dt");
l.prototype.Az = function() {
var a, b;
a = 0;
for (b = this.aj.length; a < b; a++) this.om[a] = this.aj[a].get();
return this.om
};
ec = l;
q.prototype.nc = function() {
this.gb = e(this.gb)
};
q.prototype.Jg = function(a) {
var b = this.n.It();
this.parent && !this.pl && b ? (this.Qi >= b.length && (b.length = this.Qi + 1), b[this.Qi] = a) : this.data = a
};
q.prototype.yi = function() {
var a = this.n.It();
return ! this.parent || this.pl || !a || this.Un ? this.data: this.Qi >= a.length || "undefined" === typeof a[this.Qi] ? this.T: a[this.Qi]
};
q.prototype.Ec = function() { ! this.parent || this.pl || this.Un || this.Jg(this.T)
};
Zb = q;
n.prototype.toString = function() {
return "include:" + this.gl.toString()
};
n.prototype.nc = function() {
this.gl = this.n.aq[this.Iz];
this.sheet.Ut.add(this);
this.gb = e(this.gb);
for (var a = this.parent; a;) a.group && a.nn.push(this),
a = a.parent;
this.Hv()
};
n.prototype.Ec = function() {
this.parent && this.n.Xl(this.n.ea);
this.gl.xq || this.gl.Ec(!0);
this.parent && this.n.tf(this.n.ea)
};
n.prototype.Hv = function() {
for (var a = this.parent; a;) {
if (a.group && !a.vh) {
this.$ = !1;
return
}
a = a.parent
}
this.$ = !0
};
hc = n;
D.prototype.reset = function(a) {
this.Ic = a;
this.Xd = this.vc = 0;
this.uv.length = 0;
this.Zp = this.Ki = !1
};
D.prototype.bu = function() {
return this.Ic.Mr ? !0 : this.vc < this.Ic.Hc.length - 1 ? !!this.Ic.gb.length: !1
};
Yb = D
})(); (function() {
function h(e, m) {
this.Aa = e;
this.n = e.n;
this.type = m[0];
this.get = [this.My, this.Iy, this.Uy, this.Xy, this.Cy, this.Vy, this.Qy, this.Fy, this.Py, this.Ty, this.Dy, this.Sy, this.Gy, this.Ry, this.Ny, this.Oy, this.Jy, this.Ky, this.Ey, this.Wy, this.zt, this.Ly, this.zt, this.Hy][this.type];
var a = null;
this.Nd = this.Ka = this.Kb = this.$c = this.Vo = this.Wc = this.first = this.value = null;
this.Ie = -1;
this.vg = null;
this.$r = -1;
this.ti = this.pm = null;
this.Yl = !1;
switch (this.type) {
case 0:
case 1:
case 2:
this.value = m[1];
break;
case 3:
this.first = new fc(e, m[1]);
break;
case 18:
this.first = new fc(e, m[1]);
this.Wc = new fc(e, m[2]);
this.Vo = new fc(e, m[3]);
break;
case 19:
this.$c = m[1];
this.$c !== r.prototype.j.random && this.$c !== r.prototype.j.yj || this.Aa.kv();
this.Kb = [];
this.Ka = [];
3 === m.length ? (a = m[2], this.Kb.length = a.length + 1) : this.Kb.length = 1;
break;
case 20:
this.Nd = this.n.ea[m[1]];
this.Ie = -1;
this.$c = m[2];
this.Yl = m[3];
v && this.$c === v.prototype.j.di && this.Aa.kv();
this.vg = m[4] ? new fc(e, m[4]) : null;
this.Kb = [];
this.Ka = [];
6 === m.length ? (a = m[5], this.Kb.length = a.length + 1) : this.Kb.length = 1;
break;
case 21:
this.Nd = this.n.ea[m[1]];
this.Yl = m[2];
this.vg = m[3] ? new fc(e, m[3]) : null;
this.$r = m[4];
break;
case 22:
this.Nd = this.n.ea[m[1]];
this.Nd.In(m[2]);
this.Ie = this.Nd.lq(m[2]);
this.$c = m[3];
this.Yl = m[4];
this.vg = m[5] ? new fc(e, m[5]) : null;
this.Kb = [];
this.Ka = [];
7 === m.length ? (a = m[6], this.Kb.length = a.length + 1) : this.Kb.length = 1;
break;
case 23:
this.pm = m[1],
this.ti = null
}
this.Aa.cA(this.Nd);
4 <= this.type && 17 >= this.type && (this.first = new fc(e, m[1]), this.Wc = new fc(e, m[2]));
if (a) {
var d, c;
d = 0;
for (c = a.length; d < c; d++) this.Ka.push(new fc(e, a[d]))
}
}
function p(e, m) {
this.type = e || jc.pj;
this.data = m || 0;
this.bk = null;
this.type == jc.pj && (this.data = Math.floor(this.data))
}
h.prototype.nc = function() {
23 === this.type && (this.ti = this.Aa.n.Kt(this.pm, this.Aa.qe.parent));
this.first && this.first.nc();
this.Wc && this.Wc.nc();
this.Vo && this.Vo.nc();
this.vg && this.vg.nc();
if (this.Ka) {
var e, m;
e = 0;
for (m = this.Ka.length; e < m; e++) this.Ka[e].nc()
}
};
h.prototype.Wy = function(e) {
this.Kb[0] = e;
e = this.Aa.Mc();
var m, a;
m = 0;
for (a = this.Ka.length; m < a; m++) this.Ka[m].get(e),
this.Kb[m + 1] = e.data;
this.Aa.Dc();
this.$c.apply(this.n.Yf, this.Kb)
};
h.prototype.zt = function(e) {
var m = this.Nd.Ea(),
a = m.xd();
if (!a.length) if (m.nb.length) a = m.nb;
else {
this.Yl ? e.rb("") : e.ta(0);
return
}
this.Kb[0] = e;
e.bk = this.Nd;
e = this.Aa.Mc();
var d, m = 0;
for (d = this.Ka.length; m < d; m++) this.Ka[m].get(e),
this.Kb[m + 1] = e.data;
m = this.Aa.Sh;
this.vg && (this.vg.get(e), e.Tc() && (m = e.data, a = this.Nd.A));
this.Aa.Dc();
m %= a.length;
0 > m && (m += a.length);
a = a[m]; - 1 < this.Ie ? (e = 0, this.Nd.za && (e = a.type.Cj[this.Nd.rg]), this.$c.apply(a.$a[this.Ie + e], this.Kb)) : this.$c.apply(a, this.Kb)
};
h.prototype.Ly = function(e) {
var m = this.Nd.Ea(),
a = m.xd();
if (!a.length) if (m.nb.length) a = m.nb;
else {
this.Yl ? e.rb("") : e.ta(0);
return
}
m = this.Aa.Sh;
if (this.vg) {
var d = this.Aa.Mc();
this.vg.get(d);
if (d.Tc()) {
m = d.data;
a = this.Nd.A;
m %= a.length;
0 > m && (m += a.length);
a = a[m].jc[this.$r];
ma(a) ? e.rb(a) : e.K(a);
this.Aa.Dc();
return
}
this.Aa.Dc()
}
m %= a.length;
0 > m && (m += a.length);
a = a[m];
m = 0;
this.Nd.za && (m = a.type.Cn[this.Nd.rg]);
a = a.jc[this.$r + m];
ma(a) ? e.rb(a) : e.K(a)
};
h.prototype.My = function(e) {
e.type = jc.pj;
e.data = this.value
};
h.prototype.Iy = function(e) {
e.type = jc.oj;
e.data = this.value
};
h.prototype.Uy = function(e) {
e.type = jc.Pm;
e.data = this.value
};
h.prototype.Xy = function(e) {
this.first.get(e);
e.Tc() && (e.data = -e.data)
};
h.prototype.Cy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() && m.Tc() && (e.data += m.data, m.Oj() && e.Zj());
this.Aa.Dc()
};
h.prototype.Vy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() && m.Tc() && (e.data -= m.data, m.Oj() && e.Zj());
this.Aa.Dc()
};
h.prototype.Qy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() && m.Tc() && (e.data *= m.data, m.Oj() && e.Zj());
this.Aa.Dc()
};
h.prototype.Fy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() && m.Tc() && (e.data /= m.data, e.Zj());
this.Aa.Dc()
};
h.prototype.Py = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() && m.Tc() && (e.data %= m.data, m.Oj() && e.Zj());
this.Aa.Dc()
};
h.prototype.Ty = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() && m.Tc() && (e.data = Math.pow(e.data, m.data), m.Oj() && e.Zj());
this.Aa.Dc()
};
h.prototype.Dy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() ? m.Wn() ? e.rb(e.data.toString() + m.data) : e.data && m.data ? e.ta(1) : e.ta(0) : e.Wn() && (e.data = m.Wn() ? e.data + m.data: e.data + (Math.round(1E10 * m.data) / 1E10).toString());
this.Aa.Dc()
};
h.prototype.Sy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.Tc() && m.Tc() && (e.data || m.data ? e.ta(1) : e.ta(0));
this.Aa.Dc()
};
h.prototype.Ey = function(e) {
this.first.get(e);
e.data ? this.Wc.get(e) : this.Vo.get(e)
};
h.prototype.Gy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.ta(e.data === m.data ? 1 : 0);
this.Aa.Dc()
};
h.prototype.Ry = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.ta(e.data !== m.data ? 1 : 0);
this.Aa.Dc()
};
h.prototype.Ny = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.ta(e.data < m.data ? 1 : 0);
this.Aa.Dc()
};
h.prototype.Oy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.ta(e.data <= m.data ? 1 : 0);
this.Aa.Dc()
};
h.prototype.Jy = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.ta(e.data > m.data ? 1 : 0);
this.Aa.Dc()
};
h.prototype.Ky = function(e) {
this.first.get(e);
var m = this.Aa.Mc();
this.Wc.get(m);
e.ta(e.data >= m.data ? 1 : 0);
this.Aa.Dc()
};
h.prototype.Hy = function(e) {
var m = this.ti.yi();
la(m) ? e.K(m) : e.rb(m)
};
fc = h;
p.prototype.Oj = function() {
return this.type === jc.oj
};
p.prototype.Tc = function() {
return this.type === jc.pj || this.type === jc.oj
};
p.prototype.Wn = function() {
return this.type === jc.Pm
};
p.prototype.Zj = function() {
this.Oj() || (this.Wn() && (this.data = parseFloat(this.data)), this.type = jc.oj)
};
p.prototype.ta = function(e) {
this.type = jc.pj;
this.data = Math.floor(e)
};
p.prototype.K = function(e) {
this.type = jc.oj;
this.data = e
};
p.prototype.rb = function(e) {
this.type = jc.Pm;
this.data = e
};
p.prototype.Vf = function(e) {
la(e) ? (this.type = jc.oj, this.data = e) : ma(e) ? (this.type = jc.Pm, this.data = e.toString()) : (this.type = jc.pj, this.data = 0)
};
ic = p;
jc = {
pj: 0,
oj: 1,
Pm: 2
}
})();
function r(h) {
this.n = h;
this.Td = []
}
r.prototype.Mb = function() {
var h = {},
p, e, m, a, d, c, g, b;
h.waits = [];
var l = h.waits,
q;
p = 0;
for (e = this.Td.length; p < e; p++) {
c = this.Td[p];
q = {
t: c.time,
ev: c.Aj.jb,
sm: [],
sols: {}
};
c.Aj.df[c.Xd] && (q.act = c.Aj.df[c.Xd].jb);
m = 0;
for (a = c.gb.length; m < a; m++) q.sm.push(c.gb[m].jb);
for (d in c.Fd) if (c.Fd.hasOwnProperty(d)) {
g = this.n.ea[parseInt(d, 10)];
b = {
sa: c.Fd[d].Ko,
insts: []
};
m = 0;
for (a = c.Fd[d].wg.length; m < a; m++) b.insts.push(c.Fd[d].wg[m].uid);
q.sols[g.jb.toString()] = b
}
l.push(q)
}
return h
};
r.prototype.Vb = function(h) {
h = h.waits;
var p, e, m, a, d, c, g, b, l, q, n;
p = this.Td.length = 0;
for (e = h.length; p < e; p++) if (c = h[p], b = this.n.ct[c.ev.toString()]) {
l = -1;
m = 0;
for (a = b.df.length; m < a; m++) if (b.df[m].jb === c.act) {
l = m;
break
}
if ( - 1 !== l) {
g = {
Fd: {},
gb: [],
Yp: !1
};
g.time = c.t;
g.Aj = b;
g.Xd = l;
m = 0;
for (a = c.sm.length; m < a; m++)(b = this.n.Ln(c.sm[m])) && g.gb.push(b);
for (d in c.sols) if (c.sols.hasOwnProperty(d) && (b = this.n.Ln(parseInt(d, 10)))) {
l = c.sols[d];
q = {
Ko: l.sa,
wg: []
};
m = 0;
for (a = l.insts.length; m < a; m++)(n = this.n.uh(l.insts[m])) && q.wg.push(n);
g.Fd[b.index.toString()] = q
}
this.Td.push(g)
}
}
}; (function() {
function h() {}
function p() {}
function e() {}
var m = r.prototype;
h.prototype.hp = k(!0);
h.prototype.je = k(!0);
h.prototype.Dw = k(!0);
h.prototype.N = function(a, c, d) {
return kc(a, c, d)
};
h.prototype.Pg = function(a, c, d) {
var g = this.n.Jc(),
e = g.Ic,
g = g.bu();
a = this.n.$u(a);
if (d < c) if (g) for (; c >= d && !a.Fc; --c) this.n.Eh(e.gb),
a.index = c,
e.Hh(),
this.n.tf(e.gb);
else for (; c >= d && !a.Fc; --c) a.index = c,
e.Hh();
else if (g) for (; c <= d && !a.Fc; ++c) this.n.Eh(e.gb),
a.index = c,
e.Hh(),
this.n.tf(e.gb);
else for (; c <= d && !a.Fc; ++c) a.index = c,
e.Hh();
this.n.Vu();
return ! 1
};
var a = [],
d = -1;
h.prototype.ip = function(b) {
var c = b.Ea();
d++;
a.length === d && a.push([]);
var g = a[d];
Da(g, c.xd());
var e = this.n.Jc(),
m = e.Ic,
h = e.bu(),
e = this.n.$u(),
p,
z,
x,
y,
H,
N,
S = b.nd;
if (h) for (h = 0, p = g.length; h < p && !e.Fc; h++) {
this.n.Eh(m.gb);
y = g[h];
c = b.Ea();
c.Ha = !1;
c.A.length = 1;
c.A[0] = y;
if (S) for (z = 0, x = y.siblings.length; z < x; z++) H = y.siblings[z],
N = H.type.Ea(),
N.Ha = !1,
N.A.length = 1,
N.A[0] = H;
e.index = h;
m.Hh();
this.n.tf(m.gb)
} else for (c.Ha = !1, c.A.length = 1, h = 0, p = g.length; h < p && !e.Fc; h++) {
y = g[h];
c.A[0] = y;
if (S) for (z = 0, x = y.siblings.length; z < x; z++) H = y.siblings[z],
N = H.type.Ea(),
N.Ha = !1,
N.A.length = 1,
N.A[0] = H;
e.index = h;
m.Hh()
}
g.length = 0;
this.n.Vu();
d--;
return ! 1
};
h.prototype.lb = function(b, c, g, e) {
var m, h, p, z;
if (b) {
d++;
a.length === d && a.push([]);
var x = a[d],
y = b.Ea();
Da(x, y.xd());
y.Ha && (y.nb.length = 0);
var H = this.n.Fj();
p = m = 0;
for (h = x.length; m < h; m++) z = x[m],
x[p] = z,
c = H.Ka[1].get(m),
e = H.Ka[3].get(m),
kc(c, g, e) ? p++:y.nb.push(z);
x.length = p;
y.Ha = !1;
Da(y.A, x);
x.length = 0;
d--;
b.pe();
return !! y.A.length
}
};
h.prototype.O = function() {
var a = this.n.Fj().Jb;
"undefined" === typeof a.Bp && (a.Bp = -1);
var c = a.Bp,
d = this.n.Xe;
a.Bp = d;
return this.n.Mq || c !== d - 1
};
h.prototype.S = function(a, c, d) {
return kc(a.yi(), c, d)
};
h.prototype.D = function(a) {
return (a = this.n.Hj[a.toLowerCase()]) && a.vh
};
h.prototype.iw = function() {
return "undefined" !== typeof cr_is_preview
};
h.prototype.Gm = function(a) {
if (!a || !a.A.length) return ! 1;
a.Ea().Ha = !0;
a.pe();
return ! 0
};
h.prototype.Rg = function() {
return this.n.we
};
h.prototype.ks = function(a, c, d) {
return a >= c && a <= d
};
h.prototype.Nb = function() {
var a = this.n.Jc();
return a.Zp ? !1 : !a.Ki
};
h.prototype.np = k(!0);
h.prototype.vw = k(!0);
h.prototype.op = k(!0);
h.prototype.Fw = k(!0);
h.prototype.mp = k(!0);
h.prototype.pw = function(a) {
return !! this.n.uh(a)
};
m.k = new h;
p.prototype.Hd = function(a) {
this.n.Ii || this.n.kg || (this.n.kg = a)
};
p.prototype.xa = function(a, c, d, g) {
if (c && a && (c = this.n.Rp(a, c, d, g))) {
this.n.ve++;
var e;
this.n.trigger(Object.getPrototypeOf(a.wa).k.Oa, c);
if (c.nd) for (d = 0, g = c.siblings.length; d < g; d++) e = c.siblings[d],
this.n.trigger(Object.getPrototypeOf(e.type.wa).k.Oa, e);
this.n.ve--;
a = a.Ea();
a.Ha = !1;
a.A.length = 1;
a.A[0] = c;
if (c.nd) for (d = 0, g = c.siblings.length; d < g; d++) e = c.siblings[d],
a = e.type.Ea(),
a.Ha = !1,
a.A.length = 1,
a.A[0] = e
}
};
p.prototype.Gs = function(a) {
this.n.ra.$l(a)
};
p.prototype.Uw = function(a, c) {
this.n.ra.Lo(a);
this.n.ra.$l(c)
};
p.prototype.G = function(a, c) {
if("H_cur_distance"==a.name){
window.gscore=c;
}
0 === a.qm ? la(c) ? a.Jg(c) : a.Jg(parseFloat(c)) : 1 === a.qm && a.Jg(c.toString())
};
p.prototype.Ca = function(a, c) {
0 === a.qm ? la(c) ? a.Jg(a.yi() + c) : a.Jg(a.yi() + parseFloat(c)) : 1 === a.qm && a.Jg(a.yi() + c.toString())
};
p.prototype.Qm = function(a, c) {
0 === a.qm && (la(c) ? a.Jg(a.yi() - c) : a.Jg(a.yi() - parseFloat(c)))
};
p.prototype.u = function(a, c) {
var d = this.n.Hj[a.toLowerCase()];
if (d) switch (c) {
case 0:
d.No(!1);
break;
case 1:
d.No(!0);
break;
case 2:
d.No(!d.vh)
}
};
p.prototype.Mm = function(a) {
0 > a && (a = 0);
this.n.cj = a
};
p.prototype.Df = function(a, c) {
var d = c;
0 > d && (d = 0);
if (a) {
var g = a.Ea().xd(),
e,
m;
e = 0;
for (m = g.length; e < m; e++) g[e].Ui = d
}
};
var c = [],
g = [];
p.prototype.Za = function(a) {
if (! (0 > a)) {
var d, e, n, m = this.n.Jc(),
h;
h = c.length ? c.pop() : {
Fd: {},
gb: []
};
h.Yp = !1;
h.time = this.n.xe.kb + a;
h.Aj = m.Ic;
h.Xd = m.Xd + 1;
a = 0;
for (d = this.n.ea.length; a < d; a++) n = this.n.ea[a],
e = n.Ea(),
e.Ha && -1 === m.Ic.gb.indexOf(n) || (h.gb.push(n), n = void 0, n = g.length ? g.pop() : {
wg: []
},
n.Ko = !1, n.Ko = e.Ha, Da(n.wg, e.A), h.Fd[a.toString()] = n);
this.Td.push(h);
return ! 0
}
};
p.prototype.Qg = function(a) {
if (!this.n.Ii && !this.n.kg) for (var c in this.n.Sj) if (this.n.Sj.hasOwnProperty(c) && ob(c, a)) {
this.n.kg = this.n.Sj[c];
break
}
};
p.prototype.up = function() {
if (!this.n.Ii && !this.n.kg && this.n.ra) {
this.n.kg = this.n.ra;
var a, c, d;
a = 0;
for (c = this.n.bh.length; a < c; a++) d = this.n.bh[a],
d.No(d.Qn)
}
};
m.b = new p;
e.prototype["int"] = function(a, c) {
ma(c) ? (a.ta(parseInt(c, 10)), isNaN(a.data) && (a.data = 0)) : a.ta(c)
};
e.prototype["float"] = function(a, c) {
ma(c) ? (a.K(parseFloat(c)), isNaN(a.data) && (a.data = 0)) : a.K(c)
};
e.prototype.UA = function(a, c) {
ma(c) ? a.rb(c) : a.rb(c.toString())
};
e.prototype.xl = function(a, c) {
a.ta(c.length || 0)
};
e.prototype.random = function(a, c, d) {
void 0 === d ? a.K(Math.random() * c) : a.K(Math.random() * (d - c) + c)
};
e.prototype.sqrt = function(a, c) {
a.K(Math.sqrt(c))
};
e.prototype.abs = function(a, c) {
a.K(Math.abs(c))
};
e.prototype.round = function(a, c) {
a.ta(Math.round(c))
};
e.prototype.floor = function(a, c) {
a.ta(Math.floor(c))
};
e.prototype.ceil = function(a, c) {
a.ta(Math.ceil(c))
};
e.prototype.sin = function(a, c) {
a.K(Math.sin(Ga(c)))
};
e.prototype.cos = function(a, c) {
a.K(Math.cos(Ga(c)))
};
e.prototype.tan = function(a, c) {
a.K(Math.tan(Ga(c)))
};
e.prototype.asin = function(a, c) {
a.K(Ha(Math.asin(c)))
};
e.prototype.acos = function(a, c) {
a.K(Ha(Math.acos(c)))
};
e.prototype.exp = function(a, c) {
a.K(Math.exp(c))
};
e.prototype.max = function(a) {
var c = arguments[1],
d,
g;
d = 2;
for (g = arguments.length; d < g; d++) c < arguments[d] && (c = arguments[d]);
a.K(c)
};
e.prototype.min = function(a) {
var c = arguments[1],
d,
g;
d = 2;
for (g = arguments.length; d < g; d++) c > arguments[d] && (c = arguments[d]);
a.K(c)
};
e.prototype.Ra = function(a) {
a.K(this.n.Ra)
};
e.prototype.cj = function(a) {
a.K(this.n.cj)
};
e.prototype.time = function(a) {
a.K(this.n.xe.kb)
};
e.prototype.Xe = function(a) {
a.ta(this.n.Xe)
};
e.prototype.ck = function(a) {
a.ta(this.n.ck)
};
e.prototype.rh = function(a) {
a.ta(this.n.rh)
};
e.prototype.Qb = function(a, c) {
var d, g, e;
if (this.n.Yj.length) if (c) {
g = 0;
for (e = this.n.Yj.length; g < e; g++) if (d = this.n.Yj[g], d.name === c) {
a.ta(d.index);
return
}
a.ta(0)
} else d = this.n.Jt(),
a.ta(d ? d.index: -1);
else a.ta(0)
};
e.prototype.B = function(a, c, d, g, e) {
a.K(Ha(Na(c, d, g, e)))
};
e.prototype.MA = function(a) {
a.K(this.n.ra.scrollX)
};
e.prototype.am = function(a) {
a.K(this.n.ra.scrollY)
};
e.prototype.Xa = function(a, c, d, g) {
a.K(Xa(c, d, g))
};
e.prototype.sn = function(a, c, d, g, e, m) {
a.K($a(c, d, g, e, m))
};
e.prototype.Sv = function(a) {
a.ta(this.n.width)
};
e.prototype.Rv = function(a) {
a.ta(this.n.height)
};
e.prototype.bA = function(a, c) {
a.rb(ma(c) ? c.toLowerCase() : "")
};
e.prototype.Gc = function(a, c, d, g) {
c < d ? a.K(d) : c > g ? a.K(g) : a.K(c)
};
e.prototype.find = function(a, c, d) {
ma(c) && ma(d) ? a.ta(c.search(RegExp(fb(d), "i"))) : a.ta( - 1)
};
e.prototype.left = function(a, c, d) {
a.rb(ma(c) ? c.substr(0, d) : "")
};
e.prototype.right = function(a, c, d) {
a.rb(ma(c) ? c.substr(c.length - d) : "")
};
e.prototype.da = function(a, c, d, g) {
ma(c) && ma(g) ? (c = c.split(g), d = wa(d), 0 > d || d >= c.length ? a.rb("") : a.rb(c[d])) : a.rb("")
};
e.prototype.lm = function(a, c, d) {
ma(c) && c.length ? a.ta(c.split(d).length) : a.ta(0)
};
e.prototype.replace = function(a, c, d, g) {
ma(c) && ma(d) && ma(g) ? a.rb(c.replace(RegExp(fb(d), "gi"), g)) : a.rb(ma(c) ? c: "")
};
e.prototype.Be = function(a) {
this.n.ra ? a.rb(this.n.ra.name) : a.rb("")
};
e.prototype.yj = function(a) {
var c = wa(Math.random() * (arguments.length - 1));
a.Vf(arguments[c + 1])
};
e.prototype.Qp = function(a) {
a.K(this.n.Qp / 1E3)
};
e.prototype.Nv = function(a, c) {
var d = this.n.Jn(c);
a.K(d ? d.Xc: 0)
};
e.prototype.tm = function(a, c) {
var d = this.n.Jn(c);
a.K(d ? d.Yc: 0)
};
e.prototype.gd = function(a, c) {
var d = this.n.Jn(c);
a.K(d ? d.Sd: 0)
};
e.prototype.Qc = function(a, c) {
var d = this.n.Jn(c);
a.K(d ? d.Rd: 0)
};
e.prototype.Ni = function(a) {
a.K(this.n.Ni)
};
e.prototype.fd = function(a, c, d, g) {
a.K(Ya(c, d, g))
};
m.j = new e;
m.FA = function() {
var a, d, e, n, m, h, p = this.n.Jc();
a = 0;
for (e = this.Td.length; a < e; a++) if (n = this.Td[a], !(n.time > this.n.xe.kb)) {
p.Ic = n.Aj;
p.Xd = n.Xd;
p.vc = 0;
for (d in n.Fd) n.Fd.hasOwnProperty(d) && (m = this.n.ea[parseInt(d, 10)].Ea(), h = n.Fd[d], m.Ha = h.Ko, Da(m.A, h.wg), m = h, m.wg.length = 0, g.push(m));
n.Aj.CA();
this.n.Op(n.gb);
n.Yp = !0
}
d = a = 0;
for (e = this.Td.length; a < e; a++) n = this.Td[a],
this.Td[d] = n,
n.Yp ? (bb(n.Fd), n.gb.length = 0, c.push(n)) : d++;
this.Td.length = d
}
})(); (function() {
ub = function(h) {
var e = h[0].prototype,
m = h[1],
a = h[3],
d = h[4],
c = h[5],
g = h[6],
b = h[7];
h = h[8];
e.k || (e.k = {});
e.b || (e.b = {});
e.j || (e.j = {});
var l = e.k,
q = e.b,
e = e.j;
a && (l.zm = function(a, b) {
return kc(this.x, a, b)
},
l.Fe = function(a, b) {
return kc(this.y, a, b)
},
l.Sg = function() {
var a = this.F;
this.Rb();
var b = this.Bb;
return ! (b.right < a.Xc || b.bottom < a.Yc || b.left > a.Sd || b.top > a.Rd)
},
l.zB = function() {
this.Rb();
var a = this.Bb,
b = this.n.ra;
return 0 > a.right || 0 > a.bottom || a.left > b.width || a.top > b.height
},
l.Ik = function(a, b, c) {
var d = this.Ea(),
g = d.xd();
if (!g.length) return ! 1;
var l = g[0],
e = l,
m = Va(l.x, l.y, b, c),
h,
q,
p;
h = 1;
for (q = g.length; h < q; h++) if (l = g[h], p = Va(l.x, l.y, b, c), 0 === a && p < m || 1 === a && p > m) m = p,
e = l;
d.Wi(e);
return ! 0
},
q.tc = function(a) {
this.x !== a && (this.x = a, this.Ta())
},
q.ki = function(a) {
this.y !== a && (this.y = a, this.Ta())
},
q.mb = function(a, b) {
if (this.x !== a || this.y !== b) this.x = a,
this.y = b,
this.Ta()
},
q.Zw = function(a, b) {
var c = a.jz(this);
if (c) {
var d;
c.xi ? (d = c.xi(b, !0), c = c.xi(b, !1)) : (d = c.x, c = c.y);
if (this.x !== d || this.y !== c) this.x = d,
this.y = c,
this.Ta()
}
},
q.DB = function(a) {
0 !== a && (this.x += Math.cos(this.B) * a, this.y += Math.sin(this.B) * a, this.Ta())
},
q.CB = function(a, b) {
0 !== b && (this.x += Math.cos(Ga(a)) * b, this.y += Math.sin(Ga(a)) * b, this.Ta())
},
e.H = function(a) {
a.K(this.x)
},
e.J = function(a) {
a.K(this.y)
},
e.Ra = function(a) {
a.K(this.n.mf(this))
});
d && (l.nB = function(a, b) {
return kc(this.width, a, b)
},
l.mB = function(a, b) {
return kc(this.height, a, b)
},
q.jd = function(a) {
this.width !== a && (this.width = a, this.Ta())
},
q.WB = function(a) {
this.height !== a && (this.height = a, this.Ta())
},
q.Km = function(a, b) {
if (this.width !== a || this.height !== b) this.width = a,
this.height = b,
this.Ta()
},
e.le = function(a) {
a.K(this.width)
},
e.ka = function(a) {
a.K(this.height)
},
e.jB = function(a) {
this.Rb();
a.K(this.Bb.left)
},
e.kB = function(a) {
this.Rb();
a.K(this.Bb.top)
},
e.hs = function(a) {
this.Rb();
a.K(this.Bb.right)
},
e.iB = function(a) {
this.Rb();
a.K(this.Bb.bottom)
});
c && (l.hB = function(a, b) {
return Oa(this.B, Ga(b)) <= Ga(a)
},
l.xB = function(a) {
return Sa(this.B, Ga(a))
},
l.vB = function(a, b) {
var c = Ma(a),
d = Ma(b),
g = Ja(this.B);
return Sa(d, c) ? Sa(g, c) && !Sa(g, d) : !(!Sa(g, c) && Sa(g, d))
},
q.ii = function(a) {
a = Ga(Ia(a));
isNaN(a) || this.B === a || (this.B = a, this.Ta())
},
q.OB = function(a) {
0 === a || isNaN(a) || (this.B += Ga(a), this.B = Ja(this.B), this.Ta())
},
q.PB = function(a) {
0 === a || isNaN(a) || (this.B -= Ga(a), this.B = Ja(this.B), this.Ta())
},
q.QB = function(a, b) {
var c = Pa(this.B, Ga(b), Ga(a));
isNaN(c) || this.B === c || (this.B = c, this.Ta())
},
q.RB = function(a, b, c) {
a = Pa(this.B, Math.atan2(c - this.y, b - this.x), Ga(a));
isNaN(a) || this.B === a || (this.B = a, this.Ta())
},
q.bC = function(a, b) {
var c = Math.atan2(b - this.y, a - this.x);
isNaN(c) || this.B === c || (this.B = c, this.Ta())
},
e.gB = function(a) {
a.K(La(this.B))
});
m || (l.C = function(a, b, c) {
return kc(this.jc[a], b, c)
},
l.wB = function(a) {
return this.jc[a]
},
l.JB = function(a, b) {
var c = this.Ea(),
d = c.xd();
if (!d.length) return ! 1;
var g = d[0],
l = g,
e = g.jc[b],
m,
h,
q;
m = 1;
for (h = d.length; m < h; m++) if (g = d[m], q = g.jc[b], 0 === a && q < e || 1 === a && q > e) e = q,
l = g;
c.Wi(l);
return ! 0
},
l.Qw = function(a) {
var b, c, d, g, l;
if (this.n.Fj().Lj) {
l = this.Ea();
if (l.Ha) for (l.Ha = !1, l.A.length = 0, l.nb.length = 0, d = this.A, b = 0, c = d.length; b < c; b++) g = d[b],
g.uid === a ? l.nb.push(g) : l.A.push(g);
else {
d = b = 0;
for (c = l.A.length; b < c; b++) g = l.A[b],
l.A[d] = g,
g.uid === a ? l.nb.push(g) : d++;
l.A.length = d
}
this.pe();
return !! l.A.length
}
g = this.n.uh(a);
if (!g) return ! 1;
l = this.Ea();
if (!l.Ha && -1 === l.A.indexOf(g)) return ! 1;
if (this.za) for (a = g.type.Ub, b = 0, c = a.length; b < c; b++) {
if (a[b] === this) return l.Wi(g),
this.pe(),
!0
} else if (g.type === this) return l.Wi(g),
this.pe(),
!0;
return ! 1
},
l.Oa = k(!0), l.ss = k(!0), q.I = function(a, b) {
var c = this.jc;
la(c[a]) ? c[a] = la(b) ? b: parseFloat(b) : ma(c[a]) && (c[a] = ma(b) ? b: b.toString())
},
q.Bk = function(a, b) {
var c = this.jc;
la(c[a]) ? c[a] = la(b) ? c[a] + b: c[a] + parseFloat(b) : ma(c[a]) && (c[a] = ma(b) ? c[a] + b: c[a] + b.toString())
},
q.jx = function(a, b) {
var c = this.jc;
la(c[a]) && (c[a] = la(b) ? c[a] - b: c[a] - parseFloat(b))
},
q.TB = function(a, b) {
this.jc[a] = b ? 1 : 0
},
q.gC = function(a) {
this.jc[a] = 1 - this.jc[a]
},
q.R = function() {
this.n.Af(this)
},
q.ow || (q.ow = function(a) {
var b, c;
try {
b = JSON.parse(a)
} catch(d) {
return
}
this.n.jo(this, b, !0);
this.ef && this.ef();
if (this.$a) for (a = 0, b = this.$a.length; a < b; ++a) c = this.$a[a],
c.ef && c.ef()
}), e.rB = function(a) {
var b = a.bk.A.length,
c, d, g;
c = 0;
for (d = this.n.Jd.length; c < d; c++) g = this.n.Jd[c],
a.bk.za ? 0 <= g.type.Ub.indexOf(a.bk) && b++:g.type === a.bk && b++;
a.ta(b)
},
e.Cs = function(a) {
a.ta(a.bk.Ea().xd().length)
},
e.Rm = function(a) {
a.ta(this.uid)
},
e.tB = function(a) {
a.ta(this.el())
},
e.xm || (e.xm = function(a) {
a.rb(JSON.stringify(this.n.Gr(this, !0)))
}));
g && (l.kp = ea("visible"), q.na = function(a) { ! a !== !this.visible && (this.visible = a, this.n.Ga = !0)
},
l.Vd = function(a, b) {
return kc(nb(100 * this.opacity), a, b)
},
q.la = function(a) {
a /= 100;
0 > a ? a = 0 : 1 < a && (a = 1);
a !== this.opacity && (this.opacity = a, this.n.Ga = !0)
},
e.Opacity = function(a) {
a.K(nb(100 * this.opacity))
});
b && (l.yB = function(a) {
return a ? this.F === a: !1
},
l.Rw = function(a) {
var b = this.Ea(),
c = b.xd();
if (!c.length) return ! 1;
var d = c[0],
g = d,
l,
e;
l = 1;
for (e = c.length; l < e; l++) if (d = c[l], 0 === a) {
if (d.F.index > g.F.index || d.F.index === g.F.index && d.te() > g.te()) g = d
} else if (d.F.index < g.F.index || d.F.index === g.F.index && d.te() < g.te()) g = d;
b.Wi(g);
return ! 0
},
q.Wd = function() {
var a = this.te();
a !== this.F.A.length - 1 && (Ca(this.F.A, a), this.F.A.push(this), this.n.Ga = !0, this.F.Ud = !0)
},
q.Bf = function() {
var a = this.te();
0 !== a && (Ca(this.F.A, a), this.F.A.unshift(this), this.n.Ga = !0, this.F.Ud = !0)
},
q.EB = function(a) {
a && a != this.F && (Ca(this.F.A, this.te()), this.F.Ud = !0, this.F = a, this.hj = a.A.length, a.A.push(this), this.n.Ga = !0)
},
q.Ya = function(a, b) {
var c = 0 === a;
if (b) {
var d = b.qq(this);
if (d && d.uid !== this.uid) {
this.F.index !== d.F.index && (Ca(this.F.A, this.te()), this.F.Ud = !0, this.F = d.F, this.hj = d.F.A.length, d.F.A.push(this));
var g = this.te(),
d = d.te();
Ca(this.F.A, g);
g < d && d--;
c && d++;
d === this.F.A.length ? this.F.A.push(this) : this.F.A.splice(d, 0, this);
this.F.Ud = !0;
this.n.Ga = !0
}
}
},
e.BB = function(a) {
a.ta(this.F.Bu)
},
e.AB = function(a) {
a.rb(this.F.name)
},
e.Os = function(a) {
a.ta(this.te())
});
h && (q.UB = function(a, b) {
if (this.n.fa) {
var c = this.type.pq(b);
if (! (0 > c)) {
var d = 1 === a;
this.ah[c] !== d && (this.ah[c] = d, this.Mg(), this.n.Ga = !0)
}
}
},
q.VB = function(a, b, c) {
if (this.n.fa) {
var d = this.type.pq(a);
0 > d || (a = this.type.Sa[d], d = this.cc[d], b = Math.floor(b), 0 > b || b >= d.length || (1 === this.n.fa.mz(a.dd, b) && (c /= 100), d[b] !== c && (d[b] = c, a.$ && (this.n.Ga = !0))))
}
})
};
Ob = function() {
this.Np = this.Jp = !0;
this.type.Xm = !0;
this.n.Ga = !0;
var h, e, m = this.Kp;
h = 0;
for (e = m.length; h < e; ++h) m[h](this)
};
Pb = function(h) {
h && this.Kp.push(h)
};
Rb = function() {
if (this.Jp) {
var h = this.Bb,
e = this.kd;
h.set(this.x, this.y, this.x + this.width, this.y + this.height);
h.offset( - this.yd * this.width, -this.zd * this.height);
this.B ? (h.offset( - this.x, -this.y), e.nv(h, this.B), e.offset(this.x, this.y), e.dt(h)) : e.dm(h);
h.normalize();
this.Jp = !1
}
};
var h = new za(0, 0, 0, 0);
Sb = function() {
if (this.Np && this.Je) {
this.Rb();
var p = this.type.Tk,
e = this.kh,
m = this.Bb;
h.set(p.Sm(m.left), p.Tm(m.top), p.Sm(m.right), p.Tm(m.bottom));
e.By(h) || (e.right < e.left ? p.update(this, null, h) : p.update(this, e, h), e.copy(h), this.Np = !1)
}
};
Qb = function(h, e) {
return this.Bb.ae(h, e) && this.kd.ae(h, e) ? this.zb && !this.zb.Nj() ? (this.zb.xj(this.width, this.height, this.B), this.zb.ae(h - this.x, e - this.y)) : !0 : !1
};
Kb = function() {
this.type.dp();
return this.Bi
};
Tb = function() {
this.F.aB();
return this.hj
};
Xb = function() {
this.wb.length = 0;
var h, e;
h = 0;
for (e = this.ah.length; h < e; h++) this.ah[h] && this.wb.push(this.type.Sa[h]);
this.Mv = !!this.wb.length
};
Lb = function() {
return "Inst" + this.Zu
};
xb = function(h) {
if (h && h.nd && h.type != this) {
var e, m, a;
e = 0;
for (m = h.siblings.length; e < m; e++) if (a = h.siblings[e], a.type == this) return a
}
h = this.Ea().xd();
return h.length ? h[0] : null
};
yb = function(h) {
var e = this.Ea().xd();
return e.length ? e[h.el() % e.length] : null
};
wb = function() {
if (this.qk && !this.za) {
var h, e;
h = 0;
for (e = this.A.length; h < e; h++) this.A[h].Bi = h;
var m = h,
a = this.n.Jd;
h = 0;
for (e = a.length; h < e; ++h) a[h].type === this && (a[h].Bi = m++);
this.qk = !1
}
};
Ib = function(h) {
if (h < this.A.length) return this.A[h];
h -= this.A.length;
var e = this.n.Jd,
m, a;
m = 0;
for (a = e.length; m < a; ++m) if (e[m].type === this) {
if (0 === h) return e[m]; --h
}
return null
};
zb = function() {
return this.Th[this.ng]
};
Ab = function() {
this.ng++;
this.ng === this.Th.length ? this.Th.push(new vb(this)) : this.Th[this.ng].Ha = !0
};
Bb = function() {
this.ng++;
this.ng === this.Th.length && this.Th.push(new vb(this));
var h = this.Th[this.ng],
e = this.Th[this.ng - 1];
e.Ha ? h.Ha = !0 : (h.Ha = !1, Da(h.A, e.A), Da(h.nb, e.nb))
};
Cb = function() {
this.ng--
};
Eb = function(h) {
var e, m, a, d, c, g = 0;
if (!this.za) for (e = 0, m = this.Ub.length; e < m; e++) for (c = this.Ub[e], a = 0, d = c.uc.length; a < d; a++) {
if (h === c.uc[a].name) return this.Jb.gu = g,
c.uc[a];
g++
}
e = 0;
for (m = this.uc.length; e < m; e++) {
if (h === this.uc[e].name) return this.Jb.gu = g,
this.uc[e];
g++
}
return null
};
Fb = function(h) {
return this.In(h) ? this.Jb.gu: -1
};
Gb = function(h) {
var e, m;
e = 0;
for (m = this.Sa.length; e < m; e++) if (this.Sa[e].name === h) return e;
return - 1
};
Hb = function() {
if (this.nd && !this.za) {
var h, e, m, a, d, c, g;
this.dp();
c = this.Ea();
var b = c.Ha,
l = (h = this.n.Jc()) && h.Ic && h.Ic.Re;
h = 0;
for (e = this.$d.length; h < e; h++) if (d = this.$d[h], d !== this && (d.dp(), g = d.Ea(), g.Ha = b, !b)) {
g.A.length = c.A.length;
m = 0;
for (a = c.A.length; m < a; m++) g.A[m] = d.Lt(c.A[m].Bi);
if (l) for (g.nb.length = c.nb.length, m = 0, a = c.nb.length; m < a; m++) g.nb[m] = d.Lt(c.nb[m].Bi)
}
}
};
Jb = function() {
return "Type" + this.jb
};
kc = function(h, e, m) {
if ("undefined" === typeof h || "undefined" === typeof m) return ! 1;
switch (e) {
case 0:
return h === m;
case 1:
return h !== m;
case 2:
return h < m;
case 3:
return h <= m;
case 4:
return h > m;
case 5:
return h >= m;
default:
return ! 1
}
}
})();
var vc = {};
function xc(h) {
this.n = h
} (function() {
function h() {
return g.length ? g.pop() : []
}
function p(a) {
var c, d;
c = 0;
for (d = a.length; c < d; c++) Array.isArray(a[c]) && p(a[c]);
a.length = 0;
g.push(a)
}
function e() {}
function m() {}
function a() {}
var d = xc.prototype;
d.ga = function(a) {
this.wa = a;
this.n = a.n
};
d.ga.prototype.U = f();
d.X = function(a) {
this.type = a;
this.n = a.n
};
var c = d.X.prototype,
g = [];
Array.isArray || (Array.isArray = function(a) {
return "[object Array]" === Object.prototype.toString.call(a)
});
c.U = function() {
this.vd = this.L[0];
this.be = this.L[1];
this.re = this.L[2];
this.Ed || (this.gf = h());
var a = this.gf;
a.length = this.vd;
var c, d, g;
for (c = 0; c < this.vd; c++) for (a[c] || (a[c] = h()), a[c].length = this.be, d = 0; d < this.be; d++) for (a[c][d] || (a[c][d] = h()), a[c][d].length = this.re, g = 0; g < this.re; g++) a[c][d][g] = 0
};
c.sf = function() {
var a;
for (a = 0; a < this.vd; a++) p(this.gf[a]);
this.gf.length = 0
};
c.hf = function(a, c, d) {
a = Math.floor(a);
c = Math.floor(c);
d = Math.floor(d);
return isNaN(a) || 0 > a || a > this.vd - 1 || isNaN(c) || 0 > c || c > this.be - 1 || isNaN(d) || 0 > d || d > this.re - 1 ? 0 : this.gf[a][c][d]
};
c.set = function(a, c, d, g) {
a = Math.floor(a);
c = Math.floor(c);
d = Math.floor(d);
isNaN(a) || 0 > a || a > this.vd - 1 || isNaN(c) || 0 > c || c > this.be - 1 || isNaN(d) || 0 > d || d > this.re - 1 || (this.gf[a][c][d] = g)
};
c.Ht = function() {
return JSON.stringify({
c2array: !0,
size: [this.vd, this.be, this.re],
data: this.gf
})
};
c.Mb = function() {
return {
size: [this.vd, this.be, this.re],
data: this.gf
}
};
c.Vb = function(a) {
var c = a.size;
this.vd = c[0];
this.be = c[1];
this.re = c[2];
this.gf = a.data
};
c.Lh = function(a, c, d) {
0 > a && (a = 0);
0 > c && (c = 0);
0 > d && (d = 0);
if (this.vd !== a || this.be !== c || this.re !== d) {
this.vd = a;
this.be = c;
this.re = d;
var g, e, m = this.gf;
m.length = a;
for (a = 0; a < this.vd; a++) for (ja(m[a]) && (m[a] = h()), m[a].length = c, g = 0; g < this.be; g++) for (ja(m[a][g]) && (m[a][g] = h()), m[a][g].length = d, e = 0; e < this.re; e++) ja(m[a][g][e]) && (m[a][g][e] = 0)
}
};
e.prototype.zm = function(a, c, d) {
return kc(this.hf(a, 0, 0), c, d)
};
c.jC = function(a) {
this.n.Eh(a.gb);
a.Hh();
this.n.tf(a.gb)
};
d.k = new e;
m.prototype.Km = function(a, c, d) {
this.Lh(a, c, d)
};
m.prototype.tc = function(a, c) {
this.set(a, 0, 0, c)
};
m.prototype.Ls = function(a, c, d, g) {
this.set(a, c, d, g)
};
m.prototype.Es = function(a) {
var c = 0,
d = 0,
g = this.gf;
if (0 !== this.vd && 0 !== this.be && 0 !== this.re) switch (a) {
case 0:
g.reverse();
break;
case 1:
for (; c < this.vd; c++) g[c].reverse();
break;
case 2:
for (; c < this.vd; c++) for (d = 0; d < this.be; d++) g[c][d].reverse();
this.re--
}
};
m.prototype.Fk = function(a) {
var c;
try {
c = JSON.parse(a)
} catch(d) {
return
}
c.c2array && (a = c.size, this.vd = a[0], this.be = a[1], this.re = a[2], this.gf = c.data)
};
d.b = new m;
a.prototype.gp = function(a, c, d, g) {
a.Vf(this.hf(c, d || 0, g || 0))
};
a.prototype.le = function(a) {
a.ta(this.vd)
};
a.prototype.ka = function(a) {
a.ta(this.be)
};
a.prototype.xm = function(a) {
a.rb(this.Ht())
};
d.j = new a
})();
function B(h) {
this.n = h
} (function() {
function h(a) {
a = Math.pow(10, a / 20);
0 > a && (a = 0);
1 < a && (a = 1);
return a
}
function p(a) {
0 > a && (a = 0);
1 < a && (a = 1);
return 20 * (Math.log(a) / Math.log(10))
}
function e(a) {
a = a.toLowerCase();
return pa.hasOwnProperty(a) && pa[a].length ? pa[a][0].se() : L.destination
}
function m() {
return L.createGain ? L.createGain() : L.createGainNode()
}
function a(a) {
return L.createDelay ? L.createDelay(a) : L.createDelayNode(a)
}
function d(a) {
a.start ? a.start(0) : a.noteOn(0)
}
function c(a, b, c) {
a.start ? a.start(0, b) : a.noteGrainOn(0, b, c - b)
}
function g(a) {
try {
a.stop ? a.stop(0) : a.noteOff(0)
} catch(b) {}
}
function b(a, b, c, d, g, l) {
this.type = "filter";
this.Kc = [a, b, c, d, g, l];
this.pb = m();
this.La = m();
this.La.gain.value = l;
this.Ja = m();
this.Ja.gain.value = 1 - l;
this.wc = L.createBiquadFilter();
this.wc.type = "number" === typeof this.wc.type ? a: Xc[a];
this.wc.frequency.value = b;
this.wc.detune && (this.wc.detune.value = c);
this.wc.Q.value = d;
this.wc.gain.value = g;
this.pb.connect(this.wc);
this.pb.connect(this.Ja);
this.wc.connect(this.La)
}
function l(b, c, d) {
this.type = "delay";
this.Kc = [b, c, d];
this.pb = m();
this.La = m();
this.La.gain.value = d;
this.Ja = m();
this.Ja.gain.value = 1 - d;
this.Gl = m();
this.Me = a(b);
this.Me.delayTime.value = b;
this.wn = m();
this.wn.gain.value = c;
this.pb.connect(this.Gl);
this.pb.connect(this.Ja);
this.Gl.connect(this.La);
this.Gl.connect(this.Me);
this.Me.connect(this.wn);
this.wn.connect(this.Gl)
}
function q(a, b, c, d) {
this.type = "convolve";
this.Kc = [b, c, d];
this.pb = m();
this.La = m();
this.La.gain.value = c;
this.Ja = m();
this.Ja.gain.value = 1 - c;
this.pi = L.createConvolver();
a && (this.pi.normalize = b, this.pi.buffer = a);
this.pb.connect(this.pi);
this.pb.connect(this.Ja);
this.pi.connect(this.La)
}
function n(b, c, g, l, e) {
this.type = "flanger";
this.Kc = [b, c, g, l, e];
this.pb = m();
this.Ja = m();
this.Ja.gain.value = 1 - e / 2;
this.La = m();
this.La.gain.value = e / 2;
this.Dn = m();
this.Dn.gain.value = l;
this.Me = a(b + c);
this.Me.delayTime.value = b;
this.Vc = L.createOscillator();
this.Vc.frequency.value = g;
this.ie = m();
this.ie.gain.value = c;
this.pb.connect(this.Me);
this.pb.connect(this.Ja);
this.Me.connect(this.La);
this.Me.connect(this.Dn);
this.Dn.connect(this.Me);
this.Vc.connect(this.ie);
this.ie.connect(this.Me.delayTime);
d(this.Vc)
}
function D(a, b, c, g, l, e) {
this.type = "phaser";
this.Kc = [a, b, c, g, l, e];
this.pb = m();
this.Ja = m();
this.Ja.gain.value = 1 - e / 2;
this.La = m();
this.La.gain.value = e / 2;
this.wc = L.createBiquadFilter();
this.wc.type = "number" === typeof this.wc.type ? 7 : "allpass";
this.wc.frequency.value = a;
this.wc.detune && (this.wc.detune.value = b);
this.wc.Q.value = c;
this.Vc = L.createOscillator();
this.Vc.frequency.value = l;
this.ie = m();
this.ie.gain.value = g;
this.pb.connect(this.wc);
this.pb.connect(this.Ja);
this.wc.connect(this.La);
this.Vc.connect(this.ie);
this.ie.connect(this.wc.frequency);
d(this.Vc)
}
function A(a) {
this.type = "gain";
this.Kc = [a];
this.ub = m();
this.ub.gain.value = a
}
function t(a, b) {
this.type = "tremolo";
this.Kc = [a, b];
this.ub = m();
this.ub.gain.value = 1 - b / 2;
this.Vc = L.createOscillator();
this.Vc.frequency.value = a;
this.ie = m();
this.ie.gain.value = b / 2;
this.Vc.connect(this.ie);
this.ie.connect(this.ub.gain);
d(this.Vc)
}
function z(a, b) {
this.type = "ringmod";
this.Kc = [a, b];
this.pb = m();
this.La = m();
this.La.gain.value = b;
this.Ja = m();
this.Ja.gain.value = 1 - b;
this.Zl = m();
this.Zl.gain.value = 0;
this.Vc = L.createOscillator();
this.Vc.frequency.value = a;
this.Vc.connect(this.Zl.gain);
d(this.Vc);
this.pb.connect(this.Zl);
this.pb.connect(this.Ja);
this.Zl.connect(this.La)
}
function x(a, b, c, d, g) {
this.type = "distortion";
this.Kc = [a, b, c, d, g];
this.pb = m();
this.zo = m();
this.yo = m();
this.NA(c, Math.pow(10, d / 20));
this.La = m();
this.La.gain.value = g;
this.Ja = m();
this.Ja.gain.value = 1 - g;
this.fp = L.createWaveShaper();
this.un = new Float32Array(65536);
this.cz(a, b);
this.fp.un = this.un;
this.pb.connect(this.zo);
this.pb.connect(this.Ja);
this.zo.connect(this.fp);
this.fp.connect(this.yo);
this.yo.connect(this.La)
}
function y(a, b, c, d, g) {
this.type = "compressor";
this.Kc = [a, b, c, d, g];
this.ub = L.createDynamicsCompressor();
try {
this.ub.threshold.value = a,
this.ub.knee.value = b,
this.ub.ratio.value = c,
this.ub.attack.value = d,
this.ub.release.value = g
} catch(l) {}
}
function H(a, b) {
this.type = "analyser";
this.Kc = [a, b];
this.ub = L.createAnalyser();
this.ub.fftSize = a;
this.ub.smoothingTimeConstant = b;
this.az = new Float32Array(this.ub.frequencyBinCount);
this.qv = new Uint8Array(a);
this.Sl = 0
}
function N() {
this.fb = null;
this.ko = 0;
this.Uh = [];
this.Yq = this.$n = this.Zn = 0
}
function S(a, b) {
this.src = a;
this.yb = Y;
this.pf = b;
this.Xs = !1;
var c = this;
this.Wq = this.lr = null;
this.jk = [];
this.Mo = 0;
this.tv = this.to = !1;
Y === G && b && (this.yb = V, this.lr = m());
this.Qk = this.Ob = null;
var d;
switch (this.yb) {
case V:
this.Ob = new Audio;
Y !== G || !L.createMediaElementSource || u.au || /wiiu/i.test(navigator.userAgent) || (this.tv = !0, this.Ob.addEventListener("canplay",
function() {
c.Wq || (c.Wq = L.createMediaElementSource(c.Ob), c.Wq.connect(c.lr))
}));
this.Ob.autoplay = !1;
this.Ob.tC = "auto";
this.Ob.src = a;
break;
case G:
d = new XMLHttpRequest;
d.open("GET", a, !0);
d.responseType = "arraybuffer";
d.onload = function() {
c.Qk = d.response;
c.cy()
};
d.send();
break;
case Q:
this.Ob = !0;
break;
case aa:
this.Ob = !0
}
}
function K(a, b) {
var c = this;
this.Vh = b;
this.Fc = this.ug = !0;
this.src = a.src;
this.buffer = a;
this.yb = Y;
this.pf = a.pf;
this.playbackRate = 1;
this.nr = !0;
this.qf = this.Gg = !1;
this.Ce = 0;
this.ol = this.Qj = this.Mf = !1;
this.$j = this.volume = 1;
this.startTime = u.xe.kb;
this.mc = this.xc = null;
this.Pf = !1;
this.lc = null;
this.Ou = this.Nu = this.Mu = this.Lu = this.Qu = this.Pu = 0;
this.P = null;
var d = !1;
this.yb !== G || this.buffer.yb !== V || this.buffer.tv || (this.yb = V);
switch (this.yb) {
case V:
this.pf ? (this.P = a.Ob, d = !a.Xs, a.Xs = !0) : (this.P = new Audio, this.P.autoplay = !1, this.P.src = a.Ob.src, d = !0);
d && this.P.addEventListener("ended",
function() {
da = c.Vh;
c.Fc = !0;
u.trigger(B.prototype.k.lp, M)
});
break;
case G:
this.xc = m();
this.xc.connect(e(b));
this.buffer.yb === G ? a.Ob && (this.P = L.createBufferSource(), this.P.buffer = a.Ob, this.P.connect(this.xc)) : (this.P = this.buffer.Ob, this.buffer.lr.connect(this.xc));
break;
case Q:
this.P = new window.Media(X + this.src, null, null,
function(a) {
a === window.Media.MEDIA_STOPPED && (c.nr = !0, c.Fc = !0, da = c.Vh, u.trigger(B.prototype.k.lp, M))
});
break;
case aa:
this.P = !0
}
}
function F(a) {
qa.length = 0;
if (a.length) {
var b, c, d;
b = 0;
for (c = ka.length; b < c; b++) d = ka[b],
ob(a, d.Vh) && qa.push(d)
} else hb && !hb.Jj() && (qa.length = 1, qa[0] = hb)
}
function T(a, b) {
pa.hasOwnProperty(a) ? pa[a].push(b) : pa[a] = [b];
var c, d, g, l, e = L.destination;
if (pa.hasOwnProperty(a) && (g = pa[a], g.length)) for (e = g[0].se(), c = 0, d = g.length; c < d; c++) l = g[c],
c + 1 === d ? l.Ke(L.destination) : l.Ke(g[c + 1].se());
F(a);
c = 0;
for (d = qa.length; c < d; c++) qa[c].yA(e);
cb && Ub === a && (cb.disconnect(), cb.connect(e))
}
function ca() {}
function R() {}
function W() {}
var w = B.prototype;
w.ga = function(a) {
this.wa = a;
this.n = a.n
};
w.ga.prototype.U = f();
var u = null,
M = null,
da = "",
X = "",
V = 0,
G = 1,
Q = 2,
aa = 3,
Y = V,
L = null,
Ka = [],
ka = [],
hb = null,
pb = !1,
Db = 0,
Qa = !1,
Ra = 1,
ib = 0,
jb = 0,
Vb = 1,
Wb = 1,
Qc = 10,
Rc = 1E4,
Sc = 1,
cb = null,
Ub = "",
qb = !1,
rb = [],
pa = {},
Xc = "lowpass highpass bandpass lowshelf highshelf peaking notch allpass".split(" ");
b.prototype.Ke = function(a) {
this.La.disconnect();
this.La.connect(a);
this.Ja.disconnect();
this.Ja.connect(a)
};
b.prototype.remove = function() {
this.pb.disconnect();
this.wc.disconnect();
this.La.disconnect();
this.Ja.disconnect()
};
b.prototype.se = ea("pb");
l.prototype.Ke = function(a) {
this.La.disconnect();
this.La.connect(a);
this.Ja.disconnect();
this.Ja.connect(a)
};
l.prototype.remove = function() {
this.pb.disconnect();
this.Gl.disconnect();
this.Me.disconnect();
this.wn.disconnect();
this.La.disconnect();
this.Ja.disconnect()
};
l.prototype.se = ea("pb");
q.prototype.Ke = function(a) {
this.La.disconnect();
this.La.connect(a);
this.Ja.disconnect();
this.Ja.connect(a)
};
q.prototype.remove = function() {
this.pb.disconnect();
this.pi.disconnect();
this.La.disconnect();
this.Ja.disconnect()
};
q.prototype.se = ea("pb");
n.prototype.Ke = function(a) {
this.Ja.disconnect();
this.Ja.connect(a);
this.La.disconnect();
this.La.connect(a)
};
n.prototype.remove = function() {
this.pb.disconnect();
this.Me.disconnect();
this.Vc.disconnect();
this.ie.disconnect();
this.Ja.disconnect();
this.La.disconnect();
this.Dn.disconnect()
};
n.prototype.se = ea("pb");
D.prototype.Ke = function(a) {
this.Ja.disconnect();
this.Ja.connect(a);
this.La.disconnect();
this.La.connect(a)
};
D.prototype.remove = function() {
this.pb.disconnect();
this.wc.disconnect();
this.Vc.disconnect();
this.ie.disconnect();
this.Ja.disconnect();
this.La.disconnect()
};
D.prototype.se = ea("pb");
A.prototype.Ke = function(a) {
this.ub.disconnect();
this.ub.connect(a)
};
A.prototype.remove = function() {
this.ub.disconnect()
};
A.prototype.se = ea("ub");
t.prototype.Ke = function(a) {
this.ub.disconnect();
this.ub.connect(a)
};
t.prototype.remove = function() {
this.Vc.disconnect();
this.ie.disconnect();
this.ub.disconnect()
};
t.prototype.se = ea("ub");
z.prototype.Ke = function(a) {
this.La.disconnect();
this.La.connect(a);
this.Ja.disconnect();
this.Ja.connect(a)
};
z.prototype.remove = function() {
this.Vc.disconnect();
this.Zl.disconnect();
this.pb.disconnect();
this.La.disconnect();
this.Ja.disconnect()
};
z.prototype.se = ea("pb");
x.prototype.NA = function(a, b) {
0.01 > a && (a = 0.01);
this.zo.gain.value = a;
this.yo.gain.value = Math.pow(1 / a, 0.6) * b
};
x.prototype.shape = function(a, b, c) {
var d = 1.05 * c * b - b;
c = 0 > a ? -1 : 1;
a = 0 > a ? -a: a;
b = a < b ? a: b + d * (1 - Math.exp( - (1 / d) * (a - b)));
return b * c
};
x.prototype.cz = function(a, b) {
for (var c = Math.pow(10, a / 20), d = Math.pow(10, b / 20), g = 0, l = 0; 32768 > l; ++l) g = l / 32768,
g = this.shape(g, c, d),
this.un[32768 + l] = g,
this.un[32768 - l - 1] = -g
};
x.prototype.Ke = function(a) {
this.La.disconnect();
this.La.connect(a);
this.Ja.disconnect();
this.Ja.connect(a)
};
x.prototype.remove = function() {
this.pb.disconnect();
this.zo.disconnect();
this.fp.disconnect();
this.yo.disconnect();
this.La.disconnect();
this.Ja.disconnect()
};
x.prototype.se = ea("pb");
y.prototype.Ke = function(a) {
this.ub.disconnect();
this.ub.connect(a)
};
y.prototype.remove = function() {
this.ub.disconnect()
};
y.prototype.se = ea("ub");
H.prototype.Fb = function() {
this.ub.getFloatFrequencyData(this.az);
this.ub.getByteTimeDomainData(this.qv);
for (var a = this.ub.fftSize,
b = 0,
c = this.Sl = 0,
d = 0; b < a; b++) d = (this.qv[b] - 128) / 128,
0 > d && (d = -d),
this.Sl < d && (this.Sl = d),
c += d * d;
this.Sl = p(this.Sl);
p(Math.sqrt(c / a))
};
H.prototype.Ke = function(a) {
this.ub.disconnect();
this.ub.connect(a)
};
H.prototype.remove = function() {
this.ub.disconnect()
};
H.prototype.se = ea("ub");
N.prototype.cm = function(a) {
if (this.fb = a) this.Zn = this.fb.x,
this.$n = this.fb.y;
this.Uh.length = 0
};
N.prototype.Mn = function() {
return !! this.fb
};
N.prototype.Fb = function(a) {
this.fb && 0 !== a && (this.Yq = Na(this.Zn, this.$n, this.fb.x, this.fb.y), a = Va(this.Zn, this.$n, this.fb.x, this.fb.y) / a, 4 > this.Uh.length || this.Uh.shift(), this.Uh.push(a), this.Zn = this.fb.x, this.$n = this.fb.y)
};
N.prototype.Ot = function() {
if (!this.Uh.length) return 0;
var a, b, c = 0;
a = 0;
for (b = this.Uh.length; a < b; a++) c += this.Uh[a];
return c / this.Uh.length
};
N.prototype.tq = function() {
return Math.cos(this.Yq) * this.Ot()
};
N.prototype.uq = function() {
return Math.sin(this.Yq) * this.Ot()
};
var Tc = !1;
S.prototype.cy = function() {
if (!this.Ob && this.Qk) {
var a = this;
if (L.decodeAudioData) L.decodeAudioData(this.Qk,
function(b) {
a.Ob = b;
var c, d, g;
if (ja(a.vo) || Qa) ja(a.on) || (c = a.on.pi, c.normalize = a.Au, c.buffer = b);
else if (a.jk.length) {
c = 0;
for (d = a.jk.length; c < d; c++) {
b = a.jk[c];
g = new K(a, b.wv);
g.Kr(!0);
if ("undefined" !== typeof b.Cu && (b.fb = u.uh(b.Cu), !b.fb)) continue;
if (b.fb) {
var l = Ua(b.fb.x, b.fb.y, -b.fb.F.yc(), ib, jb, !0),
e = Ua(b.fb.x, b.fb.y, -b.fb.F.yc(), ib, jb, !1);
g.Jr(l, e, Ha(b.fb.B - b.fb.F.yc()), b.yq, b.br, b.er);
g.cm(b.fb)
} else g.Jr(b.x, b.y, b.Dx, b.yq, b.br, b.er);
g.play(a.Tq, a.bs, a.Mo);
a.to && g.pause();
ka.push(g)
}
a.jk.length = 0
} else g = new K(a, a.vo),
g.play(a.Tq, a.bs, a.Mo),
a.to && g.pause(),
ka.push(g)
});
else if (this.Ob = L.createBuffer(this.Qk, !1), ja(this.vo) || Qa) ja(this.on) || (b = this.on.pi, b.normalize = this.Au, b.buffer = this.Ob);
else {
var b = new K(this, this.vo);
b.play(this.Tq, this.bs, this.Mo);
this.to && b.pause();
ka.push(b)
}
}
};
S.prototype.Rz = function() {
switch (this.yb) {
case V:
return 4 <= this.Ob.readyState;
case G:
return !! this.Qk;
case Q:
return ! 0;
case aa:
return ! 0
}
return ! 1
};
K.prototype.Jj = function() {
switch (this.yb) {
case V:
return this.P.ended;
case G:
return this.buffer.yb === G ? !this.ug && !this.Fc && this.P.loop || this.qf ? !1 : u.xe.kb - this.startTime > this.buffer.Ob.duration: this.P.ended;
case Q:
return this.nr;
case aa:
!0
}
return ! 0
};
K.prototype.Tx = function() {
return this.ug || this.Fc ? !0 : this.Jj()
};
K.prototype.Kr = function(a) {
Y === G && (!this.Pf && a ? this.xc && (this.mc || (this.mc = L.createPanner(), this.mc.panningModel = "number" === typeof this.mc.panningModel ? Vb: ["equalpower", "HRTF", "soundfield"][Vb], this.mc.distanceModel = "number" === typeof this.mc.distanceModel ? Wb: ["linear", "inverse", "exponential"][Wb], this.mc.refDistance = Qc, this.mc.maxDistance = Rc, this.mc.rolloffFactor = Sc), this.xc.disconnect(), this.xc.connect(this.mc), this.mc.connect(e(this.Vh)), this.Pf = !0) : this.Pf && !a && this.xc && (this.mc.disconnect(), this.xc.disconnect(), this.xc.connect(e(this.Vh)), this.Pf = !1))
};
K.prototype.Jr = function(a, b, c, d, g, l) {
this.Pf && Y === G && (this.mc.setPosition(a, b, 0), this.mc.setOrientation(Math.cos(Ga(c)), Math.sin(Ga(c)), 0), this.mc.coneInnerAngle = d, this.mc.coneOuterAngle = g, this.mc.coneOuterGain = l, this.Pu = a, this.Qu = b, this.Lu = c, this.Mu = d, this.Nu = g, this.Ou = l)
};
K.prototype.cm = function(a) {
this.Pf && Y === G && (this.lc || (this.lc = new N), this.lc.cm(a))
};
K.prototype.Fb = function(a) {
if (this.Pf && Y === G && this.lc && this.lc.Mn() && this.Fi()) {
this.lc.Fb(a);
a = this.lc.fb;
var b = Ua(a.x, a.y, -a.F.yc(), ib, jb, !0),
c = Ua(a.x, a.y, -a.F.yc(), ib, jb, !1);
this.mc.setPosition(b, c, 0);
b = 0;
"undefined" !== typeof this.lc.fb.B && (b = a.B - a.F.yc(), this.mc.setOrientation(Math.cos(b), Math.sin(b), 0));
b = Ua(this.lc.tq(), this.lc.uq(), -a.F.yc(), 0, 0, !0);
c = Ua(this.lc.tq(), this.lc.uq(), -a.F.yc(), 0, 0, !1);
this.mc.setVelocity(b, c, 0)
}
};
K.prototype.play = function(a, b, g) {
var l = this.P;
this.Mf = a;
this.volume = b;
g = g || 0;
switch (this.yb) {
case V:
1 !== l.playbackRate && (l.playbackRate = 1);
l.volume !== b * Ra && (l.volume = b * Ra);
l.loop !== a && (l.loop = a);
l.muted && (l.muted = !1);
if (l.currentTime !== g) try {
l.currentTime = g
} catch(e) {}
if (this.pf && qb && !u.kc) rb.push(this);
else try {
this.P.play()
} catch(h) {}
break;
case G:
this.muted = !1;
this.$j = 1;
if (this.buffer.yb === G) this.ug || (this.P = L.createBufferSource(), this.P.buffer = this.buffer.Ob, this.P.connect(this.xc)),
this.P.loop = a,
this.xc.gain.value = b * Ra,
0 === g ? d(this.P) : c(this.P, g, this.sh());
else {
1 !== l.playbackRate && (l.playbackRate = 1);
l.loop !== a && (l.loop = a);
this.xc.gain.value = b * Ra;
if (l.currentTime !== g) try {
l.currentTime = g
} catch(m) {}
this.pf && qb && !u.kc ? rb.push(this) : l.play()
}
break;
case Q:
(!this.ug && this.Fc || 0 !== g) && l.seekTo(g);
l.play();
this.nr = !1;
break;
case aa:
u.ad ? AppMobi.context.playSound(this.src, a) : AppMobi.player.playSound(this.src, a)
}
this.playbackRate = 1;
this.startTime = u.xe.kb - g;
this.qf = this.Fc = this.ug = !1
};
K.prototype.stop = function() {
switch (this.yb) {
case V:
this.P.paused || this.P.pause();
break;
case G:
this.buffer.yb === G ? g(this.P) : this.P.paused || this.P.pause();
break;
case Q:
this.P.stop();
break;
case aa:
u.ad && AppMobi.context.stopSound(this.src)
}
this.Fc = !0;
this.qf = !1
};
K.prototype.pause = function() {
if (! (this.ug || this.Fc || this.Jj() || this.qf)) {
switch (this.yb) {
case V:
this.P.paused || this.P.pause();
break;
case G:
this.buffer.yb === G ? (this.Ce = this.rq(), this.Mf && (this.Ce %= this.sh()), g(this.P)) : this.P.paused || this.P.pause();
break;
case Q:
this.P.pause();
break;
case aa:
u.ad && AppMobi.context.stopSound(this.src)
}
this.qf = !0
}
};
K.prototype.BA = function() {
if (!this.ug && !this.Fc && !this.Jj() && this.qf) {
switch (this.yb) {
case V:
this.P.play();
break;
case G:
this.buffer.yb === G ? (this.P = L.createBufferSource(), this.P.buffer = this.buffer.Ob, this.P.connect(this.xc), this.P.loop = this.Mf, this.xc.gain.value = Ra * this.volume * this.$j, this.startTime = u.xe.kb - this.Ce, c(this.P, this.Ce, this.sh())) : this.P.play();
break;
case Q:
this.P.play();
break;
case aa:
u.ad && AppMobi.context.resumeSound(this.src)
}
this.qf = !1
}
};
K.prototype.yA = function(a) {
this.yb === G && (this.Pf ? (this.mc.disconnect(), this.mc.connect(a)) : (this.xc.disconnect(), this.xc.connect(a)))
};
K.prototype.sh = function() {
switch (this.yb) {
case V:
if ("undefined" !== typeof this.P.duration) return this.P.duration;
break;
case G:
return this.buffer.Ob.duration;
case Q:
return this.P.getDuration();
case aa:
if (u.ad) return AppMobi.context.getDurationSound(this.src)
}
return 0
};
K.prototype.rq = function() {
var a = this.sh(),
b = 0;
switch (this.yb) {
case V:
"undefined" !== typeof this.P.currentTime && (b = this.P.currentTime);
break;
case G:
if (this.buffer.yb === G) {
if (this.qf) return this.Ce;
b = u.xe.kb - this.startTime
} else "undefined" !== typeof this.P.currentTime && (b = this.P.currentTime);
break;
case aa:
u.ad && (b = AppMobi.context.getPlaybackTimeSound(this.src))
} ! this.Mf && b > a && (b = a);
return b
};
K.prototype.Fi = function() {
return ! this.qf && !this.ug && !this.Fc && !this.Jj()
};
K.prototype.QA = function(a) {
this.volume = a;
this.Kv()
};
K.prototype.Kv = function() {
var a = this.volume * Ra;
switch (this.yb) {
case V:
this.P.volume && this.P.volume !== a && (this.P.volume = a);
break;
case G:
this.xc.gain.value = a * this.$j
}
};
K.prototype.yn = function(a) {
switch (this.yb) {
case V:
this.P.muted !== !!a && (this.P.muted = !!a);
break;
case G:
this.$j = a ? 0 : 1,
this.xc.gain.value = Ra * this.volume * this.$j
}
};
K.prototype.hv = function(a) {
this.Qj = !!a;
this.yn(this.Qj || this.ol)
};
K.prototype.jv = function(a) {
this.ol = !!a;
this.yn(this.Qj || this.ol)
};
K.prototype.Jv = function() {
var a = this.playbackRate;
if (1 === Db && !this.pf || 2 === Db) a *= u.cj;
switch (this.yb) {
case V:
this.P.playbackRate !== a && (this.P.playbackRate = a);
break;
case G:
this.buffer.yb === G ? this.P.playbackRate.value !== a && (this.P.playbackRate.value = a) : this.P.playbackRate !== a && (this.P.playbackRate = a)
}
};
K.prototype.PA = function(a) {
switch (this.yb) {
case V:
a ? this.Fi() ? (this.P.pause(), this.Gg = !0) : this.Gg = !1 : this.Gg && this.P.play();
break;
case G:
a ? this.Fi() ? (this.buffer.yb === G ? (this.Ce = this.rq(), this.Mf && (this.Ce %= this.sh()), g(this.P)) : this.P.pause(), this.Gg = !0) : this.Gg = !1 : this.Gg && (this.buffer.yb === G ? (this.P = L.createBufferSource(), this.P.buffer = this.buffer.Ob, this.P.connect(this.xc), this.P.loop = this.Mf, this.xc.gain.value = Ra * this.volume * this.$j, this.startTime = u.xe.kb - this.Ce, c(this.P, this.Ce, this.sh())) : this.P.play());
break;
case Q:
a ? this.Fi() ? (this.P.pause(), this.Gg = !0) : this.Gg = !1 : this.Gg && this.P.play()
}
};
w.X = function(a) {
this.type = a;
u = this.n = a.n;
M = this;
this.Ad = null;
this.yl = -600; ! (this.n.Xn || this.n.Rn && (this.n.jl || this.n.$t)) || this.n.Sn || this.n.Zb || (qb = !0);
L = null;
"undefined" !== typeof AudioContext ? (Y = G, L = new AudioContext) : "undefined" !== typeof webkitAudioContext && (Y = G, L = new webkitAudioContext); (this.n.Xn && Y === G || qb) && document.addEventListener("touchstart",
function() {
var a, b, c; ! Tc && L && (a = L.createBuffer(1, 1, 22050), b = L.createBufferSource(), b.buffer = a, b.connect(L.destination), d(b), Tc = !0);
if (qb) {
if (!Qa) for (a = 0, b = rb.length; a < b; ++a) c = rb[a],
c.Fc || c.qf || c.P.play();
rb.length = 0
}
},
!0);
Y !== G && (this.n.of ? Y = Q: this.n.Mj && (Y = aa));
Y === Q && (X = location.href, a = X.lastIndexOf("/"), -1 < a && (X = X.substr(0, a + 1)), X = X.replace("file://", ""));
if (this.n.cu && this.n.Sz && "undefined" === typeof Audio) alert("It looks like you're using Safari for Windows without Quicktime. Audio cannot be played until Quicktime is installed."),
this.n.Af(this);
else {
if (this.n.ad) pb = this.n.Rn;
else try {
pb = !!(new Audio).canPlayType('audio/ogg; codecs="vorbis"')
} catch(b) {
pb = !1
}
this.n.Xh(this)
}
};
var Ta = w.X.prototype;
Ta.U = function() {
Db = this.L[0];
this.Ig = this.L[1];
Vb = this.L[2];
Wb = this.L[3];
this.yl = -this.L[4];
Qc = this.L[5];
Rc = this.L[6];
Sc = this.L[7];
this.Ad = new N;
Y === G && (L.listener.speedOfSound = this.L[8], L.listener.dopplerFactor = this.L[9], L.listener.setPosition(this.n.eb / 2, this.n.cb / 2, this.yl), L.listener.setOrientation(0, 0, 1, 0, -1, 0), window.c2OnAudioMicStream = function(a, b) {
cb && cb.disconnect();
Ub = b.toLowerCase();
cb = L.createMediaStreamSource(a);
cb.connect(e(Ub))
});
this.n.Ws(function(a) {
M.kA(a)
});
var a = this;
this.n.Fp(function(b) {
a.fr(b)
})
};
Ta.fr = function(a) {
var b, c, d;
b = 0;
for (c = ka.length; b < c; b++) d = ka[b],
d.lc && d.lc.fb === a && (d.lc.fb = null, d.Pf && d.Fi() && d.Mf && d.stop());
this.Ad.fb === a && (this.Ad.fb = null)
};
Ta.Mb = function() {
var a = {
silent: Qa,
masterVolume: Ra,
listenerZ: this.yl,
listenerUid: this.Ad.Mn() ? this.Ad.fb.uid: -1,
playing: [],
effects: {}
},
b = a.playing,
c,
d,
g,
l,
e,
h;
c = 0;
for (d = ka.length; c < d; c++) g = ka[c],
!g.Fi() || 3 === this.Ig || g.pf && 1 === this.Ig || !g.pf && 2 === this.Ig || (l = g.rq(), g.Mf && (l %= g.sh()), l = {
tag: g.Vh,
buffersrc: g.buffer.src,
is_music: g.pf,
playbackTime: l,
volume: g.volume,
looping: g.Mf,
muted: g.Qj,
playbackRate: g.playbackRate,
paused: g.qf,
resume_position: g.Ce
},
g.Pf && (l.pan = {},
h = l.pan, g.lc && g.lc.Mn() ? h.objUid = g.lc.fb.uid: (h.x = g.Pu, h.y = g.Qu, h.a = g.Lu), h.ia = g.Mu, h.oa = g.Nu, h.og = g.Ou), b.push(l));
b = a.effects;
for (e in pa) if (pa.hasOwnProperty(e)) {
g = [];
c = 0;
for (d = pa[e].length; c < d; c++) g.push({
type: pa[e][c].type,
params: pa[e][c].Kc
});
b[e] = g
}
return a
};
var sb = [];
Ta.Vb = function(a) {
var c = a.silent;
Ra = a.masterVolume;
this.yl = a.listenerZ;
this.Ad.cm(null);
var d = a.listenerUid; - 1 !== d && (this.Ad.ko = d, sb.push(this.Ad));
var d = a.playing,
g, e, h, m, p, S, K, w, F, u, R;
if (3 !== this.Ig) for (g = 0, e = ka.length; g < e; g++) F = ka[g],
F.pf && 1 === this.Ig || (F.pf || 2 !== this.Ig) && F.stop();
for (p in pa) if (pa.hasOwnProperty(p)) for (g = 0, e = pa[p].length; g < e; g++) pa[p][g].remove();
bb(pa);
for (p in a.effects) if (a.effects.hasOwnProperty(p)) for (S = a.effects[p], g = 0, e = S.length; g < e; g++) switch (h = S[g].type, u = S[g].params, h) {
case "filter":
T(p, new b(u[0], u[1], u[2], u[3], u[4], u[5]));
break;
case "delay":
T(p, new l(u[0], u[1], u[2]));
break;
case "convolve":
h = u[2];
F = this.jq(h, !1);
F.Ob ? h = new q(F.Ob, u[0], u[1], h) : (h = new q(null, u[0], u[1], h), F.Au = u[0], F.on = h);
T(p, h);
break;
case "flanger":
T(p, new n(u[0], u[1], u[2], u[3], u[4]));
break;
case "phaser":
T(p, new D(u[0], u[1], u[2], u[3], u[4], u[5]));
break;
case "gain":
T(p, new A(u[0]));
break;
case "tremolo":
T(p, new t(u[0], u[1]));
break;
case "ringmod":
T(p, new z(u[0], u[1]));
break;
case "distortion":
T(p, new x(u[0], u[1], u[2], u[3], u[4]));
break;
case "compressor":
T(p, new y(u[0], u[1], u[2], u[3], u[4]));
break;
case "analyser":
T(p, new H(u[0], u[1]))
}
g = 0;
for (e = d.length; g < e; g++) 3 === this.Ig || (a = d[g], h = a.buffersrc, m = a.is_music, p = a.tag, S = a.playbackTime, K = a.looping, w = a.volume, R = (u = a.pan) && u.hasOwnProperty("objUid") ? u.objUid: -1, m && 1 === this.Ig) || !m && 2 === this.Ig || ((F = this.kq(h, p, m, K, w)) ? (F.Ce = a.resume_position, F.Kr( !! u), F.play(K, w, S), F.Jv(), F.Kv(), F.yn(F.Qj || F.ol), a.paused && F.pause(), a.muted && F.hv(!0), F.yn(F.Qj || F.ol), u && ( - 1 !== R ? (F.lc = F.lc || new N, F.lc.ko = R, sb.push(F.lc)) : F.Jr(u.x, u.y, u.a, u.ia, u.oa, u.og))) : (F = this.jq(h, m), F.Mo = S, F.to = a.paused, u && ( - 1 !== R ? F.jk.push({
Cu: R,
yq: u.ia,
br: u.oa,
er: u.og,
wv: p
}) : F.jk.push({
x: u.x,
y: u.y,
Dx: u.a,
yq: u.ia,
br: u.oa,
er: u.og,
wv: p
}))));
if (c && !Qa) {
g = 0;
for (e = ka.length; g < e; g++) ka[g].jv(!0);
Qa = !0
} else if (!c && Qa) {
g = 0;
for (e = ka.length; g < e; g++) ka[g].jv(!1);
Qa = !1
}
};
Ta.ef = function() {
var a, b, c, d;
a = 0;
for (b = sb.length; a < b; a++) c = sb[a],
d = this.n.uh(c.ko),
c.cm(d),
c.ko = -1,
d && (ib = d.x, jb = d.y);
sb.length = 0
};
Ta.kA = function(a) {
var b, c;
b = 0;
for (c = ka.length; b < c; b++) ka[b].PA(a)
};
Ta.Fb = function() {
var a = this.n.Ra,
b, c, d;
b = 0;
for (c = ka.length; b < c; b++) d = ka[b],
d.Fb(a),
d.yb === V || d.yb === aa || d.ug || d.Fc || !d.Jj() || (d.Fc = !0, da = d.Vh, u.trigger(B.prototype.k.lp, M)),
0 !== Db && d.Jv();
var g, l;
for (g in pa) if (pa.hasOwnProperty(g)) for (d = pa[g], b = 0, c = d.length; b < c; b++) l = d[b],
l.Fb && l.Fb();
Y === G && this.Ad.Mn() && (this.Ad.Fb(a), ib = this.Ad.fb.x, jb = this.Ad.fb.y, L.listener.setPosition(this.Ad.fb.x, this.Ad.fb.y, this.yl), L.listener.setVelocity(this.Ad.tq(), this.Ad.uq(), 0))
};
Ta.jq = function(a, b) {
var c, d, g, l = null;
c = 0;
for (d = Ka.length; c < d; c++) if (g = Ka[c], g.src === a) {
l = g;
break
}
l || (l = new S(a, b), Ka.push(l));
return l
};
Ta.kq = function(a, b, c, d, g) {
var l, e, h;
l = 0;
for (e = ka.length; l < e; l++) if (h = ka[l], h.src === a && (h.Tx() || c)) return h.Vh = b,
h;
a = this.jq(a, c);
if (!a.Ob) return "" !== b && (a.vo = b, a.Tq = d, a.bs = g),
null;
h = new K(a, b);
ka.push(h);
return h
};
var qa = [];
ca.prototype.lp = function(a) {
return ob(da, a)
};
ca.prototype.Sb = function() {
var a, b;
a = 0;
for (b = Ka.length; a < b; a++) if (!Ka[a].Rz()) return ! 1;
return ! 0
};
ca.prototype.jp = function(a) {
F(a);
var b;
a = 0;
for (b = qa.length; a < b; a++) if (qa[a].Fi()) return ! 0;
return ! 1
};
w.k = new ca;
R.prototype.Wb = function(a, b, c, d, g) { ! Qa && (d = h(d), hb = this.kq(this.n.dq + b.toLowerCase() + (pb ? ".ogg": ".m4a"), g, 1 === a, 0 !== c, d)) && (hb.Kr(!1), hb.play(0 !== c, d))
};
R.prototype.Ks = function(a, b) {
F(a);
var c, d;
c = 0;
for (d = qa.length; c < d; c++) qa[c].hv(0 === b)
};
R.prototype.Nm = function(a, b) {
F(a);
var c = h(b),
d,
g;
d = 0;
for (g = qa.length; d < g; d++) qa[d].QA(c)
};
R.prototype.Sw = function(a, b) {
if (!Qa) {
var c = 1 === a,
d = this.n.dq + b.toLowerCase() + (pb ? ".ogg": ".m4a");
Y === aa ? this.n.ad ? AppMobi.context.loadSound(d) : AppMobi.player.loadSound(d) : Y !== Q && this.kq(d, "", c, !1)
}
};
R.prototype.Ef = function(a) {
F(a);
var b;
a = 0;
for (b = qa.length; a < b; a++) qa[a].stop()
};
R.prototype.zp = function() {
var a, b;
a = 0;
for (b = ka.length; a < b; a++) ka[a].stop()
};
R.prototype.Jm = function(a, b) {
F(a);
var c, d;
c = 0;
for (d = qa.length; c < d; c++) 0 === b ? qa[c].pause() : qa[c].BA()
};
w.b = new R;
W.prototype.Ck = function(a, b) {
F(b);
qa.length ? a.K(qa[0].sh()) : a.K(0)
};
W.prototype.Mk = function(a, b) {
F(b);
qa.length ? a.K(p(qa[0].volume)) : a.K(0)
};
w.j = new W
})();
function yc(h) {
this.n = h
} (function() {
function h() {}
function p() {}
function e() {}
var m = yc.prototype;
m.ga = function(a) {
this.wa = a;
this.n = a.n
};
m.ga.prototype.U = f();
m.X = function(a) {
this.type = a;
this.n = a.n
};
m.X.prototype.U = function() {
var a = this;
window.addEventListener("resize",
function() {
a.n.trigger(yc.prototype.k.Kw, a)
});
"undefined" !== typeof navigator.onLine && (window.addEventListener("online",
function() {
a.n.trigger(yc.prototype.k.Hw, a)
}), window.addEventListener("offline",
function() {
a.n.trigger(yc.prototype.k.Gw, a)
}));
"undefined" !== typeof window.applicationCache && (window.applicationCache.addEventListener("updateready",
function() {
a.n.Ni = 1;
a.n.trigger(yc.prototype.k.Bs, a)
}), window.applicationCache.addEventListener("progress",
function(d) {
a.n.Ni = d.loaded / d.total
}));
this.n.ad || (document.addEventListener("appMobi.device.update.available",
function() {
a.n.trigger(yc.prototype.k.Bs, a)
}), document.addEventListener("backbutton",
function() {
a.n.trigger(yc.prototype.k.Cm, a)
}), document.addEventListener("menubutton",
function() {
a.n.trigger(yc.prototype.k.us, a)
}), document.addEventListener("searchbutton",
function() {
a.n.trigger(yc.prototype.k.Mw, a)
}), document.addEventListener("tizenhwkey",
function(d) {
var c;
switch (d.keyName) {
case "back":
c = a.n.trigger(yc.prototype.k.Cm, a); ! c && window.tizen && window.tizen.application.getCurrentApplication().exit();
break;
case "menu":
(c = a.n.trigger(yc.prototype.k.us, a)) || d.preventDefault()
}
}));
this.n.Gq && (WinJS.Application.onbackclick = function() {
return !! a.n.trigger(yc.prototype.k.Cm, a)
});
this.n.Ws(function(d) {
d ? a.n.trigger(yc.prototype.k.ys, a) : a.n.trigger(yc.prototype.k.Iw, a)
});
this.Wz = "undefined" !== typeof window.is_scirra_arcade
};
h.prototype.Hw = k(!0);
h.prototype.Gw = k(!0);
h.prototype.Bs = k(!0);
h.prototype.Iw = k(!0);
h.prototype.ys = k(!0);
h.prototype.Kw = k(!0);
h.prototype.Cm = k(!0);
h.prototype.us = k(!0);
h.prototype.Mw = k(!0);
h.prototype.hw = function(a) {
return (window.innerWidth <= window.innerHeight ? 0 : 1) === a
};
m.k = new h;
p.prototype.fw = function(a, d) {
if (a == "#") {
//Play68.goHome();
} else {
this.n.ue ? CocoonJS.App.openURL(a) : this.n.Kf ? ejecta.openURL(a) : this.n.Eq ? Windows.System.Launcher.launchUriAsync(new Windows.Foundation.Uri(a)) : navigator.app && navigator.app.loadUrl ? navigator.app.loadUrl(a, {
openExternal: !0
}) : this.Wz || this.n.Zb || window.open(a, d)
}
};
m.b = new p;
e.prototype.Vg = function(a) {
a.rb(this.n.Zb ? "": navigator.platform)
};
e.prototype.Zv = function(a, d) {
if (eval) {
var c = eval(d);
"number" === typeof c ? a.Vf(c) : "string" === typeof c ? a.Vf(c) : "boolean" === typeof c ? a.Vf(c ? 1 : 0) : a.Vf(0)
} else a.Vf(0)
};
m.j = new e
})();
function C(h) {
this.n = h
} (function() {
function h() {}
function p() {}
var e = C.prototype;
e.ga = function(a) {
this.wa = a;
this.n = a.n
};
e.ga.prototype.U = f();
e.X = function(a) {
this.type = a;
this.n = a.n
};
var m = e.X.prototype;
m.U = function() {
this.Hf = {}
};
m.Mb = ea("Hf");
m.Vb = function(a) {
this.Hf = a;
for (var d in this.Hf);
};
e.k = new(f());
h.prototype.aa = function(a, d) {
this.Hf[a] = d
};
h.prototype.Fk = function(a) {
var d;
try {
d = JSON.parse(a)
} catch(c) {
return
}
if (d.c2dictionary) {
this.Hf = d.data;
for (var g in this.Hf);
}
};
e.b = new h;
p.prototype.Da = function(a, d) {
this.Hf.hasOwnProperty(d) ? a.Vf(this.Hf[d]) : a.ta(0)
};
p.prototype.xm = function(a) {
a.rb(JSON.stringify({
c2dictionary: !0,
data: this.Hf
}))
};
e.j = new p
})();
function v(h) {
this.n = h
} (function() {
function h() {
this.name = "";
this.Ho = 0;
this.Kc = []
}
function p() {
b++;
b === g.length && g.push(new h);
return g[b]
}
function e() {
return 0 > b ? null: g[b]
}
function m() {}
function a() {}
function d() {}
var c = v.prototype;
c.ga = function(a) {
this.wa = a;
this.n = a.n
};
c.ga.prototype.U = f();
c.X = function(a) {
this.type = a;
this.n = a.n
};
var g = [],
b = -1;
c.X.prototype.U = f();
m.prototype.V = function(a) {
var b = e();
return b ? ob(a, b.name) : !1
};
m.prototype.Ma = function(a, b, c) {
var d = e();
if (!d) return ! 1;
a = wa(a);
return 0 > a || a >= d.Kc.length ? !1 : kc(d.Kc[a], b, c)
};
c.k = new m;
a.prototype.CallFunction = function(a, c) {
var d = p();
d.name = a.toLowerCase();
d.Ho = 0;
Da(d.Kc, c);
var flag=true;
if("more_games"==c[0]){
//clickMore();
}else if("badges"==c[0]||"credits"==c[0]||"pause"==c[0]){
flag=false;
}
if("fill_new_badge_line"==d.name||"score_home"==d.name){
flag=false;
}
if("game_lauch"==d.name||"score_play"==d.name){
gscore=0;
}if("scorelaunch"==d.name){
dp_submitScore(gscore);
}
if(flag){
this.n.trigger(v.prototype.k.V, this, d.name);
}
b--;
//console.dir("---------");
//console.dir(a);
//console.dir(c);
//console.dir(d.name);
};
a.prototype.ax = function(a) {
var b = e();
b && (b.Ho = a)
};
c.b = new a;
d.prototype.Fm = function(a) {
var b = e();
b ? a.ta(b.Kc.length) : a.ta(0)
};
d.prototype.ib = function(a, b) {
b = wa(b);
var c = e();
c ? 0 <= b && b < c.Kc.length ? a.Vf(c.Kc[b]) : a.ta(0) : a.ta(0)
};
d.prototype.di = function(a, c) {
var d = p();
d.name = c.toLowerCase();
d.Ho = 0;
d.Kc.length = 0;
var g, e;
g = 2;
for (e = arguments.length; g < e; g++) d.Kc.push(arguments[g]);
this.n.trigger(v.prototype.k.V, this, d.name);
b--;
a.Vf(d.Ho)
};
c.j = new d
})();
function zc(h) {
this.n = h
} (function() {
var h = zc.prototype;
h.ga = function(e) {
this.wa = e;
this.n = e.n
};
h.ga.prototype.U = f();
h.X = function(e) {
this.type = e;
this.n = e.n
};
var p = h.X.prototype;
p.U = function() {
this.M = document.createElement("div");
this.M.innerHTML = this.L[1];
this.M.style.cssText = this.L[2];
this.Ze = this.L[2];
var e = 0 < this.width ? 1 : -1,
h = 0 < this.height ? 1 : -1;
this.M.setAttribute("id", this.L[3]);
this.Ys = this.B;
this.xf = "-webkit-transform:rotate(" + 180 * this.B * e * h / 3.1416 + "deg);-moz-transform:rotate(" + 180 * this.B * e * h / 3.1416 + "deg);-o-transform:rotate(" + 180 * this.B * e * h / 3.1416 + "deg);";
this.M.style.cssText += ";" + this.xf;
jQuery(this.M).appendTo("body");
0 === this.L[0] && (jQuery(this.M).hide(), this.visible = !1);
this.ej();
this.n.Xh(this)
};
p.sf = function() {
jQuery(this.M).remove();
this.M = null
};
p.Fb = function() {
this.ej()
};
p.ej = function() {
var e = this.F.xb(this.x, this.y, !0),
h = this.F.xb(this.x, this.y, !1),
a = this.F.xb(this.x + this.width, this.y + this.height, !0),
d = this.F.xb(this.x + this.width, this.y + this.height, !1);
if (!this.visible || !this.F.visible || 0 >= a || 0 >= d || e >= this.n.width || h >= this.n.height) jQuery(this.M).hide();
else {
1 > e && (e = 1);
1 > h && (h = 1);
a >= this.n.width && (a = this.n.width - 1);
d >= this.n.height && (d = this.n.height - 1);
jQuery(this.M).show();
var c = e + jQuery(this.n.canvas).offset().left,
g = h + jQuery(this.n.canvas).offset().top;
jQuery(this.M).offset({
left: c,
top: g
});
jQuery(this.M).width(a - e);
jQuery(this.M).height(d - h)
}
};
p.de = f();
p.wd = f();
h.k = {};
p = h.k;
p.Xv = function(e) {
return this.M.innerHTML === e
};
p.Vv = function(e) {
return this.M.style.cssText === e
};
p.Gk = k(!0);
p.Hk = k(!0);
h.b = {};
p = h.b;
p.Js = function(e) {
this.M.innerHTML = e
};
p.EA = function(e, h, a, d) {
var c = "";
1 == e && (this.me += d, c = "-webkit-transform:rotateX(" + this.me + "deg);-moz-transform:rotateX(" + this.me + "deg);-o-transform:rotateX(" + this.me + "deg);-ms-transform:rotateX(" + this.me + "deg);transform:rotateX(" + this.me + "deg);");
1 == h && (this.ne += d, c = c + "-webkit-transform:rotateY(" + this.ne + "deg);-moz-transform:rotateY(" + this.ne + "deg);-o-transform:rotateY(" + this.ne + "deg);-ms-transform:rotateY(" + this.ne + "deg);transform:rotateY(" + this.ne + "deg);");
1 == a && (this.oe += d, c = c + "-webkit-transform:rotateZ(" + this.oe + "deg);-moz-transform:rotateZ(" + this.oe + "deg);-o-transform:rotateZ(" + this.oe + "deg);-ms-transform:rotateZ(" + this.oe + "deg);transform:rotateZ(" + this.oe + "deg);");
this.Hg = c;
this.M.style.cssText = this.Ze + this.xf + this.Eg + this.Hg;
this.ej()
};
p.DA = function(e) {
var h = 0 < this.width ? 1 : -1,
a = 0 < this.height ? 1 : -1;
this.xf = "-webkit-transform:rotate(" + 180 * e * h * a / 3.1416 + "deg);-moz-transform:rotate(" + 180 * e * h * a / 3.1416 + "deg);-o-transform:rotate(" + 180 * e * h * a / 3.1416 + "deg);";
this.M.style.cssText = this.Ze + this.xf + this.Eg + this.Hg;
this.B = this.Ys + 180 * e / 3.1416
};
p.OA = function(e) {
this.Eg = "-webkit-perspective:" + e + ";-moz-perspective:" + e + ";-o-perspective:" + e + ";-ms-perspective:" + e + ";perspective:" + e + ";";
this.M.style.cssText = this.Ze + this.xf + this.Eg + this.Hg
};
p.nw = function(e, h) {
h.length ? jQuery.ajax({
context: this,
dataType: "text",
type: "POST",
url: e,
data: h,
success: function(a) {
this.M.innerHTML = a;
this.n.trigger(nc.fi.prototype.k.Gk, this)
},
error: function() {
this.n.trigger(nc.fi.prototype.k.Hk, this)
}
}) : jQuery.ajax({
context: this,
dataType: "text",
type: "GET",
url: e,
success: function(a) {
this.M.innerHTML = a;
this.n.trigger(nc.fi.prototype.k.Gk, this)
},
error: function() {
this.n.trigger(nc.fi.prototype.k.Hk, this)
}
})
};
p.bx = function(e) {
this.Ze = e;
this.M.style.cssText = this.Ze + this.xf + this.Eg + this.Hg
};
p.na = function(e) {
this.visible = 0 !== e
};
h.j = {};
h = h.j;
h.dw = function(e) {
e.rb(this.M.innerHTML)
};
h.ew = function(e) {
e.rb(this.M.style.cssText)
}
})();
function Ac(h) {
this.n = h
} (function() {
function h() {}
var p = Ac.prototype;
p.ga = function(a) {
this.wa = a;
this.n = a.n
};
p.ga.prototype.U = f();
p.X = function(a) {
this.type = a;
this.n = a.n;
this.Yn = Array(256);
this.ep = Array(256);
this.Zh = 0
};
var e = p.X.prototype;
e.U = function() {
var a = this;
this.n.Zb || (jQuery(document).keydown(function(d) {
a.iA(d)
}), jQuery(document).keyup(function(d) {
a.jA(d)
}))
};
var m = [32, 33, 34, 35, 36, 37, 38, 39, 40, 44];
e.iA = function(a) {
var d = !1;
window != window.top && -1 < m.indexOf(a.which) && (a.preventDefault(), d = !0, a.stopPropagation());
if (this.Yn[a.which]) this.ep[a.which] && !d && a.preventDefault();
else {
this.Yn[a.which] = !0;
this.Zh = a.which;
this.n.kc = !0;
this.n.trigger(Ac.prototype.k.sw, this);
var c = this.n.trigger(Ac.prototype.k.Sc, this),
g = this.n.trigger(Ac.prototype.k.Aw, this);
this.n.kc = !1;
if (c || g) this.ep[a.which] = !0,
d || a.preventDefault()
}
};
e.jA = function(a) {
this.Yn[a.which] = !1;
this.Zh = a.which;
this.n.kc = !0;
this.n.trigger(Ac.prototype.k.uw, this);
var d = this.n.trigger(Ac.prototype.k.Cw, this),
c = this.n.trigger(Ac.prototype.k.Bw, this);
this.n.kc = !1;
if (d || c || this.ep[a.which]) this.ep[a.which] = !0,
a.preventDefault()
};
e.Mb = function() {
return {
triggerKey: this.Zh
}
};
e.Vb = function(a) {
this.Zh = a.triggerKey
};
h.prototype.qj = function(a) {
return this.Yn[a]
};
h.prototype.Sc = function(a) {
return a === this.Zh
};
h.prototype.sw = k(!0);
h.prototype.uw = k(!0);
h.prototype.Cw = function(a) {
return a === this.Zh
};
h.prototype.Aw = function(a) {
return a === this.Zh
};
h.prototype.Bw = function(a) {
return a === this.Zh
};
p.k = new h;
p.b = new(f());
p.j = new(f())
})();
function Bc(h) {
this.n = h
} (function() {
function h() {
this.type = "";
this.kk = this.Cg = this.Qf = this.duration = 0;
this.lk = void 0;
this.Dd = 0
}
function p(a, b, c, d, e) {
this.global = e;
this.name = a;
this.x = b;
this.y = c;
this.scale = d;
this.bl = !1;
this.sg = [];
this.Ej = [];
this.Bg = [];
this.vi = [];
this.Dj = 1;
this.mj = !1;
this.lj = this.kj = 0;
this.ij = this.jj = -1;
this.$b = [];
this.Hi = this.Ak = this.Ti = !1;
this.Mh = this.Yi = this.Zi = this.ok = this.$i = this.Nh = this.Te = this.Qh = this.Ph = this.Oh = 0
}
function e() {}
function m() {}
var a = {
Xa: function(a, b, c) {
return a + (b - a) * c
},
sn: function(a, b, c, d, e) {
return this.Xa(this.Xa(this.Xa(a, b, e), this.Xa(b, c, e), e), this.Xa(this.Xa(b, c, e), this.Xa(c, d, e), e), e)
},
Gc: function(a, b, c) {
return a < b ? b: a > c ? c: a
}
};
p.prototype.Am = ea("x");
p.prototype.tc = ba("x");
p.prototype.Bm = ea("y");
p.prototype.ki = ba("y");
p.prototype.vj = function(c) {
if (this.Hi) if (this.Te += c, this.Te < this.Zi) {
c = 0;
c = this.Te < this.Yi ? a.Xa(0, this.Nh, this.Te / this.Yi) : this.Nh;
this.Te > this.Mh && (c = a.Xa(this.Nh, 0, (this.Te - this.Mh) / (this.Zi - this.Mh)));
var b = Math.floor(361 * Math.random()) / 57.2958,
d = a.Xa(0, Math.cos(b) * this.$i, c),
b = a.Xa(0, Math.sin(b) * this.$i, c),
e = a.Xa(0, Math.floor(201 * Math.random() - 100) / 100 * this.ok, c);
this.Oh = a.Xa(this.Oh, d, c);
this.Ph = a.Xa(this.Ph, b, c);
this.Qh = a.Xa(this.Qh, e, c)
} else this.Hi = !1,
this.Qh = this.Ph = this.Oh = 0
};
p.prototype.tp = function(c) {
this.Ak = this.Ti = !1;
for (var b, d = 0; d < this.$b.length;) b = this.$b[d],
b.Dd = a.Gc(b.Dd + 1 / b.duration * c, 0, 1),
"MOVE" == b.type ? (this.x = a.sn(b.kk, b.kk, b.Qf, b.Qf, b.Dd), this.y = a.sn(b.lk, b.lk, b.Cg, b.Cg, b.Dd)) : "SCALE" == b.type && (this.scale = a.sn(b.Cg, b.Cg, b.Qf, b.Qf, b.Dd)),
1 == b.Dd ? ("MOVE" == b.type ? this.Ti = !0 : "SCALE" == b.type && (this.Ak = !0), this.$b.splice(d, 1)) : d++
};
p.prototype.mx = function(a) {
for (var b = 0; b < this.$b.length; b++) {
var c = this.$b[b];
"MOVE" == c.type ? (c.Qf = a.Am(), c.Cg = a.Bm()) : "SCALE" == c.type && (c.Qf = a.scale)
}
};
p.prototype.Ds = function(c, b, d, e) {
var h = this.sg,
m = this.vi;
if (this.bl && 0 < h.length) {
var p = 0,
t = 0,
z = 0;
if (this.mj) {
for (var x = m = z = 0,
y = 0,
H = t = !1,
N = !1,
S = !1,
p = 0; p < h.length; p++) {
var K = h[p];
K.Rb();
t ? z = Math.min(z, K.Bb.left) : (z = K.Bb.left, t = !0);
H ? m = Math.max(m, K.Bb.right) : (m = K.Bb.right, H = !0);
N ? x = Math.min(x, K.Bb.top) : (x = K.Bb.top, N = !0);
S ? y = Math.max(y, K.Bb.bottom) : (y = K.Bb.bottom, S = !0)
}
h = (b - 2 * this.kj) / (m - z);
H = (d - 2 * this.lj) / (y - x);
p = a.Xa(z, m, 0.5);
t = a.Xa(x, y, 0.5);
this.x < b / 2 / h && (h = (b - this.kj) / m, p = b / h / 2);
this.x > e.width - b / 2 / h && (h = (b - this.kj) / (e.width - z), p = e.width - b / h / 2);
this.y < d / 2 / H && (H = (d - this.lj) / y, t = d / H / 2);
this.y > e.height - d / 2 / H && (H = (d - this.lj) / (e.height - x), t = e.height - d / H / 2);
z = Math.min(h, H); - 1 != this.ij && z < this.ij && (z = this.ij); - 1 != this.jj && z > this.jj && (z = this.jj)
} else {
for (p = d = b = e = 0; p < h.length; p++) e += h[p].xi(m[p], !0) * this.Bg[p],
b += h[p].xi(m[p], !1) * this.Bg[p],
d += this.Bg[p];
p = e / d;
t = b / d
}
1 == this.Dj ? (this.x = p, this.y = t, this.mj && (this.scale = z)) : (c = 4 * this.Dj * c * Math.sqrt(1 / c), this.x = a.Xa(this.x, p, c), this.y = a.Xa(this.y, t, c), this.mj && (this.scale = a.Xa(this.scale, z, c)))
}
};
var d = Bc.prototype;
d.ga = function(a) {
this.wa = a;
this.n = a.n
};
d.ga.prototype.U = f();
d.X = function(a) {
this.type = a;
this.n = a.n;
this.Z = [];
this.El = this.Xj = 0;
this.mm = this.Lg = null;
this.ja = [];
this.Yd = null
};
var c = d.X.prototype;
c.U = function() {
this.n.Xh(this);
this.Ui = -1
};
c.Mb = function() {
null != this.Lg && this.Z.push(this.Lg);
for (var a = {
lcc: this.Xj,
olcc: this.El,
alcc: this.Z.length,
agcc: this.ja.length,
tcnn: null == this.Lg ? !1 : !0
},
b = 0; b < this.Z.length; b++) {
a["lc" + b + "g"] = this.Z[b].global;
a["lc" + b + "n"] = this.Z[b].name;
a["lc" + b + "x"] = this.Z[b].x;
a["lc" + b + "y"] = this.Z[b].y;
a["lc" + b + "s"] = this.Z[b].scale;
a["lc" + b + "f"] = this.Z[b].bl;
a["lc" + b + "foc"] = this.Z[b].sg.length;
for (var c = 0; c < this.Z[b].sg.length; c++) a["lc" + b + "fo" + c] = this.Z[b].sg[c].uid;
for (c = 0; c < this.Z[b].Bg.length; c++) a["lc" + b + "fow" + c] = this.Z[b].Bg[c];
for (c = 0; c < this.Z[b].vi.length; c++) a["lc" + b + "foip" + c] = this.Z[b].vi[c];
a["lc" + b + "fl"] = this.Z[b].Dj;
a["lc" + b + "ztc"] = this.Z[b].mj;
a["lc" + b + "zmh"] = this.Z[b].kj;
a["lc" + b + "zmv"] = this.Z[b].lj;
a["lc" + b + "zbu"] = this.Z[b].jj;
a["lc" + b + "zbl"] = this.Z[b].ij;
a["lc" + b + "tc"] = this.Z[b].$b.length;
for (c = 0; c < this.Z[b].$b.length; c++) a["lc" + b + "t" + c + "tp"] = this.Z[b].$b[c].type,
a["lc" + b + "t" + c + "d"] = this.Z[b].$b[c].duration,
a["lc" + b + "t" + c + "p1"] = this.Z[b].$b[c].Qf,
a["lc" + b + "t" + c + "p2"] = this.Z[b].$b[c].Cg,
a["lc" + b + "t" + c + "p3"] = this.Z[b].$b[c].kk,
a["lc" + b + "t" + c + "p4"] = this.Z[b].$b[c].lk,
a["lc" + b + "t" + c + "pr"] = this.Z[b].$b[c].Dd;
a["lc" + b + "mtf"] = this.Z[b].Ti;
a["lc" + b + "ztf"] = this.Z[b].Ak;
a["lc" + b + "csis"] = this.Z[b].Hi;
a["lc" + b + "cssx"] = this.Z[b].Oh;
a["lc" + b + "cssy"] = this.Z[b].Ph;
a["lc" + b + "cssz"] = this.Z[b].Qh;
a["lc" + b + "csst"] = this.Z[b].Te;
a["lc" + b + "csss"] = this.Z[b].Nh;
a["lc" + b + "cssmd"] = this.Z[b].$i;
a["lc" + b + "cssmzd"] = this.Z[b].ok;
a["lc" + b + "cssl"] = this.Z[b].Zi;
a["lc" + b + "cssbt"] = this.Z[b].Yi;
a["lc" + b + "cssdt"] = this.Z[b].Mh
}
for (b = 0; b < this.ja.length; b++) {
a["gc" + b + "g"] = this.ja[b].global;
a["gc" + b + "n"] = this.ja[b].name;
a["gc" + b + "x"] = this.ja[b].x;
a["gc" + b + "y"] = this.ja[b].y;
a["gc" + b + "s"] = this.ja[b].scale;
a["gc" + b + "f"] = this.ja[b].bl;
a["gc" + b + "foc"] = this.ja[b].sg.length;
for (c = 0; c < this.ja[b].sg.length; c++) a["gc" + b + "fo" + c] = this.ja[b].sg[c].uid;
for (c = 0; c < this.ja[b].Bg.length; c++) a["gc" + b + "fow" + c] = this.ja[b].Bg[c];
for (c = 0; c < this.ja[b].vi.length; c++) a["gc" + b + "foip" + c] = this.ja[b].vi[c];
a["gc" + b + "fl"] = this.ja[b].Dj;
a["gc" + b + "ztc"] = this.ja[b].mj;
a["gc" + b + "zmh"] = this.ja[b].kj;
a["gc" + b + "zmv"] = this.ja[b].lj;
a["gc" + b + "zbu"] = this.ja[b].jj;
a["gc" + b + "zbl"] = this.ja[b].ij;
a["gc" + b + "tc"] = this.ja[b].$b.length;
for (c = 0; c < this.ja[b].$b.length; c++) a["gc" + b + "t" + c + "tp"] = this.ja[b].$b[c].type,
a["gc" + b + "t" + c + "d"] = this.ja[b].$b[c].duration,
a["gc" + b + "t" + c + "p1"] = this.ja[b].$b[c].Qf,
a["gc" + b + "t" + c + "p2"] = this.ja[b].$b[c].Cg,
a["gc" + b + "t" + c + "p3"] = this.ja[b].$b[c].kk,
a["gc" + b + "t" + c + "p4"] = this.ja[b].$b[c].lk;
a["gc" + b + "mtf"] = this.ja[b].Ti;
a["gc" + b + "ztf"] = this.ja[b].Ak;
a["gc" + b + "csis"] = this.ja[b].Hi;
a["gc" + b + "cssx"] = this.ja[b].Oh;
a["gc" + b + "cssy"] = this.ja[b].Ph;
a["gc" + b + "cssz"] = this.ja[b].Qh;
a["gc" + b + "csst"] = this.ja[b].Te;
a["gc" + b + "csss"] = this.ja[b].Nh;
a["gc" + b + "cssmd"] = this.ja[b].$i;
a["gc" + b + "cssmzd"] = this.ja[b].ok;
a["gc" + b + "cssl"] = this.ja[b].Zi;
a["gc" + b + "cssbt"] = this.ja[b].Yi;
a["gc" + b + "cssdt"] = this.ja[b].Mh
}
a.ac = null != this.Yd ? this.Yd.name: "null";
null != this.mm && (a.tt = this.mm.name);
return a
};
c.Vb = function(a) {
this.Z = [];
this.ja = [];
this.Xj = a.lcc;
this.El = a.olcc;
for (var b = a.alcc,
c = 0; c < b; c++) {
var d = new p("", 0, 0, 0, !1);
d.global = a["lc" + c + "g"];
d.name = a["lc" + c + "n"];
d.x = a["lc" + c + "x"];
d.y = a["lc" + c + "y"];
d.scale = a["lc" + c + "s"];
d.bl = a["lc" + c + "f"];
for (var e = a["lc" + c + "foc"], m = 0; m < e; m++) d.Ej.push(a["lc" + c + "fo" + m]);
for (m = 0; m < e; m++) d.Bg.push(a["lc" + c + "fow" + m]);
for (m = 0; m < e; m++) d.vi.push(a["lc" + c + "foip" + m]);
d.Dj = a["lc" + c + "fl"];
d.mj = a["lc" + c + "ztc"];
d.kj = a["lc" + c + "zmh"];
d.lj = a["lc" + c + "zmv"];
d.jj = a["lc" + c + "zbu"];
d.ij = a["lc" + c + "zbl"];
e = a["lc" + c + "tc"];
for (m = 0; m < e; m++) {
var A = new h;
A.type = a["lc" + c + "t" + m + "tp"];
A.duration = a["lc" + c + "t" + m + "d"];
A.Qf = a["lc" + c + "t" + m + "p1"];
A.Cg = a["lc" + c + "t" + m + "p2"];
A.kk = a["lc" + c + "t" + m + "p3"];
A.lk = a["lc" + c + "t" + m + "p4"];
A.Dd = a["lc" + c + "t" + m + "pr"];
d.$b.push(A)
}
d.Ti = a["lc" + c + "mtf"];
d.Ak = a["lc" + c + "ztf"];
d.Hi = a["lc" + c + "csis"];
d.Oh = a["lc" + c + "cssx"];
d.Ph = a["lc" + c + "cssy"];
d.Qh = a["lc" + c + "cssz"];
d.Te = a["lc" + c + "csst"];
d.Nh = a["lc" + c + "csss"];
d.$i = a["lc" + c + "cssmd"];
d.ok = a["lc" + c + "cssmzd"];
d.Zi = a["lc" + c + "cssl"];
d.Yi = a["lc" + c + "cssbt"];
d.Mh = a["lc" + c + "cssdt"];
this.Z.push(d)
}
b = a.agcc;
for (c = 0; c < b; c++) {
d = new p("", 0, 0, 0, !1);
d.global = a["gc" + c + "g"];
d.name = a["gc" + c + "n"];
d.x = a["gc" + c + "x"];
d.y = a["gc" + c + "y"];
d.scale = a["gc" + c + "s"];
d.bl = a["gc" + c + "f"];
e = a["gc" + c + "foc"];
for (m = 0; m < e; m++) d.Ej.push(a["gc" + c + "fo" + m]);
for (m = 0; m < e; m++) d.Bg.push(a["gc" + c + "fow" + m]);
for (m = 0; m < e; m++) d.vi.push(a["gc" + c + "foip" + m]);
d.Dj = a["gc" + c + "fl"];
d.mj = a["gc" + c + "ztc"];
d.kj = a["gc" + c + "zmh"];
d.lj = a["gc" + c + "zmv"];
d.jj = a["gc" + c + "zbu"];
d.ij = a["gc" + c + "zbl"];
e = a["gc" + c + "tc"];
for (m = 0; m < e; m++) A = new h,
A.type = a["gc" + c + "t" + m + "tp"],
A.duration = a["gc" + c + "t" + m + "d"],
A.Qf = a["gc" + c + "t" + m + "p1"],
A.Cg = a["gc" + c + "t" + m + "p2"],
A.kk = a["gc" + c + "t" + m + "p3"],
A.lk = a["gc" + c + "t" + m + "p4"],
d.$b.push(A);
d.Ti = a["gc" + c + "mtf"];
d.Ak = a["gc" + c + "ztf"];
d.Hi = a["gc" + c + "csis"];
d.Oh = a["gc" + c + "cssx"];
d.Ph = a["gc" + c + "cssy"];
d.Qh = a["gc" + c + "cssz"];
d.Te = a["gc" + c + "csst"];
d.Nh = a["gc" + c + "csss"];
d.$i = a["gc" + c + "cssmd"];
d.ok = a["gc" + c + "cssmzd"];
d.Zi = a["gc" + c + "cssl"];
d.Yi = a["gc" + c + "cssbt"];
d.Mh = a["gc" + c + "cssdt"];
this.ja.push(d)
}
c = a.ac;
this.Yd = "null" == c ? null: this.ei(c);
a.tcnn && (this.Lg = this.Z.pop(), this.mm = this.ei(a.tt))
};
c.ef = function() {
for (var a = 0; a < this.Z.length; a++) for (var b = 0; b < this.Z[a].Ej.length; b++) this.Z[a].sg.push(this.n.uh(this.Z[a].Ej[b]));
for (a = 0; a < this.ja.length; a++) for (b = 0; b < this.ja[a].Ej.length; b++) this.ja[a].sg.push(this.n.uh(this.ja[a].Ej[b]))
};
c.po = function() {
for (var a = 0; a < this.El; a++) this.Z.shift();
this.Xj -= this.El
};
c.Fb = function() {
this.El = this.Xj;
var a = this.n.mf(this);
0 == a && (a = 0.1);
for (var b = 0; b < this.ja.length; b++) this.ja[b].tp(a),
this.ja[b].Ds(a, this.n.Bc, this.n.Ac, this.n.ra),
this.ja[b].vj(a);
for (b = 0; b < this.Z.length; b++) this.Z[b].tp(a),
this.Z[b].Ds(a, this.n.Bc, this.n.Ac, this.n.ra),
this.Z[b].vj(a);
null != this.Lg && (this.Lg.mx(this.mm), this.Lg.tp(a), this.Lg.Ti && (this.Yd = this.mm, this.Lg = null));
null != this.Yd && (this.n.ra.Lo(this.Yd.Am() + this.Yd.Oh), this.n.ra.$l(this.Yd.Bm() + this.Yd.Ph), this.n.ra.scale = this.Yd.scale + this.Yd.Qh, this.n.Ga = !0)
};
c.de = f();
c.wd = f();
c.ei = function(a) {
if ("" == a) return this.Yd;
for (var b = this.ja.length - 1; 0 <= b; b--) if (this.ja[b].name == a) return this.ja[b];
for (b = this.Z.length - 1; 0 <= b; b--) if (this.Z[b].name == a) return this.Z[b];
return null
};
d.k = new(f());
e.prototype.Yv = function(a, b, c, d, e) {
"" == a ? alert("Camera name must not be blank.") : (this.Z.push(new p(a, b, c, d, !1)), this.Xj++, 1 == e && (this.Yd = this.Z[this.Z.length - 1], this.n.ra.scale = this.Yd.scale))
};
e.prototype.Ms = function(a, b) {
var c = this.ei(a);
null != c && c.ki(b)
};
e.prototype.$w = function(a, b, c) {
a = this.ei(a);
null != a && (a.tc(b), a.ki(c))
};
e.prototype.vj = function(a, b, c, d, e, h, m) {
a = this.ei(a);
null != a && (a.Hi = !0, a.Nh = b / 100, a.$i = c, a.ok = d, a.Yi = e, a.Mh = h, a.Zi = m, a.Te = 0)
};
d.b = new e;
m.prototype.Am = function(a, b) {
var c = this.ei(b);
null != c ? a.K(c.x) : a.K(0)
};
m.prototype.Bm = function(a, b) {
var c = this.ei(b);
null != c ? a.K(c.y) : a.K(0)
};
d.j = new m
})();
function Cc(h) {
this.n = h
} (function() {
function h() {}
function p() {}
function e() {}
var m = Cc.prototype;
m.ga = function(a) {
this.wa = a;
this.n = a.n
};
m.ga.prototype.U = f();
m.X = function(a) {
this.type = a;
this.n = a.n;
this.Lp = Array(4);
this.yv = this.Zo = this.sk = this.zg = this.Nf = 0;
this.vq = !1
};
var a = m.X.prototype;
a.U = function() {
var a = this;
if (!this.n.Zb) {
jQuery(document).mousemove(function(b) {
a.hr(b)
});
jQuery(document).mousedown(function(b) {
a.gr(b)
});
jQuery(document).mouseup(function(b) {
a.ir(b)
});
jQuery(document).dblclick(function(b) {
a.hA(b)
});
var d = function(b) {
a.lA(b)
};
document.addEventListener("mousewheel", d, !1);
document.addEventListener("DOMMouseScroll", d, !1)
}
};
var d = {
left: 0,
top: 0
};
a.hr = function(a) {
var g = this.n.Zb ? d: jQuery(this.n.canvas).offset();
this.Nf = a.pageX - g.left;
this.zg = a.pageY - g.top
};
a.vu = function() {
return 0 < this.n.Ld ? !0 : 0 <= this.Nf && 0 <= this.zg && this.Nf < this.n.width && this.zg < this.n.height
};
a.gr = function(a) {
this.vu() && (this.n.Ij && !this.n.we && a.preventDefault(), this.Lp[a.which] = !0, this.n.kc = !0, this.n.trigger(Cc.prototype.k.rw, this), this.sk = a.which - 1, this.Zo = 0, this.n.trigger(Cc.prototype.k.rs, this), this.n.trigger(Cc.prototype.k.xs, this), this.n.kc = !1)
};
a.ir = function(a) {
this.Lp[a.which] && (this.n.Ij && !this.n.we && a.preventDefault(), this.n.Ij = !0, this.Lp[a.which] = !1, this.n.kc = !0, this.sk = a.which - 1, this.n.trigger(Cc.prototype.k.Jw, this), this.n.kc = !1)
};
a.hA = function(a) {
this.vu() && (a.preventDefault(), this.n.kc = !0, this.sk = a.which - 1, this.Zo = 1, this.n.trigger(Cc.prototype.k.rs, this), this.n.trigger(Cc.prototype.k.xs, this), this.n.kc = !1)
};
a.lA = function(a) {
this.yv = 0 > (a.wheelDelta ? a.wheelDelta: a.detail ? -a.detail: 0) ? 0 : 1;
this.vq = !1;
this.n.kc = !0;
this.n.trigger(Cc.prototype.k.Pw, this);
this.n.kc = !1;
this.vq && a.preventDefault()
};
h.prototype.rs = function(a, d) {
return a === this.sk && d === this.Zo
};
h.prototype.rw = k(!0);
h.prototype.Jw = function(a) {
return a === this.sk
};
h.prototype.Ek = function(a) {
var d = this.n.Fj();
return Wa(this.n.Qr(a, this.Nf, this.zg, d.Lj), d.Lj)
};
h.prototype.xs = function(a, d, b) {
return a !== this.sk || d !== this.Zo ? !1 : this.n.Qr(b, this.Nf, this.zg, !1)
};
h.prototype.Pw = function(a) {
this.vq = !0;
return a === this.yv
};
m.k = new h;
p.prototype.Lk = function(a) {
a = "auto pointer text crosshair move help wait none".split(" ")[a];
this.n.canvas && this.n.canvas.style && (this.n.canvas.style.cursor = a)
};
m.b = new p;
e.prototype.H = function(a, d) {
var b, e, h, m, p;
ja(d) ? (b = this.n.Oe(0), e = b.scale, h = b.td, m = b.Od, p = b.B, b.scale = this.n.ra.scale, b.td = 1, b.Od = 1, b.B = this.n.ra.B, a.K(b.Zc(this.Nf, this.zg, !0)), b.scale = e, b.td = h, b.Od = m, b.B = p) : (b = la(d) ? this.n.Oe(d) : this.n.Gj(d)) ? a.K(b.Zc(this.Nf, this.zg, !0)) : a.K(0)
};
e.prototype.J = function(a, d) {
var b, e, h, m, p;
ja(d) ? (b = this.n.Oe(0), e = b.scale, h = b.td, m = b.Pd, p = b.B, b.scale = this.n.ra.scale, b.td = 1, b.Pd = 1, b.B = this.n.ra.B, a.K(b.Zc(this.Nf, this.zg, !1)), b.scale = e, b.td = h, b.Pd = m, b.B = p) : (b = la(d) ? this.n.Oe(d) : this.n.Gj(d)) ? a.K(b.Zc(this.Nf, this.zg, !1)) : a.K(0)
};
e.prototype.wm = function(a) {
a.K(this.Nf)
};
m.j = new e
})();
function Dc(h) {
this.n = h
} (function() {
var h = Dc.prototype;
h.ga = function(e) {
this.wa = e;
this.n = e.n
};
h.ga.prototype.U = f();
h.X = function(e) {
this.type = e;
this.n = e.n
};
var p = h.X.prototype;
p.U = function() {
this.Qv = []
};
p.Mb = function() {
return {
wl: this.Qv
}
};
p.Vb = function(e) {
this.Qv = e.wl
};
h.k = new(f());
h.b = new(f());
h.j = new(f())
})();
var Ec = 0,
Fc = 0,
Gc = 100,
Hc = 100,
Ic = -1,
Jc = [];
Jc[Ec] = [];
function E(h) {
this.n = h
} (function() {
function h() {}
function p() {}
function e() {}
var m = E.prototype;
m.ga = function(a) {
this.wa = a;
this.n = a.n
};
m.ga.prototype.U = f();
m.X = function(a) {
this.type = a;
this.n = a.n
};
var a = m.X.prototype;
a.U = function() {
this.eh = new E.ms(this);
this.Nk = null;
this.Zg = {}
};
a.As = function(a, c) {
this.Nk = a;
this.Zg = c;
this.n.trigger(E.prototype.k.Lw, this)
};
a.ts = function(a, c) {
this.Nk = a;
this.Zg = c;
this.n.trigger(E.prototype.k.Ew, this)
};
m.k = new h;
h.prototype.Lw = function(a) {
if (a) return this.eh.Hm(a, this.Nk)
};
h.prototype.Ew = function(a) {
if (a) return this.eh.Hm(a, this.Nk)
};
m.b = new p;
p.prototype.Rc = function() {
this.eh.Rc()
};
p.prototype.W = function(a, c) {
a && this.eh.W(a, c)
};
p.prototype.Ug = function(a, c, g, b) {
Gc = a;
Hc = c;
Ic = g;
Fc = b;
this.eh.kw()
};
p.prototype.Yg = function(a) {
this.eh.jw(a)
};
p.prototype.Ge = function(a) {
this.eh.ox(a)
};
m.j = new e;
e.prototype.Og = function(a) {
var c = this.eh.kx();
a.rb(c)
}
})(); (function() {
function h(a, g) {
var b = d.Xr[a.uid],
e = d.Xr[g.uid];
return null != b && null != e ? b > e ? 1 : b < e ? -1 : 0 : null == b && null == e ? 0 : null == e ? 1 : -1
}
function p(a) {
this.wa = a;
this.js()
}
function e(a) {
for (var d in a) delete a[d];
return a
}
function m(a, d) {
var b = null == d ? {}: d,
e;
for (e in a) b[e] = a[e];
return b
}
E.ms = function(a) {
this.wa = a;
this.Hz = null != a.As;
this.Gz = null != a.ts;
this.Wm = new p(a);
this.fg = {};
this.Vm = {};
this.Zg = {};
this.Rc()
};
var a = E.ms.prototype;
a.Rc = function() {
e(this.fg)
};
a.yx = function(a) {
this.Nk = a;
e(this.Zg);
this.wa.As(a, this.Zg);
return m(this.Zg)
};
a.vx = function(a) {
var d = this.fg[a];
null == d ? (d = {},
this.fg[a] = d) : d = null;
return d
};
a.Cx = function(a, d) {
s && a instanceof s.prototype.X ? (d.plugin = "Sprite", d.cur_frame = a.qa, d.cur_anim_speed = a.qi, d.cur_anim_name = a.Tb.name) : Kc && a instanceof Kc.prototype.X ? (d.plugin = "Text", d.content = a.text) : d.plugin = "World";
d.x = a.x;
d.y = a.y;
d.width = a.width;
d.height = a.height;
d.angle = a.B;
d.opacity = a.opacity;
d.visible = a.visible;
d.layer = a.F.index;
d.z_order = a.F.A.indexOf(a)
};
a.zx = function(a, d) {
d.plugin = "Array";
d.content = a.Ht()
};
a.Ax = function(a, d) {
d.plugin = "Dictionary";
d.content = JSON.stringify({
c2dictionary: !0,
data: a.Hf
})
};
a.Bx = function(a, d) {
if (a.nd) {
d.container_insts = {};
var b, e = a.siblings.length,
h;
for (b = 0; b < e; b++) h = a.siblings[b],
d.container_insts[h.type.name] = h.uid,
h = this.Fs(h, !0),
h.create_me = !1
}
};
a.Fs = function(a, d) {
var b = this.vx(a.uid);
if (null != b) return b.create_me = !0,
b.saveduid = a.uid,
a.type.wa.Lf ? this.Cx(a, b) : xc && a instanceof xc.prototype.X ? this.zx(a, b) : C && a instanceof C.prototype.X && this.Ax(a, b),
b.type = a.type.name,
b.inst_vars = a.jc.slice(),
b.custom_data = this.Hz ? this.yx(a) : {},
d || this.Bx(a, b),
b
};
a.W = function(a, d) {
var b = a.Ea(),
e = b.Ha;
1 == d && (b.Ha = !0);
var h = b.xd().slice(),
m = h.length,
p;
for (p = 0; p < m; p++) this.Fs(h[p]);
b.Ha = e
};
a.xx = function(a, d) {
m(d, e(this.Zg));
this.wa.ts(a, this.Zg)
};
a.ux = function(a, d) {
"Sprite" == d.plugin ? (a.qi = d.cur_anim_speed, s.prototype.b.Pa.apply(a, [d.cur_frame]), s.prototype.b.ji.apply(a, [d.cur_anim_name, 1])) : "Text" == d.plugin && Kc.prototype.b.Ba.apply(a, [d.content]);
a.x = d.x + Gc;
a.y = d.y + Hc;
a.width = d.width;
a.height = d.height;
a.B = d.angle;
a.opacity = d.opacity;
a.visible = d.visible
};
a.qx = function(a, d) {
xc.prototype.b.Fk.apply(a, [d.content])
};
a.rx = function(a, d) {
C.prototype.b.Fk.apply(a, [d.content])
};
a.Ps = function(a, d) {
null != a && null != d && (this.Vm[d.saveduid] = a, a.type.wa.Lf ? this.ux(a, d) : "Array" == d.plugin ? this.qx(a, d) : "Dictionary" == d.plugin && this.rx(a, d), Da(a.jc, d.inst_vars), this.Gz && this.xx(a, d.custom_data), this.Wm.Ix(this.wa.n.Oe(d.layer)), this.Wm.ZA(a.uid, d.z_order))
};
a.tx = function(a, d) {
var b = d.container_insts;
if (null != b && a.nd) {
var e, h = a.siblings.length,
m, p;
for (e = 0; e < h; e++) m = a.siblings[e],
p = b[m.type.name],
this.Ps(m, this.Ns(p))
}
};
a.nx = function(a) {
var d = a.type;
this.Hm(d, a);
var b = this.wa.n;
b.ve++;
b.trigger(Object.getPrototypeOf(d.wa).k.Oa, a);
b.ve--
};
a.ls = function(a) {
"object" != typeof a && (a = this.Ns(a));
if (null == a || !a.create_me) return null;
var d = this.wa.n,
b = d.types[a.type],
e = b.Ea(),
h = e.Ha,
m = a.layer;
0 <= Ic && (m = Ic);
d = d.Rp(b, d.Oe(m), a.x, a.y);
if (!d) return null;
this.Ps(d, a);
Jc[Ec][d.uid] = d;
this.tx(d, a);
this.nx(d);
e.Ha = h;
return d
};
a.ox = function(a) {
var d = this.wa.n,
b;
for (b in Jc[a]) d.Af(Jc[a][b]);
Jc[a] = []
};
a.mw = function() {
this.Wm.js();
e(this.Vm)
};
a.lw = function() {
this.Wm.cx();
e(this.Vm)
};
a.wx = function() {
Ec = Fc;
Jc[Ec] = [];
for (var a in this.fg) this.ls(a)
};
a.kw = function() {
this.mw();
this.wx();
this.lw()
};
a.kx = function() {
return JSON.stringify(this.fg)
};
a.jw = function(a) {
this.fg = JSON.parse(a)
};
a.oB = ea("fg");
a.pB = function(a) {
m(a, e(this.fg))
};
a.Ns = function(a) {
return this.fg[a]
};
a.Hm = function(a, d) {
if (!a || !d) return ! 1;
if (a.za) {
var b = a.Si,
e = b.length,
h, m, p = !1;
for (h = 0; h < e; h++) if (m = b[h], d.type == m) {
p = !0;
break
}
if (!p) return ! 1
} else if (d.type != a) return ! 1;
a.Ea().Wi(d);
if (d.nd) for (b = d.siblings.length, h = 0; h < b; h++) e = d.siblings[h],
e.type.Ea().Wi(e);
return ! 0
};
a.Tw = function(a) {
var d = this.Vm[a];
null == d && (d = this.ls(a));
return d
};
a.SB = function(a, d) {
return this.Hm(a, this.Tw(d))
};
a = p.prototype;
a.js = function() {
this.Wa = {};
this.Xr = {}
};
a.Ix = function(a) {
null == this.Wa[a.index] && (this.Wa[a.index] = a)
};
a.ZA = function(a, d) {
this.Xr[a] = d
};
var d = null;
a.cx = function() {
var a, e;
d = this;
for (a in this.Wa) e = this.Wa[a],
e.A.sort(h),
e.Ud = !0;
this.wa.n.Ga = !0
}
})();
function s(h) {
this.n = h
} (function() {
function h() {
if (0 === this.Wp.length) {
var a = document.createElement("canvas");
a.width = this.width;
a.height = this.height;
var b = a.getContext("2d");
this.pk ? b.drawImage(this.ua, this.dk, this.ek, this.width, this.height, 0, 0, this.width, this.height) : b.drawImage(this.ua, 0, 0, this.width, this.height);
this.Wp = a.toDataURL("image/png")
}
return this.Wp
}
function p() {}
function e(a) {
a[0] = 0;
a[1] = 0;
a[2] = 0;
A.push(a)
}
function m(a, b) {
return a < b ? "" + a + "," + b: "" + b + "," + a
}
function a(a, b, c, d) {
b = b.uid;
c = c.uid;
var e = m(b, c);
if (a.hasOwnProperty(e)) a[e][2] = d;
else {
var g = A.length ? A.pop() : [0, 0, 0];
g[0] = b;
g[1] = c;
g[2] = d;
a[e] = g
}
}
function d(a, b, c) {
b = m(b.uid, c.uid);
a.hasOwnProperty(b) && (e(a[b]), delete a[b])
}
function c(a, b, c) {
b = m(b.uid, c.uid);
if (a.hasOwnProperty(b)) return t = a[b][2],
!0;
t = -2;
return ! 1
}
function g() {}
function b() {}
var l = s.prototype;
l.ga = function(a) {
this.wa = a;
this.n = a.n
};
var q = l.ga.prototype;
q.U = function() {
if (!this.za) {
var a, b, c, d, e, g, l, m, n;
this.ff = [];
this.Nn = !1;
a = 0;
for (b = this.Zd.length; a < b; a++) {
e = this.Zd[a];
l = {};
l.name = e[0];
l.speed = e[1];
l.loop = e[2];
l.Br = e[3];
l.Go = e[4];
l.Tu = e[5];
l.jb = e[6];
l.frames = [];
c = 0;
for (d = e[7].length; c < d; c++) g = e[7][c],
m = {},
m.To = g[0],
m.Sr = g[1],
m.dk = g[2],
m.ek = g[3],
m.width = g[4],
m.height = g[5],
m.duration = g[6],
m.yd = g[7],
m.zd = g[8],
m.zq = g[9],
m.wo = g[10],
m.Uu = g[11],
m.pk = 0 !== m.width,
m.Wp = "",
m.oC = h,
n = {
left: 0,
top: 0,
right: 1,
bottom: 1
},
m.Lr = n,
m.Ua = null,
(n = this.n.$y(g[0])) ? m.ua = n: (m.ua = new Image, m.ua.idtkLoadDisposed = !0, m.ua.src = g[0], m.ua.$x = g[0], m.ua.kt = g[1], m.ua.Rx = null, this.n.cs(m.ua)),
l.frames.push(m),
this.ff.push(m);
this.Zd[a] = l
}
}
};
q.$A = function() {
var a, b, c;
a = 0;
for (b = this.A.length; a < b; a++) c = this.A[a],
c.tn = c.Kd.Ua
};
q.Ml = function() {
if (!this.za) {
var a, b, c;
a = 0;
for (b = this.ff.length; a < b; ++a) c = this.ff[a],
c.ua.Rx = null,
c.Ua = null
}
};
q.ro = function() {
if (!this.za && this.A.length) {
var a, b, c;
a = 0;
for (b = this.ff.length; a < b; ++a) c = this.ff[a],
c.Ua = this.n.fa.Tj(c.ua, !1, this.n.qb, c.Uu);
this.$A()
}
};
q.Oq = function() {
if (!this.za && !this.Nn && this.n.fa) {
var a, b, c;
a = 0;
for (b = this.ff.length; a < b; ++a) c = this.ff[a],
c.Ua = this.n.fa.Tj(c.ua, !1, this.n.qb, c.Uu);
this.Nn = !0
}
};
q.cp = function() {
if (!this.za && !this.A.length && this.Nn) {
var a, b, c;
a = 0;
for (b = this.ff.length; a < b; ++a) c = this.ff[a],
this.n.fa.deleteTexture(c.Ua),
c.Ua = null;
this.Nn = !1
}
};
var n = [];
q.Ao = function(a) {
var b, c, d;
b = n.length = 0;
for (c = this.ff.length; b < c; ++b) d = this.ff[b].ua,
-1 === n.indexOf(d) && (a.drawImage(d, 0, 0), n.push(d))
};
l.X = function(a) {
this.type = a;
this.n = a.n;
a = this.type.Zd[0].frames[0].wo;
this.Ed ? this.zb.em(a) : this.zb = new gb(a)
};
var D = l.X.prototype;
D.U = function() {
this.visible = 0 === this.L[0];
this.Pn = this.ml = !1;
this.Je = 0 !== this.L[3];
1 === this.type.Zd.length && 1 === this.type.Zd[0].frames.length || 0 === this.type.Zd[0].speed || (this.n.Xh(this), this.ml = !0);
this.Tb = this.Gt(this.L[1]) || this.type.Zd[0];
this.qa = this.L[2];
0 > this.qa && (this.qa = 0);
this.qa >= this.Tb.frames.length && (this.qa = this.Tb.frames.length - 1);
var a = this.Tb.frames[this.qa];
this.zb.em(a.wo);
this.yd = a.yd;
this.zd = a.zd;
this.qi = this.Tb.speed;
this.Ed ? this.Ff.reset() : this.Ff = new eb;
this.tg = this.Ff.kb;
this.ni = !0;
this.ig = 0;
this.mi = !0;
this.jn = this.Zs = "";
this.it = 0;
this.hn = -1;
this.type.Oq();
var b, c, d, e, g, l, h, a = 0;
for (b = this.type.Zd.length; a < b; a++) for (e = this.type.Zd[a], c = 0, d = e.frames.length; c < d; c++) g = e.frames[c],
0 === g.width && (g.width = g.ua.width, g.height = g.ua.height),
g.pk && (h = g.ua, l = g.Lr, l.left = g.dk / h.width, l.top = g.ek / h.height, l.right = (g.dk + g.width) / h.width, l.bottom = (g.ek + g.height) / h.height, 0 === g.dk && 0 === g.ek && g.width === h.width && g.height === h.height && (g.pk = !1));
this.Kd = this.Tb.frames[this.qa];
this.tn = this.Kd.Ua
};
D.Mb = function() {
var a = {
a: this.Tb.jb,
f: this.qa,
cas: this.qi,
fs: this.tg,
ar: this.ig,
at: this.Ff.kb
};
this.ni || (a.ap = this.ni);
this.mi || (a.af = this.mi);
return a
};
D.Vb = function(a) {
var b = this.dz(a.a);
b && (this.Tb = b);
this.qa = a.f;
0 > this.qa && (this.qa = 0);
this.qa >= this.Tb.frames.length && (this.qa = this.Tb.frames.length - 1);
this.qi = a.cas;
this.tg = a.fs;
this.ig = a.ar;
this.Ff.reset();
this.Ff.kb = a.at;
this.ni = a.hasOwnProperty("ap") ? a.ap: !0;
this.mi = a.hasOwnProperty("af") ? a.af: !0;
this.Kd = this.Tb.frames[this.qa];
this.tn = this.Kd.Ua;
this.zb.em(this.Kd.wo);
this.yd = this.Kd.yd;
this.zd = this.Kd.zd
};
D.Ip = function(a) {
this.qa = a ? 0 : this.Tb.frames.length - 1;
this.ni = !1;
this.Zs = this.Tb.name;
this.Pn = !0;
this.n.trigger(s.prototype.k.qs, this);
this.n.trigger(s.prototype.k.qw, this);
this.Pn = !1;
this.ig = 0
};
D.qC = function() {
return this.Ff.kb
};
D.Fb = function() {
this.Ff.add(this.n.mf(this));
this.jn.length && this.qt();
0 <= this.hn && this.ut();
var a = this.Ff.kb,
b = this.Tb,
c = b.frames[this.qa],
d = c.duration / this.qi;
this.ni && a >= this.tg + d && (this.mi ? this.qa++:this.qa--, this.tg += d, this.qa >= b.frames.length && (b.Tu ? (this.mi = !1, this.qa = b.frames.length - 2) : b.loop ? this.qa = b.Go: (this.ig++, this.ig >= b.Br ? this.Ip(!1) : this.qa = b.Go)), 0 > this.qa && (b.Tu ? (this.qa = 1, this.mi = !0, b.loop || (this.ig++, this.ig >= b.Br && this.Ip(!0))) : b.loop ? this.qa = b.Go: (this.ig++, this.ig >= b.Br ? this.Ip(!0) : this.qa = b.Go)), 0 > this.qa ? this.qa = 0 : this.qa >= b.frames.length && (this.qa = b.frames.length - 1), a > this.tg + b.frames[this.qa].duration / this.qi && (this.tg = a), a = b.frames[this.qa], this.rj(c, a), this.n.Ga = !0)
};
D.Gt = function(a) {
var b, c, d;
b = 0;
for (c = this.type.Zd.length; b < c; b++) if (d = this.type.Zd[b], ob(d.name, a)) return d;
return null
};
D.dz = function(a) {
var b, c, d;
b = 0;
for (c = this.type.Zd.length; b < c; b++) if (d = this.type.Zd[b], d.jb === a) return d;
return null
};
D.qt = function() {
var a = this.Tb.frames[this.qa],
b = this.Gt(this.jn);
this.jn = ""; ! b || ob(b.name, this.Tb.name) && this.ni || (this.Tb = b, this.qi = b.speed, 0 > this.qa && (this.qa = 0), this.qa >= this.Tb.frames.length && (this.qa = this.Tb.frames.length - 1), 1 === this.it && (this.qa = 0), this.ni = !0, this.tg = this.Ff.kb, this.mi = !0, this.rj(a, this.Tb.frames[this.qa]), this.n.Ga = !0)
};
D.ut = function() {
var a = this.Tb.frames[this.qa],
b = this.qa;
this.qa = wa(this.hn);
0 > this.qa && (this.qa = 0);
this.qa >= this.Tb.frames.length && (this.qa = this.Tb.frames.length - 1);
b !== this.qa && (this.rj(a, this.Tb.frames[this.qa]), this.tg = this.Ff.kb, this.n.Ga = !0);
this.hn = -1
};
D.rj = function(a, b) {
var c = a.width,
d = a.height,
e = b.width,
g = b.height;
c != e && (this.width *= e / c);
d != g && (this.height *= g / d);
this.yd = b.yd;
this.zd = b.zd;
this.zb.em(b.wo);
this.Ta();
this.Kd = b;
this.tn = b.Ua;
c = 0;
for (d = this.$a.length; c < d; c++) e = this.$a[c],
e.Hu && e.Hu(a, b);
this.n.trigger(s.prototype.k.rj, this)
};
D.de = function(a) {
a.globalAlpha = this.opacity;
var b = this.Kd,
c = b.pk,
d = b.ua,
e = this.x,
g = this.y,
l = this.width,
h = this.height;
if (0 === this.B && 0 <= l && 0 <= h) e -= this.yd * l,
g -= this.zd * h,
this.n.Se && (e = e + 0.5 | 0, g = g + 0.5 | 0),
c ? a.drawImage(d, b.dk, b.ek, b.width, b.height, e, g, l, h) : a.drawImage(d, e, g, l, h);
else {
this.n.Se && (e = e + 0.5 | 0, g = g + 0.5 | 0);
a.save();
var m = 0 < l ? 1 : -1,
n = 0 < h ? 1 : -1;
a.translate(e, g);
1 === m && 1 === n || a.scale(m, n);
a.rotate(this.B * m * n);
e = 0 - this.yd * ra(l);
g = 0 - this.zd * ra(h);
c ? a.drawImage(d, b.dk, b.ek, b.width, b.height, e, g, ra(l), ra(h)) : a.drawImage(d, e, g, ra(l), ra(h));
a.restore()
}
};
D.wd = function(a) {
a.Qd(this.tn);
a.Kh(this.opacity);
var b = this.Kd,
c = this.kd;
if (this.n.Se) {
var d = (this.x + 0.5 | 0) - this.x,
e = (this.y + 0.5 | 0) - this.y;
b.pk ? a.wf(c.Gb + d, c.Hb + e, c.pc + d, c.qc + e, c.gc + d, c.hc + e, c.ec + d, c.fc + e, b.Lr) : a.Do(c.Gb + d, c.Hb + e, c.pc + d, c.qc + e, c.gc + d, c.hc + e, c.ec + d, c.fc + e)
} else b.pk ? a.wf(c.Gb, c.Hb, c.pc, c.qc, c.gc, c.hc, c.ec, c.fc, b.Lr) : a.Do(c.Gb, c.Hb, c.pc, c.qc, c.gc, c.hc, c.ec, c.fc)
};
D.gz = function(a) {
var b = this.Kd,
c, d;
c = 0;
for (d = b.zq.length; c < d; c++) if (ob(a, b.zq[c][0])) return c;
return - 1
};
D.xi = function(a, b) {
var c = this.Kd,
d = c.zq,
e;
e = ma(a) ? this.gz(a) : a - 1;
e = wa(e);
if (0 > e || e >= d.length) return b ? this.x: this.y;
var g = (d[e][1] - c.yd) * this.width,
d = d[e][2],
d = (d - c.zd) * this.height,
c = Math.cos(this.B);
e = Math.sin(this.B);
var l = g * c - d * e,
d = d * c + g * e,
g = l + this.x,
d = d + this.y;
return b ? g: d
};
var A = [],
t = -2,
z = [];
p.prototype.Dm = function(b) {
if (!b) return ! 1;
var g = this.n,
l = g.Fj(),
h = l.type;
l.Jb.Pp || (l.Jb.Pp = {},
g.Fp(function(a) {
return function(b) {
b = b.uid;
var c, d;
for (c in a) a.hasOwnProperty(c) && (d = a[c], d[0] === b || d[1] === b) && (e(a[c]), delete a[c])
}
} (l.Jb.Pp)));
var l = l.Jb.Pp,
m = h.Ea(),
n = b.Ea(),
m = m.xd(),
p,
q,
A,
D,
x,
y,
H,
N = this.n.Xe,
Q = N - 1,
aa = g.Jc().Ic;
for (q = 0; q < m.length; q++) {
A = m[q];
n.Ha ? (A.Rb(), this.n.nq(A.F, b, A.Bb, z), p = z) : p = n.xd();
for (D = 0; D < p.length; D++) x = p[D],
g.Wh(A, x) || g.Wx(A, x) ? (y = c(l, A, x), y = !y || t < Q, a(l, A, x, N), y && (g.Eh(aa.gb), y = h.Ea(), H = b.Ea(), y.Ha = !1, H.Ha = !1, h === b ? (y.A.length = 2, y.A[0] = A, y.A[1] = x, h.pe()) : (y.A.length = 1, H.A.length = 1, y.A[0] = A, H.A[0] = x, h.pe(), b.pe()), aa.Hh(), g.tf(aa.gb))) : d(l, A, x);
z.length = 0
}
return ! 1
};
var x = null,
y = new ha,
H = !1,
N = [];
q.finish = function(a) {
if (H) {
if (a) {
var b = this.n.Jc().Ic.Re;
a = x.Ea();
var c = y.wk(),
d,
e;
if (a.Ha) {
a.Ha = !1;
a.A.length = c.length;
d = 0;
for (e = c.length; d < e; d++) a.A[d] = c[d];
if (b) for (d = a.nb.length = 0, e = x.A.length; d < e; d++) c = x.A[d],
y.contains(c) || a.nb.push(c)
} else if (b) for (b = a.A.length, a.A.length = b + c.length, d = 0, e = c.length; d < e; d++) a.A[b + d] = c[d],
Fa(a.nb, c[d]);
else Da(a.A, c);
x.pe()
}
y.clear();
H = !1
}
};
p.prototype.eg = function(a) {
if (a) {
var b = !1,
c, d, e, g = this.n.Fj(),
l = g.type,
g = g.Lj;
c = a.Ea();
d = this.n.Jc().Ic.Re;
var h;
c.Ha ? (this.Rb(), this.n.nq(this.F, a, this.Bb, N), h = N) : h = d ? c.nb: c.A;
x = a;
H = l !== a && !g;
c = 0;
for (d = h.length; c < d; c++) if (e = h[c], this.n.Wh(this, e)) {
b = !0;
if (g) break;
l !== a && y.add(e)
}
N.length = 0;
a = b
} else a = !1;
return a
};
p.prototype.nj = function(a, b) {
return kc(this.qa, a, b)
};
p.prototype.qw = function(a) {
return ob(this.Zs, a)
};
p.prototype.qs = k(!0);
p.prototype.rj = k(!0);
l.k = new p;
g.prototype.ji = function(a, b) {
this.jn = a;
this.it = b;
this.ml || (this.n.Xh(this), this.ml = !0);
this.Pn || this.qt()
};
g.prototype.Pa = function(a) {
this.hn = a;
this.ml || (this.n.Xh(this), this.ml = !0);
this.Pn || this.ut()
};
g.prototype.ya = function(a) {
var b = this.Kd,
c = b.width * a * (0 > this.width ? -1 : 1);
a = b.height * a * (0 > this.height ? -1 : 1);
if (this.width !== c || this.height !== a) this.width = c,
this.height = a,
this.Ta()
};
g.prototype.Ww = function(a) {
this.Je !== (0 !== a) && ((this.Je = 0 !== a) ? this.Ta() : (this.kh.right >= this.kh.left && this.type.Tk.update(this, this.kh, null), this.kh.set(0, 0, -1, -1)))
};
l.b = new g;
b.prototype.Ng = function(a) {
a.ta(this.qa)
};
b.prototype.ci = function(a) {
a.ta(this.Tb.frames.length)
};
b.prototype.gi = function(a, b) {
a.K(this.xi(b, !0))
};
b.prototype.hi = function(a, b) {
a.K(this.xi(b, !1))
};
b.prototype.Ib = function(a) {
a.K(this.Kd.width)
};
b.prototype.Na = function(a) {
a.K(this.Kd.height)
};
l.j = new b
})();
function I(h) {
this.n = h
} (function() {
function h(a, b, d) {
if (d) {
var e;
d = 0;
for (e = b.length; d < e; d++) a.length < c && a.push(b[d]);
b.length = 0
} else for (e in b) Object.prototype.hasOwnProperty.call(b, e) && (a.length < c && a.push(b[e]), delete b[e])
}
function p(a, b, c) {
var d = a.bd;
c = c.replace(/\s\s*$/, "");
b >= d.length && d.push(g.length ? g.pop() : {});
b = d[b];
b.text = c;
b.width = a.Vq(c);
a.$f = sa(a.$f, b.width)
}
function e() {}
function m() {}
var a = I.prototype;
a.U = f();
a.ga = function(a) {
this.wa = a;
this.n = a.n
};
var d = a.ga.prototype;
d.U = function() {
this.za || (this.ua = new Image, this.ua.idtkLoadDisposed = !0, this.ua.src = this.To, this.n.cs(this.ua), this.Ua = null)
};
d.Ml = function() {
this.za || (this.Ua = null)
};
d.ro = function() {
if (!this.za && this.A.length) {
this.Ua || (this.Ua = this.n.fa.Tj(this.ua, !1, this.n.qb, this.jm));
var a, b;
a = 0;
for (b = this.A.length; a < b; a++) this.A[a].Ua = this.Ua
}
};
d.cp = function() {
this.za || this.A.length || !this.Ua || (this.n.fa.deleteTexture(this.Ua), this.Ua = null)
};
d.Ao = function(a) {
a.drawImage(this.ua, 0, 0)
};
a.X = function(a) {
this.type = a;
this.n = a.n
};
d = a.X.prototype;
d.sf = function() {
h(g, this.bd, !0);
h(b, this.ln, !1);
h(l, this.mn, !1);
bb(this.jh)
};
d.U = function() {
this.ua = this.type.ua;
this.kn = this.L[0];
this.hh = this.L[1];
this.characterSet = this.L[2];
this.text = this.L[3];
this.jf = this.L[4];
this.visible = 0 === this.L[5];
this.wh = this.L[6] / 2;
this.fj = this.L[7] / 2;
this.vm = 0 === this.L[9];
this.ih = this.L[10];
this.lineHeight = this.L[11];
this.Zf = this.$f = 0;
this.Ed ? (this.bd.length = 0, bb(this.ln), bb(this.mn), bb(this.jh)) : (this.bd = [], this.ln = {},
this.mn = {},
this.jh = {});
this.sd = !0;
this.Mi = this.width;
this.n.fa && (this.type.Ua || (this.type.Ua = this.n.fa.Tj(this.type.ua, !1, this.n.qb, this.type.jm)), this.Ua = this.type.Ua);
this.gx()
};
d.Mb = function() {
var a = {
t: this.text,
csc: this.jf,
csp: this.ih,
lh: this.lineHeight,
tw: this.$f,
th: this.Zf,
lrt: this.Li,
cw: {}
},
b;
for (b in this.jh) a.cw[b] = this.jh[b];
return a
};
d.Vb = function(a) {
this.text = a.t;
this.jf = a.csc;
this.ih = a.csp;
this.lineHeight = a.lh;
this.$f = a.tw;
this.Zf = a.th;
this.Li = a.lrt;
for (var b in a.cw) this.jh[b] = a.cw[b];
this.sd = !0;
this.Mi = this.width
};
var c = 1E3,
g = [],
b = [],
l = [];
d.gx = function() {
for (var a = this.ua,
c = a.width,
d = a.height,
a = this.kn,
e = this.hh,
g = a / c,
h = e / d,
m = this.characterSet,
c = Math.floor(c / a), d = Math.floor(d / e), n = 0; n < m.length && !(n >= c * d); n++) {
var p = n % c,
q = Math.floor(n / c),
F = m.charAt(n);
if (this.n.fa) {
var T = this.mn,
ca = p * g,
R = q * h,
p = (p + 1) * g,
q = (q + 1) * h;
void 0 === T[F] && (T[F] = l.length ? l.pop() : new za);
T[F].left = ca;
T[F].top = R;
T[F].right = p;
T[F].bottom = q
} else T = this.ln,
p *= a,
q *= e,
ca = a,
R = e,
void 0 === T[F] && (T[F] = b.length ? b.pop() : {}),
T[F].x = p,
T[F].y = q,
T[F].Ov = ca,
T[F].Qt = R
}
};
var q = [];
a.Ap = function(a) {
q.length = 0;
for (var b = "",
c, d = 0; d < a.length;) if (c = a.charAt(d), "\n" === c) b.length && (q.push(b), b = ""),
q.push("\n"),
++d;
else if (" " === c || "\t" === c || "-" === c) {
do b += a.charAt(d),
d++;
while (d < a.length && (" " === a.charAt(d) || "\t" === a.charAt(d)));
q.push(b);
b = ""
} else d < a.length && (b += c, d++);
b.length && q.push(b)
};
a.Cp = function(a) {
var b = a.text,
c = a.bd;
if (b && b.length) {
var d = a.width;
if (2 >= d) h(g, c, !0);
else {
var e = a.jf,
l = a.ih;
if (b.length * (a.kn * e + l) - l <= d && -1 === b.indexOf("\n") && (l = a.Vq(b), l <= d)) {
h(g, c, !0);
c.push(g.length ? g.pop() : {});
c[0].text = b;
c[0].width = l;
a.$f = l;
a.Zf = a.hh * e + a.lineHeight;
return
}
this.Dp(a);
a.Zf = c.length * (a.hh * e + a.lineHeight)
}
} else h(g, c, !0)
};
a.Dp = function(a) {
var b = a.vm,
d = a.text,
e = a.bd,
l = a.width;
b && (this.Ap(d), d = q);
var h = "",
m, n, S, K = 0,
F = !1;
for (S = 0; S < d.length; S++)"\n" === d[S] ? (!0 === F ? F = !1 : (p(a, K, h), K++), h = "") : (F = !1, m = h, h += d[S], n = a.Vq(h.replace(/\s\s*$/, "")), n > l && ("" === m ? (p(a, K, h), h = "", F = !0) : (p(a, K, m), h = d[S]), K++, b || " " !== h || (h = "")));
h.replace(/\s\s*$/, "").length && (p(a, K, h), K++);
for (S = K; S < e.length; S++) g.length < c && g.push(e[S]);
e.length = K
};
d.Vq = function(a) {
for (var b = this.ih,
c = a.length,
d = 0,
e = 0; e < c; e++) d += this.cl(a.charAt(e)) * this.jf + b;
return d - (0 < d ? b: 0)
};
d.cl = function(a) {
var b = this.jh;
return void 0 !== b[a] ? b[a] : this.kn
};
d.xr = function() {
if (this.sd || this.width !== this.Mi) this.Zf = this.$f = 0,
this.type.wa.Cp(this),
this.sd = !1,
this.Mi = this.width
};
d.de = function(a) {
var b = this.ua;
if ("" !== this.text && null != b && (this.xr(), !(this.height < this.hh * this.jf + this.lineHeight))) {
a.globalAlpha = this.opacity;
var b = this.x,
c = this.y;
this.n.Se && (b = b + 0.5 | 0, c = c + 0.5 | 0);
a.save();
a.translate(b, c);
a.rotate(this.B);
for (var b = this.wh,
c = this.jf,
d = this.hh * c,
e = this.lineHeight,
g = this.ih,
l = this.bd,
h, m = -(this.yd * this.width), n = -(this.zd * this.height), n = n + this.fj * sa(0, this.height - this.Zf), p, q, ca = 0; ca < l.length; ca++) {
var R = l[ca].text;
h = b * sa(0, this.width - l[ca].width);
h = m + h;
for (var n = n + e,
W = 0; W < R.length; W++) {
var w = R.charAt(W),
u = this.ln[w];
if (h + this.cl(w) * c > this.width + 1E-5) break;
void 0 !== u && (p = h, q = n, 0 === this.B && (p = Math.round(p), q = Math.round(q)), a.drawImage(this.ua, u.x, u.y, u.Ov, u.Qt, p, q, u.Ov * c, u.Qt * c));
h += this.cl(w) * c + g
}
n += d;
if (n + d + e > this.height) break
}
a.restore()
}
};
var n = new Aa;
d.wd = function(a) {
a.Qd(this.Ua);
a.Kh(this.opacity);
if ("" !== this.text && (this.xr(), !(this.height < this.hh * this.jf + this.lineHeight))) {
this.Rb();
var b = this.kd,
c = 0,
d = 0;
this.n.Se && (c = (this.x + 0.5 | 0) - this.x, d = (this.y + 0.5 | 0) - this.y);
var e = this.B,
g = this.wh,
l = this.fj,
h = this.jf,
m = this.hh * h,
p = this.lineHeight,
q = this.ih,
T = this.bd,
ca = this.Zf,
R, W;
0 !== e && (R = Math.cos(e), W = Math.sin(e));
for (var w, c = b.Gb + c,
b = b.Hb + d,
l = l * sa(0, this.height - ca), u, M, ca = 0; ca < T.length; ca++) {
d = T[ca].text;
w = g * sa(0, this.width - T[ca].width);
for (var l = l + p,
da = 0; da < d.length; da++) {
var X = d.charAt(da),
V = this.mn[X];
if (w + this.cl(X) * h > this.width + 1E-5) break;
if (void 0 !== V) {
var G = this.kn * h,
Q = this.hh * h;
u = w;
M = l;
0 === e && (u = Math.round(u), M = Math.round(M));
n.Gb = u;
n.Hb = M;
n.pc = u + G;
n.qc = M;
n.ec = u;
n.fc = M + Q;
n.gc = u + G;
n.hc = M + Q;
0 !== e && (u = n, M = R, G = W, Q = void 0, Q = u.Gb * M - u.Hb * G, u.Hb = u.Hb * M + u.Gb * G, u.Gb = Q, Q = u.pc * M - u.qc * G, u.qc = u.qc * M + u.pc * G, u.pc = Q, Q = u.ec * M - u.fc * G, u.fc = u.fc * M + u.ec * G, u.ec = Q, Q = u.gc * M - u.hc * G, u.hc = u.hc * M + u.gc * G, u.gc = Q);
n.offset(c, b);
a.wf(n.Gb, n.Hb, n.pc, n.qc, n.gc, n.hc, n.ec, n.fc, V)
}
w += this.cl(X) * h + q
}
l += m;
if (l + m + p > this.height) break
}
}
};
a.k = new(f());
e.prototype.Ba = function(a) {
la(a) && 1E9 > a && (a = Math.round(1E10 * a) / 1E10);
a = a.toString();
this.text !== a && (this.text = a, this.sd = !0, this.n.Ga = !0)
};
e.prototype.ya = function(a) {
a !== this.jf && (this.jf = a, this.sd = !0, this.n.Ga = !0)
};
e.prototype.Hs = function(a) {
a !== this.Tv && (this.ih = a, this.sd = !0, this.n.Ga = !0)
};
e.prototype.tj = function(a) {
a !== this.lineHeight && (this.lineHeight = a, this.sd = !0, this.n.Ga = !0)
};
d.Vw = function(a, b) {
var c = parseInt(b, 10);
this.jh[a] !== c && (this.jh[a] = c, this.sd = !0, this.n.Ga = !0)
};
e.prototype.Is = function(a, b) {
if ("" !== a) for (var c = 0; c < a.length; c++) this.Vw(a.charAt(c), b)
};
e.prototype.sj = function(a) {
this.wh = a / 2;
this.sd = !0;
this.n.Ga = !0
};
a.b = new e;
m.prototype.ud = function(a) {
a.K(this.jf)
};
m.prototype.Tv = function(a) {
a.ta(this.ih)
};
m.prototype.Tg = function(a) {
a.ta(this.lineHeight)
};
m.prototype.Qa = function(a) {
a.rb(this.text);
};
m.prototype.bf = function(a) {
this.xr();
a.K(this.$f)
};
a.j = new m
})();
function Kc(h) {
this.n = h
} (function() {
function h() {
return g.length ? g.pop() : {}
}
function p(a) {
var c, d;
c = 0;
for (d = a.length; c < d; c++) g.push(a[c]);
a.length = 0
}
function e() {}
function m() {}
var a = Kc.prototype;
a.U = function() {
a.b.jd = function(a) {
this.width !== a && (this.width = a, this.sd = !0, this.Ta())
}
};
a.ga = function(a) {
this.wa = a;
this.n = a.n
};
var d = a.ga.prototype;
d.U = f();
d.Ml = function() {
if (!this.za) {
var a, c, d;
a = 0;
for (c = this.A.length; a < c; a++) d = this.A[a],
d.Of = null,
d.Vi = null,
d.he = null
}
};
a.X = function(a) {
this.type = a;
this.n = a.n;
this.Ed ? this.bd.length = 0 : this.bd = [];
this.sd = !0
};
d = a.X.prototype;
d.U = function() {
this.text = this.L[0];
this.visible = 0 === this.L[1];
this.font = this.L[2];
this.color = this.L[3];
this.wh = this.L[4];
this.fj = this.L[5];
this.vm = 0 === this.L[7];
this.Mi = this.eo = this.width;
this.bo = this.height;
this.Nq = this.L[8];
this.Fn = this.Bj = "";
this.Zf = this.$f = this.Wl = 0;
this.mA();
this.he = this.Vi = this.Of = null;
this.yu = !1;
this.Li = this.n.Xe;
this.Ed ? this.Fh.set(0, 0, 1, 1) : this.Fh = new za(0, 0, 1, 1);
this.n.fa && this.n.Xh(this)
};
d.mA = function() {
var a = this.font.split(" "),
c;
for (c = 0; c < a.length; c++) if ("pt" === a[c].substr(a[c].length - 2, 2)) {
this.Wl = parseInt(a[c].substr(0, a[c].length - 2));
this.sr = Math.ceil(96 * (this.Wl / 72)) + 4;
0 < c && (this.Fn = a[c - 1]);
this.Bj = a[c + 1];
for (c += 2; c < a.length; c++) this.Bj += " " + a[c];
break
}
};
d.Mb = function() {
return {
t: this.text,
f: this.font,
c: this.color,
ha: this.wh,
va: this.fj,
wr: this.vm,
lho: this.Nq,
fn: this.Bj,
fs: this.Fn,
ps: this.Wl,
pxh: this.sr,
tw: this.$f,
th: this.Zf,
lrt: this.Li
}
};
d.Vb = function(a) {
this.text = a.t;
this.font = a.f;
this.color = a.c;
this.wh = a.ha;
this.fj = a.va;
this.vm = a.wr;
this.Nq = a.lho;
this.Bj = a.fn;
this.Fn = a.fs;
this.Wl = a.ps;
this.sr = a.pxh;
this.$f = a.tw;
this.Zf = a.th;
this.Li = a.lrt;
this.sd = !0;
this.Mi = this.eo = this.width;
this.bo = this.height
};
d.Fb = function() {
if (this.n.fa && this.he && 300 <= this.n.Xe - this.Li) {
var a = this.F;
this.Rb();
var c = this.Bb;
if (c.right < a.Xc || c.bottom < a.Yc || c.left > a.Sd || c.top > a.Rd) this.n.fa.deleteTexture(this.he),
this.Of = this.Vi = this.he = null
}
};
d.sf = function() {
this.Of = this.Vi = null;
this.n.fa && this.he && this.n.fa.deleteTexture(this.he);
this.he = null
};
d.AC = function() {
this.font = this.Fn + " " + this.Wl.toString() + "pt " + this.Bj;
this.sd = !0;
this.n.Ga = !0
};
d.de = function(a, c) {
a.font = this.font;
a.textBaseline = "top";
a.fillStyle = this.color;
a.globalAlpha = c ? 1 : this.opacity;
var d = 1;
c && (d = this.F.ee(), a.save(), a.scale(d, d));
if (this.sd || this.width !== this.Mi) this.type.wa.Cp(this.text, this.bd, a, this.width, this.vm),
this.sd = !1,
this.Mi = this.width;
this.Rb();
var d = c ? 0 : this.kd.Gb,
e = c ? 0 : this.kd.Hb;
this.n.Se && (d = d + 0.5 | 0, e = e + 0.5 | 0);
0 === this.B || c || (a.save(), a.translate(d, e), a.rotate(this.B), e = d = 0);
var g = e + this.height,
h = this.sr,
h = h + this.Nq,
m, p;
1 === this.fj ? e += Math.max(this.height / 2 - this.bd.length * h / 2, 0) : 2 === this.fj && (e += Math.max(this.height - this.bd.length * h - 2, 0));
for (p = 0; p < this.bd.length && !(m = d, 1 === this.wh ? m = d + (this.width - this.bd[p].width) / 2 : 2 === this.wh && (m = d + (this.width - this.bd[p].width)), a.fillText(this.bd[p].text, m, e), e += h, e >= g - h); p++); (0 !== this.B || c) && a.restore();
this.Li = this.n.Xe
};
d.wd = function(a) {
if (! (1 > this.width || 1 > this.height)) {
var c = this.sd || this.yu;
this.yu = !1;
var d = this.F.ee(),
e = this.F.yc(),
g = this.Fh,
h = d * this.width,
m = d * this.height,
p = Math.ceil(h),
x = Math.ceil(m),
y = this.n.eb / 2,
H = this.n.cb / 2;
this.Vi || (this.Of = document.createElement("canvas"), this.Of.width = p, this.Of.height = x, this.eo = p, this.bo = x, c = !0, this.Vi = this.Of.getContext("2d"));
if (p !== this.eo || x !== this.bo) this.Of.width = p,
this.Of.height = x,
this.he && (a.deleteTexture(this.he), this.he = null),
c = !0;
c && (this.Vi.clearRect(0, 0, p, x), this.de(this.Vi, !0), this.he || (this.he = a.lg(p, x, this.n.qb, this.n.we)), a.fB(this.Of, this.he, this.n.we));
this.eo = p;
this.bo = x;
a.Qd(this.he);
a.Kh(this.opacity);
a.Sf();
a.translate( - y, -H);
a.bg();
var N = this.kd,
c = this.F.xb(N.Gb, N.Hb, !0, !0),
y = this.F.xb(N.Gb, N.Hb, !1, !0),
H = this.F.xb(N.pc, N.qc, !0, !0),
S = this.F.xb(N.pc, N.qc, !1, !0),
K = this.F.xb(N.gc, N.hc, !0, !0),
F = this.F.xb(N.gc, N.hc, !1, !0),
T = this.F.xb(N.ec, N.fc, !0, !0),
N = this.F.xb(N.ec, N.fc, !1, !0);
if (this.n.Se || 0 === this.B && 0 === e) var ca = (c + 0.5 | 0) - c,
R = (y + 0.5 | 0) - y,
c = c + ca,
y = y + R,
H = H + ca,
S = S + R,
K = K + ca,
F = F + R,
T = T + ca,
N = N + R;
0 === this.B && 0 === e ? (H = c + p, S = y, K = H, F = y + x, T = c, N = F, g.right = 1, g.bottom = 1) : (g.right = h / p, g.bottom = m / x);
a.wf(c, y, H, S, K, F, T, N, g);
a.Sf();
a.scale(d, d);
a.Dr( - this.F.yc());
a.translate((this.F.Xc + this.F.Sd) / -2, (this.F.Yc + this.F.Rd) / -2);
a.bg();
this.Li = this.n.Xe
}
};
var c = [];
a.Ap = function(a) {
c.length = 0;
for (var d = "",
e, g = 0; g < a.length;) if (e = a.charAt(g), "\n" === e) d.length && (c.push(d), d = ""),
c.push("\n"),
++g;
else if (" " === e || "\t" === e || "-" === e) {
do d += a.charAt(g),
g++;
while (g < a.length && (" " === a.charAt(g) || "\t" === a.charAt(g)));
c.push(d);
d = ""
} else g < a.length && (d += e, g++);
d.length && c.push(d)
};
var g = [];
a.Cp = function(a, c, d, e, g) {
if (a && a.length) if (2 >= e) p(c);
else {
if (100 >= a.length && -1 === a.indexOf("\n")) {
var m = d.measureText(a).width;
if (m <= e) {
p(c);
c.push(h());
c[0].text = a;
c[0].width = m;
return
}
}
this.Dp(a, c, d, e, g)
} else p(c)
};
a.Dp = function(a, d, e, m, p) {
p && (this.Ap(a), a = c);
var A = "",
t, z, x, y = 0;
for (x = 0; x < a.length; x++)"\n" === a[x] ? (y >= d.length && d.push(h()), z = d[y], z.text = A, z.width = e.measureText(A).width, y++, A = "") : (t = A, A += a[x], z = e.measureText(A).width, z >= m && (y >= d.length && d.push(h()), z = d[y], z.text = t, z.width = e.measureText(t).width, y++, A = a[x], p || " " !== A || (A = "")));
A.length && (y >= d.length && d.push(h()), z = d[y], z.text = A, z.width = e.measureText(A).width, y++);
for (x = y; x < d.length; x++) g.push(d[x]);
d.length = y
};
a.k = new(f());
e.prototype.Ba = function(a) {
la(a) && 1E9 > a && (a = Math.round(1E10 * a) / 1E10);
a = a.toString();
this.text !== a && (this.text = a, this.sd = !0, this.n.Ga = !0)
};
a.b = new e;
m.prototype.Qa = function(a) {
a.rb(this.text)
};
m.prototype.bf = function(a) {
var c = 0,
d, e, g;
d = 0;
for (e = this.bd.length; d < e; d++) g = this.bd[d].width,
c < g && (c = g);
a.ta(c)
};
a.j = new m
})();
function J(h) {
this.n = h
} (function() {
function h() {}
var p = J.prototype;
p.ga = function(e) {
this.wa = e;
this.n = e.n
};
var e = p.ga.prototype;
e.U = function() {
this.za || (this.ua = new Image, this.ua.idtkLoadDisposed = !0, this.ua.src = this.To, this.ua.kt = this.Sr, this.n.cs(this.ua), this.Ua = this.pattern = null)
};
e.Ml = function() {
this.za || (this.Ua = null)
};
e.ro = function() {
if (!this.za && this.A.length) {
this.Ua || (this.Ua = this.n.fa.Tj(this.ua, !0, this.n.qb, this.jm));
var e, a;
e = 0;
for (a = this.A.length; e < a; e++) this.A[e].Ua = this.Ua
}
};
e.Oq = function() {
this.za || this.Ua || !this.n.fa || (this.Ua = this.n.fa.Tj(this.ua, !0, this.n.qb, this.jm))
};
e.cp = function() {
this.za || this.A.length || !this.Ua || (this.n.fa.deleteTexture(this.Ua), this.Ua = null)
};
e.Ao = function(e) {
e.drawImage(this.ua, 0, 0)
};
p.X = function(e) {
this.type = e;
this.n = e.n
};
e = p.X.prototype;
e.U = function() {
this.visible = 0 === this.L[0];
this.Fh = new za(0, 0, 0, 0);
this.Tt = !1;
this.ua = this.type.ua;
this.n.fa ? (this.type.Oq(), this.Ua = this.type.Ua) : (this.type.pattern || (this.type.pattern = this.n.Eb.createPattern(this.type.ua, "repeat")), this.pattern = this.type.pattern)
};
e.ef = function() {
this.Tt = !1;
this.ua = this.type.ua
};
e.sf = function() {
this.n.fa && this.Tt && this.Ua && (this.n.fa.deleteTexture(this.Ua), this.Ua = null)
};
e.de = function(e) {
e.globalAlpha = this.opacity;
e.save();
e.fillStyle = this.pattern;
var a = this.x,
d = this.y;
this.n.Se && (a = a + 0.5 | 0, d = d + 0.5 | 0);
var c = -(this.yd * this.width),
g = -(this.zd * this.height),
b = c % this.ua.width,
h = g % this.ua.height;
0 > b && (b += this.ua.width);
0 > h && (h += this.ua.height);
e.translate(a, d);
e.rotate(this.B);
e.translate(b, h);
e.fillRect(c - b, g - h, this.width, this.height);
e.restore()
};
e.wd = function(e) {
e.Qd(this.Ua);
e.Kh(this.opacity);
var a = this.Fh;
a.right = this.width / this.ua.width;
a.bottom = this.height / this.ua.height;
var d = this.kd;
if (this.n.Se) {
var c = (this.x + 0.5 | 0) - this.x,
g = (this.y + 0.5 | 0) - this.y;
e.wf(d.Gb + c, d.Hb + g, d.pc + c, d.qc + g, d.gc + c, d.hc + g, d.ec + c, d.fc + g, a)
} else e.wf(d.Gb, d.Hb, d.pc, d.qc, d.gc, d.hc, d.ec, d.fc, a)
};
p.k = new(f());
p.b = new(f());
h.prototype.Ib = function(e) {
e.K(this.ua.width)
};
h.prototype.Na = function(e) {
e.K(this.ua.height)
};
p.j = new h
})();
function Lc(h) {
this.n = h
} (function() {
function h(a) {
g = a.x;
b = a.y;
l = a.z
}
function p(a) {
q = a.x;
n = a.y;
D = a.z
}
function e() {}
function m() {}
var a = Lc.prototype;
a.ga = function(a) {
this.wa = a;
this.n = a.n
};
a.ga.prototype.U = f();
a.X = function(a) {
this.type = a;
this.n = a.n;
this.touches = [];
this.Xq = !1
};
var d = a.X.prototype,
c = {
left: 0,
top: 0
};
d.$k = 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 g = 0,
b = 0,
l = 0,
q = 0,
n = 0,
D = 0;
d.U = function() {
this.Tz = !("undefined" === typeof window.c2isWindows8 || !window.c2isWindows8);
this.$h = this.Up = this.Tp = this.Ts = this.Ss = this.Rs = this.Gx = this.Fx = this.Ex = this.Rl = this.Ql = this.Pl = 0;
this.dB = 0 !== this.L[0];
var a = 0 < this.n.Ld ? document: this.n.canvas,
b = document;
this.n.ad ? b = a = window.Canvas: this.n.ue && (b = a = window);
var c = this;
window.navigator.pointerEnabled ? (a.addEventListener("pointerdown",
function(a) {
c.Gu(a)
},
!1), a.addEventListener("pointermove",
function(a) {
c.Fu(a)
},
!1), b.addEventListener("pointerup",
function(a) {
c.qo(a)
},
!1), b.addEventListener("pointercancel",
function(a) {
c.qo(a)
},
!1), this.n.canvas && (this.n.canvas.addEventListener("MSGestureHold",
function(a) {
a.preventDefault()
},
!1), document.addEventListener("MSGestureHold",
function(a) {
a.preventDefault()
},
!1), this.n.canvas.addEventListener("gesturehold",
function(a) {
a.preventDefault()
},
!1), document.addEventListener("gesturehold",
function(a) {
a.preventDefault()
},
!1))) : window.navigator.msPointerEnabled ? (a.addEventListener("MSPointerDown",
function(a) {
c.Gu(a)
},
!1), a.addEventListener("MSPointerMove",
function(a) {
c.Fu(a)
},
!1), b.addEventListener("MSPointerUp",
function(a) {
c.qo(a)
},
!1), b.addEventListener("MSPointerCancel",
function(a) {
c.qo(a)
},
!1), this.n.canvas && (this.n.canvas.addEventListener("MSGestureHold",
function(a) {
a.preventDefault()
},
!1), document.addEventListener("MSGestureHold",
function(a) {
a.preventDefault()
},
!1))) : (a.addEventListener("touchstart",
function(a) {
c.Ju(a)
},
!1), a.addEventListener("touchmove",
function(a) {
c.Iu(a)
},
!1), b.addEventListener("touchend",
function(a) {
c.jr(a)
},
!1), b.addEventListener("touchcancel",
function(a) {
c.jr(a)
},
!1));
if (this.Tz) {
var d = function(a) {
a = a.reading;
c.Rs = a.accelerationX;
c.Ss = a.accelerationY;
c.Ts = a.accelerationZ
},
e = function(a) {
a = a.reading;
c.Pl = a.yawDegrees;
c.Ql = a.pitchDegrees;
c.Rl = a.rollDegrees
},
g = Windows.Devices.Sensors.Accelerometer.getDefault();
g && (g.reportInterval = Math.max(g.minimumReportInterval, 16), g.addEventListener("readingchanged", d));
var l = Windows.Devices.Sensors.Inclinometer.getDefault();
l && (l.reportInterval = Math.max(l.minimumReportInterval, 16), l.addEventListener("readingchanged", e));
document.addEventListener("visibilitychange",
function() {
document.hidden || document.msHidden ? (g && g.removeEventListener("readingchanged", d), l && l.removeEventListener("readingchanged", e)) : (g && g.addEventListener("readingchanged", d), l && l.addEventListener("readingchanged", e))
},
!1)
} else window.addEventListener("deviceorientation",
function(a) {
c.Pl = a.alpha || 0;
c.Ql = a.beta || 0;
c.Rl = a.gamma || 0
},
!1),
window.addEventListener("devicemotion",
function(a) {
a.accelerationIncludingGravity && (c.Ex = a.accelerationIncludingGravity.x || 0, c.Fx = a.accelerationIncludingGravity.y || 0, c.Gx = a.accelerationIncludingGravity.z || 0);
a.acceleration && (c.Rs = a.acceleration.x || 0, c.Ss = a.acceleration.y || 0, c.Ts = a.acceleration.z || 0)
},
!1);
this.dB && !this.n.Zb && (jQuery(document).mousemove(function(a) {
c.hr(a)
}), jQuery(document).mousedown(function(a) {
c.gr(a)
}), jQuery(document).mouseup(function(a) {
c.ir(a)
}));
this.n.Mj && !this.n.ad && AppMobi.accelerometer.watchAcceleration(h, {
frequency: 40,
adjustForRotation: !0
});
this.n.of && navigator.accelerometer && navigator.accelerometer.watchAcceleration && navigator.accelerometer.watchAcceleration(p, null, {
frequency: 40
});
this.n.VA(this)
};
d.Fu = function(a) {
if (a.pointerType !== a.MSPOINTER_TYPE_MOUSE && "mouse" !== a.pointerType) {
a.preventDefault && a.preventDefault();
var b = this.$k(a.pointerId),
d = db();
if (0 <= b) {
var e = this.n.Zb ? c: jQuery(this.n.canvas).offset(),
b = this.touches[b];
2 > d - b.time || (b.co = b.time, b.zh = b.x, b.Ah = b.y, b.time = d, b.x = a.pageX - e.left, b.y = a.pageY - e.top)
}
}
};
d.Gu = function(a) {
if (a.pointerType !== a.MSPOINTER_TYPE_MOUSE && "mouse" !== a.pointerType) {
a.preventDefault && a.preventDefault();
var b = this.n.Zb ? c: jQuery(this.n.canvas).offset(),
d = a.pageX - b.left,
b = a.pageY - b.top,
e = db();
this.$h = this.touches.length;
this.touches.push({
time: e,
x: d,
y: b,
co: e,
zh: d,
Ah: b,
id: a.pointerId,
Or: this.$h
});
this.n.kc = !0;
this.n.trigger(Lc.prototype.k.ws, this);
this.n.trigger(Lc.prototype.k.sp, this);
this.Tp = d;
this.Up = b;
this.n.trigger(Lc.prototype.k.Em, this);
this.n.kc = !1
}
};
d.qo = function(a) {
a.pointerType !== a.MSPOINTER_TYPE_MOUSE && "mouse" !== a.pointerType && (a.preventDefault && a.preventDefault(), a = this.$k(a.pointerId), this.$h = 0 <= a ? this.touches[a].Or: -1, this.n.kc = !0, this.n.trigger(Lc.prototype.k.vs, this), this.n.trigger(Lc.prototype.k.rp, this), this.n.kc = !1, 0 <= a && this.touches.splice(a, 1))
};
d.Iu = function(a) {
a.preventDefault && a.preventDefault();
var b = db(),
d,
e,
g,
h;
d = 0;
for (e = a.changedTouches.length; d < e; d++) if (g = a.changedTouches[d], h = this.$k(g.identifier), 0 <= h) {
var l = this.n.Zb ? c: jQuery(this.n.canvas).offset();
h = this.touches[h];
2 > b - h.time || (h.co = h.time, h.zh = h.x, h.Ah = h.y, h.time = b, h.x = g.pageX - l.left, h.y = g.pageY - l.top)
}
};
d.Ju = function(a) {
a.preventDefault && a.preventDefault();
var b = this.n.Zb ? c: jQuery(this.n.canvas).offset(),
d = db();
this.n.kc = !0;
var e, g, h, l;
e = 0;
for (g = a.changedTouches.length; e < g; e++) if (h = a.changedTouches[e], l = this.$k(h.identifier), -1 === l) {
l = h.pageX - b.left;
var m = h.pageY - b.top;
this.$h = this.touches.length;
this.touches.push({
time: d,
x: l,
y: m,
co: d,
zh: l,
Ah: m,
id: h.identifier,
Or: this.$h
});
this.n.trigger(Lc.prototype.k.ws, this);
this.n.trigger(Lc.prototype.k.sp, this);
this.Tp = l;
this.Up = m;
this.n.trigger(Lc.prototype.k.Em, this)
}
this.n.kc = !1
};
d.jr = function(a) {
a.preventDefault && a.preventDefault();
this.n.kc = !0;
var b, c, d;
b = 0;
for (c = a.changedTouches.length; b < c; b++) d = a.changedTouches[b],
d = this.$k(d.identifier),
0 <= d && (this.$h = this.touches[d].Or, this.n.trigger(Lc.prototype.k.vs, this), this.n.trigger(Lc.prototype.k.rp, this), this.touches.splice(d, 1));
this.n.kc = !1
};
d.lC = function() {
return this.n.Mj && 0 === this.Pl && 0 !== l ? 90 * l: this.n.of && 0 === this.Pl && 0 !== D ? 90 * D: this.Pl
};
d.mC = function() {
return this.n.Mj && 0 === this.Ql && 0 !== b ? -90 * b: this.n.of && 0 === this.Ql && 0 !== n ? -90 * n: this.Ql
};
d.pC = function() {
return this.n.Mj && 0 === this.Rl && 0 !== g ? 90 * g: this.n.of && 0 === this.Rl && 0 !== q ? 90 * q: this.Rl
};
d.gr = function(a) {
a.preventDefault && this.n.Ij && !this.n.we && a.preventDefault();
this.Ju({
changedTouches: [{
pageX: a.pageX,
pageY: a.pageY,
identifier: 0
}]
});
this.Xq = !0
};
d.hr = function(a) {
this.Xq && this.Iu({
changedTouches: [{
pageX: a.pageX,
pageY: a.pageY,
identifier: 0
}]
})
};
d.ir = function(a) {
a.preventDefault && this.n.Ij && !this.n.we && a.preventDefault();
this.n.Ij = !0;
this.jr({
changedTouches: [{
pageX: a.pageX,
pageY: a.pageY,
identifier: 0
}]
});
this.Xq = !1
};
d.rk = function() {
var a, b, c, d = db();
a = 0;
for (b = this.touches.length; a < b; a++) c = this.touches[a],
c.time <= d - 50 && (c.co = d)
};
e.prototype.sp = k(!0);
e.prototype.rp = k(!0);
e.prototype.gw = function() {
return this.touches.length
};
e.prototype.Em = function(a) {
return a ? this.n.Qr(a, this.Tp, this.Up, !1) : !1
};
e.prototype.ws = function(a) {
a = Math.floor(a);
return a === this.$h
};
e.prototype.vs = function(a) {
a = Math.floor(a);
return a === this.$h
};
a.k = new e;
m.prototype.H = function(a, b) {
if (this.touches.length) {
var c, d, e, g, h;
ja(b) ? (c = this.n.Oe(0), d = c.scale, e = c.td, g = c.Od, h = c.B, c.scale = this.n.ra.scale, c.td = 1, c.Od = 1, c.B = this.n.ra.B, a.K(c.Zc(this.touches[0].x, this.touches[0].y, !0)), c.scale = d, c.td = e, c.Od = g, c.B = h) : (c = la(b) ? this.n.Oe(b) : this.n.Gj(b)) ? a.K(c.Zc(this.touches[0].x, this.touches[0].y, !0)) : a.K(0)
} else a.K(0)
};
m.prototype.J = function(a, b) {
if (this.touches.length) {
var c, d, e, g, h;
ja(b) ? (c = this.n.Oe(0), d = c.scale, e = c.td, g = c.Pd, h = c.B, c.scale = this.n.ra.scale, c.td = 1, c.Pd = 1, c.B = this.n.ra.B, a.K(c.Zc(this.touches[0].x, this.touches[0].y, !1)), c.scale = d, c.td = e, c.Pd = g, c.B = h) : (c = la(b) ? this.n.Oe(b) : this.n.Gj(b)) ? a.K(c.Zc(this.touches[0].x, this.touches[0].y, !1)) : a.K(0)
} else a.K(0)
};
m.prototype.wm = function(a) {
this.touches.length ? a.K(this.touches[0].x) : a.K(0)
};
a.j = new m
})();
function O(h) {
this.n = h
} (function() {
function h() {}
function p() {}
function e() {}
var m = O.prototype;
m.ga = function(a) {
this.wa = a;
this.n = a.n
};
m.ga.prototype.U = f();
m.X = function(a) {
this.type = a;
this.n = a.n
};
var a = m.X.prototype,
d = "",
c = "undefined" !== typeof window.is_scirra_arcade;
c && (d = "arcade" + window.scirra_arcade_id);
a.U = f();
h.prototype.zs = k(!0);
m.k = new h;
p.prototype.Xb = function(a, b) {
try {
localStorage.setItem(d + a, b);
} catch(c) {
this.n.trigger(O.prototype.k.zs, this)
}
};
p.prototype.Uv = function() {
c || localStorage.clear()
};
p.prototype.Fk = function(a, b) {
var e;
try {
e = JSON.parse(a)
} catch(h) {
return
}
if (e.c2dictionary) {
e = e.data;
0 !== b || c || localStorage.clear();
for (var m in e) if (e.hasOwnProperty(m)) try {
localStorage.setItem(d + m, e[m])
} catch(p) {
this.n.trigger(O.prototype.k.zs, this);
break
}
}
};
m.b = new p;
e.prototype.sc = function(a, b) {
a.rb(localStorage.getItem(d + b) || "")
};
e.prototype.xm = function(a) {
var b = {},
e, h, m;
e = 0;
for (h = localStorage.length; e < h; e++) m = localStorage.key(e),
c ? m.substr(0, d.length) === d && (b[m.substr(d.length)] = localStorage.getItem(m)) : b[m] = localStorage.getItem(m);
a.rb(JSON.stringify({
c2dictionary: !0,
data: b
}))
};
m.j = new e
})();
function Mc(h) {
this.n = h
} (function() {
var h = Mc.prototype;
h.ga = function(e) {
this.wa = e;
this.n = e.n
};
h.ga.prototype.U = f();
h.X = function(e) {
this.type = e;
this.n = e.n
};
var p = h.X.prototype;
p.U = function() {
/*this.M = document.createElement("div");
this.M.id = "adblock_" + Math.round(999999 * Math.random());
this.M.style.cssText = this.L[2];
this.Ze = this.L[2];
this.Ul = this.L[4];
this.M.width = Math.round(this.M.width);
this.M.height = Math.round(this.M.height);
this.M.x = Math.round(this.M.x);
this.M.y = Math.round(this.M.y);
jQuery(this.M).appendTo("body");
0 === this.L[0] && (jQuery(this.M).hide(), this.visible = !1);
this.ej();
this.Yx = Math.round(999999 * Math.random());
this.Xx = this.Ul;
this.Zx = this.L[5];
this.pn = this.width / this.Zx;
//this.Jx = '