// Generated by Construct 2, the HTML5 game and app creator :: http://www.scirra.com 'use strict'; var aa, ba, ca, da, y, ea, fa, D, J, ha, ja, ka, na, oa, M, pa, qa, P, ra, ua, va, wa, S, ya, za, Aa, Ba, Ca, T, Da, Ea, Ha, Ia, Ja, Ka, La, Ma, Na, Oa, Pa, Qa, Ra, Sa, Ua, Va, Wa, Xa, Ya, Za, $a, ab, bb, cb, db, eb, fb, gb, hb, ib, jb, kb, lb, mb, nb, ob, pb, qb, rb, sb, tb, ub, vb, wb, xb, yb, zb, Ab, Bb, Cb, Db, Eb, Fb, Gb, Hb, Ib, Jb, Kb, Lb, Mb, Nb, Ob, Pb, Qb, Rb, Sb, Tb, Ub, U, Vb, Wb = {}, Xb = {}; "function" !== typeof Object.getPrototypeOf && (Object.getPrototypeOf = "object" === typeof "test".__proto__ ? function(c) { return c.__proto__ } : function(c) { return c.constructor.prototype }); (function() { function c(a, e, d, z) { this.set(a, e, d, z) } function l() { this.Gb = this.Fb = this.Ib = this.Hb = this.Zb = this.Yb = this.Bb = this.Ab = 0 } function n(a, e, d, z) { a < e ? d < z ? (v = a < d ? a : d, x = e > z ? e : z) : (v = a < z ? a : z, x = e > d ? e : d) : d < z ? (v = e < d ? e : d, x = a > z ? a : z) : (v = e < z ? e : z, x = a > d ? a : d) } function p() { this.items = this.Bc = null; this.Of = 0; ma && (this.Bc = new Set); this.ff = []; this.ld = !0 } function u(a) { ga[O++] = a } function r() { this.aa = this.Wh = this.y = this.vi = 0 } function b(a) { this.Se = []; this.Yk = this.$k = this.al = this.Zk = 0; this.mg(a) } function a(a, e) { this.Ci = a; this.Bi = e; this.cells = {} } function h(a, e) { this.Ci = a; this.Bi = e; this.cells = {} } function w(a, e, d) { var z; return Q.length ? (z = Q.pop(), z.cj = a, z.x = e, z.y = d, z) : new ba(a, e, d) } function e(a, e, d) { this.cj = a; this.x = e; this.y = d; this.Da = new ca } function d(a, e, d) { var z; return V.length ? (z = V.pop(), z.cj = a, z.x = e, z.y = d, z) : new da(a, e, d) } function f(a, e, d) { this.cj = a; this.x = e; this.y = d; this.Da = []; this.Ge = !0; this.zc = new ca; this.kf = !1 } function g(a, e) { return a.pc - e.pc } y = function(a) { window.console && window.console.log && window.console.log(a) }; ea = function(a) { window.console && window.console.error && window.console.error(a) }; aa = function(a) { return a }; fa = function(a) { return "undefined" === typeof a }; D = function(a) { return "number" === typeof a }; J = function(a) { return "string" === typeof a }; ha = function(a) { return 0 < a && 0 === (a - 1 & a) }; ja = function(a) { --a; for (var e = 1; 32 > e; e <<= 1) a = a | a >> e; return a + 1 }; ka = function(a) { return 0 > a ? -a : a }; na = function(a, e) { return a < e ? a : e }; oa = Math.PI; M = function(a) { return 0 <= a ? a | 0 : (a | 0) - 1 }; pa = function(a) { var e = a | 0; return e === a ? e : e + 1 }; qa = function(a, e, d, z, k, g, f, h) { var q, b, w, m; a < d ? (b = a, q = d) : (b = d, q = a); k < f ? (m = k, w = f) : (m = f, w = k); if (q < m || b > w) return !1; e < z ? (b = e, q = z) : (b = z, q = e); g < h ? (m = g, w = h) : (m = h, w = g); if (q < m || b > w) return !1; q = k - a + f - d; b = g - e + h - z; a = d - a; e = z - e; k = f - k; g = h - g; h = ka(e * k - g * a); return ka(k * b - g * q) > h ? !1 : ka(a * b - e * q) <= h }; c.prototype.set = function(a, e, d, k) { this.left = a; this.top = e; this.right = d; this.bottom = k }; c.prototype.rf = function(a) { this.left = a.left; this.top = a.top; this.right = a.right; this.bottom = a.bottom }; c.prototype.width = function() { return this.right - this.left }; c.prototype.height = function() { return this.bottom - this.top }; c.prototype.offset = function(a, e) { this.left += a; this.top += e; this.right += a; this.bottom += e; return this }; c.prototype.normalize = function() { var a = 0; this.left > this.right && (a = this.left, this.left = this.right, this.right = a); this.top > this.bottom && (a = this.top, this.top = this.bottom, this.bottom = a) }; c.prototype.rb = function(a, e) { return a >= this.left && a <= this.right && e >= this.top && e <= this.bottom }; c.prototype.vf = function(a) { return this.left === a.left && this.top === a.top && this.right === a.right && this.bottom === a.bottom }; P = c; l.prototype.Rh = function(a) { this.Ab = a.left; this.Bb = a.top; this.Yb = a.right; this.Zb = a.top; this.Hb = a.right; this.Ib = a.bottom; this.Fb = a.left; this.Gb = a.bottom }; l.prototype.qn = function(a, e) { if (0 === e) this.Rh(a); else { var d = Math.sin(e), k = Math.cos(e), g = a.left * d, f = a.top * d, h = a.right * d, d = a.bottom * d, q = a.left * k, b = a.top * k, w = a.right * k, k = a.bottom * k; this.Ab = q - f; this.Bb = b + g; this.Yb = w - f; this.Zb = b + h; this.Hb = w - d; this.Ib = k + h; this.Fb = q - d; this.Gb = k + g } }; l.prototype.offset = function(a, e) { this.Ab += a; this.Bb += e; this.Yb += a; this.Zb += e; this.Hb += a; this.Ib += e; this.Fb += a; this.Gb += e; return this }; var v = 0, x = 0; l.prototype.cl = function(a) { n(this.Ab, this.Yb, this.Hb, this.Fb); a.left = v; a.right = x; n(this.Bb, this.Zb, this.Ib, this.Gb); a.top = v; a.bottom = x }; l.prototype.rb = function(a, e) { var d = this.Ab, k = this.Bb, g = this.Yb - d, f = this.Zb - k, h = this.Hb - d, q = this.Ib - k, b = a - d, w = e - k, m = g * g + f * f, v = g * h + f * q, f = g * b + f * w, c = h * h + q * q, x = h * b + q * w, t = 1 / (m * c - v * v), g = (c * f - v * x) * t, m = (m * x - v * f) * t; if (0 <= g && 0 < m && 1 > g + m) return !0; g = this.Fb - d; f = this.Gb - k; m = g * g + f * f; v = g * h + f * q; f = g * b + f * w; t = 1 / (m * c - v * v); g = (c * f - v * x) * t; m = (m * x - v * f) * t; return 0 <= g && 0 < m && 1 > g + m }; ra = l; ua = function(a, e) { for (var d in e) e.hasOwnProperty(d) && (a[d] = e[d]); return a }; va = function(a, e) { var d, k; e = M(e); if (!(0 > e || e >= a.length)) { d = e; for (k = a.length - 1; d < k; d++) a[d] = a[d + 1]; wa(a, k) } }; wa = function(a, e) { a.length = e }; S = function(a) { wa(a, 0) }; ya = function(a, e) { S(a); var d, k; d = 0; for (k = e.length; d < k; ++d) a[d] = e[d] }; za = function(a, e) { a.push.apply(a, e) }; Aa = function(a, e) { var d, k; d = 0; for (k = a.length; d < k; ++d) if (a[d] === e) return d; return -1 }; Ba = function(a, e) { var d = Aa(a, e); - 1 !== d && va(a, d) }; Ca = function(a, e, d) { return a < e ? e : a > d ? d : a }; T = function(a) { return a / (180 / oa) }; Da = function(a) { return 180 / oa * a }; Ea = function(a) { a %= 360; 0 > a && (a += 360); return a }; Ha = function(a) { a %= 2 * oa; 0 > a && (a += 2 * oa); return a }; Ia = function(a) { return Ea(Da(a)) }; Ja = function(a) { return Ha(T(a)) }; Ka = function(a, e, d, k) { return Math.atan2(k - e, d - a) }; La = function(a, e) { if (a === e) return 0; var d = Math.sin(a), k = Math.cos(a), g = Math.sin(e), f = Math.cos(e), d = d * g + k * f; return 1 <= d ? 0 : -1 >= d ? oa : Math.acos(d) }; Ma = function(a, e, d) { var k = Math.sin(a), g = Math.cos(a), f = Math.sin(e), h = Math.cos(e); return Math.acos(k * f + g * h) > d ? 0 < g * f - k * h ? Ha(a + d) : Ha(a - d) : Ha(e) }; Na = function(a, e) { var d = Math.sin(a), k = Math.cos(a), g = Math.sin(e), f = Math.cos(e); return 0 >= k * g - d * f }; Oa = function(a, e, d, k) { a = d - a; e = k - e; return Math.sqrt(a * a + e * e) }; Pa = function(a, e) { return !a !== !e }; Qa = function(a, e, d) { return a + (e - a) * d }; Ra = function(a) { for (var e in a) if (a.hasOwnProperty(e)) return !0; return !1 }; Sa = function(a) { for (var e in a) a.hasOwnProperty(e) && delete a[e] }; var m = +new Date; Ua = function() { if ("undefined" !== typeof window.performance) { var a = window.performance; if ("undefined" !== typeof a.now) return a.now(); if ("undefined" !== typeof a.webkitNow) return a.webkitNow(); if ("undefined" !== typeof a.mozNow) return a.mozNow(); if ("undefined" !== typeof a.msNow) return a.msNow() } return Date.now() - m }; var k = !1, q = k = !1, t = !1; "undefined" !== typeof window && (k = /chrome/i.test(navigator.userAgent) || /chromium/i.test(navigator.userAgent), k = !k && /safari/i.test(navigator.userAgent), q = /(iphone|ipod|ipad)/i.test(navigator.userAgent), t = window.c2ejecta); var ma = !k && !t && !q && "undefined" !== typeof Set && "undefined" !== typeof Set.prototype.forEach; p.prototype.contains = function(a) { return this.Rc() ? !1 : ma ? this.Bc.has(a) : this.items && this.items.hasOwnProperty(a) }; p.prototype.add = function(a) { if (ma) this.Bc.has(a) || (this.Bc.add(a), this.ld = !1); else { var e = a.toString(), d = this.items; d ? d.hasOwnProperty(e) || (d[e] = a, this.Of++, this.ld = !1) : (this.items = {}, this.items[e] = a, this.Of = 1, this.ld = !1) } }; p.prototype.remove = function(a) { if (!this.Rc()) if (ma) this.Bc.has(a) && (this.Bc["delete"](a), this.ld = !1); else if (this.items) { a = a.toString(); var e = this.items; e.hasOwnProperty(a) && (delete e[a], this.Of--, this.ld = !1) } }; p.prototype.clear = function() { this.Rc() || (ma ? this.Bc.clear() : (this.items = null, this.Of = 0), S(this.ff), this.ld = !0) }; p.prototype.Rc = function() { return 0 === this.count() }; p.prototype.count = function() { return ma ? this.Bc.size : this.Of }; var ga = null, O = 0; p.prototype.ts = function() { if (!this.ld) { if (ma) S(this.ff), ga = this.ff, O = 0, this.Bc.forEach(u), ga = null, O = 0; else { var a = this.ff; S(a); var e, d = 0, k = this.items; if (k) for (e in k) k.hasOwnProperty(e) && (a[d++] = k[e]) } this.ld = !0 } }; p.prototype.Kd = function() { this.ts(); return this.ff }; ca = p; new ca; Va = function(a, e) { ma ? Wa(a, e.Bc) : Xa(a, e.Kd()) }; Wa = function(a, e) { var d, k, g, f; k = d = 0; for (g = a.length; d < g; ++d) f = a[d], e.has(f) || (a[k++] = f); wa(a, k) }; Xa = function(a, e) { var d, k, g, f; k = d = 0; for (g = a.length; d < g; ++d) f = a[d], -1 === Aa(e, f) && (a[k++] = f); wa(a, k) }; r.prototype.add = function(a) { this.y = a - this.vi; this.Wh = this.aa + this.y; this.vi = this.Wh - this.aa - this.y; this.aa = this.Wh }; r.prototype.reset = function() { this.aa = this.Wh = this.y = this.vi = 0 }; Ya = r; Za = function(a) { return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") }; b.prototype.mg = function(a) { this.Ym = a; this.Gh = a.length / 2; this.Se.length = a.length; this.wi = this.xi = -1; this.fl = 0 }; b.prototype.mr = function() { return !this.Ym.length }; b.prototype.pa = function() { for (var a = this.Se, e = a[0], d = e, k = a[1], g = k, f, h, q = 1, b = this.Gh; q < b; ++q) h = 2 * q, f = a[h], h = a[h + 1], f < e && (e = f), f > d && (d = f), h < k && (k = h), h > g && (g = h); this.Zk = e; this.$k = d; this.al = k; this.Yk = g }; b.prototype.Rh = function(a, e, d) { this.Se.length = 8; this.Gh = 4; var k = this.Se; k[0] = a.left - e; k[1] = a.top - d; k[2] = a.right - e; k[3] = a.top - d; k[4] = a.right - e; k[5] = a.bottom - d; k[6] = a.left - e; k[7] = a.bottom - d; this.xi = a.right - a.left; this.wi = a.bottom - a.top; this.pa() }; b.prototype.hp = function(a, e, d) { if (this.xi !== a || this.wi !== e || this.fl !== d) { this.xi = a; this.wi = e; this.fl = d; var k, g, f, h, q, b = 0, w = 1, m = this.Ym, v = this.Se; 0 !== d && (b = Math.sin(d), w = Math.cos(d)); d = 0; for (f = this.Gh; d < f; d++) k = 2 * d, g = k + 1, h = m[k] * a, q = m[g] * e, v[k] = h * w - q * b, v[g] = q * w + h * b; this.pa() } }; b.prototype.rb = function(a, e) { var d = this.Se; if (a === d[0] && e === d[1]) return !0; var k, g, f, h = this.Gh, q = this.Zk - 110, b = this.al - 101, w = this.$k + 131, m = this.Yk + 120, v, c, x = 0, t = 0; for (k = 0; k < h; k++) g = 2 * k, f = (k + 1) % h * 2, v = d[g], g = d[g + 1], c = d[f], f = d[f + 1], qa(q, b, a, e, v, g, c, f) && x++, qa(w, m, a, e, v, g, c, f) && t++; return 1 === x % 2 || 1 === t % 2 }; $a = b; a.prototype.sd = function(a, e, d) { var k; k = this.cells[a]; return k ? (k = k[e]) ? k : d ? (k = w(this, a, e), this.cells[a][e] = k) : null : d ? (k = w(this, a, e), this.cells[a] = {}, this.cells[a][e] = k) : null }; a.prototype.Xa = function(a) { return M(a / this.Ci) }; a.prototype.Ya = function(a) { return M(a / this.Bi) }; a.prototype.update = function(a, e, d) { var k, g, f, h, q; if (e) for (k = e.left, g = e.right; k <= g; ++k) for (f = e.top, h = e.bottom; f <= h; ++f) if (!d || !d.rb(k, f)) if (q = this.sd(k, f, !1)) q.remove(a), q.Rc() && (q.Da.clear(), 1E3 > Q.length && Q.push(q), this.cells[k][f] = null); if (d) for (k = d.left, g = d.right; k <= g; ++k) for (f = d.top, h = d.bottom; f <= h; ++f) e && e.rb(k, f) || this.sd(k, f, !0).kj(a) }; a.prototype.$m = function(a, e) { var d, k, g, f, h, q; d = this.Xa(a.left); g = this.Ya(a.top); k = this.Xa(a.right); for (h = this.Ya(a.bottom); d <= k; ++d) for (f = g; f <= h; ++f)(q = this.sd(d, f, !1)) && q.dump(e) }; ab = a; h.prototype.sd = function(a, e, k) { var g; g = this.cells[a]; return g ? (g = g[e]) ? g : k ? (g = d(this, a, e), this.cells[a][e] = g) : null : k ? (g = d(this, a, e), this.cells[a] = {}, this.cells[a][e] = g) : null }; h.prototype.Xa = function(a) { return M(a / this.Ci) }; h.prototype.Ya = function(a) { return M(a / this.Bi) }; h.prototype.update = function(a, e, d) { var k, g, f, h, q; if (e) for (k = e.left, g = e.right; k <= g; ++k) for (f = e.top, h = e.bottom; f <= h; ++f) if (!d || !d.rb(k, f)) if (q = this.sd(k, f, !1)) q.remove(a), q.Rc() && (q.reset(), 1E3 > V.length && V.push(q), this.cells[k][f] = null); if (d) for (k = d.left, g = d.right; k <= g; ++k) for (f = d.top, h = d.bottom; f <= h; ++f) e && e.rb(k, f) || this.sd(k, f, !0).kj(a) }; h.prototype.$m = function(a, e, d, k, g) { var f, h; a = this.Xa(a); e = this.Ya(e); d = this.Xa(d); for (f = this.Ya(k); a <= d; ++a) for (k = e; k <= f; ++k)(h = this.sd(a, k, !1)) && h.dump(g) }; h.prototype.ur = function(a) { var e, d, k, g, f; e = a.left; k = a.top; d = a.right; for (g = a.bottom; e <= d; ++e) for (a = k; a <= g; ++a) if (f = this.sd(e, a, !1)) f.Ge = !1 }; bb = h; var Q = []; e.prototype.Rc = function() { return this.Da.Rc() }; e.prototype.kj = function(a) { this.Da.add(a) }; e.prototype.remove = function(a) { this.Da.remove(a) }; e.prototype.dump = function(a) { za(a, this.Da.Kd()) }; ba = e; var V = []; f.prototype.Rc = function() { if (!this.Da.length) return !0; if (this.Da.length > this.zc.count()) return !1; this.Ri(); return !0 }; f.prototype.kj = function(a) { this.zc.contains(a) ? (this.zc.remove(a), this.zc.Rc() && (this.kf = !1)) : this.Da.length ? (this.Da[this.Da.length - 1].vc() > a.vc() && (this.Ge = !1), this.Da.push(a)) : (this.Da.push(a), this.Ge = !0) }; f.prototype.remove = function(a) { this.zc.add(a); this.kf = !0; 30 <= this.zc.count() && this.Ri() }; f.prototype.Ri = function() { this.kf && (this.zc.count() === this.Da.length ? this.reset() : (Va(this.Da, this.zc), this.zc.clear(), this.kf = !1)) }; f.prototype.Qp = function() { this.Ge || (this.Da.sort(g), this.Ge = !0) }; f.prototype.reset = function() { S(this.Da); this.Ge = !0; this.zc.clear(); this.kf = !1 }; f.prototype.dump = function(a) { this.Ri(); this.Qp(); this.Da.length && a.push(this.Da) }; da = f; var E = "lighter xor copy destination-over source-in destination-in source-out destination-out source-atop destination-atop".split(" "); cb = function(a) { return 0 >= a || 11 <= a ? "source-over" : E[a - 1] }; db = function(a, e, d) { if (d) switch (a.Sa = d.ONE, a.Na = d.ONE_MINUS_SRC_ALPHA, e) { case 1: a.Sa = d.ONE; a.Na = d.ONE; break; case 3: a.Sa = d.ONE; a.Na = d.ZERO; break; case 4: a.Sa = d.ONE_MINUS_DST_ALPHA; a.Na = d.ONE; break; case 5: a.Sa = d.DST_ALPHA; a.Na = d.ZERO; break; case 6: a.Sa = d.ZERO; a.Na = d.SRC_ALPHA; break; case 7: a.Sa = d.ONE_MINUS_DST_ALPHA; a.Na = d.ZERO; break; case 8: a.Sa = d.ZERO; a.Na = d.ONE_MINUS_SRC_ALPHA; break; case 9: a.Sa = d.DST_ALPHA; a.Na = d.ONE_MINUS_SRC_ALPHA; break; case 10: a.Sa = d.ONE_MINUS_DST_ALPHA, a.Na = d.SRC_ALPHA } }; eb = function(a) { return Math.round(1E6 * a) / 1E6 }; fb = function(a, e) { return "string" !== typeof a || "string" !== typeof e || a.length !== e.length ? !1 : a === e ? !0 : a.toLowerCase() === e.toLowerCase() }; gb = function(a) { a = a.target; return !a || a === document || a === window || document && document.body && a === document.body || fb(a.tagName, "canvas") ? !0 : !1 } })(); var Yb = "undefined" !== typeof Float32Array ? Float32Array : Array; function Zb(c) { var l = new Yb(3); c && (l[0] = c[0], l[1] = c[1], l[2] = c[2]); return l } function $b(c) { var l = new Yb(16); c && (l[0] = c[0], l[1] = c[1], l[2] = c[2], l[3] = c[3], l[4] = c[4], l[5] = c[5], l[6] = c[6], l[7] = c[7], l[8] = c[8], l[9] = c[9], l[10] = c[10], l[11] = c[11], l[12] = c[12], l[13] = c[13], l[14] = c[14], l[15] = c[15]); return l } function ac(c, l) { l[0] = c[0]; l[1] = c[1]; l[2] = c[2]; l[3] = c[3]; l[4] = c[4]; l[5] = c[5]; l[6] = c[6]; l[7] = c[7]; l[8] = c[8]; l[9] = c[9]; l[10] = c[10]; l[11] = c[11]; l[12] = c[12]; l[13] = c[13]; l[14] = c[14]; l[15] = c[15] } function bc(c, l) { var n = l[0], p = l[1]; l = l[2]; c[0] *= n; c[1] *= n; c[2] *= n; c[3] *= n; c[4] *= p; c[5] *= p; c[6] *= p; c[7] *= p; c[8] *= l; c[9] *= l; c[10] *= l; c[11] *= l } function cc(c, l, n, p) { p || (p = $b()); var u, r, b, a, h, w, e, d, f = c[0], g = c[1]; c = c[2]; r = n[0]; b = n[1]; u = n[2]; n = l[1]; w = l[2]; f === l[0] && g === n && c === w ? (c = p, c[0] = 1, c[1] = 0, c[2] = 0, c[3] = 0, c[4] = 0, c[5] = 1, c[6] = 0, c[7] = 0, c[8] = 0, c[9] = 0, c[10] = 1, c[11] = 0, c[12] = 0, c[13] = 0, c[14] = 0, c[15] = 1) : (n = f - l[0], w = g - l[1], e = c - l[2], d = 1 / Math.sqrt(n * n + w * w + e * e), n *= d, w *= d, e *= d, l = b * e - u * w, u = u * n - r * e, r = r * w - b * n, (d = Math.sqrt(l * l + u * u + r * r)) ? (d = 1 / d, l *= d, u *= d, r *= d) : r = u = l = 0, b = w * r - e * u, a = e * l - n * r, h = n * u - w * l, (d = Math.sqrt(b * b + a * a + h * h)) ? (d = 1 / d, b *= d, a *= d, h *= d) : h = a = b = 0, p[0] = l, p[1] = b, p[2] = n, p[3] = 0, p[4] = u, p[5] = a, p[6] = w, p[7] = 0, p[8] = r, p[9] = h, p[10] = e, p[11] = 0, p[12] = -(l * f + u * g + r * c), p[13] = -(b * f + a * g + h * c), p[14] = -(n * f + w * g + e * c), p[15] = 1) } (function() { function c(a, h, b) { this.ud = /msie/i.test(navigator.userAgent) || /trident/i.test(navigator.userAgent); this.height = this.width = 0; this.V = !!b; this.ah = this.If = !1; this.Ii = 0; this.hi = 1; this.zk = 1E3; this.Bs = (this.zk - this.hi) / 32768; this.yi = Zb([0, 0, 100]); this.im = Zb([0, 0, 0]); this.Kn = Zb([0, 1, 0]); this.Bg = Zb([1, 1, 1]); this.rl = !0; this.uh = $b(); this.yb = $b(); this.zj = $b(); this.Hi = $b(); this.k = a; this.Ol() } function l(a, h, b) { this.k = a; this.ng = h; this.name = b; this.Nb = a.getAttribLocation(h, "aPos"); this.Bd = a.getAttribLocation(h, "aTex"); this.gm = a.getUniformLocation(h, "matP"); this.ph = a.getUniformLocation(h, "matMV"); this.Ne = a.getUniformLocation(h, "opacity"); this.Fj = a.getUniformLocation(h, "colorFill"); this.hm = a.getUniformLocation(h, "samplerFront"); this.Uf = a.getUniformLocation(h, "samplerBack"); this.he = a.getUniformLocation(h, "destStart"); this.ge = a.getUniformLocation(h, "destEnd"); this.Wf = a.getUniformLocation(h, "seconds"); this.Hj = a.getUniformLocation(h, "pixelWidth"); this.Gj = a.getUniformLocation(h, "pixelHeight"); this.Tf = a.getUniformLocation(h, "layerScale"); this.Sf = a.getUniformLocation(h, "layerAngle"); this.Xf = a.getUniformLocation(h, "viewOrigin"); this.Vf = a.getUniformLocation(h, "scrollPos"); this.$q = !!(this.Hj || this.Gj || this.Wf || this.Uf || this.he || this.ge || this.Tf || this.Sf || this.Xf || this.Vf); this.qm = this.rm = -999; this.sh = 1; this.mm = this.lm = 0; this.om = this.km = this.jm = 1; this.vm = this.um = this.tm = this.xm = this.wm = this.nm = 0; this.yj = []; this.pm = $b(); this.Ne && a.uniform1f(this.Ne, 1); this.Fj && a.uniform4f(this.Fj, 1, 1, 1, 1); this.hm && a.uniform1i(this.hm, 0); this.Uf && a.uniform1i(this.Uf, 1); this.he && a.uniform2f(this.he, 0, 0); this.ge && a.uniform2f(this.ge, 1, 1); this.Tf && a.uniform1f(this.Tf, 1); this.Sf && a.uniform1f(this.Sf, 0); this.Xf && a.uniform2f(this.Xf, 0, 0); this.Vf && a.uniform2f(this.Vf, 0, 0); this.Wf && a.uniform1f(this.Wf, 0); this.Zd = !1 } function n(a, h) { return a[0] === h[0] && a[1] === h[1] && a[2] === h[2] && a[3] === h[3] && a[4] === h[4] && a[5] === h[5] && a[6] === h[6] && a[7] === h[7] && a[8] === h[8] && a[9] === h[9] && a[10] === h[10] && a[11] === h[11] && a[12] === h[12] && a[13] === h[13] && a[14] === h[14] && a[15] === h[15] } function p(a, h) { this.type = a; this.m = h; this.k = h.k; this.wc = this.Wa = this.Pm = 0; this.C = this.Xb = null; this.rn = [] } var u = $b(); c.prototype.Ol = function() { var a = this.k, h; this.$l = 1; this.de = this.xd = null; this.Lg = 1; a.clearColor(0, 0, 0, 0); a.clear(a.COLOR_BUFFER_BIT); a.enable(a.BLEND); a.blendFunc(a.ONE, a.ONE_MINUS_SRC_ALPHA); a.disable(a.CULL_FACE); a.disable(a.STENCIL_TEST); a.disable(a.DITHER); this.V ? (a.enable(a.DEPTH_TEST), a.depthFunc(a.LEQUAL)) : a.disable(a.DEPTH_TEST); this.am = a.ONE; this.Zl = a.ONE_MINUS_SRC_ALPHA; this.fi = new Float32Array(8E3 * (this.V ? 3 : 2)); this.Xh = new Float32Array(16E3); this.Um = new Float32Array(32E3); this.Uj = a.createBuffer(); a.bindBuffer(a.ARRAY_BUFFER, this.Uj); a.bufferData(a.ARRAY_BUFFER, this.Um.byteLength, a.DYNAMIC_DRAW); this.Ag = Array(4); this.ug = Array(4); for (h = 0; 4 > h; h++) this.Ag[h] = a.createBuffer(), a.bindBuffer(a.ARRAY_BUFFER, this.Ag[h]), a.bufferData(a.ARRAY_BUFFER, this.fi.byteLength, a.DYNAMIC_DRAW), this.ug[h] = a.createBuffer(), a.bindBuffer(a.ARRAY_BUFFER, this.ug[h]), a.bufferData(a.ARRAY_BUFFER, this.Xh.byteLength, a.DYNAMIC_DRAW); this.Hc = 0; this.dr = a.createBuffer(); a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.dr); for (var b = new Uint16Array(12E3), e = h = 0; 12E3 > h;) b[h++] = e, b[h++] = e + 1, b[h++] = e + 2, b[h++] = e, b[h++] = e + 2, b[h++] = e + 3, e += 4; a.bufferData(a.ELEMENT_ARRAY_BUFFER, b, a.STATIC_DRAW); this.Vj = this.$e = this.dd = 0; this.fa = []; h = this.V ? "attribute highp vec3 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, aPos.z, 1.0);\n\tvTex = aTex;\n}" : "attribute highp vec2 aPos;\nattribute mediump vec2 aTex;\nvarying mediump vec2 vTex;\nuniform highp mat4 matP;\nuniform highp mat4 matMV;\nvoid main(void) {\n\tgl_Position = matP * matMV * vec4(aPos.x, aPos.y, 0.0, 1.0);\n\tvTex = aTex;\n}"; b = this.sf({ 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}" }, h, ""); this.fa.push(b); b = this.sf({ 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.fa.push(b); b = this.sf({ src: "varying mediump vec2 vTex;\nuniform lowp sampler2D samplerFront;\nvoid main(void) {\n\tif (texture2D(samplerFront, vTex).a < 1.0)\n\t\tdiscard;\n}" }, h, ""); this.fa.push(b); b = this.sf({ src: "uniform lowp vec4 colorFill;\nvoid main(void) {\n\tgl_FragColor = colorFill;\n}" }, h, ""); this.fa.push(b); for (var d in dc) dc.hasOwnProperty(d) && this.fa.push(this.sf(dc[d], h, d)); a.activeTexture(a.TEXTURE0); a.bindTexture(a.TEXTURE_2D, null); this.kd = []; this.Gc = 0; this.Pa = !1; this.ll = this.Qf = -1; this.ve = null; this.Qi = a.createFramebuffer(); this.Ng = this.Ih = null; this.Xk = !1; this.V && (this.Ng = a.createRenderbuffer()); this.Jd = Zb([0, 0, 0]); this.ym = a.getParameter(a.ALIASED_POINT_SIZE_RANGE)[1]; 2048 < this.ym && (this.ym = 2048); this.ab(0) }; l.prototype.vk = function(a) { n(this.pm, a) || (ac(a, this.pm), this.k.uniformMatrix4fv(this.ph, !1, a)) }; c.prototype.sf = function(a, h, b) { var e = this.k, d = e.createShader(e.FRAGMENT_SHADER); e.shaderSource(d, a.src); e.compileShader(d); if (!e.getShaderParameter(d, e.COMPILE_STATUS)) return e.deleteShader(d), null; var f = e.createShader(e.VERTEX_SHADER); e.shaderSource(f, h); e.compileShader(f); if (!e.getShaderParameter(f, e.COMPILE_STATUS)) return e.deleteShader(d), e.deleteShader(f), null; h = e.createProgram(); e.attachShader(h, d); e.attachShader(h, f); e.linkProgram(h); if (!e.getProgramParameter(h, e.LINK_STATUS)) return e.deleteShader(d), e.deleteShader(f), e.deleteProgram(h), null; e.useProgram(h); e.deleteShader(d); e.deleteShader(f); b = new l(e, h, b); b.Oi = a.Oi || 0; b.Pi = a.Pi || 0; b.kl = !!a.kl; b.kc = !!a.kc; b.Tk = !!a.Tk; b.D = a.D || []; a = 0; for (d = b.D.length; a < d; a++) b.D[a][1] = e.getUniformLocation(h, b.D[a][0]), b.yj.push(0), e.uniform1f(b.D[a][1], 0); return b }; c.prototype.aj = function(a) { var h, b; h = 0; for (b = this.fa.length; h < b; h++) if (this.fa[h].name === a) return h; return -1 }; c.prototype.Xm = function(a, h, b) { var e = this.yb, d = this.uh, f = [0, 0, 0, 0, 0, 0, 0, 0]; f[0] = e[0] * a + e[4] * h + e[12]; f[1] = e[1] * a + e[5] * h + e[13]; f[2] = e[2] * a + e[6] * h + e[14]; f[3] = e[3] * a + e[7] * h + e[15]; f[4] = d[0] * f[0] + d[4] * f[1] + d[8] * f[2] + d[12] * f[3]; f[5] = d[1] * f[0] + d[5] * f[1] + d[9] * f[2] + d[13] * f[3]; f[6] = d[2] * f[0] + d[6] * f[1] + d[10] * f[2] + d[14] * f[3]; f[7] = -f[2]; 0 !== f[7] && (f[7] = 1 / f[7], f[4] *= f[7], f[5] *= f[7], f[6] *= f[7], b[0] = (.5 * f[4] + .5) * this.width, b[1] = (.5 * f[5] + .5) * this.height) }; c.prototype.le = function(a, h, b) { if (this.width !== a || this.height !== h || b) { this.qd(); b = this.k; this.width = a; this.height = h; b.viewport(0, 0, a, h); cc(this.yi, this.im, this.Kn, this.yb); if (this.V) { var e = -a / 2; a = a / 2; var d = h / 2; h = -h / 2; var f = this.hi, g = this.zk, v = this.uh; v || (v = $b()); var c = a - e, m = h - d, k = g - f; v[0] = 2 / c; v[1] = 0; v[2] = 0; v[3] = 0; v[4] = 0; v[5] = 2 / m; v[6] = 0; v[7] = 0; v[8] = 0; v[9] = 0; v[10] = -2 / k; v[11] = 0; v[12] = -(e + a) / c; v[13] = -(h + d) / m; v[14] = -(g + f) / k; v[15] = 1; this.Bg[0] = 1; this.Bg[1] = 1 } else h = a / h, e = this.hi, a = this.zk, v = this.uh, g = e * Math.tan(45 * Math.PI / 360), h *= g, d = -h, f = -g, v || (v = $b()), c = h - d, m = g - f, k = a - e, v[0] = 2 * e / c, v[1] = 0, v[2] = 0, v[3] = 0, v[4] = 0, v[5] = 2 * e / m, v[6] = 0, v[7] = 0, v[8] = (h + d) / c, v[9] = (g + f) / m, v[10] = -(a + e) / k, v[11] = -1, v[12] = 0, v[13] = 0, v[14] = -(a * e * 2) / k, v[15] = 0, e = [0, 0], a = [0, 0], this.Xm(0, 0, e), this.Xm(1, 1, a), this.Bg[0] = 1 / (a[0] - e[0]), this.Bg[1] = -1 / (a[1] - e[1]); e = 0; for (a = this.fa.length; e < a; e++) d = this.fa[e], d.Zd = !1, d.gm && (b.useProgram(d.ng), b.uniformMatrix4fv(d.gm, !1, this.uh)); b.useProgram(this.fa[this.Qf].ng); b.bindTexture(b.TEXTURE_2D, null); b.activeTexture(b.TEXTURE1); b.bindTexture(b.TEXTURE_2D, null); b.activeTexture(b.TEXTURE0); this.de = this.xd = null; this.Ng && (b.bindFramebuffer(b.FRAMEBUFFER, this.Qi), b.bindRenderbuffer(b.RENDERBUFFER, this.Ng), b.renderbufferStorage(b.RENDERBUFFER, b.DEPTH_COMPONENT16, this.width, this.height), this.Xk || (b.framebufferRenderbuffer(b.FRAMEBUFFER, b.DEPTH_ATTACHMENT, b.RENDERBUFFER, this.Ng), this.Xk = !0), b.bindRenderbuffer(b.RENDERBUFFER, null), b.bindFramebuffer(b.FRAMEBUFFER, null), this.Ih = null) } }; c.prototype.Tb = function() { cc(this.yi, this.im, this.Kn, this.yb); bc(this.yb, this.Bg) }; c.prototype.translate = function(a, h) { if (0 !== a || 0 !== h) { this.Jd[0] = a; this.Jd[1] = h; this.Jd[2] = 0; var b = this.yb, e = this.Jd, d = e[0], f = e[1], e = e[2]; b[12] = b[0] * d + b[4] * f + b[8] * e + b[12]; b[13] = b[1] * d + b[5] * f + b[9] * e + b[13]; b[14] = b[2] * d + b[6] * f + b[10] * e + b[14]; b[15] = b[3] * d + b[7] * f + b[11] * e + b[15] } }; c.prototype.scale = function(a, h) { if (1 !== a || 1 !== h) this.Jd[0] = a, this.Jd[1] = h, this.Jd[2] = 1, bc(this.yb, this.Jd) }; c.prototype.Lh = function(a) { if (0 !== a) { var h = this.yb, b, e = Math.sin(a); a = Math.cos(a); var d = h[0], f = h[1], g = h[2], v = h[3], c = h[4], m = h[5], k = h[6], q = h[7]; b ? h !== b && (b[8] = h[8], b[9] = h[9], b[10] = h[10], b[11] = h[11], b[12] = h[12], b[13] = h[13], b[14] = h[14], b[15] = h[15]) : b = h; b[0] = d * a + c * e; b[1] = f * a + m * e; b[2] = g * a + k * e; b[3] = v * a + q * e; b[4] = d * -e + c * a; b[5] = f * -e + m * a; b[6] = g * -e + k * a; b[7] = v * -e + q * a } }; c.prototype.Cb = function() { if (!n(this.zj, this.yb)) { var a = this.lb(); a.type = 5; a.C ? ac(this.yb, a.C) : a.C = $b(this.yb); ac(this.yb, this.zj); this.Pa = !1 } }; c.prototype.Nh = function(a) { this.V && (32760 < a && (a = 32760), this.Ii = this.yi[2] - this.hi - a * this.Bs) }; p.prototype.Ap = function() { var a = this.k, b = this.m; 0 !== this.Wa ? (a.depthMask(!0), a.colorMask(!1, !1, !1, !1), a.disable(a.BLEND), a.bindFramebuffer(a.FRAMEBUFFER, b.Qi), a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, null, 0), a.clear(a.DEPTH_BUFFER_BIT), a.bindFramebuffer(a.FRAMEBUFFER, null), b.ah = !0) : (a.depthMask(!1), a.colorMask(!0, !0, !0, !0), a.enable(a.BLEND), b.ah = !1) }; p.prototype.Ep = function() { this.k.bindTexture(this.k.TEXTURE_2D, this.Xb) }; p.prototype.Fp = function() { var a = this.k; a.activeTexture(a.TEXTURE1); a.bindTexture(a.TEXTURE_2D, this.Xb); a.activeTexture(a.TEXTURE0) }; p.prototype.Bp = function() { var a = this.Pm, b = this.m; b.Lg = a; b = b.ve; b.Ne && b.sh !== a && (b.sh = a, this.k.uniform1f(b.Ne, a)) }; p.prototype.vp = function() { this.k.drawElements(this.k.TRIANGLES, this.wc, this.k.UNSIGNED_SHORT, this.Wa) }; p.prototype.xp = function() { this.k.blendFunc(this.Wa, this.wc) }; p.prototype.Gp = function() { var a, b, c, e = this.m.fa, d = this.m.ll; a = 0; for (b = e.length; a < b; a++) c = e[a], a === d && c.ph ? (c.vk(this.C), c.Zd = !0) : c.Zd = !1; ac(this.C, this.m.Hi) }; p.prototype.wp = function() { var a = this.k, b = this.m; this.Xb ? (b.de === this.Xb && (a.activeTexture(a.TEXTURE1), a.bindTexture(a.TEXTURE_2D, null), b.de = null, a.activeTexture(a.TEXTURE0)), a.bindFramebuffer(a.FRAMEBUFFER, b.Qi), b.ah || a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, this.Xb, 0)) : (b.V || a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, null, 0), a.bindFramebuffer(a.FRAMEBUFFER, null)) }; p.prototype.tp = function() { var a = this.k, b = this.Wa; 0 === b ? (a.clearColor(this.C[0], this.C[1], this.C[2], this.C[3]), a.clear(a.COLOR_BUFFER_BIT)) : 1 === b ? (a.enable(a.SCISSOR_TEST), a.scissor(this.C[0], this.C[1], this.C[2], this.C[3]), a.clearColor(0, 0, 0, 0), a.clear(a.COLOR_BUFFER_BIT), a.disable(a.SCISSOR_TEST)) : a.clear(a.DEPTH_BUFFER_BIT) }; p.prototype.zp = function() { var a = this.k; 0 !== this.Wa ? a.enable(a.DEPTH_TEST) : a.disable(a.DEPTH_TEST) }; p.prototype.up = function() { var a = this.k, b = this.m; b.V && a.disable(a.DEPTH_TEST); var c = b.fa[1]; a.useProgram(c.ng); !c.Zd && c.ph && (c.vk(b.Hi), c.Zd = !0); a.enableVertexAttribArray(c.Nb); a.bindBuffer(a.ARRAY_BUFFER, b.Uj); a.vertexAttribPointer(c.Nb, 4, a.FLOAT, !1, 0, 0); a.drawArrays(a.POINTS, this.Wa / 4, this.wc); c = b.ve; a.useProgram(c.ng); 0 <= c.Nb && (a.enableVertexAttribArray(c.Nb), a.bindBuffer(a.ARRAY_BUFFER, b.Ag[b.Hc]), a.vertexAttribPointer(c.Nb, b.V ? 3 : 2, a.FLOAT, !1, 0, 0)); 0 <= c.Bd && (a.enableVertexAttribArray(c.Bd), a.bindBuffer(a.ARRAY_BUFFER, b.ug[b.Hc]), a.vertexAttribPointer(c.Bd, 2, a.FLOAT, !1, 0, 0)); b.V && a.enable(a.DEPTH_TEST) }; p.prototype.Cp = function() { var a = this.k, b = this.m, c = b.fa[this.Wa]; b.ll = this.Wa; b.ve = c; a.useProgram(c.ng); !c.Zd && c.ph && (c.vk(b.Hi), c.Zd = !0); c.Ne && c.sh !== b.Lg && (c.sh = b.Lg, a.uniform1f(c.Ne, b.Lg)); 0 <= c.Nb && (a.enableVertexAttribArray(c.Nb), a.bindBuffer(a.ARRAY_BUFFER, b.Ag[b.Hc]), a.vertexAttribPointer(c.Nb, b.V ? 3 : 2, a.FLOAT, !1, 0, 0)); 0 <= c.Bd && (a.enableVertexAttribArray(c.Bd), a.bindBuffer(a.ARRAY_BUFFER, b.ug[b.Hc]), a.vertexAttribPointer(c.Bd, 2, a.FLOAT, !1, 0, 0)) }; p.prototype.yp = function() { var a = this.C; this.k.uniform4f(this.m.ve.Fj, a[0], a[1], a[2], a[3]) }; p.prototype.Dp = function() { var a, b, c = this.m.ve, e = this.k; a = this.C; c.Uf && this.m.de !== this.Xb && (e.activeTexture(e.TEXTURE1), e.bindTexture(e.TEXTURE_2D, this.Xb), this.m.de = this.Xb, e.activeTexture(e.TEXTURE0)); var d = a[0]; c.Hj && d !== c.rm && (c.rm = d, e.uniform1f(c.Hj, d)); d = a[1]; c.Gj && d !== c.qm && (c.qm = d, e.uniform1f(c.Gj, d)); d = a[2]; b = a[3]; !c.he || d === c.lm && b === c.mm || (c.lm = d, c.mm = b, e.uniform2f(c.he, d, b)); d = a[4]; b = a[5]; !c.ge || d === c.jm && b === c.km || (c.jm = d, c.km = b, e.uniform2f(c.ge, d, b)); d = a[6]; c.Tf && d !== c.om && (c.om = d, e.uniform1f(c.Tf, d)); d = a[7]; c.Sf && d !== c.nm && (c.nm = d, e.uniform1f(c.Sf, d)); d = a[8]; b = a[9]; !c.Xf || d === c.wm && b === c.xm || (c.wm = d, c.xm = b, e.uniform2f(c.Xf, d, b)); d = a[10]; b = a[11]; !c.Vf || d === c.tm && b === c.um || (c.tm = d, c.um = b, e.uniform2f(c.Vf, d, b)); d = a[12]; c.Wf && d !== c.vm && (c.vm = d, e.uniform1f(c.Wf, d)); if (c.D.length) for (a = 0, b = c.D.length; a < b; a++) d = this.rn[a], d !== c.yj[a] && (c.yj[a] = d, e.uniform1f(c.D[a][1], d)) }; c.prototype.lb = function() { this.Gc === this.kd.length && this.kd.push(new p(0, this)); return this.kd[this.Gc++] }; c.prototype.qd = function() { if (0 !== this.Gc && !this.k.isContextLost()) { var a = this.k; 0 < this.Vj && (a.bindBuffer(a.ARRAY_BUFFER, this.Uj), a.bufferSubData(a.ARRAY_BUFFER, 0, this.Um.subarray(0, this.Vj)), b && 0 <= b.Nb && "" === b.name && a.vertexAttribPointer(b.Nb, 4, a.FLOAT, !1, 0, 0)); if (0 < this.dd) { var b = this.ve; a.bindBuffer(a.ARRAY_BUFFER, this.Ag[this.Hc]); a.bufferSubData(a.ARRAY_BUFFER, 0, this.fi.subarray(0, this.dd)); b && 0 <= b.Nb && "" !== b.name && a.vertexAttribPointer(b.Nb, this.V ? 3 : 2, a.FLOAT, !1, 0, 0); a.bindBuffer(a.ARRAY_BUFFER, this.ug[this.Hc]); a.bufferSubData(a.ARRAY_BUFFER, 0, this.Xh.subarray(0, this.$e)); b && 0 <= b.Bd && "" !== b.name && a.vertexAttribPointer(b.Bd, 2, a.FLOAT, !1, 0, 0) } for (var c, a = 0, b = this.Gc; a < b; a++) switch (c = this.kd[a], c.type) { case 1: c.vp(); break; case 2: c.Ep(); break; case 3: c.Bp(); break; case 4: c.xp(); break; case 5: c.Gp(); break; case 6: c.wp(); break; case 7: c.tp(); break; case 8: c.up(); break; case 9: c.Cp(); break; case 10: c.Dp(); break; case 11: c.Fp(); break; case 12: c.yp(); break; case 13: c.zp(); break; case 14: c.Ap() } this.Vj = this.$e = this.dd = this.Gc = 0; this.ah = this.Pa = !1; this.Hc++; 4 <= this.Hc && (this.Hc = 0) } }; c.prototype.We = function(a) { if (a !== this.$l && !this.If) { var b = this.lb(); b.type = 3; this.$l = b.Pm = a; this.Pa = !1 } }; c.prototype.zb = function(a) { if (a !== this.xd) { var b = this.lb(); b.type = 2; this.xd = b.Xb = a; this.Pa = !1 } }; c.prototype.Hd = function(a, b) { if ((a !== this.am || b !== this.Zl) && !this.If) { var c = this.lb(); c.type = 4; c.Wa = a; c.wc = b; this.am = a; this.Zl = b; this.Pa = !1 } }; c.prototype.jn = function() { this.Hd(this.k.ONE, this.k.ONE_MINUS_SRC_ALPHA) }; c.prototype.kg = function(a, b, c, e, d, f, g, v) { 15992 <= this.dd && this.qd(); var x = this.dd, m = this.$e, k = this.fi, q = this.Xh, t = this.Ii; if (this.Pa) this.kd[this.Gc - 1].wc += 6; else { var l = this.lb(); l.type = 1; l.Wa = this.V ? x : x / 2 * 3; l.wc = 6; this.Pa = !0 } this.V ? (k[x++] = a, k[x++] = b, k[x++] = t, k[x++] = c, k[x++] = e, k[x++] = t, k[x++] = d, k[x++] = f, k[x++] = t, k[x++] = g, k[x++] = v, k[x++] = t) : (k[x++] = a, k[x++] = b, k[x++] = c, k[x++] = e, k[x++] = d, k[x++] = f, k[x++] = g, k[x++] = v); q[m++] = 0; q[m++] = 0; q[m++] = 1; q[m++] = 0; q[m++] = 1; q[m++] = 1; q[m++] = 0; q[m++] = 1; this.dd = x; this.$e = m }; c.prototype.Gd = function(a, b, c, e, d, f, g, v, x) { 15992 <= this.dd && this.qd(); var m = this.dd, k = this.$e, q = this.fi, t = this.Xh, l = this.Ii; if (this.Pa) this.kd[this.Gc - 1].wc += 6; else { var p = this.lb(); p.type = 1; p.Wa = this.V ? m : m / 2 * 3; p.wc = 6; this.Pa = !0 } var p = x.left, n = x.top, r = x.right; x = x.bottom; this.V ? (q[m++] = a, q[m++] = b, q[m++] = l, q[m++] = c, q[m++] = e, q[m++] = l, q[m++] = d, q[m++] = f, q[m++] = l, q[m++] = g, q[m++] = v, q[m++] = l) : (q[m++] = a, q[m++] = b, q[m++] = c, q[m++] = e, q[m++] = d, q[m++] = f, q[m++] = g, q[m++] = v); t[k++] = p; t[k++] = n; t[k++] = r; t[k++] = n; t[k++] = r; t[k++] = x; t[k++] = p; t[k++] = x; this.dd = m; this.$e = k }; c.prototype.ab = function(a) { if (this.Qf !== a) { if (!this.fa[a]) { if (0 === this.Qf) return; a = 0 } var b = this.lb(); b.type = 9; this.Qf = b.Wa = a; this.Pa = !1 } }; c.prototype.gg = function(a) { a = this.fa[a]; return !(!a.he && !a.ge) }; c.prototype.Xj = function(a) { a = this.fa[a]; return !!(a.he || a.ge || a.kl) }; c.prototype.Wj = function(a) { return this.fa[a].kc }; c.prototype.Tr = function(a) { a = this.fa[a]; return 0 !== a.Oi || 0 !== a.Pi }; c.prototype.Hq = function(a) { return this.fa[a].Oi }; c.prototype.Iq = function(a) { return this.fa[a].Pi }; c.prototype.Jq = function(a, b) { return this.fa[a].D[b][2] }; c.prototype.Fh = function(a) { return this.fa[a].Tk }; c.prototype.Xe = function(a, b, c, e, d, f, g, v, x, m, k, q, t, l, p) { var n = this.fa[this.Qf], r, u; if (n.$q || p.length) { r = this.lb(); r.type = 10; r.C ? ac(this.yb, r.C) : r.C = $b(); u = r.C; u[0] = b; u[1] = c; u[2] = e; u[3] = d; u[4] = f; u[5] = g; u[6] = v; u[7] = x; u[8] = m; u[9] = k; u[10] = q; u[11] = t; u[12] = l; n.Uf ? r.Xb = a : r.Xb = null; if (p.length) for (c = r.rn, c.length = p.length, a = 0, b = p.length; a < b; a++) c[a] = p[a]; this.Pa = !1 } }; c.prototype.clear = function(a, b, c, e) { var d = this.lb(); d.type = 7; d.Wa = 0; d.C || (d.C = $b()); d.C[0] = a; d.C[1] = b; d.C[2] = c; d.C[3] = e; this.Pa = !1 }; c.prototype.clearRect = function(a, b, c, e) { if (!(0 > c || 0 > e)) { var d = this.lb(); d.type = 7; d.Wa = 1; d.C || (d.C = $b()); d.C[0] = a; d.C[1] = b; d.C[2] = c; d.C[3] = e; this.Pa = !1 } }; c.prototype.mn = function(a) { if (this.V && (a = !!a, this.If !== a)) { var b = this.lb(); b.type = 14; b.Wa = a ? 1 : 0; this.Pa = !1; this.If = a; this.Ih = null; this.If ? this.ab(2) : this.ab(0) } }; c.prototype.ln = function(a) { if (this.V) { var b = this.lb(); b.type = 13; b.Wa = a ? 1 : 0; this.Pa = !1 } }; c.prototype.Al = function() { ac(this.zj, u); this.Tb(); this.Cb(); var a = this.width / 2, b = this.height / 2; this.kg(-a, b, a, b, a, -b, -a, -b); ac(u, this.yb); this.Cb() }; c.prototype.kn = function(a, b, c) { this.ab(3); var e = this.lb(); e.type = 12; e.C || (e.C = $b()); e.C[0] = a; e.C[1] = b; e.C[2] = c; e.C[3] = 1; this.Pa = !1 }; c.prototype.gs = function() { this.ab(0) }; c.prototype.Xr = function() { this.ab(2) }; c.prototype.Sr = function() { this.qd(); this.k.flush() }; var r = [], b = {}; c.prototype.lp = function() { S(r); b = {} }; c.prototype.fm = function(a, c, l) { var e; e = !1; c = !!c; var d = a.src + "," + e + "," + c + (e ? ",undefined" : ""), f = null; if ("undefined" !== typeof a.src && b.hasOwnProperty(d)) return f = b[d], f.Gg++, f; this.qd(); var g = this.k, v = ha(a.width) && ha(a.height), f = g.createTexture(); g.bindTexture(g.TEXTURE_2D, f); g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0); var x = g.RGBA, m = g.RGBA, k = g.UNSIGNED_BYTE; if (l && !this.ud) switch (l) { case 1: m = x = g.RGB; break; case 2: k = g.UNSIGNED_SHORT_4_4_4_4; break; case 3: k = g.UNSIGNED_SHORT_5_5_5_1; break; case 4: m = x = g.RGB, k = g.UNSIGNED_SHORT_5_6_5 } if (!v && e) { l = document.createElement("canvas"); l.width = ja(a.width); l.height = ja(a.height); var q = l.getContext("2d"); q.webkitImageSmoothingEnabled = c; q.mozImageSmoothingEnabled = c; q.msImageSmoothingEnabled = c; q.imageSmoothingEnabled = c; q.drawImage(a, 0, 0, a.width, a.height, 0, 0, l.width, l.height); g.texImage2D(g.TEXTURE_2D, 0, x, m, k, l) } else g.texImage2D(g.TEXTURE_2D, 0, x, m, k, a); e ? (g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_S, g.REPEAT), g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_T, g.REPEAT)) : (g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_S, g.CLAMP_TO_EDGE), g.texParameteri(g.TEXTURE_2D, g.TEXTURE_WRAP_T, g.CLAMP_TO_EDGE)); c ? (g.texParameteri(g.TEXTURE_2D, g.TEXTURE_MAG_FILTER, g.LINEAR), v && this.rl ? (g.texParameteri(g.TEXTURE_2D, g.TEXTURE_MIN_FILTER, g.LINEAR_MIPMAP_LINEAR), g.generateMipmap(g.TEXTURE_2D)) : g.texParameteri(g.TEXTURE_2D, g.TEXTURE_MIN_FILTER, g.LINEAR)) : (g.texParameteri(g.TEXTURE_2D, g.TEXTURE_MAG_FILTER, g.NEAREST), g.texParameteri(g.TEXTURE_2D, g.TEXTURE_MIN_FILTER, g.NEAREST)); g.bindTexture(g.TEXTURE_2D, null); this.xd = null; f.Rd = a.width; f.Qd = a.height; f.Gg = 1; f.el = d; r.push(f); return b[d] = f }; c.prototype.sb = function(a, b, c, e) { this.qd(); var d = this.k; this.ud && (e = !1); var f = d.createTexture(); d.bindTexture(d.TEXTURE_2D, f); d.texImage2D(d.TEXTURE_2D, 0, d.RGBA, a, b, 0, d.RGBA, e ? d.UNSIGNED_SHORT_4_4_4_4 : d.UNSIGNED_BYTE, null); d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_S, d.CLAMP_TO_EDGE); d.texParameteri(d.TEXTURE_2D, d.TEXTURE_WRAP_T, d.CLAMP_TO_EDGE); d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER, c ? d.LINEAR : d.NEAREST); d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MIN_FILTER, c ? d.LINEAR : d.NEAREST); d.bindTexture(d.TEXTURE_2D, null); this.xd = null; f.Rd = a; f.Qd = b; r.push(f); return f }; c.prototype.ys = function(a, b, c) { this.qd(); var e = this.k; this.ud && (c = !1); e.bindTexture(e.TEXTURE_2D, b); e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL, !0); try { e.texImage2D(e.TEXTURE_2D, 0, e.RGBA, e.RGBA, c ? e.UNSIGNED_SHORT_4_4_4_4 : e.UNSIGNED_BYTE, a) } catch (d) { console && console.error && console.error("Error updating WebGL texture: ", d) } e.bindTexture(e.TEXTURE_2D, null); this.xd = null }; c.prototype.deleteTexture = function(a) { a && ("undefined" !== typeof a.Gg && 1 < a.Gg ? a.Gg-- : (this.qd(), a === this.xd && (this.k.bindTexture(this.k.TEXTURE_2D, null), this.xd = null), a === this.de && (this.k.activeTexture(this.k.TEXTURE1), this.k.bindTexture(this.k.TEXTURE_2D, null), this.k.activeTexture(this.k.TEXTURE0), this.de = null), Ba(r, a), "undefined" !== typeof a.el && delete b[a.el], this.k.deleteTexture(a))) }; c.prototype.Vb = function(a) { if (a !== this.Ih) { var b = this.lb(); b.type = 6; this.Ih = b.Xb = a; this.Pa = !1 } }; hb = c })(); (function() { function c(a) { if (a && (a.getContext || a.dc) && !a.c2runtime) { a.c2runtime = this; var e = this; this.wb = (this.bh = /crosswalk/i.test(navigator.userAgent) || /xwalk/i.test(navigator.userAgent) || !("undefined" === typeof window.c2isCrosswalk || !window.c2isCrosswalk)) || "undefined" !== typeof window.device && ("undefined" !== typeof window.device.cordova || "undefined" !== typeof window.device.phonegap) || "undefined" !== typeof window.c2iscordova && window.c2iscordova; this.Qc = !!a.dc; this.fr = "undefined" !== typeof window.AppMobi || this.Qc; this.Mb = !!window.c2cocoonjs; this.hc = !!window.c2ejecta; this.Mb && (CocoonJS.App.onSuspended.addEventListener(function() { e.setSuspended(!0) }), CocoonJS.App.onActivated.addEventListener(function() { e.setSuspended(!1) })); this.hc && (document.addEventListener("pagehide", function() { e.setSuspended(!0) }), document.addEventListener("pageshow", function() { e.setSuspended(!1) }), document.addEventListener("resize", function() { e.setSize(window.innerWidth, window.innerHeight) })); this.la = this.Qc || this.Mb || this.hc; this.dh = /edge\//i.test(navigator.userAgent); this.ud = (/msie/i.test(navigator.userAgent) || /trident/i.test(navigator.userAgent) || /iemobile/i.test(navigator.userAgent)) && !this.dh; this.Vl = /tizen/i.test(navigator.userAgent); this.Tl = /android/i.test(navigator.userAgent) && !this.Vl && !this.ud && !this.dh; this.Yl = (/iphone/i.test(navigator.userAgent) || /ipod/i.test(navigator.userAgent)) && !this.ud && !this.dh; this.nr = /ipad/i.test(navigator.userAgent); this.gh = this.Yl || this.nr || this.hc; this.nj = (/chrome/i.test(navigator.userAgent) || /chromium/i.test(navigator.userAgent)) && !this.ud && !this.dh; this.Sl = /amazonwebappplatform/i.test(navigator.userAgent); this.hr = /firefox/i.test(navigator.userAgent); this.vd = "undefined" !== typeof window.c2nodewebkit || "undefined" !== typeof window.c2nwjs || /nodewebkit/i.test(navigator.userAgent) || /nwjs/i.test(navigator.userAgent); this.Wl = !("undefined" === typeof window.c2isWindows8 || !window.c2isWindows8); this.lr = !("undefined" === typeof window.c2isWindows8Capable || !window.c2isWindows8Capable); this.Ee = !("undefined" === typeof window.c2isWindowsPhone8 || !window.c2isWindowsPhone8); this.wj = !("undefined" === typeof window.c2isWindowsPhone81 || !window.c2isWindowsPhone81); this.vj = !!window.cr_windows10; this.uj = this.Wl || this.lr || this.wj || this.vj; this.gr = !("undefined" === typeof window.c2isBlackberry10 || !window.c2isBlackberry10); this.Ul = this.Tl && !this.nj && !this.bh && !this.hr && !this.Sl && !this.la; this.devicePixelRatio = 1; this.Sc = this.wb || this.bh || this.fr || this.Mb || this.Tl || this.gh || this.Ee || this.wj || this.gr || this.Vl || this.hc; this.Sc || (this.Sc = /(blackberry|bb10|playbook|palm|symbian|nokia|windows\s+ce|phone|mobile|tablet|kindle|silk)/i.test(navigator.userAgent)); this.tj = !!(this.gh && this.wb && window.indexedDB); this.fj = null; this.br = ""; this.tj && (this.fj = cordova && cordova.plugins && cordova.plugins.CorHttpd ? cordova.plugins.CorHttpd : null); "undefined" === typeof cr_is_preview || this.vd || "?nw" !== window.location.search && !/nodewebkit/i.test(navigator.userAgent) && !/nwjs/i.test(navigator.userAgent) || (this.vd = !0); this.canvas = a; this.gl = document.getElementById("c2canvasdiv"); this.m = this.k = null; this.bj = "(unavailable)"; this.V = !1; this.Ud = 0; this.M = null; this.Ti = ""; this.Rg = !1; this.Im = this.Jm = 0; this.canvas.oncontextmenu = function(a) { a.preventDefault && a.preventDefault(); return !1 }; this.canvas.onselectstart = function(a) { a.preventDefault && a.preventDefault(); return !1 }; this.Qc && (window.c2runtime = this); this.vd && (window.ondragover = function(a) { a.preventDefault(); return !1 }, window.ondrop = function(a) { a.preventDefault(); return !1 }, window.nwgui && window.nwgui.App.clearCache && window.nwgui.App.clearCache()); this.Ul && "undefined" !== typeof jQuery && jQuery("canvas").parents("*").css("overflow", "visible"); this.width = a.width; this.height = a.height; this.r = this.width; this.q = this.height; this.Jg = this.width; this.uf = this.height; this.Je = window.innerWidth; this.Ie = window.innerHeight; this.xq = !1; this.Q = !0; this.Lf = !1; Date.now || (Date.now = function() { return +new Date }); this.plugins = []; this.types = {}; this.j = []; this.ba = []; this.Dj = {}; this.jc = []; this.Ni = {}; this.Mc = []; this.hf = []; this.bi = []; this.$o = []; this.bp = []; this.Sd = {}; this.pj = this.td = !1; this.ic = 0; this.oj = this.rj = !1; this.sc = []; this.Jf = !1; this.Tc = this.Qa = this.nh = this.gk = ""; this.rg = this.un = !1; this.Qg = []; this.Td = this.xe = 0; this.Am = 30; this.Gi = this.Yf = 0; this.vg = 1; this.xb = new Ya; this.gi = new Ya; this.xh = this.Ug = this.yf = this.ad = this.fe = this.Si = this.hh = 0; this.of = null; this.nl = []; this.Mi = []; this.Og = -1; this.Ij = [ [] ]; this.rk = this.qh = 0; this.Hh(null); this.Zf = []; this.$f = -1; this.zf = this.Fm = this.bg = 0; this.sg = []; this.ok = this.Zj = -1; this.Nf = !0; this.Me = 0; this.Kf = !1; this.ks = 0; this.nf = null; this.ua = this.Yg = !1; this.Hm = new ca; this.Lj = new ca; this.Mj = new ca; this.bn = []; new $a([]); new $a([]); this.te = []; this.Ce = {}; this.md = {}; this.jd = {}; this.gf = {}; this.bl = {}; this.em = this.mh = this.ma = this.xa = this.dm = this.lh = this.R = null; this.ef = this.xj = !1; this.Ui = [null, null]; this.Xd = 0; this.Wc = {}; this.og = this.zd = null; this.ik = ""; this.wh = []; this.Wr() } } function l(a, e) { return 128 >= e ? a[3] : 256 >= e ? a[2] : 512 >= e ? a[1] : a[0] } function n() { try { return !!window.indexedDB } catch (a) { return !1 } } function p(a) { a.target.result.createObjectStore("saves", { keyPath: "slot" }) } function u(a, e, d, k) { try { var b = indexedDB.open("_C2SaveStates"); b.onupgradeneeded = p; b.onerror = k; b.onsuccess = function(b) { b = b.target.result; b.onerror = k; b.transaction(["saves"], "readwrite").objectStore("saves").put({ slot: a, data: e }).onsuccess = d } } catch (g) { k(g) } } function r(a, e, d) { try { var b = indexedDB.open("_C2SaveStates"); b.onupgradeneeded = p; b.onerror = d; b.onsuccess = function(b) { b = b.target.result; b.onerror = d; var k = b.transaction(["saves"]).objectStore("saves").get(a); k.onsuccess = function() { k.result ? e(k.result.data) : e(null) } } } catch (k) { d(k) } } function b() { y("Reloading for continuous preview"); window.c2cocoonjs ? CocoonJS.App.reload() : -1 < window.location.search.indexOf("continuous") ? window.location.reload(!0) : window.location = window.location + "?continuous" } function a(a) { var e, d = {}; for (e in a) !a.hasOwnProperty(e) || a[e] instanceof ca || a[e] && "undefined" !== typeof a[e].It || "spriteCreatedDestroyCallback" !== e && (d[e] = a[e]); return d } var h = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame; c.prototype.Wr = function() { var a = this; if (this.tj) this.fj ? this.fj.startServer({ port: 0, localhost_only: !0 }, function(e) { a.br = e; a.xl(function(e) { a.Le(JSON.parse(e)) }, function() { alert("Error fetching data.js") }) }, function(a) { alert("error starting local server: " + a) }) : this.xl(function(e) { a.Le(JSON.parse(e)) }, function() { alert("Error fetching data.js") }); else { var e; this.Ee ? e = new ActiveXObject("Microsoft.XMLHTTP") : e = new XMLHttpRequest; var d = "data.js"; if (this.Wl || this.Ee || this.wj || this.vj) d = "data.json"; e.open("GET", d, !0); var b = !1; if (!this.la && "response" in e && "responseType" in e) try { e.responseType = "json", b = "json" === e.responseType } catch (k) { b = !1 } if (!b && "responseType" in e) try { e.responseType = "text" } catch (g) {} if ("overrideMimeType" in e) try { e.overrideMimeType("application/json; charset=utf-8") } catch (f) {} this.Ee ? e.onreadystatechange = function() { 4 === e.readyState && a.Le(JSON.parse(e.responseText)) } : (e.onload = function() { if (b) a.Le(e.response); else if (a.hc) { var d = e.responseText, d = d.substr(d.indexOf("{")); a.Le(JSON.parse(d)) } else a.Le(JSON.parse(e.responseText)) }, e.onerror = function(a) { ea("Error requesting " + d + ":"); ea(a) }); e.send() } }; c.prototype.er = function() { var a = this, e, d, b, k, g, f, c, q, m; this.De = (!this.la || this.hc || this.wb) && this.vs && !this.Ul; 0 === this.Va && this.gh && (this.De = !1); this.devicePixelRatio = this.De ? window.devicePixelRatio || window.webkitDevicePixelRatio || window.mozDevicePixelRatio || window.msDevicePixelRatio || 1 : 1; this.La(); d = !(!this.xq && (!this.ni || this.vd || this.uj || this.Ee || this.bh || this.wb || this.Sl)); 0 < this.Va && this.setSize(window.innerWidth, window.innerHeight, !0); try { this.Op && (this.Mb || this.hc || !this.la) && (e = { alpha: d, depth: !1, antialias: !1, failIfMajorPerformanceCaveat: !0 }, this.k = this.canvas.getContext("webgl", e) || this.canvas.getContext("experimental-webgl", e)) } catch (h) {} if (this.k) { if (e = this.k.getExtension("WEBGL_debug_renderer_info")) this.bj = this.k.getParameter(e.UNMASKED_RENDERER_WEBGL) + " [" + this.k.getParameter(e.UNMASKED_VENDOR_WEBGL) + "]"; this.V && (this.bj += " [front-to-back enabled]"); this.la || (this.Ja = document.createElement("canvas"), jQuery(this.Ja).appendTo(this.canvas.parentNode), this.Ja.oncontextmenu = function() { return !1 }, this.Ja.onselectstart = function() { return !1 }, this.Ja.width = Math.round(this.Jg * this.devicePixelRatio), this.Ja.height = Math.round(this.uf * this.devicePixelRatio), jQuery(this.Ja).css({ width: this.Jg + "px", height: this.uf + "px" }), this.Vm(), this.Tj = this.Ja.getContext("2d")); this.m = new hb(this.k, this.Sc, this.V); this.m.le(this.canvas.width, this.canvas.height); this.m.rl = 0 !== this.Hp; this.M = null; this.canvas.addEventListener("webglcontextlost", function(e) { e.preventDefault(); a.Cr(); y("[Construct 2] WebGL context lost"); window.cr_setSuspended(!0) }, !1); this.canvas.addEventListener("webglcontextrestored", function() { a.m.Ol(); a.m.le(a.m.width, a.m.height, !0); a.xa = null; a.ma = null; a.Ui[0] = null; a.Ui[1] = null; a.Dr(); a.Q = !0; y("[Construct 2] WebGL context restored"); window.cr_setSuspended(!1) }, !1); e = 0; for (d = this.j.length; e < d; e++) for (g = this.j[e], b = 0, k = g.A.length; b < k; b++) c = g.A[b], c.oa = this.m.aj(c.id), c.kc = this.m.Wj(c.oa), this.ef = this.ef || this.m.gg(c.oa); e = 0; for (d = this.jc.length; e < d; e++) { q = this.jc[e]; b = 0; for (k = q.A.length; b < k; b++) c = q.A[b], c.oa = this.m.aj(c.id), c.kc = this.m.Wj(c.oa); q.oc(); b = 0; for (k = q.B.length; b < k; b++) { m = q.B[b]; g = 0; for (f = m.A.length; g < f; g++) c = m.A[g], c.oa = this.m.aj(c.id), c.kc = this.m.Wj(c.oa), this.ef = this.ef || this.m.gg(c.oa); m.oc() } } } else { if (0 < this.Va && this.Qc) { this.canvas = null; document.oncontextmenu = function() { return !1 }; document.onselectstart = function() { return !1 }; this.M = AppMobi.canvas.getContext("2d"); try { this.M.samplingMode = this.I ? "smooth" : "sharp", this.M.globalScale = 1, this.M.HTML5CompatibilityMode = !0, this.M.imageSmoothingEnabled = this.I } catch (v) {} 0 !== this.width && 0 !== this.height && (this.M.width = this.width, this.M.height = this.height) } this.M || (this.Mb ? (e = { antialias: !!this.I, alpha: d }, this.M = this.canvas.getContext("2d", e)) : (e = { alpha: d }, this.M = this.canvas.getContext("2d", e)), this.M.webkitImageSmoothingEnabled = this.I, this.M.mozImageSmoothingEnabled = this.I, this.M.msImageSmoothingEnabled = this.I, this.M.imageSmoothingEnabled = this.I); this.Tj = this.Ja = null } this.Bn = function(e) { a.ne(!1, e) }; window == window.top || this.la || this.uj || this.Ee || (document.addEventListener("mousedown", function() { window.focus() }, !0), document.addEventListener("touchstart", function() { window.focus() }, !0)); "undefined" !== typeof cr_is_preview && (this.Mb && console.log("[Construct 2] In preview-over-wifi via CocoonJS mode"), -1 < window.location.search.indexOf("continuous") && (y("Reloading for continuous preview"), this.nh = "__c2_continuouspreview", this.rg = !0), this.Kr && !this.Sc && (jQuery(window).focus(function() { a.setSuspended(!1) }), jQuery(window).blur(function() { a.setSuspended(!0) }))); window.addEventListener("blur", function() { a.Re() }); this.la || (e = function(a) { if (gb(a) && document.activeElement && document.activeElement !== document.getElementsByTagName("body")[0] && document.activeElement.blur) try { document.activeElement.blur() } catch (e) {} }, window.navigator.pointerEnabled ? document.addEventListener("pointerdown", e) : window.navigator.msPointerEnabled ? document.addEventListener("MSPointerDown", e) : document.addEventListener("touchstart", e), document.addEventListener("mousedown", e)); 0 === this.Va && this.De && 1 < this.devicePixelRatio && this.setSize(this.za, this.ya, !0); this.Gn(); this.Xq(); this.go(); this.J = {} }; c.prototype.setSize = function(a, e, d) { var b = 0, k = 0, g = 0, f = 0, f = 0; if (this.Je !== a || this.Ie !== e || d) { this.Je = a; this.Ie = e; var c = this.Va, q = (document.mozFullScreen || document.webkitIsFullScreen || !!document.msFullscreenElement || document.fullScreen || this.Kf) && !this.wb; if (q || 0 !== this.Va || d) q && 0 < this.Xd && (c = this.Xd), d = this.devicePixelRatio, 4 <= c ? (g = this.za / this.ya, a / e > g ? (g *= e, 5 === c ? (f = g * d / this.za, 1 < f ? f = Math.floor(f) : 1 > f && (f = 1 / Math.ceil(1 / f)), g = this.za * f / d, f = this.ya * f / d, b = (a - g) / 2, k = (e - f) / 2, a = g, e = f) : (b = (a - g) / 2, a = g)) : (f = a / g, 5 === c ? (f = f * d / this.ya, 1 < f ? f = Math.floor(f) : 1 > f && (f = 1 / Math.ceil(1 / f)), g = this.za * f / d, f = this.ya * f / d, b = (a - g) / 2, k = (e - f) / 2, a = g) : k = (e - f) / 2, e = f), q && !this.vd && (k = b = 0)) : this.vd && this.Kf && 0 === this.Bl && (b = Math.floor((a - this.za) / 2), k = Math.floor((e - this.ya) / 2), a = this.za, e = this.ya), 2 > c && (this.mf = d), this.Jg = Math.round(a), this.uf = Math.round(e), this.width = Math.round(a * d), this.height = Math.round(e * d), this.Q = !0, this.Qn ? (this.r = this.width, this.q = this.height, this.tb = !0) : this.width < this.za && this.height < this.ya || 1 === c ? (this.r = this.width, this.q = this.height, this.tb = !0) : (this.r = this.za, this.q = this.ya, this.tb = !1, 2 === c ? (g = this.za / this.ya, c = this.Je / this.Ie, c < g ? this.r = this.q * c : c > g && (this.q = this.r / c)) : 3 === c && (g = this.za / this.ya, c = this.Je / this.Ie, c > g ? this.r = this.q * c : c < g && (this.q = this.r / c))), this.gl && !this.la && (jQuery(this.gl).css({ width: Math.round(a) + "px", height: Math.round(e) + "px", "margin-left": Math.floor(b) + "px", "margin-top": Math.floor(k) + "px" }), "undefined" !== typeof cr_is_preview && jQuery("#borderwrap").css({ width: Math.round(a) + "px", height: Math.round(e) + "px" })), this.canvas && (this.canvas.width = Math.round(a * d), this.canvas.height = Math.round(e * d), this.hc ? (this.canvas.style.left = Math.floor(b) + "px", this.canvas.style.top = Math.floor(k) + "px", this.canvas.style.width = Math.round(a) + "px", this.canvas.style.height = Math.round(e) + "px") : this.De && !this.la && (this.canvas.style.width = Math.round(a) + "px", this.canvas.style.height = Math.round(e) + "px")), this.Ja && (this.Ja.width = Math.round(a * d), this.Ja.height = Math.round(e * d), this.Ja.style.width = this.Jg + "px", this.Ja.style.height = this.uf + "px"), this.m && this.m.le(Math.round(a * d), Math.round(e * d)), this.Qc && this.M && (this.M.width = Math.round(a), this.M.height = Math.round(e)), this.M && (this.M.webkitImageSmoothingEnabled = this.I, this.M.mozImageSmoothingEnabled = this.I, this.M.msImageSmoothingEnabled = this.I, this.M.imageSmoothingEnabled = this.I), this.Gn(), this.Yl && !this.wb && window.scrollTo(0, 0) } }; c.prototype.Gn = function() { if (this.dp && 0 !== this.Sj) { var a = "portrait"; 2 === this.Sj && (a = "landscape"); try { screen.orientation && screen.orientation.lock ? screen.orientation.lock(a) : screen.lockOrientation ? screen.lockOrientation(a) : screen.webkitLockOrientation ? screen.webkitLockOrientation(a) : screen.mozLockOrientation ? screen.mozLockOrientation(a) : screen.msLockOrientation && screen.msLockOrientation(a) } catch (e) { console && console.warn && console.warn("Failed to lock orientation: ", e) } } }; c.prototype.Cr = function() { this.m.lp(); this.xj = !0; var a, e, d; a = 0; for (e = this.j.length; a < e; a++) d = this.j[a], d.Nj && d.Nj() }; c.prototype.Dr = function() { this.xj = !1; var a, e, d; a = 0; for (e = this.j.length; a < e; a++) d = this.j[a], d.Mm && d.Mm() }; c.prototype.Vm = function() { if (!this.la) { var a = (document.mozFullScreen || document.webkitIsFullScreen || document.fullScreen || document.msFullscreenElement || this.Kf) && !this.wb ? jQuery(this.canvas).offset() : jQuery(this.canvas).position(); a.position = "absolute"; jQuery(this.Ja).css(a) } }; var w = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame || window.oCancelAnimationFrame; c.prototype.setSuspended = function(a) { var e; if (a && !this.Lf) for (y("[Construct 2] Suspending"), this.Lf = !0, -1 !== this.Zj && w && w(this.Zj), -1 !== this.ok && clearTimeout(this.ok), a = 0, e = this.sg.length; a < e; a++) this.sg[a](!0); else if (!a && this.Lf) { y("[Construct 2] Resuming"); this.Lf = !1; this.hh = Ua(); this.fe = Ua(); a = this.Yf = this.Ug = 0; for (e = this.sg.length; a < e; a++) this.sg[a](!1); this.ne(!1) } }; c.prototype.Zo = function(a) { this.sg.push(a) }; c.prototype.gd = function(a) { return this.wh[a] }; c.prototype.Le = function(a) { a && a.project || ea("Project model unavailable"); a = a.project; this.name = a[0]; this.zl = a[1]; this.Va = a[12]; this.Bl = a[12]; this.za = a[10]; this.ya = a[11]; this.Qm = this.za / 2; this.Rm = this.ya / 2; this.la && !this.hc && (4 <= a[12] || 0 === a[12]) && (y("[Construct 2] Letterbox scale fullscreen modes are not supported on this platform - falling back to 'Scale outer'"), this.Bl = this.Va = 3); this.xk = a[18]; this.Ad = a[19]; if (0 === this.Ad) { var e = new Image; e.crossOrigin = "anonymous"; this.nn(e, "loading-logo.png"); this.zd = { rh: e } } else if (4 === this.Ad) { e = new Image; e.src = ""; var d = new Image; d.src = ""; var b = new Image; b.src = ""; var k = new Image; k.src = ""; var g = new Image; g.src = ""; var f = new Image; f.src = ""; var c = new Image; c.src = ""; var q = new Image; q.src = ""; var m = new Image; m.src = ""; var h = new Image; h.src = ""; var v = new Image; v.src = ""; var x = new Image; x.src = ""; this.zd = { rh: [e, d, b, k], Pr: [g, f, c, q], As: [m, h, v, x] } } this.bg = a[21]; this.wh = ec(); this.Cc = new W(this); e = 0; for (d = a[2].length; e < d; e++) c = a[2][e], b = this.gd(c[0]), ib(c, b.prototype), q = new b(this), q.Sh = c[1], q.wd = c[2], q.Cm = c[9], q.da && q.da(), this.plugins.push(q); this.wh = ec(); e = 0; for (d = a[3].length; e < d; e++) { c = a[3][e]; g = this.gd(c[1]); q = null; b = 0; for (k = this.plugins.length; b < k; b++) if (this.plugins[b] instanceof g) { q = this.plugins[b]; break } m = new q.ob(q); m.name = c[0]; m.G = c[2]; m.lj = c[3].slice(0); m.xs = c[3].length; m.ep = c[4]; m.yq = c[5]; m.H = c[11]; m.G ? (m.vh = [], m.Nc = this.zf++, m.Z = null) : (m.vh = null, m.Nc = -1, m.Z = []); m.Pg = null; m.ze = null; m.sl = null; m.jb = !1; m.eb = null; c[6] ? (m.zn = c[6][0], m.An = c[6][1], m.ms = c[6][2]) : (m.zn = null, m.An = 0, m.ms = 0); c[7] ? m.cb = c[7] : m.cb = null; m.index = e; m.d = []; m.Mg = []; m.$c = [new jb(m)]; m.tc = 0; m.Jb = null; m.qp = 0; m.Ze = !0; m.ci = kb; m.Bq = lb; m.Gq = mb; m.N = nb; m.ig = ob; m.jg = pb; m.Fd = qb; m.Vg = rb; m.Vi = sb; m.Xi = tb; m.Fc = ub; m.Zi = vb; m.hl = new ab(this.za, this.ya); m.Uk = !0; m.Vk = !1; m.J = {}; m.toString = wb; m.ba = []; b = 0; for (k = c[8].length; b < k; b++) { h = c[8][b]; v = this.gd(h[1]); x = null; g = 0; for (f = this.ba.length; g < f; g++) if (this.ba[g] instanceof v) { x = this.ba[g]; break } x || (x = new v(this), x.Dm = [], x.Kj = new ca, x.da && x.da(), this.ba.push(x)); - 1 === x.Dm.indexOf(m) && x.Dm.push(m); g = new x.ob(x, m); g.name = h[0]; g.H = h[2]; g.da(); m.ba.push(g) } m.global = c[9]; m.qj = c[10]; m.A = []; b = 0; for (k = c[12].length; b < k; b++) m.A.push({ id: c[12][b][0], name: c[12][b][1], oa: -1, kc: !1, pb: !0, index: b }); m.bu = c[13]; this.xk && !m.G && !m.qj && q.wd || m.da(); m.name && (this.types[m.name] = m); this.j.push(m); q.Sh && (b = new q.Ta(m), b.uid = this.bg++, b.Zm = this.Fm++, b.$d = 0, b.Df = xb, b.toString = yb, b.Ra = c[14], b.da(), m.d.push(b), this.Wc[b.uid.toString()] = b) } e = 0; for (d = a[4].length; e < d; e++) for (g = a[4][e], f = this.j[g[0]], b = 1, k = g.length; b < k; b++) c = this.j[g[b]], c.Z.push(f), f.vh.push(c); e = 0; for (d = a[28].length; e < d; e++) { g = a[28][e]; f = []; b = 0; for (k = g.length; b < k; b++) f.push(this.j[g[b]]); b = 0; for (k = f.length; b < k; b++) f[b].jb = !0, f[b].eb = f } if (0 < this.zf) for (e = 0, d = this.j.length; e < d; e++) if (c = this.j[e], !c.G && c.Z.length) { c.Pg = Array(this.zf); c.ze = Array(this.zf); c.sl = Array(this.zf); m = []; b = x = v = h = 0; for (k = c.Z.length; b < k; b++) for (q = c.Z[b], c.Pg[q.Nc] = h, h += q.xs, c.ze[q.Nc] = v, v += q.ep, c.sl[q.Nc] = x, x += q.yq, g = 0, f = q.A.length; g < f; g++) m.push(ua({}, q.A[g])); c.A = m.concat(c.A); b = 0; for (k = c.A.length; b < k; b++) c.A[b].index = b } e = 0; for (d = a[5].length; e < d; e++) c = a[5][e], b = new zb(this, c), this.Dj[b.name] = b, this.jc.push(b); e = 0; for (d = a[6].length; e < d; e++) c = a[6][e], b = new Ab(this, c), this.Ni[b.name] = b, this.Mc.push(b); e = 0; for (d = this.Mc.length; e < d; e++) this.Mc[e].ja(); e = 0; for (d = this.Mc.length; e < d; e++) this.Mc[e].uk(); e = 0; for (d = this.bi.length; e < d; e++) this.bi[e].ja(); S(this.bi); this.cp = a[7]; this.Xc = a[9]; this.mf = 1; this.Op = a[13]; this.I = a[14]; this.ni = a[15]; this.vs = a[17]; this.Sj = a[20]; this.dp = 0 < this.Sj; this.Kr = a[22]; this.tb = this.Qn = a[23]; this.Hp = a[24]; this.Qr = a[25]; this.V = a[27] && !this.ud; this.Th = Date.now(); S(this.wh); this.er() }; var e = !1; c.prototype.zs = function(a, d) { a.cocoonLazyLoad = !0; a.onerror = function(d) { e = a.dl = !0; console && console.error && console.error("Error loading image '" + a.src + "': ", d) }; this.hc ? a.src = d : a.src || ("undefined" !== typeof XAPKReader ? XAPKReader.get(d, function(e) { a.src = e }, function(b) { e = a.dl = !0; console && console.error && console.error("Error extracting image '" + d + "' from expansion file: ", b) }) : (a.crossOrigin = "anonymous", this.nn(a, d))); this.hf.push(a) }; c.prototype.wq = function(a) { var e, d; e = 0; for (d = this.hf.length; e < d; e++) if (this.hf[e].np === a) return this.hf[e]; return null }; var d = 0, f = !1; c.prototype.Xq = function() { this.nf && (d = this.nf.Zt(this.cp)) }; c.prototype.Wk = function() { var a = d, e = 0, b = 0, k = !0, g, c, b = 0; for (g = this.hf.length; b < g; b++) { c = this.hf[b]; var q = c.mp; if (!q || 0 >= q) q = 5E4; a += q; c.src && (c.complete || c.loaded) && !c.dl ? e += q : k = !1 } k && this.Qr && this.nf && (f || (this.nf.$t(), f = !0), b = this.nf.Nt(), e += b, b < d && (k = !1)); this.lc = 0 == a ? 1 : e / a; return k }; var g = !1; c.prototype.go = function() { if (this.M || this.m) { var a = this.M || this.Tj; this.Ja && this.Vm(); var d = window.innerWidth, b = window.innerHeight; this.Je === d && this.Ie === b || this.setSize(d, b); this.lc = 0; this.cm = -1; var k = this; if (this.Wk() && (4 !== this.Ad || g)) this.Yq(); else { b = Date.now() - this.Th; if (a) { var f = this.width, c = this.height, d = this.devicePixelRatio; if (3 > this.Ad && (this.Mb || 500 <= b && this.cm != this.lc)) { a.clearRect(0, 0, f, c); var b = f / 2, c = c / 2, f = 0 === this.Ad && this.zd.rh.complete, q = 40 * d, m = 0, v = 80 * d, x; if (f) { var t = this.zd.rh, v = t.width * d; x = t.height * d; q = v / 2; m = x / 2; a.drawImage(t, M(b - q), M(c - m), v, x) } 1 >= this.Ad ? (b = M(b - q) + .5, c = M(c + (m + (f ? 12 * d : 0))) + .5, a.fillStyle = e ? "red" : "DodgerBlue", a.fillRect(b, c, Math.floor(v * this.lc), 6 * d), a.strokeStyle = "black", a.strokeRect(b, c, v, 6 * d), a.strokeStyle = "white", a.strokeRect(b - 1 * d, c - 1 * d, v + 2 * d, 8 * d)) : 2 === this.Ad && (a.font = this.hc ? "12pt ArialMT" : "12pt Arial", a.fillStyle = e ? "#f00" : "#999", a.au = "middle", d = Math.round(100 * this.lc) + "%", f = a.measureText ? a.measureText(d) : null, a.fillText(d, b - (f ? f.width : 0) / 2, c)); this.cm = this.lc } else if (4 === this.Ad) { this.Mp(a); h ? h(function() { k.go() }) : setTimeout(function() { k.go() }, 16); return } } setTimeout(function() { k.go() }, this.Mb ? 10 : 100) } } }; var v = -1, x = "undefined" === typeof cr_is_preview ? 200 : 0, m = !0, k = !1, q = 0, t = 0, ma = "undefined" === typeof cr_is_preview ? 3E3 : 0, ga = null, O = null, Q = 0; c.prototype.Mp = function(a) { if (!g) { for (var d = Math.ceil(this.width), b = Math.ceil(this.height), f = this.zd.rh, c = this.zd.Pr, h = this.zd.As, p = 0; 4 > p; ++p) if (!f[p].complete || !c[p].complete || !h[p].complete) return; 0 === Q && (v = Date.now()); var p = Date.now(), n = !1, r = a, w, u; m || k ? (a.clearRect(0, 0, d, b), ga && ga.width === d && ga.height === b || (ga = document.createElement("canvas"), ga.width = d, ga.height = b, O = ga.getContext("2d")), r = O, n = !0, m && 1 === Q && (v = Date.now())) : a.globalAlpha = 1; r.fillStyle = "#333333"; r.fillRect(0, 0, d, b); 256 < this.uf ? (w = Ca(.22 * b, 105, .6 * d), u = .25 * w, r.drawImage(l(c, w), .5 * d - w / 2, .2 * b - u / 2, w, u), u = w = Math.min(.395 * b, .95 * d), r.drawImage(l(f, w), .5 * d - w / 2, .485 * b - u / 2, w, u), w = Ca(.22 * b, 105, .6 * d), u = .25 * w, r.drawImage(l(h, w), .5 * d - w / 2, .868 * b - u / 2, w, u), r.fillStyle = "#3C3C3C", w = d, u = Math.max(.005 * b, 2), r.fillRect(0, .8 * b - u / 2, w, u), r.fillStyle = e ? "red" : "#E0FF65", w = d * this.lc, r.fillRect(.5 * d - w / 2, .8 * b - u / 2, w, u)) : (u = w = .55 * b, r.drawImage(l(f, w), .5 * d - w / 2, .45 * b - u / 2, w, u), r.fillStyle = "#3C3C3C", w = d, u = Math.max(.005 * b, 2), r.fillRect(0, .85 * b - u / 2, w, u), r.fillStyle = e ? "red" : "#E0FF65", w = d * this.lc, r.fillRect(.5 * d - w / 2, .85 * b - u / 2, w, u)); n && (m ? a.globalAlpha = 0 === Q ? 0 : Math.min((p - v) / 300, 1) : k && (a.globalAlpha = Math.max(1 - (p - t) / 300, 0)), a.drawImage(ga, 0, 0, d, b)); m && 300 <= p - v && 2 <= Q && (m = !1, q = p); !m && p - q >= ma && !k && 1 <= this.lc && (k = !0, t = p); if (k && p - t >= 300 + x || "undefined" !== typeof cr_is_preview && 1 <= this.lc && 500 > Date.now() - v) g = !0, k = m = !1, this.zd = O = ga = null; ++Q } }; c.prototype.Yq = function() { this.Ja && (this.canvas.parentNode.removeChild(this.Ja), this.Ja = this.Tj = null); this.Th = Date.now(); this.fe = Ua(); var a, e, d; if (this.xk) for (a = 0, e = this.j.length; a < e; a++) d = this.j[a], d.G || d.qj || !d.Y.wd || d.da(); else this.Nf = !1; a = 0; for (e = this.jc.length; a < e; a++) this.jc[a].op(); 2 <= this.Va && (a = this.za / this.ya, e = this.width / this.height, this.mf = 2 !== this.Va && e > a || 2 === this.Va && e < a ? this.height / this.ya : this.width / this.za); this.zl ? this.Dj[this.zl].kk() : this.jc[0].kk(); this.xk || (this.Me = 1, this.trigger(W.prototype.e.Gk, null)); navigator.splashscreen && navigator.splashscreen.hide && navigator.splashscreen.hide(); a = 0; for (e = this.j.length; a < e; a++) d = this.j[a], d.Br && d.Br(); document.hidden || document.webkitHidden || document.mozHidden || document.msHidden ? window.cr_setSuspended(!0) : this.ne(!1); this.Qc && AppMobi.webview.execute("onGameReady();") }; c.prototype.ne = function(a, e, d) { if (this.R) { var b = Ua(); if (d || !this.Lf || a) { a || (h ? this.Zj = h(this.Bn) : this.ok = setTimeout(this.Bn, this.Sc ? 1 : 16)); e = e || b; var k = this.Va; ((d = (document.mozFullScreen || document.webkitIsFullScreen || document.fullScreen || !!document.msFullscreenElement) && !this.wb) || this.Kf) && 0 < this.Xd && (k = this.Xd); if (0 < k) { var k = window.innerWidth, g = window.innerHeight; this.Je === k && this.Ie === g || this.setSize(k, g) } this.la || (d ? (this.Rg || (this.Ti = jQuery(this.canvas).css("margin") || "0", this.Rg = !0), this.nj || this.vd || 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.Rg ? (this.nj || this.vd || jQuery(this.canvas).css("margin", this.Ti), this.Ti = "", this.Rg = !1, 0 === this.Va && this.setSize(Math.round(this.Jm / this.devicePixelRatio), Math.round(this.Im / this.devicePixelRatio), !0)) : (this.Jm = this.width, this.Im = this.height)); this.Nf && (d = this.Wk(), this.Me = this.lc, d && (this.Nf = !1, this.lc = 1, this.trigger(W.prototype.e.Gk, null))); this.sr(e); !this.Q && !this.Mb || this.xj || this.rg || a || (this.Q = !1, this.m ? this.Kb() : this.Lc(), this.og && (this.canvas && this.canvas.toDataURL && (this.ik = this.canvas.toDataURL(this.og[0], this.og[1]), window.cr_onSnapshot && window.cr_onSnapshot(this.ik), this.trigger(W.prototype.e.Bk, null)), this.og = null)); this.Ot || (this.ad++, this.yf++, this.Ug++); this.Yf += Ua() - b } } }; c.prototype.sr = function(a) { var e, d, b, k, g, f, c, q; 1E3 <= a - this.fe && (this.fe += 1E3, 1E3 <= a - this.fe && (this.fe = a), this.Si = this.Ug, this.Ug = 0, this.Gi = this.Yf, this.Yf = 0); e = 0; 0 !== this.hh && (e = a - this.hh, 0 > e && (e = 0), this.Td = e /= 1E3, .5 < this.Td ? this.Td = 0 : this.Td > 1 / this.Am && (this.Td = 1 / this.Am)); this.hh = a; this.xe = this.Td * this.vg; this.xb.add(this.xe); this.gi.add(e); a = (document.mozFullScreen || document.webkitIsFullScreen || document.fullScreen || !!document.msFullscreenElement || this.Kf) && !this.wb; 2 <= this.Va || a && 0 < this.Xd ? (e = this.za / this.ya, d = this.width / this.height, b = this.Va, a && 0 < this.Xd && (b = this.Xd), this.mf = 2 !== b && d > e || 2 === b && d < e ? this.height / this.ya : this.width / this.za, this.R && (this.R.gn(this.R.scrollX), this.R.hn(this.R.scrollY))) : this.mf = this.De ? this.devicePixelRatio : 1; this.La(); this.ic++; this.Cc.Zr(); this.ic--; this.La(); this.ic++; d = this.Hm.Kd(); a = 0; for (e = d.length; a < e; a++) d[a].Vt(); a = 0; for (e = this.j.length; a < e; a++) if (f = this.j[a], !f.G && (f.ba.length || f.Z.length)) for (d = 0, b = f.d.length; d < b; d++) for (c = f.d[d], k = 0, g = c.u.length; k < g; k++) c.u[k].ne(); a = 0; for (e = this.j.length; a < e; a++) if (f = this.j[a], !f.G && (f.ba.length || f.Z.length)) for (d = 0, b = f.d.length; d < b; d++) for (c = f.d[d], k = 0, g = c.u.length; k < g; k++) q = c.u[k], q.Or && q.Or(); d = this.Lj.Kd(); a = 0; for (e = d.length; a < e; a++) d[a].ne(); this.ic--; this.Zq(); for (a = 0; this.of && 10 > a++;) this.ql(this.of); a = 0; for (e = this.Mc.length; a < e; a++) this.Mc[a].ej = !1; this.R.Vd && this.R.Vd.na(); S(this.bn); this.ic++; a = 0; for (e = this.j.length; a < e; a++) if (f = this.j[a], !f.G && (f.ba.length || f.Z.length)) for (d = 0, b = f.d.length; d < b; d++) for (c = f.d[d], k = 0, g = c.u.length; k < g; k++) q = c.u[k], q.mk && q.mk(); d = this.Mj.Kd(); a = 0; for (e = d.length; a < e; a++) d[a].mk(); this.ic-- }; c.prototype.Re = function() { var a, e, d, b, k, g, f, c, q; a = 0; for (e = this.j.length; a < e; a++) if (f = this.j[a], !f.G) for (d = 0, b = f.d.length; d < b; d++) if (c = f.d[d], c.Re && c.Re(), c.u) for (k = 0, g = c.u.length; k < g; k++) q = c.u[k], q.Re && q.Re() }; c.prototype.ql = function(a) { var e = this.R; this.R.ls(); var d, b, k; if (this.m) for (d = 0, b = this.j.length; d < b; d++) k = this.j[d], k.G || !k.Jn || k.global && 0 !== k.d.length || -1 !== a.Hf.indexOf(k) || k.Jn(); e == a && S(this.Cc.nb); S(this.bn); this.cn(!0); a.kk(); this.cn(!1); this.Q = !0; this.La() }; c.prototype.cn = function(a) { var e, d, b, k, g, f, c, q, m; e = 0; for (d = this.ba.length; e < d; e++) b = this.ba[e], a ? b.dg && b.dg() : b.eg && b.eg(); e = 0; for (d = this.j.length; e < d; e++) if (b = this.j[e], b.global || b.Y.Sh) for (k = 0, g = b.d.length; k < g; k++) if (f = b.d[k], a ? f.dg && f.dg() : f.eg && f.eg(), f.u) for (c = 0, q = f.u.length; c < q; c++) m = f.u[c], a ? m.dg && m.dg() : m.eg && m.eg() }; c.prototype.nk = function(a) { this.Lj.add(a) }; c.prototype.ns = function(a) { this.Mj.add(a) }; c.prototype.Gl = function(a) { return a && -1 !== a.ag ? this.Td * a.ag : this.xe }; c.prototype.Lc = function() { this.R.Lc(this.M); this.Qc && this.M.present() }; c.prototype.Kb = function() { this.V && (this.Ud = 1, this.R.we(this.m)); this.R.Kb(this.m); this.m.Sr() }; c.prototype.Kl = function(a) { a = a.toString(); return this.Wc.hasOwnProperty(a) ? this.Wc[a] : null }; var V = []; c.prototype.pe = function(a) { var e, d; e = a.type.name; var b = null; if (this.Sd.hasOwnProperty(e)) { if (b = this.Sd[e], b.contains(a)) return } else b = V.length ? V.pop() : new ca, this.Sd[e] = b; b.add(a); this.td = !0; if (a.jb) for (e = 0, d = a.siblings.length; e < d; e++) this.pe(a.siblings[e]); this.pj && b.ff.push(a); this.oj || (this.ic++, this.trigger(Object.getPrototypeOf(a.type.Y).e.oo, a), this.ic--) }; c.prototype.La = function() { if (this.td) { var a, e, d, b, k, g; this.pj = !0; d = 0; for (k = this.sc.length; d < k; ++d) for (a = this.sc[d], e = a.type, e.d.push(a), b = 0, g = e.Z.length; b < g; ++b) e.Z[b].d.push(a), e.Z[b].Ze = !0; S(this.sc); this.io(); Sa(this.Sd); this.td = this.pj = !1 } }; c.prototype.io = function() { for (var a in this.Sd) this.Sd.hasOwnProperty(a) && this.Vn(this.Sd[a]) }; c.prototype.Vn = function(a) { var e = a.Kd(), d = e[0].type, b, k, g, f, c, q; Va(d.d, a); d.Ze = !0; 0 === d.d.length && (d.Vk = !1); b = 0; for (k = d.Z.length; b < k; ++b) q = d.Z[b], Va(q.d, a), q.Ze = !0; b = 0; for (k = this.Cc.nb.length; b < k; ++b) if (c = this.Cc.nb[b], c.mb.hasOwnProperty(d.index) && Va(c.mb[d.index].be, a), !d.G) for (g = 0, f = d.Z.length; g < f; ++g) q = d.Z[g], c.mb.hasOwnProperty(q.index) && Va(c.mb[q.index].be, a); if (c = e[0].g) { if (c.Db) for (g = c.d, b = 0, k = g.length; b < k; ++b) f = g[b], a.contains(f) && (f.pa(), c.Ka.update(f, f.Za, null), f.Za.set(0, 0, -1, -1)); Va(c.d, a); c.lg(0) } for (b = 0; b < e.length; ++b) this.Un(e[b], d); a.clear(); V.push(a); this.Q = !0 }; c.prototype.Un = function(a, e) { var d, b, k; d = 0; for (b = this.nl.length; d < b; ++d) this.nl[d](a); a.nd && e.hl.update(a, a.nd, null); (d = a.g) && d.Ue(a, !0); if (a.u) for (d = 0, b = a.u.length; d < b; ++d) k = a.u[d], k.yh && k.yh(), k.behavior.Kj.remove(a); this.Hm.remove(a); this.Lj.remove(a); this.Mj.remove(a); a.yh && a.yh(); this.Wc.hasOwnProperty(a.uid.toString()) && delete this.Wc[a.uid.toString()]; this.xh--; 100 > e.Mg.length && e.Mg.push(a) }; c.prototype.jl = function(a, e, d, b) { if (a.G) { var k = M(Math.random() * a.vh.length); return this.jl(a.vh[k], e, d, b) } return a.Jb ? this.od(a.Jb, e, !1, d, b, !1) : null }; var E = []; c.prototype.od = function(a, e, d, b, k, g) { var f, c, q, m; if (!a) return null; var h = this.j[a[1]], v = h.Y.wd; if (this.Nf && v && !h.qj || v && !this.m && 11 === a[0][11]) return null; var x = e; v || (e = null); var t; h.Mg.length ? (t = h.Mg.pop(), t.Sb = !0, h.Y.Ta.call(t, h)) : (t = new h.Y.Ta(h), t.Sb = !1); !d || g || this.Wc.hasOwnProperty(a[2].toString()) ? t.uid = this.bg++ : t.uid = a[2]; this.Wc[t.uid.toString()] = t; t.Zm = this.Fm++; t.$d = h.d.length; f = 0; for (c = this.sc.length; f < c; ++f) this.sc[f].type === h && t.$d++; t.Df = xb; t.toString = yb; q = a[3]; if (t.Sb) Sa(t.J); else { t.J = {}; if ("undefined" !== typeof cr_is_preview) for (t.Rl = [], t.Rl.length = q.length, f = 0, c = q.length; f < c; f++) t.Rl[f] = q[f][1]; t.ta = []; t.ta.length = q.length } f = 0; for (c = q.length; f < c; f++) t.ta[f] = q[f][0]; if (v) { var l = a[0]; t.x = fa(b) ? l[0] : b; t.y = fa(k) ? l[1] : k; t.z = l[2]; t.width = l[3]; t.height = l[4]; t.depth = l[5]; t.i = l[6]; t.opacity = l[7]; t.hb = l[8]; t.ib = l[9]; t.Ma = l[10]; f = l[11]; !this.m && h.A.length && (t.Ma = f); t.qf = cb(t.Ma); this.k && db(t, t.Ma, this.k); if (t.Sb) { f = 0; for (c = l[12].length; f < c; f++) for (q = 0, m = l[12][f].length; q < m; q++) t.ca[f][q] = l[12][f][q]; t.Fa.set(0, 0, 0, 0); t.nd.set(0, 0, -1, -1); t.Za.set(0, 0, -1, -1); t.Pd.Rh(t.Fa); S(t.si) } else { t.ca = l[12].slice(0); f = 0; for (c = t.ca.length; f < c; f++) t.ca[f] = l[12][f].slice(0); t.K = []; t.hd = []; t.hd.length = h.A.length; t.Fa = new P(0, 0, 0, 0); t.nd = new P(0, 0, -1, -1); t.Za = new P(0, 0, -1, -1); t.Pd = new ra; t.si = []; t.Aa = Bb; t.Ht = Cb; t.rb = Db; t.pa = Eb; t.us = Fb; t.cu = Gb; t.vc = Hb } t.qs = !1; t.ss = 0; t.rs = 0; t.os = null; 14 === l.length && (t.qs = !0, t.ss = l[13][0], t.rs = l[13][1], t.os = l[13][2]); f = 0; for (c = h.A.length; f < c; f++) t.hd[f] = !0; t.Yc = !0; t.oc = Ib; t.oc(); t.Nn = !!t.K.length; t.ri = !0; t.Ai = !0; h.Uk = !0; t.visible = !0; t.ag = -1; t.g = e; t.pc = e.d.length; t.Ud = 0; "undefined" === typeof t.rc && (t.rc = null); this.Q = t.pf = !0 } var p; S(E); f = 0; for (c = h.Z.length; f < c; f++) E.push.apply(E, h.Z[f].ba); E.push.apply(E, h.ba); if (t.Sb) for (f = 0, c = E.length; f < c; f++) { var n = E[f]; p = t.u[f]; p.Sb = !0; n.behavior.Ta.call(p, n, t); l = a[4][f]; q = 0; for (m = l.length; q < m; q++) p.Ra[q] = l[q]; p.da(); n.behavior.Kj.add(t) } else for (t.u = [], f = 0, c = E.length; f < c; f++) n = E[f], p = new n.behavior.Ta(n, t), p.Sb = !1, p.Ra = a[4][f].slice(0), p.da(), t.u.push(p), n.behavior.Kj.add(t); l = a[5]; if (t.Sb) for (f = 0, c = l.length; f < c; f++) t.Ra[f] = l[f]; else t.Ra = l.slice(0); this.sc.push(t); this.td = !0; e && (e.lf(t, !0), 1 !== e.Qb || 1 !== e.Rb) && (h.Vk = !0); this.xh++; if (h.jb) { if (t.jb = !0, t.Sb ? S(t.siblings) : t.siblings = [], !d && !g) { f = 0; for (c = h.eb.length; f < c; f++) if (h.eb[f] !== h) { if (!h.eb[f].Jb) return null; t.siblings.push(this.od(h.eb[f].Jb, x, !1, v ? t.x : b, v ? t.y : k, !0)) } f = 0; for (c = t.siblings.length; f < c; f++) for (t.siblings[f].siblings.push(t), q = 0; q < c; q++) f !== q && t.siblings[f].siblings.push(t.siblings[q]) } } else t.jb = !1, t.siblings = null; t.da(); f = 0; for (c = t.u.length; f < c; f++) t.u[f].Nr && t.u[f].Nr(); return t }; c.prototype.Bf = function(a) { var e, d; e = 0; for (d = this.R.B.length; e < d; e++) { var b = this.R.B[e]; if (fb(b.name, a)) return b } return null }; c.prototype.Pc = function(a) { a = M(a); 0 > a && (a = 0); a >= this.R.B.length && (a = this.R.B.length - 1); return this.R.B[a] }; c.prototype.Ei = function(a) { var e, d; e = 0; for (d = a.length; e < d; e++) a[e].N().W = !0 }; c.prototype.ig = function(a) { var e, d; e = 0; for (d = a.length; e < d; e++) a[e].ig() }; c.prototype.jg = function(a) { var e, d; e = 0; for (d = a.length; e < d; e++) a[e].jg() }; c.prototype.Fd = function(a) { var e, d; e = 0; for (d = a.length; e < d; e++) a[e].Fd() }; c.prototype.tg = function(a, e, d) { var b = a.N(), k, f, g, c, q = this.Oa().Ua.Ob, m, h, v; if (b.W) for (b.W = !1, S(b.d), k = 0, c = a.d.length; k < c; k++) g = a.d[k], g.pa(), m = g.g.ia(e, d, !0), h = g.g.ia(e, d, !1), g.rb(m, h) ? b.d.push(g) : q && b.F.push(g); else { f = 0; v = q ? b.F : b.d; k = 0; for (c = v.length; k < c; k++) g = v[k], g.pa(), m = g.g.ia(e, d, !0), h = g.g.ia(e, d, !1), g.rb(m, h) && (q ? b.d.push(g) : (b.d[f] = b.d[k], f++)); v.length = f } a.Fc(); return b.dj() }; new ra; new P(0, 0, 0, 0); c.prototype.Hn = function(a, e) { if (!e) return !1; var d, b, k, f, g; d = 0; for (b = a.ba.length; d < b; d++) if (a.ba[d].behavior instanceof e) return !0; if (!a.G) for (d = 0, b = a.Z.length; d < b; d++) for (g = a.Z[d], k = 0, f = g.ba.length; k < f; k++) if (g.ba[k].behavior instanceof e) return !0; return !1 }; c.prototype.sk = function(a) { return this.Hn(a, Xb.ft) }; c.prototype.tk = function(a) { return this.Hn(a, Xb.gt) }; var G = -1; c.prototype.trigger = function(a, e, d) { if (!this.R) return !1; var b = this.R.Vd; if (!b) return !1; var k = !1, f, g, c; G++; var q = b.Ki; g = 0; for (c = q.length; g < c; ++g) f = this.En(a, e, q[g], d), k = k || f; f = this.En(a, e, b, d); G--; return k || f }; c.prototype.En = function(a, e, d, b) { var k = !1, f, g, c, q; if (e) for (c = this.qk(a, e, e.type.name, d, b), k = k || c, q = e.type.Z, f = 0, g = q.length; f < g; ++f) c = this.qk(a, e, q[f].name, d, b), k = k || c; else c = this.qk(a, e, "system", d, b), k = k || c; return k }; c.prototype.qk = function(a, e, d, b, k) { var f, g = !1, c = !1, c = "undefined" !== typeof k, q = (c ? b.ul : b.Fn)[d]; if (!q) return g; var m = null; b = 0; for (f = q.length; b < f; ++b) if (q[b].method == a) { m = q[b].xf; break } if (!m) return g; var h; c ? h = m[k] : h = m; if (!h) return null; b = 0; for (f = h.length; b < f; b++) a = h[b][0], k = h[b][1], c = this.tq(e, d, a, k), g = g || c; return g }; c.prototype.tq = function(a, e, d, b) { var k, f, g = !1; this.rk++; var c = this.Oa().Ua; c && this.ig(c.Id); var q = 1 < this.rk; this.ig(d.Id); q && this.Ur(); var m = this.Hh(d); m.Ua = d; a && (k = this.types[e].N(), k.W = !1, S(k.d), k.d[0] = a, this.types[e].Fc()); a = !0; if (d.parent) { e = m.wn; for (k = d.parent; k;) e.push(k), k = k.parent; e.reverse(); k = 0; for (f = e.length; k < f; k++) if (!e[k].as()) { a = !1; break } } a && (this.yf++, d.Ob ? d.$r(b) : d.na(), g = g || m.ee); this.Eh(); q && this.Lr(); this.Fd(d.Id); c && this.Fd(c.Id); this.td && 0 === this.ic && 0 === G && !this.rj && this.La(); this.rk--; return g }; c.prototype.Dl = function() { var a = this.Oa(); return a.Ua.ra[a.qa] }; c.prototype.Ur = function() { this.qh++; this.qh >= this.Ij.length && this.Ij.push([]) }; c.prototype.Lr = function() { this.qh-- }; c.prototype.El = function() { return this.Ij[this.qh] }; c.prototype.Hh = function(a) { this.Og++; this.Og >= this.Mi.length && this.Mi.push(new Jb); var e = this.Oa(); e.reset(a); return e }; c.prototype.Eh = function() { this.Og-- }; c.prototype.Oa = function() { return this.Mi[this.Og] }; c.prototype.Vr = function(a) { this.$f++; this.$f >= this.Zf.length && this.Zf.push(aa({ name: a, index: 0, qg: !1 })); var e = this.Fl(); e.name = a; e.index = 0; e.qg = !1; return e }; c.prototype.Mr = function() { this.$f-- }; c.prototype.Fl = function() { return this.Zf[this.$f] }; c.prototype.Hl = function(a, e) { for (var d, b, k, f, g, c; e;) { d = 0; for (b = e.Wb.length; d < b; d++) if (c = e.Wb[d], c instanceof Kb && fb(a, c.name)) return c; e = e.parent } d = 0; for (b = this.Mc.length; d < b; d++) for (g = this.Mc[d], k = 0, f = g.rd.length; k < f; k++) if (c = g.rd[k], c instanceof Kb && fb(a, c.name)) return c; return null }; c.prototype.Il = function(a) { var e, d; e = 0; for (d = this.jc.length; e < d; e++) if (this.jc[e].H === a) return this.jc[e]; return null }; c.prototype.Xg = function(a) { var e, d; e = 0; for (d = this.j.length; e < d; e++) if (this.j[e].H === a) return this.j[e]; return null }; c.prototype.Cq = function(a) { var e, d; e = 0; for (d = this.te.length; e < d; e++) if (this.te[e].H === a) return this.te[e]; return null }; c.prototype.ol = function(a, e) { this.og = [a, e]; this.Q = !0 }; c.prototype.Zq = function() { var a = this, e = this.gk, d = this.Tc, k = this.nh, f = !1; this.un && (f = !0, e = "__c2_continuouspreview", this.un = !1); if (e.length) { this.La(); d = this.es(); if (n() && !this.Mb) u(e, d, function() { y("Saved state to IndexedDB storage (" + d.length + " bytes)"); a.Tc = d; a.trigger(W.prototype.e.ji, null); a.Tc = ""; f && b() }, function(k) { try { localStorage.setItem("__c2save_" + e, d), y("Saved state to WebStorage (" + d.length + " bytes)"), a.Tc = d, a.trigger(W.prototype.e.ji, null), a.Tc = "", f && b() } catch (g) { y("Failed to save game state: " + k + "; " + g), a.trigger(W.prototype.e.Lk, null) } }); else try { localStorage.setItem("__c2save_" + e, d), y("Saved state to WebStorage (" + d.length + " bytes)"), a.Tc = d, this.trigger(W.prototype.e.ji, null), a.Tc = "", f && b() } catch (g) { y("Error saving to WebStorage: " + g), a.trigger(W.prototype.e.Lk, null) } this.Qa = this.nh = this.gk = "" } if (k.length) { if (n() && !this.Mb) r(k, function(e) { e ? (a.Qa = e, y("Loaded state from IndexedDB storage (" + a.Qa.length + " bytes)")) : (a.Qa = localStorage.getItem("__c2save_" + k) || "", y("Loaded state from WebStorage (" + a.Qa.length + " bytes)")); a.rg = !1; a.Qa.length || a.trigger(W.prototype.e.ii, null) }, function() { a.Qa = localStorage.getItem("__c2save_" + k) || ""; y("Loaded state from WebStorage (" + a.Qa.length + " bytes)"); a.rg = !1; a.Qa.length || a.trigger(W.prototype.e.ii, null) }); else { try { this.Qa = localStorage.getItem("__c2save_" + k) || "", y("Loaded state from WebStorage (" + this.Qa.length + " bytes)") } catch (c) { this.Qa = "" } this.rg = !1; a.Qa.length || a.trigger(W.prototype.e.ii, null) } this.gk = this.nh = "" } this.Qa.length && (this.La(), this.qr(this.Qa), this.Tc = this.Qa, this.trigger(W.prototype.e.wo, null), this.Qa = this.Tc = "") }; c.prototype.es = function() { var e, d, b, k, f, g, c, q = { c2save: !0, version: 1, rt: { time: this.xb.aa, walltime: this.gi.aa, timescale: this.vg, tickcount: this.ad, execcount: this.yf, next_uid: this.bg, running_layout: this.R.H, start_time_offset: Date.now() - this.Th }, types: {}, layouts: {}, events: { groups: {}, cnds: {}, acts: {}, vars: {} } }; e = 0; for (d = this.j.length; e < d; e++) if (f = this.j[e], !f.G && !this.sk(f)) { g = { instances: [] }; Ra(f.J) && (g.ex = a(f.J)); b = 0; for (k = f.d.length; b < k; b++) g.instances.push(this.fk(f.d[b])); q.types[f.H.toString()] = g } e = 0; for (d = this.jc.length; e < d; e++) b = this.jc[e], q.layouts[b.H.toString()] = b.Ub(); k = q.events.groups; e = 0; for (d = this.te.length; e < d; e++) b = this.te[e], k[b.H.toString()] = this.Ce[b.Ef].Yd; d = q.events.cnds; for (c in this.md) this.md.hasOwnProperty(c) && (e = this.md[c], Ra(e.J) && (d[c] = { ex: a(e.J) })); d = q.events.acts; for (c in this.jd) this.jd.hasOwnProperty(c) && (e = this.jd[c], Ra(e.J) && (d[c] = { ex: a(e.J) })); d = q.events.vars; for (c in this.gf) this.gf.hasOwnProperty(c) && (e = this.gf[c], e.eh || e.parent && !e.Mf || (d[c] = e.data)); q.system = this.Cc.Ub(); return JSON.stringify(q) }; c.prototype.an = function() { var a, e, d, b, k, f; this.Wc = {}; a = 0; for (e = this.j.length; a < e; a++) if (d = this.j[a], !d.G) for (b = 0, k = d.d.length; b < k; b++) f = d.d[b], this.Wc[f.uid.toString()] = f }; c.prototype.qr = function(a) { a = JSON.parse(a); if (a.c2save && !(1 < a.version)) { this.Jf = !0; var e = a.rt; this.xb.reset(); this.xb.aa = e.time; this.gi.reset(); this.gi.aa = e.walltime || 0; this.vg = e.timescale; this.ad = e.tickcount; this.yf = e.execcount; this.Th = Date.now() - e.start_time_offset; var d = e.running_layout; if (d !== this.R.H) if (d = this.Il(d)) this.ql(d); else return; var b, k, f, g, c, q, m; q = a.types; for (k in q) if (q.hasOwnProperty(k) && (g = this.Xg(parseInt(k, 10))) && !g.G && !this.sk(g)) { q[k].ex ? g.J = q[k].ex : Sa(g.J); c = g.d; f = q[k].instances; d = 0; for (b = na(c.length, f.length); d < b; d++) this.oh(c[d], f[d]); d = f.length; for (b = c.length; d < b; d++) this.pe(c[d]); d = c.length; for (b = f.length; d < b; d++) { c = null; if (g.Y.wd && (c = this.R.Wg(f[d].w.l), !c)) continue; c = this.od(g.Jb, c, !1, 0, 0, !0); this.oh(c, f[d]) } g.Ze = !0 } this.La(); this.an(); b = a.layouts; for (k in b) b.hasOwnProperty(k) && (d = this.Il(parseInt(k, 10))) && d.xc(b[k]); b = a.events.groups; for (k in b) b.hasOwnProperty(k) && (d = this.Cq(parseInt(k, 10))) && this.Ce[d.Ef] && this.Ce[d.Ef].Oh(b[k]); d = a.events.cnds; for (k in this.md) this.md.hasOwnProperty(k) && (d.hasOwnProperty(k) ? this.md[k].J = d[k].ex : this.md[k].J = {}); d = a.events.acts; for (k in this.jd) this.jd.hasOwnProperty(k) && (d.hasOwnProperty(k) ? this.jd[k].J = d[k].ex : this.jd[k].J = {}); d = a.events.vars; for (k in d) d.hasOwnProperty(k) && this.gf.hasOwnProperty(k) && (this.gf[k].data = d[k]); this.bg = e.next_uid; this.Jf = !1; d = 0; for (b = this.Qg.length; d < b; ++d) c = this.Qg[d], this.trigger(Object.getPrototypeOf(c.type.Y).e.Dg, c); S(this.Qg); this.Cc.xc(a.system); d = 0; for (b = this.j.length; d < b; d++) if (g = this.j[d], !g.G && !this.sk(g)) for (k = 0, a = g.d.length; k < a; k++) { c = g.d[k]; if (g.jb) for (q = c.Df(), S(c.siblings), e = 0, f = g.eb.length; e < f; e++) m = g.eb[e], g !== m && c.siblings.push(m.d[q]); c.Ld && c.Ld(); if (c.u) for (e = 0, f = c.u.length; e < f; e++) q = c.u[e], q.Ld && q.Ld() } this.Q = !0 } }; c.prototype.fk = function(e, d) { var b, k, f, g, c; g = e.type; f = g.Y; var q = {}; d ? q.c2 = !0 : q.uid = e.uid; Ra(e.J) && (q.ex = a(e.J)); if (e.ta && e.ta.length) for (q.ivs = {}, b = 0, k = e.ta.length; b < k; b++) q.ivs[e.type.lj[b].toString()] = e.ta[b]; if (f.wd) { f = { x: e.x, y: e.y, w: e.width, h: e.height, l: e.g.H, zi: e.vc() }; 0 !== e.i && (f.a = e.i); 1 !== e.opacity && (f.o = e.opacity);.5 !== e.hb && (f.hX = e.hb);.5 !== e.ib && (f.hY = e.ib); 0 !== e.Ma && (f.bm = e.Ma); e.visible || (f.v = e.visible); e.pf || (f.ce = e.pf); - 1 !== e.ag && (f.mts = e.ag); if (g.A.length) for (f.fx = [], b = 0, k = g.A.length; b < k; b++) c = g.A[b], f.fx.push({ name: c.name, active: e.hd[c.index], params: e.ca[c.index] }); q.w = f } if (e.u && e.u.length) for (q.behs = {}, b = 0, k = e.u.length; b < k; b++) g = e.u[b], g.Ub && (q.behs[g.type.H.toString()] = g.Ub()); e.Ub && (q.data = e.Ub()); return q }; c.prototype.Eq = function(a, e) { var d, b; d = 0; for (b = a.lj.length; d < b; d++) if (a.lj[d] === e) return d; return -1 }; c.prototype.Aq = function(a, e) { var d, b; d = 0; for (b = a.u.length; d < b; d++) if (a.u[d].type.H === e) return d; return -1 }; c.prototype.oh = function(a, e, d) { var b, k, f, g, c; c = a.type; g = c.Y; if (d) { if (!e.c2) return } else a.uid = e.uid; e.ex ? a.J = e.ex : Sa(a.J); if (k = e.ivs) for (b in k) k.hasOwnProperty(b) && (f = this.Eq(c, parseInt(b, 10)), 0 > f || f >= a.ta.length || (a.ta[f] = k[b])); if (g.wd) { f = e.w; a.g.H !== f.l && (k = a.g, a.g = this.R.Wg(f.l), a.g ? (k.Ue(a, !0), a.g.lf(a, !0), a.Aa(), a.g.lg(0)) : (a.g = k, d || this.pe(a))); a.x = f.x; a.y = f.y; a.width = f.w; a.height = f.h; a.pc = f.zi; a.i = f.hasOwnProperty("a") ? f.a : 0; a.opacity = f.hasOwnProperty("o") ? f.o : 1; a.hb = f.hasOwnProperty("hX") ? f.hX : .5; a.ib = f.hasOwnProperty("hY") ? f.hY : .5; a.visible = f.hasOwnProperty("v") ? f.v : !0; a.pf = f.hasOwnProperty("ce") ? f.ce : !0; a.ag = f.hasOwnProperty("mts") ? f.mts : -1; a.Ma = f.hasOwnProperty("bm") ? f.bm : 0; a.qf = cb(a.Ma); this.k && db(a, a.Ma, this.k); a.Aa(); if (f.hasOwnProperty("fx")) for (d = 0, k = f.fx.length; d < k; d++) g = c.Xi(f.fx[d].name), 0 > g || (a.hd[g] = f.fx[d].active, a.ca[g] = f.fx[d].params); a.oc() } if (c = e.behs) for (b in c) c.hasOwnProperty(b) && (d = this.Aq(a, parseInt(b, 10)), 0 > d || a.u[d].xc(c[b])); e.data && a.xc(e.data) }; c.prototype.wl = function(a, e, d) { window.resolveLocalFileSystemURL(cordova.file.applicationDirectory + "www/" + a, function(a) { a.file(e, d) }, d) }; c.prototype.xl = function(a, e) { this.wl("data.js", function(d) { var b = new FileReader; b.onload = function(e) { a(e.target.result) }; b.onerror = e; b.readAsText(d) }, e) }; c.prototype.uq = function(a, e, d) { this.wl(a, function(a) { var d = new FileReader; d.onload = function(a) { e(a.target.result) }; d.readAsArrayBuffer(a) }, d) }; c.prototype.vq = function(a, e, d) { this.uq(a, function(a) { a = URL.createObjectURL(new Blob([a])); e(a) }, d) }; c.prototype.nn = function(a, e) { this.tj ? this.vq(e, function(e) { a.src = e }, function(a) { alert("Failed to load image: " + a) }) : a.src = e }; Lb = function(a) { return new c(document.getElementById(a)) }; Mb = function(a, e) { return new c({ dc: !0, width: a, height: e }) }; window.cr_createRuntime = Lb; window.cr_createDCRuntime = Mb; window.createCocoonJSRuntime = function() { window.c2cocoonjs = !0; var a = document.createElement("screencanvas") || document.createElement("canvas"); a.qi = !0; document.body.appendChild(a); a = new c(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 c(document.getElementById("canvas")); window.c2runtime = a; window.c2runtime.setSize(window.innerWidth, window.innerHeight); return a } })(); window.cr_getC2Runtime = function() { var c = document.getElementById("c2canvas"); return c ? c.c2runtime : window.c2runtime ? window.c2runtime : null }; window.cr_getSnapshot = function(c, l) { var n = window.cr_getC2Runtime(); n && n.ol(c, l) }; window.cr_sizeCanvas = function(c, l) { if (0 !== c && 0 !== l) { var n = window.cr_getC2Runtime(); n && n.setSize(c, l) } }; window.cr_setSuspended = function(c) { var l = window.cr_getC2Runtime(); l && l.setSuspended(c) }; (function() { function c(a, d) { this.b = a; this.Vd = null; this.scrollX = this.b.za / 2; this.scrollY = this.b.ya / 2; this.scale = 1; this.i = 0; this.Ae = !0; this.name = d[0]; this.width = d[1]; this.height = d[2]; this.In = d[3]; this.sn = d[4]; this.H = d[5]; var b = d[6], g, c; this.B = []; this.Hf = []; g = 0; for (c = b.length; g < c; g++) { var h = new Nb(this, b[g]); h.Gm = g; this.B.push(h) } b = d[7]; this.ae = []; g = 0; for (c = b.length; g < c; g++) { var h = b[g], m = this.b.j[h[1]]; m.Jb || (m.Jb = h); this.ae.push(h); - 1 === this.Hf.indexOf(m) && this.Hf.push(m) } this.A = []; this.K = []; this.Yc = !0; this.ca = []; g = 0; for (c = d[8].length; g < c; g++) this.A.push({ id: d[8][g][0], name: d[8][g][1], oa: -1, kc: !1, pb: !0, index: g }), this.ca.push(d[8][g][2].slice(0)); this.oc(); this.Te = new P(0, 0, 1, 1); this.$j = new P(0, 0, 1, 1); this.Ed = {} } function l(a, d) { return a.pc - d.pc } function n(a, d) { this.Ca = a; this.b = a.b; this.d = []; this.scale = 1; this.i = 0; this.Kc = !1; this.bd = new P(0, 0, 0, 0); this.Cn = new ra; this.T = this.P = this.U = this.O = 0; this.oe = !1; this.fd = -1; this.Fi = 0; this.name = d[0]; this.index = d[1]; this.H = d[2]; this.visible = d[3]; this.ec = d[4]; this.nc = d[5]; this.Qb = d[6]; this.Rb = d[7]; this.opacity = d[8]; this.Tg = d[9]; this.Db = d[10]; this.bb = d[11]; this.Ma = d[12]; this.Np = d[13]; this.qf = "source-over"; this.Na = this.Sa = 0; this.Ka = null; this.Uc = p(); this.mc = !0; this.Ke = new P(0, 0, -1, -1); this.Ha = new P(0, 0, -1, -1); this.Db && (this.Ka = new bb(this.b.za, this.b.ya)); this.Ac = !1; var b = d[14], g, c; this.vn = []; this.ub = []; this.tf = []; g = 0; for (c = b.length; g < c; g++) { var h = b[g], m = this.b.j[h[1]]; m.Jb || (m.Jb = h, m.qp = this.index); this.ub.push(h); - 1 === this.Ca.Hf.indexOf(m) && this.Ca.Hf.push(m) } ya(this.vn, this.ub); this.A = []; this.K = []; this.Yc = !0; this.ca = []; g = 0; for (c = d[15].length; g < c; g++) this.A.push({ id: d[15][g][0], name: d[15][g][1], oa: -1, kc: !1, pb: !0, index: g }), this.ca.push(d[15][g][2].slice(0)); this.oc(); this.Te = new P(0, 0, 1, 1); this.$j = new P(0, 0, 1, 1) } function p() { return a.length ? a.pop() : [] } function u(e) { S(e); a.push(e) } c.prototype.ds = function(a) { var d = a.type.H.toString(); this.Ed.hasOwnProperty(d) || (this.Ed[d] = []); this.Ed[d].push(this.b.fk(a)) }; c.prototype.Ll = function() { var a = this.B[0]; return !a.nc && 1 === a.opacity && !a.Tg && a.visible }; c.prototype.oc = function() { S(this.K); this.Yc = !0; var a, d, b; a = 0; for (d = this.A.length; a < d; a++) b = this.A[a], b.pb && (this.K.push(b), b.kc || (this.Yc = !1)) }; c.prototype.Wi = function(a) { var d, b, g; d = 0; for (b = this.A.length; d < b; d++) if (g = this.A[d], g.name === a) return g; return null }; var r = [], b = !0; c.prototype.kk = function() { this.sn && (this.Vd = this.b.Ni[this.sn], this.Vd.uk()); this.b.R = this; this.scrollX = this.b.za / 2; this.scrollY = this.b.ya / 2; var a, d, f, g, c, h, m; a = 0; for (f = this.b.j.length; a < f; a++) if (d = this.b.j[a], !d.G) for (c = d.d, d = 0, g = c.length; d < g; d++) if (h = c[d], h.g) { var k = h.g.Gm; k >= this.B.length && (k = this.B.length - 1); h.g = this.B[k]; - 1 === h.g.d.indexOf(h) && h.g.d.push(h); h.g.oe = !0 } if (!b) for (a = 0, f = this.B.length; a < f; ++a) this.B[a].d.sort(l); S(r); this.fp(); a = 0; for (f = this.B.length; a < f; a++) h = this.B[a], h.pp(), h.di(); c = !1; if (!this.Ae) { for (m in this.Ed) if (this.Ed.hasOwnProperty(m) && (d = this.b.Xg(parseInt(m, 10))) && !d.G && this.b.tk(d)) { g = this.Ed[m]; a = 0; for (f = g.length; a < f; a++) { h = null; if (d.Y.wd && (h = this.Wg(g[a].w.l), !h)) continue; h = this.b.od(d.Jb, h, !1, 0, 0, !0); this.b.oh(h, g[a]); c = !0; r.push(h) } S(g) } a = 0; for (f = this.B.length; a < f; a++) this.B[a].d.sort(l), this.B[a].oe = !0 } c && (this.b.La(), this.b.an()); for (a = 0; a < r.length; a++) if (h = r[a], h.type.jb) for (f = h.Df(), d = 0, g = h.type.eb.length; d < g; d++) m = h.type.eb[d], h.type !== m && (m.d.length > f ? h.siblings.push(m.d[f]) : m.Jb && (c = this.b.od(m.Jb, h.g, !0, h.x, h.y, !0), this.b.La(), m.ci(), h.siblings.push(c), r.push(c))); a = 0; for (f = this.ae.length; a < f; a++) this.b.od(this.ae[a], null, !0); this.b.of = null; this.b.La(); if (this.b.M && !this.b.la) for (a = 0, f = this.b.j.length; a < f; a++) m = this.b.j[a], !m.G && m.d.length && m.Wm && m.Wm(this.b.M); if (this.b.Jf) ya(this.b.Qg, r); else for (a = 0, f = r.length; a < f; a++) h = r[a], this.b.trigger(Object.getPrototypeOf(h.type.Y).e.Dg, h); S(r); this.b.Jf || this.b.trigger(W.prototype.e.Fk, null); this.Ae = !1 }; c.prototype.op = function() { var a, d, b, g, c; d = a = 0; for (b = this.ae.length; a < b; a++) g = this.ae[a], c = this.b.j[g[1]], c.global ? c.jb || this.b.od(g, null, !0) : (this.ae[d] = g, d++); wa(this.ae, d) }; c.prototype.ls = function() { this.b.Jf || this.b.trigger(W.prototype.e.vo, null); this.b.oj = !0; S(this.b.Cc.nb); var a, d, f, g, c, h; if (!this.Ae) for (a = 0, d = this.B.length; a < d; a++) for (this.B[a].wk(), c = this.B[a].d, f = 0, g = c.length; f < g; f++) h = c[f], h.type.global || this.b.tk(h.type) && this.ds(h); a = 0; for (d = this.B.length; a < d; a++) { c = this.B[a].d; f = 0; for (g = c.length; f < g; f++) h = c[f], h.type.global || this.b.pe(h); this.b.La(); S(c); this.B[a].oe = !0 } a = 0; for (d = this.b.j.length; a < d; a++) if (c = this.b.j[a], !(c.global || c.Y.wd || c.Y.Sh || c.G)) { f = 0; for (g = c.d.length; f < g; f++) this.b.pe(c.d[f]); this.b.La() } b = !1; this.b.oj = !1 }; new P(0, 0, 0, 0); c.prototype.Lc = function(a) { var d, b = a, c = !1, h = !this.b.tb; h && (this.b.mh || (this.b.mh = document.createElement("canvas"), d = this.b.mh, d.width = this.b.r, d.height = this.b.q, this.b.em = d.getContext("2d"), c = !0), d = this.b.mh, b = this.b.em, d.width !== this.b.r && (d.width = this.b.r, c = !0), d.height !== this.b.q && (d.height = this.b.q, c = !0), c && (b.webkitImageSmoothingEnabled = this.b.I, b.mozImageSmoothingEnabled = this.b.I, b.msImageSmoothingEnabled = this.b.I, b.imageSmoothingEnabled = this.b.I)); b.globalAlpha = 1; b.globalCompositeOperation = "source-over"; this.b.ni && !this.Ll() && b.clearRect(0, 0, this.b.r, this.b.q); var l, m, c = 0; for (l = this.B.length; c < l; c++) m = this.B[c], m.visible && 0 < m.opacity && 11 !== m.Ma && (m.d.length || !m.nc) ? m.Lc(b) : m.di(); h && a.drawImage(d, 0, 0, this.b.width, this.b.height) }; c.prototype.we = function(a) { a.mn(!0); this.b.ma || (this.b.ma = a.sb(this.b.r, this.b.q, this.b.I)); if (this.b.ma.Rd !== this.b.r || this.b.ma.Qd !== this.b.q) a.deleteTexture(this.b.ma), this.b.ma = a.sb(this.b.r, this.b.q, this.b.I); a.Vb(this.b.ma); this.b.tb || a.le(this.b.r, this.b.q); var d, b; for (d = this.B.length - 1; 0 <= d; --d) b = this.B[d], b.visible && 1 === b.opacity && b.Yc && 0 === b.Ma && (b.d.length || !b.nc) ? b.we(a) : b.di(); a.mn(!1) }; c.prototype.Kb = function(a) { var d = 0 < this.K.length || this.b.ef || !this.b.tb || this.b.V; if (d) { this.b.ma || (this.b.ma = a.sb(this.b.r, this.b.q, this.b.I)); if (this.b.ma.Rd !== this.b.r || this.b.ma.Qd !== this.b.q) a.deleteTexture(this.b.ma), this.b.ma = a.sb(this.b.r, this.b.q, this.b.I); a.Vb(this.b.ma); this.b.tb || a.le(this.b.r, this.b.q) } else this.b.ma && (a.Vb(null), a.deleteTexture(this.b.ma), this.b.ma = null); this.b.ni && !this.Ll() && a.clear(0, 0, 0, 0); var b, c, h; b = 0; for (c = this.B.length; b < c; b++) h = this.B[b], h.visible && 0 < h.opacity && (h.d.length || !h.nc) ? h.Kb(a) : h.di(); d && (0 === this.K.length || 1 === this.K.length && this.b.tb ? (1 === this.K.length ? (d = this.K[0].index, a.ab(this.K[0].oa), a.Xe(null, 1 / this.b.r, 1 / this.b.q, 0, 0, 1, 1, this.scale, this.i, 0, 0, this.b.r / 2, this.b.q / 2, this.b.xb.aa, this.ca[d]), a.Fh(this.K[0].oa) && (this.b.Q = !0)) : a.ab(0), this.b.tb || a.le(this.b.width, this.b.height), a.Vb(null), a.ln(!1), a.We(1), a.zb(this.b.ma), a.jn(), a.Tb(), a.Cb(), d = this.b.width / 2, b = this.b.height / 2, a.kg(-d, b, d, b, d, -b, -d, -b), a.zb(null), a.ln(!0)) : this.ak(a, null, null, null)) }; c.prototype.Cf = function() { return 0 < this.K.length || this.b.ef || !this.b.tb || this.b.V ? this.b.ma : null }; c.prototype.Jl = function() { var a = this.B[0].gb(), d, b, c; d = 1; for (b = this.B.length; d < b; d++) c = this.B[d], (0 !== c.Qb || 0 !== c.Rb) && c.gb() < a && (a = c.gb()); return a }; c.prototype.gn = function(a) { if (!this.In) { var d = 1 / this.Jl() * this.b.r / 2; a > this.width - d && (a = this.width - d); a < d && (a = d) } this.scrollX !== a && (this.scrollX = a, this.b.Q = !0) }; c.prototype.hn = function(a) { if (!this.In) { var d = 1 / this.Jl() * this.b.q / 2; a > this.height - d && (a = this.height - d); a < d && (a = d) } this.scrollY !== a && (this.scrollY = a, this.b.Q = !0) }; c.prototype.fp = function() { this.gn(this.scrollX); this.hn(this.scrollY) }; c.prototype.ak = function(a, d, b, c) { var h = b ? b.K : d ? d.K : this.K, l = 1, m = 0, k = 0, q = 0, t = this.b.r, p = this.b.q; b ? (l = b.g.gb(), m = b.g.fb(), k = b.g.O, q = b.g.P, t = b.g.U, p = b.g.T) : d && (l = d.gb(), m = d.fb(), k = d.O, q = d.P, t = d.U, p = d.T); var n = this.b.Ui, w, r, u, E, G = 0, xa = 1, la, z, R = this.b.r, L = this.b.q, Fa = R / 2, Ga = L / 2, F = d ? d.Te : this.Te, B = d ? d.$j : this.$j, H = 0, N = 0, C = 0, A = 0, K = R, sa = R, I = L, ta = L, ia = u = 0; E = b ? b.g.fb() : 0; if (b) { w = 0; for (r = h.length; w < r; w++) u += a.Hq(h[w].oa), ia += a.Iq(h[w].oa); A = b.Fa; H = d.wa(A.left, A.top, !0); C = d.wa(A.left, A.top, !1); K = d.wa(A.right, A.bottom, !0); I = d.wa(A.right, A.bottom, !1); 0 !== E && (w = d.wa(A.right, A.top, !0), r = d.wa(A.right, A.top, !1), N = d.wa(A.left, A.bottom, !0), A = d.wa(A.left, A.bottom, !1), E = Math.min(H, K, w, N), K = Math.max(H, K, w, N), H = E, E = Math.min(C, I, r, A), I = Math.max(C, I, r, A), C = E); H -= u; C -= ia; K += u; I += ia; B.left = H / R; B.top = 1 - C / L; B.right = K / R; B.bottom = 1 - I / L; N = H = M(H); A = C = M(C); sa = K = pa(K); ta = I = pa(I); N -= u; A -= ia; sa += u; ta += ia; 0 > H && (H = 0); 0 > C && (C = 0); K > R && (K = R); I > L && (I = L); 0 > N && (N = 0); 0 > A && (A = 0); sa > R && (sa = R); ta > L && (ta = L); F.left = H / R; F.top = 1 - C / L; F.right = K / R; F.bottom = 1 - I / L } else F.left = B.left = 0, F.top = B.top = 0, F.right = B.right = 1, F.bottom = B.bottom = 1; ia = b && (a.gg(h[0].oa) || 0 !== u || 0 !== ia || 1 !== b.opacity || b.type.Y.Cm) || d && !b && 1 !== d.opacity; a.jn(); if (ia) { n[G] || (n[G] = a.sb(R, L, this.b.I)); if (n[G].Rd !== R || n[G].Qd !== L) a.deleteTexture(n[G]), n[G] = a.sb(R, L, this.b.I); a.ab(0); a.Vb(n[G]); z = ta - A; a.clearRect(N, L - A - z, sa - N, z); b ? b.Kb(a) : (a.zb(this.b.xa), a.We(d.opacity), a.Tb(), a.translate(-Fa, -Ga), a.Cb(), a.Gd(H, I, K, I, K, C, H, C, F)); B.left = B.top = 0; B.right = B.bottom = 1; b && (E = F.top, F.top = F.bottom, F.bottom = E); G = 1; xa = 0 } a.We(1); u = h.length - 1; var Ta = a.Xj(h[u].oa) || !d && !b && !this.b.tb; w = E = 0; for (r = h.length; w < r; w++) { n[G] || (n[G] = a.sb(R, L, this.b.I)); if (n[G].Rd !== R || n[G].Qd !== L) a.deleteTexture(n[G]), n[G] = a.sb(R, L, this.b.I); a.ab(h[w].oa); E = h[w].index; a.Fh(h[w].oa) && (this.b.Q = !0); 0 != w || ia ? (a.Xe(c, 1 / R, 1 / L, B.left, B.top, B.right, B.bottom, l, m, k, q, (k + t) / 2, (q + p) / 2, this.b.xb.aa, b ? b.ca[E] : d ? d.ca[E] : this.ca[E]), a.zb(null), w !== u || Ta ? (a.Vb(n[G]), z = ta - A, la = L - A - z, a.clearRect(N, la, sa - N, z)) : (b ? a.Hd(b.Sa, b.Na) : d && a.Hd(d.Sa, d.Na), a.Vb(c)), a.zb(n[xa]), a.Tb(), a.translate(-Fa, -Ga), a.Cb(), a.Gd(H, I, K, I, K, C, H, C, F), w !== u || Ta || a.zb(null)) : (a.Vb(n[G]), z = ta - A, la = L - A - z, a.clearRect(N, la, sa - N, z), b ? (b.Ga && b.Ga.Ea ? (la = b.Ga.Ea, xa = 1 / la.width, la = 1 / la.height) : (xa = 1 / b.width, la = 1 / b.height), a.Xe(c, xa, la, B.left, B.top, B.right, B.bottom, l, m, k, q, (k + t) / 2, (q + p) / 2, this.b.xb.aa, b.ca[E]), b.Kb(a)) : (a.Xe(c, 1 / R, 1 / L, 0, 0, 1, 1, l, m, k, q, (k + t) / 2, (q + p) / 2, this.b.xb.aa, d ? d.ca[E] : this.ca[E]), a.zb(d ? this.b.xa : this.b.ma), a.Tb(), a.translate(-Fa, -Ga), a.Cb(), a.Gd(H, I, K, I, K, C, H, C, F)), B.left = B.top = 0, B.right = B.bottom = 1, b && !Ta && (E = I, I = C, C = E)); G = 0 === G ? 1 : 0; xa = 0 === G ? 1 : 0 } Ta && (a.ab(0), b ? a.Hd(b.Sa, b.Na) : d ? a.Hd(d.Sa, d.Na) : this.b.tb || (a.le(this.b.width, this.b.height), Fa = this.b.width / 2, Ga = this.b.height / 2, C = H = 0, K = this.b.width, I = this.b.height), a.Vb(c), a.zb(n[xa]), a.Tb(), a.translate(-Fa, -Ga), a.Cb(), b && 1 === h.length && !ia ? a.Gd(H, C, K, C, K, I, H, I, F) : a.Gd(H, I, K, I, K, C, H, C, F), a.zb(null)) }; c.prototype.Wg = function(a) { var d, b; d = 0; for (b = this.B.length; d < b; d++) if (this.B[d].H === a) return this.B[d]; return null }; c.prototype.Ub = function() { var a, d, b, c = { sx: this.scrollX, sy: this.scrollY, s: this.scale, a: this.i, w: this.width, h: this.height, fv: this.Ae, persist: this.Ed, fx: [], layers: {} }; a = 0; for (d = this.A.length; a < d; a++) b = this.A[a], c.fx.push({ name: b.name, active: b.pb, params: this.ca[b.index] }); a = 0; for (d = this.B.length; a < d; a++) b = this.B[a], c.layers[b.H.toString()] = b.Ub(); return c }; c.prototype.xc = function(a) { var d, b, c, h; this.scrollX = a.sx; this.scrollY = a.sy; this.scale = a.s; this.i = a.a; this.width = a.w; this.height = a.h; this.Ed = a.persist; "undefined" !== typeof a.fv && (this.Ae = a.fv); var l = a.fx; d = 0; for (b = l.length; d < b; d++) if (c = this.Wi(l[d].name)) c.pb = l[d].active, this.ca[c.index] = l[d].params; this.oc(); d = a.layers; for (h in d) d.hasOwnProperty(h) && (a = this.Wg(parseInt(h, 10))) && a.xc(d[h]) }; zb = c; n.prototype.oc = function() { S(this.K); this.Yc = !0; var a, d, b; a = 0; for (d = this.A.length; a < d; a++) b = this.A[a], b.pb && (this.K.push(b), b.kc || (this.Yc = !1)) }; n.prototype.Wi = function(a) { var d, b, c; d = 0; for (b = this.A.length; d < b; d++) if (c = this.A[d], c.name === a) return c; return null }; n.prototype.pp = function() { var a, d, b, c, h, l; d = a = 0; for (b = this.ub.length; a < b; a++) { c = this.ub[a]; h = this.b.j[c[1]]; l = this.b.tk(h); h = !0; if (!l || this.Ca.Ae) { c = this.b.od(c, this, !0); if (!c) continue; r.push(c); c.type.global && (h = !1, this.tf.push(c.uid)) } h && (this.ub[d] = this.ub[a], d++) } this.ub.length = d; this.b.La(); !this.b.m && this.A.length && (this.Ma = this.Np); this.qf = cb(this.Ma); this.b.k && db(this, this.Ma, this.b.k); this.mc = !0 }; n.prototype.Ue = function(a, d) { var b = Aa(this.d, a); 0 > b || (d && this.Db && a.Za && a.Za.right >= a.Za.left && (a.pa(), this.Ka.update(a, a.Za, null), a.Za.set(0, 0, -1, -1)), b === this.d.length - 1 ? this.d.pop() : (va(this.d, b), this.lg(b)), this.mc = !0) }; n.prototype.lf = function(a, d) { a.pc = this.d.length; this.d.push(a); d && this.Db && a.Za && a.Aa(); this.mc = !0 }; n.prototype.Rr = function(a) { this.d.unshift(a); this.lg(0) }; n.prototype.Ar = function(a, d, b) { var c = a.vc(); d = d.vc(); va(this.d, c); c < d && d--; b && d++; d === this.d.length ? this.d.push(a) : this.d.splice(d, 0, a); this.lg(c < d ? c : d) }; n.prototype.lg = function(a) { -1 === this.fd ? this.fd = a : a < this.fd && (this.fd = a); this.mc = this.oe = !0 }; n.prototype.wk = function() { if (this.oe) { -1 === this.fd && (this.fd = 0); var a, d, b; if (this.Db) for (a = this.fd, d = this.d.length; a < d; ++a) b = this.d[a], b.pc = a, this.Ka.ur(b.Za); else for (a = this.fd, d = this.d.length; a < d; ++a) this.d[a].pc = a; this.oe = !1; this.fd = -1 } }; n.prototype.gb = function(a) { return this.Fq() * (this.b.tb || a ? this.b.mf : 1) }; n.prototype.Fq = function() { return (this.scale * this.Ca.scale - 1) * this.bb + 1 }; n.prototype.fb = function() { return this.Kc ? 0 : Ha(this.Ca.i + this.i) }; var a = [], h = [], w = []; n.prototype.$i = function() { this.wk(); this.Ka.$m(this.O, this.P, this.U, this.T, w); if (!w.length) return p(); if (1 === w.length) { var a = p(); ya(a, w[0]); S(w); return a } for (var d = !0; 1 < w.length;) { for (var a = w, b = void 0, c = void 0, v = void 0, l = void 0, m = void 0, b = 0, c = a.length; b < c - 1; b += 2) { var v = a[b], l = a[b + 1], m = p(), k = v, q = l, t = m, n = 0, r = 0, O = 0, Q = k.length, V = q.length, E = void 0, G = void 0; for (t.length = Q + V; n < Q && r < V; ++O) E = k[n], G = q[r], E.pc < G.pc ? (t[O] = E, ++n) : (t[O] = G, ++r); for (; n < Q; ++n, ++O) t[O] = k[n]; for (; r < V; ++r, ++O) t[O] = q[r]; d || (u(v), u(l)); h.push(m) } 1 === c % 2 && (d ? (v = p(), ya(v, a[c - 1]), h.push(v)) : h.push(a[c - 1])); ya(a, h); S(h); d = !1 } a = w[0]; S(w); return a }; n.prototype.Lc = function(a) { this.Ac = this.Tg || 1 !== this.opacity || 0 !== this.Ma; var d = this.b.canvas, b = a, c = !1; this.Ac && (this.b.lh || (this.b.lh = document.createElement("canvas"), d = this.b.lh, d.width = this.b.r, d.height = this.b.q, this.b.dm = d.getContext("2d"), c = !0), d = this.b.lh, b = this.b.dm, d.width !== this.b.r && (d.width = this.b.r, c = !0), d.height !== this.b.q && (d.height = this.b.q, c = !0), c && (b.webkitImageSmoothingEnabled = this.b.I, b.mozImageSmoothingEnabled = this.b.I, b.msImageSmoothingEnabled = this.b.I, b.imageSmoothingEnabled = this.b.I), this.nc && b.clearRect(0, 0, this.b.r, this.b.q)); b.globalAlpha = 1; b.globalCompositeOperation = "source-over"; this.nc || (b.fillStyle = "rgb(" + this.ec[0] + "," + this.ec[1] + "," + this.ec[2] + ")", b.fillRect(0, 0, this.b.r, this.b.q)); b.save(); this.Kc = !0; var c = this.ia(0, 0, !0, !0), h = this.ia(0, 0, !1, !0); this.Kc = !1; this.b.Xc && (c = Math.round(c), h = Math.round(h)); this.Kh(c, h, b); var l = this.gb(); b.scale(l, l); b.translate(-c, -h); this.Db ? (this.Ha.left = this.Ka.Xa(this.O), this.Ha.top = this.Ka.Ya(this.P), this.Ha.right = this.Ka.Xa(this.U), this.Ha.bottom = this.Ka.Ya(this.T), this.mc || !this.Ha.vf(this.Ke) ? (u(this.Uc), c = this.$i(), this.mc = !1, this.Ke.rf(this.Ha)) : c = this.Uc) : c = this.d; for (var m, k = null, h = 0, l = c.length; h < l; ++h) m = c[h], m !== k && (this.Ip(m, b), k = m); this.Db && (this.Uc = c); b.restore(); this.Ac && (a.globalCompositeOperation = this.qf, a.globalAlpha = this.opacity, a.drawImage(d, 0, 0)) }; n.prototype.Ip = function(a, d) { if (a.visible && 0 !== a.width && 0 !== a.height) { a.pa(); var b = a.Fa; b.right < this.O || b.bottom < this.P || b.left > this.U || b.top > this.T || (d.globalCompositeOperation = a.qf, a.Lc(d)) } }; n.prototype.di = function() { this.Kc = !0; var a = this.ia(0, 0, !0, !0), d = this.ia(0, 0, !1, !0); this.Kc = !1; this.b.Xc && (a = Math.round(a), d = Math.round(d)); this.Kh(a, d, null) }; n.prototype.Kh = function(a, d, b) { var c = this.gb(); this.O = a; this.P = d; this.U = a + 1 / c * this.b.r; this.T = d + 1 / c * this.b.q; this.O > this.U && (a = this.O, this.O = this.U, this.U = a); this.P > this.T && (a = this.P, this.P = this.T, this.T = a); a = this.fb(); 0 !== a && (b && (b.translate(this.b.r / 2, this.b.q / 2), b.rotate(-a), b.translate(this.b.r / -2, this.b.q / -2)), this.bd.set(this.O, this.P, this.U, this.T), this.bd.offset((this.O + this.U) / -2, (this.P + this.T) / -2), this.Cn.qn(this.bd, a), this.Cn.cl(this.bd), this.bd.offset((this.O + this.U) / 2, (this.P + this.T) / 2), this.O = this.bd.left, this.P = this.bd.top, this.U = this.bd.right, this.T = this.bd.bottom) }; n.prototype.we = function(a) { if (this.Ac = this.Tg) { this.b.xa || (this.b.xa = a.sb(this.b.r, this.b.q, this.b.I)); if (this.b.xa.Rd !== this.b.r || this.b.xa.Qd !== this.b.q) a.deleteTexture(this.b.xa), this.b.xa = a.sb(this.b.r, this.b.q, this.b.I); a.Vb(this.b.xa) } this.Kc = !0; var d = this.ia(0, 0, !0, !0), b = this.ia(0, 0, !1, !0); this.Kc = !1; this.b.Xc && (d = Math.round(d), b = Math.round(b)); this.Kh(d, b, null); d = this.gb(); a.Tb(); a.scale(d, d); a.Lh(-this.fb()); a.translate((this.O + this.U) / -2, (this.P + this.T) / -2); a.Cb(); this.Db ? (this.Ha.left = this.Ka.Xa(this.O), this.Ha.top = this.Ka.Ya(this.P), this.Ha.right = this.Ka.Xa(this.U), this.Ha.bottom = this.Ka.Ya(this.T), this.mc || !this.Ha.vf(this.Ke) ? (u(this.Uc), d = this.$i(), this.mc = !1, this.Ke.rf(this.Ha)) : d = this.Uc) : d = this.d; for (var c, h = null, b = d.length - 1; 0 <= b; --b) c = d[b], c !== h && (this.Kp(d[b], a), h = c); this.Db && (this.Uc = d); this.nc || (this.Fi = this.b.Ud++, a.Nh(this.Fi), a.kn(1, 1, 1), a.Al(), a.Xr()) }; n.prototype.Kb = function(a) { var d = 0, b = 0; if (this.Ac = this.Tg || 1 !== this.opacity || 0 < this.K.length || 0 !== this.Ma) { this.b.xa || (this.b.xa = a.sb(this.b.r, this.b.q, this.b.I)); if (this.b.xa.Rd !== this.b.r || this.b.xa.Qd !== this.b.q) a.deleteTexture(this.b.xa), this.b.xa = a.sb(this.b.r, this.b.q, this.b.I); a.Vb(this.b.xa); this.nc && a.clear(0, 0, 0, 0) } this.nc || (this.b.V ? (a.Nh(this.Fi), a.kn(this.ec[0] / 255, this.ec[1] / 255, this.ec[2] / 255), a.Al(), a.gs()) : a.clear(this.ec[0] / 255, this.ec[1] / 255, this.ec[2] / 255, 1)); this.Kc = !0; var c = this.ia(0, 0, !0, !0), d = this.ia(0, 0, !1, !0); this.Kc = !1; this.b.Xc && (c = Math.round(c), d = Math.round(d)); this.Kh(c, d, null); c = this.gb(); a.Tb(); a.scale(c, c); a.Lh(-this.fb()); a.translate((this.O + this.U) / -2, (this.P + this.T) / -2); a.Cb(); this.Db ? (this.Ha.left = this.Ka.Xa(this.O), this.Ha.top = this.Ka.Ya(this.P), this.Ha.right = this.Ka.Xa(this.U), this.Ha.bottom = this.Ka.Ya(this.T), this.mc || !this.Ha.vf(this.Ke) ? (u(this.Uc), d = this.$i(), this.mc = !1, this.Ke.rf(this.Ha)) : d = this.Uc) : d = this.d; var h, l, m = null, b = 0; for (h = d.length; b < h; ++b) l = d[b], l !== m && (this.Jp(d[b], a), m = l); this.Db && (this.Uc = d); this.Ac && (d = this.K.length ? this.K[0].oa : 0, b = this.K.length ? this.K[0].index : 0, 0 === this.K.length || 1 === this.K.length && !a.Xj(d) && 1 === this.opacity ? (1 === this.K.length ? (a.ab(d), a.Xe(this.Ca.Cf(), 1 / this.b.r, 1 / this.b.q, 0, 0, 1, 1, c, this.fb(), this.O, this.P, (this.O + this.U) / 2, (this.P + this.T) / 2, this.b.xb.aa, this.ca[b]), a.Fh(d) && (this.b.Q = !0)) : a.ab(0), a.Vb(this.Ca.Cf()), a.We(this.opacity), a.zb(this.b.xa), a.Hd(this.Sa, this.Na), a.Tb(), a.Cb(), c = this.b.r / 2, d = this.b.q / 2, a.kg(-c, d, c, d, c, -d, -c, -d), a.zb(null)) : this.Ca.ak(a, this, null, this.Ca.Cf())) }; n.prototype.Jp = function(a, d) { if (a.visible && 0 !== a.width && 0 !== a.height) { a.pa(); var b = a.Fa; b.right < this.O || b.bottom < this.P || b.left > this.U || b.top > this.T || (d.Nh(a.Ud), a.Nn ? this.Lp(a, d) : (d.ab(0), d.Hd(a.Sa, a.Na), a.Kb(d))) } }; n.prototype.Kp = function(a, d) { if (a.visible && 0 !== a.width && 0 !== a.height) { a.pa(); var b = a.Fa; b.right < this.O || b.bottom < this.P || b.left > this.U || b.top > this.T || (a.Ud = this.b.Ud++, 0 === a.Ma && 1 === a.opacity && a.Yc && a.we && (d.Nh(a.Ud), a.we(d))) } }; n.prototype.Lp = function(a, d) { var b = a.K[0].oa, c = a.K[0].index, h = this.gb(); if (1 !== a.K.length || d.Xj(b) || d.Tr(b) || (a.i || a.g.fb()) && d.gg(b) || 1 !== a.opacity || a.type.Y.Cm) this.Ca.ak(d, this, a, this.Ac ? this.b.xa : this.Ca.Cf()), d.Tb(), d.scale(h, h), d.Lh(-this.fb()), d.translate((this.O + this.U) / -2, (this.P + this.T) / -2), d.Cb(); else { d.ab(b); d.Hd(a.Sa, a.Na); d.Fh(b) && (this.b.Q = !0); var l = 0, m = 0, k = 0, q = 0; d.gg(b) && (q = a.Fa, l = this.wa(q.left, q.top, !0), m = this.wa(q.left, q.top, !1), k = this.wa(q.right, q.bottom, !0), q = this.wa(q.right, q.bottom, !1), l = l / windowWidth, m = 1 - m / windowHeight, k = k / windowWidth, q = 1 - q / windowHeight); var t; a.Ga && a.Ga.Ea ? (t = a.Ga.Ea, b = 1 / t.width, t = 1 / t.height) : (b = 1 / a.width, t = 1 / a.height); d.Xe(this.Ac ? this.b.xa : this.Ca.Cf(), b, t, l, m, k, q, h, this.fb(), this.O, this.P, (this.O + this.U) / 2, (this.P + this.T) / 2, this.b.xb.aa, a.ca[c]); a.Kb(d) } }; n.prototype.ia = function(a, d, b, c) { var h = this.b.devicePixelRatio; this.b.De && (a *= h, d *= h); var h = this.b.Qm, l = this.b.Rm, h = (this.Ca.scrollX - h) * this.Qb + h, l = (this.Ca.scrollY - l) * this.Rb + l, m = h, k = l, q = 1 / this.gb(!c); c ? (m -= this.b.r * q / 2, k -= this.b.q * q / 2) : (m -= this.b.width * q / 2, k -= this.b.height * q / 2); m += a * q; k += d * q; d = this.fb(); 0 !== d && (m -= h, k -= l, a = Math.cos(d), d = Math.sin(d), c = m * a - k * d, k = k * a + m * d, m = c + h, k += l); return b ? m : k }; n.prototype.wa = function(a, d, b) { var c = this.b.Qm, h = this.b.Rm, c = (this.Ca.scrollX - c) * this.Qb + c, l = (this.Ca.scrollY - h) * this.Rb + h, h = c, m = l, k = this.fb(); if (0 !== k) { a -= c; d -= l; var q = Math.cos(-k), k = Math.sin(-k), t = a * q - d * k; d = d * q + a * k; a = t + c; d += l } c = 1 / this.gb(!1); h -= this.b.r * c / 2; m -= this.b.q * c / 2; h = (a - h) / c; return b ? h : (d - m) / c }; n.prototype.Ub = function() { var a, d, b, c = { s: this.scale, a: this.i, vl: this.O, vt: this.P, vr: this.U, vb: this.T, v: this.visible, bc: this.ec, t: this.nc, px: this.Qb, py: this.Rb, o: this.opacity, zr: this.bb, fx: [], cg: this.tf, instances: [] }; a = 0; for (d = this.A.length; a < d; a++) b = this.A[a], c.fx.push({ name: b.name, active: b.pb, params: this.ca[b.index] }); return c }; n.prototype.xc = function(a) { var b, c, g; this.scale = a.s; this.i = a.a; this.O = a.vl; this.P = a.vt; this.U = a.vr; this.T = a.vb; this.visible = a.v; this.ec = a.bc; this.nc = a.t; this.Qb = a.px; this.Rb = a.py; this.opacity = a.o; this.bb = a.zr; this.tf = a.cg || []; ya(this.ub, this.vn); var h = new ca; b = 0; for (g = this.tf.length; b < g; ++b) h.add(this.tf[b]); c = b = 0; for (g = this.ub.length; b < g; ++b) h.contains(this.ub[b][2]) || (this.ub[c] = this.ub[b], ++c); wa(this.ub, c); c = a.fx; b = 0; for (g = c.length; b < g; b++) if (a = this.Wi(c[b].name)) a.pb = c[b].active, this.ca[a.index] = c[b].params; this.oc(); this.d.sort(l); this.oe = !0 }; Nb = n })(); (function() { function c(a, b) { var d, e = a.length; switch (e) { case 0: return !0; case 1: return a[0] === b[0]; case 2: return a[0] === b[0] && a[1] === b[1]; default: for (d = 0; d < e; d++) if (a[d] !== b[d]) return !1; return !0 } } function l(a, b) { return a.index - b.index } function n(a) { var b, d, e, g; 2 === a.length ? a[0].index > a[1].index && (b = a[0], a[0] = a[1], a[1] = b) : 2 < a.length && a.sort(l); a.length >= v.length && (v.length = a.length + 1); v[a.length] || (v[a.length] = []); g = v[a.length]; b = 0; for (d = g.length; b < d; b++) if (e = g[b], c(a, e)) return e; g.push(a); return a } function p(a, b) { this.b = a; this.Fn = {}; this.ul = {}; this.ej = !1; this.Nl = new ca; this.Ki = []; this.oi = []; this.name = b[0]; var d = b[1]; this.rd = []; var e, c; e = 0; for (c = d.length; e < c; e++) this.Pl(d[e], null, this.rd) } function u(a) { this.type = a; this.d = []; this.F = []; this.W = !0 } function r(a, b, d) { this.sheet = a; this.parent = b; this.b = a.b; this.S = []; this.Id = []; this.Ml = this.Zh = this.pk = this.jj = this.group = this.jk = !1; this.ra = []; this.ac = []; this.Wb = []; this.Ef = ""; this.Yd = this.jj = this.group = !1; this.Ig = null; d[1] && (this.Ef = d[1][1].toLowerCase(), this.group = !0, this.jj = !!d[1][0], this.Ig = [], this.Yd = this.jj, this.b.te.push(this), this.b.Ce[this.Ef] = this); this.Ob = d[2]; this.H = d[4]; this.group || (this.b.bl[this.H.toString()] = this); var e = d[5]; a = 0; for (b = e.length; a < b; a++) { var c = new Ob(this, e[a]); c.index = a; this.ra.push(c); this.Rk(c.type) } e = d[6]; a = 0; for (b = e.length; a < b; a++) c = new Pb(this, e[a]), c.index = a, this.ac.push(c); if (8 === d.length) for (d = d[7], a = 0, b = d.length; a < b; a++) this.sheet.Pl(d[a], this, this.Wb); this.fh = !1; this.ra.length && (this.fh = null == this.ra[0].type && this.ra[0].Ia == W.prototype.e.Yn) } function b(a, b) { var d, e, c; if (a && (-1 === b.indexOf(a) && b.push(a), a.jb)) for (d = 0, e = a.eb.length; d < e; d++) c = a.eb[d], a !== c && -1 === b.indexOf(c) && b.push(c) } function a(a, b) { this.qb = a; this.sheet = a.sheet; this.b = a.b; this.D = []; this.ea = []; this.J = {}; this.index = -1; this.jf = !1; this.Ia = this.b.gd(b[1]); this.trigger = 0 < b[3]; this.tl = 2 === b[3]; this.mj = b[5]; this.or = b[6]; this.H = b[7]; this.b.md[this.H.toString()] = this; - 1 === b[0] ? (this.type = null, this.na = this.ek, this.Od = null, this.fc = -1) : (this.type = this.b.j[b[0]], this.na = this.or ? this.bs : this.dk, b[2] ? (this.Od = this.type.Vg(b[2]), this.fc = this.type.Vi(b[2])) : (this.Od = null, this.fc = -1), this.qb.parent && this.qb.parent.Ph()); this.tl && (this.na = this.cs); if (10 === b.length) { var d, e, c = b[9]; d = 0; for (e = c.length; d < e; d++) { var g = new Qb(this, c[d]); this.D.push(g) } this.ea.length = c.length } } function h(a, b) { this.qb = a; this.sheet = a.sheet; this.b = a.b; this.D = []; this.ea = []; this.J = {}; this.index = -1; this.jf = !1; this.Ia = this.b.gd(b[1]); - 1 === b[0] ? (this.type = null, this.na = this.ek, this.Od = null, this.fc = -1) : (this.type = this.b.j[b[0]], this.na = this.dk, b[2] ? (this.Od = this.type.Vg(b[2]), this.fc = this.type.Vi(b[2])) : (this.Od = null, this.fc = -1)); this.H = b[3]; this.b.jd[this.H.toString()] = this; if (6 === b.length) { var d, e, c = b[5]; d = 0; for (e = c.length; d < e; d++) { var g = new Qb(this, c[d]); this.D.push(g) } this.ea.length = c.length } } function w() { m++; x.length === m && x.push(new Rb); return x[m] } function e(a, b) { this.Pb = a; this.qb = a.qb; this.sheet = a.sheet; this.b = a.b; this.type = b[0]; this.uc = null; this.Zc = 0; this.get = null; this.il = 0; this.Ca = null; this.key = 0; this.object = null; this.index = 0; this.yg = this.me = this.yg = this.me = this.yl = this.Wd = this.zg = null; this.$b = !1; var d, e, c; switch (b[0]) { case 0: case 7: this.uc = new Sb(this, b[1]); this.Zc = 0; this.get = this.Oq; break; case 1: this.uc = new Sb(this, b[1]); this.Zc = 0; this.get = this.Pq; break; case 5: this.uc = new Sb(this, b[1]); this.Zc = 0; this.get = this.Tq; break; case 3: case 8: this.il = b[1]; this.get = this.Mq; break; case 6: this.Ca = this.b.Dj[b[1]]; this.get = this.Uq; break; case 9: this.key = b[1]; this.get = this.Sq; break; case 4: this.object = this.b.j[b[1]]; this.get = this.Vq; this.qb.Rk(this.object); this.Pb instanceof Pb ? this.qb.Ph() : this.qb.parent && this.qb.parent.Ph(); break; case 10: this.index = b[1]; a.type && a.type.G ? (this.get = this.Qq, this.$b = !0) : this.get = this.Rq; break; case 11: this.zg = b[1]; this.Wd = null; this.get = this.Nq; break; case 2: case 12: this.yl = b[1]; this.get = this.Lq; break; case 13: for (this.get = this.Wq, this.me = [], this.yg = [], d = 1, e = b.length; d < e; d++) c = new Qb(this.Pb, b[d]), this.me.push(c), this.yg.push(0) } } function d(a, b, d) { this.sheet = a; this.parent = b; this.b = a.b; this.S = []; this.name = d[1]; this.Pn = d[2]; this.ij = d[3]; this.Mf = !!d[4]; this.eh = !!d[5]; this.H = d[6]; this.b.gf[this.H.toString()] = this; this.data = this.ij; this.parent ? (this.ie = this.Mf || this.eh ? -1 : this.b.ks++, this.b.bp.push(this)) : (this.ie = -1, this.b.$o.push(this)) } function f(a, b, d) { this.sheet = a; this.parent = b; this.b = a.b; this.S = []; this.Gf = null; this.cr = d[1]; this.pb = !0 } function g() { this.wn = []; this.reset(null) } var v = []; p.prototype.toString = function() { return this.name }; p.prototype.Pl = function(a, b, d) { switch (a[0]) { case 0: a = new Tb(this, b, a); if (a.Ob) for (d.push(a), d = 0, b = a.ra.length; d < b; d++) a.ra[d].trigger && this.Ql(a, d); else a.Xl() ? this.Ql(a, 0) : d.push(a); break; case 1: a = new Kb(this, b, a); d.push(a); break; case 2: a = new Ub(this, b, a), d.push(a) } }; p.prototype.ja = function() { var a, b; a = 0; for (b = this.rd.length; a < b; a++) this.rd[a].ja(a < b - 1 && this.rd[a + 1].fh) }; p.prototype.uk = function() { S(this.Ki); S(this.oi); this.Qk(this); S(this.oi) }; p.prototype.Qk = function(a) { var b, d, e, c, g = a.Ki, f = a.oi, h = this.Nl.Kd(); b = 0; for (d = h.length; b < d; ++b) e = h[b], c = e.Gf, !e.pb || a === c || -1 < f.indexOf(c) || (f.push(c), c.Qk(a), g.push(c)) }; p.prototype.na = function(a) { this.b.Yt || (this.ej = !0, a || (this.b.rj = !0)); var b, d; b = 0; for (d = this.rd.length; b < d; b++) { var e = this.rd[b]; e.na(); this.b.Ei(e.S); this.b.td && this.b.La() } a || (this.b.rj = !1) }; p.prototype.Ql = function(a, b) { a.Ob || this.b.bi.push(a); var d, e, c = a.ra[b], g; c.type ? g = c.type.name : g = "system"; var f = (d = c.tl) ? this.ul : this.Fn; f[g] || (f[g] = []); g = f[g]; f = c.Ia; if (d) { if (c.D.length && (c = c.D[0], 1 === c.type && 2 === c.uc.type)) { c = c.uc.value.toLowerCase(); d = 0; for (e = g.length; d < e; d++) if (g[d].method == f) { d = g[d].xf; d[c] ? d[c].push([a, b]) : d[c] = [ [a, b] ]; return } d = {}; d[c] = [ [a, b] ]; g.push({ method: f, xf: d }) } } else { d = 0; for (e = g.length; d < e; d++) if (g[d].method == f) { g[d].xf.push([a, b]); return } X && f === X.prototype.e.se ? g.unshift({ method: f, xf: [ [a, b] ] }) : g.push({ method: f, xf: [ [a, b] ] }) } }; Ab = p; u.prototype.dj = function() { return this.W ? this.type.d.length : this.d.length }; u.prototype.Lb = function() { return this.W ? this.type.d : this.d }; u.prototype.fg = function(a) { a && (a.b.Oa().Ua.Ob ? (this.W && (S(this.d), ya(this.F, a.type.d), this.W = !1), a = this.F.indexOf(a), -1 !== a && (this.d.push(this.F[a]), this.F.splice(a, 1))) : (this.W = !1, S(this.d), this.d[0] = a)) }; jb = u; window._c2hh_ = "E5CE65B5175F596D6611D685A1939D809E66DA07"; r.prototype.ja = function(a) { var b, d = this.parent; if (this.group) for (this.Zh = !0; d;) { if (!d.group) { this.Zh = !1; break } d = d.parent } this.pk = !this.Xl() && (!this.parent || this.parent.group && this.parent.Zh); this.Ml = !!a; this.Id = this.S.slice(0); for (d = this.parent; d;) { a = 0; for (b = d.S.length; a < b; a++) this.Yo(d.S[a]); d = d.parent } this.S = n(this.S); this.Id = n(this.Id); a = 0; for (b = this.ra.length; a < b; a++) this.ra[a].ja(); a = 0; for (b = this.ac.length; a < b; a++) this.ac[a].ja(); a = 0; for (b = this.Wb.length; a < b; a++) this.Wb[a].ja(a < b - 1 && this.Wb[a + 1].fh) }; r.prototype.Oh = function(a) { if (this.Yd !== !!a) { this.Yd = !!a; var b; a = 0; for (b = this.Ig.length; a < b; ++a) this.Ig[a].Ln(); 0 < b && this.b.R.Vd && this.b.R.Vd.uk() } }; r.prototype.Rk = function(a) { b(a, this.S) }; r.prototype.Yo = function(a) { b(a, this.Id) }; r.prototype.Ph = function() { this.jk = !0; this.parent && this.parent.Ph() }; r.prototype.Xl = function() { return this.ra.length ? this.ra[0].trigger : !1 }; r.prototype.na = function() { var a, b, d = !1, e = this.b, c = this.b.Oa(); c.Ua = this; var g = this.ra; this.fh || (c.Li = !1); if (this.Ob) { 0 === g.length && (d = !0); c.qa = 0; for (a = g.length; c.qa < a; c.qa++) b = g[c.qa], b.trigger || (b = b.na()) && (d = !0); (c.ee = d) && this.Mh() } else { c.qa = 0; for (a = g.length; c.qa < a; c.qa++) if (b = g[c.qa].na(), !b) { c.ee = !1; this.pk && e.td && e.La(); return } c.ee = !0; this.Mh() } this.Pp(c) }; r.prototype.Pp = function(a) { a.ee && this.Ml && (a.Li = !0); this.pk && this.b.td && this.b.La() }; r.prototype.$r = function(a) { this.b.Oa().Ua = this; this.ra[a].na() && (this.Mh(), this.b.Oa().ee = !0) }; r.prototype.Mh = function() { var a = this.b.Oa(), b; a.Eb = 0; for (b = this.ac.length; a.Eb < b; a.Eb++) if (this.ac[a.Eb].na()) return; this.dn() }; r.prototype.Yr = function() { var a = this.b.Oa(), b; for (b = this.ac.length; a.Eb < b; a.Eb++) if (this.ac[a.Eb].na()) return; this.dn() }; r.prototype.dn = function() { if (this.Wb.length) { var a, b, d, e, c = this.Wb.length - 1; this.b.Hh(this); if (this.jk) for (a = 0, b = this.Wb.length; a < b; a++) d = this.Wb[a], (e = !this.Zh || !this.group && a < c) && this.b.jg(d.S), d.na(), e ? this.b.Fd(d.S) : this.b.Ei(d.S); else for (a = 0, b = this.Wb.length; a < b; a++) this.Wb[a].na(); this.b.Eh() } }; r.prototype.as = function() { var a = this.b.Oa(); a.Ua = this; var b = !1, d; a.qa = 0; for (d = this.ra.length; a.qa < d; a.qa++) if (this.ra[a.qa].na()) b = !0; else if (!this.Ob) return !1; return this.Ob ? b : !0 }; r.prototype.Jh = function() { this.b.yf++; var a = this.b.Oa().qa, b = this.b.Hh(this); if (!this.Ob) for (b.qa = a + 1, a = this.ra.length; b.qa < a; b.qa++) if (!this.ra[b.qa].na()) { this.b.Eh(); return } this.Mh(); this.b.Eh() }; r.prototype.ir = function(a) { var b = a.index; if (0 === b) return !0; for (--b; 0 <= b; --b) if (this.ra[b].type === a.type) return !1; return !0 }; Tb = r; a.prototype.ja = function() { var a, b, d; a = 0; for (b = this.D.length; a < b; a++) d = this.D[a], d.ja(), d.$b && (this.jf = !0) }; a.prototype.cs = function() { return !0 }; a.prototype.ek = function() { var a, b; a = 0; for (b = this.D.length; a < b; a++) this.ea[a] = this.D[a].get(); return Pa(this.Ia.apply(this.b.Cc, this.ea), this.mj) }; a.prototype.bs = function() { var a, b; a = 0; for (b = this.D.length; a < b; a++) this.ea[a] = this.D[a].get(); a = this.Ia.apply(this.Od ? this.Od : this.type, this.ea); this.type.Fc(); return a }; a.prototype.dk = function() { var a, b, d, e, c, g, f, h, m = this.type, l = m.N(), v = this.qb.Ob && !this.trigger; b = 0; var p = m.jb, n = m.G, x = m.Nc, w = this.fc, r = -1 < w, u = this.jf, F = this.D, B = this.ea, H = this.mj, N = this.Ia, C; if (u) for (b = 0, c = F.length; b < c; ++b) g = F[b], g.$b || (B[b] = g.get(0)); else for (b = 0, c = F.length; b < c; ++b) B[b] = F[b].get(0); if (l.W) { S(l.d); S(l.F); C = m.d; a = 0; for (e = C.length; a < e; ++a) { h = C[a]; if (u) for (b = 0, c = F.length; b < c; ++b) g = F[b], g.$b && (B[b] = g.get(a)); r ? (b = 0, n && (b = h.type.ze[x]), b = N.apply(h.u[w + b], B)) : b = N.apply(h, B); (f = Pa(b, H)) ? l.d.push(h): v && l.F.push(h) } m.finish && m.finish(!0); l.W = !1; m.Fc(); return l.dj() } d = 0; C = (f = v && !this.qb.ir(this)) ? l.F : l.d; var A = !1; a = 0; for (e = C.length; a < e; ++a) { h = C[a]; if (u) for (b = 0, c = F.length; b < c; ++b) g = F[b], g.$b && (B[b] = g.get(a)); r ? (b = 0, n && (b = h.type.ze[x]), b = N.apply(h.u[w + b], B)) : b = N.apply(h, B); if (Pa(b, H)) if (A = !0, f) { if (l.d.push(h), p) for (b = 0, c = h.siblings.length; b < c; b++) g = h.siblings[b], g.type.N().d.push(g) } else { C[d] = h; if (p) for (b = 0, c = h.siblings.length; b < c; b++) g = h.siblings[b], g.type.N().d[d] = g; d++ } else if (f) { C[d] = h; if (p) for (b = 0, c = h.siblings.length; b < c; b++) g = h.siblings[b], g.type.N().F[d] = g; d++ } else if (v && (l.F.push(h), p)) for (b = 0, c = h.siblings.length; b < c; b++) g = h.siblings[b], g.type.N().F.push(g) } wa(C, d); if (p) for (n = m.eb, a = 0, e = n.length; a < e; a++) h = n[a].N(), f ? wa(h.F, d) : wa(h.d, d); d = A; if (f && !A) for (a = 0, e = l.d.length; a < e; a++) { h = l.d[a]; if (u) for (b = 0, c = F.length; b < c; b++) g = F[b], g.$b && (B[b] = g.get(a)); b = r ? N.apply(h.u[w], B) : N.apply(h, B); if (Pa(b, H)) { A = !0; break } } m.finish && m.finish(d || v); return v ? A : l.dj() }; Ob = a; h.prototype.ja = function() { var a, b, d; a = 0; for (b = this.D.length; a < b; a++) d = this.D[a], d.ja(), d.$b && (this.jf = !0) }; h.prototype.ek = function() { var a = this.b, b, d, e = this.D, c = this.ea; b = 0; for (d = e.length; b < d; ++b) c[b] = e[b].get(); return this.Ia.apply(a.Cc, c) }; h.prototype.dk = function() { var a = this.type, b = this.fc, d = a.Nc, e = this.jf, c = this.D, g = this.ea, f = this.Ia, h = a.N().Lb(), a = a.G, m = -1 < b, l, v, p, n, x, w; if (e) for (v = 0, n = c.length; v < n; ++v) x = c[v], x.$b || (g[v] = x.get(0)); else for (v = 0, n = c.length; v < n; ++v) g[v] = c[v].get(0); l = 0; for (p = h.length; l < p; ++l) { w = h[l]; if (e) for (v = 0, n = c.length; v < n; ++v) x = c[v], x.$b && (g[v] = x.get(l)); m ? (v = 0, a && (v = w.type.ze[d]), f.apply(w.u[b + v], g)) : f.apply(w, g) } return !1 }; Pb = h; var x = [], m = -1; e.prototype.ja = function() { var a, b; if (11 === this.type) this.Wd = this.b.Hl(this.zg, this.qb.parent); else if (13 === this.type) for (a = 0, b = this.me.length; a < b; a++) this.me[a].ja(); this.uc && this.uc.ja() }; e.prototype.yr = function(a) { this.$b || !a || a.Y.Sh || (this.$b = !0) }; e.prototype.pn = function() { this.$b = !0 }; e.prototype.Oq = function(a) { this.Zc = a || 0; a = w(); this.uc.get(a); m--; return a.data }; e.prototype.Pq = function(a) { this.Zc = a || 0; a = w(); this.uc.get(a); m--; return J(a.data) ? a.data : "" }; e.prototype.Vq = function() { return this.object }; e.prototype.Mq = function() { return this.il }; e.prototype.Tq = function(a) { this.Zc = a || 0; a = w(); this.uc.get(a); m--; return a.Ba() ? this.b.Pc(a.data) : this.b.Bf(a.data) }; e.prototype.Uq = function() { return this.Ca }; e.prototype.Sq = function() { return this.key }; e.prototype.Rq = function() { return this.index }; e.prototype.Qq = function(a) { a = a || 0; var b = this.Pb.type, d = null, d = b.N(), e = d.Lb(); if (e.length) d = e[a % e.length].type; else if (d.F.length) d = d.F[a % d.F.length].type; else if (b.d.length) d = b.d[a % b.d.length].type; else return 0; return this.index + d.Pg[b.Nc] }; e.prototype.Nq = function() { return this.Wd }; e.prototype.Lq = function() { return this.yl }; e.prototype.Wq = function() { var a, b; a = 0; for (b = this.me.length; a < b; a++) this.yg[a] = this.me[a].get(); return this.yg }; Qb = e; d.prototype.ja = function() { this.S = n(this.S) }; d.prototype.Qh = function(a) { var b = this.b.El(); this.parent && !this.Mf && b ? (this.ie >= b.length && (b.length = this.ie + 1), b[this.ie] = a) : this.data = a }; d.prototype.Kq = function() { var a = this.b.El(); return !this.parent || this.Mf || !a || this.eh ? this.data : this.ie >= a.length || "undefined" === typeof a[this.ie] ? this.ij : a[this.ie] }; d.prototype.na = function() { !this.parent || this.Mf || this.eh || this.Qh(this.ij) }; Kb = d; f.prototype.toString = function() { return "include:" + this.Gf.toString() }; f.prototype.ja = function() { this.Gf = this.b.Ni[this.cr]; this.sheet.Nl.add(this); this.S = n(this.S); for (var a = this.parent; a;) a.group && a.Ig.push(this), a = a.parent; this.Ln() }; f.prototype.na = function() { this.parent && this.b.ig(this.b.j); this.Gf.ej || this.Gf.na(!0); this.parent && this.b.Fd(this.b.j) }; f.prototype.Ln = function() { for (var a = this.parent; a;) { if (a.group && !a.Yd) { this.pb = !1; return } a = a.parent } this.pb = !0 }; Ub = f; g.prototype.reset = function(a) { this.Ua = a; this.Eb = this.qa = 0; S(this.wn); this.Li = this.ee = !1 }; g.prototype.jr = function() { return this.Ua.jk ? !0 : this.qa < this.Ua.ra.length - 1 ? !!this.Ua.S.length : !1 }; Jb = g })(); (function() { function c(b, a) { this.Pb = b; this.b = b.b; this.type = a[0]; this.get = [this.gq, this.bq, this.pq, this.sq, this.Rp, this.qq, this.kq, this.Zp, this.jq, this.oq, this.Sp, this.nq, this.$p, this.lq, this.hq, this.iq, this.cq, this.dq, this.Yp, this.rq, this.mq, this.fq, this.Xp, this.aq][this.type]; var c = null; this.Vc = this.D = this.ea = this.Ia = this.Yh = this.second = this.first = this.value = null; this.fc = -1; this.gc = null; this.On = -1; this.Wd = this.zg = null; this.Ve = !1; switch (this.type) { case 0: case 1: case 2: this.value = a[1]; break; case 3: this.first = new Sb(b, a[1]); break; case 18: this.first = new Sb(b, a[1]); this.second = new Sb(b, a[2]); this.Yh = new Sb(b, a[3]); break; case 19: this.Ia = this.b.gd(a[1]); this.Ia !== W.prototype.ka.random && this.Ia !== W.prototype.ka.kp || this.Pb.pn(); this.ea = []; this.D = []; 3 === a.length ? (c = a[2], this.ea.length = c.length + 1) : this.ea.length = 1; break; case 20: this.Vc = this.b.j[a[1]]; this.fc = -1; this.Ia = this.b.gd(a[2]); this.Ve = a[3]; Wb.Function && this.Ia === Wb.Function.prototype.ka.Is && this.Pb.pn(); a[4] ? this.gc = new Sb(b, a[4]) : this.gc = null; this.ea = []; this.D = []; 6 === a.length ? (c = a[5], this.ea.length = c.length + 1) : this.ea.length = 1; break; case 21: this.Vc = this.b.j[a[1]]; this.Ve = a[2]; a[3] ? this.gc = new Sb(b, a[3]) : this.gc = null; this.On = a[4]; break; case 22: this.Vc = this.b.j[a[1]]; this.Vc.Vg(a[2]); this.fc = this.Vc.Vi(a[2]); this.Ia = this.b.gd(a[3]); this.Ve = a[4]; a[5] ? this.gc = new Sb(b, a[5]) : this.gc = null; this.ea = []; this.D = []; 7 === a.length ? (c = a[6], this.ea.length = c.length + 1) : this.ea.length = 1; break; case 23: this.zg = a[1], this.Wd = null } this.Pb.yr(this.Vc); 4 <= this.type && 17 >= this.type && (this.first = new Sb(b, a[1]), this.second = new Sb(b, a[2])); if (c) { var l, e; l = 0; for (e = c.length; l < e; l++) this.D.push(new Sb(b, c[l])) } } function l() { ++r; u.length === r && u.push(new Rb); return u[r] } function n(b, a, c) { var l, e; l = 0; for (e = b.length; l < e; ++l) b[l].get(c), a[l + 1] = c.data } function p(b, a) { this.type = b || U.re; this.data = a || 0; this.ke = null; this.type == U.re && (this.data = Math.floor(this.data)) } c.prototype.ja = function() { 23 === this.type && (this.Wd = this.Pb.b.Hl(this.zg, this.Pb.qb.parent)); this.first && this.first.ja(); this.second && this.second.ja(); this.Yh && this.Yh.ja(); this.gc && this.gc.ja(); if (this.D) { var b, a; b = 0; for (a = this.D.length; b < a; b++) this.D[b].ja() } }; var u = [], r = -1; c.prototype.rq = function(b) { var a = this.D, c = this.ea; c[0] = b; b = l(); n(a, c, b); --r; this.Ia.apply(this.b.Cc, c) }; c.prototype.mq = function(b) { var a = this.Vc, c = this.ea, p = this.D, e = this.gc, d = this.Ia, f = this.Pb.Zc, g = a.N(), v = g.Lb(); if (!v.length) if (g.F.length) v = g.F; else { this.Ve ? b.$a("") : b.L(0); return } c[0] = b; b.ke = a; b = l(); n(p, c, b); e && (e.get(b), b.Ba() && (f = b.data, v = a.d)); --r; a = v.length; if (f >= a || f <= -a) f %= a; 0 > f && (f += a); d.apply(v[f], c) }; c.prototype.Xp = function(b) { var a = this.Vc, c = this.ea, p = this.D, e = this.gc, d = this.fc, f = this.Ia, g = this.Pb.Zc, v = a.N(), x = v.Lb(); if (!x.length) if (v.F.length) x = v.F; else { this.Ve ? b.$a("") : b.L(0); return } c[0] = b; b.ke = a; b = l(); n(p, c, b); e && (e.get(b), b.Ba() && (g = b.data, x = a.d)); --r; p = x.length; if (g >= p || g <= -p) g %= p; 0 > g && (g += p); g = x[g]; x = 0; a.G && (x = g.type.ze[a.Nc]); f.apply(g.u[d + x], c) }; c.prototype.fq = function(b) { var a = this.gc, c = this.Vc, p = this.On, e = this.Pb.Zc, d = c.N(), f = d.Lb(); if (!f.length) if (d.F.length) f = d.F; else { this.Ve ? b.$a("") : b.L(0); return } if (a) { d = l(); a.get(d); if (d.Ba()) { e = d.data; f = c.d; 0 !== f.length && (e %= f.length, 0 > e && (e += f.length)); e = c.Zi(e); c = e.ta[p]; J(c) ? b.$a(c) : b.n(c); --r; return }--r } a = f.length; if (e >= a || e <= -a) e %= a; 0 > e && (e += a); e = f[e]; f = 0; c.G && (f = e.type.Pg[c.Nc]); c = e.ta[p + f]; J(c) ? b.$a(c) : b.n(c) }; c.prototype.gq = function(b) { b.type = U.re; b.data = this.value }; c.prototype.bq = function(b) { b.type = U.qe; b.data = this.value }; c.prototype.pq = function(b) { b.type = U.String; b.data = this.value }; c.prototype.sq = function(b) { this.first.get(b); b.Ba() && (b.data = -b.data) }; c.prototype.Rp = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.Ba() && a.Ba() && (b.data += a.data, a.Fe() && b.Oe()); --r }; c.prototype.qq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.Ba() && a.Ba() && (b.data -= a.data, a.Fe() && b.Oe()); --r }; c.prototype.kq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.Ba() && a.Ba() && (b.data *= a.data, a.Fe() && b.Oe()); --r }; c.prototype.Zp = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.Ba() && a.Ba() && (b.data /= a.data, b.Oe()); --r }; c.prototype.jq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.Ba() && a.Ba() && (b.data %= a.data, a.Fe() && b.Oe()); --r }; c.prototype.oq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.Ba() && a.Ba() && (b.data = Math.pow(b.data, a.data), a.Fe() && b.Oe()); --r }; c.prototype.Sp = function(b) { this.first.get(b); var a = l(); this.second.get(a); a.He() || b.He() ? this.Up(b, a) : this.Tp(b, a); --r }; c.prototype.Up = function(b, a) { b.He() && a.He() ? this.Wp(b, a) : this.Vp(b, a) }; c.prototype.Wp = function(b, a) { b.data += a.data }; c.prototype.Vp = function(b, a) { b.He() ? b.data += (Math.round(1E10 * a.data) / 1E10).toString() : b.$a(b.data.toString() + a.data) }; c.prototype.Tp = function(b, a) { b.L(b.data && a.data ? 1 : 0) }; c.prototype.nq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.Ba() && a.Ba() && (b.data || a.data ? b.L(1) : b.L(0)); --r }; c.prototype.Yp = function(b) { this.first.get(b); b.data ? this.second.get(b) : this.Yh.get(b) }; c.prototype.$p = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.L(b.data === a.data ? 1 : 0); --r }; c.prototype.lq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.L(b.data !== a.data ? 1 : 0); --r }; c.prototype.hq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.L(b.data < a.data ? 1 : 0); --r }; c.prototype.iq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.L(b.data <= a.data ? 1 : 0); --r }; c.prototype.cq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.L(b.data > a.data ? 1 : 0); --r }; c.prototype.dq = function(b) { this.first.get(b); var a = l(); this.second.get(a); b.L(b.data >= a.data ? 1 : 0); --r }; c.prototype.aq = function(b) { var a = this.Wd.Kq(); D(a) ? b.n(a) : b.$a(a) }; Sb = c; p.prototype.Fe = function() { return this.type === U.qe }; p.prototype.Ba = function() { return this.type === U.re || this.type === U.qe }; p.prototype.He = function() { return this.type === U.String }; p.prototype.Oe = function() { this.Fe() || (this.He() && (this.data = parseFloat(this.data)), this.type = U.qe) }; p.prototype.L = function(b) { this.type = U.re; this.data = Math.floor(b) }; p.prototype.n = function(b) { this.type = U.qe; this.data = b }; p.prototype.$a = function(b) { this.type = U.String; this.data = b }; p.prototype.hs = function(b) { D(b) ? (this.type = U.qe, this.data = b) : J(b) ? (this.type = U.String, this.data = b.toString()) : (this.type = U.re, this.data = 0) }; Rb = p; U = { re: 0, qe: 1, String: 2 } })(); function W(c) { this.b = c; this.nb = [] } W.prototype.Ub = function() { var c = {}, l, n, p, u, r, b, a, h; c.waits = []; var w = c.waits, e; l = 0; for (n = this.nb.length; l < n; l++) { b = this.nb[l]; e = { t: b.time, st: b.js, s: b.tn, ev: b.wf.H, sm: [], sols: {} }; b.wf.ac[b.Eb] && (e.act = b.wf.ac[b.Eb].H); p = 0; for (u = b.S.length; p < u; p++) e.sm.push(b.S[p].H); for (r in b.mb) if (b.mb.hasOwnProperty(r)) { a = this.b.j[parseInt(r, 10)]; h = { sa: b.mb[r].en, insts: [] }; p = 0; for (u = b.mb[r].be.length; p < u; p++) h.insts.push(b.mb[r].be[p].uid); e.sols[a.H.toString()] = h } w.push(e) } return c }; W.prototype.xc = function(c) { c = c.waits; var l, n, p, u, r, b, a, h, w, e, d; S(this.nb); l = 0; for (n = c.length; l < n; l++) if (b = c[l], h = this.b.bl[b.ev.toString()]) { w = -1; p = 0; for (u = h.ac.length; p < u; p++) if (h.ac[p].H === b.act) { w = p; break } if (-1 !== w) { a = { mb: {}, S: [], ml: !1 }; a.time = b.t; a.js = b.st || ""; a.tn = !!b.s; a.wf = h; a.Eb = w; p = 0; for (u = b.sm.length; p < u; p++)(h = this.b.Xg(b.sm[p])) && a.S.push(h); for (r in b.sols) if (b.sols.hasOwnProperty(r) && (h = this.b.Xg(parseInt(r, 10)))) { w = b.sols[r]; e = { en: w.sa, be: [] }; p = 0; for (u = w.insts.length; p < u; p++)(d = this.b.Kl(w.insts[p])) && e.be.push(d); a.mb[h.index.toString()] = e } this.nb.push(a) } } }; (function() { function c() {} function l() {} function n() {} var p = W.prototype; c.prototype.Fk = function() { return !0 }; c.prototype.vo = function() { return !0 }; c.prototype.$n = function(b, a, c) { var l = this.b.Oa(), e = l.Ua, l = l.jr(); b = this.b.Vr(b); if (c < a) if (l) for (; a >= c && !b.qg; --a) this.b.jg(e.S), b.index = a, e.Jh(), this.b.Fd(e.S); else for (; a >= c && !b.qg; --a) b.index = a, e.Jh(); else if (l) for (; a <= c && !b.qg; ++a) this.b.jg(e.S), b.index = a, e.Jh(), this.b.Fd(e.S); else for (; a <= c && !b.qg; ++a) b.index = a, e.Jh(); this.b.Mr(); return !1 }; c.prototype.Zn = function(b) { var a = this.b.Dl(), c = a.J.Every_lastTime || 0, l = this.b.xb.aa; "undefined" === typeof a.J.Every_seconds && (a.J.Every_seconds = b); var e = a.J.Every_seconds; if (l >= c + e) return a.J.Every_lastTime = c + e, l >= a.J.Every_lastTime + .04 && (a.J.Every_lastTime = l), a.J.Every_seconds = b, !0; l < c - .1 && (a.J.Every_lastTime = l); return !1 }; c.prototype.fo = function(b) { return (b = this.b.Ce[b.toLowerCase()]) && b.Yd }; c.prototype.Yn = function() { var b = this.b.Oa(); return b.Li ? !1 : !b.ee }; c.prototype.Gk = function() { return !0 }; c.prototype.Bk = function() { return !0 }; c.prototype.ji = function() { return !0 }; c.prototype.Lk = function() { return !0 }; c.prototype.wo = function() { return !0 }; c.prototype.ii = function() { return !0 }; c.prototype.Rn = function(b, a, c) { return La(T(b), T(c)) <= T(a) }; c.prototype.eo = function(b, a) { return Na(T(b), T(a)) }; c.prototype.co = function(b, a, c) { b = Ja(b); a = Ja(a); c = Ja(c); return Na(c, a) ? Na(b, a) && !Na(b, c) : !(!Na(b, a) && Na(b, c)) }; p.e = new c; l.prototype.ao = function(b) { this.b.Nf || this.b.of || (this.b.of = b) }; l.prototype.Xn = function(b, a, c, l) { if (a && b && (a = this.b.jl(b, a, c, l))) { this.b.ic++; var e; this.b.trigger(Object.getPrototypeOf(b.Y).e.Dg, a); if (a.jb) for (c = 0, l = a.siblings.length; c < l; c++) e = a.siblings[c], this.b.trigger(Object.getPrototypeOf(e.type.Y).e.Dg, e); this.b.ic--; b = b.N(); b.W = !1; S(b.d); b.d[0] = a; if (a.jb) for (c = 0, l = a.siblings.length; c < l; c++) e = a.siblings[c], b = e.type.N(), b.W = !1, S(b.d), b.d[0] = e } }; l.prototype.Mo = function(b, a) { 0 === b.Pn ? D(a) ? b.Qh(a) : b.Qh(parseFloat(a)) : 1 === b.Pn && b.Qh(a.toString()) }; l.prototype.Io = function(b, a) { var c = this.b.Ce[b.toLowerCase()]; if (c) switch (a) { case 0: c.Oh(!1); break; case 1: c.Oh(!0); break; case 2: c.Oh(!c.Yd) } }; var u = [], r = []; l.prototype.Ro = function(b, a) { this.b.ol(0 === b ? "image/png" : "image/jpeg", a / 100) }; p.ga = new l; n.prototype["int"] = function(b, a) { J(a) ? (b.L(parseInt(a, 10)), isNaN(b.data) && (b.data = 0)) : b.L(a) }; n.prototype["float"] = function(b, a) { J(a) ? (b.n(parseFloat(a)), isNaN(b.data) && (b.data = 0)) : b.n(a) }; n.prototype.random = function(b, a, c) { void 0 === c ? b.n(Math.random() * a) : b.n(Math.random() * (c - a) + a) }; n.prototype.sqrt = function(b, a) { b.n(Math.sqrt(a)) }; n.prototype.abs = function(b, a) { b.n(Math.abs(a)) }; n.prototype.round = function(b, a) { b.L(Math.round(a)) }; n.prototype.floor = function(b, a) { b.L(Math.floor(a)) }; n.prototype.ceil = function(b, a) { b.L(Math.ceil(a)) }; n.prototype.sin = function(b, a) { b.n(Math.sin(T(a))) }; n.prototype.cos = function(b, a) { b.n(Math.cos(T(a))) }; n.prototype.tan = function(b, a) { b.n(Math.tan(T(a))) }; n.prototype.asin = function(b, a) { b.n(Da(Math.asin(a))) }; n.prototype.acos = function(b, a) { b.n(Da(Math.acos(a))) }; n.prototype.atan = function(b, a) { b.n(Da(Math.atan(a))) }; n.prototype.exp = function(b, a) { b.n(Math.exp(a)) }; n.prototype.log10 = function(b, a) { b.n(Math.log(a) / Math.LN10) }; n.prototype.max = function(b) { var a = arguments[1]; "number" !== typeof a && (a = 0); var c, l, e; c = 2; for (l = arguments.length; c < l; c++) e = arguments[c], "number" === typeof e && a < e && (a = e); b.n(a) }; n.prototype.min = function(b) { var a = arguments[1]; "number" !== typeof a && (a = 0); var c, l, e; c = 2; for (l = arguments.length; c < l; c++) e = arguments[c], "number" === typeof e && a > e && (a = e); b.n(a) }; n.prototype.xe = function(b) { b.n(this.b.xe) }; n.prototype.vg = function(b) { b.n(this.b.vg) }; n.prototype.time = function(b) { b.n(this.b.xb.aa) }; n.prototype.ad = function(b) { b.L(this.b.ad) }; n.prototype.xh = function(b) { b.L(this.b.xh) }; n.prototype.Si = function(b) { b.L(this.b.Si) }; n.prototype.tr = function(b, a) { var c, l; if (this.b.Zf.length) if (a) { for (l = this.b.$f; 0 <= l; --l) if (c = this.b.Zf[l], c.name === a) { b.L(c.index); return } b.L(0) } else c = this.b.Fl(), b.L(c ? c.index : -1); else b.L(0) }; n.prototype.rp = function(b, a, c, l, e) { b.n(Oa(a, c, l, e)) }; n.prototype.i = function(b, a, c, l, e) { b.n(Da(Ka(a, c, l, e))) }; n.prototype.pr = function(b, a, c, l) { b.n(Qa(a, c, l)) }; n.prototype.left = function(b, a, c) { b.$a(J(a) ? a.substr(0, c) : "") }; n.prototype.right = function(b, a, c) { b.$a(J(a) ? a.substr(a.length - c) : "") }; n.prototype.replace = function(b, a, c, l) { J(a) && J(c) && J(l) ? b.$a(a.replace(new RegExp(Za(c), "gi"), l)) : b.$a(J(a) ? a : "") }; n.prototype.trim = function(b, a) { b.$a(J(a) ? a.trim() : "") }; n.prototype.kp = function(b) { var a = M(Math.random() * (arguments.length - 1)); b.hs(arguments[a + 1]) }; n.prototype.Gi = function(b) { b.n(this.b.Gi / 1E3) }; n.prototype.Me = function(b) { b.n(this.b.Me) }; n.prototype.ip = function(b) { b.$a(this.b.ik) }; p.ka = new n; p.Zr = function() { var b, a, c, l, e, d, f = this.b.Oa(); b = 0; for (c = this.nb.length; b < c; b++) { l = this.nb[b]; if (-1 === l.time) { if (!l.tn) continue } else if (l.time > this.b.xb.aa) continue; f.Ua = l.wf; f.Eb = l.Eb; f.qa = 0; for (a in l.mb) l.mb.hasOwnProperty(a) && (e = this.b.j[parseInt(a, 10)].N(), d = l.mb[a], e.W = d.en, ya(e.d, d.be), e = d, S(e.be), r.push(e)); l.wf.Yr(); this.b.Ei(l.S); l.ml = !0 } a = b = 0; for (c = this.nb.length; b < c; b++) l = this.nb[b], this.nb[a] = l, l.ml ? (Sa(l.mb), S(l.S), u.push(l)) : a++; wa(this.nb, a) } })(); (function() { ib = function(c, n) { var p = c[1], u = c[3], r = c[4], b = c[5], a = c[6], h = c[7], w = c[8]; n.e || (n.e = {}); n.ga || (n.ga = {}); n.ka || (n.ka = {}); var e = n.e, d = n.ga, f = n.ka; u && (e.Ns = function(a, b) { return Vb(this.x, a, b) }, e.Os = function(a, b) { return Vb(this.y, a, b) }, e.Vs = function() { var a = this.g; this.pa(); var b = this.Fa; return !(b.right < a.O || b.bottom < a.P || b.left > a.U || b.top > a.T) }, e.Ws = function() { this.pa(); var a = this.Fa, b = this.b.R; return 0 > a.right || 0 > a.bottom || a.left > b.width || a.top > b.height }, e.it = function(a, b, d) { var e = this.N(), c = e.Lb(); if (!c.length) return !1; var f = c[0], h = f, l = Oa(f.x, f.y, b, d), p, n, r; p = 1; for (n = c.length; p < n; p++) if (f = c[p], r = Oa(f.x, f.y, b, d), 0 === a && r < l || 1 === a && r > l) l = r, h = f; e.fg(h); return !0 }, d.Po = function(a) { this.x !== a && (this.x = a, this.Aa()) }, d.Qo = function(a) { this.y !== a && (this.y = a, this.Aa()) }, d.Ko = function(a, b) { if (this.x !== a || this.y !== b) this.x = a, this.y = b, this.Aa() }, d.zt = function(a, b) { var d = a.Gq(this); if (d) { var e; d.Yi ? (e = d.Yi(b, !0), d = d.Yi(b, !1)) : (e = d.x, d = d.y); if (this.x !== e || this.y !== d) this.x = e, this.y = d, this.Aa() } }, d.bt = function(a) { 0 !== a && (this.x += Math.cos(this.i) * a, this.y += Math.sin(this.i) * a, this.Aa()) }, d.$s = function(a, b) { 0 !== b && (this.x += Math.cos(T(a)) * b, this.y += Math.sin(T(a)) * b, this.Aa()) }, f.Eg = function(a) { a.n(this.x) }, f.Fg = function(a) { a.n(this.y) }, f.xe = function(a) { a.n(this.b.Gl(this)) }); r && (e.Ms = function(a, b) { return Vb(this.width, a, b) }, e.Js = function(a, b) { return Vb(this.height, a, b) }, d.Oo = function(a) { this.width !== a && (this.width = a, this.Aa()) }, d.xt = function(a) { this.height !== a && (this.height = a, this.Aa()) }, d.Lo = function(a, b) { if (this.width !== a || this.height !== b) this.width = a, this.height = b, this.Aa() }, f.Et = function(a) { a.n(this.width) }, f.Rs = function(a) { a.n(this.height) }, f.Fs = function(a) { this.pa(); a.n(this.Fa.left) }, f.Hs = function(a) { this.pa(); a.n(this.Fa.top) }, f.Gs = function(a) { this.pa(); a.n(this.Fa.right) }, f.Es = function(a) { this.pa(); a.n(this.Fa.bottom) }); b && (e.Rn = function(a, b) { return La(this.i, T(b)) <= T(a) }, e.eo = function(a) { return Na(this.i, T(a)) }, e.co = function(a, b) { var d = Ja(a), e = Ja(b), c = Ha(this.i); return Na(e, d) ? Na(c, d) && !Na(c, e) : !(!Na(c, d) && Na(c, e)) }, d.qt = function(a) { a = T(Ea(a)); isNaN(a) || this.i === a || (this.i = a, this.Aa()) }, d.mt = function(a) { 0 === a || isNaN(a) || (this.i += T(a), this.i = Ha(this.i), this.Aa()) }, d.nt = function(a) { 0 === a || isNaN(a) || (this.i -= T(a), this.i = Ha(this.i), this.Aa()) }, d.ot = function(a, b) { var d = Ma(this.i, T(b), T(a)); isNaN(d) || this.i === d || (this.i = d, this.Aa()) }, d.pt = function(a, b, d) { a = Ma(this.i, Math.atan2(d - this.y, b - this.x), T(a)); isNaN(a) || this.i === a || (this.i = a, this.Aa()) }, d.At = function(a, b) { var d = Math.atan2(b - this.y, a - this.x); isNaN(d) || this.i === d || (this.i = d, this.Aa()) }, f.Ds = function(a) { a.n(Ia(this.i)) }); p || (e.Ks = function(a, b, d) { return Vb(this.ta[a], b, d) }, e.Ts = function(a) { return this.ta[a] }, e.jt = function(a, b) { var d = this.N(), e = d.Lb(); if (!e.length) return !1; var c = e[0], f = c, h = c.ta[b], l, p, n; l = 1; for (p = e.length; l < p; l++) if (c = e[l], n = c.ta[b], 0 === a && n < h || 1 === a && n > h) h = n, f = c; d.fg(f); return !0 }, e.ht = function(a) { var b, d, e, c, f; if (this.b.Dl().mj) { f = this.N(); if (f.W) for (f.W = !1, S(f.d), S(f.F), e = this.d, b = 0, d = e.length; b < d; b++) c = e[b], c.uid === a ? f.F.push(c) : f.d.push(c); else { e = b = 0; for (d = f.d.length; b < d; b++) c = f.d[b], f.d[e] = c, c.uid === a ? f.F.push(c) : e++; wa(f.d, e) } this.Fc(); return !!f.d.length } c = this.b.Kl(a); if (!c) return !1; f = this.N(); if (!f.W && -1 === f.d.indexOf(c)) return !1; if (this.G) for (a = c.type.Z, b = 0, d = a.length; b < d; b++) { if (a[b] === this) return f.fg(c), this.Fc(), !0 } else if (c.type === this) return f.fg(c), this.Fc(), !0; return !1 }, e.Dg = function() { return !0 }, e.oo = function() { return !0 }, d.Jo = function(a, b) { var d = this.ta; D(d[a]) ? d[a] = D(b) ? b : parseFloat(b) : J(d[a]) && (d[a] = J(b) ? b : b.toString()) }, d.Cs = function(a, b) { var d = this.ta; D(d[a]) ? d[a] = D(b) ? d[a] + b : d[a] + parseFloat(b) : J(d[a]) && (d[a] = J(b) ? d[a] + b : d[a] + b.toString()) }, d.Bt = function(a, b) { var d = this.ta; D(d[a]) && (d[a] = D(b) ? d[a] - b : d[a] - parseFloat(b)) }, d.tt = function(a, b) { this.ta[a] = b ? 1 : 0 }, d.Ct = function(a) { this.ta[a] = 1 - this.ta[a] }, d.Qs = function() { this.b.pe(this) }, d.jo || (d.jo = function(a) { var b, d; try { b = JSON.parse(a) } catch (e) { return } this.b.oh(this, b, !0); this.Ld && this.Ld(); if (this.u) for (a = 0, b = this.u.length; a < b; ++a) d = this.u[a], d.Ld && d.Ld() }), f.Ps = function(a) { var b = a.ke.d.length, d, e, c; d = 0; for (e = this.b.sc.length; d < e; d++) c = this.b.sc[d], a.ke.G ? 0 <= c.type.Z.indexOf(a.ke) && b++ : c.type === a.ke && b++; a.L(b) }, f.lt = function(a) { a.L(a.ke.N().Lb().length) }, f.Dt = function(a) { a.L(this.uid) }, f.Ss = function(a) { a.L(this.Df()) }, f.Tn || (f.Tn = function(a) { a.$a(JSON.stringify(this.b.fk(this, !0))) })); a && (e.Xs = function() { return this.visible }, d.No = function(a) { !a !== !this.visible && (this.visible = !!a, this.b.Q = !0) }, e.Ls = function(a, b) { return Vb(eb(100 * this.opacity), a, b) }, d.yt = function(a) { a = a / 100; 0 > a ? a = 0 : 1 < a && (a = 1); a !== this.opacity && (this.opacity = a, this.b.Q = !0) }, f.Opacity = function(a) { a.n(eb(100 * this.opacity)) }); h && (e.Us = function(a) { return a ? this.g === a : !1 }, e.kt = function(a) { var b = this.N(), d = b.Lb(); if (!d.length) return !1; var e = d[0], c = e, f, h; f = 1; for (h = d.length; f < h; f++) if (e = d[f], 0 === a) { if (e.g.index > c.g.index || e.g.index === c.g.index && e.vc() > c.vc()) c = e } else if (e.g.index < c.g.index || e.g.index === c.g.index && e.vc() < c.vc()) c = e; b.fg(c); return !0 }, d.et = function() { var a = this.g, b = a.d; b.length && b[b.length - 1] === this || (a.Ue(this, !1), a.lf(this, !1), this.b.Q = !0) }, d.ct = function() { var a = this.g, b = a.d; b.length && b[0] === this || (a.Ue(this, !1), a.Rr(this), this.b.Q = !0) }, d.dt = function(a) { a && a != this.g && (this.g.Ue(this, !0), this.g = a, a.lf(this, !0), this.b.Q = !0) }, d.Gt = function(a, b) { var d = 0 === a; if (b) { var e = b.Bq(this); e && e.uid !== this.uid && (this.g.index !== e.g.index && (this.g.Ue(this, !0), this.g = e.g, e.g.lf(this, !0)), this.g.Ar(this, e, d), this.b.Q = !0) } }, f.Zs = function(a) { a.L(this.g.Gm) }, f.Ys = function(a) { a.$a(this.g.name) }, f.Ft = function(a) { a.L(this.vc()) }); w && (d.ut = function(a, b) { if (this.b.m) { var d = this.type.Xi(b); if (!(0 > d)) { var e = 1 === a; this.hd[d] !== e && (this.hd[d] = e, this.oc(), this.b.Q = !0) } } }, d.wt = function(a, b, d) { if (this.b.m) { var e = this.type.Xi(a); 0 > e || (a = this.type.A[e], e = this.ca[e], b = Math.floor(b), 0 > b || b >= e.length || (1 === this.b.m.Jq(a.oa, b) && (d /= 100), e[b] !== d && (e[b] = d, a.pb && (this.b.Q = !0)))) } }) }; Bb = function() { this.Ai = this.ri = !0; this.type.Uk = !0; this.b.Q = !0; var c, n, p = this.si; c = 0; for (n = p.length; c < n; ++c) p[c](this); this.g.Db && this.pa() }; Cb = function(c) { c && this.si.push(c) }; Eb = function() { if (this.ri) { var c = this.Fa, n = this.Pd; c.set(this.x, this.y, this.x + this.width, this.y + this.height); c.offset(-this.hb * this.width, -this.ib * this.height); this.i ? (c.offset(-this.x, -this.y), n.qn(c, this.i), n.offset(this.x, this.y), n.cl(c)) : n.Rh(c); c.normalize(); this.ri = !1; this.us() } }; var c = new P(0, 0, 0, 0); Fb = function() { if (this.g.Db) { var l = this.g.Ka, n = this.Fa; c.set(l.Xa(n.left), l.Ya(n.top), l.Xa(n.right), l.Ya(n.bottom)); this.Za.vf(c) || (this.Za.right < this.Za.left ? l.update(this, null, c) : l.update(this, this.Za, c), this.Za.rf(c), this.g.mc = !0) } }; Gb = function() { if (this.Ai && this.pf) { this.pa(); var l = this.type.hl, n = this.Fa; c.set(l.Xa(n.left), l.Ya(n.top), l.Xa(n.right), l.Ya(n.bottom)); this.nd.vf(c) || (this.nd.right < this.nd.left ? l.update(this, null, c) : l.update(this, this.nd, c), this.nd.rf(c), this.Ai = !1) } }; Db = function(c, n) { return this.Fa.rb(c, n) && this.Pd.rb(c, n) ? this.rc && !this.rc.mr() ? (this.rc.hp(this.width, this.height, this.i), this.rc.rb(c - this.x, n - this.y)) : !0 : !1 }; xb = function() { this.type.ci(); return this.$d }; Hb = function() { this.g.wk(); return this.pc }; Ib = function() { S(this.K); var c, n, p, u = !0; c = 0; for (n = this.hd.length; c < n; c++) this.hd[c] && (p = this.type.A[c], this.K.push(p), p.kc || (u = !1)); this.Nn = !!this.K.length; this.Yc = u }; yb = function() { return "Inst" + this.Zm }; lb = function(c) { if (c && c.jb && c.type != this) { var n, p, u; n = 0; for (p = c.siblings.length; n < p; n++) if (u = c.siblings[n], u.type == this) return u } c = this.N().Lb(); return c.length ? c[0] : null }; mb = function(c) { var n = this.N().Lb(); return n.length ? n[c.Df() % n.length] : null }; kb = function() { if (this.Ze && !this.G) { var c, n; c = 0; for (n = this.d.length; c < n; c++) this.d[c].$d = c; var p = c, u = this.b.sc; c = 0; for (n = u.length; c < n; ++c) u[c].type === this && (u[c].$d = p++); this.Ze = !1 } }; vb = function(c) { if (c < this.d.length) return this.d[c]; c -= this.d.length; var n = this.b.sc, p, u; p = 0; for (u = n.length; p < u; ++p) if (n[p].type === this) { if (0 === c) return n[p]; --c } return null }; nb = function() { return this.$c[this.tc] }; ob = function() { this.tc++; this.tc === this.$c.length ? this.$c.push(new jb(this)) : (this.$c[this.tc].W = !0, S(this.$c[this.tc].F)) }; pb = function() { this.tc++; this.tc === this.$c.length && this.$c.push(new jb(this)); var c = this.$c[this.tc], n = this.$c[this.tc - 1]; n.W ? (c.W = !0, S(c.F)) : (c.W = !1, ya(c.d, n.d), ya(c.F, n.F)) }; qb = function() { this.tc-- }; rb = function(c) { var n, p, u, r, b, a = 0; if (!this.G) for (n = 0, p = this.Z.length; n < p; n++) for (b = this.Z[n], u = 0, r = b.ba.length; u < r; u++) { if (c === b.ba[u].name) return this.J.lastBehIndex = a, b.ba[u]; a++ } n = 0; for (p = this.ba.length; n < p; n++) { if (c === this.ba[n].name) return this.J.lastBehIndex = a, this.ba[n]; a++ } return null }; sb = function(c) { return this.Vg(c) ? this.J.lastBehIndex : -1 }; tb = function(c) { var n, p; n = 0; for (p = this.A.length; n < p; n++) if (this.A[n].name === c) return n; return -1 }; ub = function() { if (this.jb && !this.G) { var c, n, p, u, r, b, a; this.ci(); b = this.N(); var h = b.W, w = (c = this.b.Oa()) && c.Ua && c.Ua.Ob; c = 0; for (n = this.eb.length; c < n; c++) if (r = this.eb[c], r !== this && (r.ci(), a = r.N(), a.W = h, !h)) { S(a.d); p = 0; for (u = b.d.length; p < u; ++p) a.d[p] = r.Zi(b.d[p].$d); if (w) for (S(a.F), p = 0, u = b.F.length; p < u; ++p) a.F[p] = r.Zi(b.F[p].$d) } } }; wb = function() { return "Type" + this.H }; Vb = function(c, n, p) { if ("undefined" === typeof c || "undefined" === typeof p) return !1; switch (n) { case 0: return c === p; case 1: return c !== p; case 2: return c < p; case 3: return c <= p; case 4: return c > p; case 5: return c >= p; default: return !1 } } })(); var dc = {}; function Y(c) { this.b = c } (function() { function c() {} function l() {} var n = Y.prototype; n.ob = function(c) { this.Y = c; this.b = c.b }; n.ob.prototype.da = function() {}; n.Ta = function(c) { this.type = c; this.b = c.b }; n.Ta.prototype.da = function() { var c = this; window.addEventListener("resize", function() { c.b.trigger(Y.prototype.e.Co, c) }); "undefined" !== typeof navigator.onLine && (window.addEventListener("online", function() { c.b.trigger(Y.prototype.e.yo, c) }), window.addEventListener("offline", function() { c.b.trigger(Y.prototype.e.xo, c) })); "undefined" !== typeof window.applicationCache && (window.applicationCache.addEventListener("updateready", function() { c.b.Me = 1; c.b.trigger(Y.prototype.e.Mk, c) }), window.applicationCache.addEventListener("progress", function(l) { c.b.Me = l.loaded / l.total || 0 })); this.b.Qc || (document.addEventListener("appMobi.device.update.available", function() { c.b.trigger(Y.prototype.e.Mk, c) }), document.addEventListener("backbutton", function() { c.b.trigger(Y.prototype.e.Cg, c) }), document.addEventListener("menubutton", function() { c.b.trigger(Y.prototype.e.Hk, c) }), document.addEventListener("searchbutton", function() { c.b.trigger(Y.prototype.e.Do, c) }), document.addEventListener("tizenhwkey", function(l) { var n; switch (l.keyName) { case "back": n = c.b.trigger(Y.prototype.e.Cg, c); !n && window.tizen && window.tizen.application.getCurrentApplication().exit(); break; case "menu": (n = c.b.trigger(Y.prototype.e.Hk, c)) || l.preventDefault() } })); this.b.vj && "undefined" !== typeof Windows ? Windows.UI.Core.SystemNavigationManager.getForCurrentView().addEventListener("backrequested", function(l) { c.b.trigger(Y.prototype.e.Cg, c) && (l.$g = !0) }) : this.b.uj && WinJS.Application && (WinJS.Application.onbackclick = function() { return !!c.b.trigger(Y.prototype.e.Cg, c) }); this.b.Zo(function(l) { l ? c.b.trigger(Y.prototype.e.zo, c) : c.b.trigger(Y.prototype.e.Ao, c) }) }; c.prototype.yo = function() { return !0 }; c.prototype.xo = function() { return !0 }; c.prototype.Mk = function() { return !0 }; c.prototype.Ao = function() { return !0 }; c.prototype.zo = function() { return !0 }; c.prototype.Co = function() { return !0 }; c.prototype.Cg = function() { return !0 }; c.prototype.Hk = function() { return !0 }; c.prototype.Do = function() { return !0 }; n.e = new c; l.prototype.bo = function(c, l) { var n = document.createElement("a"); if ("undefined" === typeof n.download) window.open(c); else { var b = document.getElementsByTagName("body")[0]; $('.btn-share').show(); n.textContent = l; n.href = c; n.download = l; b.appendChild(n); var a = new MouseEvent("click"); n.dispatchEvent(a); b.removeChild(n); console.log(n); var data = n; var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { // request complete if (xhr.readyState == 4) { window.open('/juegosHome/coloring-game/demo/img-guardadas/snapshots/'+xhr.responseText,'_blank'); } //console.log(xhr.responseText); } xhr.open('POST','/juegosHome/coloring-game/demo/img-guardadas/snapshot.php',true); xhr.setRequestHeader('Content-Type', 'application/upload'); xhr.send(data); } }; n.ga = new l; n.ka = new function() {} })(); function fc(c) { this.b = c } (function() { function c() {} var l = fc.prototype; l.ob = function(c) { this.Y = c; this.b = c.b }; l.ob.prototype.da = function() {}; l.Ta = function(c) { this.type = c; this.b = c.b; this.Pf = Array(256); this.xg = Array(256); this.cd = 0 }; var n = l.Ta.prototype; n.da = function() { var c = this; this.b.la || (jQuery(document).keydown(function(l) { c.Fr(l) }), jQuery(document).keyup(function(l) { c.Gr(l) })) }; var p = [32, 33, 34, 35, 36, 37, 38, 39, 40, 44]; n.Fr = function(c) { var l = !1; window != window.top && -1 < p.indexOf(c.which) && (c.preventDefault(), l = !0, c.stopPropagation()); if (this.Pf[c.which]) this.xg[c.which] && !l && c.preventDefault(); else { this.Pf[c.which] = !0; this.cd = c.which; this.b.ua = !0; this.b.trigger(fc.prototype.e.no, this); var b = this.b.trigger(fc.prototype.e.to, this), a = this.b.trigger(fc.prototype.e.uo, this); this.b.ua = !1; if (b || a) this.xg[c.which] = !0, l || c.preventDefault() } }; n.Gr = function(c) { this.Pf[c.which] = !1; this.cd = c.which; this.b.ua = !0; this.b.trigger(fc.prototype.e.Ak, this); var l = this.b.trigger(fc.prototype.e.Ek, this), b = this.b.trigger(fc.prototype.e.Dk, this); this.b.ua = !1; if (l || b || this.xg[c.which]) this.xg[c.which] = !0, c.preventDefault() }; n.Re = function() { var c; for (c = 0; 256 > c; ++c) if (this.Pf[c]) { this.Pf[c] = !1; this.cd = c; this.b.trigger(fc.prototype.e.Ak, this); var l = this.b.trigger(fc.prototype.e.Ek, this), b = this.b.trigger(fc.prototype.e.Dk, this); if (l || b) this.xg[c] = !0 } }; n.Ub = function() { return { triggerKey: this.cd } }; n.xc = function(c) { this.cd = c.triggerKey }; c.prototype.to = function(c) { return c === this.cd }; c.prototype.no = function() { return !0 }; c.prototype.Ak = function() { return !0 }; c.prototype.Ek = function(c) { return c === this.cd }; c.prototype.uo = function(c) { return c === this.cd }; c.prototype.Dk = function(c) { return c === this.cd }; l.e = new c; l.ga = new function() {}; l.ka = new function() {} })(); function gc(c) { this.b = c } (function() { function c() {} function l() {} var n = gc.prototype; n.ob = function(c) { this.Y = c; this.b = c.b }; n.ob.prototype.da = function() {}; n.Ta = function(c) { this.type = c; this.b = c.b; this.ti = Array(4); this.Dn = this.$h = this.cf = this.Dd = this.Cd = 0; this.$g = !1 }; var p = n.Ta.prototype; p.da = function() { var c = this; if (!this.b.la) { jQuery(document).mousemove(function(a) { c.Pj(a) }); jQuery(document).mousedown(function(a) { c.Oj(a) }); jQuery(document).mouseup(function(a) { c.Qj(a) }); jQuery(document).dblclick(function(a) { c.Er(a) }); var b = function(a) { c.Ir(a) }; document.addEventListener("mousewheel", b, !1); document.addEventListener("DOMMouseScroll", b, !1) } }; var u = { left: 0, top: 0 }; p.Pj = function(c) { var b = this.b.la ? u : jQuery(this.b.canvas).offset(); this.Cd = c.pageX - b.left; this.Dd = c.pageY - b.top }; p.Bm = function() { return 0 < this.b.Va ? !0 : 0 <= this.Cd && 0 <= this.Dd && this.Cd < this.b.width && this.Dd < this.b.height }; p.Oj = function(c) { this.Bm() && (this.ti[c.which] = !0, this.b.ua = !0, this.b.trigger(gc.prototype.e.mo, this), this.cf = c.which - 1, this.$h = 0, this.b.trigger(gc.prototype.e.Ck, this), this.b.trigger(gc.prototype.e.Kk, this), this.b.ua = !1) }; p.Qj = function(c) { this.ti[c.which] && (this.b.Yg && !this.b.Sc && c.preventDefault(), this.b.Yg = !0, this.ti[c.which] = !1, this.b.ua = !0, this.cf = c.which - 1, this.b.trigger(gc.prototype.e.Bo, this), this.b.ua = !1) }; p.Er = function(c) { this.Bm() && (c.preventDefault(), this.b.ua = !0, this.cf = c.which - 1, this.$h = 1, this.b.trigger(gc.prototype.e.Ck, this), this.b.trigger(gc.prototype.e.Kk, this), this.b.ua = !1) }; p.Ir = function(c) { this.Dn = 0 > (c.wheelDelta ? c.wheelDelta : c.detail ? -c.detail : 0) ? 0 : 1; this.$g = !1; this.b.ua = !0; this.b.trigger(gc.prototype.e.Go, this); this.b.ua = !1; this.$g && gb(c) && c.preventDefault() }; c.prototype.Ck = function(c, b) { return c === this.cf && b === this.$h }; c.prototype.mo = function() { return !0 }; c.prototype.Bo = function(c) { return c === this.cf }; c.prototype.Kk = function(c, b, a) { return c !== this.cf || b !== this.$h ? !1 : this.b.tg(a, this.Cd, this.Dd) }; c.prototype.Go = function(c) { this.$g = !0; return c === this.Dn }; n.e = new c; n.ga = new function() {}; l.prototype.Eg = function(c, b) { var a, h, l, e, d; fa(b) ? (a = this.b.Pc(0), h = a.scale, l = a.bb, e = a.Qb, d = a.i, a.scale = 1, a.bb = 1, a.Qb = 1, a.i = 0, c.n(a.ia(this.Cd, this.Dd, !0)), a.scale = h, a.bb = l, a.Qb = e, a.i = d) : (a = D(b) ? this.b.Pc(b) : this.b.Bf(b)) ? c.n(a.ia(this.Cd, this.Dd, !0)) : c.n(0) }; l.prototype.Fg = function(c, b) { var a, h, l, e, d; fa(b) ? (a = this.b.Pc(0), h = a.scale, l = a.bb, e = a.Rb, d = a.i, a.scale = 1, a.bb = 1, a.Rb = 1, a.i = 0, c.n(a.ia(this.Cd, this.Dd, !1)), a.scale = h, a.bb = l, a.Rb = e, a.i = d) : (a = D(b) ? this.b.Pc(b) : this.b.Bf(b)) ? c.n(a.ia(this.Cd, this.Dd, !1)) : c.n(0) }; n.ka = new l })(); function X(c) { this.b = c } (function() { function c() { if (0 === this.Ji.length) { var a = document.createElement("canvas"); a.width = this.width; a.height = this.height; var b = a.getContext("2d"); this.Ye ? b.drawImage(this.Ea, this.Pe, this.Qe, this.width, this.height, 0, 0, this.width, this.height) : b.drawImage(this.Ea, 0, 0, this.width, this.height); this.Ji = a.toDataURL("image/png"); } return this.Ji } function l() {} function n() {} function p() {} var u = X.prototype; u.ob = function(a) { this.Y = a; this.b = a.b }; var r = u.ob.prototype; r.da = function() { if (!this.G) { var a, b, f, g, h, l, m, k, q; this.cc = []; this.Ff = !1; a = 0; for (b = this.cb.length; a < b; a++) { h = this.cb[a]; m = {}; m.name = h[0]; m.speed = h[1]; m.loop = h[2]; m.bk = h[3]; m.ck = h[4]; m.Sm = h[5]; m.H = h[6]; m.frames = []; f = 0; for (g = h[7].length; f < g; f++) l = h[7][f], k = {}, k.zn = l[0], k.An = l[1], k.Pe = l[2], k.Qe = l[3], k.width = l[4], k.height = l[5], k.duration = l[6], k.hb = l[7], k.ib = l[8], k.gj = l[9], k.Dh = l[10], k.Tm = l[11], k.Ye = 0 !== k.width, k.Ji = "", k.Mt = c, q = { left: 0, top: 0, right: 1, bottom: 1 }, k.hk = q, k.ed = null, (q = this.b.wq(l[0])) ? k.Ea = q : (k.Ea = new Image, k.Ea.np = l[0], k.Ea.mp = l[1], k.Ea.gp = null, this.b.zs(k.Ea, l[0])), m.frames.push(k), this.cc.push(k); this.cb[a] = m } } }; r.Mn = function() { var a, b, c; a = 0; for (b = this.d.length; a < b; a++) c = this.d[a], c.Kg = c.Ga.ed }; r.Nj = function() { if (!this.G) { var a, b, c; a = 0; for (b = this.cc.length; a < b; ++a) c = this.cc[a], c.Ea.gp = null, c.ed = null; this.Ff = !1; this.Mn() } }; r.Mm = function() { if (!this.G && this.d.length) { var a, b, c; a = 0; for (b = this.cc.length; a < b; ++a) c = this.cc[a], c.ed = this.b.m.fm(c.Ea, this.b.I, c.Tm); this.Mn() } }; r.rr = function() { if (!this.G && !this.Ff && this.b.m) { var a, b, c; a = 0; for (b = this.cc.length; a < b; ++a) c = this.cc[a], c.ed = this.b.m.fm(c.Ea, this.b.I, c.Tm); this.Ff = !0 } }; r.Jn = function() { if (!this.G && !this.d.length && this.Ff) { var a, b, c; a = 0; for (b = this.cc.length; a < b; ++a) c = this.cc[a], this.b.m.deleteTexture(c.ed), c.ed = null; this.Ff = !1 } }; var b = []; r.Wm = function(a) { var c, f, g; S(b); c = 0; for (f = this.cc.length; c < f; ++c) g = this.cc[c].Ea, -1 === b.indexOf(g) && (a.drawImage(g, 0, 0), b.push(g)) }; u.Ta = function(a) { this.type = a; this.b = a.b; a = this.type.cb[0].frames[0].Dh; this.Sb ? this.rc.mg(a) : this.rc = new $a(a) }; var a = u.Ta.prototype; a.da = function() { this.visible = 0 === this.Ra[0]; this.hj = this.sj = !1; this.pf = 0 !== this.Ra[3]; this.X = this.Cl(this.Ra[1]) || this.type.cb[0]; this.p = this.Ra[2]; 0 > this.p && (this.p = 0); this.p >= this.X.frames.length && (this.p = this.X.frames.length - 1); var a = this.X.frames[this.p]; this.rc.mg(a.Dh); this.hb = a.hb; this.ib = a.ib; this.ue = this.X.speed; this.pd = this.X.ck; 1 === this.type.cb.length && 1 === this.type.cb[0].frames.length || 0 === this.ue || (this.b.nk(this), this.sj = !0); this.Sb ? this.qc.reset() : this.qc = new Ya; this.Oc = this.qc.aa; this.Nd = !0; this.Ec = 0; this.Md = !0; this.Di = this.Sk = ""; this.jp = 0; this.Hg = -1; this.type.rr(); var b, c, g, h, l, m, k, a = 0; for (b = this.type.cb.length; a < b; a++) for (h = this.type.cb[a], c = 0, g = h.frames.length; c < g; c++) l = h.frames[c], 0 === l.width && (l.width = l.Ea.width, l.height = l.Ea.height), l.Ye && (k = l.Ea, m = l.hk, m.left = l.Pe / k.width, m.top = l.Qe / k.height, m.right = (l.Pe + l.width) / k.width, m.bottom = (l.Qe + l.height) / k.height, 0 === l.Pe && 0 === l.Qe && l.width === k.width && l.height === k.height && (l.Ye = !1)); this.Ga = this.X.frames[this.p]; this.Kg = this.Ga.ed }; a.Ub = function() { var a = { a: this.X.H, f: this.p, cas: this.ue, fs: this.Oc, ar: this.Ec, at: this.qc.aa, rt: this.pd }; this.Nd || (a.ap = this.Nd); this.Md || (a.af = this.Md); return a }; a.xc = function(a) { var b = this.zq(a.a); b && (this.X = b); this.p = a.f; 0 > this.p && (this.p = 0); this.p >= this.X.frames.length && (this.p = this.X.frames.length - 1); this.ue = a.cas; this.Oc = a.fs; this.Ec = a.ar; this.qc.reset(); this.qc.aa = a.at; this.Nd = a.hasOwnProperty("ap") ? a.ap : !0; this.Md = a.hasOwnProperty("af") ? a.af : !0; a.hasOwnProperty("rt") ? this.pd = a.rt : this.pd = this.X.ck; this.Ga = this.X.frames[this.p]; this.Kg = this.Ga.ed; this.rc.mg(this.Ga.Dh); this.hb = this.Ga.hb; this.ib = this.Ga.ib }; a.pi = function(a) { this.p = a ? 0 : this.X.frames.length - 1; this.Nd = !1; this.Sk = this.X.name; this.hj = !0; this.b.trigger(X.prototype.e.lo, this); this.b.trigger(X.prototype.e.ko, this); this.hj = !1; this.Ec = 0 }; a.qi = function() { return this.qc.aa }; a.ne = function() { this.qc.add(this.b.Gl(this)); this.Di.length && this.sp(); 0 <= this.Hg && this.pl(); var a = this.qc.aa, b = this.X, c = b.frames[this.p], g = c.duration / this.ue; this.Nd && a >= this.Oc + g && (this.Md ? this.p++ : this.p--, this.Oc += g, this.p >= b.frames.length && (b.Sm ? (this.Md = !1, this.p = b.frames.length - 2) : b.loop ? this.p = this.pd : (this.Ec++, this.Ec >= b.bk ? this.pi(!1) : this.p = this.pd)), 0 > this.p && (b.Sm ? (this.p = 1, this.Md = !0, b.loop || (this.Ec++, this.Ec >= b.bk && this.pi(!0))) : b.loop ? this.p = this.pd : (this.Ec++, this.Ec >= b.bk ? this.pi(!0) : this.p = this.pd)), 0 > this.p ? this.p = 0 : this.p >= b.frames.length && (this.p = b.frames.length - 1), a > this.Oc + b.frames[this.p].duration / this.ue && (this.Oc = a), a = b.frames[this.p], this.se(c, a), this.b.Q = !0) }; a.Cl = function(a) { var b, c, g; b = 0; for (c = this.type.cb.length; b < c; b++) if (g = this.type.cb[b], fb(g.name, a)) return g; return null }; a.zq = function(a) { var b, c, g; b = 0; for (c = this.type.cb.length; b < c; b++) if (g = this.type.cb[b], g.H === a) return g; return null }; a.sp = function() { var a = this.X.frames[this.p], b = this.Cl(this.Di); this.Di = ""; !b || fb(b.name, this.X.name) && this.Nd || (this.X = b, this.ue = b.speed, this.pd = b.ck, 0 > this.p && (this.p = 0), this.p >= this.X.frames.length && (this.p = this.X.frames.length - 1), 1 === this.jp && (this.p = 0), this.Nd = !0, this.Oc = this.qc.aa, this.Md = !0, this.se(a, this.X.frames[this.p]), this.b.Q = !0) }; a.pl = function() { var a = this.X.frames[this.p], b = this.p; this.p = M(this.Hg); 0 > this.p && (this.p = 0); this.p >= this.X.frames.length && (this.p = this.X.frames.length - 1); b !== this.p && (this.se(a, this.X.frames[this.p]), this.Oc = this.qc.aa, this.b.Q = !0); this.Hg = -1 }; a.se = function(a, b) { var c = a.width, g = a.height, h = b.width, l = b.height; c != h && (this.width *= h / c); g != l && (this.height *= l / g); this.hb = b.hb; this.ib = b.ib; this.rc.mg(b.Dh); this.Aa(); this.Ga = b; this.Kg = b.ed; c = 0; for (g = this.u.length; c < g; c++) h = this.u[c], h.Hr && h.Hr(a, b); this.b.trigger(X.prototype.e.se, this) }; a.Lc = function(a) { a.globalAlpha = this.opacity; var b = this.Ga, c = b.Ye, g = b.Ea, h = this.x, l = this.y, m = this.width, k = this.height; if (0 === this.i && 0 <= m && 0 <= k) h -= this.hb * m, l -= this.ib * k, this.b.Xc && (h = Math.round(h), l = Math.round(l)), c ? a.drawImage(g, b.Pe, b.Qe, b.width, b.height, h, l, m, k) : a.drawImage(g, h, l, m, k); else { this.b.Xc && (h = Math.round(h), l = Math.round(l)); a.save(); var q = 0 < m ? 1 : -1, n = 0 < k ? 1 : -1; a.translate(h, l); 1 === q && 1 === n || a.scale(q, n); a.rotate(this.i * q * n); h = 0 - this.hb * ka(m); l = 0 - this.ib * ka(k); c ? a.drawImage(g, b.Pe, b.Qe, b.width, b.height, h, l, ka(m), ka(k)) : a.drawImage(g, h, l, ka(m), ka(k)); a.restore() } }; a.we = function(a) { this.Kb(a) }; a.Kb = function(a) { a.zb(this.Kg); a.We(this.opacity); var b = this.Ga, c = this.Pd; if (this.b.Xc) { var g = Math.round(this.x) - this.x, h = Math.round(this.y) - this.y; b.Ye ? a.Gd(c.Ab + g, c.Bb + h, c.Yb + g, c.Zb + h, c.Hb + g, c.Ib + h, c.Fb + g, c.Gb + h, b.hk) : a.kg(c.Ab + g, c.Bb + h, c.Yb + g, c.Zb + h, c.Hb + g, c.Ib + h, c.Fb + g, c.Gb + h) } else b.Ye ? a.Gd(c.Ab, c.Bb, c.Yb, c.Zb, c.Hb, c.Ib, c.Fb, c.Gb, b.hk) : a.kg(c.Ab, c.Bb, c.Yb, c.Zb, c.Hb, c.Ib, c.Fb, c.Gb) }; a.Dq = function(a) { var b = this.Ga, c, h; c = 0; for (h = b.gj.length; c < h; c++) if (fb(a, b.gj[c][0])) return c; return -1 }; a.Yi = function(a, b) { var c = this.Ga, h = c.gj, l; J(a) ? l = this.Dq(a) : l = a - 1; l = M(l); if (0 > l || l >= h.length) return b ? this.x : this.y; var n = (h[l][1] - c.hb) * this.width, h = h[l][2], h = (h - c.ib) * this.height, c = Math.cos(this.i); l = Math.sin(this.i); var m = n * c - h * l, h = h * c + n * l, n = m + this.x, h = h + this.y; return b ? n : h }; var h = new ca, w = !1; new P(0, 0, 0, 0); r.finish = function(a) { if (w) { if (a) { var b = this.b.Oa().Ua.Ob; a = null.N(); var c = h.Kd(), g, l; if (a.W) { a.W = !1; S(a.d); g = 0; for (l = c.length; g < l; ++g) a.d[g] = c[g]; if (b) for (S(a.F), g = 0, l = null.d.length; g < l; ++g) c = null.d[g], h.contains(c) || a.F.push(c) } else if (b) for (b = a.d.length, g = 0, l = c.length; g < l; ++g) a.d[b + g] = c[g], Ba(a.F, c[g]); else ya(a.d, c); null.Fc() } h.clear(); w = !1 } }; l.prototype.ko = function(a) { return fb(this.Sk, a) }; l.prototype.lo = function() { return !0 }; l.prototype.se = function() { return !0 }; u.e = new l; n.prototype.Ho = function(a) { this.Hg = a; this.sj || (this.b.nk(this), this.sj = !0); this.hj || this.pl() }; u.ga = new n; p.prototype.Sn = function(a) { a.L(this.p) }; u.ka = new p })(); function hc(c) { this.b = c } (function() { function c() { return b.length ? b.pop() : {} } function l(a) { var c, l; c = 0; for (l = a.length; c < l; c++) b.push(a[c]); S(a) } function n(a) { return a.length && " " === a.charAt(a.length - 1) ? a.substring(0, a.length - 1) : a } var p = hc.prototype; p.da = function() { p.ga.Oo = function(a) { this.width !== a && (this.width = a, this.bf = !0, this.Aa()) } }; p.ob = function(a) { this.Y = a; this.b = a.b }; var u = p.ob.prototype; u.da = function() {}; u.Nj = function() { if (!this.G) { var a, b, c; a = 0; for (b = this.d.length; a < b; a++) c = this.d[a], c.yc = null, c.je = null, c.kb = null } }; p.Ta = function(a) { this.type = a; this.b = a.b; this.Sb ? S(this.yd) : this.yd = []; this.bf = !0 }; u = p.Ta.prototype; u.da = function() { this.text = this.Ra[0]; this.visible = 0 === this.Ra[1]; this.font = this.Ra[2]; this.color = this.Ra[3]; this.Zg = this.Ra[4]; this.ei = this.Ra[5]; this.yk = 0 === this.Ra[7]; this.Aj = this.kh = this.width; this.ih = this.height; this.Ej = this.Ra[8]; this.Sg = this.ye = ""; this.xn = this.yn = this.hg = 0; this.Jr(); this.kb = this.je = this.yc = null; this.Em = !1; this.Rf = this.b.ad; this.Sb ? this.Te.set(0, 0, 1, 1) : this.Te = new P(0, 0, 1, 1); this.b.m && this.b.nk(this) }; u.Jr = function() { var a = this.font.split(" "), b; for (b = 0; b < a.length; b++) if ("pt" === a[b].substr(a[b].length - 2, 2)) { this.hg = parseInt(a[b].substr(0, a[b].length - 2)); this.Yj = Math.ceil(this.hg / 72 * 96) + 4; 0 < b && (this.Sg = a[b - 1]); this.ye = a[b + 1]; for (b += 2; b < a.length; b++) this.ye += " " + a[b]; break } }; u.Ub = function() { return { t: this.text, f: this.font, c: this.color, ha: this.Zg, va: this.ei, wr: this.yk, lho: this.Ej, fn: this.ye, fs: this.Sg, ps: this.hg, pxh: this.Yj, tw: this.yn, th: this.xn, lrt: this.Rf } }; u.xc = function(a) { this.text = a.t; this.font = a.f; this.color = a.c; this.Zg = a.ha; this.ei = a.va; this.yk = a.wr; this.Ej = a.lho; this.ye = a.fn; this.Sg = a.fs; this.hg = a.ps; this.Yj = a.pxh; this.yn = a.tw; this.xn = a.th; this.Rf = a.lrt; this.bf = !0; this.Aj = this.kh = this.width; this.ih = this.height }; u.ne = function() { if (this.b.m && this.kb && 300 <= this.b.ad - this.Rf) { var a = this.g; this.pa(); var b = this.Fa; if (b.right < a.O || b.bottom < a.P || b.left > a.U || b.top > a.T) this.b.m.deleteTexture(this.kb), this.yc = this.je = this.kb = null } }; u.yh = function() { this.yc = this.je = null; this.b.m && this.kb && this.b.m.deleteTexture(this.kb); this.kb = null }; u.qi = function() { this.font = this.Sg + " " + this.hg.toString() + "pt " + this.ye; this.bf = !0; this.b.Q = !0 }; u.Lc = function(a, b) { a.font = this.font; a.textBaseline = "top"; a.fillStyle = this.color; a.globalAlpha = b ? 1 : this.opacity; var c = 1; b && (c = Math.abs(this.g.gb()), a.save(), a.scale(c, c)); if (this.bf || this.width !== this.Aj) this.type.Y.To(this.text, this.yd, a, this.width, this.yk), this.bf = !1, this.Aj = this.width; this.pa(); var c = b ? 0 : this.Pd.Ab, e = b ? 0 : this.Pd.Bb; this.b.Xc && (c = c + .5 | 0, e = e + .5 | 0); 0 === this.i || b || (a.save(), a.translate(c, e), a.rotate(this.i), e = c = 0); var d = e + this.height, f = this.Yj, f = f + this.Ej, g, l; 1 === this.ei ? e += Math.max(this.height / 2 - this.yd.length * f / 2, 0) : 2 === this.ei && (e += Math.max(this.height - this.yd.length * f - 2, 0)); for (l = 0; l < this.yd.length && !(g = c, 1 === this.Zg ? g = c + (this.width - this.yd[l].width) / 2 : 2 === this.Zg && (g = c + (this.width - this.yd[l].width)), a.fillText(this.yd[l].text, g, e), e += f, e >= d - f); l++); (0 !== this.i || b) && a.restore(); this.Rf = this.b.ad }; u.Kb = function(a) { if (!(1 > this.width || 1 > this.height)) { var b = this.bf || this.Em; this.Em = !1; var c = this.g.gb(), e = this.g.fb(), d = this.Te, f = c * this.width, g = c * this.height, l = Math.ceil(f), n = Math.ceil(g), m = Math.abs(l), k = Math.abs(n), q = this.b.r / 2, p = this.b.q / 2; this.je || (this.yc = document.createElement("canvas"), this.yc.width = m, this.yc.height = k, this.kh = m, this.ih = k, b = !0, this.je = this.yc.getContext("2d")); if (m !== this.kh || k !== this.ih) this.yc.width = m, this.yc.height = k, this.kb && (a.deleteTexture(this.kb), this.kb = null), b = !0; b && (this.je.clearRect(0, 0, m, k), this.Lc(this.je, !0), this.kb || (this.kb = a.sb(m, k, this.b.I, this.b.Sc)), a.ys(this.yc, this.kb, this.b.Sc)); this.kh = m; this.ih = k; a.zb(this.kb); a.We(this.opacity); a.Tb(); a.translate(-q, -p); a.Cb(); var r = this.Pd, b = this.g.wa(r.Ab, r.Bb, !0), m = this.g.wa(r.Ab, r.Bb, !1), k = this.g.wa(r.Yb, r.Zb, !0), q = this.g.wa(r.Yb, r.Zb, !1), p = this.g.wa(r.Hb, r.Ib, !0), u = this.g.wa(r.Hb, r.Ib, !1), O = this.g.wa(r.Fb, r.Gb, !0), r = this.g.wa(r.Fb, r.Gb, !1); if (this.b.Xc || 0 === this.i && 0 === e) var Q = (b + .5 | 0) - b, V = (m + .5 | 0) - m, b = b + Q, m = m + V, k = k + Q, q = q + V, p = p + Q, u = u + V, O = O + Q, r = r + V; 0 === this.i && 0 === e ? (k = b + l, q = m, p = k, u = m + n, O = b, r = u, d.right = 1, d.bottom = 1) : (d.right = f / l, d.bottom = g / n); a.Gd(b, m, k, q, p, u, O, r, d); a.Tb(); a.scale(c, c); a.Lh(-this.g.fb()); a.translate((this.g.O + this.g.U) / -2, (this.g.P + this.g.T) / -2); a.Cb(); this.Rf = this.b.ad } }; var r = []; p.So = function(a) { S(r); for (var b = "", c, e = 0; e < a.length;) if (c = a.charAt(e), "\n" === c) b.length && (r.push(b), b = ""), r.push("\n"), ++e; else if (" " === c || "\t" === c || "-" === c) { do b += a.charAt(e), e++; while (e < a.length && (" " === a.charAt(e) || "\t" === a.charAt(e))); r.push(b); b = "" } else e < a.length && (b += c, e++); b.length && r.push(b) }; var b = []; p.To = function(a, b, n, e, d) { if (a && a.length) if (2 >= e) l(b); else { if (100 >= a.length && -1 === a.indexOf("\n")) { var f = n.measureText(a).width; if (f <= e) { l(b); b.push(c()); b[0].text = a; b[0].width = f; return } } this.Uo(a, b, n, e, d) } else l(b) }; p.Uo = function(a, h, l, e, d) { d && (this.So(a), a = r); var f = "", g, p, u, m = 0; for (u = 0; u < a.length; u++) "\n" === a[u] ? (m >= h.length && h.push(c()), f = n(f), p = h[m], p.text = f, p.width = l.measureText(f).width, m++, f = "") : (g = f, f += a[u], p = l.measureText(f).width, p >= e && (m >= h.length && h.push(c()), g = n(g), p = h[m], p.text = g, p.width = l.measureText(g).width, m++, f = a[u], d || " " !== f || (f = ""))); f.length && (m >= h.length && h.push(c()), f = n(f), p = h[m], p.text = f, p.width = l.measureText(f).width, m++); for (u = m; u < h.length; u++) b.push(h[u]); h.length = m }; p.e = new function() {}; p.ga = new function() {}; p.ka = new function() {} })(); function Z(c) { this.b = c } (function() { function c(a) { h = a.x; w = a.y; e = a.z } function l(a, b, c, e) { var f; f = d.length ? d.pop() : new n; f.init(a, b, c, e); return f } function n() { this.pg = this.id = this.Cj = this.Bj = this.y = this.x = this.Vh = this.Uh = this.jh = this.time = this.lk = 0; this.wg = this.ai = !1 } function p() {} function u() {} var r = Z.prototype; r.ob = function(a) { this.Y = a; this.b = a.b }; r.ob.prototype.da = function() {}; r.Ta = function(a) { this.type = a; this.b = a.b; this.touches = []; this.Jj = !1 }; var b = r.Ta.prototype, a = { left: 0, top: 0 }; b.Af = function(a) { var b, c; b = 0; for (c = this.touches.length; b < c; b++) if (this.touches[b].id === a) return b; return -1 }; var h = 0, w = 0, e = 0, d = []; n.prototype.init = function(a, b, c, d) { var e = Ua(); this.lk = this.jh = this.time = e; this.Uh = a; this.Vh = b; this.x = a; this.y = b; this.Bj = a; this.Cj = b; this.pressure = this.height = this.width = 0; this.id = c; this.pg = d; this.wg = this.ai = !1 }; n.prototype.update = function(a, b, c, d, e, f) { this.jh = this.time; this.time = a; this.Bj = this.x; this.Cj = this.y; this.x = b; this.y = c; this.width = d; this.height = e; this.pressure = f; !this.wg && 15 <= Oa(this.Uh, this.Vh, this.x, this.y) && (this.wg = !0) }; n.prototype.xr = function(a, b) { !this.ai && 500 <= Ua() - this.lk && !this.wg && 15 > Oa(this.Uh, this.Vh, this.x, this.y) && (this.ai = !0, a.Dc = this.pg, a.df = this.id, a.Be = b, a.b.trigger(Z.prototype.e.ro, a), a.Ic = this.x, a.Jc = this.y, a.b.trigger(Z.prototype.e.so, a), a.Be = 0) }; var f = -1E3, g = -1E3, v = -1E4; n.prototype.zm = function(a, b) { if (!this.ai) { var c = Ua(); 333 >= c - this.lk && !this.wg && 15 > Oa(this.Uh, this.Vh, this.x, this.y) && (a.Dc = this.pg, a.df = this.id, a.Be = b, 666 >= c - v && 25 > Oa(f, g, this.x, this.y) ? (a.b.trigger(Z.prototype.e.po, a), a.Ic = this.x, a.Jc = this.y, a.b.trigger(Z.prototype.e.qo, a), g = f = -1E3, v = -1E4) : (a.b.trigger(Z.prototype.e.Eo, a), a.Ic = this.x, a.Jc = this.y, a.b.trigger(Z.prototype.e.Fo, a), f = this.x, g = this.y, v = c), a.Be = 0) } }; b.da = function() { this.kr = !("undefined" === typeof window.c2isWindows8 || !window.c2isWindows8); this.Be = this.df = this.Dc = this.Jc = this.Ic = this.Pk = this.Ok = this.Nk = this.Xo = this.Wo = this.Vo = this.Ch = this.Bh = this.Ah = 0; this.ws = 0 !== this.Ra[0]; var a = 0 < this.b.Va ? document : this.b.canvas, b = document; this.b.Qc ? b = a = window.Canvas : this.b.Mb && (b = a = window); var d = this; window.navigator.pointerEnabled ? (a.addEventListener("pointerdown", function(a) { d.Lm(a) }, !1), a.addEventListener("pointermove", function(a) { d.Km(a) }, !1), b.addEventListener("pointerup", function(a) { d.zh(a, !1) }, !1), b.addEventListener("pointercancel", function(a) { d.zh(a, !0) }, !1), this.b.canvas && (this.b.canvas.addEventListener("MSGestureHold", function(a) { a.preventDefault() }, !1), document.addEventListener("MSGestureHold", function(a) { a.preventDefault() }, !1), this.b.canvas.addEventListener("gesturehold", function(a) { a.preventDefault() }, !1), document.addEventListener("gesturehold", function(a) { a.preventDefault() }, !1))) : window.navigator.msPointerEnabled ? (a.addEventListener("MSPointerDown", function(a) { d.Lm(a) }, !1), a.addEventListener("MSPointerMove", function(a) { d.Km(a) }, !1), b.addEventListener("MSPointerUp", function(a) { d.zh(a, !1) }, !1), b.addEventListener("MSPointerCancel", function(a) { d.zh(a, !0) }, !1), this.b.canvas && (this.b.canvas.addEventListener("MSGestureHold", function(a) { a.preventDefault() }, !1), document.addEventListener("MSGestureHold", function(a) { a.preventDefault() }, !1))) : (a.addEventListener("touchstart", function(a) { d.Om(a) }, !1), a.addEventListener("touchmove", function(a) { d.Nm(a) }, !1), b.addEventListener("touchend", function(a) { d.Rj(a, !1) }, !1), b.addEventListener("touchcancel", function(a) { d.Rj(a, !0) }, !1)); if (this.kr) { var e = function(a) { a = a.reading; d.Nk = a.accelerationX; d.Ok = a.accelerationY; d.Pk = a.accelerationZ }, f = function(a) { a = a.reading; d.Ah = a.yawDegrees; d.Bh = a.pitchDegrees; d.Ch = a.rollDegrees }, g = Windows.Devices.Sensors.Accelerometer.getDefault(); g && (g.reportInterval = Math.max(g.minimumReportInterval, 16), g.addEventListener("readingchanged", e)); var h = Windows.Devices.Sensors.Inclinometer.getDefault(); h && (h.reportInterval = Math.max(h.minimumReportInterval, 16), h.addEventListener("readingchanged", f)); document.addEventListener("visibilitychange", function() { document.hidden || document.msHidden ? (g && g.removeEventListener("readingchanged", e), h && h.removeEventListener("readingchanged", f)) : (g && g.addEventListener("readingchanged", e), h && h.addEventListener("readingchanged", f)) }, !1) } else window.addEventListener("deviceorientation", function(a) { d.Ah = a.alpha || 0; d.Bh = a.beta || 0; d.Ch = a.gamma || 0 }, !1), window.addEventListener("devicemotion", function(a) { a.accelerationIncludingGravity && (d.Vo = a.accelerationIncludingGravity.x || 0, d.Wo = a.accelerationIncludingGravity.y || 0, d.Xo = a.accelerationIncludingGravity.z || 0); a.acceleration && (d.Nk = a.acceleration.x || 0, d.Ok = a.acceleration.y || 0, d.Pk = a.acceleration.z || 0) }, !1); this.ws && !this.b.la && (jQuery(document).mousemove(function(a) { d.Pj(a) }), jQuery(document).mousedown(function(a) { d.Oj(a) }), jQuery(document).mouseup(function(a) { d.Qj(a) })); !this.b.gh && this.b.wb && navigator.accelerometer && navigator.accelerometer.watchAcceleration && navigator.accelerometer.watchAcceleration(c, null, { frequency: 40 }); this.b.ns(this) }; b.Km = function(b) { if (b.pointerType !== b.MSPOINTER_TYPE_MOUSE && "mouse" !== b.pointerType) { b.preventDefault && b.preventDefault(); var c = this.Af(b.pointerId), d = Ua(); if (0 <= c) { var e = this.b.la ? a : jQuery(this.b.canvas).offset(), c = this.touches[c]; 2 > d - c.time || c.update(d, b.pageX - e.left, b.pageY - e.top, b.width || 0, b.height || 0, b.pressure || 0) } } }; b.Lm = function(b) { if (b.pointerType !== b.MSPOINTER_TYPE_MOUSE && "mouse" !== b.pointerType) { b.preventDefault && gb(b) && b.preventDefault(); var c = this.b.la ? a : jQuery(this.b.canvas).offset(), d = b.pageX - c.left, c = b.pageY - c.top; Ua(); this.Dc = this.touches.length; this.df = b.pointerId; this.touches.push(l(d, c, b.pointerId, this.Dc)); this.b.ua = !0; this.b.trigger(Z.prototype.e.Jk, this); this.b.trigger(Z.prototype.e.mi, this); this.Ic = d; this.Jc = c; this.b.trigger(Z.prototype.e.li, this); this.b.ua = !1 } }; b.zh = function(a, b) { if (a.pointerType !== a.MSPOINTER_TYPE_MOUSE && "mouse" !== a.pointerType) { a.preventDefault && gb(a) && a.preventDefault(); var c = this.Af(a.pointerId); this.Dc = 0 <= c ? this.touches[c].pg : -1; this.df = 0 <= c ? this.touches[c].id : -1; this.b.ua = !0; this.b.trigger(Z.prototype.e.Ik, this); this.b.trigger(Z.prototype.e.ki, this); 0 <= c && (b || this.touches[c].zm(this, c), 100 > d.length && d.push(this.touches[c]), this.touches.splice(c, 1)); this.b.ua = !1 } }; b.Nm = function(b) { b.preventDefault && b.preventDefault(); var c = Ua(), d, e, f, g; d = 0; for (e = b.changedTouches.length; d < e; d++) if (f = b.changedTouches[d], g = this.Af(f.identifier), 0 <= g) { var h = this.b.la ? a : jQuery(this.b.canvas).offset(); g = this.touches[g]; 2 > c - g.time || g.update(c, f.pageX - h.left, f.pageY - h.top, 2 * (f.Wt || f.eu || f.Qt || f.Tt || 0), 2 * (f.Xt || f.fu || f.Rt || f.Ut || 0), f.Lt || f.du || f.Pt || f.St || 0) } }; b.Om = function(b) { b.preventDefault && gb(b) && b.preventDefault(); var c = this.b.la ? a : jQuery(this.b.canvas).offset(); Ua(); this.b.ua = !0; var d, e, f, g; d = 0; for (e = b.changedTouches.length; d < e; d++) if (f = b.changedTouches[d], g = this.Af(f.identifier), -1 === g) { g = f.pageX - c.left; var h = f.pageY - c.top; this.Dc = this.touches.length; this.df = f.identifier; this.touches.push(l(g, h, f.identifier, this.Dc)); this.b.trigger(Z.prototype.e.Jk, this); this.b.trigger(Z.prototype.e.mi, this); this.Ic = g; this.Jc = h; this.b.trigger(Z.prototype.e.li, this) } this.b.ua = !1 }; b.Rj = function(a, b) { a.preventDefault && gb(a) && a.preventDefault(); this.b.ua = !0; var c, e, f; c = 0; for (e = a.changedTouches.length; c < e; c++) f = a.changedTouches[c], f = this.Af(f.identifier), 0 <= f && (this.Dc = this.touches[f].pg, this.df = this.touches[f].id, this.b.trigger(Z.prototype.e.Ik, this), this.b.trigger(Z.prototype.e.ki, this), b || this.touches[f].zm(this, f), 100 > d.length && d.push(this.touches[f]), this.touches.splice(f, 1)); this.b.ua = !1 }; b.qi = function() { return this.b.wb && 0 === this.Ah && 0 !== e ? 90 * e : this.Ah }; b.Jt = function() { return this.b.wb && 0 === this.Bh && 0 !== w ? 90 * w : this.Bh }; b.Kt = function() { return this.b.wb && 0 === this.Ch && 0 !== h ? 90 * h : this.Ch }; b.Oj = function(a) { this.Om({ changedTouches: [{ pageX: a.pageX, pageY: a.pageY, identifier: 0 }] }); this.Jj = !0 }; b.Pj = function(a) { this.Jj && this.Nm({ changedTouches: [{ pageX: a.pageX, pageY: a.pageY, identifier: 0 }] }) }; b.Qj = function(a) { a.preventDefault && this.b.Yg && !this.b.Sc && a.preventDefault(); this.b.Yg = !0; this.Rj({ changedTouches: [{ pageX: a.pageX, pageY: a.pageY, identifier: 0 }] }); this.Jj = !1 }; b.mk = function() { var a, b, c, d = Ua(); a = 0; for (b = this.touches.length; a < b; ++a) c = this.touches[a], c.time <= d - 50 && (c.jh = d), c.xr(this, a) }; p.prototype.mi = function() { return !0 }; p.prototype.ki = function() { return !0 }; p.prototype.li = function(a) { return a ? this.b.tg(a, this.Ic, this.Jc) : !1 }; var x = []; p.prototype.ho = function(a) { if (!a) return !1; var b = a.N(), c = b.Lb(), d, e, f, g, h, l; f = 0; for (g = c.length; f < g; f++) { var n = c[f]; n.pa(); h = 0; for (l = this.touches.length; h < l; h++) if (e = this.touches[h], d = n.g.ia(e.x, e.y, !0), e = n.g.ia(e.x, e.y, !1), n.rb(d, e)) { x.push(n); break } } return x.length ? (b.W = !1, ya(b.d, x), a.Fc(), S(x), !0) : !1 }; p.prototype.Wn = function(a, b, c) { a = Math.floor(a); if (0 > a || a >= this.touches.length) return !1; var d = this.touches[a]; a = Oa(d.x, d.y, d.Bj, d.Cj); var d = (d.time - d.jh) / 1E3, e = 0; 0 < d && (e = a / d); return Vb(e, b, c) }; p.prototype.Jk = function(a) { a = Math.floor(a); return a === this.Dc }; p.prototype.Ik = function(a) { a = Math.floor(a); return a === this.Dc }; p.prototype.ro = function() { return !0 }; p.prototype.Eo = function() { return !0 }; p.prototype.po = function() { return !0 }; p.prototype.so = function(a) { return a ? this.b.tg(a, this.Ic, this.Jc) : !1 }; p.prototype.Fo = function(a) { return a ? this.b.tg(a, this.Ic, this.Jc) : !1 }; p.prototype.qo = function(a) { return a ? this.b.tg(a, this.Ic, this.Jc) : !1 }; r.e = new p; u.prototype.Eg = function(a, b) { var c = this.Be; if (0 > c || c >= this.touches.length) a.n(0); else { var d, e, f, g, h; fa(b) ? (d = this.b.Pc(0), e = d.scale, f = d.bb, g = d.Qb, h = d.i, d.scale = 1, d.bb = 1, d.Qb = 1, d.i = 0, a.n(d.ia(this.touches[c].x, this.touches[c].y, !0)), d.scale = e, d.bb = f, d.Qb = g, d.i = h) : (d = D(b) ? this.b.Pc(b) : this.b.Bf(b)) ? a.n(d.ia(this.touches[c].x, this.touches[c].y, !0)) : a.n(0) } }; u.prototype.Fg = function(a, b) { var c = this.Be; if (0 > c || c >= this.touches.length) a.n(0); else { var d, e, f, g, h; fa(b) ? (d = this.b.Pc(0), e = d.scale, f = d.bb, g = d.Rb, h = d.i, d.scale = 1, d.bb = 1, d.Rb = 1, d.i = 0, a.n(d.ia(this.touches[c].x, this.touches[c].y, !1)), d.scale = e, d.bb = f, d.Rb = g, d.i = h) : (d = D(b) ? this.b.Pc(b) : this.b.Bf(b)) ? a.n(d.ia(this.touches[c].x, this.touches[c].y, !1)) : a.n(0) } }; r.ka = new u })(); function ec() { return [Y, fc, gc, X, hc, Z, W.prototype.e.Fk, X.prototype.ga.Ho, W.prototype.ga.Mo, W.prototype.e.fo, W.prototype.e.Zn, X.prototype.ga.Jo, X.prototype.ka.Eg, X.prototype.ka.Fg, X.prototype.ga.Ko, Z.prototype.ka.Eg, Z.prototype.ka.Fg, X.prototype.ga.Lo, W.prototype.ka.rp, Z.prototype.e.ho, Z.prototype.e.Wn, W.prototype.e.$n, W.prototype.ga.Xn, W.prototype.ka.pr, W.prototype.ka.tr, Z.prototype.e.mi, X.prototype.ga.No, X.prototype.ga.Po, X.prototype.ga.Qo, W.prototype.ga.Io, Z.prototype.e.ki, Z.prototype.e.li, X.prototype.ka.Sn, W.prototype.ga.Ro, W.prototype.e.Bk, Y.prototype.ga.bo, W.prototype.ka.ip, W.prototype.ga.ao ] };