gecko-dev/browser/extensions/shumway/content/shumway.player.js

52977 строки
2.0 MiB

/*
Copyright 2014 Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
console.time("Load Player Dependencies");
console.time("Load Shared Dependencies");
var jsGlobal = function() {
return this || (0,eval)("this//# sourceURL=jsGlobal-getter");
}(), inBrowser = "undefined" !== typeof window && "document" in window && "plugins" in window.document, inFirefox = "undefined" !== typeof navigator && 0 <= navigator.userAgent.indexOf("Firefox");
jsGlobal.performance || (jsGlobal.performance = {});
jsGlobal.performance.now || (jsGlobal.performance.now = "undefined" !== typeof dateNow ? dateNow : Date.now);
var START_TIME = performance.now(), Shumway;
(function(c) {
function h(d) {
return(d | 0) === d;
}
function a(d) {
return "object" === typeof d || "function" === typeof d;
}
function s(d) {
return String(Number(d)) === d;
}
function v(d) {
var b = 0;
if ("number" === typeof d) {
return b = d | 0, d === b && 0 <= b ? !0 : d >>> 0 === d;
}
if ("string" !== typeof d) {
return!1;
}
var g = d.length;
if (0 === g) {
return!1;
}
if ("0" === d) {
return!0;
}
if (g > c.UINT32_CHAR_BUFFER_LENGTH) {
return!1;
}
var r = 0, b = d.charCodeAt(r++) - 48;
if (1 > b || 9 < b) {
return!1;
}
for (var w = 0, f = 0;r < g;) {
f = d.charCodeAt(r++) - 48;
if (0 > f || 9 < f) {
return!1;
}
w = b;
b = 10 * b + f;
}
return w < c.UINT32_MAX_DIV_10 || w === c.UINT32_MAX_DIV_10 && f <= c.UINT32_MAX_MOD_10 ? !0 : !1;
}
(function(d) {
d[d._0 = 48] = "_0";
d[d._1 = 49] = "_1";
d[d._2 = 50] = "_2";
d[d._3 = 51] = "_3";
d[d._4 = 52] = "_4";
d[d._5 = 53] = "_5";
d[d._6 = 54] = "_6";
d[d._7 = 55] = "_7";
d[d._8 = 56] = "_8";
d[d._9 = 57] = "_9";
})(c.CharacterCodes || (c.CharacterCodes = {}));
c.UINT32_CHAR_BUFFER_LENGTH = 10;
c.UINT32_MAX = 4294967295;
c.UINT32_MAX_DIV_10 = 429496729;
c.UINT32_MAX_MOD_10 = 5;
c.isString = function(d) {
return "string" === typeof d;
};
c.isFunction = function(d) {
return "function" === typeof d;
};
c.isNumber = function(d) {
return "number" === typeof d;
};
c.isInteger = h;
c.isArray = function(d) {
return d instanceof Array;
};
c.isNumberOrString = function(d) {
return "number" === typeof d || "string" === typeof d;
};
c.isObject = a;
c.toNumber = function(d) {
return+d;
};
c.isNumericString = s;
c.isNumeric = function(d) {
if ("number" === typeof d) {
return!0;
}
if ("string" === typeof d) {
var b = d.charCodeAt(0);
return 65 <= b && 90 >= b || 97 <= b && 122 >= b || 36 === b || 95 === b ? !1 : v(d) || s(d);
}
return!1;
};
c.isIndex = v;
c.isNullOrUndefined = function(d) {
return void 0 == d;
};
var p;
(function(d) {
d.error = function(b) {
console.error(b);
throw Error(b);
};
d.assert = function(b, r) {
void 0 === r && (r = "assertion failed");
"" === b && (b = !0);
if (!b) {
if ("undefined" !== typeof console && "assert" in console) {
throw console.assert(!1, r), Error(r);
}
d.error(r.toString());
}
};
d.assertUnreachable = function(b) {
var r = Error().stack.split("\n")[1];
throw Error("Reached unreachable location " + r + b);
};
d.assertNotImplemented = function(b, r) {
b || d.error("notImplemented: " + r);
};
d.warning = function(b, r, d) {
console.warn.apply(console, arguments);
};
d.notUsed = function(b) {
d.assert(!1, "Not Used " + b);
};
d.notImplemented = function(b) {
d.assert(!1, "Not Implemented " + b);
};
d.dummyConstructor = function(b) {
d.assert(!1, "Dummy Constructor: " + b);
};
d.abstractMethod = function(b) {
d.assert(!1, "Abstract Method " + b);
};
var b = {};
d.somewhatImplemented = function(g) {
b[g] || (b[g] = !0, d.warning("somewhatImplemented: " + g));
};
d.unexpected = function(b) {
d.assert(!1, "Unexpected: " + b);
};
d.unexpectedCase = function(b) {
d.assert(!1, "Unexpected Case: " + b);
};
})(p = c.Debug || (c.Debug = {}));
c.getTicks = function() {
return performance.now();
};
var u;
(function(d) {
function b(b, g) {
for (var r = 0, d = b.length;r < d;r++) {
if (b[r] === g) {
return r;
}
}
b.push(g);
return b.length - 1;
}
var g = c.Debug.assert;
d.popManyInto = function(b, r, d) {
g(b.length >= r);
for (var f = r - 1;0 <= f;f--) {
d[f] = b.pop();
}
d.length = r;
};
d.popMany = function(b, r) {
g(b.length >= r);
var d = b.length - r, f = b.slice(d, this.length);
b.length = d;
return f;
};
d.popManyIntoVoid = function(b, r) {
g(b.length >= r);
b.length -= r;
};
d.pushMany = function(b, g) {
for (var r = 0;r < g.length;r++) {
b.push(g[r]);
}
};
d.top = function(b) {
return b.length && b[b.length - 1];
};
d.last = function(b) {
return b.length && b[b.length - 1];
};
d.peek = function(b) {
g(0 < b.length);
return b[b.length - 1];
};
d.indexOf = function(b, g) {
for (var r = 0, d = b.length;r < d;r++) {
if (b[r] === g) {
return r;
}
}
return-1;
};
d.equals = function(b, g) {
if (b.length !== g.length) {
return!1;
}
for (var r = 0;r < b.length;r++) {
if (b[r] !== g[r]) {
return!1;
}
}
return!0;
};
d.pushUnique = b;
d.unique = function(g) {
for (var r = [], d = 0;d < g.length;d++) {
b(r, g[d]);
}
return r;
};
d.copyFrom = function(b, g) {
b.length = 0;
d.pushMany(b, g);
};
d.ensureTypedArrayCapacity = function(b, g) {
if (b.length < g) {
var r = b;
b = new b.constructor(c.IntegerUtilities.nearestPowerOfTwo(g));
b.set(r, 0);
}
return b;
};
var r = function() {
function b(g) {
void 0 === g && (g = 16);
this._f32 = this._i32 = this._u16 = this._u8 = null;
this._offset = 0;
this.ensureCapacity(g);
}
b.prototype.reset = function() {
this._offset = 0;
};
Object.defineProperty(b.prototype, "offset", {get:function() {
return this._offset;
}, enumerable:!0, configurable:!0});
b.prototype.getIndex = function(b) {
g(1 === b || 2 === b || 4 === b || 8 === b || 16 === b);
b = this._offset / b;
g((b | 0) === b);
return b;
};
b.prototype.ensureAdditionalCapacity = function(b) {
this.ensureCapacity(this._offset + b);
};
b.prototype.ensureCapacity = function(b) {
if (!this._u8) {
this._u8 = new Uint8Array(b);
} else {
if (this._u8.length > b) {
return;
}
}
var g = 2 * this._u8.length;
g < b && (g = b);
b = new Uint8Array(g);
b.set(this._u8, 0);
this._u8 = b;
this._u16 = new Uint16Array(b.buffer);
this._i32 = new Int32Array(b.buffer);
this._f32 = new Float32Array(b.buffer);
};
b.prototype.writeInt = function(b) {
g(0 === (this._offset & 3));
this.ensureCapacity(this._offset + 4);
this.writeIntUnsafe(b);
};
b.prototype.writeIntAt = function(b, r) {
g(0 <= r && r <= this._offset);
g(0 === (r & 3));
this.ensureCapacity(r + 4);
this._i32[r >> 2] = b;
};
b.prototype.writeIntUnsafe = function(b) {
this._i32[this._offset >> 2] = b;
this._offset += 4;
};
b.prototype.writeFloat = function(b) {
g(0 === (this._offset & 3));
this.ensureCapacity(this._offset + 4);
this.writeFloatUnsafe(b);
};
b.prototype.writeFloatUnsafe = function(b) {
this._f32[this._offset >> 2] = b;
this._offset += 4;
};
b.prototype.write4Floats = function(b, r, d, w) {
g(0 === (this._offset & 3));
this.ensureCapacity(this._offset + 16);
this.write4FloatsUnsafe(b, r, d, w);
};
b.prototype.write4FloatsUnsafe = function(b, g, r, d) {
var w = this._offset >> 2;
this._f32[w + 0] = b;
this._f32[w + 1] = g;
this._f32[w + 2] = r;
this._f32[w + 3] = d;
this._offset += 16;
};
b.prototype.write6Floats = function(b, r, d, w, f, k) {
g(0 === (this._offset & 3));
this.ensureCapacity(this._offset + 24);
this.write6FloatsUnsafe(b, r, d, w, f, k);
};
b.prototype.write6FloatsUnsafe = function(b, g, r, d, w, f) {
var k = this._offset >> 2;
this._f32[k + 0] = b;
this._f32[k + 1] = g;
this._f32[k + 2] = r;
this._f32[k + 3] = d;
this._f32[k + 4] = w;
this._f32[k + 5] = f;
this._offset += 24;
};
b.prototype.subF32View = function() {
return this._f32.subarray(0, this._offset >> 2);
};
b.prototype.subI32View = function() {
return this._i32.subarray(0, this._offset >> 2);
};
b.prototype.subU16View = function() {
return this._u16.subarray(0, this._offset >> 1);
};
b.prototype.subU8View = function() {
return this._u8.subarray(0, this._offset);
};
b.prototype.hashWords = function(b, g, r) {
g = this._i32;
for (var d = 0;d < r;d++) {
b = (31 * b | 0) + g[d] | 0;
}
return b;
};
b.prototype.reserve = function(b) {
b = b + 3 & -4;
this.ensureCapacity(this._offset + b);
this._offset += b;
};
return b;
}();
d.ArrayWriter = r;
})(u = c.ArrayUtilities || (c.ArrayUtilities = {}));
var l = function() {
function d(b) {
this._u8 = new Uint8Array(b);
this._u16 = new Uint16Array(b);
this._i32 = new Int32Array(b);
this._f32 = new Float32Array(b);
this._offset = 0;
}
Object.defineProperty(d.prototype, "offset", {get:function() {
return this._offset;
}, enumerable:!0, configurable:!0});
d.prototype.isEmpty = function() {
return this._offset === this._u8.length;
};
d.prototype.readInt = function() {
p.assert(0 === (this._offset & 3));
p.assert(this._offset <= this._u8.length - 4);
var b = this._i32[this._offset >> 2];
this._offset += 4;
return b;
};
d.prototype.readFloat = function() {
p.assert(0 === (this._offset & 3));
p.assert(this._offset <= this._u8.length - 4);
var b = this._f32[this._offset >> 2];
this._offset += 4;
return b;
};
return d;
}();
c.ArrayReader = l;
(function(d) {
function b(b, g) {
return Object.prototype.hasOwnProperty.call(b, g);
}
function g(g, d) {
for (var f in d) {
b(d, f) && (g[f] = d[f]);
}
}
d.boxValue = function(b) {
return void 0 == b || a(b) ? b : Object(b);
};
d.toKeyValueArray = function(b) {
var g = Object.prototype.hasOwnProperty, d = [], f;
for (f in b) {
g.call(b, f) && d.push([f, b[f]]);
}
return d;
};
d.isPrototypeWriteable = function(b) {
return Object.getOwnPropertyDescriptor(b, "prototype").writable;
};
d.hasOwnProperty = b;
d.propertyIsEnumerable = function(b, g) {
return Object.prototype.propertyIsEnumerable.call(b, g);
};
d.getOwnPropertyDescriptor = function(b, g) {
return Object.getOwnPropertyDescriptor(b, g);
};
d.hasOwnGetter = function(b, g) {
var d = Object.getOwnPropertyDescriptor(b, g);
return!(!d || !d.get);
};
d.getOwnGetter = function(b, g) {
var d = Object.getOwnPropertyDescriptor(b, g);
return d ? d.get : null;
};
d.hasOwnSetter = function(b, g) {
var d = Object.getOwnPropertyDescriptor(b, g);
return!(!d || !d.set);
};
d.createMap = function() {
return Object.create(null);
};
d.createArrayMap = function() {
return[];
};
d.defineReadOnlyProperty = function(b, g, d) {
Object.defineProperty(b, g, {value:d, writable:!1, configurable:!0, enumerable:!1});
};
d.getOwnPropertyDescriptors = function(b) {
for (var g = d.createMap(), f = Object.getOwnPropertyNames(b), k = 0;k < f.length;k++) {
g[f[k]] = Object.getOwnPropertyDescriptor(b, f[k]);
}
return g;
};
d.cloneObject = function(b) {
var d = Object.create(Object.getPrototypeOf(b));
g(d, b);
return d;
};
d.copyProperties = function(b, g) {
for (var d in g) {
b[d] = g[d];
}
};
d.copyOwnProperties = g;
d.copyOwnPropertyDescriptors = function(g, d, f) {
void 0 === f && (f = !0);
for (var k in d) {
if (b(d, k)) {
var e = Object.getOwnPropertyDescriptor(d, k);
if (f || !b(g, k)) {
p.assert(e);
try {
Object.defineProperty(g, k, e);
} catch (n) {
}
}
}
}
};
d.getLatestGetterOrSetterPropertyDescriptor = function(b, g) {
for (var d = {};b;) {
var f = Object.getOwnPropertyDescriptor(b, g);
f && (d.get = d.get || f.get, d.set = d.set || f.set);
if (d.get && d.set) {
break;
}
b = Object.getPrototypeOf(b);
}
return d;
};
d.defineNonEnumerableGetterOrSetter = function(b, g, f, k) {
var e = d.getLatestGetterOrSetterPropertyDescriptor(b, g);
e.configurable = !0;
e.enumerable = !1;
k ? e.get = f : e.set = f;
Object.defineProperty(b, g, e);
};
d.defineNonEnumerableGetter = function(b, g, d) {
Object.defineProperty(b, g, {get:d, configurable:!0, enumerable:!1});
};
d.defineNonEnumerableSetter = function(b, g, d) {
Object.defineProperty(b, g, {set:d, configurable:!0, enumerable:!1});
};
d.defineNonEnumerableProperty = function(b, g, d) {
Object.defineProperty(b, g, {value:d, writable:!0, configurable:!0, enumerable:!1});
};
d.defineNonEnumerableForwardingProperty = function(b, g, d) {
Object.defineProperty(b, g, {get:e.makeForwardingGetter(d), set:e.makeForwardingSetter(d), writable:!0, configurable:!0, enumerable:!1});
};
d.defineNewNonEnumerableProperty = function(b, g, f) {
p.assert(!Object.prototype.hasOwnProperty.call(b, g), "Property: " + g + " already exits.");
d.defineNonEnumerableProperty(b, g, f);
};
d.createPublicAliases = function(b, g) {
for (var d = {value:null, writable:!0, configurable:!0, enumerable:!1}, f = 0;f < g.length;f++) {
var k = g[f];
d.value = b[k];
Object.defineProperty(b, "$Bg" + k, d);
}
};
})(c.ObjectUtilities || (c.ObjectUtilities = {}));
var e;
(function(d) {
d.makeForwardingGetter = function(b) {
return new Function('return this["' + b + '"]//# sourceURL=fwd-get-' + b + ".as");
};
d.makeForwardingSetter = function(b) {
return new Function("value", 'this["' + b + '"] = value;//# sourceURL=fwd-set-' + b + ".as");
};
d.bindSafely = function(b, g) {
function d() {
return b.apply(g, arguments);
}
p.assert(!b.boundTo);
p.assert(g);
d.boundTo = g;
return d;
};
})(e = c.FunctionUtilities || (c.FunctionUtilities = {}));
(function(d) {
function b(b) {
return "string" === typeof b ? '"' + b + '"' : "number" === typeof b || "boolean" === typeof b ? String(b) : b instanceof Array ? "[] " + b.length : typeof b;
}
var g = c.Debug.assert;
d.repeatString = function(b, g) {
for (var d = "", r = 0;r < g;r++) {
d += b;
}
return d;
};
d.memorySizeToString = function(b) {
b |= 0;
return 1024 > b ? b + " B" : 1048576 > b ? (b / 1024).toFixed(2) + "KB" : (b / 1048576).toFixed(2) + "MB";
};
d.toSafeString = b;
d.toSafeArrayString = function(g) {
for (var d = [], r = 0;r < g.length;r++) {
d.push(b(g[r]));
}
return d.join(", ");
};
d.utf8decode = function(b) {
for (var g = new Uint8Array(4 * b.length), d = 0, r = 0, w = b.length;r < w;r++) {
var f = b.charCodeAt(r);
if (127 >= f) {
g[d++] = f;
} else {
if (55296 <= f && 56319 >= f) {
var k = b.charCodeAt(r + 1);
56320 <= k && 57343 >= k && (f = ((f & 1023) << 10) + (k & 1023) + 65536, ++r);
}
0 !== (f & 4292870144) ? (g[d++] = 248 | f >>> 24 & 3, g[d++] = 128 | f >>> 18 & 63, g[d++] = 128 | f >>> 12 & 63, g[d++] = 128 | f >>> 6 & 63) : 0 !== (f & 4294901760) ? (g[d++] = 240 | f >>> 18 & 7, g[d++] = 128 | f >>> 12 & 63, g[d++] = 128 | f >>> 6 & 63) : 0 !== (f & 4294965248) ? (g[d++] = 224 | f >>> 12 & 15, g[d++] = 128 | f >>> 6 & 63) : g[d++] = 192 | f >>> 6 & 31;
g[d++] = 128 | f & 63;
}
}
return g.subarray(0, d);
};
d.utf8encode = function(b) {
for (var g = 0, d = "";g < b.length;) {
var r = b[g++] & 255;
if (127 >= r) {
d += String.fromCharCode(r);
} else {
var f = 192, w = 5;
do {
if ((r & (f >> 1 | 128)) === f) {
break;
}
f = f >> 1 | 128;
--w;
} while (0 <= w);
if (0 >= w) {
d += String.fromCharCode(r);
} else {
for (var r = r & (1 << w) - 1, f = !1, k = 5;k >= w;--k) {
var e = b[g++];
if (128 != (e & 192)) {
f = !0;
break;
}
r = r << 6 | e & 63;
}
if (f) {
for (w = g - (7 - k);w < g;++w) {
d += String.fromCharCode(b[w] & 255);
}
} else {
d = 65536 <= r ? d + String.fromCharCode(r - 65536 >> 10 & 1023 | 55296, r & 1023 | 56320) : d + String.fromCharCode(r);
}
}
}
}
return d;
};
d.base64ArrayBuffer = function(b) {
var g = "";
b = new Uint8Array(b);
for (var d = b.byteLength, r = d % 3, d = d - r, f, w, k, e, n = 0;n < d;n += 3) {
e = b[n] << 16 | b[n + 1] << 8 | b[n + 2], f = (e & 16515072) >> 18, w = (e & 258048) >> 12, k = (e & 4032) >> 6, e &= 63, g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[w] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[k] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e];
}
1 == r ? (e = b[d], g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 252) >> 2] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 3) << 4] + "==") : 2 == r && (e = b[d] << 8 | b[d + 1], g += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 64512) >> 10] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 1008) >> 4] + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(e & 15) <<
2] + "=");
return g;
};
d.escapeString = function(b) {
void 0 !== b && (b = b.replace(/[^\w$]/gi, "$"), /^\d/.test(b) && (b = "$" + b));
return b;
};
d.fromCharCodeArray = function(b) {
for (var g = "", d = 0;d < b.length;d += 16384) {
var r = Math.min(b.length - d, 16384), g = g + String.fromCharCode.apply(null, b.subarray(d, d + r))
}
return g;
};
d.variableLengthEncodeInt32 = function(b) {
var r = 32 - Math.clz32(b);
g(32 >= r, r);
for (var f = Math.ceil(r / 6), w = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[f], k = f - 1;0 <= k;k--) {
w += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b >> 6 * k & 63];
}
g(d.variableLengthDecodeInt32(w) === b, b + " : " + w + " - " + f + " bits: " + r);
return w;
};
d.toEncoding = function(b) {
return "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_"[b];
};
d.fromEncoding = function(b) {
b = b.charCodeAt(0);
if (65 <= b && 90 >= b) {
return b - 65;
}
if (97 <= b && 122 >= b) {
return b - 71;
}
if (48 <= b && 57 >= b) {
return b + 4;
}
if (36 === b) {
return 62;
}
if (95 === b) {
return 63;
}
g(!1, "Invalid Encoding");
};
d.variableLengthDecodeInt32 = function(b) {
for (var g = d.fromEncoding(b[0]), r = 0, f = 0;f < g;f++) {
var w = 6 * (g - f - 1), r = r | d.fromEncoding(b[1 + f]) << w
}
return r;
};
d.trimMiddle = function(b, g) {
if (b.length <= g) {
return b;
}
var d = g >> 1, r = g - d - 1;
return b.substr(0, d) + "\u2026" + b.substr(b.length - r, r);
};
d.multiple = function(b, g) {
for (var d = "", r = 0;r < g;r++) {
d += b;
}
return d;
};
d.indexOfAny = function(b, g, d) {
for (var r = b.length, f = 0;f < g.length;f++) {
var w = b.indexOf(g[f], d);
0 <= w && (r = Math.min(r, w));
}
return r === b.length ? -1 : r;
};
var r = Array(3), w = Array(4), f = Array(5), k = Array(6), e = Array(7), n = Array(8), m = Array(9);
d.concat3 = function(b, g, d) {
r[0] = b;
r[1] = g;
r[2] = d;
return r.join("");
};
d.concat4 = function(b, g, d, r) {
w[0] = b;
w[1] = g;
w[2] = d;
w[3] = r;
return w.join("");
};
d.concat5 = function(b, g, d, r, w) {
f[0] = b;
f[1] = g;
f[2] = d;
f[3] = r;
f[4] = w;
return f.join("");
};
d.concat6 = function(b, g, d, r, f, w) {
k[0] = b;
k[1] = g;
k[2] = d;
k[3] = r;
k[4] = f;
k[5] = w;
return k.join("");
};
d.concat7 = function(b, g, d, r, f, w, k) {
e[0] = b;
e[1] = g;
e[2] = d;
e[3] = r;
e[4] = f;
e[5] = w;
e[6] = k;
return e.join("");
};
d.concat8 = function(b, g, d, r, f, w, k, e) {
n[0] = b;
n[1] = g;
n[2] = d;
n[3] = r;
n[4] = f;
n[5] = w;
n[6] = k;
n[7] = e;
return n.join("");
};
d.concat9 = function(b, g, d, r, f, w, k, e, n) {
m[0] = b;
m[1] = g;
m[2] = d;
m[3] = r;
m[4] = f;
m[5] = w;
m[6] = k;
m[7] = e;
m[8] = n;
return m.join("");
};
})(c.StringUtilities || (c.StringUtilities = {}));
(function(d) {
var b = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]), g = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632,
643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649,
-145523070, -1120210379, 718787259, -343485551]);
d.hashBytesTo32BitsMD5 = function(d, f, k) {
var e = 1732584193, n = -271733879, m = -1732584194, l = 271733878, q = k + 72 & -64, a = new Uint8Array(q), t;
for (t = 0;t < k;++t) {
a[t] = d[f++];
}
a[t++] = 128;
for (d = q - 8;t < d;) {
a[t++] = 0;
}
a[t++] = k << 3 & 255;
a[t++] = k >> 5 & 255;
a[t++] = k >> 13 & 255;
a[t++] = k >> 21 & 255;
a[t++] = k >>> 29 & 255;
a[t++] = 0;
a[t++] = 0;
a[t++] = 0;
d = new Int32Array(16);
for (t = 0;t < q;) {
for (k = 0;16 > k;++k, t += 4) {
d[k] = a[t] | a[t + 1] << 8 | a[t + 2] << 16 | a[t + 3] << 24;
}
var c = e;
f = n;
var s = m, u = l, p, h;
for (k = 0;64 > k;++k) {
16 > k ? (p = f & s | ~f & u, h = k) : 32 > k ? (p = u & f | ~u & s, h = 5 * k + 1 & 15) : 48 > k ? (p = f ^ s ^ u, h = 3 * k + 5 & 15) : (p = s ^ (f | ~u), h = 7 * k & 15);
var v = u, c = c + p + g[k] + d[h] | 0;
p = b[k];
u = s;
s = f;
f = f + (c << p | c >>> 32 - p) | 0;
c = v;
}
e = e + c | 0;
n = n + f | 0;
m = m + s | 0;
l = l + u | 0;
}
return e;
};
d.hashBytesTo32BitsAdler = function(b, g, d) {
var f = 1, k = 0;
for (d = g + d;g < d;++g) {
f = (f + (b[g] & 255)) % 65521, k = (k + f) % 65521;
}
return k << 16 | f;
};
})(c.HashUtilities || (c.HashUtilities = {}));
var m = function() {
function d() {
}
d.seed = function(b) {
d._state[0] = b;
d._state[1] = b;
};
d.next = function() {
var b = this._state, g = Math.imul(18273, b[0] & 65535) + (b[0] >>> 16) | 0;
b[0] = g;
var d = Math.imul(36969, b[1] & 65535) + (b[1] >>> 16) | 0;
b[1] = d;
b = (g << 16) + (d & 65535) | 0;
return 2.3283064365386963E-10 * (0 > b ? b + 4294967296 : b);
};
d._state = new Uint32Array([57005, 48879]);
return d;
}();
c.Random = m;
Math.random = function() {
return m.next();
};
(function() {
function d() {
this.id = "$weakmap" + b++;
}
if ("function" !== typeof jsGlobal.WeakMap) {
var b = 0;
d.prototype = {has:function(b) {
return b.hasOwnProperty(this.id);
}, get:function(b, d) {
return b.hasOwnProperty(this.id) ? b[this.id] : d;
}, set:function(b, d) {
Object.defineProperty(b, this.id, {value:d, enumerable:!1, configurable:!0});
}};
jsGlobal.WeakMap = d;
}
})();
l = function() {
function d() {
"undefined" !== typeof netscape && netscape.security.PrivilegeManager ? this._map = new WeakMap : this._list = [];
}
d.prototype.clear = function() {
this._map ? this._map.clear() : this._list.length = 0;
};
d.prototype.push = function(b) {
this._map ? (p.assert(!this._map.has(b)), this._map.set(b, null)) : (p.assert(-1 === this._list.indexOf(b)), this._list.push(b));
};
d.prototype.remove = function(b) {
this._map ? (p.assert(this._map.has(b)), this._map.delete(b)) : (p.assert(-1 < this._list.indexOf(b)), this._list[this._list.indexOf(b)] = null, p.assert(-1 === this._list.indexOf(b)));
};
d.prototype.forEach = function(b) {
if (this._map) {
"undefined" !== typeof netscape && netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), Components.utils.nondeterministicGetWeakMapKeys(this._map).forEach(function(g) {
0 !== g._referenceCount && b(g);
});
} else {
for (var g = this._list, d = 0, f = 0;f < g.length;f++) {
var k = g[f];
k && (0 === k._referenceCount ? (g[f] = null, d++) : b(k));
}
if (16 < d && d > g.length >> 2) {
d = [];
for (f = 0;f < g.length;f++) {
(k = g[f]) && 0 < k._referenceCount && d.push(k);
}
this._list = d;
}
}
};
Object.defineProperty(d.prototype, "length", {get:function() {
return this._map ? -1 : this._list.length;
}, enumerable:!0, configurable:!0});
return d;
}();
c.WeakList = l;
var t;
(function(d) {
d.pow2 = function(b) {
return b === (b | 0) ? 0 > b ? 1 / (1 << -b) : 1 << b : Math.pow(2, b);
};
d.clamp = function(b, g, d) {
return Math.max(g, Math.min(d, b));
};
d.roundHalfEven = function(b) {
if (.5 === Math.abs(b % 1)) {
var g = Math.floor(b);
return 0 === g % 2 ? g : Math.ceil(b);
}
return Math.round(b);
};
d.epsilonEquals = function(b, g) {
return 1E-7 > Math.abs(b - g);
};
})(t = c.NumberUtilities || (c.NumberUtilities = {}));
(function(d) {
d[d.MaxU16 = 65535] = "MaxU16";
d[d.MaxI16 = 32767] = "MaxI16";
d[d.MinI16 = -32768] = "MinI16";
})(c.Numbers || (c.Numbers = {}));
var q;
(function(d) {
function b(b) {
return 256 * b << 16 >> 16;
}
var g = new ArrayBuffer(8);
d.i8 = new Int8Array(g);
d.u8 = new Uint8Array(g);
d.i32 = new Int32Array(g);
d.f32 = new Float32Array(g);
d.f64 = new Float64Array(g);
d.nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
d.floatToInt32 = function(b) {
d.f32[0] = b;
return d.i32[0];
};
d.int32ToFloat = function(b) {
d.i32[0] = b;
return d.f32[0];
};
d.swap16 = function(b) {
return(b & 255) << 8 | b >> 8 & 255;
};
d.swap32 = function(b) {
return(b & 255) << 24 | (b & 65280) << 8 | b >> 8 & 65280 | b >> 24 & 255;
};
d.toS8U8 = b;
d.fromS8U8 = function(b) {
return b / 256;
};
d.clampS8U8 = function(g) {
return b(g) / 256;
};
d.toS16 = function(b) {
return b << 16 >> 16;
};
d.bitCount = function(b) {
b -= b >> 1 & 1431655765;
b = (b & 858993459) + (b >> 2 & 858993459);
return 16843009 * (b + (b >> 4) & 252645135) >> 24;
};
d.ones = function(b) {
b -= b >> 1 & 1431655765;
b = (b & 858993459) + (b >> 2 & 858993459);
return 16843009 * (b + (b >> 4) & 252645135) >> 24;
};
d.trailingZeros = function(b) {
return d.ones((b & -b) - 1);
};
d.getFlags = function(b, g) {
var d = "";
for (b = 0;b < g.length;b++) {
b & 1 << b && (d += g[b] + " ");
}
return 0 === d.length ? "" : d.trim();
};
d.isPowerOfTwo = function(b) {
return b && 0 === (b & b - 1);
};
d.roundToMultipleOfFour = function(b) {
return b + 3 & -4;
};
d.nearestPowerOfTwo = function(b) {
b--;
b |= b >> 1;
b |= b >> 2;
b |= b >> 4;
b |= b >> 8;
b |= b >> 16;
b++;
return b;
};
d.roundToMultipleOfPowerOfTwo = function(b, g) {
var d = (1 << g) - 1;
return b + d & ~d;
};
Math.imul || (Math.imul = function(b, g) {
var d = b & 65535, f = g & 65535;
return d * f + ((b >>> 16 & 65535) * f + d * (g >>> 16 & 65535) << 16 >>> 0) | 0;
});
Math.clz32 || (Math.clz32 = function(b) {
b |= b >> 1;
b |= b >> 2;
b |= b >> 4;
b |= b >> 8;
return 32 - d.ones(b | b >> 16);
});
})(q = c.IntegerUtilities || (c.IntegerUtilities = {}));
(function(d) {
function b(b, d, f, k, e, n) {
return(f - b) * (n - d) - (k - d) * (e - b);
}
d.pointInPolygon = function(b, d, f) {
for (var k = 0, e = f.length - 2, n = 0;n < e;n += 2) {
var m = f[n + 0], l = f[n + 1], q = f[n + 2], a = f[n + 3];
(l <= d && a > d || l > d && a <= d) && b < m + (d - l) / (a - l) * (q - m) && k++;
}
return 1 === (k & 1);
};
d.signedArea = b;
d.counterClockwise = function(g, d, f, k, e, n) {
return 0 < b(g, d, f, k, e, n);
};
d.clockwise = function(g, d, f, k, e, n) {
return 0 > b(g, d, f, k, e, n);
};
d.pointInPolygonInt32 = function(b, d, f) {
b |= 0;
d |= 0;
for (var k = 0, e = f.length - 2, n = 0;n < e;n += 2) {
var m = f[n + 0], l = f[n + 1], q = f[n + 2], a = f[n + 3];
(l <= d && a > d || l > d && a <= d) && b < m + (d - l) / (a - l) * (q - m) && k++;
}
return 1 === (k & 1);
};
})(c.GeometricUtilities || (c.GeometricUtilities = {}));
(function(d) {
d[d.Error = 1] = "Error";
d[d.Warn = 2] = "Warn";
d[d.Debug = 4] = "Debug";
d[d.Log = 8] = "Log";
d[d.Info = 16] = "Info";
d[d.All = 31] = "All";
})(c.LogLevel || (c.LogLevel = {}));
l = function() {
function d(b, g) {
void 0 === b && (b = !1);
this._tab = " ";
this._padding = "";
this._suppressOutput = b;
this._out = g || d._consoleOut;
this._outNoNewline = g || d._consoleOutNoNewline;
}
d.prototype.write = function(b, g) {
void 0 === b && (b = "");
void 0 === g && (g = !1);
this._suppressOutput || this._outNoNewline((g ? this._padding : "") + b);
};
d.prototype.writeLn = function(b) {
void 0 === b && (b = "");
this._suppressOutput || this._out(this._padding + b);
};
d.prototype.writeObject = function(b, g) {
void 0 === b && (b = "");
this._suppressOutput || this._out(this._padding + b, g);
};
d.prototype.writeTimeLn = function(b) {
void 0 === b && (b = "");
this._suppressOutput || this._out(this._padding + performance.now().toFixed(2) + " " + b);
};
d.prototype.writeComment = function(b) {
b = b.split("\n");
if (1 === b.length) {
this.writeLn("// " + b[0]);
} else {
this.writeLn("/**");
for (var g = 0;g < b.length;g++) {
this.writeLn(" * " + b[g]);
}
this.writeLn(" */");
}
};
d.prototype.writeLns = function(b) {
b = b.split("\n");
for (var g = 0;g < b.length;g++) {
this.writeLn(b[g]);
}
};
d.prototype.errorLn = function(b) {
d.logLevel & 1 && this.boldRedLn(b);
};
d.prototype.warnLn = function(b) {
d.logLevel & 2 && this.yellowLn(b);
};
d.prototype.debugLn = function(b) {
d.logLevel & 4 && this.purpleLn(b);
};
d.prototype.logLn = function(b) {
d.logLevel & 8 && this.writeLn(b);
};
d.prototype.infoLn = function(b) {
d.logLevel & 16 && this.writeLn(b);
};
d.prototype.yellowLn = function(b) {
this.colorLn(d.YELLOW, b);
};
d.prototype.greenLn = function(b) {
this.colorLn(d.GREEN, b);
};
d.prototype.boldRedLn = function(b) {
this.colorLn(d.BOLD_RED, b);
};
d.prototype.redLn = function(b) {
this.colorLn(d.RED, b);
};
d.prototype.purpleLn = function(b) {
this.colorLn(d.PURPLE, b);
};
d.prototype.colorLn = function(b, g) {
this._suppressOutput || (inBrowser ? this._out(this._padding + g) : this._out(this._padding + b + g + d.ENDC));
};
d.prototype.redLns = function(b) {
this.colorLns(d.RED, b);
};
d.prototype.colorLns = function(b, g) {
for (var d = g.split("\n"), f = 0;f < d.length;f++) {
this.colorLn(b, d[f]);
}
};
d.prototype.enter = function(b) {
this._suppressOutput || this._out(this._padding + b);
this.indent();
};
d.prototype.leaveAndEnter = function() {
this.leave("Slots");
this.indent();
};
d.prototype.leave = function(b) {
this.outdent();
!this._suppressOutput && b && this._out(this._padding + b);
};
d.prototype.indent = function() {
this._padding += this._tab;
};
d.prototype.outdent = function() {
0 < this._padding.length && (this._padding = this._padding.substring(0, this._padding.length - this._tab.length));
};
d.prototype.writeArray = function(b, g, d) {
void 0 === g && (g = !1);
void 0 === d && (d = !1);
g = g || !1;
for (var f = 0, k = b.length;f < k;f++) {
var e = "";
g && (e = null === b[f] ? "null" : void 0 === b[f] ? "undefined" : b[f].constructor.name, e += " ");
var n = d ? "" : ("" + f).padRight(" ", 4);
this.writeLn(n + e + b[f]);
}
};
d.PURPLE = "\u001b[94m";
d.YELLOW = "\u001b[93m";
d.GREEN = "\u001b[92m";
d.RED = "\u001b[91m";
d.BOLD_RED = "\u001b[1;91m";
d.ENDC = "\u001b[0m";
d.logLevel = 31;
d._consoleOut = console.info.bind(console);
d._consoleOutNoNewline = console.info.bind(console);
return d;
}();
c.IndentingWriter = l;
var n = function() {
return function(d, b) {
this.value = d;
this.next = b;
};
}(), l = function() {
function d(b) {
p.assert(b);
this._compare = b;
this._head = null;
this._length = 0;
}
d.prototype.push = function(b) {
p.assert(void 0 !== b);
this._length++;
if (this._head) {
var g = this._head, d = null;
b = new n(b, null);
for (var f = this._compare;g;) {
if (0 < f(g.value, b.value)) {
d ? (b.next = g, d.next = b) : (b.next = this._head, this._head = b);
return;
}
d = g;
g = g.next;
}
d.next = b;
} else {
this._head = new n(b, null);
}
};
d.prototype.forEach = function(b) {
for (var g = this._head, r = null;g;) {
var f = b(g.value);
if (f === d.RETURN) {
break;
} else {
f === d.DELETE ? g = r ? r.next = g.next : this._head = this._head.next : (r = g, g = g.next);
}
}
};
d.prototype.isEmpty = function() {
return!this._head;
};
d.prototype.pop = function() {
if (this._head) {
this._length--;
var b = this._head;
this._head = this._head.next;
return b.value;
}
};
d.prototype.contains = function(b) {
for (var g = this._head;g;) {
if (g.value === b) {
return!0;
}
g = g.next;
}
return!1;
};
d.prototype.toString = function() {
for (var b = "[", g = this._head;g;) {
b += g.value.toString(), (g = g.next) && (b += ",");
}
return b + "]";
};
d.RETURN = 1;
d.DELETE = 2;
return d;
}();
c.SortedList = l;
l = function() {
function d(b, g) {
void 0 === g && (g = 12);
this.start = this.index = 0;
this._size = 1 << g;
this._mask = this._size - 1;
this.array = new b(this._size);
}
d.prototype.get = function(b) {
return this.array[b];
};
d.prototype.forEachInReverse = function(b) {
if (!this.isEmpty()) {
for (var g = 0 === this.index ? this._size - 1 : this.index - 1, d = this.start - 1 & this._mask;g !== d && !b(this.array[g], g);) {
g = 0 === g ? this._size - 1 : g - 1;
}
}
};
d.prototype.write = function(b) {
this.array[this.index] = b;
this.index = this.index + 1 & this._mask;
this.index === this.start && (this.start = this.start + 1 & this._mask);
};
d.prototype.isFull = function() {
return(this.index + 1 & this._mask) === this.start;
};
d.prototype.isEmpty = function() {
return this.index === this.start;
};
d.prototype.reset = function() {
this.start = this.index = 0;
};
return d;
}();
c.CircularBuffer = l;
(function(d) {
function b(b) {
return b + (d.BITS_PER_WORD - 1) >> d.ADDRESS_BITS_PER_WORD << d.ADDRESS_BITS_PER_WORD;
}
function g(b, g) {
b = b || "1";
g = g || "0";
for (var d = "", r = 0;r < length;r++) {
d += this.get(r) ? b : g;
}
return d;
}
function r(b) {
for (var g = [], d = 0;d < length;d++) {
this.get(d) && g.push(b ? b[d] : d);
}
return g.join(", ");
}
var f = c.Debug.assert;
d.ADDRESS_BITS_PER_WORD = 5;
d.BITS_PER_WORD = 1 << d.ADDRESS_BITS_PER_WORD;
d.BIT_INDEX_MASK = d.BITS_PER_WORD - 1;
var k = function() {
function g(r) {
this.size = b(r);
this.dirty = this.count = 0;
this.length = r;
this.bits = new Uint32Array(this.size >> d.ADDRESS_BITS_PER_WORD);
}
g.prototype.recount = function() {
if (this.dirty) {
for (var b = this.bits, g = 0, d = 0, r = b.length;d < r;d++) {
var f = b[d], f = f - (f >> 1 & 1431655765), f = (f & 858993459) + (f >> 2 & 858993459), g = g + (16843009 * (f + (f >> 4) & 252645135) >> 24)
}
this.count = g;
this.dirty = 0;
}
};
g.prototype.set = function(b) {
var g = b >> d.ADDRESS_BITS_PER_WORD, r = this.bits[g];
b = r | 1 << (b & d.BIT_INDEX_MASK);
this.bits[g] = b;
this.dirty |= r ^ b;
};
g.prototype.setAll = function() {
for (var b = this.bits, g = 0, d = b.length;g < d;g++) {
b[g] = 4294967295;
}
this.count = this.size;
this.dirty = 0;
};
g.prototype.assign = function(b) {
this.count = b.count;
this.dirty = b.dirty;
this.size = b.size;
for (var g = 0, d = this.bits.length;g < d;g++) {
this.bits[g] = b.bits[g];
}
};
g.prototype.clear = function(b) {
var g = b >> d.ADDRESS_BITS_PER_WORD, r = this.bits[g];
b = r & ~(1 << (b & d.BIT_INDEX_MASK));
this.bits[g] = b;
this.dirty |= r ^ b;
};
g.prototype.get = function(b) {
return 0 !== (this.bits[b >> d.ADDRESS_BITS_PER_WORD] & 1 << (b & d.BIT_INDEX_MASK));
};
g.prototype.clearAll = function() {
for (var b = this.bits, g = 0, d = b.length;g < d;g++) {
b[g] = 0;
}
this.dirty = this.count = 0;
};
g.prototype._union = function(b) {
var g = this.dirty, d = this.bits;
b = b.bits;
for (var r = 0, f = d.length;r < f;r++) {
var k = d[r], w = k | b[r];
d[r] = w;
g |= k ^ w;
}
this.dirty = g;
};
g.prototype.intersect = function(b) {
var g = this.dirty, d = this.bits;
b = b.bits;
for (var r = 0, f = d.length;r < f;r++) {
var k = d[r], w = k & b[r];
d[r] = w;
g |= k ^ w;
}
this.dirty = g;
};
g.prototype.subtract = function(b) {
var g = this.dirty, d = this.bits;
b = b.bits;
for (var r = 0, f = d.length;r < f;r++) {
var k = d[r], w = k & ~b[r];
d[r] = w;
g |= k ^ w;
}
this.dirty = g;
};
g.prototype.negate = function() {
for (var b = this.dirty, g = this.bits, d = 0, r = g.length;d < r;d++) {
var f = g[d], k = ~f;
g[d] = k;
b |= f ^ k;
}
this.dirty = b;
};
g.prototype.forEach = function(b) {
f(b);
for (var g = this.bits, r = 0, k = g.length;r < k;r++) {
var e = g[r];
if (e) {
for (var n = 0;n < d.BITS_PER_WORD;n++) {
e & 1 << n && b(r * d.BITS_PER_WORD + n);
}
}
}
};
g.prototype.toArray = function() {
for (var b = [], g = this.bits, r = 0, f = g.length;r < f;r++) {
var k = g[r];
if (k) {
for (var w = 0;w < d.BITS_PER_WORD;w++) {
k & 1 << w && b.push(r * d.BITS_PER_WORD + w);
}
}
}
return b;
};
g.prototype.equals = function(b) {
if (this.size !== b.size) {
return!1;
}
var g = this.bits;
b = b.bits;
for (var d = 0, r = g.length;d < r;d++) {
if (g[d] !== b[d]) {
return!1;
}
}
return!0;
};
g.prototype.contains = function(b) {
if (this.size !== b.size) {
return!1;
}
var g = this.bits;
b = b.bits;
for (var d = 0, r = g.length;d < r;d++) {
if ((g[d] | b[d]) !== g[d]) {
return!1;
}
}
return!0;
};
g.prototype.isEmpty = function() {
this.recount();
return 0 === this.count;
};
g.prototype.clone = function() {
var b = new g(this.length);
b._union(this);
return b;
};
return g;
}();
d.Uint32ArrayBitSet = k;
var e = function() {
function g(d) {
this.dirty = this.count = 0;
this.size = b(d);
this.bits = 0;
this.singleWord = !0;
this.length = d;
}
g.prototype.recount = function() {
if (this.dirty) {
var b = this.bits, b = b - (b >> 1 & 1431655765), b = (b & 858993459) + (b >> 2 & 858993459);
this.count = 0 + (16843009 * (b + (b >> 4) & 252645135) >> 24);
this.dirty = 0;
}
};
g.prototype.set = function(b) {
var g = this.bits;
this.bits = b = g | 1 << (b & d.BIT_INDEX_MASK);
this.dirty |= g ^ b;
};
g.prototype.setAll = function() {
this.bits = 4294967295;
this.count = this.size;
this.dirty = 0;
};
g.prototype.assign = function(b) {
this.count = b.count;
this.dirty = b.dirty;
this.size = b.size;
this.bits = b.bits;
};
g.prototype.clear = function(b) {
var g = this.bits;
this.bits = b = g & ~(1 << (b & d.BIT_INDEX_MASK));
this.dirty |= g ^ b;
};
g.prototype.get = function(b) {
return 0 !== (this.bits & 1 << (b & d.BIT_INDEX_MASK));
};
g.prototype.clearAll = function() {
this.dirty = this.count = this.bits = 0;
};
g.prototype._union = function(b) {
var g = this.bits;
this.bits = b = g | b.bits;
this.dirty = g ^ b;
};
g.prototype.intersect = function(b) {
var g = this.bits;
this.bits = b = g & b.bits;
this.dirty = g ^ b;
};
g.prototype.subtract = function(b) {
var g = this.bits;
this.bits = b = g & ~b.bits;
this.dirty = g ^ b;
};
g.prototype.negate = function() {
var b = this.bits, g = ~b;
this.bits = g;
this.dirty = b ^ g;
};
g.prototype.forEach = function(b) {
f(b);
var g = this.bits;
if (g) {
for (var r = 0;r < d.BITS_PER_WORD;r++) {
g & 1 << r && b(r);
}
}
};
g.prototype.toArray = function() {
var b = [], g = this.bits;
if (g) {
for (var r = 0;r < d.BITS_PER_WORD;r++) {
g & 1 << r && b.push(r);
}
}
return b;
};
g.prototype.equals = function(b) {
return this.bits === b.bits;
};
g.prototype.contains = function(b) {
var g = this.bits;
return(g | b.bits) === g;
};
g.prototype.isEmpty = function() {
this.recount();
return 0 === this.count;
};
g.prototype.clone = function() {
var b = new g(this.length);
b._union(this);
return b;
};
return g;
}();
d.Uint32BitSet = e;
e.prototype.toString = r;
e.prototype.toBitString = g;
k.prototype.toString = r;
k.prototype.toBitString = g;
d.BitSetFunctor = function(g) {
var r = 1 === b(g) >> d.ADDRESS_BITS_PER_WORD ? e : k;
return function() {
return new r(g);
};
};
})(c.BitSets || (c.BitSets = {}));
l = function() {
function d() {
}
d.randomStyle = function() {
d._randomStyleCache || (d._randomStyleCache = "#ff5e3a #ff9500 #ffdb4c #87fc70 #52edc7 #1ad6fd #c644fc #ef4db6 #4a4a4a #dbddde #ff3b30 #ff9500 #ffcc00 #4cd964 #34aadc #007aff #5856d6 #ff2d55 #8e8e93 #c7c7cc #5ad427 #c86edf #d1eefc #e0f8d8 #fb2b69 #f7f7f7 #1d77ef #d6cec3 #55efcb #ff4981 #ffd3e0 #f7f7f7 #ff1300 #1f1f21 #bdbec2 #ff3a2d".split(" "));
return d._randomStyleCache[d._nextStyle++ % d._randomStyleCache.length];
};
d.gradientColor = function(b) {
return d._gradient[d._gradient.length * t.clamp(b, 0, 1) | 0];
};
d.contrastStyle = function(b) {
b = parseInt(b.substr(1), 16);
return 128 <= (299 * (b >> 16) + 587 * (b >> 8 & 255) + 114 * (b & 255)) / 1E3 ? "#000000" : "#ffffff";
};
d.reset = function() {
d._nextStyle = 0;
};
d.TabToolbar = "#252c33";
d.Toolbars = "#343c45";
d.HighlightBlue = "#1d4f73";
d.LightText = "#f5f7fa";
d.ForegroundText = "#b6babf";
d.Black = "#000000";
d.VeryDark = "#14171a";
d.Dark = "#181d20";
d.Light = "#a9bacb";
d.Grey = "#8fa1b2";
d.DarkGrey = "#5f7387";
d.Blue = "#46afe3";
d.Purple = "#6b7abb";
d.Pink = "#df80ff";
d.Red = "#eb5368";
d.Orange = "#d96629";
d.LightOrange = "#d99b28";
d.Green = "#70bf53";
d.BlueGrey = "#5e88b0";
d._nextStyle = 0;
d._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" ");
return d;
}();
c.ColorStyle = l;
l = function() {
function d(b, g, d, f) {
this.xMin = b | 0;
this.yMin = g | 0;
this.xMax = d | 0;
this.yMax = f | 0;
}
d.FromUntyped = function(b) {
return new d(b.xMin, b.yMin, b.xMax, b.yMax);
};
d.FromRectangle = function(b) {
return new d(20 * b.x | 0, 20 * b.y | 0, 20 * (b.x + b.width) | 0, 20 * (b.y + b.height) | 0);
};
d.prototype.setElements = function(b, g, d, f) {
this.xMin = b;
this.yMin = g;
this.xMax = d;
this.yMax = f;
};
d.prototype.copyFrom = function(b) {
this.setElements(b.xMin, b.yMin, b.xMax, b.yMax);
};
d.prototype.contains = function(b, g) {
return b < this.xMin !== b < this.xMax && g < this.yMin !== g < this.yMax;
};
d.prototype.unionInPlace = function(b) {
b.isEmpty() || (this.extendByPoint(b.xMin, b.yMin), this.extendByPoint(b.xMax, b.yMax));
};
d.prototype.extendByPoint = function(b, g) {
this.extendByX(b);
this.extendByY(g);
};
d.prototype.extendByX = function(b) {
134217728 === this.xMin ? this.xMin = this.xMax = b : (this.xMin = Math.min(this.xMin, b), this.xMax = Math.max(this.xMax, b));
};
d.prototype.extendByY = function(b) {
134217728 === this.yMin ? this.yMin = this.yMax = b : (this.yMin = Math.min(this.yMin, b), this.yMax = Math.max(this.yMax, b));
};
d.prototype.intersects = function(b) {
return this.contains(b.xMin, b.yMin) || this.contains(b.xMax, b.yMax);
};
d.prototype.isEmpty = function() {
return this.xMax <= this.xMin || this.yMax <= this.yMin;
};
Object.defineProperty(d.prototype, "width", {get:function() {
return this.xMax - this.xMin;
}, set:function(b) {
this.xMax = this.xMin + b;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "height", {get:function() {
return this.yMax - this.yMin;
}, set:function(b) {
this.yMax = this.yMin + b;
}, enumerable:!0, configurable:!0});
d.prototype.getBaseWidth = function(b) {
return Math.abs(Math.cos(b)) * (this.xMax - this.xMin) + Math.abs(Math.sin(b)) * (this.yMax - this.yMin);
};
d.prototype.getBaseHeight = function(b) {
return Math.abs(Math.sin(b)) * (this.xMax - this.xMin) + Math.abs(Math.cos(b)) * (this.yMax - this.yMin);
};
d.prototype.setEmpty = function() {
this.xMin = this.yMin = this.xMax = this.yMax = 0;
};
d.prototype.setToSentinels = function() {
this.xMin = this.yMin = this.xMax = this.yMax = 134217728;
};
d.prototype.clone = function() {
return new d(this.xMin, this.yMin, this.xMax, this.yMax);
};
d.prototype.toString = function() {
return "{ xMin: " + this.xMin + ", xMin: " + this.yMin + ", xMax: " + this.xMax + ", xMax: " + this.yMax + " }";
};
return d;
}();
c.Bounds = l;
l = function() {
function d(b, g, d, f) {
p.assert(h(b));
p.assert(h(g));
p.assert(h(d));
p.assert(h(f));
this._xMin = b | 0;
this._yMin = g | 0;
this._xMax = d | 0;
this._yMax = f | 0;
}
d.FromUntyped = function(b) {
return new d(b.xMin, b.yMin, b.xMax, b.yMax);
};
d.FromRectangle = function(b) {
return new d(20 * b.x | 0, 20 * b.y | 0, 20 * (b.x + b.width) | 0, 20 * (b.y + b.height) | 0);
};
d.prototype.setElements = function(b, g, d, f) {
this.xMin = b;
this.yMin = g;
this.xMax = d;
this.yMax = f;
};
d.prototype.copyFrom = function(b) {
this.setElements(b.xMin, b.yMin, b.xMax, b.yMax);
};
d.prototype.contains = function(b, g) {
return b < this.xMin !== b < this.xMax && g < this.yMin !== g < this.yMax;
};
d.prototype.unionInPlace = function(b) {
b.isEmpty() || (this.extendByPoint(b.xMin, b.yMin), this.extendByPoint(b.xMax, b.yMax));
};
d.prototype.extendByPoint = function(b, g) {
this.extendByX(b);
this.extendByY(g);
};
d.prototype.extendByX = function(b) {
134217728 === this.xMin ? this.xMin = this.xMax = b : (this.xMin = Math.min(this.xMin, b), this.xMax = Math.max(this.xMax, b));
};
d.prototype.extendByY = function(b) {
134217728 === this.yMin ? this.yMin = this.yMax = b : (this.yMin = Math.min(this.yMin, b), this.yMax = Math.max(this.yMax, b));
};
d.prototype.intersects = function(b) {
return this.contains(b._xMin, b._yMin) || this.contains(b._xMax, b._yMax);
};
d.prototype.isEmpty = function() {
return this._xMax <= this._xMin || this._yMax <= this._yMin;
};
Object.defineProperty(d.prototype, "xMin", {get:function() {
return this._xMin;
}, set:function(b) {
p.assert(h(b));
this._xMin = b;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "yMin", {get:function() {
return this._yMin;
}, set:function(b) {
p.assert(h(b));
this._yMin = b | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "xMax", {get:function() {
return this._xMax;
}, set:function(b) {
p.assert(h(b));
this._xMax = b | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "width", {get:function() {
return this._xMax - this._xMin;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "yMax", {get:function() {
return this._yMax;
}, set:function(b) {
p.assert(h(b));
this._yMax = b | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "height", {get:function() {
return this._yMax - this._yMin;
}, enumerable:!0, configurable:!0});
d.prototype.getBaseWidth = function(b) {
return Math.abs(Math.cos(b)) * (this._xMax - this._xMin) + Math.abs(Math.sin(b)) * (this._yMax - this._yMin);
};
d.prototype.getBaseHeight = function(b) {
return Math.abs(Math.sin(b)) * (this._xMax - this._xMin) + Math.abs(Math.cos(b)) * (this._yMax - this._yMin);
};
d.prototype.setEmpty = function() {
this._xMin = this._yMin = this._xMax = this._yMax = 0;
};
d.prototype.clone = function() {
return new d(this.xMin, this.yMin, this.xMax, this.yMax);
};
d.prototype.toString = function() {
return "{ xMin: " + this._xMin + ", xMin: " + this._yMin + ", xMax: " + this._xMax + ", yMax: " + this._yMax + " }";
};
d.prototype.assertValid = function() {
};
return d;
}();
c.DebugBounds = l;
l = function() {
function d(b, g, d, f) {
this.r = b;
this.g = g;
this.b = d;
this.a = f;
}
d.FromARGB = function(b) {
return new d((b >> 16 & 255) / 255, (b >> 8 & 255) / 255, (b >> 0 & 255) / 255, (b >> 24 & 255) / 255);
};
d.FromRGBA = function(b) {
return d.FromARGB(k.RGBAToARGB(b));
};
d.prototype.toRGBA = function() {
return 255 * this.r << 24 | 255 * this.g << 16 | 255 * this.b << 8 | 255 * this.a;
};
d.prototype.toCSSStyle = function() {
return k.rgbaToCSSStyle(this.toRGBA());
};
d.prototype.set = function(b) {
this.r = b.r;
this.g = b.g;
this.b = b.b;
this.a = b.a;
};
d.randomColor = function(b) {
void 0 === b && (b = 1);
return new d(Math.random(), Math.random(), Math.random(), b);
};
d.parseColor = function(b) {
d.colorCache || (d.colorCache = Object.create(null));
if (d.colorCache[b]) {
return d.colorCache[b];
}
var g = document.createElement("span");
document.body.appendChild(g);
g.style.backgroundColor = b;
var r = getComputedStyle(g).backgroundColor;
document.body.removeChild(g);
(g = /^rgb\((\d+), (\d+), (\d+)\)$/.exec(r)) || (g = /^rgba\((\d+), (\d+), (\d+), ([\d.]+)\)$/.exec(r));
r = new d(0, 0, 0, 0);
r.r = parseFloat(g[1]) / 255;
r.g = parseFloat(g[2]) / 255;
r.b = parseFloat(g[3]) / 255;
r.a = g[4] ? parseFloat(g[4]) / 255 : 1;
return d.colorCache[b] = r;
};
d.Red = new d(1, 0, 0, 1);
d.Green = new d(0, 1, 0, 1);
d.Blue = new d(0, 0, 1, 1);
d.None = new d(0, 0, 0, 0);
d.White = new d(1, 1, 1, 1);
d.Black = new d(0, 0, 0, 1);
d.colorCache = {};
return d;
}();
c.Color = l;
var k;
(function(d) {
function b(b) {
var g, d, r = b >> 24 & 255;
d = (Math.imul(b >> 16 & 255, r) + 127) / 255 | 0;
g = (Math.imul(b >> 8 & 255, r) + 127) / 255 | 0;
b = (Math.imul(b >> 0 & 255, r) + 127) / 255 | 0;
return r << 24 | d << 16 | g << 8 | b;
}
d.RGBAToARGB = function(b) {
return b >> 8 & 16777215 | (b & 255) << 24;
};
d.ARGBToRGBA = function(b) {
return b << 8 | b >> 24 & 255;
};
d.rgbaToCSSStyle = function(b) {
return c.StringUtilities.concat9("rgba(", b >> 24 & 255, ",", b >> 16 & 255, ",", b >> 8 & 255, ",", (b & 255) / 255, ")");
};
d.cssStyleToRGBA = function(b) {
if ("#" === b[0]) {
if (7 === b.length) {
return parseInt(b.substring(1), 16) << 8 | 255;
}
} else {
if ("r" === b[0]) {
return b = b.substring(5, b.length - 1).split(","), (parseInt(b[0]) & 255) << 24 | (parseInt(b[1]) & 255) << 16 | (parseInt(b[2]) & 255) << 8 | 255 * parseFloat(b[3]) & 255;
}
}
return 4278190335;
};
d.hexToRGB = function(b) {
return parseInt(b.slice(1), 16);
};
d.rgbToHex = function(b) {
return "#" + ("000000" + (b >>> 0).toString(16)).slice(-6);
};
d.isValidHexColor = function(b) {
return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(b);
};
d.clampByte = function(b) {
return Math.max(0, Math.min(255, b));
};
d.unpremultiplyARGB = function(b) {
var g, d, r = b >> 24 & 255;
d = Math.imul(255, b >> 16 & 255) / r & 255;
g = Math.imul(255, b >> 8 & 255) / r & 255;
b = Math.imul(255, b >> 0 & 255) / r & 255;
return r << 24 | d << 16 | g << 8 | b;
};
d.premultiplyARGB = b;
var g;
d.ensureUnpremultiplyTable = function() {
if (!g) {
g = new Uint8Array(65536);
for (var b = 0;256 > b;b++) {
for (var d = 0;256 > d;d++) {
g[(d << 8) + b] = Math.imul(255, b) / d;
}
}
}
};
d.tableLookupUnpremultiplyARGB = function(b) {
b |= 0;
var d = b >> 24 & 255;
if (0 === d) {
return 0;
}
if (255 === d) {
return b;
}
var r, f, k = d << 8, e = g;
f = e[k + (b >> 16 & 255)];
r = e[k + (b >> 8 & 255)];
b = e[k + (b >> 0 & 255)];
return d << 24 | f << 16 | r << 8 | b;
};
d.blendPremultipliedBGRA = function(b, g) {
var d, r;
r = 256 - (g & 255);
d = Math.imul(b & 16711935, r) >> 8;
r = Math.imul(b >> 8 & 16711935, r) >> 8;
return((g >> 8 & 16711935) + r & 16711935) << 8 | (g & 16711935) + d & 16711935;
};
var r = q.swap32;
d.convertImage = function(d, k, e, n) {
e !== n && p.assert(e.buffer !== n.buffer, "Can't handle overlapping views.");
var m = e.length;
if (d === k) {
if (e !== n) {
for (d = 0;d < m;d++) {
n[d] = e[d];
}
}
} else {
if (1 === d && 3 === k) {
for (c.ColorUtilities.ensureUnpremultiplyTable(), d = 0;d < m;d++) {
var l = e[d];
k = l & 255;
if (0 === k) {
n[d] = 0;
} else {
if (255 === k) {
n[d] = 4278190080 | l >> 8 & 16777215;
} else {
var q = l >> 24 & 255, a = l >> 16 & 255, l = l >> 8 & 255, t = k << 8, s = g, l = s[t + l], a = s[t + a], q = s[t + q];
n[d] = k << 24 | q << 16 | a << 8 | l;
}
}
}
} else {
if (2 === d && 3 === k) {
for (d = 0;d < m;d++) {
n[d] = r(e[d]);
}
} else {
if (3 === d && 1 === k) {
for (d = 0;d < m;d++) {
k = e[d], n[d] = r(b(k & 4278255360 | k >> 16 & 255 | (k & 255) << 16));
}
} else {
for (p.somewhatImplemented("Image Format Conversion: " + f[d] + " -> " + f[k]), d = 0;d < m;d++) {
n[d] = e[d];
}
}
}
}
}
};
})(k = c.ColorUtilities || (c.ColorUtilities = {}));
l = function() {
function d(b) {
void 0 === b && (b = 32);
this._list = [];
this._maxSize = b;
}
d.prototype.acquire = function(b) {
if (d._enabled) {
for (var g = this._list, r = 0;r < g.length;r++) {
var f = g[r];
if (f.byteLength >= b) {
return g.splice(r, 1), f;
}
}
}
return new ArrayBuffer(b);
};
d.prototype.release = function(b) {
if (d._enabled) {
var g = this._list;
p.assert(0 > u.indexOf(g, b));
g.length === this._maxSize && g.shift();
g.push(b);
}
};
d.prototype.ensureUint8ArrayLength = function(b, g) {
if (b.length >= g) {
return b;
}
var d = Math.max(b.length + g, (3 * b.length >> 1) + 1), d = new Uint8Array(this.acquire(d), 0, d);
d.set(b);
this.release(b.buffer);
return d;
};
d.prototype.ensureFloat64ArrayLength = function(b, g) {
if (b.length >= g) {
return b;
}
var d = Math.max(b.length + g, (3 * b.length >> 1) + 1), d = new Float64Array(this.acquire(d * Float64Array.BYTES_PER_ELEMENT), 0, d);
d.set(b);
this.release(b.buffer);
return d;
};
d._enabled = !0;
return d;
}();
c.ArrayBufferPool = l;
(function(d) {
(function(b) {
b[b.EXTERNAL_INTERFACE_FEATURE = 1] = "EXTERNAL_INTERFACE_FEATURE";
b[b.CLIPBOARD_FEATURE = 2] = "CLIPBOARD_FEATURE";
b[b.SHAREDOBJECT_FEATURE = 3] = "SHAREDOBJECT_FEATURE";
b[b.VIDEO_FEATURE = 4] = "VIDEO_FEATURE";
b[b.SOUND_FEATURE = 5] = "SOUND_FEATURE";
b[b.NETCONNECTION_FEATURE = 6] = "NETCONNECTION_FEATURE";
})(d.Feature || (d.Feature = {}));
(function(b) {
b[b.AVM1_ERROR = 1] = "AVM1_ERROR";
b[b.AVM2_ERROR = 2] = "AVM2_ERROR";
})(d.ErrorTypes || (d.ErrorTypes = {}));
d.instance;
})(c.Telemetry || (c.Telemetry = {}));
(function(d) {
d.instance;
})(c.FileLoadingService || (c.FileLoadingService = {}));
c.registerCSSFont = function(d, b, g) {
if (inBrowser) {
var r = document.head;
r.insertBefore(document.createElement("style"), r.firstChild);
r = document.styleSheets[0];
b = "@font-face{font-family:swffont" + d + ";src:url(data:font/opentype;base64," + c.StringUtilities.base64ArrayBuffer(b) + ")}";
r.insertRule(b, r.cssRules.length);
g && (g = document.createElement("div"), g.style.fontFamily = "swffont" + d, g.innerHTML = "hello", document.body.appendChild(g), document.body.removeChild(g));
} else {
p.warning("Cannot register CSS font outside the browser");
}
};
(function(d) {
d.instance = {enabled:!1, initJS:function(b) {
}, registerCallback:function(b) {
}, unregisterCallback:function(b) {
}, eval:function(b) {
}, call:function(b) {
}, getId:function() {
return null;
}};
})(c.ExternalInterfaceService || (c.ExternalInterfaceService = {}));
l = function() {
function d() {
}
d.prototype.setClipboard = function(b) {
p.abstractMethod("public ClipboardService::setClipboard");
};
d.instance = null;
return d;
}();
c.ClipboardService = l;
l = function() {
function d() {
this._queues = {};
}
d.prototype.register = function(b, g) {
p.assert(b);
p.assert(g);
var d = this._queues[b];
if (d) {
if (-1 < d.indexOf(g)) {
return;
}
} else {
d = this._queues[b] = [];
}
d.push(g);
};
d.prototype.unregister = function(b, g) {
p.assert(b);
p.assert(g);
var d = this._queues[b];
if (d) {
var f = d.indexOf(g);
-1 !== f && d.splice(f, 1);
0 === d.length && (this._queues[b] = null);
}
};
d.prototype.notify = function(b, g) {
var d = this._queues[b];
if (d) {
d = d.slice();
g = Array.prototype.slice.call(arguments, 0);
for (var f = 0;f < d.length;f++) {
d[f].apply(null, g);
}
}
};
d.prototype.notify1 = function(b, g) {
var d = this._queues[b];
if (d) {
for (var d = d.slice(), f = 0;f < d.length;f++) {
(0,d[f])(b, g);
}
}
};
return d;
}();
c.Callback = l;
(function(d) {
d[d.None = 0] = "None";
d[d.PremultipliedAlphaARGB = 1] = "PremultipliedAlphaARGB";
d[d.StraightAlphaARGB = 2] = "StraightAlphaARGB";
d[d.StraightAlphaRGBA = 3] = "StraightAlphaRGBA";
d[d.JPEG = 4] = "JPEG";
d[d.PNG = 5] = "PNG";
d[d.GIF = 6] = "GIF";
})(c.ImageType || (c.ImageType = {}));
var f = c.ImageType;
c.getMIMETypeForImageType = function(d) {
switch(d) {
case 4:
return "image/jpeg";
case 5:
return "image/png";
case 6:
return "image/gif";
default:
return "text/plain";
}
};
(function(d) {
d.toCSSCursor = function(b) {
switch(b) {
case 0:
return "auto";
case 2:
return "pointer";
case 3:
return "grab";
case 4:
return "text";
default:
return "default";
}
};
})(c.UI || (c.UI = {}));
l = function() {
function d() {
this.promise = new Promise(function(b, d) {
this.resolve = b;
this.reject = d;
}.bind(this));
}
d.prototype.then = function(b, d) {
return this.promise.then(b, d);
};
return d;
}();
c.PromiseWrapper = l;
})(Shumway || (Shumway = {}));
(function() {
function c(b) {
if ("function" !== typeof b) {
throw new TypeError("Invalid deferred constructor");
}
var d = n();
b = new b(d);
var g = d.resolve;
if ("function" !== typeof g) {
throw new TypeError("Invalid resolve construction function");
}
d = d.reject;
if ("function" !== typeof d) {
throw new TypeError("Invalid reject construction function");
}
return{promise:b, resolve:g, reject:d};
}
function h(b, d) {
if ("object" !== typeof b || null === b) {
return!1;
}
try {
var g = b.then;
if ("function" !== typeof g) {
return!1;
}
g.call(b, d.resolve, d.reject);
} catch (f) {
g = d.reject, g(f);
}
return!0;
}
function a(b) {
return "object" === typeof b && null !== b && "undefined" !== typeof b.promiseStatus;
}
function s(b, d) {
if ("unresolved" === b.promiseStatus) {
var g = b.rejectReactions;
b.result = d;
b.resolveReactions = void 0;
b.rejectReactions = void 0;
b.promiseStatus = "has-rejection";
v(g, d);
}
}
function v(b, d) {
for (var g = 0;g < b.length;g++) {
p({reaction:b[g], argument:d});
}
}
function p(b) {
0 === g.length && setTimeout(l, 0);
g.push(b);
}
function u(b, d) {
var g = b.deferred, f = b.handler, k, e;
try {
k = f(d);
} catch (n) {
return g = g.reject, g(n);
}
if (k === g.promise) {
return g = g.reject, g(new TypeError("Self resolution"));
}
try {
if (e = h(k, g), !e) {
var m = g.resolve;
return m(k);
}
} catch (l) {
return g = g.reject, g(l);
}
}
function l() {
for (;0 < g.length;) {
var b = g[0];
try {
u(b.reaction, b.argument);
} catch (f) {
if ("function" === typeof d.onerror) {
d.onerror(f);
}
}
g.shift();
}
}
function e(b) {
throw b;
}
function m(b) {
return b;
}
function t(b) {
return function(d) {
s(b, d);
};
}
function q(b) {
return function(d) {
if ("unresolved" === b.promiseStatus) {
var g = b.resolveReactions;
b.result = d;
b.resolveReactions = void 0;
b.rejectReactions = void 0;
b.promiseStatus = "has-resolution";
v(g, d);
}
};
}
function n() {
function b(d, g) {
b.resolve = d;
b.reject = g;
}
return b;
}
function k(b, d, g) {
return function(f) {
if (f === b) {
return g(new TypeError("Self resolution"));
}
var k = b.promiseConstructor;
if (a(f) && f.promiseConstructor === k) {
return f.then(d, g);
}
k = c(k);
return h(f, k) ? k.promise.then(d, g) : d(f);
};
}
function f(b, d, g, f) {
return function(k) {
d[b] = k;
f.countdown--;
0 === f.countdown && g.resolve(d);
};
}
function d(b) {
if ("function" !== typeof b) {
throw new TypeError("resolver is not a function");
}
if ("object" !== typeof this) {
throw new TypeError("Promise to initialize is not an object");
}
this.promiseStatus = "unresolved";
this.resolveReactions = [];
this.rejectReactions = [];
this.result = void 0;
var g = q(this), f = t(this);
try {
b(g, f);
} catch (k) {
s(this, k);
}
this.promiseConstructor = d;
return this;
}
var b = Function("return this")();
if (b.Promise) {
"function" !== typeof b.Promise.all && (b.Promise.all = function(d) {
var g = 0, f = [], k, e, n = new b.Promise(function(b, d) {
k = b;
e = d;
});
d.forEach(function(b, d) {
g++;
b.then(function(b) {
f[d] = b;
g--;
0 === g && k(f);
}, e);
});
0 === g && k(f);
return n;
}), "function" !== typeof b.Promise.resolve && (b.Promise.resolve = function(d) {
return new b.Promise(function(b) {
b(d);
});
});
} else {
var g = [];
d.all = function(b) {
var d = c(this), g = [], k = {countdown:0}, e = 0;
b.forEach(function(b) {
this.cast(b).then(f(e, g, d, k), d.reject);
e++;
k.countdown++;
}, this);
0 === e && d.resolve(g);
return d.promise;
};
d.cast = function(b) {
if (a(b)) {
return b;
}
var d = c(this);
d.resolve(b);
return d.promise;
};
d.reject = function(b) {
var d = c(this);
d.reject(b);
return d.promise;
};
d.resolve = function(b) {
var d = c(this);
d.resolve(b);
return d.promise;
};
d.prototype = {"catch":function(b) {
this.then(void 0, b);
}, then:function(b, d) {
if (!a(this)) {
throw new TypeError("this is not a Promises");
}
var g = c(this.promiseConstructor), f = "function" === typeof d ? d : e, n = {deferred:g, handler:k(this, "function" === typeof b ? b : m, f)}, f = {deferred:g, handler:f};
switch(this.promiseStatus) {
case "unresolved":
this.resolveReactions.push(n);
this.rejectReactions.push(f);
break;
case "has-resolution":
p({reaction:n, argument:this.result});
break;
case "has-rejection":
p({reaction:f, argument:this.result});
}
return g.promise;
}};
b.Promise = d;
}
})();
"undefined" !== typeof exports && (exports.Shumway = Shumway);
(function() {
function c(c, a, s) {
c[a] || Object.defineProperty(c, a, {value:s, writable:!0, configurable:!0, enumerable:!1});
}
c(String.prototype, "padRight", function(c, a) {
var s = this, v = s.replace(/\033\[[0-9]*m/g, "").length;
if (!c || v >= a) {
return s;
}
for (var v = (a - v) / c.length, p = 0;p < v;p++) {
s += c;
}
return s;
});
c(String.prototype, "padLeft", function(c, a) {
var s = this, v = s.length;
if (!c || v >= a) {
return s;
}
for (var v = (a - v) / c.length, p = 0;p < v;p++) {
s = c + s;
}
return s;
});
c(String.prototype, "trim", function() {
return this.replace(/^\s+|\s+$/g, "");
});
c(String.prototype, "endsWith", function(c) {
return-1 !== this.indexOf(c, this.length - c.length);
});
c(Array.prototype, "replace", function(c, a) {
if (c === a) {
return 0;
}
for (var s = 0, v = 0;v < this.length;v++) {
this[v] === c && (this[v] = a, s++);
}
return s;
});
})();
(function(c) {
(function(h) {
var a = c.isObject, s = c.Debug.assert, v = function() {
function e(e, l, q, n) {
this.shortName = e;
this.longName = l;
this.type = q;
n = n || {};
this.positional = n.positional;
this.parseFn = n.parse;
this.value = n.defaultValue;
}
e.prototype.parse = function(e) {
"boolean" === this.type ? (s("boolean" === typeof e), this.value = e) : "number" === this.type ? (s(!isNaN(e), e + " is not a number"), this.value = parseInt(e, 10)) : this.value = e;
this.parseFn && this.parseFn(this.value);
};
return e;
}();
h.Argument = v;
var p = function() {
function e() {
this.args = [];
}
e.prototype.addArgument = function(e, l, q, n) {
e = new v(e, l, q, n);
this.args.push(e);
return e;
};
e.prototype.addBoundOption = function(e) {
this.args.push(new v(e.shortName, e.longName, e.type, {parse:function(l) {
e.value = l;
}}));
};
e.prototype.addBoundOptionSet = function(e) {
var a = this;
e.options.forEach(function(e) {
e instanceof u ? a.addBoundOptionSet(e) : (s(e instanceof l), a.addBoundOption(e));
});
};
e.prototype.getUsage = function() {
var e = "";
this.args.forEach(function(l) {
e = l.positional ? e + l.longName : e + ("[-" + l.shortName + "|--" + l.longName + ("boolean" === l.type ? "" : " " + l.type[0].toUpperCase()) + "]");
e += " ";
});
return e;
};
e.prototype.parse = function(e) {
var l = {}, q = [];
this.args.forEach(function(b) {
b.positional ? q.push(b) : (l["-" + b.shortName] = b, l["--" + b.longName] = b);
});
for (var n = [];e.length;) {
var k = e.shift(), f = null, d = k;
if ("--" == k) {
n = n.concat(e);
break;
} else {
if ("-" == k.slice(0, 1) || "--" == k.slice(0, 2)) {
f = l[k];
if (!f) {
continue;
}
"boolean" !== f.type ? (d = e.shift(), s("-" !== d && "--" !== d, "Argument " + k + " must have a value.")) : d = !0;
} else {
q.length ? f = q.shift() : n.push(d);
}
}
f && f.parse(d);
}
s(0 === q.length, "Missing positional arguments.");
return n;
};
return e;
}();
h.ArgumentParser = p;
var u = function() {
function e(e, l) {
void 0 === l && (l = null);
this.open = !1;
this.name = e;
this.settings = l || {};
this.options = [];
}
e.prototype.register = function(m) {
if (m instanceof e) {
for (var l = 0;l < this.options.length;l++) {
var q = this.options[l];
if (q instanceof e && q.name === m.name) {
return q;
}
}
}
this.options.push(m);
if (this.settings) {
if (m instanceof e) {
l = this.settings[m.name], a(l) && (m.settings = l.settings, m.open = l.open);
} else {
if ("undefined" !== typeof this.settings[m.longName]) {
switch(m.type) {
case "boolean":
m.value = !!this.settings[m.longName];
break;
case "number":
m.value = +this.settings[m.longName];
break;
default:
m.value = this.settings[m.longName];
}
}
}
}
return m;
};
e.prototype.trace = function(e) {
e.enter(this.name + " {");
this.options.forEach(function(l) {
l.trace(e);
});
e.leave("}");
};
e.prototype.getSettings = function() {
var m = {};
this.options.forEach(function(l) {
l instanceof e ? m[l.name] = {settings:l.getSettings(), open:l.open} : m[l.longName] = l.value;
});
return m;
};
e.prototype.setSettings = function(m) {
m && this.options.forEach(function(l) {
l instanceof e ? l.name in m && l.setSettings(m[l.name].settings) : l.longName in m && (l.value = m[l.longName]);
});
};
return e;
}();
h.OptionSet = u;
var l = function() {
function e(e, l, q, n, k, f) {
void 0 === f && (f = null);
this.longName = l;
this.shortName = e;
this.type = q;
this.value = this.defaultValue = n;
this.description = k;
this.config = f;
}
e.prototype.parse = function(e) {
this.value = e;
};
e.prototype.trace = function(e) {
e.writeLn(("-" + this.shortName + "|--" + this.longName).padRight(" ", 30) + " = " + this.type + " " + this.value + " [" + this.defaultValue + "] (" + this.description + ")");
};
return e;
}();
h.Option = l;
})(c.Options || (c.Options = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
function a() {
try {
return "undefined" !== typeof window && "localStorage" in window && null !== window.localStorage;
} catch (a) {
return!1;
}
}
function s(c) {
void 0 === c && (c = h.ROOT);
var s = {};
if (a() && (c = window.localStorage[c])) {
try {
s = JSON.parse(c);
} catch (u) {
}
}
return s;
}
h.ROOT = "Shumway Options";
h.shumwayOptions = new c.Options.OptionSet(h.ROOT, s());
h.isStorageSupported = a;
h.load = s;
h.save = function(c, s) {
void 0 === c && (c = null);
void 0 === s && (s = h.ROOT);
if (a()) {
try {
window.localStorage[s] = JSON.stringify(c ? c : h.shumwayOptions.getSettings());
} catch (u) {
}
}
};
h.setSettings = function(a) {
h.shumwayOptions.setSettings(a);
};
h.getSettings = function(a) {
return h.shumwayOptions.getSettings();
};
})(c.Settings || (c.Settings = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
var a = function() {
function a(s, p) {
this._parent = s;
this._timers = c.ObjectUtilities.createMap();
this._name = p;
this._count = this._total = this._last = this._begin = 0;
}
a.time = function(c, p) {
a.start(c);
p();
a.stop();
};
a.start = function(c) {
a._top = a._top._timers[c] || (a._top._timers[c] = new a(a._top, c));
a._top.start();
c = a._flat._timers[c] || (a._flat._timers[c] = new a(a._flat, c));
c.start();
a._flatStack.push(c);
};
a.stop = function() {
a._top.stop();
a._top = a._top._parent;
a._flatStack.pop().stop();
};
a.stopStart = function(c) {
a.stop();
a.start(c);
};
a.prototype.start = function() {
this._begin = c.getTicks();
};
a.prototype.stop = function() {
this._last = c.getTicks() - this._begin;
this._total += this._last;
this._count += 1;
};
a.prototype.toJSON = function() {
return{name:this._name, total:this._total, timers:this._timers};
};
a.prototype.trace = function(a) {
a.enter(this._name + ": " + this._total.toFixed(2) + " ms, count: " + this._count + ", average: " + (this._total / this._count).toFixed(2) + " ms");
for (var c in this._timers) {
this._timers[c].trace(a);
}
a.outdent();
};
a.trace = function(c) {
a._base.trace(c);
a._flat.trace(c);
};
a._base = new a(null, "Total");
a._top = a._base;
a._flat = new a(null, "Flat");
a._flatStack = [];
return a;
}();
h.Timer = a;
a = function() {
function a(c) {
this._enabled = c;
this.clear();
}
Object.defineProperty(a.prototype, "counts", {get:function() {
return this._counts;
}, enumerable:!0, configurable:!0});
a.prototype.setEnabled = function(a) {
this._enabled = a;
};
a.prototype.clear = function() {
this._counts = c.ObjectUtilities.createMap();
this._times = c.ObjectUtilities.createMap();
};
a.prototype.toJSON = function() {
return{counts:this._counts, times:this._times};
};
a.prototype.count = function(a, c, s) {
void 0 === c && (c = 1);
void 0 === s && (s = 0);
if (this._enabled) {
return void 0 === this._counts[a] && (this._counts[a] = 0, this._times[a] = 0), this._counts[a] += c, this._times[a] += s, this._counts[a];
}
};
a.prototype.trace = function(a) {
for (var c in this._counts) {
a.writeLn(c + ": " + this._counts[c]);
}
};
a.prototype._pairToString = function(a, c) {
var s = c[0], l = c[1], e = a[s], s = s + ": " + l;
e && (s += ", " + e.toFixed(4), 1 < l && (s += " (" + (e / l).toFixed(4) + ")"));
return s;
};
a.prototype.toStringSorted = function() {
var a = this, c = this._times, s = [], l;
for (l in this._counts) {
s.push([l, this._counts[l]]);
}
s.sort(function(e, m) {
return m[1] - e[1];
});
return s.map(function(e) {
return a._pairToString(c, e);
}).join(", ");
};
a.prototype.traceSorted = function(a) {
var c = !0;
void 0 === c && (c = !1);
var s = this, l = this._times, e = [], m;
for (m in this._counts) {
e.push([m, this._counts[m]]);
}
e.sort(function(e, m) {
return m[1] - e[1];
});
c ? a.writeLn(e.map(function(e) {
return s._pairToString(l, e);
}).join(", ")) : e.forEach(function(e) {
a.writeLn(s._pairToString(l, e));
});
};
a.instance = new a(!0);
return a;
}();
h.Counter = a;
a = function() {
function a(c) {
this._samples = new Float64Array(c);
this._index = this._count = 0;
}
a.prototype.push = function(a) {
this._count < this._samples.length && this._count++;
this._index++;
this._samples[this._index % this._samples.length] = a;
};
a.prototype.average = function() {
for (var a = 0, c = 0;c < this._count;c++) {
a += this._samples[c];
}
return a / this._count;
};
return a;
}();
h.Average = a;
})(c.Metrics || (c.Metrics = {}));
})(Shumway || (Shumway = {}));
var __extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(h) {
function a(b) {
for (var d = Math.max.apply(null, b), f = b.length, k = 1 << d, e = new Uint32Array(k), n = d << 16 | 65535, m = 0;m < k;m++) {
e[m] = n;
}
for (var n = 0, m = 1, l = 2;m <= d;n <<= 1, ++m, l <<= 1) {
for (var q = 0;q < f;++q) {
if (b[q] === m) {
for (var a = 0, t = 0;t < m;++t) {
a = 2 * a + (n >> t & 1);
}
for (t = a;t < k;t += l) {
e[t] = m << 16 | q;
}
++n;
}
}
}
return{codes:e, maxBits:d};
}
var s;
(function(b) {
b[b.INIT = 0] = "INIT";
b[b.BLOCK_0 = 1] = "BLOCK_0";
b[b.BLOCK_1 = 2] = "BLOCK_1";
b[b.BLOCK_2_PRE = 3] = "BLOCK_2_PRE";
b[b.BLOCK_2 = 4] = "BLOCK_2";
b[b.DONE = 5] = "DONE";
b[b.ERROR = 6] = "ERROR";
b[b.VERIFY_HEADER = 7] = "VERIFY_HEADER";
})(s || (s = {}));
s = function() {
function b(b) {
this._error = null;
}
Object.defineProperty(b.prototype, "error", {get:function() {
return this._error;
}, enumerable:!0, configurable:!0});
b.prototype.push = function(b) {
c.Debug.abstractMethod("Inflate.push");
};
b.prototype.close = function() {
};
b.create = function(b) {
return "undefined" !== typeof SpecialInflate ? new k(b) : new v(b);
};
b.prototype._processZLibHeader = function(b, d, f) {
if (d + 2 > f) {
return 0;
}
b = b[d] << 8 | b[d + 1];
d = null;
2048 !== (b & 3840) ? d = "inflate: unknown compression method" : 0 !== b % 31 ? d = "inflate: bad FCHECK" : 0 !== (b & 32) && (d = "inflate: FDICT bit set");
return d ? (this._error = d, -1) : 2;
};
b.inflate = function(d, f, k) {
var e = new Uint8Array(f), n = 0;
f = b.create(k);
f.onData = function(b) {
e.set(b, n);
n += b.length;
};
f.push(d);
f.close();
return e;
};
return b;
}();
h.Inflate = s;
var v = function(b) {
function d(g) {
b.call(this, g);
this._buffer = null;
this._bitLength = this._bitBuffer = this._bufferPosition = this._bufferSize = 0;
this._window = new Uint8Array(65794);
this._windowPosition = 0;
this._state = g ? 7 : 0;
this._isFinalBlock = !1;
this._distanceTable = this._literalTable = null;
this._block0Read = 0;
this._block2State = null;
this._copyState = {state:0, len:0, lenBits:0, dist:0, distBits:0};
this._error = void 0;
if (!n) {
p = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);
u = new Uint16Array(30);
l = new Uint8Array(30);
for (var f = g = 0, k = 1;30 > g;++g) {
u[g] = k, k += 1 << (l[g] = ~~((f += 2 < g ? 1 : 0) / 2));
}
var A = new Uint8Array(288);
for (g = 0;32 > g;++g) {
A[g] = 5;
}
e = a(A.subarray(0, 32));
m = new Uint16Array(29);
t = new Uint8Array(29);
f = g = 0;
for (k = 3;29 > g;++g) {
m[g] = k - (28 == g ? 1 : 0), k += 1 << (t[g] = ~~((f += 4 < g ? 1 : 0) / 4 % 6));
}
for (g = 0;288 > g;++g) {
A[g] = 144 > g || 279 < g ? 8 : 256 > g ? 9 : 7;
}
q = a(A);
n = !0;
}
}
__extends(d, b);
Object.defineProperty(d.prototype, "error", {get:function() {
return this._error;
}, enumerable:!0, configurable:!0});
d.prototype.push = function(b) {
if (!this._buffer || this._buffer.length < this._bufferSize + b.length) {
var d = new Uint8Array(this._bufferSize + b.length);
this._buffer && d.set(this._buffer);
this._buffer = d;
}
this._buffer.set(b, this._bufferSize);
this._bufferSize += b.length;
this._bufferPosition = 0;
b = !1;
do {
d = this._windowPosition;
if (0 === this._state && (b = this._decodeInitState())) {
break;
}
switch(this._state) {
case 1:
b = this._decodeBlock0();
break;
case 3:
if (b = this._decodeBlock2Pre()) {
break;
}
;
case 2:
;
case 4:
b = this._decodeBlock();
break;
case 6:
;
case 5:
this._bufferPosition = this._bufferSize;
break;
case 7:
var g = this._processZLibHeader(this._buffer, this._bufferPosition, this._bufferSize);
0 < g ? (this._bufferPosition += g, this._state = 0) : 0 === g ? b = !0 : this._state = 6;
}
if (0 < this._windowPosition - d) {
this.onData(this._window.subarray(d, this._windowPosition));
}
65536 <= this._windowPosition && ("copyWithin" in this._buffer ? this._window.copyWithin(0, this._windowPosition - 32768, this._windowPosition) : this._window.set(this._window.subarray(this._windowPosition - 32768, this._windowPosition)), this._windowPosition = 32768);
} while (!b && this._bufferPosition < this._bufferSize);
this._bufferPosition < this._bufferSize ? ("copyWithin" in this._buffer ? this._buffer.copyWithin(0, this._bufferPosition, this._bufferSize) : this._buffer.set(this._buffer.subarray(this._bufferPosition, this._bufferSize)), this._bufferSize -= this._bufferPosition) : this._bufferSize = 0;
};
d.prototype._decodeInitState = function() {
if (this._isFinalBlock) {
return this._state = 5, !1;
}
var b = this._buffer, d = this._bufferSize, g = this._bitBuffer, f = this._bitLength, k = this._bufferPosition;
if (3 > (d - k << 3) + f) {
return!0;
}
3 > f && (g |= b[k++] << f, f += 8);
var n = g & 7, g = g >> 3, f = f - 3;
switch(n >> 1) {
case 0:
f = g = 0;
if (4 > d - k) {
return!0;
}
var m = b[k] | b[k + 1] << 8, b = b[k + 2] | b[k + 3] << 8, k = k + 4;
if (65535 !== (m ^ b)) {
this._error = "inflate: invalid block 0 length";
b = 6;
break;
}
0 === m ? b = 0 : (this._block0Read = m, b = 1);
break;
case 1:
b = 2;
this._literalTable = q;
this._distanceTable = e;
break;
case 2:
if (26 > (d - k << 3) + f) {
return!0;
}
for (;14 > f;) {
g |= b[k++] << f, f += 8;
}
m = (g >> 10 & 15) + 4;
if ((d - k << 3) + f < 14 + 3 * m) {
return!0;
}
for (var d = {numLiteralCodes:(g & 31) + 257, numDistanceCodes:(g >> 5 & 31) + 1, codeLengthTable:void 0, bitLengths:void 0, codesRead:0, dupBits:0}, g = g >> 14, f = f - 14, l = new Uint8Array(19), t = 0;t < m;++t) {
3 > f && (g |= b[k++] << f, f += 8), l[p[t]] = g & 7, g >>= 3, f -= 3;
}
for (;19 > t;t++) {
l[p[t]] = 0;
}
d.bitLengths = new Uint8Array(d.numLiteralCodes + d.numDistanceCodes);
d.codeLengthTable = a(l);
this._block2State = d;
b = 3;
break;
default:
return this._error = "inflate: unsupported block type", !1;
}
this._isFinalBlock = !!(n & 1);
this._state = b;
this._bufferPosition = k;
this._bitBuffer = g;
this._bitLength = f;
return!1;
};
d.prototype._decodeBlock0 = function() {
var b = this._bufferPosition, d = this._windowPosition, g = this._block0Read, f = 65794 - d, k = this._bufferSize - b, e = k < g, n = Math.min(f, k, g);
this._window.set(this._buffer.subarray(b, b + n), d);
this._windowPosition = d + n;
this._bufferPosition = b + n;
this._block0Read = g - n;
return g === n ? (this._state = 0, !1) : e && f < k;
};
d.prototype._readBits = function(b) {
var d = this._bitBuffer, g = this._bitLength;
if (b > g) {
var f = this._bufferPosition, k = this._bufferSize;
do {
if (f >= k) {
return this._bufferPosition = f, this._bitBuffer = d, this._bitLength = g, -1;
}
d |= this._buffer[f++] << g;
g += 8;
} while (b > g);
this._bufferPosition = f;
}
this._bitBuffer = d >> b;
this._bitLength = g - b;
return d & (1 << b) - 1;
};
d.prototype._readCode = function(b) {
var d = this._bitBuffer, g = this._bitLength, f = b.maxBits;
if (f > g) {
var k = this._bufferPosition, e = this._bufferSize;
do {
if (k >= e) {
return this._bufferPosition = k, this._bitBuffer = d, this._bitLength = g, -1;
}
d |= this._buffer[k++] << g;
g += 8;
} while (f > g);
this._bufferPosition = k;
}
b = b.codes[d & (1 << f) - 1];
f = b >> 16;
if (b & 32768) {
return this._error = "inflate: invalid encoding", this._state = 6, -1;
}
this._bitBuffer = d >> f;
this._bitLength = g - f;
return b & 65535;
};
d.prototype._decodeBlock2Pre = function() {
var b = this._block2State, d = b.numLiteralCodes + b.numDistanceCodes, g = b.bitLengths, f = b.codesRead, k = 0 < f ? g[f - 1] : 0, e = b.codeLengthTable, n;
if (0 < b.dupBits) {
n = this._readBits(b.dupBits);
if (0 > n) {
return!0;
}
for (;n--;) {
g[f++] = k;
}
b.dupBits = 0;
}
for (;f < d;) {
var m = this._readCode(e);
if (0 > m) {
return b.codesRead = f, !0;
}
if (16 > m) {
g[f++] = k = m;
} else {
var l;
switch(m) {
case 16:
l = 2;
n = 3;
m = k;
break;
case 17:
n = l = 3;
m = 0;
break;
case 18:
l = 7, n = 11, m = 0;
}
for (;n--;) {
g[f++] = m;
}
n = this._readBits(l);
if (0 > n) {
return b.codesRead = f, b.dupBits = l, !0;
}
for (;n--;) {
g[f++] = m;
}
k = m;
}
}
this._literalTable = a(g.subarray(0, b.numLiteralCodes));
this._distanceTable = a(g.subarray(b.numLiteralCodes));
this._state = 4;
this._block2State = null;
return!1;
};
d.prototype._decodeBlock = function() {
var b = this._literalTable, d = this._distanceTable, g = this._window, f = this._windowPosition, k = this._copyState, e, n, q, a;
if (0 !== k.state) {
switch(k.state) {
case 1:
if (0 > (e = this._readBits(k.lenBits))) {
return!0;
}
k.len += e;
k.state = 2;
case 2:
if (0 > (e = this._readCode(d))) {
return!0;
}
k.distBits = l[e];
k.dist = u[e];
k.state = 3;
case 3:
e = 0;
if (0 < k.distBits && 0 > (e = this._readBits(k.distBits))) {
return!0;
}
a = k.dist + e;
n = k.len;
for (e = f - a;n--;) {
g[f++] = g[e++];
}
k.state = 0;
if (65536 <= f) {
return this._windowPosition = f, !1;
}
break;
}
}
do {
e = this._readCode(b);
if (0 > e) {
return this._windowPosition = f, !0;
}
if (256 > e) {
g[f++] = e;
} else {
if (256 < e) {
this._windowPosition = f;
e -= 257;
q = t[e];
n = m[e];
e = 0 === q ? 0 : this._readBits(q);
if (0 > e) {
return k.state = 1, k.len = n, k.lenBits = q, !0;
}
n += e;
e = this._readCode(d);
if (0 > e) {
return k.state = 2, k.len = n, !0;
}
q = l[e];
a = u[e];
e = 0 === q ? 0 : this._readBits(q);
if (0 > e) {
return k.state = 3, k.len = n, k.dist = a, k.distBits = q, !0;
}
a += e;
for (e = f - a;n--;) {
g[f++] = g[e++];
}
} else {
this._state = 0;
break;
}
}
} while (65536 > f);
this._windowPosition = f;
return!1;
};
return d;
}(s), p, u, l, e, m, t, q, n = !1, k = function(b) {
function d(g) {
b.call(this, g);
this._verifyHeader = g;
this._specialInflate = new SpecialInflate;
this._specialInflate.onData = function(b) {
this.onData(b);
}.bind(this);
}
__extends(d, b);
d.prototype.push = function(b) {
if (this._verifyHeader) {
var d;
this._buffer ? (d = new Uint8Array(this._buffer.length + b.length), d.set(this._buffer), d.set(b, this._buffer.length), this._buffer = null) : d = new Uint8Array(b);
var g = this._processZLibHeader(d, 0, d.length);
if (0 === g) {
this._buffer = d;
return;
}
this._verifyHeader = !0;
0 < g && (b = d.subarray(g));
}
this._error || this._specialInflate.push(b);
};
d.prototype.close = function() {
this._specialInflate && (this._specialInflate.close(), this._specialInflate = null);
};
return d;
}(s), f;
(function(b) {
b[b.WRITE = 0] = "WRITE";
b[b.DONE = 1] = "DONE";
b[b.ZLIB_HEADER = 2] = "ZLIB_HEADER";
})(f || (f = {}));
var d = function() {
function b() {
this.a = 1;
this.b = 0;
}
b.prototype.update = function(b, d, f) {
for (var k = this.a, e = this.b;d < f;++d) {
k = (k + (b[d] & 255)) % 65521, e = (e + k) % 65521;
}
this.a = k;
this.b = e;
};
b.prototype.getChecksum = function() {
return this.b << 16 | this.a;
};
return b;
}();
h.Adler32 = d;
f = function() {
function b(b) {
this._state = (this._writeZlibHeader = b) ? 2 : 0;
this._adler32 = b ? new d : null;
}
b.prototype.push = function(b) {
2 === this._state && (this.onData(new Uint8Array([120, 156])), this._state = 0);
for (var d = b.length, f = new Uint8Array(d + 5 * Math.ceil(d / 65535)), k = 0, e = 0;65535 < d;) {
f.set(new Uint8Array([0, 255, 255, 0, 0]), k), k += 5, f.set(b.subarray(e, e + 65535), k), e += 65535, k += 65535, d -= 65535;
}
f.set(new Uint8Array([0, d & 255, d >> 8 & 255, ~d & 255, ~d >> 8 & 255]), k);
f.set(b.subarray(e, d), k + 5);
this.onData(f);
this._adler32 && this._adler32.update(b, 0, d);
};
b.prototype.finish = function() {
this._state = 1;
this.onData(new Uint8Array([1, 0, 0, 255, 255]));
if (this._adler32) {
var b = this._adler32.getChecksum();
this.onData(new Uint8Array([b & 255, b >> 8 & 255, b >> 16 & 255, b >>> 24 & 255]));
}
};
return b;
}();
h.Deflate = f;
})(c.ArrayUtilities || (c.ArrayUtilities = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
function a(k, f) {
k !== l(k, 0, f) && throwError("RangeError", Errors.ParamRangeError);
}
function s(k) {
return "string" === typeof k ? k : void 0 == k ? null : k + "";
}
var v = c.Debug.notImplemented, p = c.StringUtilities.utf8decode, u = c.StringUtilities.utf8encode, l = c.NumberUtilities.clamp, e = function() {
return function(k, f, d) {
this.buffer = k;
this.length = f;
this.littleEndian = d;
};
}();
h.PlainObjectDataBuffer = e;
for (var m = new Uint32Array(33), t = 1, q = 0;32 >= t;t++) {
m[t] = q = q << 1 | 1;
}
var n;
(function(k) {
k[k.U8 = 1] = "U8";
k[k.I32 = 2] = "I32";
k[k.F32 = 4] = "F32";
})(n || (n = {}));
t = function() {
function k(f) {
void 0 === f && (f = k.INITIAL_SIZE);
this._buffer || (this._buffer = new ArrayBuffer(f), this._position = this._length = 0, this._resetViews(), this._littleEndian = k._nativeLittleEndian, this._bitLength = this._bitBuffer = 0);
}
k.FromArrayBuffer = function(f, d) {
void 0 === d && (d = -1);
var b = Object.create(k.prototype);
b._buffer = f;
b._length = -1 === d ? f.byteLength : d;
b._position = 0;
b._resetViews();
b._littleEndian = k._nativeLittleEndian;
b._bitBuffer = 0;
b._bitLength = 0;
return b;
};
k.FromPlainObject = function(f) {
var d = k.FromArrayBuffer(f.buffer, f.length);
d._littleEndian = f.littleEndian;
return d;
};
k.prototype.toPlainObject = function() {
return new e(this._buffer, this._length, this._littleEndian);
};
k.prototype._resetViews = function() {
this._u8 = new Uint8Array(this._buffer);
this._f32 = this._i32 = null;
};
k.prototype._requestViews = function(f) {
0 === (this._buffer.byteLength & 3) && (null === this._i32 && f & 2 && (this._i32 = new Int32Array(this._buffer)), null === this._f32 && f & 4 && (this._f32 = new Float32Array(this._buffer)));
};
k.prototype.getBytes = function() {
return new Uint8Array(this._buffer, 0, this._length);
};
k.prototype._ensureCapacity = function(f) {
var d = this._buffer;
if (d.byteLength < f) {
for (var b = Math.max(d.byteLength, 1);b < f;) {
b *= 2;
}
f = k._arrayBufferPool.acquire(b);
b = this._u8;
this._buffer = f;
this._resetViews();
this._u8.set(b);
k._arrayBufferPool.release(d);
}
};
k.prototype.clear = function() {
this._position = this._length = 0;
};
k.prototype.readBoolean = function() {
return 0 !== this.readUnsignedByte();
};
k.prototype.readByte = function() {
return this.readUnsignedByte() << 24 >> 24;
};
k.prototype.readUnsignedByte = function() {
this._position + 1 > this._length && throwError("EOFError", Errors.EOFError);
return this._u8[this._position++];
};
k.prototype.readBytes = function(f, d, b) {
void 0 === d && (d = 0);
void 0 === b && (b = 0);
var g = this._position;
d || (d = 0);
b || (b = this._length - g);
g + b > this._length && throwError("EOFError", Errors.EOFError);
f.length < d + b && (f._ensureCapacity(d + b), f.length = d + b);
f._u8.set(new Uint8Array(this._buffer, g, b), d);
this._position += b;
};
k.prototype.readShort = function() {
return this.readUnsignedShort() << 16 >> 16;
};
k.prototype.readUnsignedShort = function() {
var f = this._u8, d = this._position;
d + 2 > this._length && throwError("EOFError", Errors.EOFError);
var b = f[d + 0], f = f[d + 1];
this._position = d + 2;
return this._littleEndian ? f << 8 | b : b << 8 | f;
};
k.prototype.readInt = function() {
var f = this._u8, d = this._position;
d + 4 > this._length && throwError("EOFError", Errors.EOFError);
var b = f[d + 0], g = f[d + 1], k = f[d + 2], f = f[d + 3];
this._position = d + 4;
return this._littleEndian ? f << 24 | k << 16 | g << 8 | b : b << 24 | g << 16 | k << 8 | f;
};
k.prototype.readUnsignedInt = function() {
return this.readInt() >>> 0;
};
k.prototype.readFloat = function() {
var f = this._position;
f + 4 > this._length && throwError("EOFError", Errors.EOFError);
this._position = f + 4;
this._requestViews(4);
if (this._littleEndian && 0 === (f & 3) && this._f32) {
return this._f32[f >> 2];
}
var d = this._u8, b = c.IntegerUtilities.u8;
this._littleEndian ? (b[0] = d[f + 0], b[1] = d[f + 1], b[2] = d[f + 2], b[3] = d[f + 3]) : (b[3] = d[f + 0], b[2] = d[f + 1], b[1] = d[f + 2], b[0] = d[f + 3]);
return c.IntegerUtilities.f32[0];
};
k.prototype.readDouble = function() {
var f = this._u8, d = this._position;
d + 8 > this._length && throwError("EOFError", Errors.EOFError);
var b = c.IntegerUtilities.u8;
this._littleEndian ? (b[0] = f[d + 0], b[1] = f[d + 1], b[2] = f[d + 2], b[3] = f[d + 3], b[4] = f[d + 4], b[5] = f[d + 5], b[6] = f[d + 6], b[7] = f[d + 7]) : (b[0] = f[d + 7], b[1] = f[d + 6], b[2] = f[d + 5], b[3] = f[d + 4], b[4] = f[d + 3], b[5] = f[d + 2], b[6] = f[d + 1], b[7] = f[d + 0]);
this._position = d + 8;
return c.IntegerUtilities.f64[0];
};
k.prototype.writeBoolean = function(f) {
this.writeByte(f ? 1 : 0);
};
k.prototype.writeByte = function(f) {
var d = this._position + 1;
this._ensureCapacity(d);
this._u8[this._position++] = f;
d > this._length && (this._length = d);
};
k.prototype.writeUnsignedByte = function(f) {
var d = this._position + 1;
this._ensureCapacity(d);
this._u8[this._position++] = f;
d > this._length && (this._length = d);
};
k.prototype.writeRawBytes = function(f) {
var d = this._position + f.length;
this._ensureCapacity(d);
this._u8.set(f, this._position);
this._position = d;
d > this._length && (this._length = d);
};
k.prototype.writeBytes = function(f, d, b) {
void 0 === d && (d = 0);
void 0 === b && (b = 0);
c.isNullOrUndefined(f) && throwError("TypeError", Errors.NullPointerError, "bytes");
2 > arguments.length && (d = 0);
3 > arguments.length && (b = 0);
a(d, f.length);
a(d + b, f.length);
0 === b && (b = f.length - d);
this.writeRawBytes(new Int8Array(f._buffer, d, b));
};
k.prototype.writeShort = function(f) {
this.writeUnsignedShort(f);
};
k.prototype.writeUnsignedShort = function(f) {
var d = this._position;
this._ensureCapacity(d + 2);
var b = this._u8;
this._littleEndian ? (b[d + 0] = f, b[d + 1] = f >> 8) : (b[d + 0] = f >> 8, b[d + 1] = f);
this._position = d += 2;
d > this._length && (this._length = d);
};
k.prototype.writeInt = function(f) {
this.writeUnsignedInt(f);
};
k.prototype.write2Ints = function(f, d) {
this.write2UnsignedInts(f, d);
};
k.prototype.write4Ints = function(f, d, b, g) {
this.write4UnsignedInts(f, d, b, g);
};
k.prototype.writeUnsignedInt = function(f) {
var d = this._position;
this._ensureCapacity(d + 4);
this._requestViews(2);
if (this._littleEndian === k._nativeLittleEndian && 0 === (d & 3) && this._i32) {
this._i32[d >> 2] = f;
} else {
var b = this._u8;
this._littleEndian ? (b[d + 0] = f, b[d + 1] = f >> 8, b[d + 2] = f >> 16, b[d + 3] = f >> 24) : (b[d + 0] = f >> 24, b[d + 1] = f >> 16, b[d + 2] = f >> 8, b[d + 3] = f);
}
this._position = d += 4;
d > this._length && (this._length = d);
};
k.prototype.write2UnsignedInts = function(f, d) {
var b = this._position;
this._ensureCapacity(b + 8);
this._requestViews(2);
this._littleEndian === k._nativeLittleEndian && 0 === (b & 3) && this._i32 ? (this._i32[(b >> 2) + 0] = f, this._i32[(b >> 2) + 1] = d, this._position = b += 8, b > this._length && (this._length = b)) : (this.writeUnsignedInt(f), this.writeUnsignedInt(d));
};
k.prototype.write4UnsignedInts = function(f, d, b, g) {
var r = this._position;
this._ensureCapacity(r + 16);
this._requestViews(2);
this._littleEndian === k._nativeLittleEndian && 0 === (r & 3) && this._i32 ? (this._i32[(r >> 2) + 0] = f, this._i32[(r >> 2) + 1] = d, this._i32[(r >> 2) + 2] = b, this._i32[(r >> 2) + 3] = g, this._position = r += 16, r > this._length && (this._length = r)) : (this.writeUnsignedInt(f), this.writeUnsignedInt(d), this.writeUnsignedInt(b), this.writeUnsignedInt(g));
};
k.prototype.writeFloat = function(f) {
var d = this._position;
this._ensureCapacity(d + 4);
this._requestViews(4);
if (this._littleEndian === k._nativeLittleEndian && 0 === (d & 3) && this._f32) {
this._f32[d >> 2] = f;
} else {
var b = this._u8;
c.IntegerUtilities.f32[0] = f;
f = c.IntegerUtilities.u8;
this._littleEndian ? (b[d + 0] = f[0], b[d + 1] = f[1], b[d + 2] = f[2], b[d + 3] = f[3]) : (b[d + 0] = f[3], b[d + 1] = f[2], b[d + 2] = f[1], b[d + 3] = f[0]);
}
this._position = d += 4;
d > this._length && (this._length = d);
};
k.prototype.write6Floats = function(f, d, b, g, r, e) {
var n = this._position;
this._ensureCapacity(n + 24);
this._requestViews(4);
this._littleEndian === k._nativeLittleEndian && 0 === (n & 3) && this._f32 ? (this._f32[(n >> 2) + 0] = f, this._f32[(n >> 2) + 1] = d, this._f32[(n >> 2) + 2] = b, this._f32[(n >> 2) + 3] = g, this._f32[(n >> 2) + 4] = r, this._f32[(n >> 2) + 5] = e, this._position = n += 24, n > this._length && (this._length = n)) : (this.writeFloat(f), this.writeFloat(d), this.writeFloat(b), this.writeFloat(g), this.writeFloat(r), this.writeFloat(e));
};
k.prototype.writeDouble = function(f) {
var d = this._position;
this._ensureCapacity(d + 8);
var b = this._u8;
c.IntegerUtilities.f64[0] = f;
f = c.IntegerUtilities.u8;
this._littleEndian ? (b[d + 0] = f[0], b[d + 1] = f[1], b[d + 2] = f[2], b[d + 3] = f[3], b[d + 4] = f[4], b[d + 5] = f[5], b[d + 6] = f[6], b[d + 7] = f[7]) : (b[d + 0] = f[7], b[d + 1] = f[6], b[d + 2] = f[5], b[d + 3] = f[4], b[d + 4] = f[3], b[d + 5] = f[2], b[d + 6] = f[1], b[d + 7] = f[0]);
this._position = d += 8;
d > this._length && (this._length = d);
};
k.prototype.readRawBytes = function() {
return new Int8Array(this._buffer, 0, this._length);
};
k.prototype.writeUTF = function(f) {
f = s(f);
f = p(f);
this.writeShort(f.length);
this.writeRawBytes(f);
};
k.prototype.writeUTFBytes = function(f) {
f = s(f);
f = p(f);
this.writeRawBytes(f);
};
k.prototype.readUTF = function() {
return this.readUTFBytes(this.readShort());
};
k.prototype.readUTFBytes = function(f) {
f >>>= 0;
var d = this._position;
d + f > this._length && throwError("EOFError", Errors.EOFError);
this._position += f;
return u(new Int8Array(this._buffer, d, f));
};
Object.defineProperty(k.prototype, "length", {get:function() {
return this._length;
}, set:function(f) {
f >>>= 0;
f > this._buffer.byteLength && this._ensureCapacity(f);
this._length = f;
this._position = l(this._position, 0, this._length);
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "bytesAvailable", {get:function() {
return this._length - this._position;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "position", {get:function() {
return this._position;
}, set:function(f) {
this._position = f >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "buffer", {get:function() {
return this._buffer;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "bytes", {get:function() {
return this._u8;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "ints", {get:function() {
this._requestViews(2);
return this._i32;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "objectEncoding", {get:function() {
return this._objectEncoding;
}, set:function(f) {
this._objectEncoding = f >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "endian", {get:function() {
return this._littleEndian ? "littleEndian" : "bigEndian";
}, set:function(f) {
f = s(f);
this._littleEndian = "auto" === f ? k._nativeLittleEndian : "littleEndian" === f;
}, enumerable:!0, configurable:!0});
k.prototype.toString = function() {
return u(new Int8Array(this._buffer, 0, this._length));
};
k.prototype.toBlob = function(f) {
return new Blob([new Int8Array(this._buffer, this._position, this._length)], {type:f});
};
k.prototype.writeMultiByte = function(f, d) {
v("packageInternal flash.utils.ObjectOutput::writeMultiByte");
};
k.prototype.readMultiByte = function(f, d) {
v("packageInternal flash.utils.ObjectInput::readMultiByte");
};
k.prototype.getValue = function(f) {
f |= 0;
return f >= this._length ? void 0 : this._u8[f];
};
k.prototype.setValue = function(f, d) {
f |= 0;
var b = f + 1;
this._ensureCapacity(b);
this._u8[f] = d;
b > this._length && (this._length = b);
};
k.prototype.readFixed = function() {
return this.readInt() / 65536;
};
k.prototype.readFixed8 = function() {
return this.readShort() / 256;
};
k.prototype.readFloat16 = function() {
var f = this.readUnsignedShort(), d = f >> 15 ? -1 : 1, b = (f & 31744) >> 10, f = f & 1023;
return b ? 31 === b ? f ? NaN : Infinity * d : d * Math.pow(2, b - 15) * (1 + f / 1024) : f / 1024 * Math.pow(2, -14) * d;
};
k.prototype.readEncodedU32 = function() {
var f = this.readUnsignedByte();
if (!(f & 128)) {
return f;
}
f = f & 127 | this.readUnsignedByte() << 7;
if (!(f & 16384)) {
return f;
}
f = f & 16383 | this.readUnsignedByte() << 14;
if (!(f & 2097152)) {
return f;
}
f = f & 2097151 | this.readUnsignedByte() << 21;
return f & 268435456 ? f & 268435455 | this.readUnsignedByte() << 28 : f;
};
k.prototype.readBits = function(f) {
return this.readUnsignedBits(f) << 32 - f >> 32 - f;
};
k.prototype.readUnsignedBits = function(f) {
for (var d = this._bitBuffer, b = this._bitLength;f > b;) {
d = d << 8 | this.readUnsignedByte(), b += 8;
}
b -= f;
f = d >>> b & m[f];
this._bitBuffer = d;
this._bitLength = b;
return f;
};
k.prototype.readFixedBits = function(f) {
return this.readBits(f) / 65536;
};
k.prototype.readString = function(f) {
var d = this._position;
if (f) {
d + f > this._length && throwError("EOFError", Errors.EOFError), this._position += f;
} else {
f = 0;
for (var b = d;b < this._length && this._u8[b];b++) {
f++;
}
this._position += f + 1;
}
return u(new Int8Array(this._buffer, d, f));
};
k.prototype.align = function() {
this._bitLength = this._bitBuffer = 0;
};
k.prototype._compress = function(f) {
f = s(f);
switch(f) {
case "zlib":
f = new h.Deflate(!0);
break;
case "deflate":
f = new h.Deflate(!1);
break;
default:
return;
}
var d = new k;
f.onData = d.writeRawBytes.bind(d);
f.push(this._u8.subarray(0, this._length));
f.finish();
this._ensureCapacity(d._u8.length);
this._u8.set(d._u8);
this.length = d.length;
this._position = 0;
};
k.prototype._uncompress = function(f) {
f = s(f);
switch(f) {
case "zlib":
f = h.Inflate.create(!0);
break;
case "deflate":
f = h.Inflate.create(!1);
break;
default:
return;
}
var d = new k;
f.onData = d.writeRawBytes.bind(d);
f.push(this._u8.subarray(0, this._length));
f.error && throwError("IOError", Errors.CompressedDataError);
f.close();
this._ensureCapacity(d._u8.length);
this._u8.set(d._u8);
this.length = d.length;
this._position = 0;
};
k._nativeLittleEndian = 1 === (new Int8Array((new Int32Array([1])).buffer))[0];
k.INITIAL_SIZE = 128;
k._arrayBufferPool = new c.ArrayBufferPool;
return k;
}();
h.DataBuffer = t;
})(c.ArrayUtilities || (c.ArrayUtilities = {}));
})(Shumway || (Shumway = {}));
(function(c) {
var h = c.ArrayUtilities.DataBuffer, a = c.ArrayUtilities.ensureTypedArrayCapacity, s = c.Debug.assert;
(function(a) {
a[a.BeginSolidFill = 1] = "BeginSolidFill";
a[a.BeginGradientFill = 2] = "BeginGradientFill";
a[a.BeginBitmapFill = 3] = "BeginBitmapFill";
a[a.EndFill = 4] = "EndFill";
a[a.LineStyleSolid = 5] = "LineStyleSolid";
a[a.LineStyleGradient = 6] = "LineStyleGradient";
a[a.LineStyleBitmap = 7] = "LineStyleBitmap";
a[a.LineEnd = 8] = "LineEnd";
a[a.MoveTo = 9] = "MoveTo";
a[a.LineTo = 10] = "LineTo";
a[a.CurveTo = 11] = "CurveTo";
a[a.CubicCurveTo = 12] = "CubicCurveTo";
})(c.PathCommand || (c.PathCommand = {}));
(function(a) {
a[a.Linear = 16] = "Linear";
a[a.Radial = 18] = "Radial";
})(c.GradientType || (c.GradientType = {}));
(function(a) {
a[a.Pad = 0] = "Pad";
a[a.Reflect = 1] = "Reflect";
a[a.Repeat = 2] = "Repeat";
})(c.GradientSpreadMethod || (c.GradientSpreadMethod = {}));
(function(a) {
a[a.RGB = 0] = "RGB";
a[a.LinearRGB = 1] = "LinearRGB";
})(c.GradientInterpolationMethod || (c.GradientInterpolationMethod = {}));
(function(a) {
a[a.None = 0] = "None";
a[a.Normal = 1] = "Normal";
a[a.Vertical = 2] = "Vertical";
a[a.Horizontal = 3] = "Horizontal";
})(c.LineScaleMode || (c.LineScaleMode = {}));
var v = function() {
return function(a, l, e, m, t, q, n, k, f, d, b) {
this.commands = a;
this.commandsPosition = l;
this.coordinates = e;
this.morphCoordinates = m;
this.coordinatesPosition = t;
this.styles = q;
this.stylesLength = n;
this.morphStyles = k;
this.morphStylesLength = f;
this.hasFills = d;
this.hasLines = b;
};
}();
c.PlainObjectShapeData = v;
var p;
(function(a) {
a[a.Commands = 32] = "Commands";
a[a.Coordinates = 128] = "Coordinates";
a[a.Styles = 16] = "Styles";
})(p || (p = {}));
p = function() {
function c(l) {
void 0 === l && (l = !0);
l && this.clear();
}
c.FromPlainObject = function(l) {
var e = new c(!1);
e.commands = l.commands;
e.coordinates = l.coordinates;
e.morphCoordinates = l.morphCoordinates;
e.commandsPosition = l.commandsPosition;
e.coordinatesPosition = l.coordinatesPosition;
e.styles = h.FromArrayBuffer(l.styles, l.stylesLength);
e.styles.endian = "auto";
l.morphStyles && (e.morphStyles = h.FromArrayBuffer(l.morphStyles, l.morphStylesLength), e.morphStyles.endian = "auto");
e.hasFills = l.hasFills;
e.hasLines = l.hasLines;
return e;
};
c.prototype.moveTo = function(l, e) {
this.ensurePathCapacities(1, 2);
this.commands[this.commandsPosition++] = 9;
this.coordinates[this.coordinatesPosition++] = l;
this.coordinates[this.coordinatesPosition++] = e;
};
c.prototype.lineTo = function(l, e) {
this.ensurePathCapacities(1, 2);
this.commands[this.commandsPosition++] = 10;
this.coordinates[this.coordinatesPosition++] = l;
this.coordinates[this.coordinatesPosition++] = e;
};
c.prototype.curveTo = function(l, e, m, a) {
this.ensurePathCapacities(1, 4);
this.commands[this.commandsPosition++] = 11;
this.coordinates[this.coordinatesPosition++] = l;
this.coordinates[this.coordinatesPosition++] = e;
this.coordinates[this.coordinatesPosition++] = m;
this.coordinates[this.coordinatesPosition++] = a;
};
c.prototype.cubicCurveTo = function(l, e, m, a, q, n) {
this.ensurePathCapacities(1, 6);
this.commands[this.commandsPosition++] = 12;
this.coordinates[this.coordinatesPosition++] = l;
this.coordinates[this.coordinatesPosition++] = e;
this.coordinates[this.coordinatesPosition++] = m;
this.coordinates[this.coordinatesPosition++] = a;
this.coordinates[this.coordinatesPosition++] = q;
this.coordinates[this.coordinatesPosition++] = n;
};
c.prototype.beginFill = function(l) {
this.ensurePathCapacities(1, 0);
this.commands[this.commandsPosition++] = 1;
this.styles.writeUnsignedInt(l);
this.hasFills = !0;
};
c.prototype.writeMorphFill = function(l) {
this.morphStyles.writeUnsignedInt(l);
};
c.prototype.endFill = function() {
this.ensurePathCapacities(1, 0);
this.commands[this.commandsPosition++] = 4;
};
c.prototype.endLine = function() {
this.ensurePathCapacities(1, 0);
this.commands[this.commandsPosition++] = 8;
};
c.prototype.lineStyle = function(l, e, m, a, q, n, k) {
s(l === (l | 0), 0 <= l && 5100 >= l);
this.ensurePathCapacities(2, 0);
this.commands[this.commandsPosition++] = 5;
this.coordinates[this.coordinatesPosition++] = l;
l = this.styles;
l.writeUnsignedInt(e);
l.writeBoolean(m);
l.writeUnsignedByte(a);
l.writeUnsignedByte(q);
l.writeUnsignedByte(n);
l.writeUnsignedByte(k);
this.hasLines = !0;
};
c.prototype.writeMorphLineStyle = function(l, e) {
this.morphCoordinates[this.coordinatesPosition - 1] = l;
this.morphStyles.writeUnsignedInt(e);
};
c.prototype.beginBitmap = function(l, e, m, a, q) {
s(3 === l || 7 === l);
this.ensurePathCapacities(1, 0);
this.commands[this.commandsPosition++] = l;
l = this.styles;
l.writeUnsignedInt(e);
this._writeStyleMatrix(m, !1);
l.writeBoolean(a);
l.writeBoolean(q);
this.hasFills = !0;
};
c.prototype.writeMorphBitmap = function(l) {
this._writeStyleMatrix(l, !0);
};
c.prototype.beginGradient = function(l, e, m, a, q, n, k, f) {
s(2 === l || 6 === l);
this.ensurePathCapacities(1, 0);
this.commands[this.commandsPosition++] = l;
l = this.styles;
l.writeUnsignedByte(a);
s(f === (f | 0));
l.writeShort(f);
this._writeStyleMatrix(q, !1);
a = e.length;
l.writeByte(a);
for (q = 0;q < a;q++) {
l.writeUnsignedByte(m[q]), l.writeUnsignedInt(e[q]);
}
l.writeUnsignedByte(n);
l.writeUnsignedByte(k);
this.hasFills = !0;
};
c.prototype.writeMorphGradient = function(l, e, m) {
this._writeStyleMatrix(m, !0);
m = this.morphStyles;
for (var a = 0;a < l.length;a++) {
m.writeUnsignedByte(e[a]), m.writeUnsignedInt(l[a]);
}
};
c.prototype.writeCommandAndCoordinates = function(l, e, m) {
this.ensurePathCapacities(1, 2);
this.commands[this.commandsPosition++] = l;
this.coordinates[this.coordinatesPosition++] = e;
this.coordinates[this.coordinatesPosition++] = m;
};
c.prototype.writeCoordinates = function(l, e) {
this.ensurePathCapacities(0, 2);
this.coordinates[this.coordinatesPosition++] = l;
this.coordinates[this.coordinatesPosition++] = e;
};
c.prototype.writeMorphCoordinates = function(l, e) {
this.morphCoordinates = a(this.morphCoordinates, this.coordinatesPosition);
this.morphCoordinates[this.coordinatesPosition - 2] = l;
this.morphCoordinates[this.coordinatesPosition - 1] = e;
};
c.prototype.clear = function() {
this.commandsPosition = this.coordinatesPosition = 0;
this.commands = new Uint8Array(32);
this.coordinates = new Int32Array(128);
this.styles = new h(16);
this.styles.endian = "auto";
this.hasFills = this.hasLines = !1;
};
c.prototype.isEmpty = function() {
return 0 === this.commandsPosition;
};
c.prototype.clone = function() {
var l = new c(!1);
l.commands = new Uint8Array(this.commands);
l.commandsPosition = this.commandsPosition;
l.coordinates = new Int32Array(this.coordinates);
l.coordinatesPosition = this.coordinatesPosition;
l.styles = new h(this.styles.length);
l.styles.writeRawBytes(this.styles.bytes);
this.morphStyles && (l.morphStyles = new h(this.morphStyles.length), l.morphStyles.writeRawBytes(this.morphStyles.bytes));
l.hasFills = this.hasFills;
l.hasLines = this.hasLines;
return l;
};
c.prototype.toPlainObject = function() {
return new v(this.commands, this.commandsPosition, this.coordinates, this.morphCoordinates, this.coordinatesPosition, this.styles.buffer, this.styles.length, this.morphStyles && this.morphStyles.buffer, this.morphStyles ? this.morphStyles.length : 0, this.hasFills, this.hasLines);
};
Object.defineProperty(c.prototype, "buffers", {get:function() {
var l = [this.commands.buffer, this.coordinates.buffer, this.styles.buffer];
this.morphCoordinates && l.push(this.morphCoordinates.buffer);
this.morphStyles && l.push(this.morphStyles.buffer);
return l;
}, enumerable:!0, configurable:!0});
c.prototype._writeStyleMatrix = function(l, e) {
(e ? this.morphStyles : this.styles).write6Floats(l.a, l.b, l.c, l.d, l.tx, l.ty);
};
c.prototype.ensurePathCapacities = function(l, e) {
this.commands = a(this.commands, this.commandsPosition + l);
this.coordinates = a(this.coordinates, this.coordinatesPosition + e);
};
return c;
}();
c.ShapeData = p;
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
a[a.CODE_END = 0] = "CODE_END";
a[a.CODE_SHOW_FRAME = 1] = "CODE_SHOW_FRAME";
a[a.CODE_DEFINE_SHAPE = 2] = "CODE_DEFINE_SHAPE";
a[a.CODE_FREE_CHARACTER = 3] = "CODE_FREE_CHARACTER";
a[a.CODE_PLACE_OBJECT = 4] = "CODE_PLACE_OBJECT";
a[a.CODE_REMOVE_OBJECT = 5] = "CODE_REMOVE_OBJECT";
a[a.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
a[a.CODE_DEFINE_BUTTON = 7] = "CODE_DEFINE_BUTTON";
a[a.CODE_JPEG_TABLES = 8] = "CODE_JPEG_TABLES";
a[a.CODE_SET_BACKGROUND_COLOR = 9] = "CODE_SET_BACKGROUND_COLOR";
a[a.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
a[a.CODE_DEFINE_TEXT = 11] = "CODE_DEFINE_TEXT";
a[a.CODE_DO_ACTION = 12] = "CODE_DO_ACTION";
a[a.CODE_DEFINE_FONT_INFO = 13] = "CODE_DEFINE_FONT_INFO";
a[a.CODE_DEFINE_SOUND = 14] = "CODE_DEFINE_SOUND";
a[a.CODE_START_SOUND = 15] = "CODE_START_SOUND";
a[a.CODE_STOP_SOUND = 16] = "CODE_STOP_SOUND";
a[a.CODE_DEFINE_BUTTON_SOUND = 17] = "CODE_DEFINE_BUTTON_SOUND";
a[a.CODE_SOUND_STREAM_HEAD = 18] = "CODE_SOUND_STREAM_HEAD";
a[a.CODE_SOUND_STREAM_BLOCK = 19] = "CODE_SOUND_STREAM_BLOCK";
a[a.CODE_DEFINE_BITS_LOSSLESS = 20] = "CODE_DEFINE_BITS_LOSSLESS";
a[a.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
a[a.CODE_DEFINE_SHAPE2 = 22] = "CODE_DEFINE_SHAPE2";
a[a.CODE_DEFINE_BUTTON_CXFORM = 23] = "CODE_DEFINE_BUTTON_CXFORM";
a[a.CODE_PROTECT = 24] = "CODE_PROTECT";
a[a.CODE_PATHS_ARE_POSTSCRIPT = 25] = "CODE_PATHS_ARE_POSTSCRIPT";
a[a.CODE_PLACE_OBJECT2 = 26] = "CODE_PLACE_OBJECT2";
a[a.CODE_REMOVE_OBJECT2 = 28] = "CODE_REMOVE_OBJECT2";
a[a.CODE_SYNC_FRAME = 29] = "CODE_SYNC_FRAME";
a[a.CODE_FREE_ALL = 31] = "CODE_FREE_ALL";
a[a.CODE_DEFINE_SHAPE3 = 32] = "CODE_DEFINE_SHAPE3";
a[a.CODE_DEFINE_TEXT2 = 33] = "CODE_DEFINE_TEXT2";
a[a.CODE_DEFINE_BUTTON2 = 34] = "CODE_DEFINE_BUTTON2";
a[a.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
a[a.CODE_DEFINE_BITS_LOSSLESS2 = 36] = "CODE_DEFINE_BITS_LOSSLESS2";
a[a.CODE_DEFINE_EDIT_TEXT = 37] = "CODE_DEFINE_EDIT_TEXT";
a[a.CODE_DEFINE_VIDEO = 38] = "CODE_DEFINE_VIDEO";
a[a.CODE_DEFINE_SPRITE = 39] = "CODE_DEFINE_SPRITE";
a[a.CODE_NAME_CHARACTER = 40] = "CODE_NAME_CHARACTER";
a[a.CODE_PRODUCT_INFO = 41] = "CODE_PRODUCT_INFO";
a[a.CODE_DEFINE_TEXT_FORMAT = 42] = "CODE_DEFINE_TEXT_FORMAT";
a[a.CODE_FRAME_LABEL = 43] = "CODE_FRAME_LABEL";
a[a.CODE_DEFINE_BEHAVIOUR = 44] = "CODE_DEFINE_BEHAVIOUR";
a[a.CODE_SOUND_STREAM_HEAD2 = 45] = "CODE_SOUND_STREAM_HEAD2";
a[a.CODE_DEFINE_MORPH_SHAPE = 46] = "CODE_DEFINE_MORPH_SHAPE";
a[a.CODE_GENERATE_FRAME = 47] = "CODE_GENERATE_FRAME";
a[a.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
a[a.CODE_GEN_COMMAND = 49] = "CODE_GEN_COMMAND";
a[a.CODE_DEFINE_COMMAND_OBJECT = 50] = "CODE_DEFINE_COMMAND_OBJECT";
a[a.CODE_CHARACTER_SET = 51] = "CODE_CHARACTER_SET";
a[a.CODE_EXTERNAL_FONT = 52] = "CODE_EXTERNAL_FONT";
a[a.CODE_DEFINE_FUNCTION = 53] = "CODE_DEFINE_FUNCTION";
a[a.CODE_PLACE_FUNCTION = 54] = "CODE_PLACE_FUNCTION";
a[a.CODE_GEN_TAG_OBJECTS = 55] = "CODE_GEN_TAG_OBJECTS";
a[a.CODE_EXPORT_ASSETS = 56] = "CODE_EXPORT_ASSETS";
a[a.CODE_IMPORT_ASSETS = 57] = "CODE_IMPORT_ASSETS";
a[a.CODE_ENABLE_DEBUGGER = 58] = "CODE_ENABLE_DEBUGGER";
a[a.CODE_DO_INIT_ACTION = 59] = "CODE_DO_INIT_ACTION";
a[a.CODE_DEFINE_VIDEO_STREAM = 60] = "CODE_DEFINE_VIDEO_STREAM";
a[a.CODE_VIDEO_FRAME = 61] = "CODE_VIDEO_FRAME";
a[a.CODE_DEFINE_FONT_INFO2 = 62] = "CODE_DEFINE_FONT_INFO2";
a[a.CODE_DEBUG_ID = 63] = "CODE_DEBUG_ID";
a[a.CODE_ENABLE_DEBUGGER2 = 64] = "CODE_ENABLE_DEBUGGER2";
a[a.CODE_SCRIPT_LIMITS = 65] = "CODE_SCRIPT_LIMITS";
a[a.CODE_SET_TAB_INDEX = 66] = "CODE_SET_TAB_INDEX";
a[a.CODE_FILE_ATTRIBUTES = 69] = "CODE_FILE_ATTRIBUTES";
a[a.CODE_PLACE_OBJECT3 = 70] = "CODE_PLACE_OBJECT3";
a[a.CODE_IMPORT_ASSETS2 = 71] = "CODE_IMPORT_ASSETS2";
a[a.CODE_DO_ABC_DEFINE = 72] = "CODE_DO_ABC_DEFINE";
a[a.CODE_DEFINE_FONT_ALIGN_ZONES = 73] = "CODE_DEFINE_FONT_ALIGN_ZONES";
a[a.CODE_CSM_TEXT_SETTINGS = 74] = "CODE_CSM_TEXT_SETTINGS";
a[a.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
a[a.CODE_SYMBOL_CLASS = 76] = "CODE_SYMBOL_CLASS";
a[a.CODE_METADATA = 77] = "CODE_METADATA";
a[a.CODE_DEFINE_SCALING_GRID = 78] = "CODE_DEFINE_SCALING_GRID";
a[a.CODE_DO_ABC = 82] = "CODE_DO_ABC";
a[a.CODE_DEFINE_SHAPE4 = 83] = "CODE_DEFINE_SHAPE4";
a[a.CODE_DEFINE_MORPH_SHAPE2 = 84] = "CODE_DEFINE_MORPH_SHAPE2";
a[a.CODE_DEFINE_SCENE_AND_FRAME_LABEL_DATA = 86] = "CODE_DEFINE_SCENE_AND_FRAME_LABEL_DATA";
a[a.CODE_DEFINE_BINARY_DATA = 87] = "CODE_DEFINE_BINARY_DATA";
a[a.CODE_DEFINE_FONT_NAME = 88] = "CODE_DEFINE_FONT_NAME";
a[a.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2";
a[a.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
a[a.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
})(a.SwfTag || (a.SwfTag = {}));
(function(a) {
a[a.CODE_DEFINE_SHAPE = 2] = "CODE_DEFINE_SHAPE";
a[a.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
a[a.CODE_DEFINE_BUTTON = 7] = "CODE_DEFINE_BUTTON";
a[a.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
a[a.CODE_DEFINE_TEXT = 11] = "CODE_DEFINE_TEXT";
a[a.CODE_DEFINE_SOUND = 14] = "CODE_DEFINE_SOUND";
a[a.CODE_DEFINE_BITS_LOSSLESS = 20] = "CODE_DEFINE_BITS_LOSSLESS";
a[a.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
a[a.CODE_DEFINE_SHAPE2 = 22] = "CODE_DEFINE_SHAPE2";
a[a.CODE_DEFINE_SHAPE3 = 32] = "CODE_DEFINE_SHAPE3";
a[a.CODE_DEFINE_TEXT2 = 33] = "CODE_DEFINE_TEXT2";
a[a.CODE_DEFINE_BUTTON2 = 34] = "CODE_DEFINE_BUTTON2";
a[a.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
a[a.CODE_DEFINE_BITS_LOSSLESS2 = 36] = "CODE_DEFINE_BITS_LOSSLESS2";
a[a.CODE_DEFINE_EDIT_TEXT = 37] = "CODE_DEFINE_EDIT_TEXT";
a[a.CODE_DEFINE_SPRITE = 39] = "CODE_DEFINE_SPRITE";
a[a.CODE_DEFINE_MORPH_SHAPE = 46] = "CODE_DEFINE_MORPH_SHAPE";
a[a.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
a[a.CODE_DEFINE_VIDEO_STREAM = 60] = "CODE_DEFINE_VIDEO_STREAM";
a[a.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
a[a.CODE_DEFINE_SHAPE4 = 83] = "CODE_DEFINE_SHAPE4";
a[a.CODE_DEFINE_MORPH_SHAPE2 = 84] = "CODE_DEFINE_MORPH_SHAPE2";
a[a.CODE_DEFINE_BINARY_DATA = 87] = "CODE_DEFINE_BINARY_DATA";
a[a.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
a[a.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
})(a.DefinitionTags || (a.DefinitionTags = {}));
(function(a) {
a[a.CODE_DEFINE_BITS = 6] = "CODE_DEFINE_BITS";
a[a.CODE_DEFINE_BITS_JPEG2 = 21] = "CODE_DEFINE_BITS_JPEG2";
a[a.CODE_DEFINE_BITS_JPEG3 = 35] = "CODE_DEFINE_BITS_JPEG3";
a[a.CODE_DEFINE_BITS_JPEG4 = 90] = "CODE_DEFINE_BITS_JPEG4";
})(a.ImageDefinitionTags || (a.ImageDefinitionTags = {}));
(function(a) {
a[a.CODE_DEFINE_FONT = 10] = "CODE_DEFINE_FONT";
a[a.CODE_DEFINE_FONT2 = 48] = "CODE_DEFINE_FONT2";
a[a.CODE_DEFINE_FONT3 = 75] = "CODE_DEFINE_FONT3";
a[a.CODE_DEFINE_FONT4 = 91] = "CODE_DEFINE_FONT4";
})(a.FontDefinitionTags || (a.FontDefinitionTags = {}));
(function(a) {
a[a.CODE_PLACE_OBJECT = 4] = "CODE_PLACE_OBJECT";
a[a.CODE_PLACE_OBJECT2 = 26] = "CODE_PLACE_OBJECT2";
a[a.CODE_PLACE_OBJECT3 = 70] = "CODE_PLACE_OBJECT3";
a[a.CODE_REMOVE_OBJECT = 5] = "CODE_REMOVE_OBJECT";
a[a.CODE_REMOVE_OBJECT2 = 28] = "CODE_REMOVE_OBJECT2";
a[a.CODE_START_SOUND = 15] = "CODE_START_SOUND";
a[a.CODE_START_SOUND2 = 89] = "CODE_START_SOUND2";
a[a.CODE_VIDEO_FRAME = 61] = "CODE_VIDEO_FRAME";
})(a.ControlTags || (a.ControlTags = {}));
(function(a) {
a[a.Move = 1] = "Move";
a[a.HasCharacter = 2] = "HasCharacter";
a[a.HasMatrix = 4] = "HasMatrix";
a[a.HasColorTransform = 8] = "HasColorTransform";
a[a.HasRatio = 16] = "HasRatio";
a[a.HasName = 32] = "HasName";
a[a.HasClipDepth = 64] = "HasClipDepth";
a[a.HasClipActions = 128] = "HasClipActions";
a[a.HasFilterList = 256] = "HasFilterList";
a[a.HasBlendMode = 512] = "HasBlendMode";
a[a.HasCacheAsBitmap = 1024] = "HasCacheAsBitmap";
a[a.HasClassName = 2048] = "HasClassName";
a[a.HasImage = 4096] = "HasImage";
a[a.HasVisible = 8192] = "HasVisible";
a[a.OpaqueBackground = 16384] = "OpaqueBackground";
a[a.Reserved = 32768] = "Reserved";
})(a.PlaceObjectFlags || (a.PlaceObjectFlags = {}));
(function(a) {
a[a.Load = 1] = "Load";
a[a.EnterFrame = 2] = "EnterFrame";
a[a.Unload = 4] = "Unload";
a[a.MouseMove = 8] = "MouseMove";
a[a.MouseDown = 16] = "MouseDown";
a[a.MouseUp = 32] = "MouseUp";
a[a.KeyDown = 64] = "KeyDown";
a[a.KeyUp = 128] = "KeyUp";
a[a.Data = 256] = "Data";
a[a.Initialize = 512] = "Initialize";
a[a.Press = 1024] = "Press";
a[a.Release = 2048] = "Release";
a[a.ReleaseOutside = 4096] = "ReleaseOutside";
a[a.RollOver = 8192] = "RollOver";
a[a.RollOut = 16384] = "RollOut";
a[a.DragOver = 32768] = "DragOver";
a[a.DragOut = 65536] = "DragOut";
a[a.KeyPress = 131072] = "KeyPress";
a[a.Construct = 262144] = "Construct";
})(a.AVM1ClipEvents || (a.AVM1ClipEvents = {}));
})(c.Parser || (c.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
var h = c.Debug.unexpected, a = function() {
function a(c, p, u, l) {
this.url = c;
this.method = p;
this.mimeType = u;
this.data = l;
}
a.prototype.readAll = function(a) {
var c = this.url, u = new XMLHttpRequest({mozSystem:!0});
u.open(this.method || "GET", this.url, !0);
u.responseType = "arraybuffer";
u.onreadystatechange = function(l) {
4 === u.readyState && (200 !== u.status && 0 !== u.status || null === u.response ? (h("Path: " + c + " not found."), a(null, u.statusText)) : a(u.response));
};
this.mimeType && u.setRequestHeader("Content-Type", this.mimeType);
u.send(this.data || null);
};
a.prototype.readChunked = function(a, c, u, l, e, m) {
if (0 >= a) {
this.readAsync(c, u, l, e, m);
} else {
var t = 0, q = new Uint8Array(a), n = 0, k;
this.readAsync(function(f, d) {
k = d.total;
for (var b = f.length, g = 0;t + b >= a;) {
var r = a - t;
q.set(f.subarray(g, g + r), t);
g += r;
b -= r;
n += a;
c(q, {loaded:n, total:k});
t = 0;
}
q.set(f.subarray(g), t);
t += b;
}, u, l, function() {
0 < t && (n += t, c(q.subarray(0, t), {loaded:n, total:k}), t = 0);
e && e();
}, m);
}
};
a.prototype.readAsync = function(a, c, u, l, e) {
var m = new XMLHttpRequest({mozSystem:!0}), t = this.url, q = 0, n = 0;
m.open(this.method || "GET", t, !0);
m.responseType = "moz-chunked-arraybuffer";
var k = "moz-chunked-arraybuffer" !== m.responseType;
k && (m.responseType = "arraybuffer");
m.onprogress = function(f) {
k || (q = f.loaded, n = f.total, a(new Uint8Array(m.response), {loaded:q, total:n}));
};
m.onreadystatechange = function(f) {
2 === m.readyState && e && e(t, m.status, m.getAllResponseHeaders());
4 === m.readyState && (200 !== m.status && 0 !== m.status || null === m.response && (0 === n || q !== n) ? c(m.statusText) : (k && (f = m.response, a(new Uint8Array(f), {loaded:0, total:f.byteLength})), l && l()));
};
this.mimeType && m.setRequestHeader("Content-Type", this.mimeType);
m.send(this.data || null);
u && u();
};
return a;
}();
c.BinaryFileReader = a;
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
a[a.Objects = 0] = "Objects";
a[a.References = 1] = "References";
})(c.RemotingPhase || (c.RemotingPhase = {}));
(function(a) {
a[a.HasMatrix = 1] = "HasMatrix";
a[a.HasBounds = 2] = "HasBounds";
a[a.HasChildren = 4] = "HasChildren";
a[a.HasColorTransform = 8] = "HasColorTransform";
a[a.HasClipRect = 16] = "HasClipRect";
a[a.HasMiscellaneousProperties = 32] = "HasMiscellaneousProperties";
a[a.HasMask = 64] = "HasMask";
a[a.HasClip = 128] = "HasClip";
})(c.MessageBits || (c.MessageBits = {}));
(function(a) {
a[a.None = 0] = "None";
a[a.Asset = 134217728] = "Asset";
})(c.IDMask || (c.IDMask = {}));
(function(a) {
a[a.EOF = 0] = "EOF";
a[a.UpdateFrame = 100] = "UpdateFrame";
a[a.UpdateGraphics = 101] = "UpdateGraphics";
a[a.UpdateBitmapData = 102] = "UpdateBitmapData";
a[a.UpdateTextContent = 103] = "UpdateTextContent";
a[a.UpdateStage = 104] = "UpdateStage";
a[a.UpdateNetStream = 105] = "UpdateNetStream";
a[a.RequestBitmapData = 106] = "RequestBitmapData";
a[a.DrawToBitmap = 200] = "DrawToBitmap";
a[a.MouseEvent = 300] = "MouseEvent";
a[a.KeyboardEvent = 301] = "KeyboardEvent";
a[a.FocusEvent = 302] = "FocusEvent";
})(c.MessageTag || (c.MessageTag = {}));
(function(a) {
a[a.Blur = 0] = "Blur";
a[a.DropShadow = 1] = "DropShadow";
})(c.FilterType || (c.FilterType = {}));
(function(a) {
a[a.Identity = 0] = "Identity";
a[a.AlphaMultiplierOnly = 1] = "AlphaMultiplierOnly";
a[a.All = 2] = "All";
})(c.ColorTransformEncoding || (c.ColorTransformEncoding = {}));
(function(a) {
a[a.Initialized = 0] = "Initialized";
a[a.PlayStart = 1] = "PlayStart";
a[a.PlayStop = 2] = "PlayStop";
a[a.BufferFull = 3] = "BufferFull";
a[a.Progress = 4] = "Progress";
a[a.BufferEmpty = 5] = "BufferEmpty";
a[a.Error = 6] = "Error";
a[a.Metadata = 7] = "Metadata";
a[a.Seeking = 8] = "Seeking";
})(c.VideoPlaybackEvent || (c.VideoPlaybackEvent = {}));
(function(a) {
a[a.Init = 1] = "Init";
a[a.Pause = 2] = "Pause";
a[a.Seek = 3] = "Seek";
a[a.GetTime = 4] = "GetTime";
a[a.GetBufferLength = 5] = "GetBufferLength";
a[a.SetSoundLevels = 6] = "SetSoundLevels";
a[a.GetBytesLoaded = 7] = "GetBytesLoaded";
a[a.GetBytesTotal = 8] = "GetBytesTotal";
})(c.VideoControlEvent || (c.VideoControlEvent = {}));
(function(a) {
a[a.ShowAll = 0] = "ShowAll";
a[a.ExactFit = 1] = "ExactFit";
a[a.NoBorder = 2] = "NoBorder";
a[a.NoScale = 4] = "NoScale";
})(c.StageScaleMode || (c.StageScaleMode = {}));
(function(a) {
a[a.None = 0] = "None";
a[a.Top = 1] = "Top";
a[a.Bottom = 2] = "Bottom";
a[a.Left = 4] = "Left";
a[a.Right = 8] = "Right";
a[a.TopLeft = a.Top | a.Left] = "TopLeft";
a[a.BottomLeft = a.Bottom | a.Left] = "BottomLeft";
a[a.BottomRight = a.Bottom | a.Right] = "BottomRight";
a[a.TopRight = a.Top | a.Right] = "TopRight";
})(c.StageAlignFlags || (c.StageAlignFlags = {}));
c.MouseEventNames = "click dblclick mousedown mousemove mouseup mouseover mouseout".split(" ");
c.KeyboardEventNames = ["keydown", "keypress", "keyup"];
(function(a) {
a[a.CtrlKey = 1] = "CtrlKey";
a[a.AltKey = 2] = "AltKey";
a[a.ShiftKey = 4] = "ShiftKey";
})(c.KeyboardEventFlags || (c.KeyboardEventFlags = {}));
(function(a) {
a[a.DocumentHidden = 0] = "DocumentHidden";
a[a.DocumentVisible = 1] = "DocumentVisible";
a[a.WindowBlur = 2] = "WindowBlur";
a[a.WindowFocus = 3] = "WindowFocus";
})(c.FocusEventType || (c.FocusEventType = {}));
})(c.Remoting || (c.Remoting = {}));
})(Shumway || (Shumway = {}));
var throwError, Errors;
(function(c) {
(function(c) {
(function(a) {
var c = function() {
function a() {
}
a.toRGBA = function(a, l, e, m) {
void 0 === m && (m = 1);
return "rgba(" + a + "," + l + "," + e + "," + m + ")";
};
return a;
}();
a.UI = c;
var h = function() {
function a() {
}
a.prototype.tabToolbar = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(37, 44, 51, a);
};
a.prototype.toolbars = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(52, 60, 69, a);
};
a.prototype.selectionBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(29, 79, 115, a);
};
a.prototype.selectionText = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(245, 247, 250, a);
};
a.prototype.splitters = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(0, 0, 0, a);
};
a.prototype.bodyBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(17, 19, 21, a);
};
a.prototype.sidebarBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(24, 29, 32, a);
};
a.prototype.attentionBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(161, 134, 80, a);
};
a.prototype.bodyText = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(143, 161, 178, a);
};
a.prototype.foregroundTextGrey = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(182, 186, 191, a);
};
a.prototype.contentTextHighContrast = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(169, 186, 203, a);
};
a.prototype.contentTextGrey = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(143, 161, 178, a);
};
a.prototype.contentTextDarkGrey = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(95, 115, 135, a);
};
a.prototype.blueHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(70, 175, 227, a);
};
a.prototype.purpleHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(107, 122, 187, a);
};
a.prototype.pinkHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(223, 128, 255, a);
};
a.prototype.redHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(235, 83, 104, a);
};
a.prototype.orangeHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(217, 102, 41, a);
};
a.prototype.lightOrangeHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(217, 155, 40, a);
};
a.prototype.greenHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(112, 191, 83, a);
};
a.prototype.blueGreyHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(94, 136, 176, a);
};
return a;
}();
a.UIThemeDark = h;
h = function() {
function a() {
}
a.prototype.tabToolbar = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(235, 236, 237, a);
};
a.prototype.toolbars = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(240, 241, 242, a);
};
a.prototype.selectionBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(76, 158, 217, a);
};
a.prototype.selectionText = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(245, 247, 250, a);
};
a.prototype.splitters = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(170, 170, 170, a);
};
a.prototype.bodyBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(252, 252, 252, a);
};
a.prototype.sidebarBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(247, 247, 247, a);
};
a.prototype.attentionBackground = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(161, 134, 80, a);
};
a.prototype.bodyText = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(24, 25, 26, a);
};
a.prototype.foregroundTextGrey = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(88, 89, 89, a);
};
a.prototype.contentTextHighContrast = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(41, 46, 51, a);
};
a.prototype.contentTextGrey = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(143, 161, 178, a);
};
a.prototype.contentTextDarkGrey = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(102, 115, 128, a);
};
a.prototype.blueHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(0, 136, 204, a);
};
a.prototype.purpleHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(91, 95, 255, a);
};
a.prototype.pinkHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(184, 46, 229, a);
};
a.prototype.redHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(237, 38, 85, a);
};
a.prototype.orangeHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(241, 60, 0, a);
};
a.prototype.lightOrangeHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(217, 126, 0, a);
};
a.prototype.greenHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(44, 187, 15, a);
};
a.prototype.blueGreyHighlight = function(a) {
void 0 === a && (a = 1);
return c.toRGBA(95, 136, 176, a);
};
return a;
}();
a.UIThemeLight = h;
})(c.Theme || (c.Theme = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
var c = function() {
function a(c) {
this._buffers = c || [];
this._snapshots = [];
this._maxDepth = 0;
}
a.prototype.addBuffer = function(a) {
this._buffers.push(a);
};
a.prototype.getSnapshotAt = function(a) {
return this._snapshots[a];
};
Object.defineProperty(a.prototype, "hasSnapshots", {get:function() {
return 0 < this.snapshotCount;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "snapshotCount", {get:function() {
return this._snapshots.length;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "startTime", {get:function() {
return this._startTime;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "endTime", {get:function() {
return this._endTime;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "totalTime", {get:function() {
return this.endTime - this.startTime;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "windowStart", {get:function() {
return this._windowStart;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "windowEnd", {get:function() {
return this._windowEnd;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "windowLength", {get:function() {
return this.windowEnd - this.windowStart;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "maxDepth", {get:function() {
return this._maxDepth;
}, enumerable:!0, configurable:!0});
a.prototype.forEachSnapshot = function(a) {
for (var c = 0, l = this.snapshotCount;c < l;c++) {
a(this._snapshots[c], c);
}
};
a.prototype.createSnapshots = function() {
var a = Number.MAX_VALUE, c = Number.MIN_VALUE, l = 0;
for (this._snapshots = [];0 < this._buffers.length;) {
var e = this._buffers.shift().createSnapshot();
e && (a > e.startTime && (a = e.startTime), c < e.endTime && (c = e.endTime), l < e.maxDepth && (l = e.maxDepth), this._snapshots.push(e));
}
this._startTime = a;
this._endTime = c;
this._windowStart = a;
this._windowEnd = c;
this._maxDepth = l;
};
a.prototype.setWindow = function(a, c) {
if (a > c) {
var l = a;
a = c;
c = l;
}
l = Math.min(c - a, this.totalTime);
a < this._startTime ? (a = this._startTime, c = this._startTime + l) : c > this._endTime && (a = this._endTime - l, c = this._endTime);
this._windowStart = a;
this._windowEnd = c;
};
a.prototype.moveWindowTo = function(a) {
this.setWindow(a - this.windowLength / 2, a + this.windowLength / 2);
};
return a;
}();
a.Profile = c;
})(c.Profiler || (c.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
__extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(c) {
(function(a) {
var c = function() {
return function(a) {
this.kind = a;
this.totalTime = this.selfTime = this.count = 0;
};
}();
a.TimelineFrameStatistics = c;
var h = function() {
function a(c, l, e, m, t, q) {
this.parent = c;
this.kind = l;
this.startData = e;
this.endData = m;
this.startTime = t;
this.endTime = q;
this.maxDepth = 0;
}
Object.defineProperty(a.prototype, "totalTime", {get:function() {
return this.endTime - this.startTime;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "selfTime", {get:function() {
var a = this.totalTime;
if (this.children) {
for (var l = 0, e = this.children.length;l < e;l++) {
var m = this.children[l], a = a - (m.endTime - m.startTime)
}
}
return a;
}, enumerable:!0, configurable:!0});
a.prototype.getChildIndex = function(a) {
for (var l = this.children, e = 0;e < l.length;e++) {
if (l[e].endTime > a) {
return e;
}
}
return 0;
};
a.prototype.getChildRange = function(a, l) {
if (this.children && a <= this.endTime && l >= this.startTime && l >= a) {
var e = this._getNearestChild(a), m = this._getNearestChildReverse(l);
if (e <= m) {
return a = this.children[e].startTime, l = this.children[m].endTime, {startIndex:e, endIndex:m, startTime:a, endTime:l, totalTime:l - a};
}
}
return null;
};
a.prototype._getNearestChild = function(a) {
var l = this.children;
if (l && l.length) {
if (a <= l[0].endTime) {
return 0;
}
for (var e, m = 0, c = l.length - 1;c > m;) {
e = (m + c) / 2 | 0;
var q = l[e];
if (a >= q.startTime && a <= q.endTime) {
return e;
}
a > q.endTime ? m = e + 1 : c = e;
}
return Math.ceil((m + c) / 2);
}
return 0;
};
a.prototype._getNearestChildReverse = function(a) {
var l = this.children;
if (l && l.length) {
var e = l.length - 1;
if (a >= l[e].startTime) {
return e;
}
for (var m, c = 0;e > c;) {
m = Math.ceil((c + e) / 2);
var q = l[m];
if (a >= q.startTime && a <= q.endTime) {
return m;
}
a > q.endTime ? c = m : e = m - 1;
}
return(c + e) / 2 | 0;
}
return 0;
};
a.prototype.query = function(a) {
if (a < this.startTime || a > this.endTime) {
return null;
}
var l = this.children;
if (l && 0 < l.length) {
for (var e, m = 0, c = l.length - 1;c > m;) {
var q = (m + c) / 2 | 0;
e = l[q];
if (a >= e.startTime && a <= e.endTime) {
return e.query(a);
}
a > e.endTime ? m = q + 1 : c = q;
}
e = l[c];
if (a >= e.startTime && a <= e.endTime) {
return e.query(a);
}
}
return this;
};
a.prototype.queryNext = function(a) {
for (var l = this;a > l.endTime;) {
if (l.parent) {
l = l.parent;
} else {
break;
}
}
return l.query(a);
};
a.prototype.getDepth = function() {
for (var a = 0, l = this;l;) {
a++, l = l.parent;
}
return a;
};
a.prototype.calculateStatistics = function() {
function a(e) {
if (e.kind) {
var m = l[e.kind.id] || (l[e.kind.id] = new c(e.kind));
m.count++;
m.selfTime += e.selfTime;
m.totalTime += e.totalTime;
}
e.children && e.children.forEach(a);
}
var l = this.statistics = [];
a(this);
};
a.prototype.trace = function(a) {
var l = (this.kind ? this.kind.name + ": " : "Profile: ") + (this.endTime - this.startTime).toFixed(2);
if (this.children && this.children.length) {
a.enter(l);
for (l = 0;l < this.children.length;l++) {
this.children[l].trace(a);
}
a.outdent();
} else {
a.writeLn(l);
}
};
return a;
}();
a.TimelineFrame = h;
h = function(a) {
function c(l) {
a.call(this, null, null, null, null, NaN, NaN);
this.name = l;
}
__extends(c, a);
return c;
}(h);
a.TimelineBufferSnapshot = h;
})(c.Profiler || (c.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = function() {
function s(a, h) {
void 0 === a && (a = "");
this.name = a || "";
this._startTime = c.isNullOrUndefined(h) ? jsGlobal.START_TIME : h;
}
s.prototype.getKind = function(a) {
return this._kinds[a];
};
Object.defineProperty(s.prototype, "kinds", {get:function() {
return this._kinds.concat();
}, enumerable:!0, configurable:!0});
Object.defineProperty(s.prototype, "depth", {get:function() {
return this._depth;
}, enumerable:!0, configurable:!0});
s.prototype._initialize = function() {
this._depth = 0;
this._stack = [];
this._data = [];
this._kinds = [];
this._kindNameMap = Object.create(null);
this._marks = new c.CircularBuffer(Int32Array, 20);
this._times = new c.CircularBuffer(Float64Array, 20);
};
s.prototype._getKindId = function(a) {
var c = s.MAX_KINDID;
if (void 0 === this._kindNameMap[a]) {
if (c = this._kinds.length, c < s.MAX_KINDID) {
var l = {id:c, name:a, visible:!0};
this._kinds.push(l);
this._kindNameMap[a] = l;
} else {
c = s.MAX_KINDID;
}
} else {
c = this._kindNameMap[a].id;
}
return c;
};
s.prototype._getMark = function(a, h, l) {
var e = s.MAX_DATAID;
c.isNullOrUndefined(l) || h === s.MAX_KINDID || (e = this._data.length, e < s.MAX_DATAID ? this._data.push(l) : e = s.MAX_DATAID);
return a | e << 16 | h;
};
s.prototype.enter = function(a, h, l) {
l = (c.isNullOrUndefined(l) ? performance.now() : l) - this._startTime;
this._marks || this._initialize();
this._depth++;
a = this._getKindId(a);
this._marks.write(this._getMark(s.ENTER, a, h));
this._times.write(l);
this._stack.push(a);
};
s.prototype.leave = function(a, h, l) {
l = (c.isNullOrUndefined(l) ? performance.now() : l) - this._startTime;
var e = this._stack.pop();
a && (e = this._getKindId(a));
this._marks.write(this._getMark(s.LEAVE, e, h));
this._times.write(l);
this._depth--;
};
s.prototype.count = function(a, c, l) {
};
s.prototype.createSnapshot = function() {
var p;
void 0 === p && (p = Number.MAX_VALUE);
if (!this._marks) {
return null;
}
var h = this._times, l = this._kinds, e = this._data, m = new a.TimelineBufferSnapshot(this.name), t = [m], q = 0;
this._marks || this._initialize();
this._marks.forEachInReverse(function(n, k) {
var f = e[n >>> 16 & s.MAX_DATAID], d = l[n & s.MAX_KINDID];
if (c.isNullOrUndefined(d) || d.visible) {
var b = n & 2147483648, g = h.get(k), r = t.length;
if (b === s.LEAVE) {
if (1 === r && (q++, q > p)) {
return!0;
}
t.push(new a.TimelineFrame(t[r - 1], d, null, f, NaN, g));
} else {
if (b === s.ENTER) {
if (d = t.pop(), b = t[t.length - 1]) {
for (b.children ? b.children.unshift(d) : b.children = [d], b = t.length, d.depth = b, d.startData = f, d.startTime = g;d;) {
if (d.maxDepth < b) {
d.maxDepth = b, d = d.parent;
} else {
break;
}
}
} else {
return!0;
}
}
}
}
});
m.children && m.children.length && (m.startTime = m.children[0].startTime, m.endTime = m.children[m.children.length - 1].endTime);
return m;
};
s.prototype.reset = function(a) {
this._startTime = c.isNullOrUndefined(a) ? performance.now() : a;
this._marks ? (this._depth = 0, this._data = [], this._marks.reset(), this._times.reset()) : this._initialize();
};
s.FromFirefoxProfile = function(a, c) {
for (var l = a.profile.threads[0].samples, e = new s(c, l[0].time), m = [], t, q = 0;q < l.length;q++) {
t = l[q];
var n = t.time, k = t.frames, f = 0;
for (t = Math.min(k.length, m.length);f < t && k[f].location === m[f].location;) {
f++;
}
for (var d = m.length - f, b = 0;b < d;b++) {
t = m.pop(), e.leave(t.location, null, n);
}
for (;f < k.length;) {
t = k[f++], e.enter(t.location, null, n);
}
m = k;
}
for (;t = m.pop();) {
e.leave(t.location, null, n);
}
return e;
};
s.FromChromeProfile = function(a, c) {
var l = a.timestamps, e = a.samples, m = new s(c, l[0] / 1E3), t = [], q = {}, n;
s._resolveIds(a.head, q);
for (var k = 0;k < l.length;k++) {
var f = l[k] / 1E3, d = [];
for (n = q[e[k]];n;) {
d.unshift(n), n = n.parent;
}
var b = 0;
for (n = Math.min(d.length, t.length);b < n && d[b] === t[b];) {
b++;
}
for (var g = t.length - b, r = 0;r < g;r++) {
n = t.pop(), m.leave(n.functionName, null, f);
}
for (;b < d.length;) {
n = d[b++], m.enter(n.functionName, null, f);
}
t = d;
}
for (;n = t.pop();) {
m.leave(n.functionName, null, f);
}
return m;
};
s._resolveIds = function(a, c) {
c[a.id] = a;
if (a.children) {
for (var l = 0;l < a.children.length;l++) {
a.children[l].parent = a, s._resolveIds(a.children[l], c);
}
}
};
s.ENTER = 0;
s.LEAVE = -2147483648;
s.MAX_KINDID = 65535;
s.MAX_DATAID = 32767;
return s;
}();
a.TimelineBuffer = s;
})(h.Profiler || (h.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
a[a.DARK = 0] = "DARK";
a[a.LIGHT = 1] = "LIGHT";
})(a.UIThemeType || (a.UIThemeType = {}));
var s = function() {
function s(a, c) {
void 0 === c && (c = 0);
this._container = a;
this._headers = [];
this._charts = [];
this._profiles = [];
this._activeProfile = null;
this.themeType = c;
this._tooltip = this._createTooltip();
}
s.prototype.createProfile = function(c, s) {
void 0 === s && (s = !0);
var l = new a.Profile(c);
l.createSnapshots();
this._profiles.push(l);
s && this.activateProfile(l);
return l;
};
s.prototype.activateProfile = function(a) {
this.deactivateProfile();
this._activeProfile = a;
this._createViews();
this._initializeViews();
};
s.prototype.activateProfileAt = function(a) {
this.activateProfile(this.getProfileAt(a));
};
s.prototype.deactivateProfile = function() {
this._activeProfile && (this._destroyViews(), this._activeProfile = null);
};
s.prototype.resize = function() {
this._onResize();
};
s.prototype.getProfileAt = function(a) {
return this._profiles[a];
};
Object.defineProperty(s.prototype, "activeProfile", {get:function() {
return this._activeProfile;
}, enumerable:!0, configurable:!0});
Object.defineProperty(s.prototype, "profileCount", {get:function() {
return this._profiles.length;
}, enumerable:!0, configurable:!0});
Object.defineProperty(s.prototype, "container", {get:function() {
return this._container;
}, enumerable:!0, configurable:!0});
Object.defineProperty(s.prototype, "themeType", {get:function() {
return this._themeType;
}, set:function(a) {
switch(a) {
case 0:
this._theme = new h.Theme.UIThemeDark;
break;
case 1:
this._theme = new h.Theme.UIThemeLight;
}
}, enumerable:!0, configurable:!0});
Object.defineProperty(s.prototype, "theme", {get:function() {
return this._theme;
}, enumerable:!0, configurable:!0});
s.prototype.getSnapshotAt = function(a) {
return this._activeProfile.getSnapshotAt(a);
};
s.prototype._createViews = function() {
if (this._activeProfile) {
var c = this;
this._overviewHeader = new a.FlameChartHeader(this, 0);
this._overview = new a.FlameChartOverview(this, 0);
this._activeProfile.forEachSnapshot(function(s, l) {
c._headers.push(new a.FlameChartHeader(c, 1));
c._charts.push(new a.FlameChart(c, s));
});
window.addEventListener("resize", this._onResize.bind(this));
}
};
s.prototype._destroyViews = function() {
if (this._activeProfile) {
this._overviewHeader.destroy();
for (this._overview.destroy();this._headers.length;) {
this._headers.pop().destroy();
}
for (;this._charts.length;) {
this._charts.pop().destroy();
}
window.removeEventListener("resize", this._onResize.bind(this));
}
};
s.prototype._initializeViews = function() {
if (this._activeProfile) {
var a = this, c = this._activeProfile.startTime, l = this._activeProfile.endTime;
this._overviewHeader.initialize(c, l);
this._overview.initialize(c, l);
this._activeProfile.forEachSnapshot(function(e, m) {
a._headers[m].initialize(c, l);
a._charts[m].initialize(c, l);
});
}
};
s.prototype._onResize = function() {
if (this._activeProfile) {
var a = this, c = this._container.offsetWidth;
this._overviewHeader.setSize(c);
this._overview.setSize(c);
this._activeProfile.forEachSnapshot(function(l, e) {
a._headers[e].setSize(c);
a._charts[e].setSize(c);
});
}
};
s.prototype._updateViews = function() {
if (this._activeProfile) {
var a = this, c = this._activeProfile.windowStart, l = this._activeProfile.windowEnd;
this._overviewHeader.setWindow(c, l);
this._overview.setWindow(c, l);
this._activeProfile.forEachSnapshot(function(e, m) {
a._headers[m].setWindow(c, l);
a._charts[m].setWindow(c, l);
});
}
};
s.prototype._drawViews = function() {
};
s.prototype._createTooltip = function() {
var a = document.createElement("div");
a.classList.add("profiler-tooltip");
a.style.display = "none";
this._container.insertBefore(a, this._container.firstChild);
return a;
};
s.prototype.setWindow = function(a, c) {
this._activeProfile.setWindow(a, c);
this._updateViews();
};
s.prototype.moveWindowTo = function(a) {
this._activeProfile.moveWindowTo(a);
this._updateViews();
};
s.prototype.showTooltip = function(a, c, l, e) {
this.removeTooltipContent();
this._tooltip.appendChild(this.createTooltipContent(a, c));
this._tooltip.style.display = "block";
var m = this._tooltip.firstChild;
c = m.clientWidth;
m = m.clientHeight;
l += l + c >= a.canvas.clientWidth - 50 ? -(c + 20) : 25;
e += a.canvas.offsetTop - m / 2;
this._tooltip.style.left = l + "px";
this._tooltip.style.top = e + "px";
};
s.prototype.hideTooltip = function() {
this._tooltip.style.display = "none";
};
s.prototype.createTooltipContent = function(a, c) {
var l = Math.round(1E5 * c.totalTime) / 1E5, e = Math.round(1E5 * c.selfTime) / 1E5, m = Math.round(1E4 * c.selfTime / c.totalTime) / 100, t = document.createElement("div"), q = document.createElement("h1");
q.textContent = c.kind.name;
t.appendChild(q);
q = document.createElement("p");
q.textContent = "Total: " + l + " ms";
t.appendChild(q);
l = document.createElement("p");
l.textContent = "Self: " + e + " ms (" + m + "%)";
t.appendChild(l);
if (e = a.getStatistics(c.kind)) {
m = document.createElement("p"), m.textContent = "Count: " + e.count, t.appendChild(m), m = Math.round(1E5 * e.totalTime) / 1E5, l = document.createElement("p"), l.textContent = "All Total: " + m + " ms", t.appendChild(l), e = Math.round(1E5 * e.selfTime) / 1E5, m = document.createElement("p"), m.textContent = "All Self: " + e + " ms", t.appendChild(m);
}
this.appendDataElements(t, c.startData);
this.appendDataElements(t, c.endData);
return t;
};
s.prototype.appendDataElements = function(a, s) {
if (!c.isNullOrUndefined(s)) {
a.appendChild(document.createElement("hr"));
var l;
if (c.isObject(s)) {
for (var e in s) {
l = document.createElement("p"), l.textContent = e + ": " + s[e], a.appendChild(l);
}
} else {
l = document.createElement("p"), l.textContent = s.toString(), a.appendChild(l);
}
}
};
s.prototype.removeTooltipContent = function() {
for (var a = this._tooltip;a.firstChild;) {
a.removeChild(a.firstChild);
}
};
return s;
}();
a.Controller = s;
})(h.Profiler || (h.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.NumberUtilities.clamp, h = function() {
function a(l) {
this.value = l;
}
a.prototype.toString = function() {
return this.value;
};
a.AUTO = new a("auto");
a.DEFAULT = new a("default");
a.NONE = new a("none");
a.HELP = new a("help");
a.POINTER = new a("pointer");
a.PROGRESS = new a("progress");
a.WAIT = new a("wait");
a.CELL = new a("cell");
a.CROSSHAIR = new a("crosshair");
a.TEXT = new a("text");
a.ALIAS = new a("alias");
a.COPY = new a("copy");
a.MOVE = new a("move");
a.NO_DROP = new a("no-drop");
a.NOT_ALLOWED = new a("not-allowed");
a.ALL_SCROLL = new a("all-scroll");
a.COL_RESIZE = new a("col-resize");
a.ROW_RESIZE = new a("row-resize");
a.N_RESIZE = new a("n-resize");
a.E_RESIZE = new a("e-resize");
a.S_RESIZE = new a("s-resize");
a.W_RESIZE = new a("w-resize");
a.NE_RESIZE = new a("ne-resize");
a.NW_RESIZE = new a("nw-resize");
a.SE_RESIZE = new a("se-resize");
a.SW_RESIZE = new a("sw-resize");
a.EW_RESIZE = new a("ew-resize");
a.NS_RESIZE = new a("ns-resize");
a.NESW_RESIZE = new a("nesw-resize");
a.NWSE_RESIZE = new a("nwse-resize");
a.ZOOM_IN = new a("zoom-in");
a.ZOOM_OUT = new a("zoom-out");
a.GRAB = new a("grab");
a.GRABBING = new a("grabbing");
return a;
}();
a.MouseCursor = h;
var p = function() {
function a(l, e) {
this._target = l;
this._eventTarget = e;
this._wheelDisabled = !1;
this._boundOnMouseDown = this._onMouseDown.bind(this);
this._boundOnMouseUp = this._onMouseUp.bind(this);
this._boundOnMouseOver = this._onMouseOver.bind(this);
this._boundOnMouseOut = this._onMouseOut.bind(this);
this._boundOnMouseMove = this._onMouseMove.bind(this);
this._boundOnMouseWheel = this._onMouseWheel.bind(this);
this._boundOnDrag = this._onDrag.bind(this);
e.addEventListener("mousedown", this._boundOnMouseDown, !1);
e.addEventListener("mouseover", this._boundOnMouseOver, !1);
e.addEventListener("mouseout", this._boundOnMouseOut, !1);
e.addEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel, !1);
}
a.prototype.destroy = function() {
var a = this._eventTarget;
a.removeEventListener("mousedown", this._boundOnMouseDown);
a.removeEventListener("mouseover", this._boundOnMouseOver);
a.removeEventListener("mouseout", this._boundOnMouseOut);
a.removeEventListener("onwheel" in document ? "wheel" : "mousewheel", this._boundOnMouseWheel);
window.removeEventListener("mousemove", this._boundOnDrag);
window.removeEventListener("mouseup", this._boundOnMouseUp);
this._killHoverCheck();
this._target = this._eventTarget = null;
};
a.prototype.updateCursor = function(l) {
if (!a._cursorOwner || a._cursorOwner === this._target) {
var e = this._eventTarget.parentElement;
a._cursor !== l && (a._cursor = l, ["", "-moz-", "-webkit-"].forEach(function(a) {
e.style.cursor = a + l;
}));
a._cursorOwner = a._cursor === h.DEFAULT ? null : this._target;
}
};
a.prototype._onMouseDown = function(a) {
this._killHoverCheck();
if (0 === a.button) {
var e = this._getTargetMousePos(a, a.target);
this._dragInfo = {start:e, current:e, delta:{x:0, y:0}, hasMoved:!1, originalTarget:a.target};
window.addEventListener("mousemove", this._boundOnDrag, !1);
window.addEventListener("mouseup", this._boundOnMouseUp, !1);
this._target.onMouseDown(e.x, e.y);
}
};
a.prototype._onDrag = function(a) {
var e = this._dragInfo;
a = this._getTargetMousePos(a, e.originalTarget);
var m = {x:a.x - e.start.x, y:a.y - e.start.y};
e.current = a;
e.delta = m;
e.hasMoved = !0;
this._target.onDrag(e.start.x, e.start.y, a.x, a.y, m.x, m.y);
};
a.prototype._onMouseUp = function(a) {
window.removeEventListener("mousemove", this._boundOnDrag);
window.removeEventListener("mouseup", this._boundOnMouseUp);
var e = this;
a = this._dragInfo;
if (a.hasMoved) {
this._target.onDragEnd(a.start.x, a.start.y, a.current.x, a.current.y, a.delta.x, a.delta.y);
} else {
this._target.onClick(a.current.x, a.current.y);
}
this._dragInfo = null;
this._wheelDisabled = !0;
setTimeout(function() {
e._wheelDisabled = !1;
}, 500);
};
a.prototype._onMouseOver = function(a) {
a.target.addEventListener("mousemove", this._boundOnMouseMove, !1);
if (!this._dragInfo) {
var e = this._getTargetMousePos(a, a.target);
this._target.onMouseOver(e.x, e.y);
this._startHoverCheck(a);
}
};
a.prototype._onMouseOut = function(a) {
a.target.removeEventListener("mousemove", this._boundOnMouseMove, !1);
if (!this._dragInfo) {
this._target.onMouseOut();
}
this._killHoverCheck();
};
a.prototype._onMouseMove = function(a) {
if (!this._dragInfo) {
var e = this._getTargetMousePos(a, a.target);
this._target.onMouseMove(e.x, e.y);
this._killHoverCheck();
this._startHoverCheck(a);
}
};
a.prototype._onMouseWheel = function(a) {
if (!(a.altKey || a.metaKey || a.ctrlKey || a.shiftKey || (a.preventDefault(), this._dragInfo || this._wheelDisabled))) {
var e = this._getTargetMousePos(a, a.target);
a = s("undefined" !== typeof a.deltaY ? a.deltaY / 16 : -a.wheelDelta / 40, -1, 1);
this._target.onMouseWheel(e.x, e.y, Math.pow(1.2, a) - 1);
}
};
a.prototype._startHoverCheck = function(l) {
this._hoverInfo = {isHovering:!1, timeoutHandle:setTimeout(this._onMouseMoveIdleHandler.bind(this), a.HOVER_TIMEOUT), pos:this._getTargetMousePos(l, l.target)};
};
a.prototype._killHoverCheck = function() {
if (this._hoverInfo) {
clearTimeout(this._hoverInfo.timeoutHandle);
if (this._hoverInfo.isHovering) {
this._target.onHoverEnd();
}
this._hoverInfo = null;
}
};
a.prototype._onMouseMoveIdleHandler = function() {
var a = this._hoverInfo;
a.isHovering = !0;
this._target.onHoverStart(a.pos.x, a.pos.y);
};
a.prototype._getTargetMousePos = function(a, e) {
var m = e.getBoundingClientRect();
return{x:a.clientX - m.left, y:a.clientY - m.top};
};
a.HOVER_TIMEOUT = 500;
a._cursor = h.DEFAULT;
return a;
}();
a.MouseController = p;
})(h.Profiler || (h.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
a[a.NONE = 0] = "NONE";
a[a.WINDOW = 1] = "WINDOW";
a[a.HANDLE_LEFT = 2] = "HANDLE_LEFT";
a[a.HANDLE_RIGHT = 3] = "HANDLE_RIGHT";
a[a.HANDLE_BOTH = 4] = "HANDLE_BOTH";
})(a.FlameChartDragTarget || (a.FlameChartDragTarget = {}));
var c = function() {
function c(s) {
this._controller = s;
this._initialized = !1;
this._canvas = document.createElement("canvas");
this._context = this._canvas.getContext("2d");
this._mouseController = new a.MouseController(this, this._canvas);
s = s.container;
s.appendChild(this._canvas);
s = s.getBoundingClientRect();
this.setSize(s.width);
}
Object.defineProperty(c.prototype, "canvas", {get:function() {
return this._canvas;
}, enumerable:!0, configurable:!0});
c.prototype.setSize = function(a, c) {
void 0 === c && (c = 20);
this._width = a;
this._height = c;
this._resetCanvas();
this.draw();
};
c.prototype.initialize = function(a, c) {
this._initialized = !0;
this.setRange(a, c);
this.setWindow(a, c, !1);
this.draw();
};
c.prototype.setWindow = function(a, c, l) {
void 0 === l && (l = !0);
this._windowStart = a;
this._windowEnd = c;
!l || this.draw();
};
c.prototype.setRange = function(a, c) {
var l = !1;
void 0 === l && (l = !0);
this._rangeStart = a;
this._rangeEnd = c;
!l || this.draw();
};
c.prototype.destroy = function() {
this._mouseController.destroy();
this._mouseController = null;
this._controller.container.removeChild(this._canvas);
this._controller = null;
};
c.prototype._resetCanvas = function() {
var a = window.devicePixelRatio, c = this._canvas;
c.width = this._width * a;
c.height = this._height * a;
c.style.width = this._width + "px";
c.style.height = this._height + "px";
};
c.prototype.draw = function() {
};
c.prototype._almostEq = function(a, c) {
var l;
void 0 === l && (l = 10);
return Math.abs(a - c) < 1 / Math.pow(10, l);
};
c.prototype._windowEqRange = function() {
return this._almostEq(this._windowStart, this._rangeStart) && this._almostEq(this._windowEnd, this._rangeEnd);
};
c.prototype._decimalPlaces = function(a) {
return(+a).toFixed(10).replace(/^-?\d*\.?|0+$/g, "").length;
};
c.prototype._toPixelsRelative = function(a) {
return 0;
};
c.prototype._toPixels = function(a) {
return 0;
};
c.prototype._toTimeRelative = function(a) {
return 0;
};
c.prototype._toTime = function(a) {
return 0;
};
c.prototype.onMouseWheel = function(a, s, l) {
a = this._toTime(a);
s = this._windowStart;
var e = this._windowEnd, m = e - s;
l = Math.max((c.MIN_WINDOW_LEN - m) / m, l);
this._controller.setWindow(s + (s - a) * l, e + (e - a) * l);
this.onHoverEnd();
};
c.prototype.onMouseDown = function(a, c) {
};
c.prototype.onMouseMove = function(a, c) {
};
c.prototype.onMouseOver = function(a, c) {
};
c.prototype.onMouseOut = function() {
};
c.prototype.onDrag = function(a, c, l, e, m, t) {
};
c.prototype.onDragEnd = function(a, c, l, e, m, t) {
};
c.prototype.onClick = function(a, c) {
};
c.prototype.onHoverStart = function(a, c) {
};
c.prototype.onHoverEnd = function() {
};
c.DRAGHANDLE_WIDTH = 4;
c.MIN_WINDOW_LEN = .1;
return c;
}();
a.FlameChartBase = c;
})(c.Profiler || (c.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.StringUtilities.trimMiddle, h = function(h) {
function v(a, e) {
h.call(this, a);
this._textWidth = {};
this._minFrameWidthInPixels = 1;
this._snapshot = e;
this._kindStyle = Object.create(null);
}
__extends(v, h);
v.prototype.setSize = function(a, e) {
h.prototype.setSize.call(this, a, e || this._initialized ? 12.5 * this._maxDepth : 100);
};
v.prototype.initialize = function(a, e) {
this._initialized = !0;
this._maxDepth = this._snapshot.maxDepth;
this.setRange(a, e);
this.setWindow(a, e, !1);
this.setSize(this._width, 12.5 * this._maxDepth);
};
v.prototype.destroy = function() {
h.prototype.destroy.call(this);
this._snapshot = null;
};
v.prototype.draw = function() {
var a = this._context, e = window.devicePixelRatio;
c.ColorStyle.reset();
a.save();
a.scale(e, e);
a.fillStyle = this._controller.theme.bodyBackground(1);
a.fillRect(0, 0, this._width, this._height);
this._initialized && this._drawChildren(this._snapshot);
a.restore();
};
v.prototype._drawChildren = function(a, e) {
void 0 === e && (e = 0);
var m = a.getChildRange(this._windowStart, this._windowEnd);
if (m) {
for (var c = m.startIndex;c <= m.endIndex;c++) {
var q = a.children[c];
this._drawFrame(q, e) && this._drawChildren(q, e + 1);
}
}
};
v.prototype._drawFrame = function(a, e) {
var m = this._context, t = this._toPixels(a.startTime), q = this._toPixels(a.endTime), n = q - t;
if (n <= this._minFrameWidthInPixels) {
return m.fillStyle = this._controller.theme.tabToolbar(1), m.fillRect(t, 12.5 * e, this._minFrameWidthInPixels, 12 + 12.5 * (a.maxDepth - a.depth)), !1;
}
0 > t && (q = n + t, t = 0);
var q = q - t, k = this._kindStyle[a.kind.id];
k || (k = c.ColorStyle.randomStyle(), k = this._kindStyle[a.kind.id] = {bgColor:k, textColor:c.ColorStyle.contrastStyle(k)});
m.save();
m.fillStyle = k.bgColor;
m.fillRect(t, 12.5 * e, q, 12);
12 < n && (n = a.kind.name) && n.length && (n = this._prepareText(m, n, q - 4), n.length && (m.fillStyle = k.textColor, m.textBaseline = "bottom", m.fillText(n, t + 2, 12.5 * (e + 1) - 1)));
m.restore();
return!0;
};
v.prototype._prepareText = function(a, e, m) {
var c = this._measureWidth(a, e);
if (m > c) {
return e;
}
for (var c = 3, q = e.length;c < q;) {
var n = c + q >> 1;
this._measureWidth(a, s(e, n)) < m ? c = n + 1 : q = n;
}
e = s(e, q - 1);
c = this._measureWidth(a, e);
return c <= m ? e : "";
};
v.prototype._measureWidth = function(a, e) {
var m = this._textWidth[e];
m || (m = a.measureText(e).width, this._textWidth[e] = m);
return m;
};
v.prototype._toPixelsRelative = function(a) {
return a * this._width / (this._windowEnd - this._windowStart);
};
v.prototype._toPixels = function(a) {
return this._toPixelsRelative(a - this._windowStart);
};
v.prototype._toTimeRelative = function(a) {
return a * (this._windowEnd - this._windowStart) / this._width;
};
v.prototype._toTime = function(a) {
return this._toTimeRelative(a) + this._windowStart;
};
v.prototype._getFrameAtPosition = function(a, e) {
var m = 1 + e / 12.5 | 0, c = this._snapshot.query(this._toTime(a));
if (c && c.depth >= m) {
for (;c && c.depth > m;) {
c = c.parent;
}
return c;
}
return null;
};
v.prototype.onMouseDown = function(l, e) {
this._windowEqRange() || (this._mouseController.updateCursor(a.MouseCursor.ALL_SCROLL), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:1});
};
v.prototype.onMouseMove = function(a, e) {
};
v.prototype.onMouseOver = function(a, e) {
};
v.prototype.onMouseOut = function() {
};
v.prototype.onDrag = function(a, e, m, c, q, n) {
if (a = this._dragInfo) {
q = this._toTimeRelative(-q), this._controller.setWindow(a.windowStartInitial + q, a.windowEndInitial + q);
}
};
v.prototype.onDragEnd = function(l, e, m, c, q, n) {
this._dragInfo = null;
this._mouseController.updateCursor(a.MouseCursor.DEFAULT);
};
v.prototype.onClick = function(l, e) {
this._dragInfo = null;
this._mouseController.updateCursor(a.MouseCursor.DEFAULT);
};
v.prototype.onHoverStart = function(a, e) {
var m = this._getFrameAtPosition(a, e);
m && (this._hoveredFrame = m, this._controller.showTooltip(this, m, a, e));
};
v.prototype.onHoverEnd = function() {
this._hoveredFrame && (this._hoveredFrame = null, this._controller.hideTooltip());
};
v.prototype.getStatistics = function(a) {
var e = this._snapshot;
e.statistics || e.calculateStatistics();
return e.statistics[a.id];
};
return v;
}(a.FlameChartBase);
a.FlameChart = h;
})(h.Profiler || (h.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.NumberUtilities.clamp;
(function(a) {
a[a.OVERLAY = 0] = "OVERLAY";
a[a.STACK = 1] = "STACK";
a[a.UNION = 2] = "UNION";
})(a.FlameChartOverviewMode || (a.FlameChartOverviewMode = {}));
var h = function(c) {
function h(a, e) {
void 0 === e && (e = 1);
this._mode = e;
this._overviewCanvasDirty = !0;
this._overviewCanvas = document.createElement("canvas");
this._overviewContext = this._overviewCanvas.getContext("2d");
c.call(this, a);
}
__extends(h, c);
h.prototype.setSize = function(a, e) {
c.prototype.setSize.call(this, a, e || 64);
};
Object.defineProperty(h.prototype, "mode", {set:function(a) {
this._mode = a;
this.draw();
}, enumerable:!0, configurable:!0});
h.prototype._resetCanvas = function() {
c.prototype._resetCanvas.call(this);
this._overviewCanvas.width = this._canvas.width;
this._overviewCanvas.height = this._canvas.height;
this._overviewCanvasDirty = !0;
};
h.prototype.draw = function() {
var a = this._context, e = window.devicePixelRatio, m = this._width, c = this._height;
a.save();
a.scale(e, e);
a.fillStyle = this._controller.theme.bodyBackground(1);
a.fillRect(0, 0, m, c);
a.restore();
this._initialized && (this._overviewCanvasDirty && (this._drawChart(), this._overviewCanvasDirty = !1), a.drawImage(this._overviewCanvas, 0, 0), this._drawSelection());
};
h.prototype._drawSelection = function() {
var a = this._context, e = this._height, m = window.devicePixelRatio, c = this._selection ? this._selection.left : this._toPixels(this._windowStart), q = this._selection ? this._selection.right : this._toPixels(this._windowEnd), n = this._controller.theme;
a.save();
a.scale(m, m);
this._selection ? (a.fillStyle = n.selectionText(.15), a.fillRect(c, 1, q - c, e - 1), a.fillStyle = "rgba(133, 0, 0, 1)", a.fillRect(c + .5, 0, q - c - 1, 4), a.fillRect(c + .5, e - 4, q - c - 1, 4)) : (a.fillStyle = n.bodyBackground(.4), a.fillRect(0, 1, c, e - 1), a.fillRect(q, 1, this._width, e - 1));
a.beginPath();
a.moveTo(c, 0);
a.lineTo(c, e);
a.moveTo(q, 0);
a.lineTo(q, e);
a.lineWidth = .5;
a.strokeStyle = n.foregroundTextGrey(1);
a.stroke();
e = Math.abs((this._selection ? this._toTime(this._selection.right) : this._windowEnd) - (this._selection ? this._toTime(this._selection.left) : this._windowStart));
a.fillStyle = n.selectionText(.5);
a.font = "8px sans-serif";
a.textBaseline = "alphabetic";
a.textAlign = "end";
a.fillText(e.toFixed(2), Math.min(c, q) - 4, 10);
a.fillText((e / 60).toFixed(2), Math.min(c, q) - 4, 20);
a.restore();
};
h.prototype._drawChart = function() {
var a = window.devicePixelRatio, e = this._height, m = this._controller.activeProfile, c = 4 * this._width, q = m.totalTime / c, n = this._overviewContext, k = this._controller.theme.blueHighlight(1);
n.save();
n.translate(0, a * e);
var f = -a * e / (m.maxDepth - 1);
n.scale(a / 4, f);
n.clearRect(0, 0, c, m.maxDepth - 1);
1 == this._mode && n.scale(1, 1 / m.snapshotCount);
for (var d = 0, b = m.snapshotCount;d < b;d++) {
var g = m.getSnapshotAt(d);
if (g) {
var r = null, w = 0;
n.beginPath();
n.moveTo(0, 0);
for (var z = 0;z < c;z++) {
w = m.startTime + z * q, w = (r = r ? r.queryNext(w) : g.query(w)) ? r.getDepth() - 1 : 0, n.lineTo(z, w);
}
n.lineTo(z, 0);
n.fillStyle = k;
n.fill();
1 == this._mode && n.translate(0, -e * a / f);
}
}
n.restore();
};
h.prototype._toPixelsRelative = function(a) {
return a * this._width / (this._rangeEnd - this._rangeStart);
};
h.prototype._toPixels = function(a) {
return this._toPixelsRelative(a - this._rangeStart);
};
h.prototype._toTimeRelative = function(a) {
return a * (this._rangeEnd - this._rangeStart) / this._width;
};
h.prototype._toTime = function(a) {
return this._toTimeRelative(a) + this._rangeStart;
};
h.prototype._getDragTargetUnderCursor = function(c, e) {
if (0 <= e && e < this._height) {
var m = this._toPixels(this._windowStart), t = this._toPixels(this._windowEnd), q = 2 + a.FlameChartBase.DRAGHANDLE_WIDTH / 2, n = c >= m - q && c <= m + q, k = c >= t - q && c <= t + q;
if (n && k) {
return 4;
}
if (n) {
return 2;
}
if (k) {
return 3;
}
if (!this._windowEqRange() && c > m + q && c < t - q) {
return 1;
}
}
return 0;
};
h.prototype.onMouseDown = function(c, e) {
var m = this._getDragTargetUnderCursor(c, e);
0 === m ? (this._selection = {left:c, right:c}, this.draw()) : (1 === m && this._mouseController.updateCursor(a.MouseCursor.GRABBING), this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:m});
};
h.prototype.onMouseMove = function(c, e) {
var m = a.MouseCursor.DEFAULT, t = this._getDragTargetUnderCursor(c, e);
0 === t || this._selection || (m = 1 === t ? a.MouseCursor.GRAB : a.MouseCursor.EW_RESIZE);
this._mouseController.updateCursor(m);
};
h.prototype.onMouseOver = function(a, e) {
this.onMouseMove(a, e);
};
h.prototype.onMouseOut = function() {
this._mouseController.updateCursor(a.MouseCursor.DEFAULT);
};
h.prototype.onDrag = function(c, e, m, t, q, n) {
if (this._selection) {
this._selection = {left:c, right:s(m, 0, this._width - 1)}, this.draw();
} else {
c = this._dragInfo;
if (4 === c.target) {
if (0 !== q) {
c.target = 0 > q ? 2 : 3;
} else {
return;
}
}
e = this._windowStart;
m = this._windowEnd;
q = this._toTimeRelative(q);
switch(c.target) {
case 1:
e = c.windowStartInitial + q;
m = c.windowEndInitial + q;
break;
case 2:
e = s(c.windowStartInitial + q, this._rangeStart, m - a.FlameChartBase.MIN_WINDOW_LEN);
break;
case 3:
m = s(c.windowEndInitial + q, e + a.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd);
break;
default:
return;
}
this._controller.setWindow(e, m);
}
};
h.prototype.onDragEnd = function(a, e, m, c, q, n) {
this._selection && (this._selection = null, this._controller.setWindow(this._toTime(a), this._toTime(m)));
this._dragInfo = null;
this.onMouseMove(m, c);
};
h.prototype.onClick = function(a, e) {
this._selection = this._dragInfo = null;
this._windowEqRange() || (0 === this._getDragTargetUnderCursor(a, e) && this._controller.moveWindowTo(this._toTime(a)), this.onMouseMove(a, e));
this.draw();
};
h.prototype.onHoverStart = function(a, e) {
};
h.prototype.onHoverEnd = function() {
};
return h;
}(a.FlameChartBase);
a.FlameChartOverview = h;
})(h.Profiler || (h.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.NumberUtilities.clamp;
(function(a) {
a[a.OVERVIEW = 0] = "OVERVIEW";
a[a.CHART = 1] = "CHART";
})(a.FlameChartHeaderType || (a.FlameChartHeaderType = {}));
var h = function(c) {
function h(a, e) {
this._type = e;
c.call(this, a);
}
__extends(h, c);
h.prototype.draw = function() {
var a = this._context, e = window.devicePixelRatio, m = this._width, c = this._height;
a.save();
a.scale(e, e);
a.fillStyle = this._controller.theme.tabToolbar(1);
a.fillRect(0, 0, m, c);
this._initialized && (0 == this._type ? (e = this._toPixels(this._windowStart), m = this._toPixels(this._windowEnd), a.fillStyle = this._controller.theme.bodyBackground(1), a.fillRect(e, 0, m - e, c), this._drawLabels(this._rangeStart, this._rangeEnd), this._drawDragHandle(e), this._drawDragHandle(m)) : this._drawLabels(this._windowStart, this._windowEnd));
a.restore();
};
h.prototype._drawLabels = function(a, e) {
var m = this._context, c = this._calculateTickInterval(a, e), q = Math.ceil(a / c) * c, n = 500 <= c, k = n ? 1E3 : 1, f = this._decimalPlaces(c / k), n = n ? "s" : "ms", d = this._toPixels(q), b = this._height / 2, g = this._controller.theme;
m.lineWidth = 1;
m.strokeStyle = g.contentTextDarkGrey(.5);
m.fillStyle = g.contentTextDarkGrey(1);
m.textAlign = "right";
m.textBaseline = "middle";
m.font = "11px sans-serif";
for (g = this._width + h.TICK_MAX_WIDTH;d < g;) {
m.fillText((q / k).toFixed(f) + " " + n, d - 7, b + 1), m.beginPath(), m.moveTo(d, 0), m.lineTo(d, this._height + 1), m.closePath(), m.stroke(), q += c, d = this._toPixels(q);
}
};
h.prototype._calculateTickInterval = function(a, e) {
var m = (e - a) / (this._width / h.TICK_MAX_WIDTH), c = Math.pow(10, Math.floor(Math.log(m) / Math.LN10)), m = m / c;
return 5 < m ? 10 * c : 2 < m ? 5 * c : 1 < m ? 2 * c : c;
};
h.prototype._drawDragHandle = function(c) {
var e = this._context;
e.lineWidth = 2;
e.strokeStyle = this._controller.theme.bodyBackground(1);
e.fillStyle = this._controller.theme.foregroundTextGrey(.7);
this._drawRoundedRect(e, c - a.FlameChartBase.DRAGHANDLE_WIDTH / 2, a.FlameChartBase.DRAGHANDLE_WIDTH, this._height - 2);
};
h.prototype._drawRoundedRect = function(a, e, m, c) {
var q, n = !0;
void 0 === n && (n = !0);
void 0 === q && (q = !0);
a.beginPath();
a.moveTo(e + 2, 1);
a.lineTo(e + m - 2, 1);
a.quadraticCurveTo(e + m, 1, e + m, 3);
a.lineTo(e + m, 1 + c - 2);
a.quadraticCurveTo(e + m, 1 + c, e + m - 2, 1 + c);
a.lineTo(e + 2, 1 + c);
a.quadraticCurveTo(e, 1 + c, e, 1 + c - 2);
a.lineTo(e, 3);
a.quadraticCurveTo(e, 1, e + 2, 1);
a.closePath();
n && a.stroke();
q && a.fill();
};
h.prototype._toPixelsRelative = function(a) {
return a * this._width / (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart);
};
h.prototype._toPixels = function(a) {
return this._toPixelsRelative(a - (0 === this._type ? this._rangeStart : this._windowStart));
};
h.prototype._toTimeRelative = function(a) {
return a * (0 === this._type ? this._rangeEnd - this._rangeStart : this._windowEnd - this._windowStart) / this._width;
};
h.prototype._toTime = function(a) {
return this._toTimeRelative(a) + (0 === this._type ? this._rangeStart : this._windowStart);
};
h.prototype._getDragTargetUnderCursor = function(c, e) {
if (0 <= e && e < this._height) {
if (0 === this._type) {
var m = this._toPixels(this._windowStart), t = this._toPixels(this._windowEnd), q = 2 + a.FlameChartBase.DRAGHANDLE_WIDTH / 2, m = c >= m - q && c <= m + q, t = c >= t - q && c <= t + q;
if (m && t) {
return 4;
}
if (m) {
return 2;
}
if (t) {
return 3;
}
}
if (!this._windowEqRange()) {
return 1;
}
}
return 0;
};
h.prototype.onMouseDown = function(c, e) {
var m = this._getDragTargetUnderCursor(c, e);
1 === m && this._mouseController.updateCursor(a.MouseCursor.GRABBING);
this._dragInfo = {windowStartInitial:this._windowStart, windowEndInitial:this._windowEnd, target:m};
};
h.prototype.onMouseMove = function(c, e) {
var m = a.MouseCursor.DEFAULT, t = this._getDragTargetUnderCursor(c, e);
0 !== t && (1 !== t ? m = a.MouseCursor.EW_RESIZE : 1 !== t || this._windowEqRange() || (m = a.MouseCursor.GRAB));
this._mouseController.updateCursor(m);
};
h.prototype.onMouseOver = function(a, e) {
this.onMouseMove(a, e);
};
h.prototype.onMouseOut = function() {
this._mouseController.updateCursor(a.MouseCursor.DEFAULT);
};
h.prototype.onDrag = function(c, e, m, t, q, n) {
c = this._dragInfo;
if (4 === c.target) {
if (0 !== q) {
c.target = 0 > q ? 2 : 3;
} else {
return;
}
}
e = this._windowStart;
m = this._windowEnd;
q = this._toTimeRelative(q);
switch(c.target) {
case 1:
m = 0 === this._type ? 1 : -1;
e = c.windowStartInitial + m * q;
m = c.windowEndInitial + m * q;
break;
case 2:
e = s(c.windowStartInitial + q, this._rangeStart, m - a.FlameChartBase.MIN_WINDOW_LEN);
break;
case 3:
m = s(c.windowEndInitial + q, e + a.FlameChartBase.MIN_WINDOW_LEN, this._rangeEnd);
break;
default:
return;
}
this._controller.setWindow(e, m);
};
h.prototype.onDragEnd = function(a, e, m, c, q, n) {
this._dragInfo = null;
this.onMouseMove(m, c);
};
h.prototype.onClick = function(c, e) {
1 === this._dragInfo.target && this._mouseController.updateCursor(a.MouseCursor.GRAB);
};
h.prototype.onHoverStart = function(a, e) {
};
h.prototype.onHoverEnd = function() {
};
h.TICK_MAX_WIDTH = 75;
return h;
}(a.FlameChartBase);
a.FlameChartHeader = h;
})(h.Profiler || (h.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
var c = function() {
function a(c, e, m, t, q) {
this.pageLoaded = c;
this.threadsTotal = e;
this.threadsLoaded = m;
this.threadFilesTotal = t;
this.threadFilesLoaded = q;
}
a.prototype.toString = function() {
return "[" + ["pageLoaded", "threadsTotal", "threadsLoaded", "threadFilesTotal", "threadFilesLoaded"].map(function(a, e, m) {
return a + ":" + this[a];
}, this).join(", ") + "]";
};
return a;
}();
a.TraceLoggerProgressInfo = c;
var h = function() {
function h(a) {
this._baseUrl = a;
this._threads = [];
this._progressInfo = null;
}
h.prototype.loadPage = function(a, e, m) {
this._threads = [];
this._pageLoadCallback = e;
this._pageLoadProgressCallback = m;
this._progressInfo = new c(!1, 0, 0, 0, 0);
this._loadData([a], this._onLoadPage.bind(this));
};
Object.defineProperty(h.prototype, "buffers", {get:function() {
for (var a = [], e = 0, m = this._threads.length;e < m;e++) {
a.push(this._threads[e].buffer);
}
return a;
}, enumerable:!0, configurable:!0});
h.prototype._onProgress = function() {
this._pageLoadProgressCallback && this._pageLoadProgressCallback.call(this, this._progressInfo);
};
h.prototype._onLoadPage = function(c) {
if (c && 1 == c.length) {
var e = this, m = 0;
c = c[0];
var t = c.length;
this._threads = Array(t);
this._progressInfo.pageLoaded = !0;
this._progressInfo.threadsTotal = t;
for (var q = 0;q < c.length;q++) {
var n = c[q], k = [n.dict, n.tree];
n.corrections && k.push(n.corrections);
this._progressInfo.threadFilesTotal += k.length;
this._loadData(k, function(f) {
return function(d) {
d && (d = new a.Thread(d), d.buffer.name = "Thread " + f, e._threads[f] = d);
m++;
e._progressInfo.threadsLoaded++;
e._onProgress();
m === t && e._pageLoadCallback.call(e, null, e._threads);
};
}(q), function(a) {
e._progressInfo.threadFilesLoaded++;
e._onProgress();
});
}
this._onProgress();
} else {
this._pageLoadCallback.call(this, "Error loading page.", null);
}
};
h.prototype._loadData = function(a, e, m) {
var c = 0, q = 0, n = a.length, k = [];
k.length = n;
for (var f = 0;f < n;f++) {
var d = this._baseUrl + a[f], b = new XMLHttpRequest, g = /\.tl$/i.test(d) ? "arraybuffer" : "json";
b.open("GET", d, !0);
b.responseType = g;
b.onload = function(b, d) {
return function(g) {
if ("json" === d) {
if (g = this.response, "string" === typeof g) {
try {
g = JSON.parse(g), k[b] = g;
} catch (a) {
q++;
}
} else {
k[b] = g;
}
} else {
k[b] = this.response;
}
++c;
m && m(c);
c === n && e(k);
};
}(f, g);
b.send();
}
};
h.colors = "#0044ff #8c4b00 #cc5c33 #ff80c4 #ffbfd9 #ff8800 #8c5e00 #adcc33 #b380ff #bfd9ff #ffaa00 #8c0038 #bf8f30 #f780ff #cc99c9 #aaff00 #000073 #452699 #cc8166 #cca799 #000066 #992626 #cc6666 #ccc299 #ff6600 #526600 #992663 #cc6681 #99ccc2 #ff0066 #520066 #269973 #61994d #739699 #ffcc00 #006629 #269199 #94994d #738299 #ff0000 #590000 #234d8c #8c6246 #7d7399 #ee00ff #00474d #8c2385 #8c7546 #7c8c69 #eeff00 #4d003d #662e1a #62468c #8c6969 #6600ff #4c2900 #1a6657 #8c464f #8c6981 #44ff00 #401100 #1a2466 #663355 #567365 #d90074 #403300 #101d40 #59562d #66614d #cc0000 #002b40 #234010 #4c2626 #4d5e66 #00a3cc #400011 #231040 #4c3626 #464359 #0000bf #331b00 #80e6ff #311a33 #4d3939 #a69b00 #003329 #80ffb2 #331a20 #40303d #00a658 #40ffd9 #ffc480 #ffe1bf #332b26 #8c2500 #9933cc #80fff6 #ffbfbf #303326 #005e8c #33cc47 #b2ff80 #c8bfff #263332 #00708c #cc33ad #ffe680 #f2ffbf #262a33 #388c00 #335ccc #8091ff #bfffd9".split(" ");
return h;
}();
a.TraceLogger = h;
})(a.TraceLogger || (a.TraceLogger = {}));
})(c.Profiler || (c.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
var h;
(function(a) {
a[a.START_HI = 0] = "START_HI";
a[a.START_LO = 4] = "START_LO";
a[a.STOP_HI = 8] = "STOP_HI";
a[a.STOP_LO = 12] = "STOP_LO";
a[a.TEXTID = 16] = "TEXTID";
a[a.NEXTID = 20] = "NEXTID";
})(h || (h = {}));
h = function() {
function c(s) {
2 <= s.length && (this._text = s[0], this._data = new DataView(s[1]), this._buffer = new a.TimelineBuffer, this._walkTree(0));
}
Object.defineProperty(c.prototype, "buffer", {get:function() {
return this._buffer;
}, enumerable:!0, configurable:!0});
c.prototype._walkTree = function(a) {
var l = this._data, e = this._buffer;
do {
var m = a * c.ITEM_SIZE, t = 4294967295 * l.getUint32(m + 0) + l.getUint32(m + 4), q = 4294967295 * l.getUint32(m + 8) + l.getUint32(m + 12), n = l.getUint32(m + 16), m = l.getUint32(m + 20), k = 1 === (n & 1), n = n >>> 1, n = this._text[n];
e.enter(n, null, t / 1E6);
k && this._walkTree(a + 1);
e.leave(n, null, q / 1E6);
a = m;
} while (0 !== a);
};
c.ITEM_SIZE = 24;
return c;
}();
c.Thread = h;
})(a.TraceLogger || (a.TraceLogger = {}));
})(c.Profiler || (c.Profiler = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.NumberUtilities.clamp, h = function() {
function a() {
this.length = 0;
this.lines = [];
this.format = [];
this.time = [];
this.repeat = [];
this.length = 0;
}
a.prototype.append = function(a, e) {
var m = this.lines;
0 < m.length && m[m.length - 1] === a ? this.repeat[m.length - 1]++ : (this.lines.push(a), this.repeat.push(1), this.format.push(e ? {backgroundFillStyle:e} : void 0), this.time.push(performance.now()), this.length++);
};
a.prototype.get = function(a) {
return this.lines[a];
};
a.prototype.getFormat = function(a) {
return this.format[a];
};
a.prototype.getTime = function(a) {
return this.time[a];
};
a.prototype.getRepeat = function(a) {
return this.repeat[a];
};
return a;
}();
a.Buffer = h;
var p = function() {
function a(c) {
this.lineColor = "#2A2A2A";
this.alternateLineColor = "#262626";
this.textColor = "#FFFFFF";
this.selectionColor = "#96C9F3";
this.selectionTextColor = "#000000";
this.ratio = 1;
this.showLineNumbers = !0;
this.showLineCounter = this.showLineTime = !1;
this.canvas = c;
this.canvas.focus();
this.context = c.getContext("2d", {original:!0});
this.context.fillStyle = "#FFFFFF";
this.fontSize = 10;
this.columnIndex = this.pageIndex = this.lineIndex = 0;
this.selection = null;
this.lineHeight = 15;
this.hasFocus = !1;
window.addEventListener("resize", this._resizeHandler.bind(this), !1);
this._resizeHandler();
this.textMarginBottom = this.textMarginLeft = 4;
this.refreshFrequency = 0;
this.buffer = new h;
c.addEventListener("keydown", function(a) {
var c = 0;
switch(a.keyCode) {
case r:
this.showLineNumbers = !this.showLineNumbers;
break;
case w:
this.showLineTime = !this.showLineTime;
break;
case n:
c = -1;
break;
case k:
c = 1;
break;
case e:
c = -this.pageLineCount;
break;
case m:
c = this.pageLineCount;
break;
case t:
c = -this.lineIndex;
break;
case q:
c = this.buffer.length - this.lineIndex;
break;
case f:
this.columnIndex -= a.metaKey ? 10 : 1;
0 > this.columnIndex && (this.columnIndex = 0);
a.preventDefault();
break;
case d:
this.columnIndex += a.metaKey ? 10 : 1;
a.preventDefault();
break;
case b:
a.metaKey && (this.selection = {start:0, end:this.buffer.length}, a.preventDefault());
break;
case g:
if (a.metaKey) {
var l = "";
if (this.selection) {
for (var s = this.selection.start;s <= this.selection.end;s++) {
l += this.buffer.get(s) + "\n";
}
} else {
l = this.buffer.get(this.lineIndex);
}
alert(l);
}
;
}
a.metaKey && (c *= this.pageLineCount);
c && (this.scroll(c), a.preventDefault());
c && a.shiftKey ? this.selection ? this.lineIndex > this.selection.start ? this.selection.end = this.lineIndex : this.selection.start = this.lineIndex : 0 < c ? this.selection = {start:this.lineIndex - c, end:this.lineIndex} : 0 > c && (this.selection = {start:this.lineIndex, end:this.lineIndex - c}) : c && (this.selection = null);
this.paint();
}.bind(this), !1);
c.addEventListener("focus", function(b) {
this.hasFocus = !0;
}.bind(this), !1);
c.addEventListener("blur", function(b) {
this.hasFocus = !1;
}.bind(this), !1);
var e = 33, m = 34, t = 36, q = 35, n = 38, k = 40, f = 37, d = 39, b = 65, g = 67, r = 78, w = 84;
}
a.prototype.resize = function() {
this._resizeHandler();
};
a.prototype._resizeHandler = function() {
var a = this.canvas.parentElement, e = a.clientWidth, a = a.clientHeight - 1, m = window.devicePixelRatio || 1;
1 !== m ? (this.ratio = m / 1, this.canvas.width = e * this.ratio, this.canvas.height = a * this.ratio, this.canvas.style.width = e + "px", this.canvas.style.height = a + "px") : (this.ratio = 1, this.canvas.width = e, this.canvas.height = a);
this.pageLineCount = Math.floor(this.canvas.height / this.lineHeight);
};
a.prototype.gotoLine = function(a) {
this.lineIndex = s(a, 0, this.buffer.length - 1);
};
a.prototype.scrollIntoView = function() {
this.lineIndex < this.pageIndex ? this.pageIndex = this.lineIndex : this.lineIndex >= this.pageIndex + this.pageLineCount && (this.pageIndex = this.lineIndex - this.pageLineCount + 1);
};
a.prototype.scroll = function(a) {
this.gotoLine(this.lineIndex + a);
this.scrollIntoView();
};
a.prototype.paint = function() {
var a = this.pageLineCount;
this.pageIndex + a > this.buffer.length && (a = this.buffer.length - this.pageIndex);
var e = this.textMarginLeft, m = e + (this.showLineNumbers ? 5 * (String(this.buffer.length).length + 2) : 0), c = m + (this.showLineTime ? 40 : 10), q = c + 25;
this.context.font = this.fontSize + 'px Consolas, "Liberation Mono", Courier, monospace';
this.context.setTransform(this.ratio, 0, 0, this.ratio, 0, 0);
for (var n = this.canvas.width, k = this.lineHeight, f = 0;f < a;f++) {
var d = f * this.lineHeight, b = this.pageIndex + f, g = this.buffer.get(b), r = this.buffer.getFormat(b), w = this.buffer.getRepeat(b), z = 1 < b ? this.buffer.getTime(b) - this.buffer.getTime(0) : 0;
this.context.fillStyle = b % 2 ? this.lineColor : this.alternateLineColor;
r && r.backgroundFillStyle && (this.context.fillStyle = r.backgroundFillStyle);
this.context.fillRect(0, d, n, k);
this.context.fillStyle = this.selectionTextColor;
this.context.fillStyle = this.textColor;
this.selection && b >= this.selection.start && b <= this.selection.end && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, d, n, k), this.context.fillStyle = this.selectionTextColor);
this.hasFocus && b === this.lineIndex && (this.context.fillStyle = this.selectionColor, this.context.fillRect(0, d, n, k), this.context.fillStyle = this.selectionTextColor);
0 < this.columnIndex && (g = g.substring(this.columnIndex));
d = (f + 1) * this.lineHeight - this.textMarginBottom;
this.showLineNumbers && this.context.fillText(String(b), e, d);
this.showLineTime && this.context.fillText(z.toFixed(1).padLeft(" ", 6), m, d);
1 < w && this.context.fillText(String(w).padLeft(" ", 3), c, d);
this.context.fillText(g, q, d);
}
};
a.prototype.refreshEvery = function(a) {
function e() {
m.paint();
m.refreshFrequency && setTimeout(e, m.refreshFrequency);
}
var m = this;
this.refreshFrequency = a;
m.refreshFrequency && setTimeout(e, m.refreshFrequency);
};
a.prototype.isScrolledToBottom = function() {
return this.lineIndex === this.buffer.length - 1;
};
return a;
}();
a.Terminal = p;
})(h.Terminal || (h.Terminal = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
var c = function() {
function a(c) {
this._lastWeightedTime = this._lastTime = this._index = 0;
this._gradient = "#FF0000 #FF1100 #FF2300 #FF3400 #FF4600 #FF5700 #FF6900 #FF7B00 #FF8C00 #FF9E00 #FFAF00 #FFC100 #FFD300 #FFE400 #FFF600 #F7FF00 #E5FF00 #D4FF00 #C2FF00 #B0FF00 #9FFF00 #8DFF00 #7CFF00 #6AFF00 #58FF00 #47FF00 #35FF00 #24FF00 #12FF00 #00FF00".split(" ");
this._container = c;
this._canvas = document.createElement("canvas");
this._container.appendChild(this._canvas);
this._context = this._canvas.getContext("2d");
this._listenForContainerSizeChanges();
}
a.prototype._listenForContainerSizeChanges = function() {
var a = this._containerWidth, c = this._containerHeight;
this._onContainerSizeChanged();
var l = this;
setInterval(function() {
if (a !== l._containerWidth || c !== l._containerHeight) {
l._onContainerSizeChanged(), a = l._containerWidth, c = l._containerHeight;
}
}, 10);
};
a.prototype._onContainerSizeChanged = function() {
var a = this._containerWidth, c = this._containerHeight, l = window.devicePixelRatio || 1;
1 !== l ? (this._ratio = l / 1, this._canvas.width = a * this._ratio, this._canvas.height = c * this._ratio, this._canvas.style.width = a + "px", this._canvas.style.height = c + "px") : (this._ratio = 1, this._canvas.width = a, this._canvas.height = c);
};
Object.defineProperty(a.prototype, "_containerWidth", {get:function() {
return this._container.clientWidth;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "_containerHeight", {get:function() {
return this._container.clientHeight;
}, enumerable:!0, configurable:!0});
a.prototype.tickAndRender = function(a, c) {
void 0 === a && (a = !1);
void 0 === c && (c = 0);
if (0 === this._lastTime) {
this._lastTime = performance.now();
} else {
var l = 1 * (performance.now() - this._lastTime) + 0 * this._lastWeightedTime, e = this._context, m = 2 * this._ratio, t = 30 * this._ratio, q = performance;
q.memory && (t += 30 * this._ratio);
var n = (this._canvas.width - t) / (m + 1) | 0, k = this._index++;
this._index > n && (this._index = 0);
n = this._canvas.height;
e.globalAlpha = 1;
e.fillStyle = "black";
e.fillRect(t + k * (m + 1), 0, 4 * m, this._canvas.height);
var f = Math.min(1E3 / 60 / l, 1);
e.fillStyle = "#00FF00";
e.globalAlpha = a ? .5 : 1;
f = n / 2 * f | 0;
e.fillRect(t + k * (m + 1), n - f, m, f);
c && (f = Math.min(1E3 / 240 / c, 1), e.fillStyle = "#FF6347", f = n / 2 * f | 0, e.fillRect(t + k * (m + 1), n / 2 - f, m, f));
0 === k % 16 && (e.globalAlpha = 1, e.fillStyle = "black", e.fillRect(0, 0, t, this._canvas.height), e.fillStyle = "white", e.font = 8 * this._ratio + "px Arial", e.textBaseline = "middle", m = (1E3 / l).toFixed(0), c && (m += " " + c.toFixed(0)), q.memory && (m += " " + (q.memory.usedJSHeapSize / 1024 / 1024).toFixed(2)), e.fillText(m, 2 * this._ratio, this._containerHeight / 2 * this._ratio));
this._lastTime = performance.now();
this._lastWeightedTime = l;
}
};
return a;
}();
a.FPS = c;
})(c.Mini || (c.Mini = {}));
})(c.Tools || (c.Tools = {}));
})(Shumway || (Shumway = {}));
console.timeEnd("Load Shared Dependencies");
console.time("Load AVM2 Dependencies");
(function(c) {
(function(h) {
h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("AVM2");
h.counter = new c.Metrics.Counter(!0);
h.countTimeline = function(a, c) {
void 0 === c && (c = 1);
h.timelineBuffer && h.timelineBuffer.count(a, c);
};
h.enterTimeline = function(a, c) {
};
h.leaveTimeline = function(a) {
};
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
function a(a) {
for (var c = [], h = 1;h < arguments.length;h++) {
c[h - 1] = arguments[h];
}
var u = a.message;
c.forEach(function(a, e) {
u = u.replace("%" + (e + 1), a);
});
return "Error #" + a.code + ": " + u;
}
h.Errors = {CallOfNonFunctionError:{code:1006, message:"%1 is not a function."}, ConvertNullToObjectError:{code:1009, message:"Cannot access a property or method of a null object reference."}, ConvertUndefinedToObjectError:{code:1010, message:"A term is undefined and has no properties."}, ClassNotFoundError:{code:1014, message:"Class %1 could not be found."}, CheckTypeFailedError:{code:1034, message:"Type Coercion failed: cannot convert %1 to %2."}, WrongArgumentCountError:{code:1063, message:"Argument count mismatch on %1. Expected %2, got %3."},
ConstWriteError:{code:1074, message:"Illegal write to read-only property %1 on %2."}, XMLOnlyWorksWithOneItemLists:{code:1086, message:"The %1 method only works on lists containing one item."}, XMLAssignmentToIndexedXMLNotAllowed:{code:1087, message:"Assignment to indexed XML is not allowed."}, XMLMarkupMustBeWellFormed:{code:1088, message:"The markup in the document following the root element must be well-formed."}, XMLAssigmentOneItemLists:{code:1089, message:"Assignment to lists with more than one item is not supported."},
XMLNamespaceWithPrefixAndNoURI:{code:1098, message:"Illegal prefix %1 for no namespace."}, OutOfRangeError:{code:1125, message:"The index %1 is out of range %2."}, VectorFixedError:{code:1126, message:"Cannot change the length of a fixed Vector."}, InvalidRangeError:{code:1506, message:"The specified range is invalid."}, NullArgumentError:{code:1507, message:"Argument %1 cannot be null."}, InvalidArgumentError:{code:1508, message:"The value specified for argument %1 is invalid."}, InvalidParamError:{code:2004,
message:"One of the parameters is invalid."}, ParamRangeError:{code:2006, message:"The supplied index is out of bounds."}, NullPointerError:{code:2007, message:"Parameter %1 must be non-null."}, InvalidEnumError:{code:2008, message:"Parameter %1 must be one of the accepted values."}, CantInstantiateError:{code:2012, message:"%1 class cannot be instantiated."}, InvalidBitmapData:{code:2015, message:"Invalid BitmapData."}, EOFError:{code:2030, message:"End of file was encountered.", fqn:"flash.errors.EOFError"},
CompressedDataError:{code:2058, message:"There was an error decompressing the data.", fqn:"flash.errors.IOError"}, TooFewArgumentsError:{code:2001, message:"Too few arguments were specified; got %1, %2 expected."}, SocketConnectError:{code:2011, message:"Socket connection failed to %1:%2."}, CantAddSelfError:{code:2024, message:"An object cannot be added as a child of itself."}, NotAChildError:{code:2025, message:"The supplied DisplayObject must be a child of the caller."}, DelayRangeError:{code:2066,
message:"The Timer delay specified is out of range."}, ExternalInterfaceNotAvailableError:{code:2067, message:"The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime."}, InvalidLoaderMethodError:{code:2069, message:"The Loader class does not implement this method."}, InvalidStageMethodError:{code:2071, message:"The Stage class does not implement this property or method."},
LoadingObjectNotSWFError:{code:2098, message:"The loading object is not a .swf file, you cannot request SWF properties from it."}, LoadingObjectNotInitializedError:{code:2099, message:"The loading object is not sufficiently loaded to provide this information."}, DecodeParamError:{code:2101, message:"The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs."}, SceneNotFoundError:{code:2108, message:"Scene %1 was not found."}, FrameLabelNotFoundError:{code:2109,
message:"Frame label %1 not found in scene %2."}, InvalidLoaderInfoMethodError:{code:2118, message:"The LoaderInfo class does not implement this method."}, CantAddParentError:{code:2150, message:"An object cannot be added as a child to one of it's children (or children's children, etc.)."}, ObjectWithStringsParamError:{code:2196, message:"Parameter %1 must be an Object with only String values."}};
h.getErrorMessage = function(a) {
if (!c.AVM2.Runtime.debuggerMode.value) {
return "Error #" + a;
}
for (var v in h.Errors) {
if (h.Errors[v].code == a) {
return "Error #" + a + ": " + h.Errors[v].message;
}
}
return "Error #" + a + ": (unknown)";
};
h.formatErrorMessage = a;
h.translateErrorMessage = function(s) {
if (s.type) {
switch(s.type) {
case "undefined_method":
return a(h.Errors.CallOfNonFunctionError, "value");
default:
throw c.Debug.notImplemented(s.type);;
}
} else {
return 0 <= s.message.indexOf("is not a function") ? a(h.Errors.CallOfNonFunctionError, "value") : s.message;
}
};
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
Errors = Shumway.AVM2.Errors;
(function(c) {
(function(h) {
(function(a) {
var s = null;
"undefined" !== typeof TextDecoder && (s = new TextDecoder);
var h = function() {
function a(c) {
this._bytes = c;
this._view = new DataView(c.buffer, c.byteOffset);
this._position = 0;
}
a._getResultBuffer = function(c) {
if (!a._resultBuffer || a._resultBuffer.length < c) {
a._resultBuffer = new Int32Array(2 * c);
}
return a._resultBuffer;
};
Object.defineProperty(a.prototype, "position", {get:function() {
return this._position;
}, enumerable:!0, configurable:!0});
a.prototype.remaining = function() {
return this._bytes.length - this._position;
};
a.prototype.seek = function(a) {
this._position = a;
};
a.prototype.readU8 = function() {
return this._bytes[this._position++];
};
a.prototype.readU8s = function(a) {
var c = new Uint8Array(a);
c.set(this._bytes.subarray(this._position, this._position + a), 0);
this._position += a;
return c;
};
a.prototype.readS8 = function() {
return this._bytes[this._position++] << 24 >> 24;
};
a.prototype.readU32 = function() {
return this.readS32() >>> 0;
};
a.prototype.readU30 = function() {
return this.readU32();
};
a.prototype.readU30Unsafe = function() {
return this.readU32();
};
a.prototype.readS16 = function() {
return this.readU30Unsafe() << 16 >> 16;
};
a.prototype.readS32 = function() {
var a = this.readU8();
a & 128 && (a = a & 127 | this.readU8() << 7, a & 16384 && (a = a & 16383 | this.readU8() << 14, a & 2097152 && (a = a & 2097151 | this.readU8() << 21, a & 268435456 && (a = a & 268435455 | this.readU8() << 28, a &= 4294967295))));
return a;
};
a.prototype.readWord = function() {
var a = this._view.getUint32(this._position, !0);
this._position += 4;
return a;
};
a.prototype.readS24 = function() {
return(this.readU8() | this.readU8() << 8 | this.readU8() << 16) << 8 >> 8;
};
a.prototype.readDouble = function() {
var a = this._view.getFloat64(this._position, !0);
this._position += 8;
return a;
};
a.prototype.readUTFString = function(h) {
if (s) {
var l = this._position;
this._position += h;
return s.decode(this._bytes.subarray(l, l + h));
}
var l = this._position, e = l + h, m = this._bytes, t = 0;
for (h = a._getResultBuffer(2 * h);l < e;) {
var q = m[l++];
if (127 >= q) {
h[t++] = q;
} else {
if (192 <= q) {
var n = 0;
224 > q ? n = (q & 31) << 6 | m[l++] & 63 : 240 > q ? n = (q & 15) << 12 | (m[l++] & 63) << 6 | m[l++] & 63 : (n = ((q & 7) << 18 | (m[l++] & 63) << 12 | (m[l++] & 63) << 6 | m[l++] & 63) - 65536, h[t++] = ((n & 1047552) >>> 10) + 55296, n = (n & 1023) + 56320);
h[t++] = n;
}
}
}
this._position = l;
return c.StringUtilities.fromCharCodeArray(h.subarray(0, t));
};
a._resultBuffer = new Int32Array(256);
return a;
}();
a.AbcStream = h;
})(h.ABC || (h.ABC = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
__extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(h) {
(function(a) {
var s = c.isString, v = c.isNumeric, p = c.isObject, u = c.Debug.assert, l = c.Debug.notImplemented, e = function() {
return function(b, d, g, a) {
void 0 === a && (a = !1);
this.name = b;
this.type = d;
this.value = g;
this.optional = a;
};
}();
a.Parameter = e;
var m = function() {
function b(a, f, k) {
var r = a.constantPool, e = a.methods, n = a.classes, c = a.metadata;
this.holder = k;
this.name = r.multinames[f.readU30()];
k = f.readU8();
this.kind = k & 15;
this.attributes = k >> 4 & 15;
u(g.isQName(this.name), "Name must be a QName: " + this.name + ", kind: " + this.kind);
switch(this.kind) {
case 0:
;
case 6:
this.slotId = f.readU30();
this.typeName = r.multinames[f.readU30()];
a = f.readU30();
this.value = void 0;
0 !== a && (this.hasDefaultValue = !0, this.value = r.getValue(f.readU8(), a));
break;
case 1:
;
case 3:
;
case 2:
this.dispId = f.readU30();
this.methodInfo = e[f.readU30()];
this.methodInfo.name = this.name;
d.attachHolder(this.methodInfo, this.holder);
this.methodInfo.abc = a;
break;
case 4:
this.slotId = f.readU30();
u(n, "Classes should be passed down here, I'm guessing whenever classes are being parsed.");
this.classInfo = n[f.readU30()];
break;
case 5:
u(!1, "Function encountered in the wild, should not happen");
break;
default:
u(!1, "Unknown trait kind: " + w[this.kind]);
}
if (this.attributes & 4) {
var m, r = 0;
for (a = f.readU30();r < a;r++) {
e = c[f.readU30()], "__go_to_definition_help" !== e.name && "__go_to_ctor_definition_help" !== e.name && (m || (m = {}), m[e.name] = e);
}
m && (this.isClass() && (this.classInfo.metadata = m), this.metadata = m);
}
}
b.prototype.isSlot = function() {
return 0 === this.kind;
};
b.prototype.isConst = function() {
return 6 === this.kind;
};
b.prototype.isMethod = function() {
return 1 === this.kind;
};
b.prototype.isClass = function() {
return 4 === this.kind;
};
b.prototype.isGetter = function() {
return 2 === this.kind;
};
b.prototype.isSetter = function() {
return 3 === this.kind;
};
b.prototype.isAccessor = function() {
return this.isGetter() || this.isSetter();
};
b.prototype.isMethodOrAccessor = function() {
return this.isMethod() || this.isGetter() || this.isSetter();
};
b.prototype.isProtected = function() {
u(g.isQName(this.name));
return this.name.namespaces[0].isProtected();
};
b.prototype.kindName = function() {
switch(this.kind) {
case 0:
return "Slot";
case 6:
return "Const";
case 1:
return "Method";
case 3:
return "Setter";
case 2:
return "Getter";
case 4:
return "Class";
case 5:
return "Function";
}
c.Debug.unexpected();
};
b.prototype.isOverride = function() {
return this.attributes & 2;
};
b.prototype.isFinal = function() {
return this.attributes & 1;
};
b.prototype.toString = function() {
var b = c.IntegerUtilities.getFlags(this.attributes, ["final", "override", "metadata"]);
b && (b += " ");
b += g.getQualifiedName(this.name);
switch(this.kind) {
case 0:
;
case 6:
return b + ", typeName: " + this.typeName + ", slotId: " + this.slotId + ", value: " + this.value;
case 1:
;
case 3:
;
case 2:
return b + ", " + this.kindName() + ": " + this.methodInfo.name;
case 4:
return b + ", slotId: " + this.slotId + ", class: " + this.classInfo;
}
};
b.parseTraits = function(d, a, g) {
for (var f = a.readU30(), k = [], r = 0;r < f;r++) {
k.push(new b(d, a, g));
}
return k;
};
return b;
}();
a.Trait = m;
var t = function() {
return function(b, d, a) {
this.abc = b;
this.index = d;
this.hash = b.hash & 65535 | a | d << 19;
};
}();
a.Info = t;
var q = function(b) {
function d(a, g, f) {
b.call(this, a, g, 131072);
a = a.constantPool;
g = f.readU30();
this.returnType = a.multinames[f.readU30()];
this.parameters = [];
for (var k = 0;k < g;k++) {
this.parameters.push(new e(void 0, a.multinames[f.readU30()], void 0));
}
this.debugName = a.strings[f.readU30()];
this.flags = f.readU8();
k = 0;
if (this.flags & 8) {
for (k = f.readU30(), u(g >= k), k = g - k;k < g;k++) {
var r = f.readU30();
this.parameters[k].value = a.getValue(f.readU8(), r);
this.parameters[k].optional = !0;
}
}
if (this.flags & 128) {
for (k = 0;k < g;k++) {
d.parseParameterNames ? this.parameters[k].name = a.strings[f.readU30()] : (f.readU30(), this.parameters[k].name = d._getParameterName(k));
}
} else {
for (k = 0;k < g;k++) {
this.parameters[k].name = d._getParameterName(k);
}
}
}
__extends(d, b);
d._getParameterName = function(b) {
return 26 > b ? String.fromCharCode(65 + b) : "P" + (b - 26);
};
d.prototype.toString = function() {
var b = c.IntegerUtilities.getFlags(this.flags, "NEED_ARGUMENTS NEED_ACTIVATION NEED_REST HAS_OPTIONAL SET_DXN HAS_PARAM_NAMES".split(" "));
return(b ? b + " " : "") + this.name;
};
d.prototype.hasOptional = function() {
return!!(this.flags & 8);
};
d.prototype.needsActivation = function() {
return!!(this.flags & 2);
};
d.prototype.needsRest = function() {
return!!(this.flags & 4);
};
d.prototype.needsArguments = function() {
return!!(this.flags & 1);
};
d.prototype.isNative = function() {
return!!(this.flags & 32);
};
d.prototype.isClassMember = function() {
return this.holder instanceof k;
};
d.prototype.isInstanceMember = function() {
return this.holder instanceof n;
};
d.prototype.isScriptMember = function() {
return this.holder instanceof f;
};
d.prototype.hasSetsDxns = function() {
return!!(this.flags & 64);
};
d.parseException = function(b, d) {
var a = b.constantPool.multinames, a = {start:d.readU30(), end:d.readU30(), target:d.readU30(), typeName:a[d.readU30()], varName:a[d.readU30()]};
u(!a.typeName || !a.typeName.isRuntime());
u(!a.varName || a.varName.isQName());
return a;
};
d.parseBody = function(b, a) {
var g = b.methods, f = a.readU30(), g = g[f];
g.index = f;
g.hasBody = !0;
u(!g.isNative());
g.maxStack = a.readU30();
g.localCount = a.readU30();
g.initScopeDepth = a.readU30();
g.maxScopeDepth = a.readU30();
g.code = a.readU8s(a.readU30());
for (var f = [], k = a.readU30(), r = 0;r < k;++r) {
f.push(d.parseException(b, a));
}
g.exceptions = f;
g.traits = m.parseTraits(b, a, g);
};
d.prototype.hasExceptions = function() {
return 0 < this.exceptions.length;
};
d.parseParameterNames = !1;
return d;
}(t);
a.MethodInfo = q;
var n = function(b) {
function a(f, k, r) {
b.call(this, f, k, 65536);
this.runtimeId = a.nextID++;
k = f.constantPool;
var e = f.methods;
this.name = k.multinames[r.readU30()];
u(g.isQName(this.name));
this.superName = k.multinames[r.readU30()];
this.flags = r.readU8();
this.protectedNs = void 0;
this.flags & 8 && (this.protectedNs = k.namespaces[r.readU30()]);
var n = r.readU30();
this.interfaces = [];
for (var w = 0;w < n;w++) {
this.interfaces[w] = k.multinames[r.readU30()];
}
this.init = e[r.readU30()];
this.init.isInstanceInitializer = !0;
this.init.name = this.name;
d.attachHolder(this.init, this);
this.traits = m.parseTraits(f, r, this);
}
__extends(a, b);
a.prototype.toString = function() {
var b = c.IntegerUtilities.getFlags(this.flags & 8, ["sealed", "final", "interface", "protected"]), b = (b ? b + " " : "") + this.name;
this.superName && (b += " extends " + this.superName);
return b;
};
a.prototype.isFinal = function() {
return!!(this.flags & 2);
};
a.prototype.isSealed = function() {
return!!(this.flags & 1);
};
a.prototype.isInterface = function() {
return!!(this.flags & 4);
};
a.nextID = 1;
return a;
}(t);
a.InstanceInfo = n;
(function(b) {
b[b.AbcMask = 65535] = "AbcMask";
b[b.KindMask = 458752] = "KindMask";
b[b.ClassInfo = 0] = "ClassInfo";
b[b.InstanceInfo = 65536] = "InstanceInfo";
b[b.MethodInfo = 131072] = "MethodInfo";
b[b.ScriptInfo = 196608] = "ScriptInfo";
b[b.NamespaceSet = 262144] = "NamespaceSet";
b[b.IndexOffset = 19] = "IndexOffset";
})(a.Hashes || (a.Hashes = {}));
var k = function(b) {
function a(g, f, k) {
b.call(this, g, f, 0);
this.runtimeId = a.nextID++;
this.init = g.methods[k.readU30()];
this.init.isClassInitializer = !0;
d.attachHolder(this.init, this);
this.traits = m.parseTraits(g, k, this);
this.instanceInfo = g.instances[f];
this.instanceInfo.classInfo = this;
this.defaultValue = a._getDefaultValue(this.instanceInfo.name);
}
__extends(a, b);
a._getDefaultValue = function(b) {
return g.getQualifiedName(b) === g.Int || g.getQualifiedName(b) === g.Uint ? 0 : g.getQualifiedName(b) === g.Number ? NaN : g.getQualifiedName(b) === g.Boolean ? !1 : null;
};
a.prototype.toString = function() {
return this.instanceInfo.name.toString();
};
a.nextID = 1;
return a;
}(t);
a.ClassInfo = k;
var f = function(b) {
function a(g, f, r) {
b.call(this, g, f, 196608);
this.runtimeId = k.nextID++;
this.name = g.name + "$script" + f;
this.init = g.methods[r.readU30()];
this.init.isScriptInitializer = !0;
d.attachHolder(this.init, this);
this.traits = m.parseTraits(g, r, this);
}
__extends(a, b);
Object.defineProperty(a.prototype, "entryPoint", {get:function() {
return this.init;
}, enumerable:!0, configurable:!0});
a.prototype.toString = function() {
return this.name;
};
a.nextID = 1;
return a;
}(t);
a.ScriptInfo = f;
var d = function() {
function b(d, g, e) {
void 0 === e && (e = 0);
h.enterTimeline("Parse ABC");
this.name = g;
this.env = {};
h.enterTimeline("Adler");
g = c.HashUtilities.hashBytesTo32BitsAdler(d, 0, d.length);
h.leaveTimeline();
e ? (this.hash = e, u(e === g)) : this.hash = g;
g = new a.AbcStream(d);
b._checkMagic(g);
h.enterTimeline("Parse constantPool");
this.constantPool = new z(g, this);
h.leaveTimeline();
h.enterTimeline("Parse Method Infos");
this.methods = [];
d = g.readU30();
for (e = 0;e < d;++e) {
this.methods.push(new q(this, e, g));
}
h.leaveTimeline();
h.enterTimeline("Parse MetaData Infos");
this.metadata = [];
d = g.readU30();
for (e = 0;e < d;++e) {
this.metadata.push(new r(this, g));
}
h.leaveTimeline();
h.enterTimeline("Parse Instance Infos");
this.instances = [];
d = g.readU30();
for (e = 0;e < d;++e) {
this.instances.push(new n(this, e, g));
}
h.leaveTimeline();
h.enterTimeline("Parse Class Infos");
this.classes = [];
for (e = 0;e < d;++e) {
this.classes.push(new k(this, e, g));
}
h.leaveTimeline();
h.enterTimeline("Parse Script Infos");
this.scripts = [];
d = g.readU30();
for (e = 0;e < d;++e) {
this.scripts.push(new f(this, e, g));
}
h.leaveTimeline();
h.enterTimeline("Parse Method Body Info");
d = g.readU30();
for (e = 0;e < d;++e) {
q.parseBody(this, g);
}
h.leaveTimeline();
h.leaveTimeline();
}
b._checkMagic = function(b) {
b = b.readWord();
if (3014671 > b) {
throw Error("Invalid ABC File (magic = " + Number(b).toString(16) + ")");
}
};
Object.defineProperty(b.prototype, "lastScript", {get:function() {
u(0 < this.scripts.length);
return this.scripts[this.scripts.length - 1];
}, enumerable:!0, configurable:!0});
b.attachHolder = function(b, d) {
u(!b.holder);
b.holder = d;
};
b.prototype.toString = function() {
return this.name;
};
b.prototype.getConstant = function(b) {
u((this.hash & 65535) === (b & 65535));
var d = b >> 19;
switch(b & 458752) {
case 0:
return this.classes[d];
case 65536:
return this.instances[d];
case 131072:
return this.methods[d];
case 196608:
return this.scripts[d];
case 262144:
return this.constantPool.namespaceSets[d];
default:
l("Kind");
}
};
return b;
}();
a.AbcFile = d;
var b = function() {
function b(d, a, g, f) {
void 0 === a && (a = "");
void 0 === a && (a = "");
this.kind = d;
this.uri = a;
this.prefix = g;
this.qualifiedName = void 0;
this._buildNamespace(f);
}
b.prototype._buildNamespace = function(d) {
22 === this.kind && (this.kind = 8);
this.isPublic() && this.uri ? (d = this.uri.length - 1, this.uri.charCodeAt(d) > b._MIN_API_MARK && (u(!1, "What's this code for?"), this.uri = this.uri.substring(0, d - 1))) : this.isUnique() && (u(void 0 !== d), this.uri = "private " + d);
26 === this.kind && (this.uri = "*");
this.qualifiedName = b._qualifyNamespace(this.kind, this.uri, this.prefix ? this.prefix : "");
};
b._hashNamespace = function(d, a, g) {
var f = b._knownURIs.indexOf(a);
if (0 <= f) {
return d << 2 | f;
}
var f = new Int32Array(1 + a.length + g.length), k = 0;
f[k++] = d;
for (d = 0;d < a.length;d++) {
f[k++] = a.charCodeAt(d);
}
for (d = 0;d < g.length;d++) {
f[k++] = g.charCodeAt(d);
}
return c.HashUtilities.hashBytesTo32BitsMD5(f, 0, k);
};
b._qualifyNamespace = function(d, a, g) {
var f = d + a, k = b._mangledNamespaceCache[f];
if (k) {
return k;
}
k = c.StringUtilities.variableLengthEncodeInt32(b._hashNamespace(d, a, g));
b._mangledNamespaceMap[k] = {kind:d, uri:a, prefix:g};
return b._mangledNamespaceCache[f] = k;
};
b.fromQualifiedName = function(d) {
var a = c.StringUtilities.fromEncoding(d[0]);
d = b._mangledNamespaceMap[d.substring(0, a + 1)];
return new b(d.kind, d.uri, d.prefix);
};
b.kindFromString = function(d) {
for (var a in b._kinds) {
if (b._kinds[a] === d) {
return a;
}
}
u(!1, "Cannot find kind " + d);
return NaN;
};
b.createNamespace = function(d, a) {
void 0 === a && (a = void 0);
return new b(8, d, a);
};
b.parse = function(d, a, g) {
var f = a.readU8();
d = d.strings[a.readU30()];
return new b(f, d, void 0, g);
};
b.prototype.isPublic = function() {
return 8 === this.kind || 22 === this.kind;
};
b.prototype.isProtected = function() {
return 24 === this.kind || 26 === this.kind;
};
b.prototype.isPrivate = function() {
return 5 === this.kind;
};
b.prototype.isPackageInternal = function() {
return 23 === this.kind;
};
b.prototype.isUnique = function() {
return 5 === this.kind && !this.uri;
};
b.prototype.isDynamic = function() {
return this.isPublic() && !this.uri;
};
b.prototype.getURI = function() {
return this.uri;
};
b.prototype.toString = function() {
return b._kinds[this.kind] + (this.uri ? " " + this.uri : "");
};
b.prototype.clone = function() {
var d = Object.create(b.prototype);
d.kind = this.kind;
d.uri = this.uri;
d.prefix = this.prefix;
d.qualifiedName = this.qualifiedName;
return d;
};
b.prototype.isEqualTo = function(b) {
return this.qualifiedName === b.qualifiedName;
};
b.prototype.inNamespaceSet = function(b) {
for (var d = 0;d < b.length;d++) {
if (b[d].qualifiedName === this.qualifiedName) {
return!0;
}
}
return!1;
};
b.prototype.getAccessModifier = function() {
return b._kinds[this.kind];
};
b.prototype.getQualifiedName = function() {
return this.qualifiedName;
};
b.fromSimpleName = function(d) {
if (d in b._simpleNameCache) {
return b._simpleNameCache[d];
}
var a;
0 === d.indexOf("[") ? (u("]" === d[d.length - 1]), a = d.substring(1, d.length - 1).split(",")) : a = [d];
return b._simpleNameCache[d] = a.map(function(d) {
d = d.trim();
var a;
0 < d.indexOf(" ") ? (a = d.substring(0, d.indexOf(" ")).trim(), d = d.substring(d.indexOf(" ") + 1).trim()) : (a = b._kinds, d === a[8] || d === a[23] || d === a[5] || d === a[24] || d === a[25] || d === a[26] ? (a = d, d = "") : a = b._publicPrefix);
return new b(b.kindFromString(a), d);
});
};
b._publicPrefix = "public";
b._kinds = function() {
var d = c.ObjectUtilities.createMap();
d[8] = b._publicPrefix;
d[23] = "packageInternal";
d[5] = "private";
d[24] = "protected";
d[25] = "explicit";
d[26] = "staticProtected";
return d;
}();
b._MIN_API_MARK = 58004;
b._MAX_API_MARK = 63743;
b._knownURIs = [""];
b._mangledNamespaceCache = c.ObjectUtilities.createMap();
b._mangledNamespaceMap = c.ObjectUtilities.createMap();
b.PUBLIC = new b(8);
b.PROTECTED = new b(24);
b.PROXY = new b(8, "http://www.adobe.com/2006/actionscript/flash/proxy");
b.VECTOR = new b(8, "__AS3__.vec");
b.VECTOR_PACKAGE = new b(23, "__AS3__.vec");
b.BUILTIN = new b(5, "builtin.as$0");
b._simpleNameCache = c.ObjectUtilities.createMap();
return b;
}();
a.Namespace = b;
b.prototype = Object.create(b.prototype);
var g = function() {
function d(b, a, g) {
void 0 === a || u(null === a || s(a), "Multiname name must be a string. " + a);
this.runtimeId = d._nextID++;
this.namespaces = b;
this.name = a;
this.flags = g | 0;
}
d.parse = function(b, a, g, f, k) {
var r = 0, e = a.readU8(), n, w = [], m = 0;
switch(e) {
case 7:
;
case 13:
(r = a.readU30()) ? w = [b.namespaces[r]] : m &= ~d.RUNTIME_NAME;
(r = a.readU30()) && (n = b.strings[r]);
break;
case 15:
;
case 16:
(r = a.readU30()) ? n = b.strings[r] : m &= ~d.RUNTIME_NAME;
m |= d.RUNTIME_NAMESPACE;
break;
case 17:
;
case 18:
m |= d.RUNTIME_NAMESPACE;
m |= d.RUNTIME_NAME;
break;
case 9:
;
case 14:
(r = a.readU30()) ? n = b.strings[r] : m &= ~d.RUNTIME_NAME;
r = a.readU30();
u(0 !== r);
w = b.namespaceSets[r];
break;
case 27:
;
case 28:
m |= d.RUNTIME_NAME;
r = a.readU30();
u(0 !== r);
w = b.namespaceSets[r];
break;
case 29:
return b = a.readU32(), r = a.readU32(), u(1 === r), a = a.readU32(), r = void 0, g[b] && g[a] ? (r = new d(g[b].namespaces, g[b].name, m), r.typeParameter = g[a]) : f.push({index:k, factoryTypeIndex:b, typeParameterIndex:a, flags:m}), r;
default:
c.Debug.unexpected();
}
switch(e) {
case 13:
;
case 16:
;
case 18:
;
case 14:
;
case 28:
m |= d.ATTRIBUTE;
}
return new d(w, n, m);
};
d.isMultiname = function(b) {
return "number" === typeof b || "string" === typeof b || b instanceof d || b instanceof Number;
};
d.needsResolution = function(b) {
return b instanceof d && 1 < b.namespaces.length;
};
d.isQName = function(b) {
return b instanceof d ? b.namespaces && 1 === b.namespaces.length : !0;
};
d.isRuntimeName = function(b) {
return b instanceof d && b.isRuntimeName();
};
d.isRuntimeNamespace = function(b) {
return b instanceof d && b.isRuntimeNamespace();
};
d.isRuntime = function(b) {
return b instanceof d && b.isRuntimeName() || b.isRuntimeNamespace();
};
d.getQualifiedName = function(b) {
u(d.isQName(b));
if (b instanceof d) {
if (void 0 !== b.qualifiedName) {
return b.qualifiedName;
}
var a = String(b.name);
if (v(a) && b.namespaces[0].isPublic()) {
return b.qualifiedName = a;
}
b = b.qualifiedName = d.qualifyName(b.namespaces[0], a);
}
return b;
};
d.qualifyName = function(b, d) {
return c.StringUtilities.concat3("$", b.qualifiedName, d);
};
d.stripPublicQualifier = function(d) {
var a = "$" + b.PUBLIC.qualifiedName;
return 0 !== d.indexOf(a) ? void 0 : d.substring(a.length);
};
d.fromQualifiedName = function(a) {
if (a instanceof d) {
return a;
}
if (v(a)) {
return new d([b.PUBLIC], a, 0);
}
if ("$" === a[0]) {
var g = b.fromQualifiedName(a.substring(1));
return new d([g], a.substring(1 + g.qualifiedName.length), 0);
}
};
d.getNameFromPublicQualifiedName = function(b) {
b = d.fromQualifiedName(b);
u(b.getNamespace().isPublic());
return b.name;
};
d.getFullQualifiedName = function(b) {
var a = d.getQualifiedName(b);
b instanceof d && b.typeParameter && (a += "$" + d.getFullQualifiedName(b.typeParameter));
return a;
};
d.getPublicQualifiedName = function(a) {
var g;
if ("string" === typeof a && (g = d._publicQualifiedNameCache[a])) {
return g;
}
if (v(a)) {
return c.toNumber(a);
}
if (null !== a && p(a)) {
return a;
}
g = d.qualifyName(b.PUBLIC, a);
"string" === typeof a && (d._publicQualifiedNameCache[a] = g);
return g;
};
d.isPublicQualifiedName = function(d) {
return "number" === typeof d || v(d) || 1 === d.indexOf(b.PUBLIC.qualifiedName);
};
d.getAccessModifier = function(b) {
u(d.isQName(b));
if ("number" === typeof b || "string" === typeof b || b instanceof Number) {
return "public";
}
u(b instanceof d);
return b.namespaces[0].getAccessModifier();
};
d.isNumeric = function(b) {
return "number" === typeof b ? !0 : "string" === typeof b ? v(b) : !isNaN(parseInt(d.getName(b), 10));
};
d.getName = function(b) {
u(b instanceof d);
u(!b.isRuntimeName());
return b.getName();
};
d.isAnyName = function(b) {
return "object" === typeof b && !b.isRuntimeName() && !b.name;
};
d.fromSimpleName = function(a) {
u(a);
if (a in d._simpleNameCache) {
return d._simpleNameCache[a];
}
var g, f;
g = a.lastIndexOf(".");
0 >= g && (g = a.lastIndexOf(" "));
0 < g && g < a.length - 1 ? (f = a.substring(g + 1).trim(), g = a.substring(0, g).trim()) : (f = a, g = "");
return d._simpleNameCache[a] = new d(b.fromSimpleName(g), f, 0);
};
d.prototype.getQName = function(b) {
u(0 <= b && b < this.namespaces.length);
this._qualifiedNameCache || (this._qualifiedNameCache = []);
var a = this._qualifiedNameCache[b];
a || (a = this._qualifiedNameCache[b] = new d([this.namespaces[b]], this.name, this.flags));
return a;
};
d.prototype.hasQName = function(b) {
u(b instanceof d);
if (this.name !== b.name) {
return!1;
}
for (var a = 0;a < this.namespaces.length;a++) {
if (this.namespaces[a].isEqualTo(b.namespaces[0])) {
return!0;
}
}
return!1;
};
d.prototype.isAttribute = function() {
return!!(this.flags & d.ATTRIBUTE);
};
d.prototype.isAnyName = function() {
return d.isAnyName(this);
};
d.prototype.isAnyNamespace = function() {
return!this.isRuntimeNamespace() && (0 === this.namespaces.length || this.isAnyName() && 1 !== this.namespaces.length);
};
d.prototype.isRuntimeName = function() {
return!!(this.flags & d.RUNTIME_NAME);
};
d.prototype.isRuntimeNamespace = function() {
return!!(this.flags & d.RUNTIME_NAMESPACE);
};
d.prototype.isRuntime = function() {
return!!(this.flags & (d.RUNTIME_NAME | d.RUNTIME_NAMESPACE));
};
d.prototype.isQName = function() {
return 1 === this.namespaces.length && !this.isAnyName();
};
d.prototype.hasTypeParameter = function() {
return!!this.typeParameter;
};
d.prototype.getName = function() {
return this.name;
};
d.prototype.getOriginalName = function() {
u(this.isQName());
var b = this.namespaces[0].uri;
b && (b += ".");
return b + this.name;
};
d.prototype.getNamespace = function() {
u(!this.isRuntimeNamespace());
u(1 === this.namespaces.length);
return this.namespaces[0];
};
d.prototype.nameToString = function() {
if (this.isAnyName()) {
return "*";
}
var b = this.getName();
return this.isRuntimeName() ? "[]" : b;
};
d.prototype.hasObjectName = function() {
return "object" === typeof this.name;
};
d.prototype.toString = function() {
var b = this.isAttribute() ? "@" : "";
if (this.isAnyNamespace()) {
b += "*::" + this.nameToString();
} else {
if (this.isRuntimeNamespace()) {
b += "[]::" + this.nameToString();
} else {
if (1 === this.namespaces.length && this.isQName()) {
b += this.namespaces[0].toString() + "::", b += this.nameToString();
} else {
for (var b = b + "{", d = 0, a = this.namespaces.length;d < a;d++) {
b += this.namespaces[d].toString(), d + 1 < a && (b += ",");
}
b += "}::" + this.nameToString();
}
}
}
this.hasTypeParameter() && (b += "<" + this.typeParameter.toString() + ">");
return b;
};
d.ATTRIBUTE = 1;
d.RUNTIME_NAMESPACE = 2;
d.RUNTIME_NAME = 4;
d._nextID = 0;
d._publicQualifiedNameCache = c.ObjectUtilities.createMap();
d._simpleNameCache = c.ObjectUtilities.createMap();
d.Int = d.getPublicQualifiedName("int");
d.Uint = d.getPublicQualifiedName("uint");
d.Class = d.getPublicQualifiedName("Class");
d.Array = d.getPublicQualifiedName("Array");
d.Object = d.getPublicQualifiedName("Object");
d.String = d.getPublicQualifiedName("String");
d.Number = d.getPublicQualifiedName("Number");
d.Boolean = d.getPublicQualifiedName("Boolean");
d.Function = d.getPublicQualifiedName("Function");
d.XML = d.getPublicQualifiedName("XML");
d.XMLList = d.getPublicQualifiedName("XMLList");
d.TO_STRING = d.getPublicQualifiedName("toString");
d.VALUE_OF = d.getPublicQualifiedName("valueOf");
d.TEMPORARY = new d([], "", 0);
return d;
}();
a.Multiname = g;
var r = function() {
function b(d, a) {
for (var g = d.constantPool.strings, f = this.name = g[a.readU30()], k = a.readU30(), r = [], e = [], n = 0;n < k;n++) {
r[n] = g[a.readU30()];
}
for (n = 0;n < k;n++) {
var w = r[n];
e[n] = {key:w, value:g[a.readU30()]};
w && "native" === f && (u(!this.hasOwnProperty(w)), this[w] = e[n].value);
}
this.value = e;
}
b.prototype.toString = function() {
return "[" + this.name + "]";
};
return b;
}();
a.MetaDataInfo = r;
(function(b) {
b[b.Undefined = 0] = "Undefined";
b[b.Utf8 = 1] = "Utf8";
b[b.Float = 2] = "Float";
b[b.Int = 3] = "Int";
b[b.UInt = 4] = "UInt";
b[b.PrivateNs = 5] = "PrivateNs";
b[b.Double = 6] = "Double";
b[b.QName = 7] = "QName";
b[b.Namespace = 8] = "Namespace";
b[b.Multiname = 9] = "Multiname";
b[b.False = 10] = "False";
b[b.True = 11] = "True";
b[b.Null = 12] = "Null";
b[b.QNameA = 13] = "QNameA";
b[b.MultinameA = 14] = "MultinameA";
b[b.RTQName = 15] = "RTQName";
b[b.RTQNameA = 16] = "RTQNameA";
b[b.RTQNameL = 17] = "RTQNameL";
b[b.RTQNameLA = 18] = "RTQNameLA";
b[b.NameL = 19] = "NameL";
b[b.NameLA = 20] = "NameLA";
b[b.NamespaceSet = 21] = "NamespaceSet";
b[b.PackageNamespace = 22] = "PackageNamespace";
b[b.PackageInternalNs = 23] = "PackageInternalNs";
b[b.ProtectedNamespace = 24] = "ProtectedNamespace";
b[b.ExplicitNamespace = 25] = "ExplicitNamespace";
b[b.StaticProtectedNs = 26] = "StaticProtectedNs";
b[b.MultinameL = 27] = "MultinameL";
b[b.MultinameLA = 28] = "MultinameLA";
b[b.TypeName = 29] = "TypeName";
b[b.ClassSealed = 1] = "ClassSealed";
b[b.ClassFinal = 2] = "ClassFinal";
b[b.ClassInterface = 4] = "ClassInterface";
b[b.ClassProtectedNs = 8] = "ClassProtectedNs";
})(a.CONSTANT || (a.CONSTANT = {}));
(function(b) {
b[b.Arguments = 1] = "Arguments";
b[b.Activation = 2] = "Activation";
b[b.Needrest = 4] = "Needrest";
b[b.HasOptional = 8] = "HasOptional";
b[b.IgnoreRest = 16] = "IgnoreRest";
b[b.Native = 32] = "Native";
b[b.Setsdxns = 64] = "Setsdxns";
b[b.HasParamNames = 128] = "HasParamNames";
})(a.METHOD || (a.METHOD = {}));
(function(b) {
b[b.Slot = 0] = "Slot";
b[b.Method = 1] = "Method";
b[b.Getter = 2] = "Getter";
b[b.Setter = 3] = "Setter";
b[b.Class = 4] = "Class";
b[b.Function = 5] = "Function";
b[b.Const = 6] = "Const";
})(a.TRAIT || (a.TRAIT = {}));
var w = a.TRAIT;
(function(b) {
b[b.Final = 1] = "Final";
b[b.Override = 2] = "Override";
b[b.Metadata = 4] = "Metadata";
})(a.ATTR || (a.ATTR = {}));
(function(b) {
b[b.CASEINSENSITIVE = 1] = "CASEINSENSITIVE";
b[b.DESCENDING = 2] = "DESCENDING";
b[b.UNIQUESORT = 4] = "UNIQUESORT";
b[b.RETURNINDEXEDARRAY = 8] = "RETURNINDEXEDARRAY";
b[b.NUMERIC = 16] = "NUMERIC";
})(a.SORT || (a.SORT = {}));
var z = function() {
function d(a, f) {
var k, r = [0];
k = a.readU30();
for (var e = 1;e < k;++e) {
r.push(a.readS32());
}
var n = [0];
k = a.readU30();
for (e = 1;e < k;++e) {
n.push(a.readU32());
}
var w = [NaN];
k = a.readU30();
for (e = 1;e < k;++e) {
w.push(a.readDouble());
}
h.enterTimeline("Parse Strings");
var m = [""];
k = a.readU30();
for (e = 1;e < k;++e) {
m.push(a.readUTFString(a.readU30()));
}
h.leaveTimeline();
this.ints = r;
this.uints = n;
this.doubles = w;
this.strings = m;
h.enterTimeline("Parse Namespaces");
r = [void 0];
k = a.readU30();
for (e = 1;e < k;++e) {
r.push(b.parse(this, a, f.hash + e));
}
h.leaveTimeline();
h.enterTimeline("Parse Namespace Sets");
n = [void 0];
k = a.readU30();
for (e = 1;e < k;++e) {
w = a.readU30();
m = [];
m.runtimeId = d._nextNamespaceSetID++;
m.hash = f.hash & 65535 | 262144 | e << 19;
for (var c = 0;c < w;++c) {
m.push(r[a.readU30()]);
}
n.push(m);
}
h.leaveTimeline();
this.namespaces = r;
this.namespaceSets = n;
h.enterTimeline("Parse Multinames");
r = [void 0];
n = [];
k = a.readU30();
for (e = 1;e < k;++e) {
r.push(g.parse(this, a, r, n, e));
}
for (e = 0;e < n.length;e++) {
k = n[e], m = r[k.factoryTypeIndex], w = r[k.typeParameterIndex], u(m && w), m = new g(m.namespaces, m.name, k.flags), m.typeParameter = w, r[k.index] = m;
}
h.leaveTimeline();
this.multinames = r;
}
d.prototype.getValue = function(b, d) {
switch(b) {
case 3:
return this.ints[d];
case 4:
return this.uints[d];
case 6:
return this.doubles[d];
case 1:
return this.strings[d];
case 11:
return!0;
case 10:
return!1;
case 12:
return null;
case 0:
break;
case 8:
;
case 23:
return this.namespaces[d];
case 7:
;
case 14:
;
case 15:
;
case 16:
;
case 17:
;
case 18:
;
case 19:
;
case 20:
return this.multinames[d];
case 2:
c.Debug.warning("TODO: CONSTANT.Float may be deprecated?");
break;
default:
u(!1, "Not Implemented Kind " + b);
}
};
d._nextNamespaceSetID = 1;
return d;
}();
a.ConstantPool = z;
})(h.ABC || (h.ABC = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(a, e, k, f) {
void 0 === f && (f = null);
0 !== k.length && (a.enter(e + " {"), k.forEach(function(d, b) {
d.trace(a, f);
}), a.leave("}"));
}
function h(a, e, k) {
var f;
void 0 === f && (f = !1);
var d = k.position, b = "";
null === a.operands ? b = "null" : a.operands.forEach(function(d, f) {
var w = b, m;
a: {
m = 0;
switch(d.size) {
case "s08":
m = k.readS8();
break;
case "u08":
m = k.readU8();
break;
case "s16":
m = k.readS16();
break;
case "s24":
m = k.readS24();
break;
case "u30":
m = k.readU30();
break;
case "u32":
m = k.readU32();
break;
default:
l(!1);
}
var c = "";
switch(d.type) {
case "":
break;
case "I":
c = e.constantPool.ints[m];
break;
case "U":
c = e.constantPool.uints[m];
break;
case "D":
c = e.constantPool.doubles[m];
break;
case "S":
c = e.constantPool.strings[m];
break;
case "N":
c = e.constantPool.namespaces[m];
break;
case "CI":
c = e.classes[m];
break;
case "M":
m = e.constantPool.multinames[m];
break a;
default:
c = "?";
}
m = d.name + ":" + m + ("" === c ? "" : " (" + c + ")");
}
b = w + m;
f < a.operands.length - 1 && (b += ", ");
});
f && k.seek(d);
return b;
}
function p(a, e) {
var k = new t(a);
e.scripts.forEach(function(a) {
k.traceTraits(a.traits);
});
}
function u(e, n) {
var k = new c.Metrics.Counter(!0), f = new c.Metrics.Counter(!0), d = new c.Metrics.Counter(!0), b = new c.Metrics.Counter(!0), g = {}, r = {}, w = {};
n.classes.forEach(function(b) {
g[b.instanceInfo.name.name] = !0;
});
n.scripts.forEach(function(b) {
b.traits.forEach(function(b) {
if (b.isClass()) {
var d = b.classInfo.instanceInfo.superName ? b.classInfo.instanceInfo.superName.name : "?";
d in g || f.count(d);
b.classInfo.traits.forEach(function(b) {
b.isMethod() ? r[b.name.name] = !0 : w[b.name.name] = !0;
});
b.classInfo.instanceInfo.traits.forEach(function(b) {
!b.isMethod() || b.attributes & 2 ? w[b.name.name] = !0 : r[b.name.name] = !0;
});
}
});
});
var m = new c.Metrics.Counter(!0);
n.methods.forEach(function(f) {
function e(b) {
var d = 0;
switch(b.size) {
case "s08":
d = q.readS8();
break;
case "u08":
d = q.readU8();
break;
case "s16":
d = q.readS16();
break;
case "s24":
d = q.readS24();
break;
case "u30":
d = q.readU30();
break;
case "u32":
d = q.readU32();
break;
default:
l(!1);
}
var a = "";
switch(b.type) {
case "":
break;
case "I":
a = n.constantPool.ints[d];
break;
case "U":
a = n.constantPool.uints[d];
break;
case "D":
a = n.constantPool.doubles[d];
break;
case "S":
a = n.constantPool.strings[d];
break;
case "N":
a = n.constantPool.namespaces[d];
break;
case "CI":
a = n.classes[d];
break;
case "M":
a = n.constantPool.multinames[d];
break;
default:
a = "?";
}
return a;
}
if (f.code) {
for (var q = new a.AbcStream(f.code);0 < q.remaining();) {
f = q.readU8();
var t = c.AVM2.opcodeTable[f], s = null;
if (t) {
switch(m.count(t.name), t.operands && (s = t.operands.map(e)), f) {
case 65:
;
case 67:
continue;
case 70:
;
case 76:
;
case 79:
;
case 68:
;
case 69:
;
case 78:
!s[0] || s[0].name in r || d.count(s[0].name);
break;
case 74:
!s[0] || s[0].name in g || k.count(s[0].name);
break;
case 102:
;
case 97:
!s[0] || s[0].name in w || b.count(s[0].name);
}
}
}
}
});
e.writeLn(JSON.stringify({definedClasses:g, definedMethods:r, definedProperties:w, libraryClasses:k.counts, librarySuperClasses:f.counts, libraryMethods:d.counts, libraryProperties:b.counts, operations:m.counts}, null, 2));
}
var l = c.Debug.assert, e = c.Debug.notImplemented, m = new c.Options.Option("f", "filter", "string", "SpciMsmNtu", "[S]ource, constant[p]ool, [c]lasses, [i]nstances, [M]etadata, [s]cripts, [m]ethods, multi[N]ames, S[t]atistics, [u]tf");
a.AbcFile.prototype.trace = function(a) {
0 <= m.value.indexOf("p") && this.constantPool.trace(a);
0 <= m.value.indexOf("N") && a.writeArray(this.constantPool.multinames, null, !0);
0 <= m.value.indexOf("c") && s(a, "classes", this.classes);
0 <= m.value.indexOf("i") && s(a, "instances", this.instances);
0 <= m.value.indexOf("M") && s(a, "metadata", this.metadata);
0 <= m.value.indexOf("s") && s(a, "scripts", this.scripts);
0 <= m.value.indexOf("m") && s(a, "methods", this.methods, this);
0 <= m.value.indexOf("S") && p(a, this);
0 <= m.value.indexOf("t") && u(a, this);
};
a.ConstantPool.prototype.trace = function(a) {
a.enter("constantPool {");
for (var e in this) {
"namespaces" === e ? (a.enter("namespaces {"), this.namespaces.forEach(function(k, f) {
a.writeLn(("" + f).padRight(" ", 3) + (k ? k.toString() : "*"));
}), a.leave("}")) : this[e] instanceof Array && (a.enter(e + " " + this[e].length + " {"), a.writeArray(this[e]), a.leave("}"));
}
a.leave("}");
};
a.ClassInfo.prototype.trace = function(a) {
a.enter("class " + this + " {");
s(a, "traits", this.traits);
a.leave("}");
};
a.MetaDataInfo.prototype.trace = function(a) {
a.enter(this + " {");
this.value.forEach(function(e) {
a.writeLn((e.key ? e.key + ": " : "") + '"' + e.value + '"');
});
a.leave("}");
};
a.InstanceInfo.prototype.trace = function(a) {
a.enter("instance " + this + " {");
s(a, "traits", this.traits);
a.leave("}");
};
a.ScriptInfo.prototype.trace = function(a) {
a.enter("script " + this + " {");
s(a, "traits", this.traits);
a.leave("}");
};
a.Trait.prototype.trace = function(a) {
if (this.metadata) {
for (var e in this.metadata) {
this.metadata.hasOwnProperty(e) && this.metadata[e].trace(a);
}
}
a.writeLn(this);
};
a.MethodInfo.prototype.trace = function(e) {
var n = this.abc;
e.enter("method" + (this.name ? " " + this.name : "") + " {");
e.writeLn("flags: " + c.IntegerUtilities.getFlags(this.flags, "NEED_ARGUMENTS NEED_ACTIVATION NEED_REST HAS_OPTIONAL NATIVE SET_DXN HAS_PARAM_NAMES".split(" ")));
e.writeLn("parameters: " + this.parameters.map(function(b) {
return(b.type ? a.Multiname.getQualifiedName(b.type) + "::" : "") + b.name;
}));
if (this.code) {
var k = new a.AbcStream(this.code);
s(e, "traits", this.traits);
for (e.enter("code {");0 < k.remaining();) {
var f = k.readU8(), d = c.AVM2.opcodeTable[f], b;
b = ("" + k.position).padRight(" ", 6);
switch(f) {
case 27:
b += d.name + ": defaultOffset: " + k.readS24();
f = k.readU30();
b += ", caseCount: " + f;
for (d = 0;d < f + 1;d++) {
b += " offset: " + k.readS24();
}
e.writeLn(b);
break;
default:
d ? (b += d.name.padRight(" ", 20), d.operands ? (0 < d.operands.length && (b += h(d, n, k)), e.writeLn(b)) : l(!1, "Opcode: " + d.name + " has undefined operands.")) : l(!1, "Opcode: " + f + " is not implemented.");
}
}
e.leave("}");
}
e.leave("}");
};
var t = function() {
function m(a) {
return void 0 === a ? "undefined" : null === a ? "null" : "string" === typeof a ? '"' + a + '"' : String(a);
}
function n(a, d) {
void 0 === d && (d = !1);
return a.parameters.map(function(b) {
var a = b.name;
d || (b.type && (a += ":" + b.type.getName()), void 0 !== b.value && (a += " = " + m(b.value)));
return a;
}).join(", ");
}
function k(a) {
this.writer = a;
}
k.prototype = {traceTraits:function(f, d, b) {
var g = this.writer, k = this;
f.forEach(function(f) {
var c;
c = a.Multiname.getAccessModifier(f.name);
var l = f.name.namespaces[0].uri;
l && ("http://adobe.com/AS3/2006/builtin" === l && (l = "AS3"), c = "public" === c ? b === l ? "" : l : c);
d && (c += " static");
if (f.isSlot() || f.isConst()) {
k.traceMetadata(f.metadata), c = f.isConst() ? c + " const" : c + " var", c += " " + f.name.getName(), f.typeName && (c += ":" + f.typeName.getName()), f.value && (c += " = " + m(f.value)), g.writeLn(c + ";");
} else {
if (f.isMethod() || f.isGetter() || f.isSetter()) {
k.traceMetadata(f.metadata);
l = f.methodInfo;
f.attributes & 2 && (c += " override");
l.isNative() && (c += " native");
c = c + " function" + (f.isGetter() ? " get" : f.isSetter() ? " set" : "");
c += " " + f.name.getName();
c += "(" + n(l) + ")";
c += l.returnType ? ":" + l.returnType.getName() : "";
var t;
f.holder instanceof a.ClassInfo ? (t = f.holder.instanceInfo.name, t.getName()) : f.holder instanceof a.InstanceInfo && (t = f.holder.name, t.getName());
l.isNative();
l.isNative() ? g.writeLn(c + ";") : b ? g.writeLn(c + ";") : g.writeLn(c + ' { notImplemented("' + f.name.getName() + '"); }');
} else {
f.isClass() ? (t = f.classInfo.instanceInfo.name, g.enter("package " + t.namespaces[0].uri + " {\n"), k.traceMetadata(f.metadata), k.traceClass(f.classInfo), g.leave("\n}"), k.traceClassStub(f)) : e(f);
}
}
});
}, traceClassStub2:function(a) {
function d(d, a) {
void 0 === a && (a = !1);
var g = [];
d.forEach(function(b, d) {
(b.isMethod() || b.isGetter() || b.isSetter()) && b.methodInfo.isNative() && g.push(b);
});
g.forEach(function(d, a) {
var f = d.methodInfo, k = d.name.getName();
b.writeLn("// " + k + " :: " + (f.parameters.length ? n(f) : "void") + " -> " + (f.returnType ? f.returnType.getName() : "any"));
b.enter((d.isGetter() ? '"get ' + k + '"' : d.isSetter() ? '"set ' + k + '"' : k) + ": function " + k + "(" + n(f, !0) + ") {");
b.writeLn(' notImplemented("' + e + "." + k + '");');
b.leave("}" + (a === g.length - 1 ? "" : ",\n"));
});
}
var b = this.writer, g = a.classInfo, k = g.instanceInfo, e = k.name.getName();
a = a.metadata ? a.metadata.native : null;
if (!a) {
return!1;
}
b.writeLn("Cut and paste the following into `native.js' and edit accordingly");
b.writeLn("8< --------------------------------------------------------------");
b.enter("natives." + a.cls + " = function " + a.cls + "(runtime, scope, instanceConstructor, baseClass) {");
b.writeLn('var c = new Class("' + e + '", instanceConstructor, ApplicationDomain.passthroughCallable(instanceConstructor));');
b.writeLn("c.extend(baseClass);\n");
b.enter("c.nativeStatics = {");
d(g.traits, !0);
b.leave("};\n");
b.enter("c.nativeMethods = {");
d(k.traits);
b.leave("};\n");
b.writeLn("return c;");
b.leave("};");
b.writeLn("-------------------------------------------------------------- >8");
return!0;
}, traceClassStub:function(a) {
function d(b) {
return{properties:b.filter(function(b) {
return!1;
}), methods:b.filter(function(b) {
return(b.isMethod() || b.isGetter() || b.isSetter()) && !0 === b.methodInfo.isNative();
})};
}
function b(b, a) {
function f(b, d) {
var k = b.methodInfo, r = b.name.getName(), m = "// (" + (k.parameters.length ? n(k) : "void") + ") -> " + (k.returnType ? k.returnType.getName() : "any"), c = r;
b.isGetter() ? c = "get" : b.isSetter() && (c = "set");
g.enter(c + ": function " + r + "(" + n(k, !0) + ") { " + m);
g.writeLn('notImplemented("' + e + "." + r + '");');
a || (b.isGetter() ? g.writeLn("return this._" + r + ";") : b.isSetter() && g.writeLn("this._" + r + " = " + k.parameters[0].name + ";"));
g.leave("}" + (d ? "," : ""));
}
void 0 === a && (a = !1);
b = d(b);
var k = [], r = Object.create(null);
b.methods.forEach(function(b, d) {
var a = b.name.getName();
b.isGetter() || b.isSetter() ? (r[a] || (r[a] = []), r[a].push(b)) : k.push(b);
});
for (var m = 0;m < k.length;m++) {
f(k[m], m < k.length - 1);
}
for (var q = c.ObjectUtilities.toKeyValueArray(r), l = 0;l < q.length;l++) {
g.enter(q[l][0] + ": {");
for (var t = q[l][1], m = 0;m < t.length;m++) {
f(t[m], m < t.length - 1);
}
g.leave("}" + (l < q.length - 1 ? "," : ""));
}
b.properties.forEach(function(d, a) {
var f = d.name.getName(), k = a === b.properties.length - 1;
d.name.getNamespace().isPublic() && g.writeLn(f + ": " + ("'public " + d.name.name + "'") + (k ? "" : ","));
});
}
var g = this.writer;
a = a.classInfo;
var k = a.instanceInfo, e = k.name.getName();
g.writeLn("Cut and paste the following glue and edit accordingly.");
g.writeLn("Class " + k);
g.writeLn("8< --------------------------------------------------------------");
var m = k.name.namespaces[0].uri;
g.enter("var " + e + "Definition = (function () {");
g.enter("return {");
g.writeLn("// (" + n(k.init, !1) + ")");
g.writeLn('__class__: "' + m + "." + e + '",');
g.enter("initialize: function () {");
g.leave("},");
g.enter("__glue__: {");
g.enter("native: {");
g.enter("static: {");
b(a.traits, !0);
g.leave("},");
g.enter("instance: {");
b(k.traits);
g.leave("}");
g.leave("},");
g.enter("script: {");
g.writeLn("instance: Glue.ALL");
g.leave("}");
g.leave("}");
g.leave("};");
g.leave("}).call(this);");
g.writeLn("-------------------------------------------------------------- >8");
return!0;
}, traceClass:function(f) {
var d = this.writer, b = f.instanceInfo, g = b.name, k = a.Multiname.getAccessModifier(g);
b.isFinal() && (k += " final");
b.isSealed() || (k += " dynamic");
k += b.isInterface() ? " interface " : " class ";
k += g.getName();
b.superName && "Object" !== b.superName.getName() && (k += " extends " + b.superName.getName());
b.interfaces.length && (k += " implements " + b.interfaces.map(function(b) {
return b.getName();
}).join(", "));
d.enter(k + " {");
b.isInterface() || d.writeLn("public function " + g.getName() + "(" + n(b.init) + ") {}");
var e;
b.isInterface() && (e = g.namespaces[0].uri + ":" + g.name);
this.traceTraits(f.traits, !0, e);
this.traceTraits(b.traits, !1, e);
d.leave("}");
}, traceMetadata:function(a) {
var d = this.writer, b;
for (b in a) {
a.hasOwnProperty(b) && 0 !== b.indexOf("__") && d.writeLn("[" + b + "(" + a[b].value.map(function(b) {
return(b.key ? b.key + "=" : "") + '"' + b.value + '"';
}).join(", ") + ")]");
}
}};
return k;
}();
})(h.ABC || (h.ABC = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
var a = c.Debug.assert, s = c.Debug.unexpected, v = c.AVM2.ABC.AbcStream, p = c.ArrayUtilities.top, u = c.ArrayUtilities.peek;
(function(a) {
a[a.bkpt = 1] = "bkpt";
a[a.nop = 2] = "nop";
a[a.getsuper = 4] = "getsuper";
a[a.setsuper = 5] = "setsuper";
a[a.dxns = 6] = "dxns";
a[a.dxnslate = 7] = "dxnslate";
a[a.kill = 8] = "kill";
a[a.label = 9] = "label";
a[a.lf32x4 = 10] = "lf32x4";
a[a.sf32x4 = 11] = "sf32x4";
a[a.ifnlt = 12] = "ifnlt";
a[a.ifnle = 13] = "ifnle";
a[a.ifngt = 14] = "ifngt";
a[a.ifnge = 15] = "ifnge";
a[a.jump = 16] = "jump";
a[a.iftrue = 17] = "iftrue";
a[a.iffalse = 18] = "iffalse";
a[a.ifeq = 19] = "ifeq";
a[a.ifne = 20] = "ifne";
a[a.iflt = 21] = "iflt";
a[a.ifle = 22] = "ifle";
a[a.ifgt = 23] = "ifgt";
a[a.ifge = 24] = "ifge";
a[a.ifstricteq = 25] = "ifstricteq";
a[a.ifstrictne = 26] = "ifstrictne";
a[a.lookupswitch = 27] = "lookupswitch";
a[a.pushwith = 28] = "pushwith";
a[a.popscope = 29] = "popscope";
a[a.nextname = 30] = "nextname";
a[a.hasnext = 31] = "hasnext";
a[a.pushnull = 32] = "pushnull";
a[a.pushundefined = 33] = "pushundefined";
a[a.pushfloat = 34] = "pushfloat";
a[a.nextvalue = 35] = "nextvalue";
a[a.pushbyte = 36] = "pushbyte";
a[a.pushshort = 37] = "pushshort";
a[a.pushtrue = 38] = "pushtrue";
a[a.pushfalse = 39] = "pushfalse";
a[a.pushnan = 40] = "pushnan";
a[a.pop = 41] = "pop";
a[a.dup = 42] = "dup";
a[a.swap = 43] = "swap";
a[a.pushstring = 44] = "pushstring";
a[a.pushint = 45] = "pushint";
a[a.pushuint = 46] = "pushuint";
a[a.pushdouble = 47] = "pushdouble";
a[a.pushscope = 48] = "pushscope";
a[a.pushnamespace = 49] = "pushnamespace";
a[a.hasnext2 = 50] = "hasnext2";
a[a.li8 = 53] = "li8";
a[a.li16 = 54] = "li16";
a[a.li32 = 55] = "li32";
a[a.lf32 = 56] = "lf32";
a[a.lf64 = 57] = "lf64";
a[a.si8 = 58] = "si8";
a[a.si16 = 59] = "si16";
a[a.si32 = 60] = "si32";
a[a.sf32 = 61] = "sf32";
a[a.sf64 = 62] = "sf64";
a[a.newfunction = 64] = "newfunction";
a[a.call = 65] = "call";
a[a.construct = 66] = "construct";
a[a.callmethod = 67] = "callmethod";
a[a.callstatic = 68] = "callstatic";
a[a.callsuper = 69] = "callsuper";
a[a.callproperty = 70] = "callproperty";
a[a.returnvoid = 71] = "returnvoid";
a[a.returnvalue = 72] = "returnvalue";
a[a.constructsuper = 73] = "constructsuper";
a[a.constructprop = 74] = "constructprop";
a[a.callsuperid = 75] = "callsuperid";
a[a.callproplex = 76] = "callproplex";
a[a.callinterface = 77] = "callinterface";
a[a.callsupervoid = 78] = "callsupervoid";
a[a.callpropvoid = 79] = "callpropvoid";
a[a.sxi1 = 80] = "sxi1";
a[a.sxi8 = 81] = "sxi8";
a[a.sxi16 = 82] = "sxi16";
a[a.applytype = 83] = "applytype";
a[a.pushfloat4 = 84] = "pushfloat4";
a[a.newobject = 85] = "newobject";
a[a.newarray = 86] = "newarray";
a[a.newactivation = 87] = "newactivation";
a[a.newclass = 88] = "newclass";
a[a.getdescendants = 89] = "getdescendants";
a[a.newcatch = 90] = "newcatch";
a[a.findpropstrict = 93] = "findpropstrict";
a[a.findproperty = 94] = "findproperty";
a[a.finddef = 95] = "finddef";
a[a.getlex = 96] = "getlex";
a[a.setproperty = 97] = "setproperty";
a[a.getlocal = 98] = "getlocal";
a[a.setlocal = 99] = "setlocal";
a[a.getglobalscope = 100] = "getglobalscope";
a[a.getscopeobject = 101] = "getscopeobject";
a[a.getproperty = 102] = "getproperty";
a[a.getouterscope = 103] = "getouterscope";
a[a.initproperty = 104] = "initproperty";
a[a.setpropertylate = 105] = "setpropertylate";
a[a.deleteproperty = 106] = "deleteproperty";
a[a.deletepropertylate = 107] = "deletepropertylate";
a[a.getslot = 108] = "getslot";
a[a.setslot = 109] = "setslot";
a[a.getglobalslot = 110] = "getglobalslot";
a[a.setglobalslot = 111] = "setglobalslot";
a[a.convert_s = 112] = "convert_s";
a[a.esc_xelem = 113] = "esc_xelem";
a[a.esc_xattr = 114] = "esc_xattr";
a[a.convert_i = 115] = "convert_i";
a[a.convert_u = 116] = "convert_u";
a[a.convert_d = 117] = "convert_d";
a[a.convert_b = 118] = "convert_b";
a[a.convert_o = 119] = "convert_o";
a[a.checkfilter = 120] = "checkfilter";
a[a.convert_f = 121] = "convert_f";
a[a.unplus = 122] = "unplus";
a[a.convert_f4 = 123] = "convert_f4";
a[a.coerce = 128] = "coerce";
a[a.coerce_b = 129] = "coerce_b";
a[a.coerce_a = 130] = "coerce_a";
a[a.coerce_i = 131] = "coerce_i";
a[a.coerce_d = 132] = "coerce_d";
a[a.coerce_s = 133] = "coerce_s";
a[a.astype = 134] = "astype";
a[a.astypelate = 135] = "astypelate";
a[a.coerce_u = 136] = "coerce_u";
a[a.coerce_o = 137] = "coerce_o";
a[a.negate = 144] = "negate";
a[a.increment = 145] = "increment";
a[a.inclocal = 146] = "inclocal";
a[a.decrement = 147] = "decrement";
a[a.declocal = 148] = "declocal";
a[a.not = 150] = "not";
a[a.bitnot = 151] = "bitnot";
a[a.add = 160] = "add";
a[a.subtract = 161] = "subtract";
a[a.multiply = 162] = "multiply";
a[a.divide = 163] = "divide";
a[a.modulo = 164] = "modulo";
a[a.lshift = 165] = "lshift";
a[a.rshift = 166] = "rshift";
a[a.urshift = 167] = "urshift";
a[a.bitand = 168] = "bitand";
a[a.bitor = 169] = "bitor";
a[a.bitxor = 170] = "bitxor";
a[a.equals = 171] = "equals";
a[a.strictequals = 172] = "strictequals";
a[a.lessthan = 173] = "lessthan";
a[a.lessequals = 174] = "lessequals";
a[a.greaterthan = 175] = "greaterthan";
a[a.greaterequals = 176] = "greaterequals";
a[a.istype = 178] = "istype";
a[a.istypelate = 179] = "istypelate";
a[a.increment_i = 192] = "increment_i";
a[a.decrement_i = 193] = "decrement_i";
a[a.inclocal_i = 194] = "inclocal_i";
a[a.declocal_i = 195] = "declocal_i";
a[a.negate_i = 196] = "negate_i";
a[a.add_i = 197] = "add_i";
a[a.subtract_i = 198] = "subtract_i";
a[a.multiply_i = 199] = "multiply_i";
a[a.getlocal0 = 208] = "getlocal0";
a[a.getlocal1 = 209] = "getlocal1";
a[a.getlocal2 = 210] = "getlocal2";
a[a.getlocal3 = 211] = "getlocal3";
a[a.setlocal0 = 212] = "setlocal0";
a[a.setlocal1 = 213] = "setlocal1";
a[a.setlocal2 = 214] = "setlocal2";
a[a.setlocal3 = 215] = "setlocal3";
a[a.invalid = 237] = "invalid";
a[a.debug = 239] = "debug";
a[a.debugline = 240] = "debugline";
a[a.debugfile = 241] = "debugfile";
a[a.bkptline = 242] = "bkptline";
a[a.timestamp = 243] = "timestamp";
a[a["throw"] = 3] = "throw";
a[a["typeof"] = 149] = "typeof";
a[a["instanceof"] = 177] = "instanceof";
a[a["in"] = 180] = "in";
})(h.OP || (h.OP = {}));
h.opcodeTable = [null, {name:"bkpt", canThrow:!1, operands:[]}, {name:"nop", canThrow:!1, operands:[]}, {name:"throw", canThrow:!0, operands:[]}, {name:"getsuper", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"setsuper", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"dxns", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"dxnslate", canThrow:!0, operands:[]}, {name:"kill", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]},
{name:"label", canThrow:!1, operands:[]}, {name:"lf32x4", canThrow:!0, operands:[]}, {name:"sf32x4", canThrow:!0, operands:[]}, {name:"ifnlt", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifnle", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifngt", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifnge", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"jump", canThrow:!1, operands:[{name:"offset", size:"s24",
type:""}]}, {name:"iftrue", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"iffalse", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifeq", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifne", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"iflt", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifle", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifgt", canThrow:!0,
operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifge", canThrow:!0, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifstricteq", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"ifstrictne", canThrow:!1, operands:[{name:"offset", size:"s24", type:""}]}, {name:"lookupswitch", canThrow:!1, operands:null}, {name:"pushwith", canThrow:!1, operands:[]}, {name:"popscope", canThrow:!1, operands:[]}, {name:"nextname", canThrow:!0, operands:[]}, {name:"hasnext", canThrow:!0,
operands:[]}, {name:"pushnull", canThrow:!1, operands:[]}, {name:"pushundefined", canThrow:!1, operands:[]}, null, {name:"nextvalue", canThrow:!0, operands:[]}, {name:"pushbyte", canThrow:!1, operands:[{name:"value", size:"s08", type:""}]}, {name:"pushshort", canThrow:!1, operands:[{name:"value", size:"s16", type:""}]}, {name:"pushtrue", canThrow:!1, operands:[]}, {name:"pushfalse", canThrow:!1, operands:[]}, {name:"pushnan", canThrow:!1, operands:[]}, {name:"pop", canThrow:!1, operands:[]},
{name:"dup", canThrow:!1, operands:[]}, {name:"swap", canThrow:!1, operands:[]}, {name:"pushstring", canThrow:!1, operands:[{name:"index", size:"u30", type:"S"}]}, {name:"pushint", canThrow:!1, operands:[{name:"index", size:"u30", type:"I"}]}, {name:"pushuint", canThrow:!1, operands:[{name:"index", size:"u30", type:"U"}]}, {name:"pushdouble", canThrow:!1, operands:[{name:"index", size:"u30", type:"D"}]}, {name:"pushscope", canThrow:!1, operands:[]}, {name:"pushnamespace", canThrow:!1, operands:[{name:"index",
size:"u30", type:"N"}]}, {name:"hasnext2", canThrow:!0, operands:[{name:"object", size:"u30", type:""}, {name:"index", size:"u30", type:""}]}, {name:"lix8", canThrow:!0, operands:null}, {name:"lix16", canThrow:!0, operands:null}, {name:"li8", canThrow:!0, operands:[]}, {name:"li16", canThrow:!0, operands:[]}, {name:"li32", canThrow:!0, operands:[]}, {name:"lf32", canThrow:!0, operands:[]}, {name:"lf64", canThrow:!0, operands:[]}, {name:"si8", canThrow:!0, operands:[]}, {name:"si16", canThrow:!0,
operands:[]}, {name:"si32", canThrow:!0, operands:[]}, {name:"sf32", canThrow:!0, operands:[]}, {name:"sf64", canThrow:!0, operands:[]}, null, {name:"newfunction", canThrow:!0, operands:[{name:"index", size:"u30", type:"MI"}]}, {name:"call", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"construct", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"callmethod", canThrow:!0, operands:[{name:"index", size:"u30", type:""}, {name:"argCount", size:"u30",
type:""}]}, {name:"callstatic", canThrow:!0, operands:[{name:"index", size:"u30", type:"MI"}, {name:"argCount", size:"u30", type:""}]}, {name:"callsuper", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"callproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"returnvoid", canThrow:!1, operands:[]}, {name:"returnvalue", canThrow:!0, operands:[]}, {name:"constructsuper",
canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"constructprop", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"callsuperid", canThrow:!0, operands:null}, {name:"callproplex", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"callinterface", canThrow:!0, operands:null}, {name:"callsupervoid", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"},
{name:"argCount", size:"u30", type:""}]}, {name:"callpropvoid", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}, {name:"argCount", size:"u30", type:""}]}, {name:"sxi1", canThrow:!1, operands:[]}, {name:"sxi8", canThrow:!1, operands:[]}, {name:"sxi16", canThrow:!1, operands:[]}, {name:"applytype", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"pushfloat4", canThrow:!1, operands:null}, {name:"newobject", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]},
{name:"newarray", canThrow:!0, operands:[{name:"argCount", size:"u30", type:""}]}, {name:"newactivation", canThrow:!0, operands:[]}, {name:"newclass", canThrow:!0, operands:[{name:"index", size:"u30", type:"CI"}]}, {name:"getdescendants", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"newcatch", canThrow:!0, operands:[{name:"index", size:"u30", type:"EI"}]}, {name:"findpropglobalstrict", canThrow:!0, operands:null}, {name:"findpropglobal", canThrow:!0, operands:null}, {name:"findpropstrict",
canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"findproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"finddef", canThrow:!0, operands:null}, {name:"getlex", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"setproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"getlocal", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"setlocal", canThrow:!1, operands:[{name:"index", size:"u30",
type:""}]}, {name:"getglobalscope", canThrow:!1, operands:[]}, {name:"getscopeobject", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"getproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"getouterscope", canThrow:!1, operands:null}, {name:"initproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, null, {name:"deleteproperty", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, null, {name:"getslot", canThrow:!0,
operands:[{name:"index", size:"u30", type:""}]}, {name:"setslot", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"getglobalslot", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"setglobalslot", canThrow:!1, operands:[{name:"index", size:"u30", type:""}]}, {name:"convert_s", canThrow:!0, operands:[]}, {name:"esc_xelem", canThrow:!0, operands:[]}, {name:"esc_xattr", canThrow:!0, operands:[]}, {name:"convert_i", canThrow:!0, operands:[]}, {name:"convert_u",
canThrow:!0, operands:[]}, {name:"convert_d", canThrow:!0, operands:[]}, {name:"convert_b", canThrow:!0, operands:[]}, {name:"convert_o", canThrow:!0, operands:[]}, {name:"checkfilter", canThrow:!0, operands:[]}, {name:"convert_f", canThrow:!0, operands:[]}, {name:"unplus", canThrow:!0, operands:[]}, {name:"convert_f4", canThrow:!0, operands:[]}, null, null, null, null, {name:"coerce", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"coerce_b", canThrow:!0, operands:[]},
{name:"coerce_a", canThrow:!0, operands:[]}, {name:"coerce_i", canThrow:!0, operands:[]}, {name:"coerce_d", canThrow:!0, operands:[]}, {name:"coerce_s", canThrow:!0, operands:[]}, {name:"astype", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"astypelate", canThrow:!0, operands:[]}, {name:"coerce_u", canThrow:!0, operands:[]}, {name:"coerce_o", canThrow:!0, operands:[]}, null, null, null, null, null, null, {name:"negate", canThrow:!0, operands:[]}, {name:"increment", canThrow:!0,
operands:[]}, {name:"inclocal", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"decrement", canThrow:!0, operands:[]}, {name:"declocal", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"typeof", canThrow:!1, operands:[]}, {name:"not", canThrow:!1, operands:[]}, {name:"bitnot", canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, {name:"add", canThrow:!0, operands:[]}, {name:"subtract", canThrow:!0, operands:[]}, {name:"multiply",
canThrow:!0, operands:[]}, {name:"divide", canThrow:!0, operands:[]}, {name:"modulo", canThrow:!0, operands:[]}, {name:"lshift", canThrow:!0, operands:[]}, {name:"rshift", canThrow:!0, operands:[]}, {name:"urshift", canThrow:!0, operands:[]}, {name:"bitand", canThrow:!0, operands:[]}, {name:"bitor", canThrow:!0, operands:[]}, {name:"bitxor", canThrow:!0, operands:[]}, {name:"equals", canThrow:!0, operands:[]}, {name:"strictequals", canThrow:!0, operands:[]}, {name:"lessthan", canThrow:!0, operands:[]},
{name:"lessequals", canThrow:!0, operands:[]}, {name:"greaterthan", canThrow:!0, operands:[]}, {name:"greaterequals", canThrow:!0, operands:[]}, {name:"instanceof", canThrow:!0, operands:[]}, {name:"istype", canThrow:!0, operands:[{name:"index", size:"u30", type:"M"}]}, {name:"istypelate", canThrow:!0, operands:[]}, {name:"in", canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, null, null, null, {name:"increment_i", canThrow:!0, operands:[]}, {name:"decrement_i", canThrow:!0,
operands:[]}, {name:"inclocal_i", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"declocal_i", canThrow:!0, operands:[{name:"index", size:"u30", type:""}]}, {name:"negate_i", canThrow:!0, operands:[]}, {name:"add_i", canThrow:!0, operands:[]}, {name:"subtract_i", canThrow:!0, operands:[]}, {name:"multiply_i", canThrow:!0, operands:[]}, null, null, null, null, null, null, null, null, {name:"getlocal0", canThrow:!1, operands:[]}, {name:"getlocal1", canThrow:!1, operands:[]},
{name:"getlocal2", canThrow:!1, operands:[]}, {name:"getlocal3", canThrow:!1, operands:[]}, {name:"setlocal0", canThrow:!1, operands:[]}, {name:"setlocal1", canThrow:!1, operands:[]}, {name:"setlocal2", canThrow:!1, operands:[]}, {name:"setlocal3", canThrow:!1, operands:[]}, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, {name:"invalid", canThrow:!1, operands:[]}, null, {name:"debug", canThrow:!0, operands:[{name:"debugType",
size:"u08", type:""}, {name:"index", size:"u30", type:"S"}, {name:"reg", size:"u08", type:""}, {name:"extra", size:"u30", type:""}]}, {name:"debugline", canThrow:!0, operands:[{name:"lineNumber", size:"u30", type:""}]}, {name:"debugfile", canThrow:!0, operands:[{name:"index", size:"u30", type:"S"}]}, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
h.opcodeName = function(a) {
return h.opcodeTable[a].name;
};
var l = function() {
function a(k) {
var f = k.readU8();
this.op = f;
this.originalPosition = k.position;
var d = c.AVM2.opcodeTable[f];
d || s("Unknown Op " + f);
this.canThrow = d.canThrow;
var b;
if (27 === f) {
d = k.readS24();
this.offsets = [];
b = k.readU30() + 1;
for (f = 0;f < b;f++) {
this.offsets.push(k.readS24());
}
this.offsets.push(d);
} else {
for (f = 0, b = d.operands.length;f < b;f++) {
var g = d.operands[f];
switch(g.size) {
case "u08":
this[g.name] = k.readU8();
break;
case "s08":
this[g.name] = k.readS8();
break;
case "s16":
this[g.name] = k.readS16();
break;
case "s24":
this[g.name] = k.readS24();
break;
case "u30":
this[g.name] = k.readU30();
break;
case "u32":
this[g.name] = k.readU32();
break;
default:
s();
}
}
}
}
a.prototype.makeBlockHead = function(a) {
if (this.succs) {
return a;
}
this.bid = a;
this.succs = [];
this.preds = [];
this.dominatees = [];
return a + 1;
};
a.prototype.trace = function(a) {
this.succs && a.writeLn("#" + this.bid);
};
a.prototype.toString = function(a) {
var f = c.AVM2.opcodeTable[this.op], d = f.name.padRight(" ", 20), b, g;
if (27 === this.op) {
for (d += "targets:", b = 0, g = this.targets.length;b < g;b++) {
d += (0 < b ? "," : "") + this.targets[b].position;
}
} else {
for (b = 0, g = f.operands.length;b < g;b++) {
var e = f.operands[b];
if ("offset" === e.name) {
d += "target:" + this.target.position;
} else {
var d = d + (e.name + ": "), w = this[e.name];
if (a) {
switch(e.type) {
case "":
d += w;
break;
case "I":
d += a.constantPool.ints[w];
break;
case "U":
d += a.constantPool.uints[w];
break;
case "D":
d += a.constantPool.doubles[w];
break;
case "S":
d += a.constantPool.strings[w];
break;
case "N":
d += a.constantPool.namespaces[w];
break;
case "CI":
d += a.classes[w];
break;
case "M":
d += a.constantPool.multinames[w];
break;
default:
d += "?";
}
} else {
d += w;
}
}
b < g - 1 && (d += ", ");
}
}
return d;
};
return a;
}();
h.Bytecode = l;
var e = c.BitSets.BITS_PER_WORD, m = c.BitSets.ADDRESS_BITS_PER_WORD, t = c.BitSets.BIT_INDEX_MASK, q = function(c) {
function k(a, d) {
c.call(this, a);
this.blockById = d;
}
__extends(k, c);
k.prototype.forEachBlock = function(f) {
a(f);
for (var d = this.blockById, b = this.bits, g = 0, k = b.length;g < k;g++) {
var w = b[g];
if (w) {
for (var m = 0;m < e;m++) {
w & 1 << m && f(d[g * e + m]);
}
}
}
};
k.prototype.choose = function() {
for (var a = this.blockById, d = this.bits, b = 0, g = d.length;b < g;b++) {
var k = d[b];
if (k) {
for (var w = 0;w < e;w++) {
if (k & 1 << w) {
return a[b * e + w];
}
}
}
}
};
k.prototype.members = function() {
for (var a = this.blockById, d = [], b = this.bits, g = 0, k = b.length;g < k;g++) {
var w = b[g];
if (w) {
for (var m = 0;m < e;m++) {
w & 1 << m && d.push(a[g * e + m]);
}
}
}
return d;
};
k.prototype.setBlocks = function(a) {
for (var d = this.bits, b = 0, g = a.length;b < g;b++) {
var k = a[b].bid;
d[k >> m] |= 1 << (k & t);
}
};
return k;
}(c.BitSets.Uint32ArrayBitSet);
h.BlockSet = q;
q = function() {
function e(a) {
this.methodInfo = a;
this.methodInfo.code && (h.enterTimeline("normalizeBytecode"), this.normalizeBytecode(), h.leaveTimeline());
}
e.prototype.makeBlockSetFactory = function(k, f) {
a(!this.boundBlockSet);
this.boundBlockSet = function() {
return new c.AVM2.BlockSet(k, f);
};
};
e.prototype.accessLocal = function(a) {
0 !== a-- && a < this.methodInfo.parameters.length && (this.methodInfo.parameters[a].isUsed = !0);
};
e.prototype.getInvalidTarget = function(a, f) {
if (a && a[f]) {
return a[f];
}
var d = Object.create(l.prototype);
d.op = 237;
d.position = f;
a && (a[f] = d);
return d;
};
e.prototype.normalizeBytecode = function() {
for (var a = [], f = [], d = new v(this.methodInfo.code), b;0 < d.remaining();) {
var g = d.position;
b = new l(d);
switch(b.op) {
case 2:
;
case 9:
a[g] = f.length;
continue;
case 27:
this.methodInfo.hasLookupSwitches = !0;
b.targets = [];
for (var e = b.offsets, w = 0, m = e.length;w < m;w++) {
e[w] += g;
}
break;
case 16:
;
case 21:
;
case 12:
;
case 22:
;
case 13:
;
case 23:
;
case 14:
;
case 24:
;
case 15:
;
case 19:
;
case 20:
;
case 25:
;
case 26:
;
case 17:
;
case 18:
b.offset += d.position;
break;
case 208:
;
case 209:
;
case 210:
;
case 211:
this.accessLocal(b.op - 208);
break;
case 98:
this.accessLocal(b.index);
}
b.position = f.length;
a[g] = f.length;
f.push(b);
}
for (var d = {}, c = 0, q = f.length;c < q;c++) {
switch(b = f[c], b.op) {
case 27:
e = b.offsets;
w = 0;
for (m = e.length;w < m;w++) {
g = a[e[w]], b.targets.push(f[g] || this.getInvalidTarget(d, e[w])), e[w] = g;
}
break;
case 16:
;
case 21:
;
case 12:
;
case 22:
;
case 13:
;
case 23:
;
case 14:
;
case 24:
;
case 15:
;
case 19:
;
case 20:
;
case 25:
;
case 26:
;
case 17:
;
case 18:
g = a[b.offset], b.target = f[g] || this.getInvalidTarget(d, b.offset), b.offset = g;
}
}
this.bytecodes = f;
b = this.methodInfo.exceptions;
w = 0;
for (m = b.length;w < m;w++) {
e = b[w], e.start = a[e.start], e.end = a[e.end], e.offset = a[e.target], e.target = f[e.offset], e.target.exception = e;
}
};
e.prototype.analyzeControlFlow = function() {
a(this.bytecodes);
h.enterTimeline("analyzeControlFlow");
this.detectBasicBlocks();
this.normalizeReachableBlocks();
this.computeDominance();
this.analyzedControlFlow = !0;
h.leaveTimeline();
return!0;
};
e.prototype.detectBasicBlocks = function() {
var k = this.bytecodes, f = this.methodInfo.exceptions, d = 0 < f.length, b = {}, g, e, w, m;
m = k[0].makeBlockHead(0);
e = 0;
for (w = k.length - 1;e < w;e++) {
switch(g = k[e], g.op) {
case 71:
;
case 72:
;
case 3:
m = k[e + 1].makeBlockHead(m);
break;
case 27:
g = g.targets;
for (var c = 0, q = g.length;c < q;c++) {
m = g[c].makeBlockHead(m);
}
m = k[e + 1].makeBlockHead(m);
break;
case 16:
;
case 21:
;
case 12:
;
case 22:
;
case 13:
;
case 23:
;
case 14:
;
case 24:
;
case 15:
;
case 19:
;
case 20:
;
case 25:
;
case 26:
;
case 17:
;
case 18:
m = g.target.makeBlockHead(m), m = k[e + 1].makeBlockHead(m);
}
}
g = k[w];
switch(g.op) {
case 27:
g = g.targets;
c = 0;
for (q = g.length;c < q;c++) {
m = g[c].makeBlockHead(m);
}
break;
case 16:
m = g.target.makeBlockHead(m);
break;
case 21:
;
case 12:
;
case 22:
;
case 13:
;
case 23:
;
case 14:
;
case 24:
;
case 15:
;
case 19:
;
case 20:
;
case 25:
;
case 26:
;
case 17:
;
case 18:
m = g.target.makeBlockHead(m), k[e + 1] = this.getInvalidTarget(null, e + 1), m = k[e + 1].makeBlockHead(m);
}
if (d) {
for (c = 0;c < f.length;c++) {
e = f[c], w = k[e.end + 1], m = k[e.start].makeBlockHead(m), w && (m = w.makeBlockHead(m)), m = e.target.makeBlockHead(m);
}
}
var n = k[0];
e = 1;
for (w = k.length;e < w;e++) {
if (k[e].succs) {
a(n.succs);
b[n.bid] = n;
g = k[e - 1];
n.end = g;
var l = k[e];
switch(g.op) {
case 71:
;
case 72:
;
case 3:
break;
case 27:
c = 0;
for (q = g.targets.length;c < q;c++) {
n.succs.push(g.targets[c]);
}
break;
case 16:
n.succs.push(g.target);
break;
case 21:
;
case 12:
;
case 22:
;
case 13:
;
case 23:
;
case 14:
;
case 24:
;
case 15:
;
case 19:
;
case 20:
;
case 25:
;
case 26:
;
case 17:
;
case 18:
n.succs.push(g.target);
g.target !== l && n.succs.push(l);
break;
default:
n.succs.push(l);
}
if (d) {
c = n;
q = [];
g = 0;
for (var t = f.length;g < t;g++) {
var s = f[g];
c.position >= s.start && c.end.position <= s.end && q.push(s.target);
}
g = q;
n.hasCatches = 0 < g.length;
n.succs.push.apply(n.succs, g);
}
n = l;
}
}
b[n.bid] = n;
g = k[w - 1];
switch(g.op) {
case 27:
c = 0;
for (q = g.targets.length;c < q;c++) {
n.succs.push(g.targets[c]);
}
break;
case 16:
n.succs.push(g.target);
}
n.end = g;
this.makeBlockSetFactory(m, b);
};
e.prototype.normalizeReachableBlocks = function() {
var k = this.bytecodes[0];
a(0 === k.preds.length);
var f = [], d = {}, b = {}, g = [k];
for (b[k.bid] = !0;k = p(g);) {
if (d[k.bid]) {
if (1 === d[k.bid]) {
d[k.bid] = 2;
f.push(k);
for (var e = k.succs, m = 0, c = e.length;m < c;m++) {
e[m].preds.push(k);
}
}
b[k.bid] = !1;
g.pop();
} else {
for (d[k.bid] = 1, b[k.bid] = !0, e = k.succs, m = 0, c = e.length;m < c;m++) {
var q = e[m];
b[q.bid] && (k.spbacks || (k.spbacks = new this.boundBlockSet), k.spbacks.set(q.bid));
!d[q.bid] && g.push(q);
}
}
}
this.blocks = f.reverse();
};
e.prototype.computeDominance = function() {
var k = this.blocks, f = k.length, d = Array(f);
d[0] = 0;
for (var b = {}, g = 0;g < f;g++) {
b[k[g].bid] = g;
}
for (var e = !0;e;) {
for (e = !1, g = 1;g < f;g++) {
var m = k[g].preds, c = m.length, q = b[m[0].bid];
if (!(q in d)) {
for (var n = 1;n < c && !(q = b[m[n].bid], q in d);n++) {
}
}
a(q in d);
for (n = 0;n < c;n++) {
var l = b[m[n].bid];
if (l !== q && l in d) {
for (;l !== q;) {
for (;l > q;) {
l = d[l];
}
for (;q > l;) {
q = d[q];
}
}
q = l;
}
}
d[g] !== q && (d[g] = q, e = !0);
}
}
k[0].dominator = k[0];
for (g = 1;g < f;g++) {
b = k[g], n = k[d[g]], b.dominator = n, n.dominatees.push(b), b.npreds = b.preds.length;
}
f = [k[0]];
for (k[0].level || (k[0].level = 0);b = f.shift();) {
k = b.dominatees;
for (n = 0;n < k.length;n++) {
k[n].level = b.level + 1;
}
f.push.apply(f, k);
}
};
e.prototype.markLoops = function() {
function a(b) {
var d = 1, g = {}, f = {}, k = [], e = [], r = [], m = b.level + 1;
b = [b];
for (var w, c;w = p(b);) {
if (g[w.bid]) {
if (u(e) === w) {
e.pop();
var q = [];
do {
c = k.pop(), f[c.bid] = !0, q.push(c);
} while (c !== w);
(1 < q.length || c.spbacks && c.spbacks.get(c.bid)) && r.push(q);
}
b.pop();
} else {
g[w.bid] = d++;
k.push(w);
e.push(w);
c = w.succs;
for (var q = 0, n = c.length;q < n;q++) {
if (w = c[q], !(w.level < m)) {
var l = w.bid;
if (!g[l]) {
b.push(w);
} else {
if (!f[l]) {
for (;g[u(e).bid] > g[l];) {
e.pop();
}
}
}
}
}
}
}
return r;
}
function f(a, d) {
var g = new b;
g.setBlocks(a);
g.recount();
this.id = d;
this.body = g;
this.exit = new b;
this.save = {};
this.head = new b;
this.npreds = 0;
this._dirtyLocals = null;
}
if (!this.analyzedControlFlow && !this.analyzeControlFlow()) {
return!1;
}
var d = this.bytecodes, b = this.boundBlockSet;
f.prototype.getDirtyLocals = function() {
if (this._dirtyLocals) {
return this._dirtyLocals;
}
var b = this._dirtyLocals = [];
this.body.members().forEach(function(a) {
var g = a.position;
for (a = a.end.position;g <= a;g++) {
var f = d[g], k = f.op;
switch(k) {
case 146:
;
case 148:
;
case 99:
;
case 194:
;
case 195:
b[f.index] = !0;
break;
case 50:
b[f.index] = !0;
b[f.object] = !0;
break;
case 212:
;
case 213:
;
case 214:
;
case 215:
b[k - 212] = !0;
}
}
});
return b;
};
var g = function(a) {
for (var d = new b, g = 0, f = a.length;g < f;g++) {
var k = a[g], e = k.spbacks;
if (e) {
for (var k = k.succs, r = 0, m = k.length;r < m;r++) {
var w = k[r];
e.get(w.bid) && d.set(w.dominator.bid);
}
}
}
return d.members();
}(this.blocks);
if (0 >= g.length) {
return this.markedLoops = !0;
}
for (var g = g.sort(function(b, a) {
return b.level - a.level;
}), e = 0, m = g.length - 1;0 <= m;m--) {
var c = g[m], q = a(c);
if (0 !== q.length) {
for (var n = 0, l = q.length;n < l;n++) {
for (var t = q[n], s = new f(t, e++), h = 0, v = t.length;h < v;h++) {
var L = t[h];
if (L.level === c.level + 1 && !L.loop) {
L.loop = s;
s.head.set(L.bid);
for (var H = L.preds, J = 0, C = H.length;J < C;J++) {
s.body.get(H[J].bid) && L.npreds--;
}
s.npreds += L.npreds;
}
}
h = 0;
for (v = t.length;h < v;h++) {
L = t[h], L.level === c.level + 1 && (L.npreds = s.npreds);
}
s.head.recount();
}
}
}
return this.markedLoops = !0;
};
return e;
}();
h.Analysis = q;
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
var Bytecode = Shumway.AVM2.Bytecode, Analysis = Shumway.AVM2.Analysis;
(function(c) {
(function(h) {
var a = c.Options.Option, s = c.Options.OptionSet, v = c.Settings.shumwayOptions.register(new s("AVM2"));
(function(c) {
var h = v.register(new s("Runtime"));
c.traceExecution = h.register(new a("tx", "traceExecution", "number", 0, "trace script execution", {choices:{off:0, normal:2, verbose:3}}));
c.traceCallExecution = h.register(new a("txc", "traceCallExecution", "number", 0, "trace call execution", {choices:{off:0, normal:1, verbose:2}}));
c.traceFunctions = h.register(new a("t", "traceFunctions", "number", 0, "trace functions", {choices:{off:0, compiled:1, "compiled & abc":2}}));
c.traceClasses = h.register(new a("tc", "traceClasses", "boolean", !1, "trace class creation"));
c.traceDomain = h.register(new a("td", "traceDomain", "boolean", !1, "trace domain property access"));
c.debuggerMode = h.register(new a("db", "debuggerMode", "boolean", !0, "enable debugger mode"));
c.globalMultinameAnalysis = h.register(new a("ga", "globalMultinameAnalysis", "boolean", !1, "Global multiname analysis."));
c.codeCaching = h.register(new a("cc", "codeCaching", "boolean", !1, "Enable code caching."));
c.compilerEnableExceptions = h.register(new a("cex", "exceptions", "boolean", !1, "Compile functions with catch blocks."));
c.compilerMaximumMethodSize = h.register(new a("cmms", "maximumMethodSize", "number", 4096, "Compiler maximum method size."));
c = c.ExecutionMode || (c.ExecutionMode = {});
c[c.INTERPRET = 1] = "INTERPRET";
c[c.COMPILE = 2] = "COMPILE";
})(h.Runtime || (h.Runtime = {}));
(function(c) {
c.options = v.register(new s("Compiler"));
c.traceLevel = c.options.register(new a("tc4", "tc4", "number", 0, "Compiler Trace Level"));
c.breakFilter = c.options.register(new a("", "break", "string", "", "Set a break point at methods whose qualified name matches this string pattern."));
c.compileFilter = c.options.register(new a("", "compile", "string", "", "Only compile methods whose qualified name matches this string pattern."));
c.enableDirtyLocals = c.options.register(new a("dl", "dirtyLocals", "boolean", !0, "Performe dirty local analysis to minimise PHI nodes."));
})(h.Compiler || (h.Compiler = {}));
(function(c) {
c.options = v.register(new s("Verifier"));
c.enabled = c.options.register(new a("verifier", "verifier", "boolean", !0, "Enable verifier."));
c.traceLevel = c.options.register(new a("tv", "tv", "number", 0, "Verifier Trace Level"));
})(h.Verifier || (h.Verifier = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
var Namespace = Shumway.AVM2.ABC.Namespace;
(function(c) {
(function(h) {
(function(a) {
function s(b) {
var d = this.resolutionMap[b.runtimeId];
if (d) {
return d;
}
var d = this.resolutionMap[b.runtimeId] = c.ObjectUtilities.createMap(), g = this.bindings, f;
for (f in g.map) {
var k = f, e = g.map[f].trait;
if (e.isGetter() || e.isSetter()) {
k = k.substring(a.Binding.KEY_PREFIX_LENGTH);
}
k = T.fromQualifiedName(k);
k.getNamespace().inNamespaceSet(b) && (d[k.getName()] = T.getQualifiedName(e.name));
}
return d;
}
function v(b, a, d) {
qa(a) ? a = String(S(a)) : "object" === typeof a && (a = String(a));
return c.isNumeric(a) ? c.toNumber(a) : b ? 1 < b.length ? (b = this.getNamespaceResolutionMap(b)[a]) ? b : T.getPublicQualifiedName(a) : T.qualifyName(b[0], a) : T.getPublicQualifiedName(a);
}
function p(b) {
return this.asGetProperty(void 0, b, 0);
}
function u(b, a, d) {
b = this.resolveMultinameProperty(b, a, d);
return this.asGetNumericProperty && T.isNumeric(b) ? this.asGetNumericProperty(b) : this[b];
}
function l(b) {
pa(c.isString(b));
return this[b];
}
function e(b, a, d) {
a = a ? null : this;
var g = this.asOpenMethods;
return(a && g && g[b] ? g[b] : this[b]).asApply(a, d);
}
function m(b, a) {
return this.asSetProperty(void 0, b, 0, a);
}
function t(b, d) {
d === T.VALUE_OF ? (ha(b, "original_valueOf", b.valueOf), b.valueOf = a.forwardValueOf) : d === T.TO_STRING && (ha(b, "original_toString", b.toString), b.toString = a.forwardToString);
}
function q(b, a, d, g) {
"object" === typeof a && (a = String(a));
b = this.resolveMultinameProperty(b, a, d);
if (this.asSetNumericProperty && T.isNumeric(b)) {
return this.asSetNumericProperty(b, g);
}
(a = this.asSlots.byQN[b]) && (a = a.type) && a.coerce && (g = a.coerce(g));
t(this, b);
this[b] = g;
}
function n(b, a) {
return this.asDefineProperty(void 0, b, 0, a);
}
function k(b, a, d, g) {
"object" === typeof a && (a = String(a));
b = this.resolveMultinameProperty(b, a, d);
Object.defineProperty(this, b, g);
}
function f(b, a, d) {
"object" === typeof a && (a = String(a));
b = this.resolveMultinameProperty(b, a, d);
return Object.getOwnPropertyDescriptor(this, b);
}
function d(b, a) {
return this.asCallProperty(void 0, b, 0, !1, a);
}
function b(b, d, g, f, k) {
a.traceCallExecution.value && a.callWriter.enter("call " + (this.class ? this.class + " " : "") + d + "(" + xa(k) + ") #" + ia.count(d));
f = f ? null : this;
b = this.resolveMultinameProperty(b, d, g);
this.asGetNumericProperty && T.isNumeric(b) ? b = this.asGetNumericProperty(b) : (d = this.asOpenMethods, b = f && d && d[b] ? d[b] : this[b]);
k = b.asApply(f, k);
0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(k));
return k;
}
function g(b, d, g, f, k) {
a.traceCallExecution.value && a.callWriter.enter("call super " + (this.class ? this.class + " " : "") + g + "(" + xa(k) + ") #" + ia.count(g));
b = b.object.baseClass;
d = b.traitsPrototype.resolveMultinameProperty(d, g, f);
g = b.traitsPrototype.asOpenMethods;
pa(g && g[d]);
k = g[d].asApply(this, k);
0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(k));
return k;
}
function r(b, d, g, f, k) {
a.traceCallExecution.value && a.callWriter.enter("set super " + (this.class ? this.class + " " : "") + g + "(" + va(k) + ") #" + ia.count(g));
b = b.object.baseClass;
var e = b.traitsPrototype.resolveMultinameProperty(d, g, f);
this.asSlots.byQN[e] ? this.asSetProperty(d, g, f, k) : b.traitsPrototype[a.VM_OPEN_SET_METHOD_PREFIX + e].call(this, k);
0 < a.traceCallExecution.value && a.callWriter.leave("");
}
function w(b, d, g, f) {
a.traceCallExecution.value && a.callWriter.enter("get super " + (this.class ? this.class + " " : "") + g + " #" + ia.count(g));
b = b.object.baseClass;
var k = b.traitsPrototype.resolveMultinameProperty(d, g, f);
d = this.asSlots.byQN[k] ? this.asGetProperty(d, g, f) : b.traitsPrototype[a.VM_OPEN_GET_METHOD_PREFIX + k].call(this);
0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(d));
return d;
}
function z(b, a) {
if (b.classInfo) {
var d = T.getQualifiedName(b.classInfo.instanceInfo.name);
if (d === T.String) {
return String.asApply(null, a);
}
if (d === T.Boolean) {
return Boolean.asApply(null, a);
}
if (d === T.Number) {
return Number.asApply(null, a);
}
}
d = b.instanceConstructor;
switch(a.length) {
case 0:
return new d;
case 1:
return new d(a[0]);
case 2:
return new d(a[0], a[1]);
case 3:
return new d(a[0], a[1], a[2]);
case 4:
return new d(a[0], a[1], a[2], a[3]);
case 5:
return new d(a[0], a[1], a[2], a[3], a[4]);
case 6:
return new d(a[0], a[1], a[2], a[3], a[4], a[5]);
case 7:
return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6]);
case 8:
return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7]);
case 9:
return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
case 10:
return new d(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9]);
}
for (var g = [], f = 0;f < a.length;f++) {
g[f + 1] = a[f];
}
return new (Function.bind.asApply(d, g));
}
function A(b, d, g, f) {
b = this.asGetProperty(b, d, g);
a.traceCallExecution.value && a.callWriter.enter("construct " + d + "(" + xa(f) + ") #" + ia.count(d));
d = z(b, f);
0 < a.traceCallExecution.value && a.callWriter.leave("return " + va(d));
return d;
}
function B(b, a, d) {
return this.resolveMultinameProperty(b, a, d) in this;
}
function M(b, a, d) {
b = this.resolveMultinameProperty(b, a, d);
return ra(this, b) || 0 <= this.asBindings.indexOf(b);
}
function N(b, a, d) {
b = this.resolveMultinameProperty(b, a, d);
return wa(this, b);
}
function K(b, a, d) {
return this.asHasTraitProperty(b, a, d) ? !1 : delete this[this.resolveMultinameProperty(b, a, d)];
}
function y(b, a, d) {
b = this.resolveMultinameProperty(b, a, d);
return 0 <= this.asBindings.indexOf(b);
}
function D(b) {
return this[b];
}
function L(b, a) {
this[b] = a;
}
function H(b) {
0 === b && ha(this, "asEnumerableKeys", this.asGetEnumerableKeys());
for (var a = this.asEnumerableKeys;b < a.length;) {
if (this.asHasProperty(void 0, a[b], 0)) {
return b + 1;
}
b++;
}
return 0;
}
function J(b) {
var a = this.asEnumerableKeys;
pa(a && 0 < b && b < a.length + 1);
return a[b - 1];
}
function C(b) {
return this.asGetPublicProperty(this.asNextName(b));
}
function E(b) {
if (qa(b.object)) {
b.index = 0, b.object = null;
} else {
var a = ya(b.object), d = a.asNextNameIndex(b.index);
if (0 < d) {
b.index = d, b.object = a;
} else {
for (;;) {
a = Object.getPrototypeOf(a);
if (!a) {
b.index = 0;
b.object = null;
break;
}
d = a.asNextNameIndex(0);
if (0 < d) {
b.index = d;
b.object = a;
break;
}
}
}
}
}
function F() {
if (this instanceof String || this instanceof Number) {
return[];
}
for (var b = Object.keys(this), a = [], d = 0;d < b.length;d++) {
var g = b[d];
c.isNumeric(g) ? a.push(g) : (g = T.stripPublicQualifier(g), void 0 !== g && a.push(g));
}
return a;
}
function I(b, a) {
b || G("TypeError", h.Errors.NullPointerError, a);
}
function G(b, d, g, f, k, e) {
d.fqn && (b = d.fqn);
var r = c.AVM2.formatErrorMessage.apply(null, Array.prototype.slice.call(arguments, 1)), m = a.AVM2.currentDomain(), w = d.code;
throw new (m.getClass(b).instanceConstructor)(r, w);
}
function Z(b) {
return b instanceof h.AS.ASXML || b instanceof h.AS.ASXMLList || b instanceof h.AS.ASQName || b instanceof h.AS.ASNamespace;
}
function Q(b, a) {
return b.coerce(a);
}
function S(b) {
return "string" === typeof b ? b : void 0 == b ? null : b + "";
}
function O(b) {
return b instanceof Boolean ? b.valueOf() : void 0 == b ? null : "string" === typeof b || "number" === typeof b ? b : Object(b);
}
function P(b, a) {
return String(b).localeCompare(String(a));
}
function V(b) {
return b instanceof h.AS.ASXML || b instanceof h.AS.ASXMLList;
}
function $(c) {
"Object Number Boolean String Array Date RegExp".split(" ").forEach(function(b) {
Ha(c[b].prototype, a.VM_NATIVE_PROTOTYPE_FLAG, !0);
});
ha(c.Object.prototype, "getNamespaceResolutionMap", s);
ha(c.Object.prototype, "resolveMultinameProperty", v);
ha(c.Object.prototype, "asGetProperty", u);
ha(c.Object.prototype, "asGetPublicProperty", p);
ha(c.Object.prototype, "asGetResolvedStringProperty", l);
ha(c.Object.prototype, "asSetProperty", q);
ha(c.Object.prototype, "asSetPublicProperty", m);
ha(c.Object.prototype, "asDefineProperty", k);
ha(c.Object.prototype, "asDefinePublicProperty", n);
ha(c.Object.prototype, "asGetPropertyDescriptor", f);
ha(c.Object.prototype, "asCallProperty", b);
ha(c.Object.prototype, "asCallSuper", g);
ha(c.Object.prototype, "asGetSuper", w);
ha(c.Object.prototype, "asSetSuper", r);
ha(c.Object.prototype, "asCallPublicProperty", d);
ha(c.Object.prototype, "asCallResolvedStringProperty", e);
ha(c.Object.prototype, "asConstructProperty", A);
ha(c.Object.prototype, "asHasProperty", B);
ha(c.Object.prototype, "asHasPropertyInternal", B);
ha(c.Object.prototype, "asHasOwnProperty", M);
ha(c.Object.prototype, "asPropertyIsEnumerable", N);
ha(c.Object.prototype, "asHasTraitProperty", y);
ha(c.Object.prototype, "asDeleteProperty", K);
ha(c.Object.prototype, "asHasNext2", E);
ha(c.Object.prototype, "asNextName", J);
ha(c.Object.prototype, "asNextValue", C);
ha(c.Object.prototype, "asNextNameIndex", H);
ha(c.Object.prototype, "asGetEnumerableKeys", F);
ha(c.Function.prototype, "asCall", c.Function.prototype.call);
ha(c.Function.prototype, "asApply", c.Function.prototype.apply);
"Array Object Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" ").forEach(function(b) {
b in c ? (ha(c[b].prototype, "asGetNumericProperty", D), ha(c[b].prototype, "asSetNumericProperty", L)) : console.warn(b + " was not found in globals");
});
c.Array.prototype.asGetProperty = function(b, a, d) {
return "number" === typeof a ? this[a] : u.call(this, b, a, d);
};
c.Array.prototype.asSetProperty = function(b, a, d, g) {
if ("number" === typeof a) {
this[a] = g;
} else {
return q.call(this, b, a, d, g);
}
};
}
function W(b, d) {
d && (new a.CatchBindings(new a.Scope(null, this), d)).applyTo(b, this);
}
function x(b, a) {
void 0 === a && (a = 0);
return Array.prototype.slice.call(b, a);
}
function ea(b) {
return!b.hasBody || b.hasExceptions() && !a.compilerEnableExceptions.value || b.hasSetsDxns() || b.code.length > a.compilerMaximumMethodSize.value ? !1 : !0;
}
function Y(b) {
return!ea(b) || b.isClassInitializer || b.isScriptInitializer ? !1 : !0;
}
function R(b) {
if (b.hasExceptions()) {
return!1;
}
b = b.holder;
b instanceof fa && (b = b.instanceInfo);
if (b instanceof la) {
switch(b.name.namespaces[0].uri) {
case "flash.geom":
;
case "flash.events":
return!0;
}
switch(b.name.getOriginalName()) {
case "com.google.youtube.model.VideoData":
return!0;
}
}
return!1;
}
function U(b) {
if (a.codeCaching.value) {
var d = a.CODE_CACHE[b.abc.hash];
if (d) {
d.isInitialized || (d.isInitialized = !0);
if (d = d.methods[b.index]) {
return console.log("Linking CC: " + b), h.countTimeline("Code Cache Hit"), d;
}
b.isInstanceInitializer || b.isClassInitializer ? h.countTimeline("Code Cache Query On Initializer") : (h.countTimeline("Code Cache MISS ON OTHER"), console.warn("Shouldn't MISS: " + b + " " + b.debugName));
h.countTimeline("Code Cache Miss");
} else {
console.warn("Cannot Find Code Cache For ABC, name: " + b.abc.name + ", hash: " + b.abc.hash), h.countTimeline("Code Cache ABC Miss");
}
}
}
function ba(b, a, d) {
var g = !1, f = b.parameters.map(function(b) {
void 0 !== b.value && (g = !0);
return b.value;
});
d = d ? function(a) {
var d = this === jsGlobal ? a.global.object : this, k = x(arguments, 1);
g && k.length < f.length && (k = k.concat(f.slice(k.length - f.length)));
return c.AVM2.Interpreter.interpretMethod(d, b, a, k);
} : function() {
var d = this === jsGlobal ? a.global.object : this, k = x(arguments);
g && k.length < f.length && (k = k.concat(f.slice(arguments.length - f.length)));
return c.AVM2.Interpreter.interpretMethod(d, b, a, k);
};
b.hasSetsDxns() && (d = function(b) {
return function() {
var a = c.AVM2.AS.ASXML.defaultNamespace;
try {
var d = b.apply(this, arguments);
c.AVM2.AS.ASXML.defaultNamespace = a;
return d;
} catch (g) {
throw c.AVM2.AS.ASXML.defaultNamespace = a, g;
}
};
}(d));
d.instanceConstructor = d;
d.debugName = "Interpreter Function #" + Ia++;
return d;
}
function X(b, d, g, f, k) {
k = U(b);
var e;
k || (e = h.Compiler.compileMethod(b, d, g));
d = b.name ? T.getQualifiedName(b.name) : "fn" + Ca;
b.holder && (g = "", b.holder instanceof fa ? g = "static$" + b.holder.instanceInfo.name.getName() : b.holder instanceof la ? g = b.holder.name.getName() : b.holder instanceof ca && (g = "script"), d = g + "$" + d);
d = c.StringUtilities.escapeString(d);
b.verified && (d += "$V");
f || (g = c.AVM2.Compiler.breakFilter.value) && 0 <= d.search(g) && (f = !0);
g = e.body;
f && (g = "{ debugger; \n" + g + "}");
if (!k) {
var r = "function " + d + " (" + e.parameters.join(", ") + ") " + g, r = r + ("//# sourceURL=fun-" + d + ".as")
}
1 < a.traceFunctions.value && b.trace(new ma, b.abc);
b.debugTrace = function() {
b.trace(new ma, b.abc);
};
0 < a.traceFunctions.value && console.log(r);
f = k || (new Function("return " + r))();
f.debugName = "Compiled Function #" + Ja++;
return f;
}
function ga(b, d, g, f, k) {
void 0 === k && (k = !1);
pa(!b.isNative(), "Method should have a builtin: " + b.name);
if (b.freeMethod) {
return g ? a.bindFreeMethodScope(b, d) : b.freeMethod;
}
var e;
if (e = a.checkMethodOverrides(b)) {
return pa(!g), e;
}
if (e = a.checkCommonMethodPatterns(b)) {
return e;
}
ja(b);
1 !== b.abc.applicationDomain.mode && Y(b) || R(b) || (k = !0);
(e = c.AVM2.Compiler.compileFilter.value) && b.name && 0 > T.getQualifiedName(b.name).search(e) && (k = !0);
k ? b.freeMethod = ba(b, d, g) : (Ca++, b.freeMethod = X(b, d, g, f, b.isInstanceInitializer));
b.freeMethod.methodInfo = b;
return g ? a.bindFreeMethodScope(b, d) : b.freeMethod;
}
function ja(b) {
if (!b.analysis) {
b.analysis = new h.Analysis(b);
b.needsActivation() && (b.activationPrototype = new Da(b), (new a.ActivationBindings(b)).applyTo(b.abc.applicationDomain, b.activationPrototype));
for (var d = b.exceptions, g = 0, f = d.length;g < f;g++) {
var k = d[g];
if (k.varName) {
var e = Object.create(na.prototype);
e.kind = 0;
e.name = k.varName;
e.typeName = k.typeName;
e.holder = b;
k.scopeObject = new W(b.abc.applicationDomain, e);
} else {
k.scopeObject = new W(void 0, void 0);
}
}
}
}
function aa(b, d, g) {
pa(d);
pa(b.isMethod() || b.isGetter() || b.isSetter());
var f = b.methodInfo, k;
if (f.isNative()) {
if (2 <= a.traceExecution.value && console.log("Retrieving Native For Trait: " + b.holder + " " + b), (d = b.metadata) && d.native ? k = c.AVM2.AS.getNative(d.native.value[0].value) : g && (k = c.AVM2.AS.getMethodOrAccessorNative(b, g)), !k) {
return function(a) {
return function() {
c.Debug.warning("Calling undefined native method: " + b.kindName() + " " + a.holder.name + "::" + T.getQualifiedName(a.name));
};
}(f);
}
} else {
2 <= a.traceExecution.value && console.log("Creating Function For Trait: " + b.holder + " " + b), k = ga(f, d, !1, !1), pa(k);
}
3 <= a.traceExecution.value && console.log("Made Function: " + T.getQualifiedName(f.name));
return k;
}
a.sealConstTraits = !1;
a.useAsAdd = !0;
var ia = new c.Metrics.Counter(!0), T = c.AVM2.ABC.Multiname, da = c.AVM2.ABC.Namespace, fa = c.AVM2.ABC.ClassInfo, la = c.AVM2.ABC.InstanceInfo, ca = c.AVM2.ABC.ScriptInfo, na = c.AVM2.ABC.Trait, ma = c.IndentingWriter, ra = c.ObjectUtilities.hasOwnProperty, wa = c.ObjectUtilities.propertyIsEnumerable, qa = c.isNullOrUndefined, ya = c.ObjectUtilities.boxValue, pa = c.Debug.assert, za = c.ObjectUtilities.defineNonEnumerableGetterOrSetter, ha = c.ObjectUtilities.defineNonEnumerableProperty,
Ha = c.ObjectUtilities.defineReadOnlyProperty, Ma = c.ObjectUtilities.defineNonEnumerableGetter, va = c.StringUtilities.toSafeString, xa = c.StringUtilities.toSafeArrayString;
a.VM_SLOTS = "asSlots";
a.VM_LENGTH = "asLength";
a.VM_BINDINGS = "asBindings";
a.VM_NATIVE_PROTOTYPE_FLAG = "asIsNative";
a.VM_OPEN_METHODS = "asOpenMethods";
a.VM_OPEN_METHOD_PREFIX = "m";
a.VM_MEMOIZER_PREFIX = "z";
a.VM_OPEN_SET_METHOD_PREFIX = "s";
a.VM_OPEN_GET_METHOD_PREFIX = "g";
a.SAVED_SCOPE_NAME = "$SS";
a.VM_METHOD_OVERRIDES = Object.create(null);
var Ia = 1, Ja = 1, Ca = 0;
a.isNativePrototype = function(b) {
return Object.prototype.hasOwnProperty.call(b, a.VM_NATIVE_PROTOTYPE_FLAG);
};
a.traitsWriter = null;
a.callWriter = new ma;
a.patch = function(b, d) {
pa(c.isFunction(d));
for (var g = 0;g < b.length;g++) {
var f = b[g];
if (3 <= a.traceExecution.value) {
var k = "Patching: ";
f.name ? k += f.name : f.get ? k += "get " + f.get : f.set && (k += "set " + f.set);
a.traitsWriter && a.traitsWriter.redLn(k);
}
f.get ? za(f.object, f.get, d, !0) : f.set ? za(f.object, f.set, d, !1) : ha(f.object, f.name, d);
}
};
a.applyMethodTrait = function(b, d, g, f) {
var k = g.trait;
pa(k);
var e = k.isMethod(), r = k.isGetter(), c = e ? a.VM_OPEN_METHOD_PREFIX : r ? a.VM_OPEN_GET_METHOD_PREFIX : a.VM_OPEN_SET_METHOD_PREFIX, m = k.methodInfo.cachedMethodOrTrampoline, w;
m ? m.isTrampoline && (w = m.patchTargets) : (k.methodInfo.isNative() ? m = aa(k, g.scope, g.natives) : (w = [], m = a.makeTrampoline(k, g.scope, g.natives, w, e ? k.methodInfo.parameters.length : 0, String(k.name))), pa(m), k.methodInfo.cachedMethodOrTrampoline = m);
w && (w.push({object:d, name:c + b}), e ? w.push({object:d.asOpenMethods, name:b}) : (g = {object:d}, r ? g.get = b : g.set = b, w.push(g)));
ha(d, c + b, m);
e ? (d.asOpenMethods[b] = m, f ? (f = k.methodInfo.cachedMemoizer, f || (m = {value:m}, w && w.push({object:m, name:"value"}), f = a.makeMemoizer(b, m), k.methodInfo.cachedMemoizer = f), Ma(d, b, f), t(d, b)) : ha(d, b, m)) : (za(d, b, m, r), f && ha(d, c + b, m));
};
a.getNamespaceResolutionMap = s;
a.resolveMultinameProperty = v;
a.asGetPublicProperty = p;
a.asGetProperty = u;
a.asGetResolvedStringProperty = l;
a.asCallResolvedStringProperty = e;
a.asGetResolvedStringPropertyFallback = function(b) {
b = T.getNameFromPublicQualifiedName(b);
return this.asGetProperty([da.PUBLIC], b, 0);
};
a.asSetPublicProperty = m;
a.forwardValueOf = new Function("", "return this." + T.VALUE_OF + ".apply(this, arguments)//# sourceURL=forward-valueOf.as");
a.forwardToString = new Function("", "return this." + T.TO_STRING + ".apply(this, arguments)//# sourceURL=forward-toString.as");
a.asSetProperty = q;
a.asDefinePublicProperty = n;
a.asDefineProperty = k;
a.asGetPropertyDescriptor = f;
a.asCallPublicProperty = d;
a.asCallProperty = b;
a.asCallSuper = g;
a.asSetSuper = r;
a.asGetSuper = w;
a.construct = z;
a.asConstructProperty = A;
a.asHasProperty = B;
a.asHasOwnProperty = M;
a.asPropertyIsEnumerable = N;
a.asDeleteProperty = K;
a.asHasTraitProperty = y;
a.asGetNumericProperty = D;
a.asSetNumericProperty = L;
a.asGetDescendants = function(b, a, d) {
c.Debug.notImplemented("asGetDescendants");
};
a.asNextNameIndex = H;
a.asNextName = J;
a.asNextValue = C;
a.asHasNext2 = E;
a.asGetEnumerableKeys = F;
a.asTypeOf = function(b) {
if (b) {
if (b.constructor === String) {
return "string";
}
if (b.constructor === Number) {
return "number";
}
if (b.constructor === Boolean) {
return "boolean";
}
if (b instanceof c.AVM2.AS.ASXML || b instanceof c.AVM2.AS.ASXMLList) {
return "xml";
}
if (c.AVM2.AS.ASClass.isType(b)) {
return "object";
}
}
return typeof b;
};
a.publicizeProperties = function(b) {
for (var a = Object.keys(b), d = 0;d < a.length;d++) {
var g = a[d];
if (!T.isPublicQualifiedName(g)) {
var f = b[g];
b[T.getPublicQualifiedName(g)] = f;
delete b[g];
}
}
};
a.asGetSlot = function(b, a) {
return b[b.asSlots.byID[a].name];
};
a.asSetSlot = function(b, a, d) {
a = b.asSlots.byID[a];
if (!a.const) {
var g = a.type;
b[a.name] = g && g.coerce ? g.coerce(d) : d;
}
};
a.asCheckVectorSetNumericProperty = function(b, a, d) {
(0 > b || b > a || b === a && d || !c.isNumeric(b)) && G("RangeError", h.Errors.OutOfRangeError, b, a);
};
a.asCheckVectorGetNumericProperty = function(b, a) {
(0 > b || b >= a || !c.isNumeric(b)) && G("RangeError", h.Errors.OutOfRangeError, b, a);
};
a.checkNullParameter = I;
a.checkParameterType = function(b, a, d) {
I(b, a);
d.isType(b) || G("TypeError", h.Errors.CheckTypeFailedError, b, d.classInfo.instanceInfo.name.getOriginalName());
};
a.throwError = G;
a.translateError = function(b, a) {
if (a instanceof Error) {
var d = b.getClass(a.name);
if (d) {
return new d.instanceConstructor(c.AVM2.translateErrorMessage(a));
}
c.Debug.unexpected("Can't translate error: " + a);
}
return a;
};
a.asIsInstanceOf = function(b, a) {
return b.isInstanceOf(a);
};
a.asIsType = function(b, a) {
return b.isType(a);
};
a.asAsType = function(b, a) {
return b.isType(a) ? a : null;
};
a.escapeXMLAttribute = function(b) {
return h.AS.escapeAttributeValue(b);
};
a.escapeXMLElement = function(b) {
return h.AS.escapeElementValue(b);
};
a.asEquals = function(b, a) {
return Z(b) ? b.equals(a) : Z(a) ? a.equals(b) : b == a;
};
a.asCoerceByMultiname = function(b, a, d) {
pa(a.isQName());
switch(T.getQualifiedName(a)) {
case T.Int:
return d | 0;
case T.Uint:
return d >>> 0;
case T.String:
return S(d);
case T.Number:
return+d;
case T.Boolean:
return!!d;
case T.Object:
return O(d);
}
return Q(b.abc.applicationDomain.getType(a), d);
};
a.asCoerce = Q;
a.asCoerceString = S;
a.asCoerceInt = function(b) {
return b | 0;
};
a.asCoerceUint = function(b) {
return b >>> 0;
};
a.asCoerceNumber = function(b) {
return+b;
};
a.asCoerceBoolean = function(b) {
return!!b;
};
a.asCoerceObject = O;
a.asDefaultCompareFunction = P;
a.asCompare = function(b, a, d, g) {
c.Debug.assertNotImplemented(!(d & 4), "UNIQUESORT");
c.Debug.assertNotImplemented(!(d & 8), "RETURNINDEXEDARRAY");
var f = 0;
g || (g = P);
d & 1 && (b = String(b).toLowerCase(), a = String(a).toLowerCase());
d & 16 ? (b = c.toNumber(b), a = c.toNumber(a), f = b < a ? -1 : b > a ? 1 : 0) : f = g(b, a);
d & 2 && (f *= -1);
return f;
};
a.asAdd = function(b, a) {
return "string" === typeof b || "string" === typeof a ? String(b) + String(a) : V(b) && V(a) ? c.AVM2.AS.ASXMLList.addXML(b, a) : b + a;
};
a.getDescendants = function(b, a) {
if (!V(b)) {
throw "Not XML object in getDescendants";
}
return b.descendants(a);
};
a.checkFilter = function(b) {
if (!b.class || !V(b)) {
throw "TypeError operand of childFilter not of XML type";
}
return b;
};
a.initializeGlobalObject = $;
$(jsGlobal);
a.nameInTraits = function(b, d) {
if (b.hasOwnProperty(a.VM_BINDINGS) && b.hasOwnProperty(d)) {
return!0;
}
var g = Object.getPrototypeOf(b);
return g.hasOwnProperty(a.VM_BINDINGS) && g.hasOwnProperty(d);
};
a.CatchScopeObject = W;
var ta = function() {
function b(d) {
this.scriptInfo = d;
d.global = this;
this.scriptBindings = new a.ScriptBindings(d, new a.Scope(null, this, !1));
this.scriptBindings.applyTo(d.abc.applicationDomain, this);
d.loaded = !0;
}
b.prototype.toString = function() {
return "[object global]";
};
b.prototype.isExecuted = function() {
return this.scriptInfo.executed;
};
b.prototype.isExecuting = function() {
return this.scriptInfo.executing;
};
b.prototype.ensureExecuted = function() {
c.AVM2.Runtime.ensureScriptIsExecuted(this.scriptInfo);
};
return b;
}();
a.Global = ta;
ha(ta.prototype, T.getPublicQualifiedName("toString"), function() {
return this.toString();
});
ta = function() {
function b(a) {
this._isLazyInitializer = !0;
pa(!a.asLazyInitializer);
this._target = a;
this._resolved = null;
}
b.create = function(a) {
return a.asLazyInitializer ? a.asLazyInitializer : a.asLazyInitializer = new b(a);
};
b.prototype.resolve = function() {
if (this._resolved) {
return this._resolved;
}
if (this._target instanceof ca) {
var b = this._target;
a.ensureScriptIsExecuted(b, "Lazy Initializer");
return this._resolved = b.global;
}
if (this._target instanceof fa) {
return b = this._target, b.classObject ? this._resolved = b.classObject : this._resolved = b.abc.applicationDomain.getProperty(b.instanceInfo.name, !1, !1);
}
c.Debug.notImplemented(String(this._target));
};
return b;
}();
a.LazyInitializer = ta;
a.forEachPublicProperty = function(b, a, d) {
if (!b.asBindings) {
for (var g in b) {
a.call(d, g, b[g]);
}
} else {
for (g in b) {
if (c.isNumeric(g)) {
a.call(d, g, b[g]);
} else {
if (T.isPublicQualifiedName(g) && 0 > b.asBindings.indexOf(g)) {
var f = T.stripPublicQualifier(g);
a.call(d, f, b[g]);
}
}
}
}
};
a.wrapJSObject = function(b) {
var a = Object.create(b), d;
for (d in b) {
Object.defineProperty(a, T.getPublicQualifiedName(d), function(b, a) {
return{get:function() {
return b[a];
}, set:function(d) {
b[a] = d;
}, enumerable:!0};
}(b, d));
}
return a;
};
a.asCreateActivation = function(b) {
return Object.create(b.activationPrototype);
};
ta = function() {
function b() {
}
b.updateTraits = function(a) {
for (var d = 0;d < a.length;d++) {
var g = a[d], f = g.name.name, g = g.name.getNamespace();
g.isDynamic() || (b.hasNonDynamicNamespaces[f] = !0, b.wasResolved[f] && c.Debug.notImplemented("We have to the undo the optimization, " + f + " can now bind to " + g));
}
};
b.loadAbc = function(d) {
if (a.globalMultinameAnalysis.value) {
var g = d.scripts, f = d.classes;
d = d.methods;
for (var k = 0;k < g.length;k++) {
b.updateTraits(g[k].traits);
}
for (k = 0;k < f.length;k++) {
b.updateTraits(f[k].traits), b.updateTraits(f[k].instanceInfo.traits);
}
for (k = 0;k < d.length;k++) {
d[k].traits && b.updateTraits(d[k].traits);
}
}
};
b.resolveMultiname = function(a) {
var d = a.name;
if (!b.hasNonDynamicNamespaces[d]) {
return b.wasResolved[d] = !0, new T([da.PUBLIC], a.name, 0);
}
};
b.hasNonDynamicNamespaces = Object.create(null);
b.wasResolved = Object.create(null);
return b;
}();
a.GlobalMultinameResolver = ta;
var Da = function() {
return function(b) {
this.methodInfo = b;
};
}();
a.ActivationInfo = Da;
a.HasNext2Info = function() {
return function(b, a) {
this.object = b;
this.index = a;
};
}();
a.sliceArguments = x;
a.canCompile = ea;
a.shouldCompile = Y;
a.forceCompile = R;
a.CODE_CACHE = Object.create(null);
a.searchCodeCache = U;
a.createInterpretedFunction = ba;
a.debugName = function(b) {
return c.isFunction(b) ? b.debugName : b;
};
a.createCompiledFunction = X;
a.createFunction = ga;
a.ensureFunctionIsInitialized = ja;
a.getTraitFunction = aa;
a.createClass = function(b, d, g) {
var f = b.instanceInfo, k = b.abc.applicationDomain, e = T.getName(f.name);
h.enterTimeline("createClass", {className:e, classInfo:b});
a.traceExecution.value && console.log("Creating " + (f.isInterface() ? "Interface" : "Class") + ": " + e + (b.native ? " replaced with native " + b.native.cls : ""));
d = f.isInterface() ? c.AVM2.AS.createInterface(b) : c.AVM2.AS.createClass(b, d, g);
a.traceClasses.value && (k.loadedClasses.push(d), k.traceLoadedClasses());
if (f.isInterface()) {
return h.leaveTimeline(), d;
}
k.onMessage.notify1("classCreated", d);
b.classObject = d;
a.traceExecution.value && console.log("Running " + (f.isInterface() ? "Interface" : "Class") + ": " + e + " Static Constructor");
h.enterTimeline("staticInitializer");
ga(b.init, g, !1, !1, !0).call(d);
h.leaveTimeline();
a.traceExecution.value && console.log("Done With Static Constructor");
a.sealConstTraits && this.sealConstantTraits(d, b.traits);
h.leaveTimeline();
return d;
};
a.sealConstantTraits = function(b, a) {
for (var d = 0, g = a.length;d < g;d++) {
var f = a[d];
f.isConst() && (f = T.getQualifiedName(f.name), function(a, d) {
Object.defineProperty(b, a, {configurable:!1, enumerable:!1, get:function() {
return d;
}, set:function() {
G("ReferenceError", h.Errors.ConstWriteError, a);
}});
}(f, b[f]));
}
};
a.applyType = function(b, a, d) {
a = a.classInfo.instanceInfo.name.name;
if ("Vector" === a) {
pa(1 === d.length);
d = d[0];
if (!qa(d)) {
switch(a = d.classInfo.instanceInfo.name.name.toLowerCase(), a) {
case "number":
a = "double";
case "int":
;
case "uint":
;
case "double":
return b.abc.applicationDomain.getClass("packageInternal __AS3__.vec.Vector$" + a);
}
}
return b.abc.applicationDomain.getClass("packageInternal __AS3__.vec.Vector$object").applyType(d);
}
c.Debug.notImplemented(a);
};
a.createName = function(b, a, d) {
void 0 === a && (a = "*");
return new T(b, a, d);
};
})(h.Runtime || (h.Runtime = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
throwError = Shumway.AVM2.Runtime.throwError;
var CC = Shumway.AVM2.Runtime.CODE_CACHE, HasNext2Info = Shumway.AVM2.Runtime.HasNext2Info, asCreateActivation = Shumway.AVM2.Runtime.asCreateActivation, asIsInstanceOf = Shumway.AVM2.Runtime.asIsInstanceOf, asIsType = Shumway.AVM2.Runtime.asIsType, asAsType = Shumway.AVM2.Runtime.asAsType, asEquals = Shumway.AVM2.Runtime.asEquals, asTypeOf = Shumway.AVM2.Runtime.asTypeOf, asCoerceByMultiname = Shumway.AVM2.Runtime.asCoerceByMultiname, asCoerce = Shumway.AVM2.Runtime.asCoerce, asCoerceString = Shumway.AVM2.Runtime.asCoerceString,
asCoerceInt = Shumway.AVM2.Runtime.asCoerceInt, asCoerceUint = Shumway.AVM2.Runtime.asCoerceUint, asCoerceNumber = Shumway.AVM2.Runtime.asCoerceNumber, asCoerceBoolean = Shumway.AVM2.Runtime.asCoerceBoolean, asCoerceObject = Shumway.AVM2.Runtime.asCoerceObject, asCompare = Shumway.AVM2.Runtime.asCompare, asAdd = Shumway.AVM2.Runtime.asAdd, applyType = Shumway.AVM2.Runtime.applyType, escapeXMLAttribute = Shumway.AVM2.Runtime.escapeXMLAttribute, escapeXMLElement = Shumway.AVM2.Runtime.escapeXMLElement,
asGetSlot = Shumway.AVM2.Runtime.asGetSlot, asSetSlot = Shumway.AVM2.Runtime.asSetSlot, asHasNext2 = Shumway.AVM2.Runtime.asHasNext2, getDescendants = Shumway.AVM2.Runtime.getDescendants, checkFilter = Shumway.AVM2.Runtime.checkFilter, sliceArguments = Shumway.AVM2.Runtime.sliceArguments, createFunction = Shumway.AVM2.Runtime.createFunction, createName = Shumway.AVM2.Runtime.createName;
(function(c) {
(function(h) {
(function(a) {
var s = c.AVM2.ABC.Multiname, v = c.Debug.assert, p = c.ObjectUtilities.boxValue, u = function() {
function a(e, m, l) {
void 0 === l && (l = !1);
this.parent = e;
this.object = p(m);
v(c.isObject(this.object));
this.global = e ? e.global : this;
this.isWith = l;
this.cache = Object.create(null);
}
a.prototype.findDepth = function(a) {
for (var c = this, l = 0;c;) {
if (c.object === a) {
return l;
}
l++;
c = c.parent;
}
return-1;
};
a.prototype.getScopeObjects = function() {
for (var a = [], c = this;c;) {
a.unshift(c.object), c = c.parent;
}
return a;
};
a.prototype.findScopeProperty = function(a, m, l, q, n, k) {
h.countTimeline("findScopeProperty");
var f, d;
d = a ? 1 < a.length ? a.runtimeId + "$" + m : a[0].qualifiedName + "$" + m : m;
if (!k && (f = this.cache[d])) {
return f;
}
if (this.object.asHasPropertyInternal(a, m, l)) {
return this.isWith ? this.object : this.cache[d] = this.object;
}
if (this.parent) {
return this.cache[d] = this.parent.findScopeProperty(a, m, l, q, n, k);
}
if (k) {
return null;
}
if (f = q.abc.applicationDomain.findDomainProperty(new s(a, m, l), n, !0)) {
return f;
}
n && c.Debug.unexpected("Cannot find property " + m);
return this.global.object;
};
return a;
}();
a.Scope = u;
a.bindFreeMethodScope = function(a, e) {
var c = a.freeMethod;
if (a.lastBoundMethod && a.lastBoundMethod.scope === e) {
return a.lastBoundMethod.boundMethod;
}
v(c, "There should already be a cached method.");
var t, q = e.global.object;
if (!a.hasOptional() && !a.needsArguments() && !a.needsRest()) {
switch(a.parameters.length) {
case 0:
t = function() {
return c.call(this === jsGlobal ? q : this, e);
};
break;
case 1:
t = function(a) {
return c.call(this === jsGlobal ? q : this, e, a);
};
break;
case 2:
t = function(a, k) {
return c.call(this === jsGlobal ? q : this, e, a, k);
};
break;
case 3:
t = function(a, k, f) {
return c.call(this === jsGlobal ? q : this, e, a, k, f);
};
}
}
t || (h.countTimeline("Bind Scope - Slow Path"), t = function() {
Array.prototype.unshift.call(arguments, e);
return c.asApply(this === jsGlobal ? e.global.object : this, arguments);
});
t.methodInfo = a;
t.instanceConstructor = t;
a.lastBoundMethod = {scope:e, boundMethod:t};
return t;
};
})(h.Runtime || (h.Runtime = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
var Scope = Shumway.AVM2.Runtime.Scope;
(function(c) {
(function(h) {
(function(a) {
var s = c.AVM2.ABC.Multiname, h = c.AVM2.ABC.Trait, p = c.ObjectUtilities.hasOwnProperty, u = c.ObjectUtilities.createMap, l = c.ObjectUtilities.cloneObject, e = c.ObjectUtilities.copyProperties, m = c.Debug.assert, t = c.ObjectUtilities.defineNonEnumerableProperty, q = c.ObjectUtilities.defineNonEnumerableGetter, n = c.FunctionUtilities.makeForwardingGetter, k = c.ArrayUtilities.pushUnique, f = function() {
function b(a) {
this.trait = a;
}
b.getKey = function(a, d) {
var g = a;
d.isGetter() ? g = b.GET_PREFIX + a : d.isSetter() && (g = b.SET_PREFIX + a);
return g;
};
b.prototype.toString = function() {
return String(this.trait);
};
b.SET_PREFIX = "set ";
b.GET_PREFIX = "get ";
b.KEY_PREFIX_LENGTH = 4;
return b;
}();
a.Binding = f;
var d = function() {
return function(b, a, d, g) {
this.name = b;
this.isConst = a;
this.type = d;
this.trait = g;
};
}();
a.SlotInfo = d;
var b = function() {
return function() {
this.byID = u();
this.byQN = u();
};
}();
a.SlotInfoMap = b;
var g = function() {
function g() {
this.map = u();
this.slots = [];
this.nextSlotId = 1;
}
g.prototype.assignNextSlot = function(b) {
m(b instanceof h);
m(b.isSlot() || b.isConst() || b.isClass());
b.slotId ? this.nextSlotId = b.slotId + 1 : b.slotId = this.nextSlotId++;
m(!this.slots[b.slotId], "Trait slot already taken.");
this.slots[b.slotId] = b;
};
g.prototype.trace = function(b) {
b.enter("Bindings");
for (var a in this.map) {
var d = this.map[a];
b.writeLn(d.trait.kindName() + ": " + a + " -> " + d);
}
b.leaveAndEnter();
b.writeArray(this.slots);
b.outdent();
};
g.prototype.applyTo = function(g, e, r) {
void 0 === r && (r = !1);
r || (m(!p(e, a.VM_SLOTS), "Already has VM_SLOTS."), m(!p(e, a.VM_BINDINGS), "Already has VM_BINDINGS."), m(!p(e, a.VM_OPEN_METHODS), "Already has VM_OPEN_METHODS."), t(e, a.VM_SLOTS, new b), t(e, a.VM_BINDINGS, []), t(e, a.VM_OPEN_METHODS, u()), t(e, "bindings", this), t(e, "resolutionMap", []));
z && z.greenLn("Applying Traits" + (r ? " (Append)" : ""));
for (var c in this.map) {
var l = this.map[c];
r = l.trait;
var A = s.getQualifiedName(r.name);
if (r.isSlot() || r.isConst() || r.isClass()) {
l = void 0;
if (r.isSlot() || r.isConst()) {
if (r.hasDefaultValue) {
l = r.value;
} else {
if (r.typeName) {
var h = g.findClassInfo(r.typeName);
h && (l = h.defaultValue);
}
}
}
c !== A ? (z && z.yellowLn("Binding Trait: " + c + " -> " + A), q(e, c, n(A)), k(e.asBindings, c)) : (z && z.greenLn("Applying Trait " + r.kindName() + ": " + r), t(e, A, l), k(e.asBindings, A), l = new d(A, r.isConst(), r.typeName ? g.getProperty(r.typeName, !1, !1) : null, r), e.asSlots.byID[r.slotId] = l, e.asSlots.byQN[A] = l);
} else {
if (r.isMethod() || r.isGetter() || r.isSetter()) {
if (r.isGetter() || r.isSetter()) {
c = c.substring(f.KEY_PREFIX_LENGTH);
}
c !== A ? z && z.yellowLn("Binding Trait: " + c + " -> " + A) : z && z.greenLn("Applying Trait " + r.kindName() + ": " + r);
k(e.asBindings, c);
a.applyMethodTrait(c, e, l, !(this instanceof w));
}
}
}
};
return g;
}();
a.Bindings = g;
var r = function(b) {
function a(d) {
b.call(this);
m(d.needsActivation());
this.methodInfo = d;
d = d.traits;
for (var g = 0;g < d.length;g++) {
var k = d[g];
m(k.isSlot() || k.isConst(), "Only slot or constant traits are allowed in activation objects.");
var e = s.getQualifiedName(k.name);
this.map[e] = new f(k);
this.assignNextSlot(k);
}
}
__extends(a, b);
return a;
}(g);
a.ActivationBindings = r;
r = function(b) {
function a(d, g) {
b.call(this);
var k = s.getQualifiedName(g.name);
this.map[k] = new f(g);
m(g.isSlot(), "Only slot traits are allowed in catch objects.");
this.assignNextSlot(g);
}
__extends(a, b);
return a;
}(g);
a.CatchBindings = r;
var w = function(b) {
function a(d, g) {
b.call(this);
this.scope = g;
this.scriptInfo = d;
for (var k = d.traits, e = 0;e < k.length;e++) {
var r = k[e], c = s.getQualifiedName(r.name), c = f.getKey(c, r), c = this.map[c] = new f(r);
(r.isSlot() || r.isConst() || r.isClass()) && this.assignNextSlot(r);
r.isClass() && r.metadata && r.metadata.native && (r.classInfo.native = r.metadata.native);
if (r.isMethod() || r.isGetter() || r.isSetter()) {
c.scope = this.scope;
}
}
}
__extends(a, b);
return a;
}(g);
a.ScriptBindings = w;
r = function(b) {
function a(d, g, k) {
b.call(this);
this.scope = g;
this.natives = k;
this.classInfo = d;
d = d.traits;
for (g = 0;g < d.length;g++) {
k = d[g];
var e = s.getQualifiedName(k.name), e = f.getKey(e, k), e = this.map[e] = new f(k);
(k.isSlot() || k.isConst()) && this.assignNextSlot(k);
if (k.isMethod() || k.isGetter() || k.isSetter()) {
e.scope = this.scope, e.natives = this.natives;
}
}
}
__extends(a, b);
return a;
}(g);
a.ClassBindings = r;
g = function(b) {
function a(d, g, f, k) {
b.call(this);
this.scope = f;
this.natives = k;
this.parent = d;
this.instanceInfo = g;
this.implementedInterfaces = d ? l(d.implementedInterfaces) : Object.create(null);
d && (this.slots = d.slots.slice(), this.nextSlotId = d.nextSlotId);
this.extend(d);
}
__extends(a, b);
a.prototype.extend = function(b) {
var a = this.instanceInfo, d, g = this.map, k, r, c, w;
if (b) {
for (r in b.map) {
k = b.map[r], c = k.trait, g[r] = k, c.isProtected() && (w = s.getQualifiedName(new s([a.protectedNs], c.name.getName(), 0)), w = f.getKey(w, c), g[w] = k);
}
}
var q = a.traits;
for (b = 0;b < q.length;b++) {
c = q[b];
k = s.getQualifiedName(c.name);
r = f.getKey(k, c);
k = new f(c);
d = g;
w = k;
var n = w.trait, l = d[r];
l ? (m(!l.trait.isFinal(), "Cannot redefine a final trait: " + n), m(n.isOverride() || "length" === n.name.getName(), "Overriding a trait that is not marked for override: " + n)) : m(!n.isOverride(), "Trait marked override must override another trait: " + n);
d[r] = w;
if (c.isProtected()) {
for (d = this.parent;d && d.instanceInfo.protectedNs;) {
w = s.getQualifiedName(new s([d.instanceInfo.protectedNs], c.name.getName(), 0)), w = f.getKey(w, c), w in g && (g[w] = k), d = d.parent;
}
}
(c.isSlot() || c.isConst()) && this.assignNextSlot(c);
if (c.isMethod() || c.isGetter() || c.isSetter()) {
k.scope = this.scope, k.natives = this.natives;
}
}
c = a.abc.applicationDomain;
k = a.interfaces;
for (b = 0;b < k.length;b++) {
q = c.getProperty(k[b], !0, !0), m(q), e(this.implementedInterfaces, q.interfaceBindings.implementedInterfaces), this.implementedInterfaces[s.getQualifiedName(q.classInfo.instanceInfo.name)] = q;
}
for (var t in this.implementedInterfaces) {
q = this.implementedInterfaces[t];
d = q.interfaceBindings;
for (var z in d.map) {
b = d.map[z], a.isInterface() ? g[z] = b : (k = s.getPublicQualifiedName(b.trait.name.getName()), r = f.getKey(k, b.trait), g[z] = g[r]);
}
}
};
a.prototype.toString = function() {
return this.instanceInfo.toString();
};
return a;
}(g);
a.InstanceBindings = g;
var z = null;
})(h.Runtime || (h.Runtime = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
var Binding = Shumway.AVM2.Runtime.Binding, Bindings = Shumway.AVM2.Runtime.Bindings, ActivationBindings = Shumway.AVM2.Runtime.ActivationBindings, CatchBindings = Shumway.AVM2.Runtime.CatchBindings, ScriptBindings = Shumway.AVM2.Runtime.ScriptBindings, ClassBindings = Shumway.AVM2.Runtime.ClassBindings, InstanceBindings = Shumway.AVM2.Runtime.InstanceBindings;
(function(c) {
(function(c) {
c.XRegExp = function() {
function a(b, a, d) {
var g;
if (d) {
if (b.__proto__) {
b.__proto__ = k.prototype;
} else {
for (g in k.prototype) {
b[g] = k.prototype[g];
}
}
}
b.xregexp = {captureNames:a};
return b;
}
function c(b) {
return d.replace.call(b, /([\s\S])(?=[\s\S]*\1)/g, "");
}
function h(b, g) {
if (!k.isRegExp(b)) {
throw new TypeError("Type RegExp expected");
}
var f = d.exec.call(/\/([a-z]*)$/i, String(b))[1];
g = g || {};
g.add && (f = c(f + g.add));
g.remove && (f = d.replace.call(f, new RegExp("[" + g.remove + "]+", "g"), ""));
return b = a(new RegExp(b.source, f), b.xregexp && b.xregexp.captureNames ? b.xregexp.captureNames.slice(0) : null, g.addProto);
}
function p(b, a) {
if (Array.prototype.indexOf) {
return b.indexOf(a);
}
var d = b.length, g;
for (g = 0;g < d;++g) {
if (b[g] === a) {
return g;
}
}
return-1;
}
function u(b, a) {
return K.call(b) === "[object " + a + "]";
}
function l(b, a, g) {
return d.test.call(-1 < g.indexOf("x") ? /^(?:\s+|#.*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/ : /^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/, b.slice(a));
}
function e(b, a) {
var g;
if (c(a) !== a) {
throw new SyntaxError("Invalid duplicate regex flag " + a);
}
b = d.replace.call(b, /^\(\?([\w$]+)\)/, function(b, g) {
if (d.test.call(/[gy]/, g)) {
throw new SyntaxError("Cannot use flag g or y in mode modifier " + b);
}
a = c(a + g);
return "";
});
for (g = 0;g < a.length;++g) {
if (!N[a.charAt(g)]) {
throw new SyntaxError("Unknown regex flag " + a.charAt(g));
}
}
return{pattern:b, flags:a};
}
function m(b) {
b = b || {};
u(b, "String") && (b = k.forEach(b, /[^\s,]+/, function(b) {
this[b] = !0;
}, {}));
return b;
}
function t(b) {
if (!/^[\w$]$/.test(b)) {
throw Error("Flag must be a single character A-Za-z0-9_$");
}
N[b] = !0;
}
function q(a) {
RegExp.prototype.exec = (a ? b : d).exec;
RegExp.prototype.test = (a ? b : d).test;
String.prototype.match = (a ? b : d).match;
String.prototype.replace = (a ? b : d).replace;
String.prototype.split = (a ? b : d).split;
f.natives = a;
}
function n(b) {
if (null == b) {
throw new TypeError("Cannot convert null or undefined to object");
}
return b;
}
var k, f = {astral:!1, natives:!1}, d = {exec:RegExp.prototype.exec, test:RegExp.prototype.test, match:String.prototype.match, replace:String.prototype.replace, split:String.prototype.split}, b = {}, g = {}, r = {}, w = [], z = {"default":/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/, "class":/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|[\s\S]/}, A = /\$(?:{([\w$]+)}|([\d$&`']))/g,
B = void 0 === d.exec.call(/()??/, "")[1], M = void 0 !== RegExp.prototype.sticky, N = {g:!0, i:!0, m:!0, y:M}, K = {}.toString, y;
k = function(b, g) {
var f = {hasNamedCapture:!1, captureNames:[]}, c = "default", m = "", q = 0, n, l;
if (k.isRegExp(b)) {
if (void 0 !== g) {
throw new TypeError("Cannot supply flags when copying a RegExp");
}
return h(b, {addProto:!0});
}
b = void 0 === b ? "" : String(b);
g = void 0 === g ? "" : String(g);
l = b + "***" + g;
if (!r[l]) {
n = e(b, g);
b = n.pattern;
for (g = n.flags;q < b.length;) {
do {
n = b;
for (var t = g, s = q, A = c, p = f, B = w.length, u = null, y = void 0, M = void 0;B--;) {
if (M = w[B], (M.scope === A || "all" === M.scope) && (!M.flag || -1 < t.indexOf(M.flag)) && (y = k.exec(n, M.regex, s, "sticky"))) {
u = {matchLength:y[0].length, output:M.handler.call(p, y, A, t), reparse:M.reparse};
break;
}
}
(n = u) && n.reparse && (b = b.slice(0, q) + n.output + b.slice(q + n.matchLength));
} while (n && n.reparse);
n ? (m += n.output, q += n.matchLength || 1) : (n = k.exec(b, z[c], q, "sticky")[0], m += n, q += n.length, "[" === n && "default" === c ? c = "class" : "]" === n && "class" === c && (c = "default"));
}
r[l] = {pattern:d.replace.call(m, /\(\?:\)(?=\(\?:\))|^\(\?:\)|\(\?:\)$/g, ""), flags:d.replace.call(g, /[^gimy]+/g, ""), captures:f.hasNamedCapture ? f.captureNames : null};
}
l = r[l];
return a(new RegExp(l.pattern, l.flags), l.captures, !0);
};
k.prototype = RegExp();
k.version = "3.0.0-pre";
k.addToken = function(b, a, g) {
g = g || {};
var f = g.optionalFlags, e;
g.flag && t(g.flag);
if (f) {
for (f = d.split.call(f, ""), e = 0;e < f.length;++e) {
t(f[e]);
}
}
w.push({regex:h(b, {add:"g" + (M ? "y" : "")}), handler:a, scope:g.scope || "default", flag:g.flag, reparse:g.reparse});
k.cache.flush("patterns");
};
k.cache = function(b, a) {
var d = b + "***" + (a || "");
return g[d] || (g[d] = k(b, a));
};
k.cache.flush = function(b) {
"patterns" === b ? r = {} : g = {};
};
k.escape = function(b) {
return d.replace.call(n(b), /[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
};
k.exec = function(a, d, g, f) {
var k = "g";
M && (f || d.sticky && !1 !== f) && (k += "y");
d.xregexp = d.xregexp || {captureNames:null};
k = d.xregexp[k] || (d.xregexp[k] = h(d, {add:k, remove:!1 === f ? "y" : ""}));
k.lastIndex = g = g || 0;
a = b.exec.call(k, a);
f && a && a.index !== g && (a = null);
d.global && (d.lastIndex = a ? k.lastIndex : 0);
return a;
};
k.forEach = function(b, a, d, g) {
for (var f = 0, e = -1;f = k.exec(b, a, f);) {
d.call(g, f, ++e, b, a), f = f.index + (f[0].length || 1);
}
return g;
};
k.globalize = function(b) {
return h(b, {add:"g", addProto:!0});
};
k.install = function() {
var b = {natives:!0}, b = m(b);
!f.astral && b.astral && (k.cache.flush("patterns"), f.astral = !0);
!f.natives && b.natives && q(!0);
};
k.isInstalled = function(b) {
return!!f[b];
};
k.isRegExp = function(b) {
return "[object RegExp]" === K.call(b);
};
k.match = function(b, a, g) {
var f = a.global && "one" !== g || "all" === g, k = (f ? "g" : "") + (a.sticky ? "y" : "");
a.xregexp = a.xregexp || {captureNames:null};
k = a.xregexp[k || "noGY"] || (a.xregexp[k || "noGY"] = h(a, {add:k, remove:"one" === g ? "g" : ""}));
b = d.match.call(n(b), k);
a.global && (a.lastIndex = "one" === g && b ? b.index + b[0].length : 0);
return f ? b || [] : b && b[0];
};
k.matchChain = function(b, a) {
return function J(b, d) {
function g(b) {
if (f.backref) {
if (!(b.hasOwnProperty(f.backref) || +f.backref < b.length)) {
throw new ReferenceError("Backreference to undefined group: " + f.backref);
}
e.push(b[f.backref] || "");
} else {
e.push(b[0]);
}
}
var f = a[d].regex ? a[d] : {regex:a[d]}, e = [], r;
for (r = 0;r < b.length;++r) {
k.forEach(b[r], f.regex, g);
}
return d !== a.length - 1 && e.length ? J(e, d + 1) : e;
}([b], 0);
};
k.replace = function(a, d, g, f) {
var e = k.isRegExp(d), r = d.global && "one" !== f || "all" === f, c = (r ? "g" : "") + (d.sticky ? "y" : ""), m = d;
e ? (d.xregexp = d.xregexp || {captureNames:null}, m = d.xregexp[c || "noGY"] || (d.xregexp[c || "noGY"] = h(d, {add:c, remove:"one" === f ? "g" : ""}))) : r && (m = new RegExp(k.escape(String(d)), "g"));
a = b.replace.call(n(a), m, g);
e && d.global && (d.lastIndex = 0);
return a;
};
k.replaceEach = function(b, a) {
var d, g;
for (d = 0;d < a.length;++d) {
g = a[d], b = k.replace(b, g[0], g[1], g[2]);
}
return b;
};
k.split = function(a, d, g) {
return b.split.call(n(a), d, g);
};
k.test = function(b, a, d, g) {
return!!k.exec(b, a, d, g);
};
k.uninstall = function(b) {
b = m(b);
f.astral && b.astral && (k.cache.flush("patterns"), f.astral = !1);
f.natives && b.natives && q(!1);
};
k.union = function(b, a) {
function g(b, a, d) {
var f = m[r - c];
if (a) {
if (++r, f) {
return "(?<" + f + ">";
}
} else {
if (d) {
return "\\" + (+d + c);
}
}
return b;
}
var f = /(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g, e = [], r = 0, c, m, w, q;
if (!u(b, "Array") || !b.length) {
throw new TypeError("Must provide a nonempty array of patterns to merge");
}
for (q = 0;q < b.length;++q) {
w = b[q], k.isRegExp(w) ? (c = r, m = w.xregexp && w.xregexp.captureNames || [], e.push(d.replace.call(k(w.source).source, f, g))) : e.push(k.escape(w));
}
return k(e.join("|"), a);
};
b.exec = function(b) {
var a = this.lastIndex, g = d.exec.apply(this, arguments), f, k;
if (g) {
!B && 1 < g.length && -1 < p(g, "") && (f = h(this, {remove:"g"}), d.replace.call(String(b).slice(g.index), f, function() {
var b = arguments.length, a;
for (a = 1;a < b - 2;++a) {
void 0 === arguments[a] && (g[a] = void 0);
}
}));
if (this.xregexp && this.xregexp.captureNames) {
for (k = 1;k < g.length;++k) {
(f = this.xregexp.captureNames[k - 1]) && (g[f] = g[k]);
}
}
this.global && !g[0].length && this.lastIndex > g.index && (this.lastIndex = g.index);
}
this.global || (this.lastIndex = a);
return g;
};
b.test = function(a) {
return!!b.exec.call(this, a);
};
b.match = function(a) {
var g;
if (!k.isRegExp(a)) {
a = new RegExp(a);
} else {
if (a.global) {
return g = d.match.apply(this, arguments), a.lastIndex = 0, g;
}
}
return b.exec.call(a, n(this));
};
b.replace = function(b, a) {
var g = k.isRegExp(b), f, e, r;
g ? (b.xregexp && (e = b.xregexp.captureNames), f = b.lastIndex) : b += "";
r = u(a, "Function") ? d.replace.call(String(this), b, function() {
var d = arguments, f;
if (e) {
for (d[0] = new String(d[0]), f = 0;f < e.length;++f) {
e[f] && (d[0][e[f]] = d[f + 1]);
}
}
g && b.global && (b.lastIndex = d[d.length - 2] + d[0].length);
return a.apply(void 0, d);
}) : d.replace.call(null == this ? this : String(this), b, function() {
var b = arguments;
return d.replace.call(String(a), A, function(a, d, g) {
if (d) {
g = +d;
if (g <= b.length - 3) {
return b[g] || "";
}
g = e ? p(e, d) : -1;
if (0 > g) {
throw new SyntaxError("Backreference to undefined group " + a);
}
return b[g + 1] || "";
}
if ("$" === g) {
return "$";
}
if ("&" === g || 0 === +g) {
return b[0];
}
if ("`" === g) {
return b[b.length - 1].slice(0, b[b.length - 2]);
}
if ("'" === g) {
return b[b.length - 1].slice(b[b.length - 2] + b[0].length);
}
g = +g;
if (!isNaN(g)) {
if (g > b.length - 3) {
throw new SyntaxError("Backreference to undefined group " + a);
}
return b[g] || "";
}
throw new SyntaxError("Invalid token " + a);
});
});
g && (b.lastIndex = b.global ? 0 : f);
return r;
};
b.split = function(b, a) {
if (!k.isRegExp(b)) {
return d.split.apply(this, arguments);
}
var g = String(this), f = [], e = b.lastIndex, r = 0, c;
a = (void 0 === a ? -1 : a) >>> 0;
k.forEach(g, b, function(b) {
b.index + b[0].length > r && (f.push(g.slice(r, b.index)), 1 < b.length && b.index < g.length && Array.prototype.push.apply(f, b.slice(1)), c = b[0].length, r = b.index + c);
});
r === g.length ? d.test.call(b, "") && !c || f.push("") : f.push(g.slice(r));
b.lastIndex = e;
return f.length > a ? f.slice(0, a) : f;
};
y = k.addToken;
y(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/, function(b, a) {
if ("B" === b[1] && "default" === a) {
return b[0];
}
throw new SyntaxError("Invalid escape " + b[0]);
}, {scope:"all"});
y(/\[(\^?)]/, function(b) {
return b[1] ? "[\\s\\S]" : "\\b\\B";
});
y(/\(\?#[^)]*\)/, function(b, a, d) {
return l(b.input, b.index + b[0].length, d) ? "" : "(?:)";
});
y(/\s+|#.*/, function(b, a, d) {
return l(b.input, b.index + b[0].length, d) ? "" : "(?:)";
}, {flag:"x"});
y(/\./, function() {
return "[\\s\\S]";
}, {flag:"s"});
y(/\\k<([\w$]+)>/, function(b) {
var a = isNaN(b[1]) ? p(this.captureNames, b[1]) + 1 : +b[1], d = b.index + b[0].length;
if (!a || a > this.captureNames.length) {
throw new SyntaxError("Backreference to undefined group " + b[0]);
}
return "\\" + a + (d === b.input.length || isNaN(b.input.charAt(d)) ? "" : "(?:)");
});
y(/\\(\d+)/, function(b, a) {
if (!("default" === a && /^[1-9]/.test(b[1]) && +b[1] <= this.captureNames.length) && "0" !== b[1]) {
throw new SyntaxError("Cannot use octal escape or backreference to undefined group " + b[0]);
}
return b[0];
}, {scope:"all"});
y(/\(\?P?<([\w$]+)>/, function(b) {
if (!isNaN(b[1])) {
throw new SyntaxError("Cannot use integer as capture name " + b[0]);
}
if ("length" === b[1] || "__proto__" === b[1]) {
throw new SyntaxError("Cannot use reserved word as capture name " + b[0]);
}
if (-1 < p(this.captureNames, b[1])) {
throw new SyntaxError("Cannot use same name for multiple groups " + b[0]);
}
this.captureNames.push(b[1]);
this.hasNamedCapture = !0;
return "(";
});
y(/\((?!\?)/, function(b, a, d) {
if (-1 < d.indexOf("n")) {
return "(?:";
}
this.captureNames.push(null);
return "(";
}, {optionalFlags:"n"});
return k;
}();
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
Shumway.AVM2.XRegExp.install();
(function(c) {
(function(h) {
(function(a) {
function s(b, a) {
g(!da[b], "Native function: " + b + " is already registered.");
da[b] = a;
}
function v(b) {
switch(b) {
case "prototype":
return "native_prototype";
case "hasOwnProperty":
return "native_hasOwnProperty";
case "isPrototypeOf":
return "native_isPrototypeOf";
case "propertyIsEnumerable":
return "native_propertyIsEnumerable";
default:
return b;
}
}
function p(b) {
for (var a = b.split("."), d = ca, f = 0, k = a.length;f < k;f++) {
d = d && d[a[f]];
}
d || (d = da[b]);
g(d, "getNative(" + b + ") not found.");
g(0 > la.indexOf(d), "Leaking illegal function.");
return d;
}
var u = c.AVM2.ABC.Multiname, l = c.AVM2.Runtime.Scope, e = c.ObjectUtilities.hasOwnProperty, m = c.ObjectUtilities.hasOwnGetter, t = c.ObjectUtilities.defineNonEnumerableProperty, q = c.isNumber, n = c.isNullOrUndefined, k = c.ObjectUtilities.isPrototypeWriteable, f = c.ObjectUtilities.getOwnPropertyDescriptor, d = c.Debug.notImplemented, b = c.AVM2.Runtime.asCoerceString, g = c.Debug.assert, r = c.AVM2.Runtime.createFunction, w = c.AVM2.Runtime, z = c.ObjectUtilities.boxValue, A = c.AVM2.Runtime.ClassBindings,
B = c.AVM2.Runtime.InstanceBindings, M = c.AVM2.Runtime.asCompare;
(function(b) {
b[b.NONE = 0] = "NONE";
b[b.OWN_INITIALIZE = 1] = "OWN_INITIALIZE";
b[b.SUPER_INITIALIZE = 2] = "SUPER_INITIALIZE";
})(a.InitializationFlags || (a.InitializationFlags = {}));
var N = function() {
function b() {
}
b.morphIntoASClass = function(b) {
this.classInfo = b;
this.__proto__ = y.prototype;
};
b.create = function(b, a, d) {
y.create(b, a, this.instanceConstructor);
};
b.initializeFrom = function(b) {
return D.initializeFrom.call(this, b);
};
b.asCall = function(b) {
for (var a = [], d = 1;d < arguments.length;d++) {
a[d - 1] = arguments[d];
}
return this.callableConstructor.apply(b, a);
};
b.asApply = function(b, a) {
return this.callableConstructor.apply(b, a);
};
b.verify = function() {
D.verify.call(this);
};
b.trace = function(b) {
D.trace.call(this, b);
};
b.getQualifiedClassName = function() {
return D.getQualifiedClassName.call(this);
};
b._setPropertyIsEnumerable = function(b, a, d) {
a = u.getPublicQualifiedName(a);
d = f(b, a);
d.enumerable = !1;
Object.defineProperty(b, a, d);
};
b._dontEnumPrototype = function(b) {
for (var a in b) {
if (u.isPublicQualifiedName(a)) {
var d = f(b, a);
d.enumerable = !1;
Object.defineProperty(b, a, d);
}
}
};
b._init = function() {
this.dynamicPrototype.asSetPublicProperty("hasOwnProperty", b.prototype.native_hasOwnProperty);
this.dynamicPrototype.asSetPublicProperty("propertyIsEnumerable", b.prototype.native_propertyIsEnumerable);
this.dynamicPrototype.asSetPublicProperty("setPropertyIsEnumerable", b.prototype.setPropertyIsEnumerable);
this.dynamicPrototype.asSetPublicProperty("isPrototypeOf", b.prototype.native_isPrototypeOf);
this.dynamicPrototype.asSetPublicProperty("toString", b.prototype.toString);
this.dynamicPrototype.asSetPublicProperty("valueOf", b.prototype.valueOf);
b._dontEnumPrototype(this.dynamicPrototype);
};
b.prototype.native_isPrototypeOf = function(b) {
d("isPrototypeOf");
return!1;
};
b.prototype.native_hasOwnProperty = function(b) {
return this.asHasOwnProperty(null, b, 0);
};
b.prototype.native_propertyIsEnumerable = function(b) {
return this.asPropertyIsEnumerable(null, b, 0);
};
b.prototype.setPropertyIsEnumerable = function(a, d) {
b._setPropertyIsEnumerable(this, a, d);
};
b.prototype.toString = function() {
var b = z(this);
return b instanceof y ? c.StringUtilities.concat3("[class ", b.classInfo.instanceInfo.name.name, "]") : c.StringUtilities.concat3("[object ", b.class.classInfo.instanceInfo.name.name, "]");
};
b.baseClass = null;
b.instanceConstructor = Object;
b.instanceConstructorNoInitialize = null;
b.initializer = null;
b.initializers = null;
b.classInitializer = null;
b.callableConstructor = b.instanceConstructor;
b.defaultValue = null;
b.initializationFlags = 0;
b.call = Function.prototype.call;
b.apply = Function.prototype.apply;
b.coerce = w.asCoerceObject;
b.defineProperty = Object.defineProperty;
return b;
}();
a.ASObject = N;
var K = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
a.baseClass = null;
a.classInfo = null;
a.instanceConstructor = null;
a.callableConstructor = null;
a.classBindings = null;
a.instanceBindings = null;
a.staticNatives = null;
a.instanceNatives = null;
a.traitsPrototype = null;
a.dynamicPrototype = null;
a.defaultValue = null;
a.initializationFlags = 0;
return a;
}(N);
a.ASNative = K;
var y = function(b) {
function a(b) {
this.classInfo = b;
this.instanceNatives = this.staticNatives = null;
this.initializationFlags = 0;
this.defaultValue = null;
}
__extends(a, b);
a.configureBuiltinPrototype = function(b, a) {
g(b.instanceConstructor);
b.baseClass = a;
b.dynamicPrototype = b.traitsPrototype = b.instanceConstructor.prototype;
};
a.configurePrototype = function(b, a) {
b.baseClass = a;
b.dynamicPrototype = Object.create(a.dynamicPrototype);
b.traitsPrototype = Object.create(b.dynamicPrototype);
for (var d = b.traitsPrototype, g = [];b;) {
g.push(b), b = b.baseClass;
}
for (var f = 0;f < g.length;f++) {
var k = [g[f].typeScriptPrototype];
g[f].instanceNatives && c.ArrayUtilities.pushMany(k, g[f].instanceNatives);
for (var r = 0;r < k.length;r++) {
var m = k[r], w;
for (w in m) {
if (!(0 < f && "toString" === w) && e(m, w) && !e(d, w)) {
var q = Object.getOwnPropertyDescriptor(m, w);
c.Debug.assert(q);
try {
Object.defineProperty(d, w, q);
} catch (n) {
}
}
}
}
}
};
a.create = function(b, d, f) {
g(!b.instanceConstructorNoInitialize, "This should not be set yet.");
g(!b.dynamicPrototype && !b.traitsPrototype, "These should not be set yet.");
b.typeScriptPrototype = b.prototype;
b.instanceConstructor && !k(b.instanceConstructor) ? a.configureBuiltinPrototype(b, d) : a.configurePrototype(b, d);
b.instanceConstructor || (b.instanceConstructor = f, b !== f && (b.instanceConstructor.__proto__ = b));
b.callableConstructor || (b.callableConstructor = b.coerce.bind(b));
b.instanceConstructorNoInitialize = b.instanceConstructor;
b.instanceConstructor.prototype = b.traitsPrototype;
t(b.instanceConstructor.prototype, "class", b);
t(b.dynamicPrototype, u.getPublicQualifiedName("constructor"), b);
b.protocol && c.ObjectUtilities.copyOwnPropertyDescriptors(b.traitsPrototype, b.protocol);
};
a.prototype.initializeFrom = function(b) {
var d = Object.create(this.traitsPrototype);
a.runInitializers(d, b);
return d;
};
a.runInitializers = function(b, a) {
a = a || b.class.defaultInitializerArgument;
var d = b.class.initializers;
if (d) {
for (var g = 0;g < d.length;g++) {
d[g].call(b, a);
}
}
};
a.configureInitializers = function(b) {
b.baseClass && b.baseClass.initializers && (b.initializers = b.baseClass.initializers.slice(0));
b.initializer && (b.initializers || (b.initializers = []), b.initializers.push(b.initializer));
b.initializers && (g(b.instanceConstructorNoInitialize === b.instanceConstructor), b.instanceConstructor = function() {
a.runInitializers(this, void 0);
return b.instanceConstructorNoInitialize.apply(this, arguments);
}, b.instanceConstructor.prototype = b.traitsPrototype, t(b.instanceConstructor.prototype, "class", b), b.instanceConstructor.classInfo = b.classInfo, b.instanceConstructor.__proto__ = b);
};
a.runClassInitializer = function(b) {
b.classInitializer && b.classInitializer();
};
a.linkSymbols = function(b) {
function a(b, f, k) {
for (var e = 0;e < f.length;e++) {
var r = f[e], c;
a: {
c = b;
for (var w = r.name.name, q = 0;q < c.length;q++) {
var n = c[q];
if (0 <= n.indexOf(w) && ("!" === n[n.length - 1] && (n = n.slice(0, n.length - 1)), w === n)) {
c = !0;
break a;
}
}
c = !1;
}
if (c) {
g(!r.name.getNamespace().isPrivate(), "Why are you linking against private members?");
if (r.isConst()) {
d("Don't link against const traits.");
break;
}
c = r.name.name;
w = u.getQualifiedName(r.name);
r.isSlot() ? Object.defineProperty(k, c, {get:new Function("", "return this." + w + "//# sourceURL=get-" + w + ".as"), set:new Function("v", "this." + w + " = v;//# sourceURL=set-" + w + ".as")}) : r.isMethod() ? (g(!k[c], "Symbol should not already exist."), g(k.asOpenMethods[w], "There should be an open method for this symbol."), k[c] = k.asOpenMethods[w]) : r.isGetter() ? (g(m(k, w), "There should be an getter method for this symbol."), Object.defineProperty(k, c, {get:new Function("",
"return this." + w + "//# sourceURL=get-" + w + ".as")})) : d(r);
}
}
}
b.classSymbols && a(b.classSymbols, b.classInfo.traits, b);
b.instanceSymbols && a(b.instanceSymbols, b.classInfo.instanceInfo.traits, b.traitsPrototype);
};
a.prototype.morphIntoASClass = function(b) {
g(this.classInfo === b);
g(this instanceof a);
};
Object.defineProperty(a.prototype, "native_prototype", {get:function() {
g(this.dynamicPrototype);
return this.dynamicPrototype;
}, enumerable:!0, configurable:!0});
a.prototype.asCall = function(b, a) {
return this.coerce(a);
};
a.prototype.asApply = function(b, a) {
return this.coerce(a[0]);
};
a.prototype.applyType = function(b) {
debugger;
return null;
};
a.prototype.isInstanceOf = function(b) {
return this.isInterface() ? !1 : this.isType(b);
};
a.prototype.isType = function(b) {
if (c.isNullOrUndefined(b)) {
return!1;
}
b = z(b);
if (this.isInterface()) {
if (null === b || "object" !== typeof b) {
return!1;
}
g(b.class.implementedInterfaces, "No 'implementedInterfaces' map found on class " + b.class);
var a = u.getQualifiedName(this.classInfo.instanceInfo.name);
return void 0 !== b.class.implementedInterfaces[a];
}
return this.dynamicPrototype.isPrototypeOf(b);
};
a.prototype.isSubtypeOf = function(b) {
for (var a = this;a;) {
if (a.traitsPrototype === b.traitsPrototype) {
return!0;
}
a = a.baseClass;
}
return!1;
};
a.prototype.coerce = function(b) {
return b;
};
a.prototype.isInterface = function() {
return this.classInfo.instanceInfo.isInterface();
};
a.prototype.getQualifiedClassName = function() {
var b = this.classInfo.instanceInfo.name, a = b.namespaces[0].uri;
return a ? a + "::" + b.name : b.name;
};
a.prototype.verify = function() {
function b(a, d, g) {
for (var f = 0;f < a.length;f++) {
if (d(a[f], g)) {
return!0;
}
}
return!1;
}
if (!this.isInterface()) {
var a = [this.classInfo.traits, this.classInfo.instanceInfo.traits], d = [this];
this.staticNatives && c.ArrayUtilities.pushMany(d, this.staticNatives);
var f = [this.prototype];
this.instanceNatives && c.ArrayUtilities.pushMany(f, this.instanceNatives);
this === N ? g(!this.baseClass, "ASObject should have no base class.") : (g(this.baseClass, this.classInfo.instanceInfo.name + " has no base class."), g(this.baseClass !== this));
g(this.traitsPrototype === this.instanceConstructor.prototype, "The traitsPrototype is not set correctly.");
for (var k = 0;k < a.length;k++) {
for (var e = 0 === k, r = 0;r < a[k].length;r++) {
var m = a[k][r], w = v(m.name.name);
if (m.isMethodOrAccessor() && m.methodInfo.isNative()) {
var q = e ? d : f;
m.isMethod() ? b(q, c.ObjectUtilities.hasOwnProperty, w) : m.isGetter() ? b(q, c.ObjectUtilities.hasOwnGetter, w) : m.isSetter() && b(q, c.ObjectUtilities.hasOwnSetter, w);
}
}
}
c.Debug.assert(this.instanceConstructor, "Must have a constructor function.");
}
};
a.labelObject = function(b) {
if (!b) {
return b;
}
e(b, "labelId") || (b.labelId = a.labelCounter++);
return b instanceof Function ? "Function [#" + b.labelId + "]" : "Object [#" + b.labelId + "]";
};
a.prototype.trace = function(b) {
if (this.isInterface()) {
b.enter("Interface: " + this.classInfo), this.interfaceBindings.trace(b);
} else {
b.enter("Class: " + this.classInfo);
b.writeLn("baseClass: " + (this.baseClass ? this.baseClass.classInfo.instanceInfo.name : null));
this.classBindings.trace(b);
this.instanceBindings.trace(b);
b.enter("Interfaces");
for (var a in this.implementedInterfaces) {
b.writeLn(this.implementedInterfaces[a].classInfo.toString());
}
b.leave();
}
b.leave();
};
a.instanceConstructor = a;
a.staticNatives = null;
a.instanceNatives = null;
a.labelCounter = 0;
return a;
}(N);
a.ASClass = y;
var D = y.prototype;
D.call = Function.prototype.call;
D.apply = Function.prototype.apply;
var L = function(b) {
function a() {
}
__extends(a, b);
Object.defineProperty(a.prototype, "native_prototype", {get:function() {
return this.prototype;
}, set:function(b) {
this.prototype = b;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "native_length", {get:function() {
return this.hasOwnProperty(w.VM_LENGTH) ? this.asLength : this.length;
}, enumerable:!0, configurable:!0});
a.prototype.toString = function() {
return "function Function() {}";
};
a.baseClass = null;
a.instanceConstructor = Function;
a.staticNatives = [Function];
a.instanceNatives = [Function.prototype];
return a;
}(N);
a.ASFunction = L;
var H = function(b) {
function a(b) {
}
__extends(a, b);
a.instanceConstructor = Boolean;
a.callableConstructor = a.instanceConstructor;
a.staticNatives = null;
a.instanceNatives = null;
a.coerce = w.asCoerceBoolean;
return a;
}(N);
a.ASBoolean = H;
H.prototype.toString = Boolean.prototype.toString;
H.prototype.valueOf = Boolean.prototype.valueOf;
var J = function(b) {
function a(b, d) {
var g = c.FunctionUtilities.bindSafely(d, b);
t(this, "call", g.call.bind(g));
t(this, "apply", g.apply.bind(g));
}
__extends(a, b);
a.prototype.toString = function() {
return "function Function() {}";
};
a.staticNatives = null;
a.instanceNatives = null;
return a.instanceConstructor = a;
}(L);
a.ASMethodClosure = J;
var C = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
a._numberToString = function(b, a) {
return Number(b).toString(a | 0);
};
a._minValue = function() {
return Number.MIN_VALUE;
};
a.instanceConstructor = Number;
a.callableConstructor = a.instanceConstructor;
a.staticNatives = [Math];
a.instanceNatives = [Number.prototype];
a.defaultValue = Number(0);
a.coerce = w.asCoerceNumber;
return a;
}(N);
a.ASNumber = C;
var E = function(b) {
function a(b) {
return Object(Number(b | 0));
}
__extends(a, b);
a.asCall = function(b, a) {
return a | 0;
};
a.asApply = function(b, a) {
return a[0] | 0;
};
a.isInstanceOf = function(b) {
return!1;
};
a.isType = function(b) {
return q(b) || b instanceof Number ? (b = +b, (b | 0) === b) : !1;
};
a.instanceConstructor = a;
a.callableConstructor = a.instanceConstructor;
a.staticNatives = [Math];
a.instanceNatives = [Number.prototype];
a.defaultValue = 0;
a.coerce = w.asCoerceInt;
return a;
}(N);
a.ASInt = E;
var F = function(b) {
function a(b) {
return Object(Number(b >>> 0));
}
__extends(a, b);
a.asCall = function(b, a) {
return a >>> 0;
};
a.asApply = function(b, a) {
return a[0] >>> 0;
};
a.isInstanceOf = function(b) {
return!1;
};
a.isType = function(b) {
return q(b) || b instanceof Number ? (b = +b, b >>> 0 === b) : !1;
};
a.instanceConstructor = a;
a.callableConstructor = a.instanceConstructor;
a.staticNatives = [Math];
a.instanceNatives = [Number.prototype];
a.defaultValue = 0;
a.coerce = w.asCoerceUint;
return a;
}(N);
a.ASUint = F;
var I = function(a) {
function d() {
a.apply(this, arguments);
}
__extends(d, a);
Object.defineProperty(d.prototype, "native_length", {get:function() {
return this.length;
}, enumerable:!0, configurable:!0});
d.prototype.match = function(b) {
if (void 0 === b || null === b) {
return null;
}
if (b instanceof h.XRegExp && b.global) {
for (var a = [], d;d = b.exec(this);) {
a.push(d[0]);
}
return a;
}
b instanceof h.XRegExp || "string" === typeof b || (b = String(b));
return this.match(b);
};
d.prototype.search = function(a) {
return a instanceof h.XRegExp ? this.search(a) : this.indexOf(b(a));
};
d.prototype.toUpperCase = function() {
var b = String.prototype.toUpperCase.apply(this);
return b = b.replace(/\u039C/g, String.fromCharCode(181));
};
d.prototype.toLocaleUpperCase = function() {
var b = String.prototype.toLocaleUpperCase.apply(this);
return b = b.replace(/\u039C/g, String.fromCharCode(181));
};
d.instanceConstructor = String;
d.callableConstructor = d.instanceConstructor;
d.staticNatives = [String];
d.instanceNatives = [String.prototype];
d.coerce = w.asCoerceString;
return d;
}(N);
a.ASString = I;
a.arraySort = function(b, a) {
if (0 === a.length) {
return b.sort();
}
var d, g = 0;
a[0] instanceof Function ? d = a[0] : q(a[0]) && (g = a[0]);
q(a[1]) && (g = a[1]);
b.sort(function(b, a) {
return M(b, a, g, d);
});
return b;
};
var G = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
a.prototype.toLocaleString = function() {
for (var b = a.coerce(this), d = "", g = 0, f = b.length;g < f;g++) {
var k = b[g];
null !== k && void 0 !== k && (d += k.toLocaleString());
g + 1 < f && (d += ",");
}
return d;
};
a.prototype.splice = function() {
return 0 === arguments.length ? void 0 : this.splice.apply(this, arguments);
};
a.prototype.every = function(b, a) {
for (var d = 0;d < this.length && !0 === b.call(a, this[d], d, this);d++) {
}
return!1;
};
a.prototype.filter = function(b, a) {
for (var d = [], g = 0;g < this.length;g++) {
!0 === b.call(a, this[g], g, this) && d.push(this[g]);
}
return d;
};
a.prototype.sort = function() {
if (0 === arguments.length) {
return this.sort();
}
var b, a = 0;
arguments[0] instanceof Function ? b = arguments[0] : q(arguments[0]) && (a = arguments[0]);
q(arguments[1]) && (a = arguments[1]);
this.sort(function(d, g) {
return w.asCompare(d, g, a, b);
});
return this;
};
a.prototype.sortOn = function(b, d) {
c.isString(b) && (b = [b]);
n(d) ? d = [] : q(d) && (d = [d]);
for (var g = b.length - 1;0 <= g;g--) {
var f = u.getPublicQualifiedName(b[g]);
if (a.CACHE_NUMERIC_COMPARATORS && d[g] & 16) {
var k = "var x = +(a." + f + "), y = +(b." + f + ");", k = d[g] & 2 ? k + "return x < y ? 1 : (x > y ? -1 : 0);" : k + "return x < y ? -1 : (x > y ? 1 : 0);", e = a.numericComparatorCache[k];
e || (e = a.numericComparatorCache[k] = new Function("a", "b", k));
this.sort(e);
} else {
this.sort(function(b, a) {
return w.asCompare(b[f], a[f], d[g] | 0);
});
}
}
return this;
};
Object.defineProperty(a.prototype, "native_length", {get:function() {
return this.length;
}, set:function(b) {
this.length = b >>> 0;
}, enumerable:!0, configurable:!0});
a.instanceConstructor = Array;
a.staticNatives = [Array];
a.instanceNatives = [Array.prototype];
a.classInitializer = function() {
var b = Array.prototype, d = a.prototype;
t(b, "$Bgjoin", b.join);
t(b, "$BgtoString", b.join);
t(b, "$BgtoLocaleString", d.toLocaleString);
t(b, "$Bgpop", b.pop);
t(b, "$Bgpush", b.push);
t(b, "$Bgreverse", b.reverse);
t(b, "$Bgconcat", b.concat);
t(b, "$Bgsplice", d.splice);
t(b, "$Bgslice", b.slice);
t(b, "$Bgshift", b.shift);
t(b, "$Bgunshift", b.unshift);
t(b, "$BgindexOf", b.indexOf);
t(b, "$BglastIndexOf", b.lastIndexOf);
t(b, "$BgforEach", b.forEach);
t(b, "$Bgmap", b.map);
t(b, "$Bgfilter", b.filter);
t(b, "$Bgsome", b.some);
t(b, "$Bgevery", d.every);
t(b, "$Bgsort", d.sort);
t(b, "$BgsortOn", d.sortOn);
};
a.CACHE_NUMERIC_COMPARATORS = !0;
a.numericComparatorCache = Object.create(null);
return a;
}(N);
a.ASArray = G;
var Z = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
a.prototype.newThisType = function() {
return new this.class.instanceConstructor;
};
a.staticNatives = null;
a.instanceNatives = null;
a.instanceConstructor = a;
a.callableConstructor = null;
return a;
}(K);
a.ASVector = Z;
var Q = function(a) {
function d() {
a.apply(this, arguments);
}
__extends(d, a);
d.transformJSValueToAS = function(b, a) {
if ("object" !== typeof b || n(b)) {
return b;
}
for (var g = Object.keys(b), f = Array.isArray(b) ? [] : {}, k = 0;k < g.length;k++) {
var e = b[g[k]];
a && (e = d.transformJSValueToAS(e, !0));
f.asSetPublicProperty(g[k], e);
}
return f;
};
d.transformASValueToJS = function(b, a) {
if ("object" !== typeof b || n(b)) {
return b;
}
for (var g = Object.keys(b), f = Array.isArray(b) ? [] : {}, k = 0;k < g.length;k++) {
var e = g[k], r = e;
c.isNumeric(e) || (r = u.getNameFromPublicQualifiedName(e));
e = b[e];
a && (e = d.transformASValueToJS(e, !0));
f[r] = e;
}
return f;
};
d.parseCore = function(a) {
a = b(a);
return d.transformJSValueToAS(JSON.parse(a), !0);
};
d.stringifySpecializedToString = function(b, a, g, f) {
return JSON.stringify(d.transformASValueToJS(b, !0), g, f);
};
d.instanceConstructor = d;
d.staticNatives = null;
d.instanceNatives = null;
return d;
}(N);
a.ASJSON = Q;
var S = function(b) {
function a(b, g) {
d("ASError");
}
__extends(a, b);
a.prototype.getStackTrace = function() {
return null;
};
a.instanceConstructor = null;
a.staticNatives = null;
a.instanceNatives = null;
a.getErrorMessage = c.AVM2.getErrorMessage;
return a;
}(K);
a.ASError = S;
var O = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASDefinitionError = O;
var P = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASEvalError = P;
var V = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASRangeError = V;
var $ = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASReferenceError = $;
var W = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASSecurityError = W;
var x = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASSyntaxError = x;
var ea = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASTypeError = ea;
var Y = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASURIError = Y;
var R = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASVerifyError = R;
var U = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASUninitializedError = U;
var ba = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
return a;
}(S);
a.ASArgumentError = ba;
var X = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
Object.defineProperty(a.prototype, "native_source", {get:function() {
return this.source;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "native_global", {get:function() {
return this.global;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "native_ignoreCase", {get:function() {
return this.ignoreCase;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "native_multiline", {get:function() {
return this.multiline;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "native_lastIndex", {get:function() {
return this.lastIndex;
}, set:function(b) {
this.lastIndex = b | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "native_dotall", {get:function() {
return this.dotall;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "native_extended", {get:function() {
return this.extended;
}, enumerable:!0, configurable:!0});
a.prototype.exec = function(b) {
void 0 === b && (b = "");
var a = RegExp.prototype.exec.apply(this, arguments);
if (!a) {
return a;
}
for (var d = Object.keys(a), g = 0;g < d.length;g++) {
var f = d[g];
c.isNumeric(f) || void 0 === a[f] && (a[f] = "");
}
c.AVM2.Runtime.publicizeProperties(a);
return a;
};
a.instanceConstructor = h.XRegExp;
a.staticNatives = [h.XRegExp];
a.instanceNatives = [h.XRegExp.prototype];
return a;
}(N);
a.ASRegExp = X;
var ga = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
a.staticNatives = [Math];
return a;
}(K);
a.ASMath = ga;
var ja = function(b) {
function a() {
b.apply(this, arguments);
}
__extends(a, b);
a.staticNatives = [Date];
a.instanceNatives = [Date.prototype];
a.instanceConstructor = Date;
return a;
}(K);
a.ASDate = ja;
var aa = c.ObjectUtilities.createMap(), ia = !1;
a.initialize = function(b) {
ia || (aa.ObjectClass = N, aa.Class = y, aa.FunctionClass = L, aa.BooleanClass = H, aa.MethodClosureClass = J, aa.NamespaceClass = a.ASNamespace, aa.NumberClass = C, aa.IntClass = E, aa.UIntClass = F, aa.StringClass = I, aa.ArrayClass = G, aa.VectorClass = Z, aa.ObjectVectorClass = a.GenericVector, aa.IntVectorClass = a.Int32Vector, aa.UIntVectorClass = a.Uint32Vector, aa.DoubleVectorClass = a.Float64Vector, aa.JSONClass = Q, aa.XMLClass = a.ASXML, aa.XMLListClass = a.ASXMLList, aa.QNameClass =
a.ASQName, aa.ErrorClass = S, aa.DefinitionErrorClass = O, aa.EvalErrorClass = P, aa.RangeErrorClass = V, aa.ReferenceErrorClass = $, aa.SecurityErrorClass = W, aa.SyntaxErrorClass = x, aa.TypeErrorClass = ea, aa.URIErrorClass = Y, aa.VerifyErrorClass = R, aa.UninitializedErrorClass = U, aa.ArgumentErrorClass = ba, aa.DateClass = ja, aa.MathClass = ga, aa.RegExpClass = X, aa.ProxyClass = a.flash.utils.OriginalProxy, aa.DictionaryClass = a.flash.utils.OriginalDictionary, aa.ByteArrayClass =
a.flash.utils.OriginalByteArray, aa.SystemClass = a.flash.system.OriginalSystem, ia = !0);
};
var T = c.ObjectUtilities.createMap(), da = c.ObjectUtilities.createMap();
a.registerNativeClass = function(b, a) {
g(!T[b], "Native class: " + b + " is already registered.");
T[b] = a;
};
a.registerNativeFunction = s;
a.createInterface = function(b) {
var a = b.instanceInfo;
g(a.isInterface());
b = new y(b);
b.interfaceBindings = new B(null, a, null, null);
b.verify();
return b;
};
var fa = [];
a.createClass = function(b, a, d) {
var f = b.instanceInfo, k = b.abc.applicationDomain, e = b.native, m;
e ? ((m = aa[b.native.cls]) || (m = T[b.native.cls]), m || c.Debug.unexpected("No native class for " + b.native.cls), m.morphIntoASClass(b), fa && fa.push(m)) : m = new y(b);
d = new l(d, null);
d.object = m;
var w = null;
f.init.isNative() ? (g(e), w = m) : w = r(f.init, d, !1, !1);
var q = null, n = null;
e && (q = [m], m.staticNatives && c.ArrayUtilities.pushMany(q, m.staticNatives), n = [m.prototype], m.instanceNatives && c.ArrayUtilities.pushMany(n, m.instanceNatives));
y.create(m, a, w);
m.verify();
if ("Class" === b.instanceInfo.name.name) {
for (e = 0;e < fa.length;e++) {
fa[e].__proto__ = y.prototype;
}
fa = null;
}
h.enterTimeline("InstanceBindings");
m.instanceBindings = new B(a ? a.instanceBindings : null, f, d, n);
m.instanceConstructor && (h.enterTimeline("applyTo"), m.instanceBindings.applyTo(k, m.traitsPrototype), h.leaveTimeline());
h.leaveTimeline();
h.enterTimeline("ClassBindings");
m.classBindings = new A(b, d, q);
h.enterTimeline("applyTo");
m.classBindings.applyTo(k, m);
m === y ? m.instanceBindings.applyTo(k, N, !0) : y.instanceBindings && y.instanceBindings.applyTo(k, m, !0);
h.leaveTimeline();
h.leaveTimeline();
m.implementedInterfaces = m.instanceBindings.implementedInterfaces;
h.enterTimeline("Configure");
y.configureInitializers(m);
y.linkSymbols(m);
y.runClassInitializer(m);
h.leaveTimeline();
return m;
};
var la = [w.forwardValueOf, w.forwardToString];
a.getMethodOrAccessorNative = function(b, a) {
for (var d = v(u.getName(b.name)), k = 0;k < a.length;k++) {
var r = a[k], m = d;
e(r, "original_" + d) && (m = "original_" + d);
!e(r, d) && e(r, "native_" + d) && (m = "native_" + d);
if (e(r, m)) {
return b.isAccessor() ? (d = f(r, m), d = b.isGetter() ? d.get : d.set) : (g(b.isMethod()), d = r[m]), g(d, "Method or Accessor property exists but it's undefined: " + b), g(0 > la.indexOf(d), "Leaking illegal function."), d;
}
}
c.Debug.warning("No native method for: " + b.kindName() + " " + b.methodInfo.holder + "::" + u.getQualifiedName(b.name) + ", make sure you've got the static keyword for static methods.");
return null;
};
a.escapeNativeName = v;
var ca;
(function(b) {
function a(b) {
for (var d = {prototype:Object.create(null)}, g = Object.getOwnPropertyNames(b.prototype), f = 0;f < g.length;f++) {
d.prototype[g[f]] = b.prototype[g[f]];
}
return d;
}
b.String = jsGlobal.String;
b.Function = jsGlobal.Function;
b.Boolean = jsGlobal.Boolean;
b.Number = jsGlobal.Number;
b.Date = jsGlobal.Date;
b.ASObject = c.AVM2.AS.ASObject;
b.ASFunction = c.AVM2.AS.ASFunction;
b.Original = {Date:a(b.Date), Array:a(Array), String:a(b.String), Number:a(b.Number), Boolean:a(b.Boolean)};
b.print = function(b, a, d, g, f) {
jsGlobal.print.apply(null, arguments);
};
b.debugBreak = function(b) {
debugger;
};
b.bugzilla = function(b) {
switch(b) {
case 574600:
return!0;
}
return!1;
};
b.decodeURI = jsGlobal.decodeURI;
b.decodeURIComponent = jsGlobal.decodeURIComponent;
b.encodeURI = jsGlobal.encodeURI;
b.encodeURIComponent = jsGlobal.encodeURIComponent;
b.isNaN = jsGlobal.isNaN;
b.isFinite = jsGlobal.isFinite;
b.parseInt = jsGlobal.parseInt;
b.parseFloat = jsGlobal.parseFloat;
b.escape = jsGlobal.escape;
b.unescape = jsGlobal.unescape;
b.isXMLName;
b.notImplemented = c.Debug.notImplemented;
b.getQualifiedClassName = function(b) {
if (null === b) {
return "null";
}
if (void 0 === b) {
return "void";
}
if (E.isType(b)) {
return "int";
}
b = z(b);
return y.isType(b) ? b.getQualifiedClassName() : b.class.getQualifiedClassName();
};
b.getQualifiedSuperclassName = function(b) {
if (n(b)) {
return "null";
}
b = z(b);
b = y.isType(b) ? b : b.class;
return b.baseClass ? b.baseClass.getQualifiedClassName() : "null";
};
b.getDefinitionByName = function(a) {
a = b.String(a).replace("::", ".");
return c.AVM2.Runtime.AVM2.currentDomain().getClass(a, !1) || null;
};
b.describeType = function(b, a) {
return c.AVM2.AS.describeType(b, a);
};
b.describeTypeJSON = function(b, a) {
return c.AVM2.AS.describeTypeJSON(b, a);
};
})(ca = a.Natives || (a.Natives = {}));
a.getNative = p;
s("unsafeJSNative", p);
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.assert, v = c.Debug.assertNotImplemented, p = c.AVM2.Runtime.asCoerceString, u = c.ObjectUtilities.defineNonEnumerableProperty, l = c.AVM2.Runtime.throwError, e = c.AVM2.Runtime.asCheckVectorGetNumericProperty, m = c.AVM2.Runtime.asCheckVectorSetNumericProperty, t = function(q) {
function n(k, f, d) {
void 0 === k && (k = 0);
void 0 === f && (f = !1);
void 0 === d && (d = a.ASObject);
k >>>= 0;
this._fixed = !!f;
this._buffer = Array(k);
this._defaultValue = (this._type = d) ? d.defaultValue : null;
this._fill(k, this._defaultValue);
}
__extends(n, q);
n.prototype.newThisType = function() {
return new n;
};
n.defaultCompareFunction = function(a, f) {
return String(a).localeCompare(String(f));
};
n.compare = function(a, f, d, b) {
v(!(d & n.CASEINSENSITIVE), "CASEINSENSITIVE");
v(!(d & n.UNIQUESORT), "UNIQUESORT");
v(!(d & n.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY");
var g = 0;
b || (b = n.defaultCompareFunction);
d & n.NUMERIC ? (a = c.toNumber(a), f = c.toNumber(f), g = a < f ? -1 : a > f ? 1 : 0) : g = b(a, f);
d & n.DESCENDING && (g *= -1);
return g;
};
n.applyType = function(k) {
function f(a, b) {
Function.prototype.call.call(n.instanceConstructor, this, a, b, k);
}
f.prototype = n.prototype;
f.instanceConstructor = f;
f.callableConstructor = function(d) {
if (d instanceof a.Int32Vector) {
return d;
}
var b = d.asGetProperty(void 0, "length");
if (void 0 !== b) {
for (var g = new f(b, !1), k = 0;k < b;k++) {
g.asSetNumericProperty(k, d.asGetPublicProperty(k));
}
return g;
}
c.Debug.unexpected();
};
f.__proto__ = n;
return f;
};
n.prototype._fill = function(a, f) {
for (var d = 0;d < a;d++) {
this._buffer[0 + d] = f;
}
};
n.prototype.toString = function() {
for (var a = "", f = 0;f < this._buffer.length;f++) {
a += this._buffer[f], f < this._buffer.length - 1 && (a += ",");
}
return a;
};
n.prototype.toLocaleString = function() {
for (var a = "", f = 0;f < this._buffer.length;f++) {
a += this._buffer[f].asCallPublicProperty("toLocaleString"), f < this._buffer.length - 1 && (a += ",");
}
return a;
};
n.prototype.sort = function(k) {
if (0 === arguments.length) {
return this._buffer.sort();
}
if (k instanceof Function) {
return this._buffer.sort(k);
}
var f = k | 0;
v(!(f & a.Int32Vector.UNIQUESORT), "UNIQUESORT");
v(!(f & a.Int32Vector.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY");
return f && n.NUMERIC ? f & n.DESCENDING ? this._buffer.sort(function(a, b) {
return asCoerceNumber(b) - asCoerceNumber(a);
}) : this._buffer.sort(function(a, b) {
return asCoerceNumber(a) - asCoerceNumber(b);
}) : f && n.CASEINSENSITIVE ? f & n.DESCENDING ? this._buffer.sort(function(a, b) {
return p(b).toLowerCase() - p(a).toLowerCase();
}) : this._buffer.sort(function(a, b) {
return p(a).toLowerCase() - p(b).toLowerCase();
}) : f & n.DESCENDING ? this._buffer.sort(function(a, b) {
return b - a;
}) : this._buffer.sort();
};
n.prototype.every = function(a, f) {
for (var d = 0;d < this._buffer.length;d++) {
if (!a.call(f, this.asGetNumericProperty(d), d, this)) {
return!1;
}
}
return!0;
};
n.prototype.filter = function(a, f) {
for (var d = new n(0, !1, this._type), b = 0;b < this._buffer.length;b++) {
a.call(f, this.asGetNumericProperty(b), b, this) && d.push(this.asGetNumericProperty(b));
}
return d;
};
n.prototype.some = function(a, f) {
2 !== arguments.length ? l("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || l("ArgumentError", h.Errors.CheckTypeFailedError);
for (var d = 0;d < this._buffer.length;d++) {
if (a.call(f, this.asGetNumericProperty(d), d, this)) {
return!0;
}
}
return!1;
};
n.prototype.forEach = function(a, f) {
c.isFunction(a) || l("ArgumentError", h.Errors.CheckTypeFailedError);
for (var d = 0;d < this._buffer.length;d++) {
a.call(f, this.asGetNumericProperty(d), d, this);
}
};
n.prototype.join = function(a) {
void 0 === a && (a = ",");
for (var f = this._buffer, d = this._buffer.length, b = "", g = 0;g < d - 1;g++) {
b += f[g] + a;
}
0 < d && (b += f[d - 1]);
return b;
};
n.prototype.indexOf = function(a, f) {
void 0 === f && (f = 0);
return this._buffer.indexOf(a, f);
};
n.prototype.lastIndexOf = function(a, f) {
void 0 === f && (f = 2147483647);
return this._buffer.lastIndexOf(a, f);
};
n.prototype.map = function(a, f) {
c.isFunction(a) || l("ArgumentError", h.Errors.CheckTypeFailedError);
for (var d = new n(0, !1, this._type), b = 0;b < this._buffer.length;b++) {
d.push(a.call(f, this.asGetNumericProperty(b), b, this));
}
return d;
};
n.prototype.push = function(a, f, d, b, g, e, c, m) {
this._checkFixed();
for (var q = 0;q < arguments.length;q++) {
this._buffer.push(this._coerce(arguments[q]));
}
};
n.prototype.pop = function() {
this._checkFixed();
return 0 === this._buffer.length ? void 0 : this._buffer.pop();
};
n.prototype.concat = function() {
for (var a = [], f = 0;f < arguments.length;f++) {
a.push(this._coerce(arguments[f])._buffer);
}
return this._buffer.concat.apply(this._buffer, a);
};
n.prototype.reverse = function() {
this._buffer.reverse();
return this;
};
n.prototype._coerce = function(a) {
return this._type ? this._type.coerce(a) : void 0 === a ? null : a;
};
n.prototype.shift = function() {
this._checkFixed();
return 0 === this._buffer.length ? void 0 : this._buffer.shift();
};
n.prototype.unshift = function() {
if (arguments.length) {
this._checkFixed();
for (var a = 0;a < arguments.length;a++) {
this._buffer.unshift(this._coerce(arguments[a]));
}
}
};
n.prototype.slice = function(a, f) {
void 0 === a && (a = 0);
void 0 === f && (f = 2147483647);
var d = this._buffer, b = d.length, g = Math.min(Math.max(a, 0), b), b = Math.min(Math.max(f, g), b), e = new n(b - g, this.fixed, this._type);
e._buffer = d.slice(g, b);
return e;
};
n.prototype.splice = function(a, f) {
var d = this._buffer, b = d.length, g = Math.min(Math.max(a, 0), b), b = Math.min(Math.max(f, 0), b - g), e = arguments.length - 2;
b !== e && this._checkFixed();
for (var g = [g, b], c = 2;c < e + 2;c++) {
g[c] = this._coerce(arguments[c]);
}
b = new n(b, this.fixed, this._type);
b._buffer = d.splice.apply(d, g);
return b;
};
Object.defineProperty(n.prototype, "length", {get:function() {
return this._buffer.length;
}, set:function(a) {
a >>>= 0;
if (a > this._buffer.length) {
for (var f = this._buffer.length;f < a;f++) {
this._buffer[f] = this._defaultValue;
}
} else {
this._buffer.length = a;
}
s(this._buffer.length === a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "fixed", {get:function() {
return this._fixed;
}, set:function(a) {
this._fixed = !!a;
}, enumerable:!0, configurable:!0});
n.prototype._checkFixed = function() {
this._fixed && l("RangeError", h.Errors.VectorFixedError);
};
n.prototype.asNextName = function(a) {
return a - 1;
};
n.prototype.asNextValue = function(a) {
return this._buffer[a - 1];
};
n.prototype.asNextNameIndex = function(a) {
a += 1;
return a <= this._buffer.length ? a : 0;
};
n.prototype.asHasProperty = function(a, f, d) {
if (n.prototype === this || !c.isNumeric(f)) {
return Object.prototype.asHasProperty.call(this, a, f, d);
}
a = c.toNumber(f);
return 0 <= a && a < this._buffer.length;
};
n.prototype.asGetNumericProperty = function(a) {
e(a, this._buffer.length);
return this._buffer[a];
};
n.prototype.asSetNumericProperty = function(a, f) {
m(a, this._buffer.length, this._fixed);
this._buffer[a] = this._coerce(f);
};
n.prototype.asHasNext2 = function(a) {
a.index = this.asNextNameIndex(a.index);
};
n.CASEINSENSITIVE = 1;
n.DESCENDING = 2;
n.UNIQUESORT = 4;
n.RETURNINDEXEDARRAY = 8;
n.NUMERIC = 16;
n.instanceConstructor = n;
n.staticNatives = [n];
n.instanceNatives = [n.prototype];
n.classInitializer = function() {
var a = n.prototype;
u(a, "$Bgjoin", a.join);
u(a, "$BgtoString", a.join);
u(a, "$BgtoLocaleString", a.toLocaleString);
u(a, "$Bgpop", a.pop);
u(a, "$Bgpush", a.push);
u(a, "$Bgreverse", a.reverse);
u(a, "$Bgconcat", a.concat);
u(a, "$Bgsplice", a.splice);
u(a, "$Bgslice", a.slice);
u(a, "$Bgshift", a.shift);
u(a, "$Bgunshift", a.unshift);
u(a, "$BgindexOf", a.indexOf);
u(a, "$BglastIndexOf", a.lastIndexOf);
u(a, "$BgforEach", a.forEach);
u(a, "$Bgmap", a.map);
u(a, "$Bgfilter", a.filter);
u(a, "$Bgsome", a.some);
u(a, "$Bgevery", a.every);
u(a, "$Bgsort", a.sort);
};
return n;
}(a.ASVector);
a.GenericVector = t;
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.assertNotImplemented, v = c.ObjectUtilities.defineNonEnumerableProperty, p = c.AVM2.Runtime.throwError, u = c.AVM2.Runtime.asCheckVectorGetNumericProperty, l = c.AVM2.Runtime.asCheckVectorSetNumericProperty, e = function(a) {
function e(a, c) {
void 0 === a && (a = 0);
void 0 === c && (c = !1);
a >>>= 0;
this._fixed = !!c;
this._buffer = new Int32Array(Math.max(e.INITIAL_CAPACITY, a + e.EXTRA_CAPACITY));
this._offset = 0;
this._length = a;
}
__extends(e, a);
e.prototype.newThisType = function() {
return new e;
};
e.callable = function(a) {
if (a instanceof e) {
return a;
}
var m = a.asGetProperty(void 0, "length");
if (void 0 !== m) {
for (var k = new e(m, !1), f = 0;f < m;f++) {
k.asSetNumericProperty(f, a.asGetPublicProperty(f));
}
return k;
}
c.Debug.unexpected();
};
e.prototype.internalToString = function() {
for (var a = "", e = this._offset, k = e + this._length, f = 0;f < this._buffer.length;f++) {
f === e && (a += "["), f === k && (a += "]"), a += this._buffer[f], f < this._buffer.length - 1 && (a += ",");
}
this._offset + this._length === this._buffer.length && (a += "]");
return a + ": offset: " + this._offset + ", length: " + this._length + ", capacity: " + this._buffer.length;
};
e.prototype.toString = function() {
for (var a = "", e = 0;e < this._length;e++) {
a += this._buffer[this._offset + e], e < this._length - 1 && (a += ",");
}
return a;
};
e.prototype.toLocaleString = function() {
for (var a = "", e = 0;e < this._length;e++) {
a += this._buffer[this._offset + e], e < this._length - 1 && (a += ",");
}
return a;
};
e.prototype._view = function() {
return this._buffer.subarray(this._offset, this._offset + this._length);
};
e.prototype._ensureCapacity = function(a) {
var e = this._offset + a;
e < this._buffer.length || (a <= this._buffer.length ? (e = this._buffer.length - a >> 2, this._buffer.set(this._view(), e), this._offset = e) : (a = (3 * this._buffer.length >> 1) + 1, a < e && (a = e), e = new Int32Array(a), e.set(this._buffer, 0), this._buffer = e));
};
e.prototype.concat = function() {
for (var a = this._length, c = 0;c < arguments.length;c++) {
var k = arguments[c];
k._buffer instanceof Int32Array || p("TypeError", h.Errors.CheckTypeFailedError, k.constructor.name, "__AS3__.vec.Vector.<int>");
a += k._length;
}
var a = new e(a), f = a._buffer;
f.set(this._buffer);
for (var d = this._length, c = 0;c < arguments.length;c++) {
k = arguments[c], d + k._buffer.length < k._buffer.length ? f.set(k._buffer, d) : f.set(k._buffer.subarray(0, k._length), d), d += k._length;
}
return a;
};
e.prototype.every = function(a, e) {
for (var k = 0;k < this._length;k++) {
if (!a.call(e, this._buffer[this._offset + k], k, this)) {
return!1;
}
}
return!0;
};
e.prototype.filter = function(a, c) {
for (var k = new e, f = 0;f < this._length;f++) {
a.call(c, this._buffer[this._offset + f], f, this) && k.push(this._buffer[this._offset + f]);
}
return k;
};
e.prototype.some = function(a, e) {
2 !== arguments.length ? p("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError);
for (var k = 0;k < this._length;k++) {
if (a.call(e, this._buffer[this._offset + k], k, this)) {
return!0;
}
}
return!1;
};
e.prototype.forEach = function(a, e) {
for (var k = 0;k < this._length;k++) {
a.call(e, this._buffer[this._offset + k], k, this);
}
};
e.prototype.join = function(a) {
void 0 === a && (a = ",");
for (var e = this.length, k = this._buffer, f = this._offset, d = "", b = 0;b < e - 1;b++) {
d += k[f + b] + a;
}
0 < e && (d += k[f + e - 1]);
return d;
};
e.prototype.indexOf = function(a, e) {
void 0 === e && (e = 0);
var k = this._length, f = e | 0;
if (0 > f) {
f += k, 0 > f && (f = 0);
} else {
if (f >= k) {
return-1;
}
}
for (var d = this._buffer, k = this._length, b = this._offset, k = b + k, f = f + b;f < k;f++) {
if (d[f] === a) {
return f - b;
}
}
return-1;
};
e.prototype.lastIndexOf = function(a, e) {
void 0 === e && (e = 2147483647);
var k = this._length, f = e | 0;
if (0 > f) {
if (f += k, 0 > f) {
return-1;
}
} else {
f >= k && (f = k);
}
for (var k = this._buffer, d = this._offset, f = f + d;f-- > d;) {
if (k[f] === a) {
return f - d;
}
}
return-1;
};
e.prototype.map = function(a, m) {
c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError);
for (var k = new e, f = 0;f < this._length;f++) {
k.push(a.call(m, this._buffer[this._offset + f], f, this));
}
return k;
};
e.prototype.push = function(a, e, k, f, d, b, g, r) {
this._checkFixed();
this._ensureCapacity(this._length + arguments.length);
for (var c = 0;c < arguments.length;c++) {
this._buffer[this._offset + this._length++] = arguments[c];
}
};
e.prototype.pop = function() {
this._checkFixed();
if (0 === this._length) {
return e.DEFAULT_VALUE;
}
this._length--;
return this._buffer[this._offset + this._length];
};
e.prototype.reverse = function() {
for (var a = this._offset, e = this._offset + this._length - 1, k = this._buffer;a < e;) {
var f = k[a];
k[a] = k[e];
k[e] = f;
a++;
e--;
}
return this;
};
e.prototype.sort = function(a) {
if (0 === arguments.length) {
return Array.prototype.sort.call(this._view());
}
if (a instanceof Function) {
return Array.prototype.sort.call(this._view(), a);
}
var c = a | 0;
s(!(c & e.UNIQUESORT), "UNIQUESORT");
s(!(c & e.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY");
return c & e.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, f) {
return f - a;
}) : Array.prototype.sort.call(this._view(), function(a, f) {
return a - f;
});
};
e.prototype.shift = function() {
this._checkFixed();
if (0 === this._length) {
return 0;
}
this._length--;
return this._buffer[this._offset++];
};
e.prototype.unshift = function() {
this._checkFixed();
if (arguments.length) {
this._ensureCapacity(this._length + arguments.length);
this._slide(arguments.length);
this._offset -= arguments.length;
this._length += arguments.length;
for (var a = 0;a < arguments.length;a++) {
this._buffer[this._offset + a] = arguments[a];
}
}
};
e.prototype.slice = function(a, c) {
void 0 === a && (a = 0);
void 0 === c && (c = 2147483647);
var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, d), f), b = new e(f - d, this.fixed);
b._buffer.set(k.subarray(this._offset + d, this._offset + f), b._offset);
return b;
};
e.prototype.splice = function(a, c) {
var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), b = this._offset + d, g = Math.min(Math.max(c, 0), f - d), d = arguments.length - 2, r, m = new e(g, this.fixed);
0 < g && (r = k.subarray(b, b + g), m._buffer.set(r, m._offset));
this._ensureCapacity(f - g + d);
k.set(k.subarray(b + g, f), b + d);
this._length += d - g;
for (f = 0;f < d;f++) {
k[b + f] = arguments[f + 2];
}
return m;
};
e.prototype._slide = function(a) {
this._buffer.set(this._view(), this._offset + a);
this._offset += a;
};
Object.defineProperty(e.prototype, "length", {get:function() {
return this._length;
}, set:function(a) {
a >>>= 0;
if (a > this._length) {
this._ensureCapacity(a);
for (var c = this._offset + this._length, k = this._offset + a;c < k;c++) {
this._buffer[c] = e.DEFAULT_VALUE;
}
}
this._length = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "fixed", {get:function() {
return this._fixed;
}, set:function(a) {
this._fixed = !!a;
}, enumerable:!0, configurable:!0});
e.prototype._checkFixed = function() {
this._fixed && p("RangeError", h.Errors.VectorFixedError);
};
e.prototype.asGetNumericProperty = function(a) {
u(a, this._length);
return this._buffer[this._offset + a];
};
e.prototype.asSetNumericProperty = function(a, e) {
l(a, this._length, this._fixed);
a === this._length && (this._ensureCapacity(this._length + 1), this._length++);
this._buffer[this._offset + a] = e;
};
e.prototype.asHasProperty = function(a, m, k) {
if (e.prototype === this || !c.isNumeric(m)) {
return Object.prototype.asHasProperty.call(this, a, m, k);
}
a = c.toNumber(m);
return 0 <= a && a < this._length;
};
e.prototype.asNextName = function(a) {
return a - 1;
};
e.prototype.asNextValue = function(a) {
return this._buffer[this._offset + a - 1];
};
e.prototype.asNextNameIndex = function(a) {
a += 1;
return a <= this._length ? a : 0;
};
e.prototype.asHasNext2 = function(a) {
a.index = this.asNextNameIndex(a.index);
};
e.EXTRA_CAPACITY = 4;
e.INITIAL_CAPACITY = 10;
e.DEFAULT_VALUE = 0;
e.DESCENDING = 2;
e.UNIQUESORT = 4;
e.RETURNINDEXEDARRAY = 8;
e.instanceConstructor = e;
e.staticNatives = [e];
e.instanceNatives = [e.prototype];
e.callableConstructor = e.callable;
e.classInitializer = function() {
var a = e.prototype;
v(a, "$Bgjoin", a.join);
v(a, "$BgtoString", a.join);
v(a, "$BgtoLocaleString", a.toLocaleString);
v(a, "$Bgpop", a.pop);
v(a, "$Bgpush", a.push);
v(a, "$Bgreverse", a.reverse);
v(a, "$Bgconcat", a.concat);
v(a, "$Bgsplice", a.splice);
v(a, "$Bgslice", a.slice);
v(a, "$Bgshift", a.shift);
v(a, "$Bgunshift", a.unshift);
v(a, "$BgindexOf", a.indexOf);
v(a, "$BglastIndexOf", a.lastIndexOf);
v(a, "$BgforEach", a.forEach);
v(a, "$Bgmap", a.map);
v(a, "$Bgfilter", a.filter);
v(a, "$Bgsome", a.some);
v(a, "$Bgevery", a.every);
v(a, "$Bgsort", a.sort);
};
return e;
}(a.ASVector);
a.Int32Vector = e;
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.assertNotImplemented, v = c.ObjectUtilities.defineNonEnumerableProperty, p = c.AVM2.Runtime.throwError, u = c.AVM2.Runtime.asCheckVectorGetNumericProperty, l = c.AVM2.Runtime.asCheckVectorSetNumericProperty, e = function(a) {
function e(a, c) {
void 0 === a && (a = 0);
void 0 === c && (c = !1);
a >>>= 0;
this._fixed = !!c;
this._buffer = new Uint32Array(Math.max(e.INITIAL_CAPACITY, a + e.EXTRA_CAPACITY));
this._offset = 0;
this._length = a;
}
__extends(e, a);
e.prototype.newThisType = function() {
return new e;
};
e.callable = function(a) {
if (a instanceof e) {
return a;
}
var m = a.asGetProperty(void 0, "length");
if (void 0 !== m) {
for (var k = new e(m, !1), f = 0;f < m;f++) {
k.asSetNumericProperty(f, a.asGetPublicProperty(f));
}
return k;
}
c.Debug.unexpected();
};
e.prototype.internalToString = function() {
for (var a = "", e = this._offset, k = e + this._length, f = 0;f < this._buffer.length;f++) {
f === e && (a += "["), f === k && (a += "]"), a += this._buffer[f], f < this._buffer.length - 1 && (a += ",");
}
this._offset + this._length === this._buffer.length && (a += "]");
return a + ": offset: " + this._offset + ", length: " + this._length + ", capacity: " + this._buffer.length;
};
e.prototype.toString = function() {
for (var a = "", e = 0;e < this._length;e++) {
a += this._buffer[this._offset + e], e < this._length - 1 && (a += ",");
}
return a;
};
e.prototype.toLocaleString = function() {
for (var a = "", e = 0;e < this._length;e++) {
a += this._buffer[this._offset + e], e < this._length - 1 && (a += ",");
}
return a;
};
e.prototype._view = function() {
return this._buffer.subarray(this._offset, this._offset + this._length);
};
e.prototype._ensureCapacity = function(a) {
var e = this._offset + a;
e < this._buffer.length || (a <= this._buffer.length ? (e = this._buffer.length - a >> 2, this._buffer.set(this._view(), e), this._offset = e) : (a = (3 * this._buffer.length >> 1) + 1, a < e && (a = e), e = new Uint32Array(a), e.set(this._buffer, 0), this._buffer = e));
};
e.prototype.concat = function() {
for (var a = this._length, c = 0;c < arguments.length;c++) {
var k = arguments[c];
k._buffer instanceof Uint32Array || p("TypeError", h.Errors.CheckTypeFailedError, k.constructor.name, "__AS3__.vec.Vector.<uint>");
a += k._length;
}
var a = new e(a), f = a._buffer;
f.set(this._buffer);
for (var d = this._length, c = 0;c < arguments.length;c++) {
k = arguments[c], d + k._buffer.length < k._buffer.length ? f.set(k._buffer, d) : f.set(k._buffer.subarray(0, k._length), d), d += k._length;
}
return a;
};
e.prototype.every = function(a, e) {
for (var k = 0;k < this._length;k++) {
if (!a.call(e, this._buffer[this._offset + k], k, this)) {
return!1;
}
}
return!0;
};
e.prototype.filter = function(a, c) {
for (var k = new e, f = 0;f < this._length;f++) {
a.call(c, this._buffer[this._offset + f], f, this) && k.push(this._buffer[this._offset + f]);
}
return k;
};
e.prototype.some = function(a, e) {
2 !== arguments.length ? p("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError);
for (var k = 0;k < this._length;k++) {
if (a.call(e, this._buffer[this._offset + k], k, this)) {
return!0;
}
}
return!1;
};
e.prototype.forEach = function(a, e) {
for (var k = 0;k < this._length;k++) {
a.call(e, this._buffer[this._offset + k], k, this);
}
};
e.prototype.join = function(a) {
void 0 === a && (a = ",");
for (var e = this.length, k = this._buffer, f = this._offset, d = "", b = 0;b < e - 1;b++) {
d += k[f + b] + a;
}
0 < e && (d += k[f + e - 1]);
return d;
};
e.prototype.indexOf = function(a, e) {
void 0 === e && (e = 0);
var k = this._length, f = e | 0;
if (0 > f) {
f += k, 0 > f && (f = 0);
} else {
if (f >= k) {
return-1;
}
}
for (var d = this._buffer, k = this._length, b = this._offset, k = b + k, f = f + b;f < k;f++) {
if (d[f] === a) {
return f - b;
}
}
return-1;
};
e.prototype.lastIndexOf = function(a, e) {
void 0 === e && (e = 2147483647);
var k = this._length, f = e | 0;
if (0 > f) {
if (f += k, 0 > f) {
return-1;
}
} else {
f >= k && (f = k);
}
for (var k = this._buffer, d = this._offset, f = f + d;f-- > d;) {
if (k[f] === a) {
return f - d;
}
}
return-1;
};
e.prototype.map = function(a, m) {
c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError);
for (var k = new e, f = 0;f < this._length;f++) {
k.push(a.call(m, this._buffer[this._offset + f], f, this));
}
return k;
};
e.prototype.push = function(a, e, k, f, d, b, g, r) {
this._checkFixed();
this._ensureCapacity(this._length + arguments.length);
for (var c = 0;c < arguments.length;c++) {
this._buffer[this._offset + this._length++] = arguments[c];
}
};
e.prototype.pop = function() {
this._checkFixed();
if (0 === this._length) {
return e.DEFAULT_VALUE;
}
this._length--;
return this._buffer[this._offset + this._length];
};
e.prototype.reverse = function() {
for (var a = this._offset, e = this._offset + this._length - 1, k = this._buffer;a < e;) {
var f = k[a];
k[a] = k[e];
k[e] = f;
a++;
e--;
}
return this;
};
e.prototype.sort = function(a) {
if (0 === arguments.length) {
return Array.prototype.sort.call(this._view());
}
if (a instanceof Function) {
return Array.prototype.sort.call(this._view(), a);
}
var c = a | 0;
s(!(c & e.UNIQUESORT), "UNIQUESORT");
s(!(c & e.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY");
return c & e.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, f) {
return f - a;
}) : Array.prototype.sort.call(this._view(), function(a, f) {
return a - f;
});
};
e.prototype.shift = function() {
this._checkFixed();
if (0 === this._length) {
return 0;
}
this._length--;
return this._buffer[this._offset++];
};
e.prototype.unshift = function() {
this._checkFixed();
if (arguments.length) {
this._ensureCapacity(this._length + arguments.length);
this._slide(arguments.length);
this._offset -= arguments.length;
this._length += arguments.length;
for (var a = 0;a < arguments.length;a++) {
this._buffer[this._offset + a] = arguments[a];
}
}
};
e.prototype.slice = function(a, c) {
void 0 === a && (a = 0);
void 0 === c && (c = 2147483647);
var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, d), f), b = new e(f - d, this.fixed);
b._buffer.set(k.subarray(this._offset + d, this._offset + f), b._offset);
return b;
};
e.prototype.splice = function(a, c) {
var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), b = this._offset + d, g = Math.min(Math.max(c, 0), f - d), d = arguments.length - 2, r, m = new e(g, this.fixed);
0 < g && (r = k.subarray(b, b + g), m._buffer.set(r, m._offset));
this._ensureCapacity(f - g + d);
k.set(k.subarray(b + g, f), b + d);
this._length += d - g;
for (f = 0;f < d;f++) {
k[b + f] = arguments[f + 2];
}
return m;
};
e.prototype._slide = function(a) {
this._buffer.set(this._view(), this._offset + a);
this._offset += a;
};
Object.defineProperty(e.prototype, "length", {get:function() {
return this._length;
}, set:function(a) {
a >>>= 0;
if (a > this._length) {
this._ensureCapacity(a);
for (var c = this._offset + this._length, k = this._offset + a;c < k;c++) {
this._buffer[c] = e.DEFAULT_VALUE;
}
}
this._length = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "fixed", {get:function() {
return this._fixed;
}, set:function(a) {
this._fixed = !!a;
}, enumerable:!0, configurable:!0});
e.prototype._checkFixed = function() {
this._fixed && p("RangeError", h.Errors.VectorFixedError);
};
e.prototype.asGetNumericProperty = function(a) {
u(a, this._length);
return this._buffer[this._offset + a];
};
e.prototype.asSetNumericProperty = function(a, e) {
l(a, this._length, this._fixed);
a === this._length && (this._ensureCapacity(this._length + 1), this._length++);
this._buffer[this._offset + a] = e;
};
e.prototype.asHasProperty = function(a, m, k) {
if (e.prototype === this || !c.isNumeric(m)) {
return Object.prototype.asHasProperty.call(this, a, m, k);
}
a = c.toNumber(m);
return 0 <= a && a < this._length;
};
e.prototype.asNextName = function(a) {
return a - 1;
};
e.prototype.asNextValue = function(a) {
return this._buffer[this._offset + a - 1];
};
e.prototype.asNextNameIndex = function(a) {
a += 1;
return a <= this._length ? a : 0;
};
e.prototype.asHasNext2 = function(a) {
a.index = this.asNextNameIndex(a.index);
};
e.EXTRA_CAPACITY = 4;
e.INITIAL_CAPACITY = 10;
e.DEFAULT_VALUE = 0;
e.DESCENDING = 2;
e.UNIQUESORT = 4;
e.RETURNINDEXEDARRAY = 8;
e.instanceConstructor = e;
e.staticNatives = [e];
e.instanceNatives = [e.prototype];
e.callableConstructor = e.callable;
e.classInitializer = function() {
var a = e.prototype;
v(a, "$Bgjoin", a.join);
v(a, "$BgtoString", a.join);
v(a, "$BgtoLocaleString", a.toLocaleString);
v(a, "$Bgpop", a.pop);
v(a, "$Bgpush", a.push);
v(a, "$Bgreverse", a.reverse);
v(a, "$Bgconcat", a.concat);
v(a, "$Bgsplice", a.splice);
v(a, "$Bgslice", a.slice);
v(a, "$Bgshift", a.shift);
v(a, "$Bgunshift", a.unshift);
v(a, "$BgindexOf", a.indexOf);
v(a, "$BglastIndexOf", a.lastIndexOf);
v(a, "$BgforEach", a.forEach);
v(a, "$Bgmap", a.map);
v(a, "$Bgfilter", a.filter);
v(a, "$Bgsome", a.some);
v(a, "$Bgevery", a.every);
v(a, "$Bgsort", a.sort);
};
return e;
}(a.ASVector);
a.Uint32Vector = e;
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.assertNotImplemented, v = c.ObjectUtilities.defineNonEnumerableProperty, p = c.AVM2.Runtime.throwError, u = c.AVM2.Runtime.asCheckVectorGetNumericProperty, l = c.AVM2.Runtime.asCheckVectorSetNumericProperty, e = function(a) {
function e(a, c) {
void 0 === a && (a = 0);
void 0 === c && (c = !1);
a >>>= 0;
this._fixed = !!c;
this._buffer = new Float64Array(Math.max(e.INITIAL_CAPACITY, a + e.EXTRA_CAPACITY));
this._offset = 0;
this._length = a;
}
__extends(e, a);
e.prototype.newThisType = function() {
return new e;
};
e.callable = function(a) {
if (a instanceof e) {
return a;
}
var m = a.asGetProperty(void 0, "length");
if (void 0 !== m) {
for (var k = new e(m, !1), f = 0;f < m;f++) {
k.asSetNumericProperty(f, a.asGetPublicProperty(f));
}
return k;
}
c.Debug.unexpected();
};
e.prototype.internalToString = function() {
for (var a = "", e = this._offset, k = e + this._length, f = 0;f < this._buffer.length;f++) {
f === e && (a += "["), f === k && (a += "]"), a += this._buffer[f], f < this._buffer.length - 1 && (a += ",");
}
this._offset + this._length === this._buffer.length && (a += "]");
return a + ": offset: " + this._offset + ", length: " + this._length + ", capacity: " + this._buffer.length;
};
e.prototype.toString = function() {
for (var a = "", e = 0;e < this._length;e++) {
a += this._buffer[this._offset + e], e < this._length - 1 && (a += ",");
}
return a;
};
e.prototype.toLocaleString = function() {
for (var a = "", e = 0;e < this._length;e++) {
a += this._buffer[this._offset + e], e < this._length - 1 && (a += ",");
}
return a;
};
e.prototype._view = function() {
return this._buffer.subarray(this._offset, this._offset + this._length);
};
e.prototype._ensureCapacity = function(a) {
var e = this._offset + a;
e < this._buffer.length || (a <= this._buffer.length ? (e = this._buffer.length - a >> 2, this._buffer.set(this._view(), e), this._offset = e) : (a = (3 * this._buffer.length >> 1) + 1, a < e && (a = e), e = new Float64Array(a), e.set(this._buffer, 0), this._buffer = e));
};
e.prototype.concat = function() {
for (var a = this._length, c = 0;c < arguments.length;c++) {
var k = arguments[c];
k._buffer instanceof Float64Array || p("TypeError", h.Errors.CheckTypeFailedError, k.constructor.name, "__AS3__.vec.Vector.<Number>");
a += k._length;
}
var a = new e(a), f = a._buffer;
f.set(this._buffer);
for (var d = this._length, c = 0;c < arguments.length;c++) {
k = arguments[c], d + k._buffer.length < k._buffer.length ? f.set(k._buffer, d) : f.set(k._buffer.subarray(0, k._length), d), d += k._length;
}
return a;
};
e.prototype.every = function(a, e) {
for (var k = 0;k < this._length;k++) {
if (!a.call(e, this._buffer[this._offset + k], k, this)) {
return!1;
}
}
return!0;
};
e.prototype.filter = function(a, c) {
for (var k = new e, f = 0;f < this._length;f++) {
a.call(c, this._buffer[this._offset + f], f, this) && k.push(this._buffer[this._offset + f]);
}
return k;
};
e.prototype.some = function(a, e) {
2 !== arguments.length ? p("ArgumentError", h.Errors.WrongArgumentCountError) : c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError);
for (var k = 0;k < this._length;k++) {
if (a.call(e, this._buffer[this._offset + k], k, this)) {
return!0;
}
}
return!1;
};
e.prototype.forEach = function(a, e) {
for (var k = 0;k < this._length;k++) {
a.call(e, this._buffer[this._offset + k], k, this);
}
};
e.prototype.join = function(a) {
void 0 === a && (a = ",");
for (var e = this.length, k = this._buffer, f = this._offset, d = "", b = 0;b < e - 1;b++) {
d += k[f + b] + a;
}
0 < e && (d += k[f + e - 1]);
return d;
};
e.prototype.indexOf = function(a, e) {
void 0 === e && (e = 0);
var k = this._length, f = e | 0;
if (0 > f) {
f += k, 0 > f && (f = 0);
} else {
if (f >= k) {
return-1;
}
}
for (var d = this._buffer, k = this._length, b = this._offset, k = b + k, f = f + b;f < k;f++) {
if (d[f] === a) {
return f - b;
}
}
return-1;
};
e.prototype.lastIndexOf = function(a, e) {
void 0 === e && (e = 2147483647);
var k = this._length, f = e | 0;
if (0 > f) {
if (f += k, 0 > f) {
return-1;
}
} else {
f >= k && (f = k);
}
for (var k = this._buffer, d = this._offset, f = f + d;f-- > d;) {
if (k[f] === a) {
return f - d;
}
}
return-1;
};
e.prototype.map = function(a, m) {
c.isFunction(a) || p("ArgumentError", h.Errors.CheckTypeFailedError);
for (var k = new e, f = 0;f < this._length;f++) {
k.push(a.call(m, this._buffer[this._offset + f], f, this));
}
return k;
};
e.prototype.push = function(a, e, k, f, d, b, g, r) {
this._checkFixed();
this._ensureCapacity(this._length + arguments.length);
for (var c = 0;c < arguments.length;c++) {
this._buffer[this._offset + this._length++] = arguments[c];
}
};
e.prototype.pop = function() {
this._checkFixed();
if (0 === this._length) {
return e.DEFAULT_VALUE;
}
this._length--;
return this._buffer[this._offset + this._length];
};
e.prototype.reverse = function() {
for (var a = this._offset, e = this._offset + this._length - 1, k = this._buffer;a < e;) {
var f = k[a];
k[a] = k[e];
k[e] = f;
a++;
e--;
}
return this;
};
e.prototype.sort = function(a) {
if (0 === arguments.length) {
return Array.prototype.sort.call(this._view());
}
if (a instanceof Function) {
return Array.prototype.sort.call(this._view(), a);
}
var c = a | 0;
s(!(c & e.UNIQUESORT), "UNIQUESORT");
s(!(c & e.RETURNINDEXEDARRAY), "RETURNINDEXEDARRAY");
return c & e.DESCENDING ? Array.prototype.sort.call(this._view(), function(a, e) {
return e - a;
}) : Array.prototype.sort.call(this._view(), function(a, e) {
return a - e;
});
};
e.prototype.shift = function() {
this._checkFixed();
if (0 === this._length) {
return 0;
}
this._length--;
return this._buffer[this._offset++];
};
e.prototype.unshift = function() {
this._checkFixed();
if (arguments.length) {
this._ensureCapacity(this._length + arguments.length);
this._slide(arguments.length);
this._offset -= arguments.length;
this._length += arguments.length;
for (var a = 0;a < arguments.length;a++) {
this._buffer[this._offset + a] = arguments[a];
}
}
};
e.prototype.slice = function(a, c) {
void 0 === a && (a = 0);
void 0 === c && (c = 2147483647);
var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), f = Math.min(Math.max(c, d), f), b = new e(f - d, this.fixed);
b._buffer.set(k.subarray(this._offset + d, this._offset + f), b._offset);
return b;
};
e.prototype.splice = function(a, c) {
var k = this._buffer, f = this._length, d = Math.min(Math.max(a, 0), f), b = this._offset + d, g = Math.min(Math.max(c, 0), f - d), d = arguments.length - 2, r, m = new e(g, this.fixed);
0 < g && (r = k.subarray(b, b + g), m._buffer.set(r, m._offset));
this._ensureCapacity(f - g + d);
k.set(k.subarray(b + g, f), b + d);
this._length += d - g;
for (f = 0;f < d;f++) {
k[b + f] = arguments[f + 2];
}
return m;
};
e.prototype._slide = function(a) {
this._buffer.set(this._view(), this._offset + a);
this._offset += a;
};
Object.defineProperty(e.prototype, "length", {get:function() {
return this._length;
}, set:function(a) {
a >>>= 0;
if (a > this._length) {
this._ensureCapacity(a);
for (var c = this._offset + this._length, k = this._offset + a;c < k;c++) {
this._buffer[c] = e.DEFAULT_VALUE;
}
}
this._length = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "fixed", {get:function() {
return this._fixed;
}, set:function(a) {
this._fixed = !!a;
}, enumerable:!0, configurable:!0});
e.prototype._checkFixed = function() {
this._fixed && p("RangeError", h.Errors.VectorFixedError);
};
e.prototype.asGetNumericProperty = function(a) {
u(a, this._length);
return this._buffer[this._offset + a];
};
e.prototype.asSetNumericProperty = function(a, e) {
l(a, this._length, this._fixed);
a === this._length && (this._ensureCapacity(this._length + 1), this._length++);
this._buffer[this._offset + a] = e;
};
e.prototype.asHasProperty = function(a, m, k) {
if (e.prototype === this || !c.isNumeric(m)) {
return Object.prototype.asHasProperty.call(this, a, m, k);
}
a = c.toNumber(m);
return 0 <= a && a < this._length;
};
e.prototype.asNextName = function(a) {
return a - 1;
};
e.prototype.asNextValue = function(a) {
return this._buffer[this._offset + a - 1];
};
e.prototype.asNextNameIndex = function(a) {
a += 1;
return a <= this._length ? a : 0;
};
e.prototype.asHasNext2 = function(a) {
a.index = this.asNextNameIndex(a.index);
};
e.EXTRA_CAPACITY = 4;
e.INITIAL_CAPACITY = 10;
e.DEFAULT_VALUE = 0;
e.DESCENDING = 2;
e.UNIQUESORT = 4;
e.RETURNINDEXEDARRAY = 8;
e.instanceConstructor = e;
e.staticNatives = [e];
e.instanceNatives = [e.prototype];
e.callableConstructor = e.callable;
e.classInitializer = function() {
var a = e.prototype;
v(a, "$Bgjoin", a.join);
v(a, "$BgtoString", a.join);
v(a, "$BgtoLocaleString", a.toLocaleString);
v(a, "$Bgpop", a.pop);
v(a, "$Bgpush", a.push);
v(a, "$Bgreverse", a.reverse);
v(a, "$Bgconcat", a.concat);
v(a, "$Bgsplice", a.splice);
v(a, "$Bgslice", a.slice);
v(a, "$Bgshift", a.shift);
v(a, "$Bgunshift", a.unshift);
v(a, "$BgindexOf", a.indexOf);
v(a, "$BglastIndexOf", a.lastIndexOf);
v(a, "$BgforEach", a.forEach);
v(a, "$Bgmap", a.map);
v(a, "$Bgfilter", a.filter);
v(a, "$Bgsome", a.some);
v(a, "$Bgevery", a.every);
v(a, "$Bgsort", a.sort);
};
return e;
}(a.ASVector);
a.Float64Vector = e;
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(b) {
return b instanceof a.ASXML || b instanceof a.ASXMLList;
}
function v(b) {
if (!(b instanceof a.ASXML)) {
return String(b);
}
switch(b._kind) {
case 3:
;
case 2:
return b._value;
default:
if (b.hasSimpleContent()) {
for (var d = "", g = 0;g < b._children.length;g++) {
var e = b._children[g];
4 !== e._kind && 5 !== e._kind && (d += v(e));
}
return d;
}
return q(b);
}
}
function p(b) {
for (var a = 0, d;a < b.length && "&" !== (d = b[a]) && "<" !== d && ">" !== d;) {
a++;
}
if (a >= b.length) {
return b;
}
for (var g = b.substring(0, a);a < b.length;) {
switch(d = b[a++], d) {
case "&":
g += "&amp;";
break;
case "<":
g += "&lt;";
break;
case ">":
g += "&gt;";
break;
default:
g += d;
}
}
return g;
}
function u(b) {
for (var a = 0, d;a < b.length && "&" !== (d = b[a]) && "<" !== d && '"' !== d && "\n" !== d && "\r" !== d && "\t" !== d;) {
a++;
}
if (a >= b.length) {
return b;
}
for (var g = b.substring(0, a);a < b.length;) {
switch(d = b[a++], d) {
case "&":
g += "&amp;";
break;
case "<":
g += "&lt;";
break;
case '"':
g += "&quot;";
break;
case "\n":
g += "&#xA;";
break;
case "\r":
g += "&#xD;";
break;
case "\t":
g += "&#x9;";
break;
default:
g += d;
}
}
return g;
}
function l(b, a) {
var d = b[a];
return " " === d || "\n" === d || "\r" === d || "\t" === d;
}
function e(b) {
for (var a = 0;a < b.length && l(b, a);) {
a++;
}
if (a >= b.length) {
return "";
}
for (var d = b.length - 1;l(b, d);) {
d--;
}
return 0 === a && d === b.length - 1 ? b : b.substring(a, d + 1);
}
function m(b) {
if (0 < b) {
if (void 0 !== F[b]) {
return F[b];
}
for (var a = "", d = 0;d < b;d++) {
a += " ";
}
return F[b] = a;
}
return "";
}
function t(b) {
for (var a = 1, d;;) {
d = "_ns" + a;
if (!b.some(function(b) {
return b.prefix == d;
})) {
break;
}
a++;
}
return d;
}
function q(b, d, g) {
if (null === b || void 0 === b) {
throw new TypeError;
}
if (!(b instanceof P)) {
return b instanceof V ? b._children.map(function(b) {
return q(b, d);
}).join(P.prettyPrinting ? "\n" : "") : p(String(b));
}
var f = P.prettyPrinting;
g |= 0;
var k = f ? m(g) : "", r = b._kind;
switch(r) {
case 3:
return f ? k + p(e(b._value)) : p(b._value);
case 2:
return k + u(b._value);
case 4:
return k + "\x3c!--" + b._value + "--\x3e";
case 5:
return k + "<?" + b._name.localName + " " + b._value + "?>";
default:
z(1 === r);
}
d = d || [];
for (var c = [], w = 0;b._inScopeNamespaces && w < b._inScopeNamespaces.length;w++) {
var l = b._inScopeNamespaces[w].prefix, n = b._inScopeNamespaces[w].uri;
d.every(function(b) {
return b.uri != n || b.prefix != l;
}) && (r = new a.ASNamespace(l, n), c.push(r));
}
var s = d.concat(c), r = b._name.getNamespace(s);
void 0 === r.prefix && (w = t(s), w = new a.ASNamespace(w, r.uri), c.push(w), s.push(w));
var h = (r.prefix ? r.prefix + ":" : "") + b._name.localName, k = k + ("<" + h);
b._attributes && b._attributes.forEach(function(b) {
b = b._name.getNamespace(s);
if (void 0 === b.prefix) {
var d = t(s);
b = new a.ASNamespace(d, b.uri);
c.push(b);
s.push(b);
}
});
for (w = 0;w < c.length;w++) {
r = c[w], k += " " + (r.prefix ? "xmlns:" + r.prefix : "xmlns") + '="' + u(r.uri) + '"';
}
b._attributes && b._attributes.forEach(function(b) {
var a = b._name, g = a.getNamespace(d);
k += " " + (g.prefix ? g.prefix + ":" + a.localName : a.localName) + '="' + u(b._value) + '"';
});
if (0 === b.length()) {
return k += "/>";
}
var k = k + ">", A = 1 < b._children.length || 1 === b._children.length && 3 !== b._children[0]._kind, v = f && A ? g + P.prettyIndent : 0;
b._children.forEach(function(b, a) {
f && A && (k += "\n");
var d = q(b, s, v);
k += d;
});
f && A && (k += "\n" + m(g));
return k += "</" + h + ">";
}
function n(b) {
if (null === b) {
throw new TypeError(h.formatErrorMessage(h.Errors.ConvertNullToObjectError));
}
if (void 0 === b) {
throw new TypeError(h.formatErrorMessage(h.Errors.ConvertUndefinedToObjectError));
}
if (b instanceof P) {
return b;
}
if (b instanceof V) {
return 1 !== b._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLMarkupMustBeWellFormed), b._children[0];
}
b = I.parseFromString(M(b));
var a = b.length();
if (0 === a) {
return w(3);
}
if (1 === a) {
return b._children[0]._parent = null, b._children[0];
}
h.Runtime.throwError("TypeError", h.Errors.XMLMarkupMustBeWellFormed);
}
function k(b, a) {
z(!(b instanceof V));
null === b && h.Runtime.throwError("TypeError", h.Errors.ConvertNullToObjectError);
void 0 === b && h.Runtime.throwError("TypeError", h.Errors.ConvertUndefinedToObjectError);
if (b instanceof P) {
a.append(b);
} else {
var d = n('<parent xmlns="' + u(P.defaultNamespace) + '">' + b + "</parent>")._children;
if (d) {
for (var g = 0;g < d.length;g++) {
var e = d[g];
e._parent = null;
a.append(e);
}
}
}
}
function f(b) {
void 0 !== b && null !== b && "boolean" !== typeof b && "number" !== typeof b || h.Runtime.throwError("TypeError", h.Errors.ConvertUndefinedToObjectError);
if ("object" === typeof b) {
if (b instanceof Q) {
return new a.ASQName(b.uri, b.localName, !0);
}
if (A.isQName(b)) {
return Q.fromMultiname(b);
}
}
b = v(b);
return new a.ASQName(void 0, b, !0);
}
function d(b) {
if (void 0 === b) {
return new a.ASQName("*");
}
if ("object" === typeof b && null !== b) {
if (b instanceof Q) {
return b;
}
if (A.isQName(b)) {
return Q.fromMultiname(b);
}
var d;
d = b instanceof P || b instanceof V ? v(b) : b instanceof A ? b.name : b.toString();
} else {
if ("string" === typeof b) {
d = b;
} else {
throw new TypeError;
}
}
return "@" === d[0] ? f(d.substring(1)) : new a.ASQName(void 0, d, !!(b.flags & 1));
}
function b(b) {
return b instanceof Q && !!(b.name.flags & 1);
}
function g(b, d, g) {
return b && 1 === b.length && b[0] instanceof G && ("string" === typeof d || void 0 === d) ? new a.ASQName(b[0], d || "*", g) : d;
}
function r(b) {
try {
new a.ASQName(b);
} catch (d) {
return!1;
}
return!0;
}
function w(b, d, g, e) {
var f = new a.ASXML;
void 0 === b && (b = 3);
void 0 === d && (d = "");
void 0 === g && (g = "");
f.init(b, d, g, e);
return f;
}
var z = c.Debug.assert, A = c.AVM2.ABC.Multiname, B = c.Debug.notImplemented, M = c.AVM2.Runtime.asCoerceString, N = c.ObjectUtilities.defineNonEnumerableProperty, K = c.ObjectUtilities.createPublicAliases, y = Object.prototype.asGetProperty, D = Object.prototype.asSetProperty, L = Object.prototype.asCallProperty, H = Object.prototype.asHasProperty, J = Object.prototype.asHasOwnProperty, C = Object.prototype.asDeleteProperty, E = Object.prototype.asGetEnumerableKeys;
a.escapeElementValue = p;
a.escapeAttributeValue = u;
var F = [];
a.isXMLName = r;
c.AVM2.AS.Natives.isXMLName = r;
var I = new function() {
function b(a, d) {
function g(b) {
return b.replace(/&([^;]+);/g, function(b, a) {
if ("#x" === a.substring(0, 2)) {
return String.fromCharCode(parseInt(a.substring(2), 16));
}
if ("#" === a.substring(0, 1)) {
return String.fromCharCode(parseInt(a.substring(1), 10));
}
switch(a) {
case "lt":
return "<";
case "gt":
return ">";
case "amp":
return "&";
case "quot":
return'"';
}
return b;
});
}
function f() {
for (var b = q.length - 1;0 <= b;--b) {
if ("preserve" === q[b].space) {
return!0;
}
}
return!1;
}
function k() {
for (var b = q.length - 1;0 <= b;--b) {
if ("xmlns" in q[b]) {
return q[b].xmlns;
}
}
return "";
}
function r(b) {
for (var a = q.length - 1;0 <= a;--a) {
if (b in q[a].lookup) {
return q[a].lookup[b];
}
}
}
function c(b, a) {
var d = b.indexOf(":");
if (0 <= d) {
var g = b.substring(0, d), e = r(g);
if (void 0 === e) {
throw "Unknown namespace: " + g;
}
d = b.substring(d + 1);
return{name:e + "::" + d, localName:d, prefix:g, namespace:e};
}
return a ? {name:b, localName:b, prefix:"", namespace:k()} : {name:b, localName:b, prefix:"", namespace:""};
}
function m(b, a) {
function d() {
for (;e < b.length && l(b, e);) {
++e;
}
}
for (var e = a, f, k = [];e < b.length && !l(b, e) && ">" !== b[e] && "/" !== b[e];) {
++e;
}
f = b.substring(a, e);
for (d();e < b.length && ">" !== b[e] && "/" !== b[e] && "?" !== b[e];) {
d();
for (var r = "", c = "";e < b.length && !l(b, e) && "=" !== b[e];) {
r += b[e], ++e;
}
d();
if ("=" !== b[e]) {
throw "'=' expected";
}
++e;
d();
c = b[e];
if ('"' !== c && "'" !== c) {
throw "Quote expected";
}
var w = b.indexOf(c, ++e);
if (0 > w) {
throw "Unexpected EOF[6]";
}
c = b.substring(e, w);
k.push({name:r, value:g(c)});
e = w + 1;
d();
}
return{name:f, attributes:k, parsed:e - a};
}
function w(b, a) {
for (var d = a, g;d < b.length && !l(b, d) && ">" !== b[d] && "/" !== b[d];) {
++d;
}
for (g = b.substring(a, d);d < b.length && l(b, d);) {
++d;
}
for (var e = d;d < b.length && ("?" !== b[d] || ">" != b[d + 1]);) {
++d;
}
return{name:g, value:b.substring(e, d), parsed:d - a};
}
for (var n = 0, q = [{namespaces:[], lookup:{xmlns:"http://www.w3.org/2000/xmlns/", xml:"http://www.w3.org/XML/1998/namespace"}, inScopes:P.defaultNamespace ? [{uri:P.defaultNamespace, prefix:""}] : [], space:"default", xmlns:P.defaultNamespace || ""}];n < a.length;) {
var z = n;
if ("<" === a[n]) {
switch(++z, a[z]) {
case "/":
++z;
n = a.indexOf(">", z);
if (0 > n) {
throw "Unexpected EOF[1]";
}
z = c(a.substring(z, n), !0);
d.endElement(z);
q.pop();
z = n + 1;
break;
case "?":
++z;
n = w(a, z);
if ("?>" != a.substring(z + n.parsed, z + n.parsed + 2)) {
throw "Unexpected EOF[2]";
}
d.pi(n.name, n.value);
z += n.parsed + 2;
break;
case "!":
if ("--" === a.substring(z + 1, z + 3)) {
n = a.indexOf("--\x3e", z + 3);
if (0 > n) {
throw "Unexpected EOF[3]";
}
d.comment(a.substring(z + 3, n));
z = n + 3;
} else {
if ("[CDATA[" === a.substring(z + 1, z + 8)) {
n = a.indexOf("]]\x3e", z + 8);
if (0 > n) {
throw "Unexpected EOF[4]";
}
d.cdata(a.substring(z + 8, n));
z = n + 3;
} else {
if ("DOCTYPE" === a.substring(z + 1, z + 8)) {
var t = a.indexOf("[", z + 8), s = !1, n = a.indexOf(">", z + 8);
if (0 > n) {
throw "Unexpected EOF[5]";
}
if (0 < t && n > t) {
n = a.indexOf("]>", z + 8);
if (0 > n) {
throw "Unexpected EOF[7]";
}
s = !0;
}
d.doctype(a.substring(z + 8, n + (s ? 1 : 0)));
z = n + (s ? 2 : 1);
} else {
throw "Unknown !tag";
}
}
}
break;
default:
t = m(a, z);
s = !1;
if ("/>" === a.substring(z + t.parsed, z + t.parsed + 2)) {
s = !0;
} else {
if (">" !== a.substring(z + t.parsed, z + t.parsed + 1)) {
throw "Unexpected EOF[2]";
}
}
for (var h = {namespaces:[], lookup:Object.create(null)}, A = t.attributes, n = 0;n < A.length;++n) {
var p = A[n], v = p.name;
if ("xmlns:" === v.substring(0, 6)) {
v = v.substring(6), p = p.value, r(v) !== p && (h.lookup[v] = e(p), h.namespaces.push({uri:p, prefix:v})), delete A[n];
} else {
if ("xmlns" === v) {
p = p.value, k() !== p && (h.xmlns = e(p), h.namespaces.push({uri:p, prefix:""})), delete A[n];
} else {
if ("xml:" === v.substring(0, 4)) {
var B = v.substring(4);
if ("space" !== B && "lang" !== B && "base" !== B && "id" !== B) {
throw "Invalid xml attribute: " + v;
}
h[B] = e(p.value);
} else {
if ("xml" === v.substring(0, 3)) {
throw "Invalid xml attribute";
}
}
}
}
}
var u = [];
h.namespaces.forEach(function(b) {
b.prefix && h.lookup[b.prefix] !== b.uri || u.push(b);
});
q[q.length - 1].inScopes.forEach(function(b) {
(!b.prefix || b.prefix in h.lookup) && (b.prefix || "xmlns" in h) || u.push(b);
});
h.inScopes = u;
q.push(h);
v = [];
for (n = 0;n < A.length;++n) {
(p = A[n]) && v.push({name:c(p.name, !1), value:p.value});
}
d.beginElement(c(t.name, !0), v, u, s);
z += t.parsed + (s ? 2 : 1);
s && q.pop();
}
} else {
for (;z++ < a.length && "<" !== a[z];) {
}
d.text(g(a.substring(n, z)), f());
}
n = z;
}
}
this.parseFromString = function(d, g) {
var f = w(1, "", "", ""), k = [];
b(d, {beginElement:function(b, d, g, e) {
var r = f;
k.push(r);
f = w(1, b.namespace, b.localName, b.prefix);
for (b = 0;b < d.length;++b) {
var c = d[b], m = w(2, c.name.namespace, c.name.localName, c.name.prefix);
m._value = c.value;
m._parent = f;
f._attributes.push(m);
}
for (b = 0;b < g.length;++b) {
d = g[b], d = new a.ASNamespace(d.prefix, d.uri), f._inScopeNamespaces.push(d);
}
r.insert(r.length(), f);
e && (f = k.pop());
}, endElement:function(b) {
f = k.pop();
}, text:function(b, a) {
P.ignoreWhitespace && (b = e(b));
if (!(0 === b.length || a && P.ignoreWhitespace)) {
var d = w(3, "", "", void 0);
d._value = b;
f.insert(f.length(), d);
}
}, cdata:function(b) {
var a = w(3, "", "", void 0);
a._value = b;
f.insert(f.length(), a);
}, comment:function(b) {
if (!P.ignoreComments) {
var a = w(4, "", "", void 0);
a._value = b;
f.insert(f.length(), a);
}
}, pi:function(b, a) {
if (!P.ignoreProcessingInstructions) {
var d = w(5, "", b, void 0);
d._value = a;
f.insert(f.length(), d);
}
}, doctype:function(b) {
}});
return f;
};
}, G = function(b) {
function d(b, a) {
var g = "", e = "";
0 !== arguments.length && (1 === arguments.length ? (g = b, c.isObject(g) && g instanceof d ? (e = g.prefix, g = g.uri) : c.isObject(g) && g instanceof Q && null !== g.uri ? g = g.uri : (g = v(g), e = "" === g ? "" : void 0)) : (g = a, g = c.isObject(g) && g instanceof Q && null !== g.uri ? g.uri : v(g), "" === g ? void 0 === b || "" === v(b) ? e = "" : h.Runtime.throwError("TypeError", h.Errors.XMLNamespaceWithPrefixAndNoURI, b) : e = void 0 === b ? void 0 : !1 === r(b) ? void 0 : v(b)));
this._ns = Namespace.createNamespace(g, e);
}
__extends(d, b);
d.prototype.equals = function(b) {
return b instanceof d && b._ns.uri === this._ns.uri || "string" === typeof b && this._ns.uri === b;
};
Object.defineProperty(d.prototype, "prefix", {get:function() {
return this._ns.prefix;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "uri", {get:function() {
return this._ns.uri;
}, enumerable:!0, configurable:!0});
d.prototype.toString = function() {
return this === d.prototype ? "" : this._ns.uri;
};
d.prototype.valueOf = function() {
return this === d.prototype ? "" : this._ns.uri;
};
d.staticNatives = null;
d.instanceNatives = null;
d.instanceConstructor = d;
d.classInitializer = function() {
var b = d.prototype;
N(b, "$BgtoString", b.toString);
};
d.callableConstructor = function(b, g) {
if (1 === arguments.length && c.isObject(b) && b instanceof d) {
return b;
}
switch(arguments.length) {
case 0:
return new a.ASNamespace;
case 1:
return new a.ASNamespace(b);
default:
return new a.ASNamespace(b, g);
}
};
return d;
}(a.ASObject);
a.ASNamespace = G;
var Z;
(function(b) {
b[b.ATTR_NAME = 1] = "ATTR_NAME";
b[b.ELEM_NAME = 2] = "ELEM_NAME";
b[b.ANY_NAME = 4] = "ANY_NAME";
b[b.ANY_NAMESPACE = 8] = "ANY_NAMESPACE";
})(Z || (Z = {}));
var Q = function(b) {
function d(b, g, e) {
var f, k;
0 === arguments.length ? f = "" : 1 === arguments.length ? f = b : (k = b, f = g);
if (c.isObject(f) && f instanceof d) {
if (2 > arguments.length) {
return f;
}
f = f.localName;
}
f = void 0 === f || 0 === arguments.length ? "" : v(f);
if (void 0 === k || 2 > arguments.length) {
k = "*" === f ? null : new a.ASNamespace("", P.defaultNamespace);
}
var r = f;
null !== k && (k = k instanceof G ? k : new a.ASNamespace(k));
var m = e ? 1 : 2;
"*" === f && (m |= 4);
null === k && (m |= 8);
this.name = new A([k ? k._ns : null], r, m);
}
__extends(d, b);
d.fromMultiname = function(b) {
var a = Object.create(d.prototype);
a.name = b;
return a;
};
d.prototype.equals = function(b) {
return b instanceof d && b.uri === this.uri && b.name.name === this.name.name || "string" === typeof b && this.toString() === b;
};
Object.defineProperty(d.prototype, "localName", {get:function() {
return this.name.name;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "uri", {get:function() {
return this.name.namespaces[0] ? this.name.namespaces[0].uri : null;
}, enumerable:!0, configurable:!0});
d.prototype.setUri = function() {
this.name.namespaces[0] || this.name.namespaces.push(Namespace.createNamespace(""));
this.name.namespaces[0].uri = "";
};
d.prototype.toString = function() {
var b = this.uri;
return b ? b + "::" + this.name.name : this.name.name;
};
Object.defineProperty(d.prototype, "prefix", {get:function() {
return this.name.namespaces[0] ? this.name.namespaces[0].prefix : null;
}, enumerable:!0, configurable:!0});
d.prototype.getNamespace = function(b) {
if (null === this.uri) {
throw "TypeError in QName.prototype.getNamespace()";
}
b || (b = []);
for (var d, g = 0;g < b.length;g++) {
this.uri === b[g].uri && (d = b[g]);
}
d || (d = new a.ASNamespace(this.prefix, this.uri));
return d;
};
Object.defineProperty(d.prototype, "flags", {get:function() {
return this.name.flags;
}, enumerable:!0, configurable:!0});
d.instanceConstructor = d;
d.callableConstructor = function(b, g) {
if (1 === arguments.length && c.isObject(b) && b instanceof d) {
return b;
}
switch(arguments.length) {
case 0:
return new a.ASQName;
case 1:
return new a.ASQName(b);
default:
return new a.ASQName(b, g);
}
};
return d;
}(a.ASNative);
a.ASQName = Q;
var S;
(function(b) {
b[b.FLAG_IGNORE_COMMENTS = 1] = "FLAG_IGNORE_COMMENTS";
b[b.FLAG_IGNORE_PROCESSING_INSTRUCTIONS = 2] = "FLAG_IGNORE_PROCESSING_INSTRUCTIONS";
b[b.FLAG_IGNORE_WHITESPACE = 4] = "FLAG_IGNORE_WHITESPACE";
b[b.FLAG_PRETTY_PRINTING = 8] = "FLAG_PRETTY_PRINTING";
b[b.ALL = b.FLAG_IGNORE_COMMENTS | b.FLAG_IGNORE_PROCESSING_INSTRUCTIONS | b.FLAG_IGNORE_WHITESPACE | b.FLAG_PRETTY_PRINTING] = "ALL";
})(S || (S = {}));
(function(b) {
b[b.Unknown = 0] = "Unknown";
b[b.Element = 1] = "Element";
b[b.Attribute = 2] = "Attribute";
b[b.Text = 3] = "Text";
b[b.Comment = 4] = "Comment";
b[b.ProcessingInstruction = 5] = "ProcessingInstruction";
})(a.ASXMLKind || (a.ASXMLKind = {}));
var O = [null, "element", "attribute", "text", "comment", "processing-instruction"], P = function(e) {
function f(b) {
this._parent = null;
c.isNullOrUndefined(b) && (b = "");
if ("string" === typeof b && 0 === b.length) {
this._kind = 3, this._value = "";
} else {
var a = n(b);
s(b) && (a = a._deepCopy());
return a;
}
}
__extends(f, e);
f.native_settings = function() {
return{$BgignoreComments:f.ignoreComments, $BgignoreProcessingInstructions:f.ignoreProcessingInstructions, $BgignoreWhitespace:f.ignoreWhitespace, $BgprettyPrinting:f.prettyPrinting, $BgprettyIndent:f.prettyIndent};
};
f.native_setSettings = function(b) {
c.isNullOrUndefined(b) ? (f.ignoreComments = !0, f.ignoreProcessingInstructions = !0, f.ignoreWhitespace = !0, f.prettyPrinting = !0, f.prettyIndent = 2) : ("boolean" === typeof b.$BgignoreComments && (f.ignoreComments = b.$BgignoreComments), "boolean" === typeof b.$BgignoreProcessingInstructions && (f.ignoreProcessingInstructions = b.$BgignoreProcessingInstructions), "boolean" === typeof b.$BgignoreWhitespace && (f.ignoreWhitespace = b.$BgignoreWhitespace), "boolean" === b.$BgprettyPrinting &&
(f.prettyPrinting = b.$BgprettyPrinting), "number" === b.$BgprettyIndent && (f.prettyIndent = b.$BgprettyIndent));
};
f.native_defaultSettings = function() {
return{$BgignoreComments:!0, $BgignoreProcessingInstructions:!0, $BgignoreWhitespace:!0, $BgprettyPrinting:!0, $BgprettyIndent:2};
};
f.prototype.valueOf = function() {
return this;
};
f.prototype.equals = function(b) {
return b instanceof V ? b.equals(this) : b instanceof f ? (3 === this._kind || 2 === this._kind) && b.hasSimpleContent() || (3 === b._kind || 2 === b._kind) && this.hasSimpleContent() ? this.toString() === b.toString() : this._deepEquals(b) : this.hasSimpleContent() && this.toString() === M(b);
};
f.prototype.init = function(b, d, g, f) {
d = d || f ? new a.ASNamespace(f, d) : void 0;
this._name = new a.ASQName(d, g, 2 === b);
this._kind = b;
this._parent = null;
switch(b) {
case 1:
this._inScopeNamespaces = [];
this._attributes = [];
this._children = [];
break;
case 4:
;
case 5:
;
case 2:
;
case 3:
this._value = "";
}
return this;
};
f.prototype._deepEquals = function(b) {
if (!(b instanceof f) || this._kind !== b._kind || !!this._name !== !!b._name || this._name && !this._name.equals(b._name)) {
return!1;
}
if (1 !== this._kind) {
return this._value !== b._value ? !1 : !0;
}
var a = this._attributes, d = b._attributes;
if (a.length !== d.length) {
return!1;
}
var g = this._children;
b = b._children;
if (g.length !== b.length) {
return!1;
}
var e = 0;
a: for (;e < a.length;e++) {
for (var k = a[e], r = 0;r < d.length;r++) {
var c = d[r];
if (c._name.equals(k._name) && c._value === k._value) {
continue a;
}
}
return!1;
}
for (e = 0;e < g.length;e++) {
if (!g[e].equals(b[e])) {
return!1;
}
}
return!0;
};
f.prototype._deepCopy = function() {
var b = this._kind, d = new a.ASXML;
d._kind = b;
d._name = this._name;
switch(b) {
case 1:
d._inScopeNamespaces = [];
0 < this._inScopeNamespaces.length && this._inScopeNamespaces.forEach(function(b) {
d._inScopeNamespaces.push(new a.ASNamespace(b.prefix, b.uri));
});
d._attributes = this._attributes.map(function(b) {
b = b._deepCopy();
b._parent = d;
return b;
});
d._children = this._children.map(function(b) {
b = b._deepCopy();
b._parent = d;
return b;
});
break;
case 4:
;
case 5:
;
case 2:
;
case 3:
d._value = this._value;
}
return d;
};
f.prototype.resolveValue = function() {
return this;
};
f.prototype._addInScopeNamespaces = function(b) {
this._inScopeNamespaces.some(function(a) {
return a.uri === b.uri && a.prefix === b.prefix;
}) || this._inScopeNamespaces.push(b);
};
Object.defineProperty(f, "ignoreComments", {get:function() {
return!!(f._flags & 1);
}, set:function(b) {
f._flags = b ? f._flags | 1 : f._flags & -2;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f, "ignoreProcessingInstructions", {get:function() {
return!!(f._flags & 2);
}, set:function(b) {
f._flags = b ? f._flags | 2 : f._flags & -3;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f, "ignoreWhitespace", {get:function() {
return!!(f._flags & 4);
}, set:function(b) {
f._flags = b ? f._flags | 4 : f._flags & -5;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f, "prettyPrinting", {get:function() {
return!!(f._flags & 8);
}, set:function(b) {
f._flags = b ? f._flags | 8 : f._flags & -9;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f, "prettyIndent", {get:function() {
return f._prettyIndent;
}, set:function(b) {
f._prettyIndent = b | 0;
}, enumerable:!0, configurable:!0});
f.prototype.toString = function() {
return f.isTraitsOrDynamicPrototype(this) ? "" : this.hasComplexContent() ? this.toXMLString() : v(this);
};
f.prototype.native_hasOwnProperty = function(b) {
if (f.isTraitsOrDynamicPrototype(this)) {
return a.ASObject.prototype.native_hasOwnProperty.call(this, b);
}
var g = d(b);
return this.hasProperty(g, !!(g.flags & 1), !1) ? !0 : J.call(this, String(b));
};
f.prototype.native_propertyIsEnumerable = function(b) {
void 0 === b && (b = void 0);
return "0" === String(b);
};
f.prototype.addNamespace = function(b) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
this._addInScopeNamespaces(new a.ASNamespace(b));
return this;
};
f.prototype.appendChild = function(b) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
if (b._parent) {
var a = b._parent._children.indexOf(b);
z(0 <= a);
b._parent._children.splice(a, 1);
}
this._children.push(b);
b._parent = this;
return this;
};
f.prototype.attribute = function(b) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this.getProperty(b, !0);
};
f.prototype.attributes = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
var b = a.ASXMLList.createList(this, this._name);
Array.prototype.push.apply(b._children, this._attributes);
return b;
};
f.prototype.child = function(d) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
if (c.isIndex(d)) {
var g = a.ASXMLList.createList();
this._children && d < this._children.length && g.append(this._children[d | 0]);
return g;
}
return this.getProperty(d, b(d));
};
f.prototype.childIndex = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this._parent && 2 !== this._kind ? this._parent._children.indexOf(this) : -1;
};
f.prototype.children = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
var b = a.ASXMLList.createList(this, this._name);
Array.prototype.push.apply(b._children, this._children);
return b;
};
f.prototype.comments = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
var b = a.ASXMLList.createList(this, this._name);
this._children && this._children.forEach(function(a, d) {
4 === a._kind && b.append(a);
});
return b;
};
f.prototype.contains = function(b) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this === b;
};
f.prototype.copy = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this._deepCopy();
};
f.prototype.descendants = function(b) {
void 0 === b && (b = "*");
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
var g = a.ASXMLList.createList(this, this._name);
b = d(b);
return this.descendantsInto(b, g);
};
f.prototype.elements = function(b) {
void 0 === b && (b = "*");
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this.getProperty(b, !1);
};
f.prototype.hasComplexContent = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return 2 === this._kind || 4 === this._kind || 5 === this._kind || 3 === this._kind ? !1 : this._children.some(function(b) {
return 1 === b._kind;
});
};
f.prototype.hasSimpleContent = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return 4 === this._kind || 5 === this._kind ? !1 : 1 !== this._kind || !this._children && 0 === this._children.length ? !0 : this._children.every(function(b) {
return 1 !== b._kind;
});
};
f.prototype.inScopeNamespaces = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this._inScopeNamespacesImpl(!1);
};
f.prototype._inScopeNamespacesImpl = function(b) {
var a = this, d = [];
for (b = b ? d : {};null !== a;) {
for (var g = a._inScopeNamespaces, f = 0;g && f < g.length;f++) {
var e = g[f];
b[e.prefix] || (b[e.prefix] = e, d.push(e));
}
a = a._parent;
}
return d;
};
f.prototype.insertChildAfter = function(b, a) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
B("public.XML::insertChildAfter");
};
f.prototype.insertChildBefore = function(b, a) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
B("public.XML::insertChildBefore");
};
f.prototype.length = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this._children ? this._children.length : 0;
};
f.prototype.localName = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this._name.localName;
};
f.prototype.name = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return this._name;
};
f.prototype.namespace = function(b) {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
if (0 === arguments.length && 3 <= this._kind) {
return null;
}
var a = this._inScopeNamespacesImpl(!0);
if (0 === arguments.length) {
return this._name.getNamespace(a);
}
b = M(b);
for (var d = 0;d < a.length;d++) {
var g = a[d];
if (g.prefix === b) {
return g;
}
}
};
f.prototype.namespaceDeclarations = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
B("public.XML::namespaceDeclarations");
};
f.prototype.nodeKind = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
return O[this._kind];
};
f.prototype.normalize = function() {
this instanceof f || h.Runtime.throwError("TypeError", h.Errors.CheckTypeFailedError, this, "XML");
for (var b = 0;b < this._children.length;) {
var a = this._children[b];
if (1 === a._kind) {
a.normalize(), b++;
} else {
if (3 === a._kind) {
for (b++;b < this._children.length;) {
var d = this._children[b];
if (3 !== d._kind) {
break;
}
a._value += d._value;
this.removeByIndex(b);
}
0 === a._value.length ? this.removeByIndex(b) : b++;
} else {
b++;
}
}
}
return this;
};
f.prototype.removeByIndex = function(b) {
this._children[b]._parent = null;
this._children.splice(b, 1);
};
f.prototype.parent = function() {
return this._parent || void 0;
};
f.prototype.processingInstructions = function(b) {
void 0 === b && (b = "*");
var g = d(b).localName, f = a.ASXMLList.createList(this, this._name);
f._targetObject = this;
f._targetProperty = null;
return this.processingInstructionsInto(b, g, f);
};
f.prototype.processingInstructionsInto = function(b, a, d) {
var g = this._children;
if (!g) {
return d;
}
for (var f = 0;f < g.length;f++) {
var e = g[f];
5 !== e._kind || "*" !== b && e._name.localName !== a || d._children.push(e);
}
return d;
};
f.prototype.prependChild = function(b) {
B("public.XML::prependChild");
};
f.prototype.removeNamespace = function(b) {
B("public.XML::removeNamespace");
};
f.prototype.replace = function(b, a) {
var d, g = this;
if (3 === g._kind || 4 === g._kind || 5 === g._kind || 2 === g._kind) {
return g;
}
if (1 === a._kind) {
for (d = g;d;) {
if (d === a) {
throw "Error in XML.prototype.replace()";
}
d = d._parent;
}
}
d = b >>> 0;
if (String(b) === String(d)) {
d >= g.length() && (b = String(g.length())), g._children && g._children[b] && (g._children[b]._parent = null);
} else {
d = this.getProperty(b, !1);
if (0 === d.length()) {
return g;
}
g._children && d._children.forEach(function(a, d) {
var f = g._children.indexOf(a);
a._parent = null;
0 === d ? (b = String(f), g._children.splice(f, 1, void 0)) : g._children.splice(f, 1);
});
}
if (1 === a._kind || 3 === a._kind || 4 === a._kind || 5 === a._kind) {
a._parent = g, g._children || (g._children = []), g._children[b] = a;
} else {
d = v(a);
var f = w();
f._parent = g;
f._value = d;
g._children || (g._children = []);
g._children[b] = f;
}
return g;
};
f.prototype.setChildren = function(b) {
this.setProperty("*", !1, b);
return this;
};
f.prototype.setLocalName = function(b) {
B("public.XML::setLocalName");
};
f.prototype.setName = function(b) {
if (3 !== this._kind && 4 !== this._kind) {
b instanceof a.ASQName && null === b.uri && (b = b.localName);
b = new Q(b);
5 === this._kind && b.setUri();
this._name = b;
var d = this;
if (2 === this._kind) {
if (null === this._parent) {
return;
}
d = this._parent;
}
d.addInScopeNamespace(new a.ASNamespace(b.uri));
}
};
f.prototype.setNamespace = function(b) {
B("public.XML::setNamespace");
};
f.prototype.text = function() {
var b = a.ASXMLList.createList(this, this._name);
this._children && this._children.forEach(function(a, d) {
3 === a._kind && b.append(a);
});
return b;
};
f.prototype.toXMLString = function() {
return q(this);
};
f.prototype.toJSON = function(b) {
return "XML";
};
f.isTraitsOrDynamicPrototype = function(b) {
return b === f.traitsPrototype || b === f.dynamicPrototype;
};
f.prototype.asGetEnumerableKeys = function() {
if (f.isTraitsOrDynamicPrototype(this)) {
return E.call(this);
}
var b = [];
this._children.forEach(function(a, d) {
b.push(a.name);
});
return b;
};
f.prototype.setProperty = function(b, g, f) {
b === b >>> 0 && h.Runtime.throwError("TypeError", h.Errors.XMLAssignmentToIndexedXMLNotAllowed);
if (3 !== this._kind && 4 !== this._kind && 5 !== this._kind && 2 !== this._kind) {
if (f = s(f) && 3 !== f._kind && 2 !== f._kind ? f._deepCopy() : v(f), b = d(b), g) {
if (r(b.name)) {
if (f instanceof a.ASXMLList) {
if (0 === f._children.length) {
f = "";
} else {
g = v(f._children[0]);
for (var e = 1;e < f._children.length;e++) {
g += " " + v(f._children[e]);
}
f = g;
}
} else {
f = M(f);
}
g = null;
for (var k = this._attributes, c = this._attributes = [], e = 0;k && e < k.length;e++) {
var m = k[e];
if (m._name.equals(b)) {
if (g) {
m._parent = null;
continue;
} else {
g = m;
}
}
c.push(m);
}
g || (g = w(2, b.uri, b.localName), g._parent = this, c.push(g));
g._value = f;
}
} else {
g = !s(f) && "*" !== b.localName;
k = b.flags & 4;
c = b.flags & 8;
for (m = this.length() - 1;0 <= m;m--) {
(k || 1 === this._children[m]._kind && this._children[m]._name.localName === b.localName) && (c || 1 === this._children[m]._kind && this._children[m]._name.uri === b.uri) && (void 0 !== e && this.deleteByIndex(e), e = m);
}
void 0 === e && (e = this.length(), g && (k = null === b.uri ? new a.ASQName(new a.ASNamespace("", P.defaultNamespace), b) : new a.ASQName(b), b = w(1, k.uri, k.localName, k.prefix), b._parent = this, k = k.getNamespace(), this.replace(String(e), b), b.addInScopeNamespace(k)));
g ? (this._children[e]._children = [], g = v(f), "" !== g && this._children[e].replace("0", g)) : this.replace(String(e), f);
}
}
};
f.prototype.asSetProperty = function(b, a, d, e) {
if (f.isTraitsOrDynamicPrototype(this)) {
return D.call(this, b, a, d, e);
}
d = !!(d & A.ATTRIBUTE);
this.setProperty(g(b, a, d), d, e);
};
f.prototype.getProperty = function(b, g) {
if (c.isIndex(b) || !A.isQName(b) && c.isNumeric(b)) {
return 0 === (b | 0) ? this : null;
}
var f = d(b), e = a.ASXMLList.createList(this, this._name);
e._targetObject = this;
e._targetProperty = f;
var k = 0, r = f.name.flags, m = r & 4, w = r & 8;
if (g || r & 1) {
for (r = 0;this._attributes && r < this._attributes.length;r++) {
var l = this._attributes[r];
!m && l._name.localName !== f.localName || !w && l._name.uri !== f.uri || (e._children[k++] = l);
}
return e;
}
for (r = 0;this._children && r < this._children.length;r++) {
l = this._children[r], (m || 1 === l._kind && l._name.localName === f.localName) && (w || 1 === l._kind && l._name.uri === f.uri) && (e._children[k++] = l);
}
return e;
};
f.prototype.asGetNumericProperty = function(b) {
return this.asGetProperty(null, b, 0);
};
f.prototype.asSetNumericProperty = function(b, a) {
this.asSetProperty(null, b, 0, a);
};
f.prototype.asGetProperty = function(b, a, d) {
if (f.isTraitsOrDynamicPrototype(this)) {
return y.call(this, b, a, d);
}
d = !!(d & A.ATTRIBUTE);
return this.getProperty(g(b, a, d), d);
};
f.prototype.hasProperty = function(b, a, g) {
if (g) {
return a = A.isQName(b) ? b : this.resolveMultinameProperty(b.namespaces, b.name, b.flags), !!this[A.getQualifiedName(a)];
}
if (c.isIndex(b)) {
return 0 === Number(b);
}
b = d(b);
var f = b.name.flags;
g = f & 4;
f &= 8;
if (a) {
for (a = 0;this._attributes && a < this._attributes.length;a++) {
var e = this._attributes[a];
if (g || e._name.localName === b.localName && (f || e._name.uri === b.uri)) {
return!0;
}
}
return!1;
}
for (a = 0;a < this._children.length;a++) {
if (e = this._children[a], (g || 1 === e._kind && e._name.localName === b.localName) && (f || 1 === e._kind && e._name.uri === b.uri)) {
return!0;
}
}
};
f.prototype.deleteProperty = function(b, a) {
if (c.isIndex(b)) {
return!0;
}
var g = d(b), f = g.localName, e = g.uri, k = g.name.flags, r = k & 4, m = k & 8;
if (a) {
if (k = this._attributes) {
for (var w = this._attributes = [], l = 0;l < k.length;l++) {
var n = k[l], q = n._name;
!r && q.localName !== f || !m && q.uri !== e ? w.push(n) : n._parent = null;
}
}
} else {
if (this._children.some(function(b, a) {
return(r || 1 === b._kind && b._name.localName === g.localName) && (m || 1 === b._kind && b._name.uri === g.uri);
})) {
return!0;
}
}
};
f.prototype.asHasProperty = function(b, a, d) {
if (f.isTraitsOrDynamicPrototype(this)) {
return H.call(this, b, a, d);
}
var e = !!(d & A.ATTRIBUTE);
a = g(b, a, e);
if (this.hasProperty(a, e, !1)) {
return!0;
}
b = A.isQName(a) ? a : this.resolveMultinameProperty(b, a, d);
return!!this[A.getQualifiedName(b)];
};
f.prototype._asDeleteProperty = function(b, a, d) {
if (f.isTraitsOrDynamicPrototype(this)) {
return C.call(this, b, a, d);
}
var e = !!(d & A.ATTRIBUTE);
a = g(b, a, e);
if (this.deleteProperty(a, e)) {
return!0;
}
b = A.isQName(a) ? a : this.resolveMultinameProperty(b, a, d);
return delete this[A.getQualifiedName(b)];
};
f.prototype.asHasPropertyInternal = function(b, a, d) {
return this.asHasProperty(b, a, d);
};
f.prototype.asCallProperty = function(b, a, d, g, e) {
if (f.isTraitsOrDynamicPrototype(this) || g) {
return L.call(this, b, a, d, g, e);
}
var k;
k = this.resolveMultinameProperty(b, a, d);
if (this.asGetNumericProperty && A.isNumeric(k)) {
k = this.asGetNumericProperty(k);
} else {
var r = this.asOpenMethods;
k = r && r[k] || this[k];
}
if (k) {
return k.asApply(g ? null : this, e);
}
if (this.hasSimpleContent()) {
return Object(v(this)).asCallProperty(b, a, d, g, e);
}
throw new TypeError;
};
f.prototype._delete = function(b, a) {
B("XML.[[Delete]]");
};
f.prototype.deleteByIndex = function(b) {
if (String(b >>> 0) !== String(b)) {
throw "TypeError in XML.prototype.deleteByIndex(): invalid index " + b;
}
var a = this._children;
b < a.length && a[b] && (a[b]._parent = null, a.splice(b, 1));
};
f.prototype.insert = function(b, a) {
var d, g;
if (3 !== this._kind && 4 !== this._kind && 5 !== this._kind && 2 !== this._kind) {
d = b >>> 0;
if (String(b) !== String(d)) {
throw "TypeError in XML.prototype.insert(): invalid property name " + b;
}
if (1 === this._kind) {
for (g = this;g;) {
if (g === a) {
throw "Error in XML.prototype.insert()";
}
g = g._parent;
}
}
if (this instanceof V) {
if (g = this.length(), 0 === g) {
return;
}
} else {
g = 1;
}
for (var f = this.length() - 1;f >= d;f--) {
this._children[f + g] = this._children[f];
}
if (this instanceof V) {
for (g = a.length(), f = 0;f < g;f++) {
a._children[f]._parent = this, this[d + f] = a[f];
}
} else {
a._parent = this, this._children || (this._children = []), this._children[d] = a;
}
}
};
f.prototype.addInScopeNamespace = function(b) {
var a = this;
if (3 !== a._kind && 4 !== a._kind && 5 !== a._kind && 2 !== a._kind && void 0 !== b.prefix && ("" !== b.prefix || "" !== a._name.uri)) {
var d = null;
a._inScopeNamespaces.forEach(function(a, g) {
a.prefix === b.prefix && (d = a);
});
null !== d && d.uri !== b.uri && a._inScopeNamespaces.forEach(function(g, f) {
g.prefix === d.prefix && (a._inScopeNamespaces[f] = b);
});
a._name.prefix === b.prefix && (a._name.prefix = void 0);
a._attributes.forEach(function(a, d) {
a._name.prefix === b.prefix && (a._name.prefix = void 0);
});
}
};
f.prototype.descendantsInto = function(b, a) {
var d = b.flags;
if (1 !== this._kind) {
return a;
}
var g = a._children.length, f = b.localName, e = b.uri, k = d & 4;
d & 1 ? this._attributes.forEach(function(b, d) {
if (k || f === b._name.localName && e === b._name.uri) {
a._children[g++] = b;
}
}) : this._children.forEach(function(b, d) {
if (k || f === b._name.localName && e === b._name.uri) {
a._children[g++] = b;
}
});
this._children.forEach(function(d, g) {
d.descendantsInto(b, a);
});
return a;
};
f.instanceConstructor = f;
f.classInitializer = function() {
var b = f.prototype;
N(b, "asDeleteProperty", b._asDeleteProperty);
N(b, "$BgvalueOf", Object.prototype.$BgvalueOf);
N(b, "$BghasOwnProperty", b.native_hasOwnProperty);
N(b, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable);
K(f, ["settings", "setSettings", "defaultSettings"]);
K(b, "toString addNamespace appendChild attribute attributes child childIndex children comments contains copy descendants elements hasComplexContent hasSimpleContent inScopeNamespaces insertChildAfter insertChildBefore length localName name namespace namespaceDeclarations nodeKind normalize parent processingInstructions prependChild removeNamespace replace setChildren setLocalName setName setNamespace text toXMLString toJSON".split(" "));
};
f.callableConstructor = function(b) {
c.isNullOrUndefined(b) && (b = "");
return n(b);
};
f.defaultNamespace = "";
f._flags = S.ALL;
f._prettyIndent = 2;
return f;
}(a.ASNative);
a.ASXML = P;
var V = function(f) {
function e(b) {
this._children = [];
c.isNullOrUndefined(b) && (b = "");
if (b) {
if (b instanceof e) {
b = b._children;
for (var a = 0;a < b.length;a++) {
this._children[a] = b[a];
}
} else {
k(b, this);
}
}
}
__extends(e, f);
e.addXML = function(b, d) {
var g;
b instanceof P ? (g = new a.ASXMLList, g.append(b)) : g = b;
g.append(d);
return g;
};
e.createList = function(b, d) {
void 0 === b && (b = null);
void 0 === d && (d = null);
var g = new a.ASXMLList;
g._targetObject = b;
g._targetProperty = d;
return g;
};
e.prototype.valueOf = function() {
return this;
};
e.prototype.equals = function(b) {
var a = this._children;
if (void 0 === b && 0 === a.length) {
return!0;
}
if (b instanceof e) {
b = b._children;
if (b.length !== a.length) {
return!1;
}
for (var d = 0;d < a.length;d++) {
if (!a[d].equals(b[d])) {
return!1;
}
}
return!0;
}
return 1 === a.length && a[0].equals(b);
};
e.prototype.toString = function() {
if (this.hasComplexContent()) {
return this.toXMLString();
}
for (var b = "", a = 0;a < this._children.length;a++) {
b += v(this._children[a]);
}
return b;
};
e.prototype._deepCopy = function() {
for (var b = a.ASXMLList.createList(this._targetObject, this._targetProperty), d = this.length(), g = 0;g < d;g++) {
b._children[g] = this._children[g]._deepCopy();
}
return b;
};
e.prototype._shallowCopy = function() {
for (var b = a.ASXMLList.createList(this._targetObject, this._targetProperty), d = this.length(), g = 0;g < d;g++) {
b._children[g] = this._children[g];
}
return b;
};
e.prototype.native_hasOwnProperty = function(b) {
b = M(b);
if (e.isTraitsOrDynamicPrototype(this)) {
return a.ASObject.prototype.native_hasOwnProperty.call(this, b);
}
if (c.isIndex(b)) {
return(b | 0) < this._children.length;
}
b = d(b);
for (var g = !!(b.flags & 1), f = this._children, k = 0;k < f.length;k++) {
var r = f[k];
if (1 === r._kind && r.hasProperty(b, g, !1)) {
return!0;
}
}
return!1;
};
e.prototype.native_propertyIsEnumerable = function(b) {
return c.isIndex(b) && (b | 0) < this._children.length;
};
e.prototype.attribute = function(b) {
return this.getProperty(b, !0);
};
e.prototype.attributes = function() {
return this.getProperty("*", !0);
};
e.prototype.child = function(b) {
if (c.isIndex(b)) {
var d = a.ASXMLList.createList(this._targetObject, this._targetProperty);
b < this._children.length && (d._children[0] = this._children[b | 0]._deepCopy());
return d;
}
return this.getProperty(b, !1);
};
e.prototype.children = function() {
return this.getProperty("*", !1);
};
e.prototype.descendants = function(b) {
b = d(b);
for (var g = a.ASXMLList.createList(this._targetObject, this._targetProperty), f = 0;f < this._children.length;f++) {
var e = this._children[f];
1 === e._kind && e.descendantsInto(b, g);
}
return g;
};
e.prototype.comments = function() {
var b = a.ASXMLList.createList(this._targetObject, this._targetProperty);
this._children.forEach(function(a) {
1 === a._kind && (a = a.comments(), Array.prototype.push.apply(b._children, a._children));
});
return b;
};
e.prototype.contains = function(b) {
for (var a = this._children, d = 0;d < a.length;d++) {
if (a[d].equals(b)) {
return!0;
}
}
return!1;
};
e.prototype.copy = function() {
return this._deepCopy();
};
e.prototype.elements = function(b) {
void 0 === b && (b = "*");
var g = d(b), f = a.ASXMLList.createList(this._targetObject, g);
this._children.forEach(function(b) {
1 === b._kind && (b = b.elements(g), Array.prototype.push.apply(f._children, b._children));
});
return f;
};
e.prototype.hasComplexContent = function() {
switch(this.length()) {
case 0:
return!1;
case 1:
return this._children[0].hasComplexContent();
default:
return this._children.some(function(b) {
return 1 === b._kind;
});
}
};
e.prototype.hasSimpleContent = function() {
switch(this.length()) {
case 0:
return!0;
case 1:
return this._children[0].hasSimpleContent();
default:
return this._children.every(function(b) {
return 1 !== b._kind;
});
}
};
e.prototype.length = function() {
return this._children.length;
};
e.prototype.name = function() {
return this._children[0].name();
};
e.prototype.normalize = function() {
for (var b = 0;b < this._children.length;) {
var a = this._children[b];
if (1 === a._kind) {
a.normalize(), b++;
} else {
if (3 === a._kind) {
for (b++;b < this._children.length;) {
var d = this._children[b];
if (3 !== d._kind) {
break;
}
a._value += d._value;
this.removeByIndex(b);
}
0 === a._value.length ? this.removeByIndex(b) : b++;
} else {
b++;
}
}
}
return this;
};
e.prototype.parent = function() {
var b = this._children;
if (0 !== b.length) {
for (var a = b[0]._parent, d = 1;d < b.length;d++) {
if (b[d]._parent !== a) {
return;
}
}
return a;
}
};
e.prototype.processingInstructions = function(b) {
void 0 === b && (b = "*");
var g = d(b).localName, f = a.ASXMLList.createList(this._targetObject, this._targetProperty);
f._targetObject = this;
f._targetProperty = null;
for (var e = this._children, k = 0;k < e.length;k++) {
e[k].processingInstructionsInto(b, g, f);
}
return f;
};
e.prototype.text = function() {
var b = a.ASXMLList.createList(this._targetObject, this._targetProperty);
this._children.forEach(function(a, d) {
if (1 === a._kind) {
var g = a.text();
0 < g.length() && b._children.push(g);
}
});
return b;
};
e.prototype.toXMLString = function() {
return q(this);
};
e.prototype.toJSON = function(b) {
return "XMLList";
};
e.prototype.addNamespace = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "addNamespace");
var a = this._children[0];
a.addNamespace(b);
return a;
};
e.prototype.appendChild = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "appendChild");
var a = this._children[0];
a.appendChild(b);
return a;
};
e.prototype.append = function(b) {
var d = this._children, g = d.length, f = 1;
if (b instanceof a.ASXMLList) {
if (this._targetObject = b._targetObject, this._targetProperty = b._targetProperty, b = b._children, f = b.length, 0 !== f) {
for (f = 0;f < b.length;f++) {
d[g + f] = b[f];
}
}
} else {
z(b instanceof a.ASXML), d[g] = b, this._targetProperty = b._name;
}
};
e.prototype.childIndex = function() {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "childIndex");
return this._children[0].childIndex();
};
e.prototype.inScopeNamespaces = function() {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "inScopeNamespaces");
return this._children[0].inScopeNamespaces();
};
e.prototype.insertChildAfter = function(b, a) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "insertChildAfter");
return this._children[0].insertChildAfter(b, a);
};
e.prototype.insertChildBefore = function(b, a) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "insertChildBefore");
return this._children[0].insertChildBefore(b, a);
};
e.prototype.nodeKind = function() {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "nodeKind");
return this._children[0].nodeKind();
};
e.prototype.namespace = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "namespace");
var a = this._children[0];
return arguments.length ? a.namespace(b) : a.namespace();
};
e.prototype.localName = function() {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "localName");
return this._children[0].localName();
};
e.prototype.namespaceDeclarations = function() {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "namespaceDeclarations");
return this._children[0].namespaceDeclarations();
};
e.prototype.prependChild = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "prependChild");
return this._children[0].prependChild(b);
};
e.prototype.removeNamespace = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "removeNamespace");
return this._children[0].removeNamespace(b);
};
e.prototype.replace = function(b, a) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "replace");
return this._children[0].replace(b, a);
};
e.prototype.setChildren = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setChildren");
return this._children[0].setChildren(b);
};
e.prototype.setLocalName = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setLocalName");
return this._children[0].setLocalName(b);
};
e.prototype.setName = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setName");
return this._children[0].setName(b);
};
e.prototype.setNamespace = function(b) {
1 !== this._children.length && h.Runtime.throwError("TypeError", h.Errors.XMLOnlyWorksWithOneItemLists, "setNamespace");
return this._children[0].setNamespace(b);
};
e.isTraitsOrDynamicPrototype = function(b) {
return b === e.traitsPrototype || b === e.dynamicPrototype;
};
e.prototype.asGetEnumerableKeys = function() {
return e.isTraitsOrDynamicPrototype(this) ? E.call(this) : this._children.asGetEnumerableKeys();
};
e.prototype.getProperty = function(b, g) {
if (c.isIndex(b)) {
return this._children[b];
}
var f = d(b), e = a.ASXMLList.createList(this._targetObject, f);
this._children.forEach(function(b, a) {
if (1 === b._kind) {
var d = b.getProperty(f, g);
if (0 < d.length()) {
for (var d = d._children, k = 0;k < d.length;k++) {
e._children.push(d[k]);
}
}
}
});
return e;
};
e.prototype.asGetNumericProperty = function(b) {
return this.asGetProperty(null, b, 0);
};
e.prototype.asSetNumericProperty = function(b, a) {
this.asSetProperty(null, b, 0, a);
};
e.prototype.asGetProperty = function(b, a, d) {
if (e.isTraitsOrDynamicPrototype(this)) {
return y.call(this, b, a, d);
}
d = !!(d & A.ATTRIBUTE);
return this.getProperty(g(b, a, d), d);
};
e.prototype.hasProperty = function(b, a) {
return c.isIndex(b) ? Number(b) < this._children.length : !0;
};
e.prototype.asHasProperty = function(b, a, d) {
if (e.isTraitsOrDynamicPrototype(this)) {
return y.call(this, b, a, d);
}
d = !!(d & A.ATTRIBUTE);
return this.hasProperty(g(b, a, d), d);
};
e.prototype.asHasPropertyInternal = function(b, a, d) {
d = !!(d & A.ATTRIBUTE);
return this.hasProperty(g(b, a, d), d);
};
e.prototype.resolveValue = function() {
return this;
};
e.prototype.setProperty = function(d, g, f) {
if (c.isIndex(d)) {
d |= 0;
var e = null;
if (this._targetObject && (e = this._targetObject.resolveValue(), null === e)) {
return;
}
g = this.length();
if (d >= g) {
if (e instanceof a.ASXMLList) {
if (1 !== e.length()) {
return;
}
e = e._children[0];
}
z(null === e || e instanceof a.ASXML);
if (e && 1 !== e._kind) {
return;
}
var k = new a.ASXML;
k._parent = e;
k._name = this._targetProperty;
if (b(this._targetProperty)) {
if (e.hasProperty(this._targetProperty, !0, !1)) {
return;
}
k._kind = 2;
} else {
c.isNullOrUndefined(this._targetProperty) || "*" === this._targetProperty.localName ? (k._name = null, k._kind = 3) : k._kind = 1;
}
d = g;
if (2 !== k._kind) {
if (null !== e) {
var r;
if (0 < d) {
var m = this._children[d - 1];
for (r = 0;r < e.length - 1 && e._children[r] !== m;r++) {
}
} else {
r = e.length() - 1;
}
e._children[r + 1] = k;
k._parent = e;
}
f instanceof a.ASXML ? k._name = f._name : f instanceof a.ASXMLList && (k._name = f._targetProperty);
this.append(k);
}
}
s(f) && 3 !== f._kind && 2 !== f._kind || (f += "");
r = this._children[d];
k = r._kind;
e = r._parent;
if (2 === k) {
var w = e._children.indexOf(r);
e.setProperty(r._name, !0, !1);
this._children[d] = e._children[w];
} else {
if (f instanceof a.ASXMLList) {
w = f._shallowCopy();
f = w.length();
if (null !== e) {
for (k = e._children.indexOf(r), e.replace(k, w), r = 0;r < f;r++) {
w.setProperty(r, !1, e._children[k + r]);
}
}
if (0 === f) {
for (r = d + 1;r < g;r++) {
this._children[r - 1] = this._children[r];
}
this._children.length--;
} else {
for (r = g - 1;r > d;r--) {
this._children[r + f - 1] = this._children[r];
}
}
for (r = 0;r < f;r++) {
this._children[d + r] = w._children[r];
}
} else {
f instanceof a.ASXML || 3 <= k ? (null !== e && (k = e._children.indexOf(r), e.replace(k, w), f = e._children[k]), "string" === typeof f ? (w = new a.ASXML(f), this._children[d] = w) : this._children[d] = f) : r.setProperty("*", !1, f);
}
}
} else {
if (0 === this._children.length) {
e = this.resolveValue();
if (null === e || 1 !== e._children.length) {
return;
}
this.append(e._children[0]);
}
1 === this._children.length ? this._children[0].setProperty(d, g, f) : h.Runtime.throwError("TypeError", h.Errors.XMLAssigmentOneItemLists);
}
};
e.prototype.asSetProperty = function(b, a, d, f) {
if (e.isTraitsOrDynamicPrototype(this)) {
return D.call(this, b, a, d, f);
}
d = !!(d & A.ATTRIBUTE);
a = g(b, a, d);
return this.setProperty(a, d, f);
};
e.prototype._asDeleteProperty = function(b, a, d) {
if (c.isIndex(a)) {
b = a | 0;
if (b >= this._children.length) {
return!0;
}
this.removeByIndex(b);
return!0;
}
d = !!(d & A.ATTRIBUTE);
a = g(b, a, d);
for (b = 0;b < this._children.length;b++) {
var f = this._children[b];
1 === f._kind && f.deleteProperty(a, d);
}
return!0;
};
e.prototype.removeByIndex = function(b) {
var a = this._children[b], d = a._parent;
d && (a._parent = null, d._children.splice(d._children.indexOf(a), 1));
this._children.splice(b, 1);
};
e.prototype.asCallProperty = function(b, a, d, g, f) {
if (e.isTraitsOrDynamicPrototype(this) || g) {
return L.call(this, b, a, d, g, f);
}
var k;
k = this.resolveMultinameProperty(b, a, d);
if (this.asGetNumericProperty && A.isNumeric(k)) {
k = this.asGetNumericProperty(k);
} else {
var r = this.asOpenMethods;
k = r && r[k] || this[k];
}
if (k) {
return k.asApply(g ? null : this, f);
}
if (1 === this.length()) {
return this._children[0].asCallProperty(b, a, d, g, f);
}
throw new TypeError;
};
e.instanceConstructor = e;
e.classInitializer = function() {
var b = e.prototype;
N(b, "asDeleteProperty", b._asDeleteProperty);
N(b, "$BgvalueOf", Object.prototype.$BgvalueOf);
N(b, "$BghasOwnProperty", b.native_hasOwnProperty);
N(b, "$BgpropertyIsEnumerable", b.native_propertyIsEnumerable);
K(b, "toString addNamespace appendChild attribute attributes child childIndex children comments contains copy descendants elements hasComplexContent hasSimpleContent inScopeNamespaces insertChildAfter insertChildBefore length localName name namespace namespaceDeclarations nodeKind normalize parent processingInstructions prependChild removeNamespace replace setChildren setLocalName setName setNamespace text toXMLString toJSON".split(" "));
};
e.callableConstructor = function(b) {
c.isNullOrUndefined(b) && (b = "");
if (b instanceof e) {
return b;
}
var d = new a.ASXMLList;
k(b, d);
return d;
};
return e;
}(a.ASNative);
a.ASXMLList = V;
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(b, a) {
var d = (b | 0) === b;
if (a & 512 && (c.isNullOrUndefined(b) || d)) {
return null;
}
var g = !1;
if (b instanceof Function) {
if ("boundTo" in b) {
if (a & 512) {
return null;
}
g = !0;
} else {
if ("methodInfo" in b && b.methodInfo && "lastBoundMethod" in b.methodInfo) {
return null;
}
}
}
b = Object(b);
var f = b.classInfo ? b : Object.getPrototypeOf(b).class;
n(f, "No class found for object " + b);
var k = f === b && !(a & 512), r = f.classInfo, m = {};
m[w] = d ? "int" : g ? "builtin.as$0::MethodClosure" : e(r.instanceInfo.name);
m[l("isDynamic")] = k || !(r.instanceInfo.flags & 1) && !g;
m[l("isFinal")] = k || !!(r.instanceInfo.flags & 2) || g;
m[l("isStatic")] = k;
if (a & 256) {
var z = m[l("traits")] = q(f, r, k, a)
}
g && (z[l("bases")].unshift("Function"), z[l("accessors")][1][l("declaredBy")] = "builtin.as$0::MethodClosure");
return m;
}
function v(b, d) {
for (var g = 0, f = d[l("bases")], e = 0;f && e < f.length;e++) {
var k = new a.ASXML('<extendsClass type="' + a.escapeAttributeValue(f[e]) + '"/>');
b.appendChild(k);
g++;
}
f = d[l("interfaces")];
for (e = 0;f && e < f.length;e++) {
k = new a.ASXML('<implementsInterface type="' + a.escapeAttributeValue(f[e]) + '"/>'), b.appendChild(k), g++;
}
null !== d[l("constructor")] && (k = new a.ASXML("<constructor/>"), p(k, d[l("constructor")]), b.appendChild(k), g++);
f = d[l("variables")];
for (e = 0;f && e < f.length;e++) {
var r = f[e], k = "readonly" === r[l("access")] ? "constant" : "variable", k = new a.ASXML("<" + k + ' name="' + a.escapeAttributeValue(r[l("name")]) + '" type="' + r[l("type")] + '"/>');
null !== r[l("uri")] && k.setProperty("uri", !0, r[l("uri")]);
null !== r[l("metadata")] && u(k, r[l("metadata")]);
b.appendChild(k);
g++;
}
f = d[l("accessors")];
for (e = 0;f && e < f.length;e++) {
var c = f[e], k = new a.ASXML('<accessor name="' + a.escapeAttributeValue(c[l("name")]) + '" access="' + c[l("access")] + '" type="' + a.escapeAttributeValue(c[l("type")]) + '" declaredBy="' + a.escapeAttributeValue(c[l("declaredBy")]) + '"/>');
null !== c[l("uri")] && k.setProperty("uri", !0, c[l("uri")]);
null !== c[l("metadata")] && u(k, r[l("metadata")]);
b.appendChild(k);
g++;
}
f = d[l("methods")];
for (e = 0;f && e < f.length;e++) {
c = f[e], k = new a.ASXML('<method name="' + a.escapeAttributeValue(c[l("name")]) + '" declaredBy="' + a.escapeAttributeValue(c[l("declaredBy")]) + '" returnType="' + a.escapeAttributeValue(c[l("returnType")]) + '"/>'), p(k, c[l("parameters")]), null !== c[l("uri")] && k.setProperty("uri", !0, c[l("uri")]), null !== c[l("metadata")] && u(k, r[l("metadata")]), b.appendChild(k), g++;
}
u(b, d[l("metadata")]);
return 0 < g;
}
function p(b, d) {
if (d) {
for (var g = 0;g < d.length;g++) {
var f = d[g], f = new a.ASXML('<parameter index="' + (g + 1) + '" type="' + a.escapeAttributeValue(f[l("type")]) + '" optional="' + f[l("optional")] + '"/>');
b.appendChild(f);
}
}
}
function u(b, d) {
if (d) {
for (var g = 0;g < d.length;g++) {
for (var f = d[g], e = new a.ASXML('<metadata name="' + a.escapeAttributeValue(f[l("name")]) + '"/>'), f = f[l("value")], k = 0;k < f.length;k++) {
var r = f[k], r = new a.ASXML('<arg key="' + a.escapeAttributeValue(r[l("key")]) + '" value="' + a.escapeAttributeValue(r[l("value")]) + '"/>');
e.appendChild(r);
}
b.appendChild(e);
}
}
}
function l(b) {
return k.getPublicQualifiedName(b);
}
function e(b) {
var a = b.name;
return(b = b.namespaces[0]) && b.uri ? b.uri + "::" + a : a;
}
function m(b) {
if (!b) {
return null;
}
var a = [], d;
for (d in b) {
"native" !== d && a.push(t(b[d]));
}
return a;
}
function t(b) {
var a = {};
a[w] = b.name;
a[B] = b.value.map(function(b) {
var a = {};
a[B] = b.value;
a[M] = b.key;
return a;
});
return a;
}
function q(f, k, c, q) {
function t(a) {
n(a, "No traits array found on class" + f.classInfo.instanceInfo.name);
for (var k = a.length;k--;) {
var l = a[k], s = l.name.getNamespace();
if (!(!s.isPublic() && !l.name.uri || q & 1 && s.uri)) {
var p = e(l.name);
if (P[p] !== V[p]) {
s = O[p], s[g] = "readwrite", 2 === l.kind && (s[z] = l.methodInfo.returnType ? e(l.methodInfo.returnType) : "*");
} else {
if (!O[p]) {
switch(s = {}, O[p] = s, l.kind) {
case 6:
;
case 0:
if (!(q & 8)) {
continue;
}
s[w] = p;
s[r] = void 0 === l.name.uri ? null : l.name.uri;
s[z] = l.typeName ? e(l.typeName) : "*";
s[g] = "readwrite";
s[b] = q & 64 ? m(l.metadata) : null;
v.push(s);
break;
case 1:
if (!h) {
continue;
}
s[A] = l.methodInfo.returnType ? e(l.methodInfo.returnType) : "*";
s[b] = q & 64 ? m(l.metadata) : null;
s[w] = p;
s[r] = void 0 === l.name.uri ? null : l.name.uri;
for (var p = s[N] = [], l = l.methodInfo.parameters, u = 0;u < l.length;u++) {
var M = l[u], D = {};
D[z] = M.type ? e(M.type) : "*";
D[K] = "value" in M;
p.push(D);
}
s[d] = $;
S.push(s);
break;
case 2:
;
case 3:
if (!(q & 16) || c) {
continue;
}
s[w] = p;
2 === l.kind ? (s[z] = l.methodInfo.returnType ? e(l.methodInfo.returnType) : "*", P[p] = s) : (u = l.methodInfo.parameters[0].type, s[z] = u ? e(u) : "*", V[p] = s);
s[g] = 2 === l.kind ? "readonly" : "writeonly";
s[b] = q & 64 ? m(l.metadata) : null;
s[r] = void 0 === l.name.uri ? null : l.name.uri;
s[d] = $;
B.push(s);
break;
default:
n(!1, "Unknown trait type: " + l.kind);
}
}
}
}
}
}
var s = q & 2, h = q & 32 && !c, p = {}, v = p[l("variables")] = q & 8 ? [] : null, B = p[l("accessors")] = q & 16 ? [] : null, u = null;
q & 64 && (u = c ? [] : m(k.metadata) || []);
p[b] = u;
p[l("constructor")] = null;
if (q & 4) {
if (k = p[l("interfaces")] = [], !c) {
for (var M in f.implementedInterfaces) {
u = f.implementedInterfaces[M].getQualifiedClassName(), k.push(u);
}
}
} else {
p[l("interfaces")] = null;
}
var S = p[l("methods")] = h ? [] : null;
M = p[l("bases")] = s ? [] : null;
var O = {}, P = {}, V = {};
for (k = !1;f;) {
var $ = e(f.classInfo.instanceInfo.name);
s && k && !c ? M.push($) : k = !0;
if (q & 1024 && f === a.ASObject) {
break;
}
c ? t(f.classInfo.traits) : t(f.classInfo.instanceInfo.traits);
f = f.baseClass;
}
c && (q & 16 && (k = {}, k[w] = "prototype", k[z] = "*", k[g] = "readonly", k[b] = null, k[r] = null, k[d] = "Class", B.push(k)), s && (M.pop(), M.push("Class", "Object"), f = a.ASClass));
return p;
}
var n = c.Debug.assert, k = c.AVM2.ABC.Multiname, f;
(function(b) {
b[b.HIDE_NSURI_METHODS = 1] = "HIDE_NSURI_METHODS";
b[b.INCLUDE_BASES = 2] = "INCLUDE_BASES";
b[b.INCLUDE_INTERFACES = 4] = "INCLUDE_INTERFACES";
b[b.INCLUDE_VARIABLES = 8] = "INCLUDE_VARIABLES";
b[b.INCLUDE_ACCESSORS = 16] = "INCLUDE_ACCESSORS";
b[b.INCLUDE_METHODS = 32] = "INCLUDE_METHODS";
b[b.INCLUDE_METADATA = 64] = "INCLUDE_METADATA";
b[b.INCLUDE_CONSTRUCTOR = 128] = "INCLUDE_CONSTRUCTOR";
b[b.INCLUDE_TRAITS = 256] = "INCLUDE_TRAITS";
b[b.USE_ITRAITS = 512] = "USE_ITRAITS";
b[b.HIDE_OBJECT = 1024] = "HIDE_OBJECT";
})(f || (f = {}));
var d = l("declaredBy"), b = l("metadata"), g = l("access"), r = l("uri"), w = l("name"), z = l("type"), A = l("returnType"), B = l("value"), M = l("key"), N = l("parameters"), K = l("optional");
a.describeTypeJSON = s;
a.describeType = function(b, d) {
var g = s(b, d), f = h.Runtime.AVM2.instance.systemDomain;
f.getClass("XML");
f.getClass("XMLList");
f.getClass("QName");
f.getClass("Namespace");
f = new a.ASXML("<type/>");
f.setProperty("name", !0, g[l("name")]);
var e = g[l("traits")][l("bases")];
e.length && f.setProperty("base", !0, e[0]);
f.setProperty("isDynamic", !0, g[l("isDynamic")].toString());
f.setProperty("isFinal", !0, g[l("isFinal")].toString());
f.setProperty("isStatic", !0, g[l("isStatic")].toString());
v(f, g[l("traits")]);
if (g = s(b, d | 512)) {
e = new a.ASXML("<factory/>"), e.setProperty("type", !0, g[l("name")]), v(e, g[l("traits")]) && f.appendChild(e);
}
return f;
};
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.assert;
(function(c) {
(function(c) {
var h = Object.prototype.asGetProperty, l = Object.prototype.asSetProperty, e = Object.prototype.asHasProperty, m = Object.prototype.asDeleteProperty, t = Object.prototype.asGetEnumerableKeys, q = function(a) {
function k(a) {
}
__extends(k, a);
k.isTraitsOrDynamicPrototype = function(a) {
return a === k.traitsPrototype || a === k.dynamicPrototype;
};
k.makePrimitiveKey = function(a) {
if ("string" === typeof a || "number" === typeof a) {
return a;
}
s("object" === typeof a || "function" === typeof a, typeof a);
};
k.prototype.init = function(a) {
this.weakKeys = !!a;
this.map = new WeakMap;
a || (this.keys = []);
this.primitiveMap = Object.create(null);
};
k.prototype.asGetNumericProperty = function(a) {
return this.asGetProperty(null, a, 0);
};
k.prototype.asSetNumericProperty = function(a, d) {
this.asSetProperty(null, a, 0, d);
};
k.prototype.asGetProperty = function(a, d, b) {
if (k.isTraitsOrDynamicPrototype(this)) {
return h.call(this, a, d, b);
}
a = k.makePrimitiveKey(d);
return void 0 !== a ? this.primitiveMap[a] : this.map.get(Object(d));
};
k.prototype.asSetProperty = function(a, d, b, g) {
if (k.isTraitsOrDynamicPrototype(this)) {
return l.call(this, a, d, b, g);
}
a = k.makePrimitiveKey(d);
void 0 !== a ? this.primitiveMap[a] = g : (this.map.set(Object(d), g), !this.weakKeys && 0 > this.keys.indexOf(d) && this.keys.push(d));
};
k.prototype.asHasProperty = function(a, d, b) {
if (k.isTraitsOrDynamicPrototype(this)) {
return e.call(this, a, d, b);
}
a = k.makePrimitiveKey(d);
return void 0 !== a ? a in this.primitiveMap : this.map.has(Object(d));
};
k.prototype.asDeleteProperty = function(a, d, b) {
if (k.isTraitsOrDynamicPrototype(this)) {
return m.call(this, a, d, b);
}
a = k.makePrimitiveKey(d);
void 0 !== a && delete this.primitiveMap[a];
this.map.delete(Object(d));
var g;
!this.weakKeys && 0 <= (g = this.keys.indexOf(d)) && this.keys.splice(g, 1);
return!0;
};
k.prototype.asGetEnumerableKeys = function() {
if (k.isTraitsOrDynamicPrototype(this)) {
return t.call(this);
}
var a = [], d;
for (d in this.primitiveMap) {
a.push(d);
}
return this.weakKeys ? a : a.concat(this.keys);
};
k.protocol = k.prototype;
return k;
}(a.ASNative);
c.Dictionary = q;
c.OriginalDictionary = q;
})(c.utils || (c.utils = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.notImplemented, h = c.AVM2.ABC.Namespace;
(function(c) {
(function(c) {
var l = Object.prototype.asGetProperty, e = Object.prototype.asSetProperty, m = Object.prototype.asCallProperty, t = Object.prototype.asHasProperty, q = Object.prototype.asHasOwnProperty, n = Object.prototype.asHasTraitProperty, k = Object.prototype.asDeleteProperty, f = function(a) {
function b() {
a.apply(this, arguments);
}
__extends(b, a);
b.prototype.asGetProperty = function(b, a, d) {
return n.call(this, b, a, d) ? l.call(this, b, a, d) : m.call(this, [h.PROXY], "getProperty", 0, !1, [a]);
};
b.prototype.asGetNumericProperty = function(b) {
return this.asGetProperty(null, b, 0);
};
b.prototype.asSetNumericProperty = function(b, a) {
this.asSetProperty(null, b, 0, a);
};
b.prototype.asSetProperty = function(b, a, d, f) {
n.call(this, b, a, d) ? e.call(this, b, a, d, f) : m.call(this, [h.PROXY], "setProperty", 0, !1, [a, f]);
};
b.prototype.asCallProperty = function(b, a, d, f, e) {
return n.call(this, b, a, d) ? m.call(this, b, a, d, !1, e) : m.call(this, [h.PROXY], "callProperty", 0, !1, [a].concat(e));
};
b.prototype.asHasProperty = function(b, a, d) {
return n.call(this, b, a, d) ? t.call(this, b, a, d) : m.call(this, [h.PROXY], "hasProperty", 0, !1, [a]);
};
b.prototype.asHasOwnProperty = function(b, a, d) {
return n.call(this, b, a, d) ? q.call(this, b, a, d) : m.call(this, [h.PROXY], "hasProperty", 0, !1, [a]);
};
b.prototype.asDeleteProperty = function(b, a, d) {
return n.call(this, b, a, d) ? k.call(this, b, a, d) : m.call(this, [h.PROXY], "deleteProperty", 0, !1, [a]);
};
b.prototype.asNextName = function(b) {
s("Proxy asNextName");
};
b.prototype.asNextValue = function(b) {
s("Proxy asNextValue");
};
b.prototype.asNextNameIndex = function(b) {
s("Proxy asNextNameIndex");
};
b.protocol = b.prototype;
return b;
}(a.ASNative);
c.Proxy = f;
c.OriginalProxy = f;
})(c.utils || (c.utils = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.notImplemented, v = c.Debug.unexpected, p = c.ArrayUtilities.DataBuffer, u = c.Debug.assert;
(function(c) {
(function(e) {
var c = function(a) {
function e() {
a.apply(this, arguments);
}
__extends(e, a);
Object.defineProperty(e, "dynamicPropertyWriter", {get:function() {
s("public flash.net.ObjectEncoding::get dynamicPropertyWriter");
return null;
}, set:function(a) {
s("public flash.net.ObjectEncoding::set dynamicPropertyWriter");
}, enumerable:!0, configurable:!0});
e.AMF0 = 0;
e.AMF3 = 3;
e.DEFAULT = e.AMF3;
return e;
}(a.ASNative);
e.ObjectEncoding = c;
})(c.net || (c.net = {}));
})(a.flash || (a.flash = {}));
(function(l) {
(function(e) {
var m = function(a) {
function e() {
}
__extends(e, a);
Object.defineProperty(e, "defaultObjectEncoding", {get:function() {
return this._defaultObjectEncoding;
}, set:function(a) {
this._defaultObjectEncoding = a >>> 0;
}, enumerable:!0, configurable:!0});
e.prototype.readObject = function() {
switch(this._objectEncoding) {
case l.net.ObjectEncoding.AMF0:
return h.AMF0.read(this);
case l.net.ObjectEncoding.AMF3:
return h.AMF3.read(this);
default:
v("Object Encoding");
}
};
e.prototype.writeObject = function(a) {
switch(this._objectEncoding) {
case l.net.ObjectEncoding.AMF0:
return h.AMF0.write(this, a);
case l.net.ObjectEncoding.AMF3:
return h.AMF3.write(this, a);
default:
v("Object Encoding");
}
};
e.instanceConstructor = p;
e.staticNatives = [p];
e.instanceNatives = [p.prototype];
e.callableConstructor = null;
e.initializer = function(a) {
var k, f = 0;
a ? (a instanceof ArrayBuffer ? k = a.slice() : Array.isArray(a) ? k = (new Uint8Array(a)).buffer : "buffer" in a ? a.buffer instanceof ArrayBuffer ? k = (new Uint8Array(a)).buffer : a.buffer instanceof Uint8Array ? (k = a.buffer.byteOffset, k = a.buffer.buffer.slice(k, k + a.buffer.length)) : (u(a.buffer instanceof ArrayBuffer), k = a.buffer.slice()) : c.Debug.unexpected("Source type."), f = k.byteLength) : k = new ArrayBuffer(e.INITIAL_SIZE);
this._buffer = k;
this._length = f;
this._position = 0;
this._resetViews();
this._objectEncoding = e.defaultObjectEncoding;
this._littleEndian = !1;
this._bitLength = this._bitBuffer = 0;
};
e.protocol = e.prototype;
e.INITIAL_SIZE = 128;
e._defaultObjectEncoding = l.net.ObjectEncoding.DEFAULT;
return e;
}(a.ASNative);
e.ByteArray = m;
m.prototype.asGetNumericProperty = p.prototype.getValue;
m.prototype.asSetNumericProperty = p.prototype.setValue;
e.OriginalByteArray = m;
})(l.utils || (l.utils = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.notImplemented, h = c.Debug.somewhatImplemented, p = c.AVM2.Runtime.asCoerceString;
(function(u) {
(function(l) {
var e = function(a) {
function e() {
}
__extends(e, a);
Object.defineProperty(e, "enabled", {get:function() {
s("public flash.system.IME::static get enabled");
}, set:function(a) {
s("public flash.system.IME::static set enabled");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e, "conversionMode", {get:function() {
s("public flash.system.IME::static get conversionMode");
}, set:function(a) {
p(a);
s("public flash.system.IME::static set conversionMode");
}, enumerable:!0, configurable:!0});
e.setCompositionString = function(a) {
p(a);
s("public flash.system.IME::static setCompositionString");
};
e.doConversion = function() {
s("public flash.system.IME::static doConversion");
};
e.compositionSelectionChanged = function(a, e) {
s("public flash.system.IME::static compositionSelectionChanged");
};
e.compositionAbandoned = function() {
s("public flash.system.IME::static compositionAbandoned");
};
Object.defineProperty(e, "isSupported", {get:function() {
h("public flash.system.IME::static get isSupported");
return!1;
}, enumerable:!0, configurable:!0});
return e;
}(a.ASNative);
l.IME = e;
e = function(a) {
function e() {
a.apply(this, arguments);
}
__extends(e, a);
Object.defineProperty(e, "ime", {get:function() {
s("public flash.system.System::get ime");
}, enumerable:!0, configurable:!0});
e.setClipboard = function(a) {
a = p(a);
null === c.ClipboardService.instance ? console.warn("setClipboard is only available in the Firefox extension") : c.ClipboardService.instance.setClipboard(a);
};
Object.defineProperty(e, "totalMemoryNumber", {get:function() {
h("public flash.system.System::get totalMemoryNumber");
return 2097152;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e, "freeMemory", {get:function() {
h("public flash.system.System::get freeMemory");
return 1048576;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e, "privateMemory", {get:function() {
h("public flash.system.System::get privateMemory");
return 1048576;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e, "useCodePage", {get:function() {
return e._useCodePage;
}, set:function(a) {
e._useCodePage = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e, "vmVersion", {get:function() {
return "1.0 Shumway - Mozilla Research";
}, enumerable:!0, configurable:!0});
e.pause = function() {
};
e.resume = function() {
};
e.exit = function(a) {
};
e.gc = function() {
};
e.pauseForGCIfCollectionImminent = function(a) {
};
e.disposeXML = function(a) {
};
Object.defineProperty(e, "swfVersion", {get:function() {
return 19;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e, "apiVersion", {get:function() {
return 26;
}, enumerable:!0, configurable:!0});
e.getArgv = function() {
return[];
};
e.getRunmode = function() {
return "mixed";
};
e._useCodePage = !1;
return e;
}(a.ASNative);
l.System = e;
l.OriginalSystem = e;
})(u.system || (u.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.AVM2.ABC.Multiname, v = c.AVM2.ABC.ClassInfo, p = c.AVM2.ABC.ScriptInfo, u = c.AVM2.ABC.InstanceInfo, l = c.AVM2.ABC.Info, e = c.AVM2.ABC.MethodInfo, m = c.Debug.assert, t = c.Debug.notImplemented, q = c.ArrayUtilities.popManyIntoVoid, n = function() {
return function(b) {
void 0 === b && (b = "");
this.message = b;
this.name = "VerifierError";
};
}();
a.VerifierError = n;
var k = function() {
return function() {
};
}();
a.TypeInformation = k;
var f = function() {
function a() {
}
a.from = function(d, g) {
m(d.hash);
var e = a._cache[d.hash];
e || (e = a._cache[d.hash] = new b(d, g));
return e;
};
a.fromSimpleName = function(b, d) {
return a.fromName(s.fromSimpleName(b), d);
};
a.fromName = function(b, d) {
if (void 0 === b) {
return a.Undefined;
}
var g = s.isQName(b) ? s.getFullQualifiedName(b) : void 0;
if (g) {
var e = a._cache.byQN[g];
if (e) {
return e;
}
}
if (g === s.getPublicQualifiedName("void")) {
return a.Void;
}
m(d, "An ApplicationDomain is needed.");
e = (e = d.findClassInfo(b)) ? a.from(e, d) : a.Any;
b.hasTypeParameter() && (e = new w(e, a.fromName(b.typeParameter, d)));
return a._cache.byQN[g] = e;
};
a.initializeTypes = function(b) {
a._typesInitialized || (a.Any = new d("any", "?"), a.Null = new d("Null", "X"), a.Void = new d("Void", "V"), a.Undefined = new d("Undefined", "_"), a.Int = a.fromSimpleName("int", b).instanceType(), a.Uint = a.fromSimpleName("uint", b).instanceType(), a.Class = a.fromSimpleName("Class", b).instanceType(), a.Array = a.fromSimpleName("Array", b).instanceType(), a.Object = a.fromSimpleName("Object", b).instanceType(), a.String = a.fromSimpleName("String", b).instanceType(), a.Number = a.fromSimpleName("Number",
b).instanceType(), a.Boolean = a.fromSimpleName("Boolean", b).instanceType(), a.Function = a.fromSimpleName("Function", b).instanceType(), a.XML = a.fromSimpleName("XML", b).instanceType(), a.XMLList = a.fromSimpleName("XMLList", b).instanceType(), a.QName = a.fromSimpleName("QName", b).instanceType(), a.Namespace = a.fromSimpleName("Namespace", b).instanceType(), a.Dictionary = a.fromSimpleName("flash.utils.Dictionary", b).instanceType(), a._typesInitialized = !0);
};
a.prototype.equals = function(b) {
return this === b;
};
a.prototype.canBeXML = function() {
return this === a.Any || this === a.Object || this === a.XML || this === a.XMLList || this === a.QName || this === a.QName;
};
a.prototype.isStrictComparableWith = function(b) {
return this === b && !this.canBeXML();
};
a.prototype.merge = function(b) {
return a.Any;
};
a.prototype.instanceType = function() {
return a.Any;
};
a.prototype.classType = function() {
return a.Any;
};
a.prototype.super = function() {
c.Debug.abstractMethod("super");
return null;
};
a.prototype.applyType = function(b) {
return null;
};
a.prototype.getTrait = function(b, a, d) {
return null;
};
a.prototype.isNumeric = function() {
return this === a.Int || this === a.Uint || this === a.Number;
};
a.prototype.isString = function() {
return this === a.String;
};
a.prototype.isScriptInfo = function() {
return!1;
};
a.prototype.isClassInfo = function() {
return!1;
};
a.prototype.isInstanceInfo = function() {
return!1;
};
a.prototype.isMethodInfo = function() {
return!1;
};
a.prototype.isTraitsType = function() {
return this instanceof b;
};
a.prototype.isParameterizedType = function() {
return this instanceof w;
};
a.prototype.isMethodType = function() {
return this instanceof g;
};
a.prototype.isMultinameType = function() {
return this instanceof r;
};
a.prototype.isConstantType = function() {
return this instanceof z;
};
a.prototype.isSubtypeOf = function(b) {
return this === b || this.equals(b) ? !0 : this.merge(b) === this;
};
a.prototype.asTraitsType = function() {
m(this.isTraitsType());
return this;
};
a.prototype.asMethodType = function() {
m(this.isMethodType());
return this;
};
a.prototype.asMultinameType = function() {
m(this.isMultinameType());
return this;
};
a.prototype.asConstantType = function() {
m(this.isConstantType());
return this;
};
a.prototype.getConstantValue = function() {
m(this.isConstantType());
return this.value;
};
a.prototype.asParameterizedType = function() {
m(this.isParameterizedType());
return this;
};
a._cache = {byQN:Object.create(null), byHash:Object.create(null)};
a._typesInitialized = !1;
return a;
}();
a.Type = f;
var d = function(b) {
function a(d, g) {
b.call(this);
this.name = d;
this.symbol = g;
}
__extends(a, b);
a.prototype.toString = function() {
return this.symbol;
};
a.prototype.instanceType = function() {
return f.Any;
};
return a;
}(f);
a.AtomType = d;
var b = function(b) {
function a(d, g) {
b.call(this);
this.info = d;
this.domain = g;
}
__extends(a, b);
a.prototype.instanceType = function() {
m(this.info instanceof v);
var b = this.info;
return this._cachedType || (this._cachedType = f.from(b.instanceInfo, this.domain));
};
a.prototype.classType = function() {
m(this.info instanceof u);
var b = this.info;
return this._cachedType || (this._cachedType = f.from(b.classInfo, this.domain));
};
a.prototype.super = function() {
if (this.info instanceof v) {
return f.Class;
}
m(this.info instanceof u);
var b = this.info;
return b.superName ? (b = f.fromName(b.superName, this.domain).instanceType(), m(b instanceof a && b.info instanceof u), b) : null;
};
a.prototype.findTraitByName = function(b, a, d) {
var g = !d, e;
if (s.isQName(a)) {
for (a = s.getQualifiedName(a), k = 0;k < b.length;k++) {
if (e = b[k], s.getQualifiedName(e.name) === a && !(d && e.isGetter() || g && e.isSetter())) {
return e;
}
}
} else {
m(a instanceof s);
for (var f, k = 0;k < a.namespaces.length;k++) {
if (g = a.getQName(k), a.namespaces[k].isDynamic()) {
f = g;
} else {
if (e = this.findTraitByName(b, g, d)) {
return e;
}
}
}
if (f) {
return this.findTraitByName(b, f, d);
}
}
};
a.prototype.getTrait = function(b, a, d) {
if (b.isMultinameType()) {
return null;
}
var g = b.getConstantValue();
if (g.isAttribute()) {
return null;
}
if (d && (this.isInstanceInfo() || this.isClassInfo())) {
d = this;
do {
(g = d.getTrait(b, a, !1)) || (d = d.super());
} while (!g && d);
return g;
}
return this.findTraitByName(this.info.traits, g, a);
};
a.prototype.getTraitAt = function(b) {
for (var a = this.info.traits, d = a.length - 1;0 <= d;d--) {
if (a[d].slotId === b) {
return a[d];
}
}
c.Debug.unexpected("Cannot find trait with slotId: " + b + " in " + a);
};
a.prototype.equals = function(b) {
return b.isTraitsType() && this.info.traits === b.info.traits;
};
a.prototype.merge = function(b) {
if (b.isTraitsType()) {
if (this.equals(b)) {
return this;
}
if (this.isNumeric() && b.isNumeric()) {
return f.Number;
}
if (this.isInstanceInfo() && b.isInstanceInfo()) {
for (var a = [], d = this;d;d = d.super()) {
a.push(d);
}
for (d = b;d;d = d.super()) {
for (b = 0;b < a.length;b++) {
if (a[b].equals(d)) {
return d;
}
}
}
return f.Object;
}
}
return f.Any;
};
a.prototype.isScriptInfo = function() {
return this.info instanceof p;
};
a.prototype.isClassInfo = function() {
return this.info instanceof v;
};
a.prototype.isMethodInfo = function() {
return this.info instanceof e;
};
a.prototype.isInstanceInfo = function() {
return this.info instanceof u;
};
a.prototype.isInstanceOrClassInfo = function() {
return this.isInstanceInfo() || this.isClassInfo();
};
a.prototype.applyType = function(b) {
return new w(this, b);
};
a.prototype._getInfoName = function() {
if (this.info instanceof p) {
return "SI";
}
if (this.info instanceof v) {
return "CI:" + this.info.instanceInfo.name.name;
}
if (this.info instanceof u) {
return "II:" + this.info.name.name;
}
if (this.info instanceof e) {
return "MI";
}
m(!1);
};
a.prototype.toString = function() {
switch(this) {
case f.Int:
return "I";
case f.Uint:
return "U";
case f.Array:
return "A";
case f.Object:
return "O";
case f.String:
return "S";
case f.Number:
return "N";
case f.Boolean:
return "B";
case f.Function:
return "F";
}
return this._getInfoName();
};
return a;
}(f);
a.TraitsType = b;
var g = function(b) {
function a(d, g) {
b.call(this, f.Function.info, g);
this.methodInfo = d;
}
__extends(a, b);
a.prototype.toString = function() {
return "MT " + this.methodInfo;
};
a.prototype.returnType = function() {
return this._cachedType || (this._cachedType = f.fromName(this.methodInfo.returnType, this.domain));
};
return a;
}(b);
a.MethodType = g;
var r = function(b) {
function a(d, g, e) {
b.call(this);
this.namespaces = d;
this.name = g;
this.flags = e;
}
__extends(a, b);
a.prototype.toString = function() {
return "MN";
};
return a;
}(f);
a.MultinameType = r;
var w = function(b) {
function a(d, g) {
b.call(this, d.info, d.domain);
this.type = d;
this.parameter = g;
}
__extends(a, b);
return a;
}(b);
a.ParameterizedType = w;
var z = function(b) {
function a(d) {
b.call(this);
this.value = d;
}
__extends(a, b);
a.prototype.toString = function() {
return String(this.value);
};
a.from = function(b) {
return new a(b);
};
a.fromArray = function(b) {
return b.map(function(b) {
return new a(b);
});
};
return a;
}(f);
a.ConstantType = z;
var A = function() {
function b() {
this.id = b.id += 1;
this.stack = [];
this.scope = [];
this.local = [];
}
b.prototype.clone = function() {
var a = new b;
a.originalId = this.id;
a.stack = this.stack.slice(0);
a.scope = this.scope.slice(0);
a.local = this.local.slice(0);
return a;
};
b.prototype.trace = function(b) {
b.writeLn(this.toString());
};
b.prototype.toString = function() {
return "<" + this.id + (this.originalId ? ":" + this.originalId : "") + ", L[" + this.local.join(", ") + "], S[" + this.stack.join(", ") + "], $[" + this.scope.join(", ") + "]>";
};
b.prototype.equals = function(a) {
return b._arrayEquals(this.stack, a.stack) && b._arrayEquals(this.scope, a.scope) && b._arrayEquals(this.local, a.local);
};
b._arrayEquals = function(b, a) {
if (b.length != a.length) {
return!1;
}
for (var d = b.length - 1;0 <= d;d--) {
if (!b[d].equals(a[d])) {
return!1;
}
}
return!0;
};
b.prototype.isSubset = function(a) {
return b._arraySubset(this.stack, a.stack) && b._arraySubset(this.scope, a.scope) && b._arraySubset(this.local, a.local);
};
b._arraySubset = function(b, a) {
if (b.length != a.length) {
return!1;
}
for (var d = b.length - 1;0 <= d;d--) {
if (b[d] !== a[d] && !b[d].equals(a[d]) && b[d].merge(a[d]) !== b[d]) {
return!1;
}
}
return!0;
};
b.prototype.merge = function(a) {
b._mergeArrays(this.local, a.local);
b._mergeArrays(this.stack, a.stack);
b._mergeArrays(this.scope, a.scope);
};
b._mergeArrays = function(b, a) {
m(b.length === a.length, "a: " + b + " b: " + a);
for (var d = b.length - 1;0 <= d;d--) {
m(void 0 !== b[d] && void 0 !== a[d]), b[d] !== a[d] && (b[d] = b[d].merge(a[d]));
}
};
b.id = 0;
return b;
}();
a.State = A;
var B = function() {
function a(b, d, g) {
this.methodInfo = b;
this.domain = d;
this.savedScope = g;
this.writer = new c.IndentingWriter;
this.pushAnyCount = this.pushCount = 0;
f.initializeTypes(d);
this.writer = c.AVM2.Verifier.traceLevel.value ? new c.IndentingWriter : null;
this.multinames = b.abc.constantPool.multinames;
this.returnType = f.Undefined;
}
a.prototype.verify = function() {
var b = this.methodInfo;
this.writer && this.methodInfo.trace(this.writer);
m(b.localCount >= b.parameters.length + 1);
this._verifyBlocks(this._prepareEntryState());
};
a.prototype._prepareEntryState = function() {
var b = new A, a = this.methodInfo;
this.thisType = a.holder ? f.from(a.holder, this.domain) : f.Any;
b.local.push(this.thisType);
for (var d = a.parameters, g = 0;g < d.length;g++) {
b.local.push(f.fromName(d[g].type, this.domain).instanceType());
}
d = a.localCount - a.parameters.length - 1;
if (a.needsRest() || a.needsArguments()) {
b.local.push(f.Array), d -= 1;
}
for (g = 0;g < d;g++) {
b.local.push(f.Undefined);
}
m(b.local.length === a.localCount);
return b;
};
a.prototype._verifyBlocks = function(b) {
var a = this.writer, d = this.methodInfo.analysis.blocks;
d.forEach(function(b) {
b.verifierEntryState = b.verifierExitState = null;
});
for (var g = 0;g < d.length;g++) {
d[g].bdo = g;
}
var e = new c.SortedList(function(b, a) {
return b.bdo - a.bdo;
});
d[0].verifierEntryState = b;
for (e.push(d[0]);!e.isEmpty();) {
var f = e.pop(), k = f.verifierExitState = f.verifierEntryState.clone();
this._verifyBlock(f, k);
f.succs.forEach(function(b) {
e.contains(b) ? (a && a.writeLn("Forward Merged Block: " + b.bid + " " + k.toString() + " with " + b.verifierEntryState.toString()), b.verifierEntryState.merge(k), a && a.writeLn("Merged State: " + b.verifierEntryState)) : b.verifierEntryState ? b.verifierEntryState.isSubset(k) || (a && a.writeLn("Backward Merged Block: " + f.bid + " with " + b.bid + " " + k.toString() + " with " + b.verifierEntryState.toString()), b.verifierEntryState.merge(k), e.push(b), a && a.writeLn("Merged State: " +
b.verifierEntryState)) : (b.verifierEntryState = k.clone(), e.push(b), a && a.writeLn("Added Block: " + b.bid + " to worklist: " + b.verifierEntryState.toString()));
});
}
a && (a.writeLn("Inferred return type: " + this.returnType), a.writeLn("Quality pushCount: " + this.pushCount + ", pushAnyCount: " + this.pushAnyCount));
this.methodInfo.inferredReturnType = this.returnType;
};
a.prototype._verifyBlock = function(a, d) {
function e() {
return ea.ti || (ea.ti = new k);
}
function w(b) {
m(b);
e().type = b;
W.push(b);
S.pushCount++;
b === f.Any && S.pushAnyCount++;
}
function l(b) {
return W.pop();
}
function A() {
t("Bytecode not implemented in verifier: " + ea);
}
function p() {
var b = S.multinames[ea.index];
if (b.isRuntime()) {
var a;
a = b.isRuntimeName() ? l() : z.from(b.name);
var d;
d = b.isRuntimeNamespace() ? [l()] : z.fromArray(b.namespaces);
return new r(d, a, b.flags);
}
return z.from(b);
}
function v(b) {
return b.isMultinameType() && b.asMultinameType().name.isNumeric() || b.isConstantType() && s.isNumeric(b.getConstantValue()) ? !0 : !1;
}
function B(b, a) {
if (b.isTraitsType() || b.isParameterizedType()) {
var d = b.getTrait(a, !1, !0);
if (d) {
O && O.debugLn("getProperty(" + a + ") -> " + d);
e().trait = d;
if (d.isSlot() || d.isConst()) {
return f.fromName(d.typeName, S.domain).instanceType();
}
if (d.isGetter()) {
return f.fromName(d.methodInfo.returnType, S.domain).instanceType();
}
if (d.isClass()) {
return f.from(d.classInfo, S.domain);
}
if (d.isMethod()) {
return new g(d.methodInfo, S.domain);
}
} else {
if (v(a) && b.isParameterizedType()) {
return d = b.asParameterizedType().parameter, O && O.debugLn("getProperty(" + a + ") -> " + d), d;
}
b !== f.Array && O && O.warnLn("getProperty(" + a + ")");
}
}
return f.Any;
}
function u(b, a, d) {
if (b.isTraitsType() || b.isParameterizedType()) {
(d = b.getTrait(a, !0, !0)) ? (O && O.debugLn("setProperty(" + a + ") -> " + d), e().trait = d) : v(a) && b.isParameterizedType() || b !== f.Array && O && O.warnLn("setProperty(" + a + ")");
}
}
function M(b, a) {
if (b.isMultinameType()) {
return f.Any;
}
for (var d = S.savedScope, g = x.length - 1;g >= -d.length;g--) {
var k = 0 <= g ? x[g] : d[d.length + g];
if (k.isTraitsType()) {
if (k.getTrait(b, !1, !0)) {
e().scopeDepth = x.length - g - 1;
if (k.isClassInfo() || k.isScriptInfo()) {
e().object = h.Runtime.LazyInitializer.create(k.info);
}
O && O.debugLn("findProperty(" + b + ") -> " + k);
return k;
}
} else {
return O && O.warnLn("findProperty(" + b + ")"), f.Any;
}
}
if (d = S.domain.findDefiningScript(b.getConstantValue(), !1)) {
return e().object = h.Runtime.LazyInitializer.create(d.script), k = f.from(d.script, S.domain), O && O.debugLn("findProperty(" + b + ") -> " + k), k;
}
if (b.isConstantType() && "unsafeJSNative" === b.getConstantValue().name) {
return f.Any;
}
O && O.warnLn("findProperty(" + b + ")");
return f.Any;
}
function N(a) {
if (a instanceof b && (a = a.getTraitAt(ea.index), O && O.debugLn("accessSlot() -> " + a), a)) {
e().trait = a;
if (a.isSlot()) {
return f.fromName(a.typeName, S.domain).instanceType();
}
if (a.isClass()) {
return f.from(a.classInfo, S.domain);
}
}
return f.Any;
}
function Q(b) {
if (b.isTraitsType() || b.isParameterizedType()) {
return b === f.Function || b === f.Class || b === f.Object ? f.Object : b.instanceType();
}
O && O.warnLn("construct(" + b + ")");
return f.Any;
}
for (var S = this, O = this.writer, P = this.methodInfo, V = P.analysis.bytecodes, $ = d.local, W = d.stack, x = d.scope, ea, Y = this.savedScope[0], R, U, ba, X = a.position, ga = a.end.position;X <= ga;X++) {
if (ea = V[X], R = ea.op, 240 !== R && 241 !== R) {
switch(O && 1 < c.AVM2.Verifier.traceLevel.value && O.writeLn(("stateBefore: " + d.toString() + " $$[" + this.savedScope.join(", ") + "]").padRight(" ", 100) + " : " + X + ", " + ea.toString(P.abc)), R) {
case 1:
break;
case 3:
l();
break;
case 4:
ba = p();
U = l();
m(U.super());
e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info);
w(B(U.super(), ba));
break;
case 5:
R = l();
ba = p();
U = l();
m(U.super());
e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info);
u(U.super(), ba, R);
break;
case 6:
A();
break;
case 7:
A();
break;
case 8:
d.local[ea.index] = f.Undefined;
break;
case 10:
A();
break;
case 11:
A();
break;
case 12:
;
case 24:
;
case 13:
;
case 23:
;
case 14:
;
case 22:
;
case 15:
;
case 21:
;
case 19:
;
case 20:
;
case 25:
;
case 26:
l();
l();
break;
case 16:
break;
case 17:
;
case 18:
l();
break;
case 27:
l(f.Int);
break;
case 29:
x.pop();
break;
case 30:
;
case 35:
l(f.Int);
l();
w(f.Any);
break;
case 31:
w(f.Boolean);
break;
case 50:
w(f.Boolean);
break;
case 32:
w(f.Null);
break;
case 33:
w(f.Undefined);
break;
case 34:
A();
break;
case 36:
w(f.Int);
break;
case 37:
w(f.Int);
break;
case 44:
w(f.String);
break;
case 45:
w(f.Int);
break;
case 46:
w(f.Uint);
break;
case 47:
w(f.Number);
break;
case 38:
w(f.Boolean);
break;
case 39:
w(f.Boolean);
break;
case 40:
w(f.Number);
break;
case 41:
l();
break;
case 42:
R = l();
w(R);
w(R);
break;
case 43:
U = l();
ba = l();
w(U);
w(ba);
break;
case 28:
l();
x.push(f.Any);
break;
case 48:
x.push(l());
break;
case 49:
A();
break;
case 53:
;
case 54:
;
case 55:
w(f.Int);
break;
case 56:
;
case 57:
w(f.Number);
break;
case 58:
;
case 59:
;
case 60:
l(f.Int);
break;
case 61:
;
case 62:
l(f.Number);
break;
case 64:
w(f.Function);
break;
case 65:
q(W, ea.argCount);
U = l();
l();
w(f.Any);
break;
case 67:
throw new n("callmethod");;
case 68:
A();
break;
case 69:
;
case 78:
;
case 79:
;
case 70:
;
case 76:
q(W, ea.argCount);
ba = p();
U = l();
if (69 === R || 78 === R) {
U = this.thisType.super(), e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info);
}
U = B(U, ba);
if (79 === R || 78 === R) {
break;
}
U = U.isMethodType() ? U.asMethodType().returnType().instanceType() : U.isTraitsType() && U.isClassInfo() ? U.instanceType() : f.Any;
w(U);
break;
case 71:
this.returnType.merge(f.Undefined);
break;
case 72:
U = l();
P.returnType && (ba = f.fromName(P.returnType, this.domain).instanceType(), ba.isSubtypeOf(U) && (e().noCoercionNeeded = !0));
break;
case 73:
q(W, ea.argCount);
W.pop();
this.thisType.isInstanceInfo() && this.thisType.super() === f.Object ? e().noCallSuperNeeded = !0 : e().baseClass = h.Runtime.LazyInitializer.create(this.thisType.asTraitsType().super().classType().info);
break;
case 66:
q(W, ea.argCount);
w(Q(l()));
break;
case 74:
q(W, ea.argCount);
ba = p();
w(Q(B(W.pop(), ba)));
break;
case 75:
A();
break;
case 77:
A();
break;
case 80:
;
case 81:
;
case 82:
break;
case 83:
m(1 === ea.argCount);
R = l();
U = l();
U === f.Any ? w(f.Any) : w(U.applyType(R));
break;
case 84:
A();
break;
case 85:
q(W, 2 * ea.argCount);
w(f.Object);
break;
case 86:
q(W, ea.argCount);
w(f.Array);
break;
case 87:
w(f.from(this.methodInfo, this.domain));
break;
case 88:
w(f.Any);
break;
case 89:
p();
l();
w(f.XMLList);
break;
case 90:
w(f.Any);
break;
case 93:
w(M(p(), !0));
break;
case 94:
w(M(p(), !1));
break;
case 95:
A();
break;
case 96:
ba = p();
w(B(M(ba, !0), ba));
break;
case 104:
;
case 97:
R = l();
ba = p();
U = l();
u(U, ba, R);
break;
case 98:
w($[ea.index]);
break;
case 99:
$[ea.index] = l();
break;
case 100:
w(Y);
e().object = h.Runtime.LazyInitializer.create(Y.asTraitsType().info);
break;
case 101:
w(x[ea.index]);
break;
case 102:
ba = p();
U = l();
w(B(U, ba));
break;
case 103:
A();
break;
case 105:
A();
break;
case 106:
p();
l();
w(f.Boolean);
break;
case 107:
A();
break;
case 108:
w(N(l()));
break;
case 109:
R = l();
U = l();
N(U);
break;
case 110:
A();
break;
case 111:
A();
break;
case 112:
l();
w(f.String);
break;
case 113:
l();
w(f.String);
break;
case 114:
l();
w(f.String);
break;
case 131:
;
case 115:
l();
w(f.Int);
break;
case 136:
;
case 116:
l();
w(f.Uint);
break;
case 132:
;
case 117:
l();
w(f.Number);
break;
case 129:
;
case 118:
l();
w(f.Boolean);
break;
case 119:
A();
break;
case 120:
break;
case 121:
l();
w(f.Number);
break;
case 122:
A();
break;
case 123:
A();
break;
case 128:
U = l();
ba = f.fromName(this.multinames[ea.index], this.domain).instanceType();
ba.isSubtypeOf(U) && (e().noCoercionNeeded = !0);
w(ba);
break;
case 130:
break;
case 133:
l();
w(f.String);
break;
case 134:
U = l();
ba = f.fromName(this.multinames[ea.index], this.domain).instanceType();
ba.isSubtypeOf(U) && (e().noCoercionNeeded = !0);
w(ba);
break;
case 135:
U = l();
l();
U === f.Class ? w(U) : U.isTraitsType() ? w(U.instanceType()) : w(f.Any);
break;
case 137:
A();
break;
case 144:
;
case 145:
;
case 147:
l();
w(f.Number);
break;
case 146:
;
case 148:
$[ea.index] = f.Number;
break;
case 149:
l();
w(f.String);
break;
case 150:
l();
w(f.Boolean);
break;
case 160:
ba = l();
U = l();
U.isNumeric() && ba.isNumeric() ? w(f.Number) : U === f.String || ba === f.String ? w(f.String) : w(f.Any);
break;
case 161:
;
case 162:
;
case 163:
;
case 164:
l();
l();
w(f.Number);
break;
case 168:
;
case 169:
;
case 170:
;
case 165:
;
case 166:
;
case 167:
l();
l();
w(f.Int);
break;
case 151:
l();
w(f.Int);
break;
case 171:
;
case 172:
;
case 173:
;
case 174:
;
case 175:
;
case 176:
;
case 177:
;
case 180:
l();
l();
w(f.Boolean);
break;
case 178:
l();
w(f.Boolean);
break;
case 179:
l();
l();
w(f.Boolean);
break;
case 194:
;
case 195:
$[ea.index] = f.Int;
break;
case 193:
;
case 192:
;
case 196:
l();
w(f.Int);
break;
case 197:
;
case 198:
;
case 199:
l();
l();
w(f.Int);
break;
case 208:
;
case 209:
;
case 210:
;
case 211:
w($[R - 208]);
break;
case 212:
;
case 213:
;
case 214:
;
case 215:
$[R - 212] = l();
break;
case 239:
break;
case 242:
break;
case 243:
break;
default:
console.info("Not Implemented: " + ea);
}
}
}
};
return a;
}(), M = function() {
function b() {
}
b.prototype._prepareScopeObjects = function(b, a) {
var d = b.abc.applicationDomain;
return a.getScopeObjects().map(function(b) {
if (b instanceof l) {
return f.from(b, d);
}
if (b instanceof c.AVM2.Runtime.Global) {
return f.from(b.scriptInfo, d);
}
if (b instanceof c.AVM2.AS.ASClass) {
return f.from(b.classInfo, d);
}
if (b instanceof c.AVM2.Runtime.ActivationInfo) {
return f.from(b.methodInfo, d);
}
if (b.class) {
return f.from(b.class.classInfo.instanceInfo, d);
}
m(!1, b.toString());
return f.Any;
});
};
b.prototype.verifyMethod = function(b, a) {
var d = this._prepareScopeObjects(b, a);
(new B(b, b.abc.applicationDomain, d)).verify();
};
return b;
}();
a.Verifier = M;
})(h.Verifier || (h.Verifier = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
function h(b, a) {
for (var d = 0;d < b.length;d++) {
a(b[d]);
}
}
function p(a) {
var w, n = c.StringUtilities;
if (a instanceof g) {
return a.value instanceof l ? a.value.name : a.value;
}
if (a instanceof d) {
return a.name;
}
if (a instanceof f) {
return w = n.concat3("|", a.id, "|"), w;
}
if (a instanceof t) {
return w = n.concat3("{", a.id, "}"), w;
}
if (a instanceof b) {
return 3 === a.type ? (w = n.concat5("[", a.id, "->", a.argument.id, "]"), w) : (w = n.concat3("(", a.id, ")"), w);
}
if (a instanceof k) {
return w = n.concat3("(", a.id, ")"), w;
}
if (a instanceof m) {
return a.id;
}
e(a + " " + typeof a);
}
var u = c.Debug.assert, l = c.AVM2.ABC.Multiname, e = c.Debug.unexpected;
(function(b) {
b[b.NumericProperty = 1] = "NumericProperty";
b[b.RESOLVED = 2] = "RESOLVED";
b[b.PRISTINE = 4] = "PRISTINE";
b[b.IS_METHOD = 8] = "IS_METHOD";
b[b.AS_CALL = 16] = "AS_CALL";
})(a.Flags || (a.Flags = {}));
var m = function() {
function b() {
this.id = b.getNextID();
}
b.getNextID = function() {
return b._nextID[b._nextID.length - 1] += 1;
};
b.prototype.visitInputs = function(b) {
};
b.startNumbering = function() {
b._nextID.push(0);
};
b.stopNumbering = function() {
b._nextID.pop();
};
b.prototype.toString = function(b) {
if (b) {
return p(this);
}
var a = [];
this.visitInputs(function(b) {
a.push(p(b));
});
b = p(this) + " = " + this.nodeName.toUpperCase();
a.length && (b += " " + a.join(", "));
return b;
};
b.prototype.visitInputsNoConstants = function(b) {
this.visitInputs(function(d) {
a.isConstant(d) || b(d);
});
};
b.prototype.replaceInput = function(a, d) {
var g = 0, e;
for (e in this) {
var f = this[e];
f instanceof b && f === a && (this[e] = d, g++);
f instanceof Array && (g += f.replace(a, d));
}
return g;
};
b._nextID = [];
return b;
}();
a.Node = m;
m.prototype.nodeName = "Node";
var t = function(b) {
function a() {
b.call(this);
}
__extends(a, b);
return a;
}(m);
a.Control = t;
t.prototype.nodeName = "Control";
var q = function(b) {
function a(d) {
b.call(this);
this.predecessors = d ? [d] : [];
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
h(this.predecessors, b);
};
return a;
}(t);
a.Region = q;
q.prototype.nodeName = "Region";
q = function(b) {
function a() {
b.call(this, null);
this.control = this;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
h(this.predecessors, b);
b(this.scope);
};
return a;
}(q);
a.Start = q;
q.prototype.nodeName = "Start";
q = function(b) {
function a(d) {
b.call(this);
this.control = d;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
};
return a;
}(t);
a.End = q;
q.prototype.nodeName = "End";
var n = function(b) {
function a(d, g, e) {
b.call(this, d);
this.store = g;
this.argument = e;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
b(this.store);
b(this.argument);
};
return a;
}(q);
a.Stop = n;
n.prototype.nodeName = "Stop";
n = function(b) {
function a(d, g) {
b.call(this, d);
this.predicate = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
b(this.predicate);
};
return a;
}(q);
a.If = n;
n.prototype.nodeName = "If";
n = function(b) {
function a(d, g) {
b.call(this, d);
this.determinant = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
b(this.determinant);
};
return a;
}(q);
a.Switch = n;
n.prototype.nodeName = "Switch";
q = function(b) {
function a(d) {
b.call(this, d);
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
};
return a;
}(q);
a.Jump = q;
q.prototype.nodeName = "Jump";
var k = function(b) {
function a() {
b.call(this);
}
__extends(a, b);
return a;
}(m);
a.Value = k;
k.prototype.nodeName = "Value";
q = function(b) {
function a() {
b.call(this);
}
__extends(a, b);
return a;
}(k);
a.Store = q;
q.prototype.nodeName = "Store";
q = function(b) {
function a(d, g) {
b.call(this);
this.control = d;
this.store = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
this.store && b(this.store);
this.loads && h(this.loads, b);
};
return a;
}(k);
a.StoreDependent = q;
q.prototype.nodeName = "StoreDependent";
n = function(b) {
function a(d, g, e, f, k, c) {
b.call(this, d, g);
this.callee = e;
this.object = f;
this.args = k;
this.flags = c;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
this.store && b(this.store);
this.loads && h(this.loads, b);
b(this.callee);
this.object && b(this.object);
h(this.args, b);
};
return a;
}(q);
a.Call = n;
n.prototype.nodeName = "Call";
n = function(b) {
function a(d, g, e, f) {
b.call(this, d, g);
this.callee = e;
this.args = f;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
this.store && b(this.store);
this.loads && h(this.loads, b);
b(this.callee);
h(this.args, b);
};
return a;
}(q);
a.New = n;
n.prototype.nodeName = "New";
n = function(b) {
function a(d, g, e, f) {
b.call(this, d, g);
this.object = e;
this.name = f;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
this.store && b(this.store);
this.loads && h(this.loads, b);
b(this.object);
b(this.name);
};
return a;
}(q);
a.GetProperty = n;
n.prototype.nodeName = "GetProperty";
n = function(b) {
function a(d, g, e, f, k) {
b.call(this, d, g);
this.object = e;
this.name = f;
this.value = k;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
this.store && b(this.store);
this.loads && h(this.loads, b);
b(this.object);
b(this.name);
b(this.value);
};
return a;
}(q);
a.SetProperty = n;
n.prototype.nodeName = "SetProperty";
n = function(b) {
function a(d, g, e, f) {
b.call(this, d, g);
this.object = e;
this.name = f;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
this.store && b(this.store);
this.loads && h(this.loads, b);
b(this.object);
b(this.name);
};
return a;
}(q);
a.DeleteProperty = n;
n.prototype.nodeName = "DeleteProperty";
q = function(b) {
function a(d, g, e, f, k, c) {
b.call(this, d, g);
this.object = e;
this.name = f;
this.args = k;
this.flags = c;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
this.store && b(this.store);
this.loads && h(this.loads, b);
b(this.object);
b(this.name);
h(this.args, b);
};
return a;
}(q);
a.CallProperty = q;
q.prototype.nodeName = "CallProperty";
var f = function(b) {
function a(d, g) {
b.call(this);
this.control = this.control = d;
this.args = g ? [g] : [];
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
h(this.args, b);
};
a.prototype.seal = function() {
this.sealed = !0;
};
a.prototype.pushValue = function(b) {
u(!this.sealed);
this.args.push(b);
};
return a;
}(k);
a.Phi = f;
f.prototype.nodeName = "Phi";
var d = function(b) {
function a(d) {
b.call(this);
this.name = d;
}
__extends(a, b);
return a;
}(k);
a.Variable = d;
d.prototype.nodeName = "Variable";
q = function(b) {
function a(d) {
b.call(this);
this.argument = d;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.argument);
};
return a;
}(k);
a.Copy = q;
q.prototype.nodeName = "Copy";
q = function(b) {
function a(d, g) {
b.call(this);
this.to = d;
this.from = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.to);
b(this.from);
};
return a;
}(k);
a.Move = q;
q.prototype.nodeName = "Move";
(function(b) {
b[b.CASE = 0] = "CASE";
b[b.TRUE = 1] = "TRUE";
b[b.FALSE = 2] = "FALSE";
b[b.STORE = 3] = "STORE";
b[b.SCOPE = 4] = "SCOPE";
})(a.ProjectionType || (a.ProjectionType = {}));
var b = function(b) {
function a(d, g, e) {
b.call(this);
this.argument = d;
this.type = g;
this.selector = e;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.argument);
};
a.prototype.project = function() {
return this.argument;
};
return a;
}(k);
a.Projection = b;
b.prototype.nodeName = "Projection";
q = function(b) {
function a(d, g, e, f) {
b.call(this);
this.control = d;
this.condition = g;
this.left = e;
this.right = f;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
this.control && b(this.control);
b(this.condition);
b(this.left);
b(this.right);
};
return a;
}(k);
a.Latch = q;
q.prototype.nodeName = "Latch";
q = function() {
function b(a, d, g) {
this.name = a;
this.evaluate = d;
this.isBinary = g;
b.byName[a] = this;
}
b.linkOpposites = function(b, a) {
b.not = a;
a.not = b;
};
b.fromName = function(a) {
return b.byName[a];
};
b.byName = Object.create(null);
b.ADD = new b("+", function(b, a) {
return b + a;
}, !0);
b.SUB = new b("-", function(b, a) {
return b - a;
}, !0);
b.MUL = new b("*", function(b, a) {
return b * a;
}, !0);
b.DIV = new b("/", function(b, a) {
return b / a;
}, !0);
b.MOD = new b("%", function(b, a) {
return b % a;
}, !0);
b.AND = new b("&", function(b, a) {
return b & a;
}, !0);
b.OR = new b("|", function(b, a) {
return b | a;
}, !0);
b.XOR = new b("^", function(b, a) {
return b ^ a;
}, !0);
b.LSH = new b("<<", function(b, a) {
return b << a;
}, !0);
b.RSH = new b(">>", function(b, a) {
return b >> a;
}, !0);
b.URSH = new b(">>>", function(b, a) {
return b >>> a;
}, !0);
b.SEQ = new b("===", function(b, a) {
return b === a;
}, !0);
b.SNE = new b("!==", function(b, a) {
return b !== a;
}, !0);
b.EQ = new b("==", function(b, a) {
return b == a;
}, !0);
b.NE = new b("!=", function(b, a) {
return b != a;
}, !0);
b.LE = new b("<=", function(b, a) {
return b <= a;
}, !0);
b.GT = new b(">", function(b, a) {
return b > a;
}, !0);
b.LT = new b("<", function(b, a) {
return b < a;
}, !0);
b.GE = new b(">=", function(b, a) {
return b >= a;
}, !0);
b.PLUS = new b("+", function(b) {
return+b;
}, !1);
b.NEG = new b("-", function(b) {
return-b;
}, !1);
b.TRUE = new b("!!", function(b) {
return!!b;
}, !1);
b.FALSE = new b("!", function(b) {
return!b;
}, !1);
b.TYPE_OF = new b("typeof", function(b) {
return typeof b;
}, !1);
b.BITWISE_NOT = new b("~", function(b) {
return~b;
}, !1);
b.AS_ADD = new b("+", function(b, a) {
return "string" === typeof b || "string" === typeof a ? String(b) + String(a) : b + a;
}, !0);
return b;
}();
a.Operator = q;
q.linkOpposites(q.SEQ, q.SNE);
q.linkOpposites(q.EQ, q.NE);
q.linkOpposites(q.TRUE, q.FALSE);
q = function(b) {
function a(d, g, e) {
b.call(this);
this.operator = d;
this.left = g;
this.right = e;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.left);
b(this.right);
};
return a;
}(k);
a.Binary = q;
q.prototype.nodeName = "Binary";
q = function(b) {
function a(d, g) {
b.call(this);
this.operator = d;
this.argument = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.argument);
};
return a;
}(k);
a.Unary = q;
q.prototype.nodeName = "Unary";
var g = function(b) {
function a(d) {
b.call(this);
this.value = d;
}
__extends(a, b);
return a;
}(k);
a.Constant = g;
g.prototype.nodeName = "Constant";
q = function(b) {
function a(d) {
b.call(this);
this.name = d;
}
__extends(a, b);
return a;
}(k);
a.GlobalProperty = q;
q.prototype.nodeName = "GlobalProperty";
q = function(b) {
function a(d) {
b.call(this);
this.control = d;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
};
return a;
}(k);
a.This = q;
q.prototype.nodeName = "This";
q = function(b) {
function a(d, g) {
b.call(this);
this.control = d;
this.argument = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
b(this.argument);
};
return a;
}(k);
a.Throw = q;
q.prototype.nodeName = "Throw";
q = function(b) {
function a(d) {
b.call(this);
this.control = d;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
};
return a;
}(k);
a.Arguments = q;
q.prototype.nodeName = "Arguments";
q = function(b) {
function a(d, g, e) {
b.call(this);
this.control = d;
this.index = g;
this.name = e;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
};
return a;
}(k);
a.Parameter = q;
q.prototype.nodeName = "Parameter";
q = function(b) {
function a(d, g) {
b.call(this);
this.control = d;
this.elements = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
h(this.elements, b);
};
return a;
}(k);
a.NewArray = q;
q.prototype.nodeName = "NewArray";
q = function(b) {
function a(d, g) {
b.call(this);
this.control = d;
this.properties = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.control);
h(this.properties, b);
};
return a;
}(k);
a.NewObject = q;
q.prototype.nodeName = "NewObject";
q = function(b) {
function a(d, g) {
b.call(this);
this.key = d;
this.value = g;
}
__extends(a, b);
a.prototype.visitInputs = function(b) {
b(this.key);
b(this.value);
};
return a;
}(k);
a.KeyValuePair = q;
q.prototype.mustFloat = !0;
q.prototype.nodeName = "KeyValuePair";
a.nameOf = p;
})(a.IR || (a.IR = {}));
})(h.Compiler || (h.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
function v(b) {
return b.id;
}
function p(b) {
return b instanceof a.Phi;
}
function u(b) {
return b instanceof a.Constant && b.value instanceof d;
}
function l(b) {
return p(b) || b instanceof a.Store || q(b, 3);
}
function e(b) {
return b instanceof a.Constant;
}
function m(b) {
return b instanceof a.Control;
}
function t(b) {
return b instanceof a.Value;
}
function q(b, d) {
return b instanceof a.Projection && (!d || b.type === d);
}
function n(b) {
return b instanceof a.Projection ? b.project() : b;
}
var k = c.Debug.assert, f = c.Debug.unexpected, d = c.AVM2.ABC.Multiname, b = c.ArrayUtilities.top, g = c.IntegerUtilities.bitCount, r = c.ArrayUtilities.pushUnique, w = c.ArrayUtilities.unique;
a.isNotPhi = function(b) {
return!p(b);
};
a.isPhi = p;
a.isScope = function(b) {
return p(b) || b instanceof a.ASScope || q(b, 4);
};
a.isMultinameConstant = u;
a.isMultiname = function(b) {
return u(b) || b instanceof a.ASMultiname;
};
a.isStore = l;
a.isConstant = e;
a.isControlOrNull = function(b) {
return m(b) || null === b;
};
a.isStoreOrNull = function(b) {
return l(b) || null === b;
};
a.isControl = m;
a.isValueOrNull = function(b) {
return t(b) || null === b;
};
a.isValue = t;
a.isProjection = q;
a.Null = new a.Constant(null);
a.Undefined = new a.Constant(void 0);
a.True = new a.Constant(!0);
a.False = new a.Constant(!1);
var z = function() {
function b(a, d, g) {
this.id = a;
this.nodes = [d, g];
this.region = d;
this.successors = [];
this.predecessors = [];
}
b.prototype.pushSuccessorAt = function(b, a) {
k(b);
k(!this.successors[a]);
this.successors[a] = b;
b.pushPredecessor(this);
};
b.prototype.pushSuccessor = function(b, a) {
k(b);
this.successors.push(b);
a && b.pushPredecessor(this);
};
b.prototype.pushPredecessor = function(b) {
k(b);
this.predecessors.push(b);
};
b.prototype.visitNodes = function(b) {
for (var a = this.nodes, d = 0, g = a.length;d < g;d++) {
b(a[d]);
}
};
b.prototype.visitSuccessors = function(b) {
for (var a = this.successors, d = 0, g = a.length;d < g;d++) {
b(a[d]);
}
};
b.prototype.visitPredecessors = function(b) {
for (var a = this.predecessors, d = 0, g = a.length;d < g;d++) {
b(a[d]);
}
};
b.prototype.append = function(b) {
k(2 <= this.nodes.length);
k(t(b), b);
k(!p(b));
k(0 > this.nodes.indexOf(b));
b.mustFloat || this.nodes.splice(this.nodes.length - 1, 0, b);
};
b.prototype.toString = function() {
return "B" + this.id + (this.name ? " (" + this.name + ")" : "");
};
b.prototype.trace = function(b) {
b.writeLn(this.toString());
};
return b;
}();
a.Block = z;
var A = function() {
function d(b) {
this.exit = this.exit = b;
}
d.prototype.buildCFG = function() {
return M.fromDFG(this);
};
d.preOrderDepthFirstSearch = function(b, a, d) {
var g = [];
b = [b];
for (var e = b.push.bind(b), f;f = b.pop();) {
1 !== g[f.id] && (g[f.id] = 1, d(f), b.push(f), a(f, e));
}
};
d.postOrderDepthFirstSearch = function(a, d, g) {
function e(b) {
f[b.id] || k.push(b);
}
for (var f = [], k = [a];a = b(k);) {
f[a.id] ? (1 === f[a.id] && (f[a.id] = 2, g(a)), k.pop()) : (f[a.id] = 1, d(a, e));
}
};
d.prototype.forEachInPreOrderDepthFirstSearch = function(b) {
function d(b) {
e(b) || (k(b instanceof a.Node), f.push(b));
}
for (var g = Array(1024), f = [this.exit], c;c = f.pop();) {
g[c.id] || (g[c.id] = 1, b && b(c), f.push(c), c.visitInputs(d));
}
};
d.prototype.forEach = function(b, a) {
(a ? d.postOrderDepthFirstSearch : d.preOrderDepthFirstSearch)(this.exit, function(b, a) {
b.visitInputsNoConstants(a);
}, b);
};
d.prototype.traceMetrics = function(b) {
var a = new c.Metrics.Counter(!0);
d.preOrderDepthFirstSearch(this.exit, function(b, a) {
b.visitInputsNoConstants(a);
}, function(b) {
h.countTimeline(b.nodeName);
});
a.trace(b);
};
d.prototype.trace = function(b) {
function d(b) {
return b instanceof a.Control ? "yellow" : b instanceof a.Phi ? "purple" : b instanceof a.Value ? "green" : "white";
}
function g(b) {
return b instanceof a.Projection ? b.project() : b;
}
function e(b) {
b = g(b);
k[b.id] || (k[b.id] = !0, b.block && c.push(b.block), f.push(b), b.visitInputsNoConstants(e));
}
var f = [], k = {}, c = [];
e(this.exit);
b.writeLn("");
b.enter("digraph DFG {");
b.writeLn("graph [bgcolor = gray10];");
b.writeLn("edge [color = white];");
b.writeLn("node [shape = box, fontname = Consolas, fontsize = 11, color = white, fontcolor = white];");
b.writeLn("rankdir = BT;");
c.forEach(function(a) {
b.enter("subgraph cluster" + a.nodes[0].id + " { bgcolor = gray20;");
a.visitNodes(function(a) {
a = g(a);
b.writeLn("N" + a.id + ";");
});
b.leave("}");
});
f.forEach(function(a) {
b.writeLn("N" + a.id + ' [label = "' + a.toString() + '", color = "' + d(a) + '"];');
});
f.forEach(function(a) {
a.visitInputsNoConstants(function(e) {
e = g(e);
b.writeLn("N" + a.id + " -> N" + e.id + " [color=" + d(e) + "];");
});
});
b.leave("}");
b.writeLn("");
};
return d;
}();
a.DFG = A;
var B = function() {
function b() {
this.entries = [];
}
b.prototype.addUse = function(b, a) {
var d = this.entries[b.id];
d || (d = this.entries[b.id] = {def:b, uses:[]});
r(d.uses, a);
};
b.prototype.trace = function(b) {
b.enter("> Uses");
this.entries.forEach(function(a) {
b.writeLn(a.def.id + " -> [" + a.uses.map(v).join(", ") + "] " + a.def);
});
b.leave("<");
};
b.prototype.replace = function(b, a) {
var d = this.entries[b.id];
if (0 === d.uses.length) {
return!1;
}
var g = 0;
d.uses.forEach(function(d) {
g += d.replaceInput(b, a);
});
k(g >= d.uses.length);
d.uses = [];
return!0;
};
b.prototype.updateUses = function(b, a, d, g) {
d = d[b.id];
if (0 === d.uses.length) {
return!1;
}
var e = 0;
d.uses.forEach(function(d) {
e += d.replaceInput(b, a);
});
k(e >= d.uses.length);
d.uses = [];
return!0;
};
return b;
}();
a.Uses = B;
var M = function() {
function b() {
this.nextBlockID = 0;
this.blocks = [];
}
b.fromDFG = function(d) {
function g(b) {
b instanceof a.Projection && (b = b.project());
k(b instanceof a.End || b instanceof a.Start, b);
if (!f[b.id]) {
f[b.id] = !0;
var d = b.control;
d instanceof a.Region || (d = b.control = new a.Region(d));
b = d.block = e.buildBlock(d, b);
d instanceof a.Start && (e.root = b);
for (var c = 0;c < d.predecessors.length;c++) {
var r = d.predecessors[c], m, w = !1;
r instanceof a.Projection ? (m = r.project(), w = 1 === r.type) : m = r;
m instanceof a.Region && (m = new a.Jump(r), m = new a.Projection(m, 1), d.predecessors[c] = m, m = m.project(), w = !0);
g(m);
var l = m.control.block;
m instanceof a.Switch ? (k(q(r, 0)), l.pushSuccessorAt(b, r.selector.value)) : w && 0 < l.successors.length ? (l.pushSuccessor(b, !0), l.hasFlippedSuccessors = !0) : l.pushSuccessor(b, !0);
}
}
}
var e = new b;
k(d && d instanceof A);
e.dfg = d;
var f = [];
g(d.exit);
e.splitCriticalEdges();
e.exit = d.exit.control.block;
e.computeDominators();
return e;
};
b.prototype.buildRootAndExit = function() {
k(!this.root && !this.exit);
0 < this.blocks[0].predecessors.length ? (this.root = new z(this.nextBlockID++), this.blocks.push(this.root), this.root.pushSuccessor(this.blocks[0], !0)) : this.root = this.blocks[0];
for (var b = [], a = 0;a < this.blocks.length;a++) {
var d = this.blocks[a];
0 === d.successors.length && b.push(d);
}
if (0 === b.length) {
f("Must have an exit block.");
} else {
if (1 === b.length && b[0] !== this.root) {
this.exit = b[0];
} else {
for (this.exit = new z(this.nextBlockID++), this.blocks.push(this.exit), a = 0;a < b.length;a++) {
b[a].pushSuccessor(this.exit, !0);
}
}
}
k(this.root && this.exit);
k(this.root !== this.exit);
};
b.prototype.fromString = function(b, a) {
function d(b) {
var a = e[b];
if (a) {
return a;
}
e[b] = a = new z(g.nextBlockID++);
a.name = b;
f.push(a);
return a;
}
var g = this, e = g.blockNames || (g.blockNames = {}), f = g.blocks;
b.replace(/\ /g, "").split(",").forEach(function(b) {
b = b.split("->");
for (var a = null, g = 0;g < b.length;g++) {
var e = b[g];
if (a) {
var f = e;
d(a).pushSuccessor(d(f), !0);
} else {
d(e);
}
a = e;
}
});
k(a && e[a]);
this.root = e[a];
};
b.prototype.buildBlock = function(b, a) {
var d = new z(this.nextBlockID++, b, a);
this.blocks.push(d);
return d;
};
b.prototype.createBlockSet = function() {
this.setConstructor || (this.setConstructor = c.BitSets.BitSetFunctor(this.blocks.length));
return new this.setConstructor;
};
b.prototype.computeReversePostOrder = function() {
if (this.order) {
return this.order;
}
var b = this.order = [];
this.depthFirstSearch(null, b.push.bind(b));
b.reverse();
for (var a = 0;a < b.length;a++) {
b[a].rpo = a;
}
return b;
};
b.prototype.depthFirstSearch = function(b, a) {
function d(e) {
g.set(e.id);
b && b(e);
for (var f = e.successors, k = 0, c = f.length;k < c;k++) {
var r = f[k];
g.get(r.id) || d(r);
}
a && a(e);
}
var g = this.createBlockSet();
d(this.root);
};
b.prototype.computeDominators = function() {
function b(a) {
var d;
if (void 0 !== a.dominatorDepth) {
return a.dominatorDepth;
}
d = a.dominator ? b(a.dominator) + 1 : 0;
return a.dominatorDepth = d;
}
k(0 === this.root.predecessors.length, "Root node " + this.root + " must not have predecessors.");
for (var a = new Int32Array(this.blocks.length), d = 0;d < a.length;d++) {
a[d] = -1;
}
var g = this.createBlockSet();
this.depthFirstSearch(function(b) {
for (var d = b.successors, e = 0, f = d.length;e < f;e++) {
var k = d[e].id, c = b.id, r = k;
if (!(0 > a[k])) {
k = a[k];
for (g.clearAll();0 <= k;) {
g.set(k), k = a[k];
}
for (;0 <= c && !g.get(c);) {
c = a[c];
}
}
a[r] = c;
}
});
for (var d = 0, e = this.blocks.length;d < e;d++) {
this.blocks[d].dominator = this.blocks[a[d]];
}
d = 0;
for (e = this.blocks.length;d < e;d++) {
b(this.blocks[d]);
}
return a;
};
b.prototype.computeLoops = function() {
function b(f) {
if (d.get(f.id)) {
return a.get(f.id) && (f.isLoopHeader || (k(32 > e, "Can't handle too many loops, fall back on BitMaps if it's a problem."), f.isLoopHeader = !0, f.loops = 1 << e, e += 1), k(1 === g(f.loops))), f.loops;
}
d.set(f.id);
a.set(f.id);
for (var c = 0, r = 0, m = f.successors.length;r < m;r++) {
c |= b(f.successors[r]);
}
f.isLoopHeader && (k(1 === g(f.loops)), c &= ~f.loops);
f.loops = c;
a.clear(f.id);
return c;
}
var a = this.createBlockSet(), d = this.createBlockSet(), e = 0, f = b(this.root);
k(0 === f);
};
b.prototype.computeUses = function() {
h.enterTimeline("computeUses");
var b = this.dfg, a = new B;
b.forEachInPreOrderDepthFirstSearch(function(b) {
b.visitInputs(function(d) {
a.addUse(d, b);
});
});
h.leaveTimeline();
return a;
};
b.prototype.verify = function() {
this.computeReversePostOrder().forEach(function(b) {
b.phis && b.phis.forEach(function(a) {
k(a.control === b.region);
k(a.args.length === b.predecessors.length);
});
});
};
b.prototype.optimizePhis = function() {
function b(a, d) {
d = w(d);
if (1 === d.length) {
return d[0];
}
if (2 === d.length) {
if (d[0] === a) {
return d[1];
}
if (d[1] === a) {
return d[0];
}
}
return a;
}
var a = [], d = this.computeUses().entries;
d.forEach(function(b) {
p(b.def) && a.push(b.def);
});
for (var g = 0, e = 0, f = !0;f;) {
e++, f = !1, a.forEach(function(a) {
var e = b(a, a.args);
if (e !== a) {
var c = d[a.id];
if (0 === c.uses.length) {
a = !1;
} else {
for (var r = 0, m = c.uses, w = 0, l = m.length;w < l;w++) {
r += m[w].replaceInput(a, e);
}
k(r >= c.uses.length);
c.uses = [];
a = !0;
}
a && (f = !0, g++);
}
});
}
};
b.prototype.splitCriticalEdges = function() {
for (var b = this.blocks, d = [], g = 0;g < b.length;g++) {
var e = b[g].successors;
if (1 < e.length) {
for (var f = 0;f < e.length;f++) {
1 < e[f].predecessors.length && d.push({from:b[g], to:e[f]});
}
}
}
for (var b = d.length, c;c = d.pop();) {
g = c.from.successors.indexOf(c.to);
e = c.to.predecessors.indexOf(c.from);
k(0 <= g && 0 <= e);
var f = c.to, r = f.region, m = new a.Region(r.predecessors[e]), w = new a.Jump(m), m = this.buildBlock(m, w);
r.predecessors[e] = new a.Projection(w, 1);
c = c.from;
c.successors[g] = m;
m.pushPredecessor(c);
m.pushSuccessor(f);
f.predecessors[e] = m;
}
b && k(0 === this.splitCriticalEdges());
return b;
};
b.prototype.allocateVariables = function() {
function b(d) {
!(q(d, 3) || d instanceof a.SetProperty) && d instanceof a.Value && (d.variable = new a.Variable("v" + d.id));
}
var d = this.computeReversePostOrder();
d.forEach(function(a) {
a.nodes.forEach(b);
a.phis && a.phis.forEach(b);
});
for (var g = [], e = 0;e < d.length;e++) {
var f = d[e], c = f.phis, f = f.predecessors;
if (c) {
for (var r = 0;r < c.length;r++) {
var m = c[r], w = m.args;
k(f.length === w.length);
for (var l = 0;l < f.length;l++) {
var n = f[l], t = w[l];
t.abstract || q(t, 3) || (n = g[n.id] || (g[n.id] = []), t = t.variable || t, m.variable !== t && n.push(new a.Move(m.variable, t)));
}
}
}
}
var z = this.blocks;
g.forEach(function(b, d) {
for (var g = z[d], e = 0;b.length;) {
for (var f = 0;f < b.length;f++) {
for (var k = b[f], c = 0;c < b.length;c++) {
if (f !== c && b[c].from === k.to) {
k = null;
break;
}
}
k && (b.splice(f--, 1), g.append(k));
}
if (b.length) {
for (k = b[0], c = new a.Variable("t" + e++), z[d].append(new a.Move(c, k.to)), f = 1;f < b.length;f++) {
b[f].from === k.to && (b[f].from = c);
}
}
}
});
};
b.prototype.scheduleEarly = function() {
function b(d) {
return d.mustNotFloat || d.shouldNotFloat ? !1 : d.mustFloat || d.shouldFloat || d instanceof a.Parameter || d instanceof a.This || d instanceof a.Arguments ? !0 : d instanceof a.Binary || d instanceof a.Unary || d instanceof a.Parameter;
}
function d(a) {
k(!m[a.id], "Already scheduled " + a);
m[a.id] = !0;
k(a.control, a);
b(a) || a.control.block.append(a);
}
function g(b, a) {
k(!b.control, b);
k(!m[b.id]);
k(a);
b.control = a;
d(b);
}
function f(b) {
var k = [];
b.visitInputs(function(b) {
e(b) || t(b) && k.push(n(b));
});
for (var r = 0;r < k.length;r++) {
var w = k[r];
p(w) || m[w.id] || f(w);
}
if (b.control) {
b instanceof a.End || b instanceof a.Phi || b instanceof a.Start || m[b.id] || d(b);
} else {
if (k.length) {
w = k[0].control;
for (r = 1;r < k.length;r++) {
var l = k[r].control;
w.block.dominatorDepth < l.block.dominatorDepth && (w = l);
}
g(b, w);
} else {
g(b, c.root.region);
}
}
}
var c = this, r = this.dfg, m = [], w = [];
r.forEachInPreOrderDepthFirstSearch(function(d) {
d instanceof a.Region || d instanceof a.Jump || (d.control && w.push(d), p(d) && d.args.forEach(function(a) {
b(a) && (a.mustNotFloat = !0);
}));
});
for (var l = 0;l < w.length;l++) {
var q = w[l];
if (q instanceof a.Phi) {
var z = q.control.block;
(z.phis || (z.phis = [])).push(q);
}
q.control && f(q);
}
w.forEach(function(b) {
b = n(b);
b === r.start || b instanceof a.Region || k(b.control, "Node is not scheduled: " + b);
});
};
b.prototype.trace = function(b) {
function a(b) {
g[b.id] || (g[b.id] = !0, e.push(b), b.visitSuccessors(a));
}
function d(b) {
k(b);
return b === f ? "house" : b === c ? "invhouse" : "box";
}
var g = [], e = [], f = this.root, c = this.exit;
a(f);
b.writeLn("");
b.enter("digraph CFG {");
b.writeLn("graph [bgcolor = gray10];");
b.writeLn("edge [fontname = Consolas, fontsize = 11, color = white, fontcolor = white];");
b.writeLn("node [shape = box, fontname = Consolas, fontsize = 11, color = white, fontcolor = white, style = filled];");
b.writeLn("rankdir = TB;");
e.forEach(function(a) {
var g = "";
void 0 !== a.name && (g += " " + a.name);
void 0 !== a.rpo && (g += " O: " + a.rpo);
b.writeLn("B" + a.id + ' [label = "B' + a.id + g + '", fillcolor = "black", shape=' + d(a) + ", style=filled];");
});
e.forEach(function(a) {
a.visitSuccessors(function(d) {
b.writeLn("B" + a.id + " -> B" + d.id);
});
a.dominator && b.writeLn("B" + a.id + " -> B" + a.dominator.id + " [color = orange];");
a.follow && b.writeLn("B" + a.id + " -> B" + a.follow.id + " [color = purple];");
});
b.leave("}");
b.writeLn("");
};
return b;
}();
a.CFG = M;
var N = function() {
function b() {
}
b.prototype.foldUnary = function(b, d) {
k(b instanceof a.Unary);
if (e(b.argument)) {
return new a.Constant(b.operator.evaluate(b.argument.value));
}
if (d) {
var g = this.fold(b.argument, !0);
if (b.operator === a.Operator.TRUE) {
return g;
}
if (g instanceof a.Unary) {
if (b.operator === a.Operator.FALSE && g.operator === a.Operator.FALSE) {
return g.argument;
}
} else {
return new a.Unary(b.operator, g);
}
}
return b;
};
b.prototype.foldBinary = function(b, d) {
k(b instanceof a.Binary);
return e(b.left) && e(b.right) ? new a.Constant(b.operator.evaluate(b.left.value, b.right.value)) : b;
};
b.prototype.fold = function(b, d) {
return b instanceof a.Unary ? this.foldUnary(b, d) : b instanceof a.Binary ? this.foldBinary(b, d) : b;
};
return b;
}();
a.PeepholeOptimizer = N;
})(a.IR || (a.IR = {}));
})(h.Compiler || (h.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(b) {
H(b instanceof Y);
return b;
}
function v(b) {
return b instanceof Y && c.isString(b.value);
}
function p(b) {
return b instanceof Y && c.isNumeric(b.value) ? !0 : b.ty && b.ty.isNumeric();
}
function u(b, a) {
return p(b) && p(a) || l(b) && l(a) ? !0 : !1;
}
function l(b) {
return v(b) ? !0 : b.ty && b.ty.isString();
}
function e(b) {
return new Y(b);
}
function m(b) {
switch(b) {
case 161:
return X.SUB;
case 162:
return X.MUL;
case 163:
return X.DIV;
case 164:
return X.MOD;
case 165:
return X.LSH;
case 166:
return X.RSH;
case 167:
return X.URSH;
case 168:
return X.AND;
case 169:
return X.OR;
case 170:
return X.XOR;
case 20:
return X.NE;
case 26:
return X.SNE;
case 19:
;
case 171:
return X.EQ;
case 25:
;
case 172:
return X.SEQ;
case 21:
;
case 173:
return X.LT;
case 22:
;
case 174:
return X.LE;
case 23:
;
case 175:
return X.GT;
case 24:
;
case 176:
return X.GE;
case 144:
return X.NEG;
case 196:
return X.NEG;
case 197:
return X.ADD;
case 198:
return X.SUB;
case 199:
return X.MUL;
case 17:
return X.TRUE;
case 18:
return X.FALSE;
case 150:
return X.FALSE;
case 151:
return X.BITWISE_NOT;
default:
J("Invalid operator op: " + b);
}
}
function t(b, d, g) {
H(c.isString(g));
g = g.split(".");
for (var f = 0;f < g.length;f++) {
d = new a.IR.GetProperty(null, b.store, d, e(g[f])), d.shouldFloat = !0, b.loads.push(d);
}
return d;
}
function q(b) {
b = new a.IR.GlobalProperty(b);
b.mustFloat = !0;
return b;
}
function n(b, a) {
var d = new ea(b, a);
fa && (d = fa.fold(d));
return d;
}
function k(b, a, d) {
var g = new x(b, a, d);
if (b === X.EQ || b === X.NE) {
if (a.ty && a.ty.isStrictComparableWith(d.ty)) {
g.operator = b === X.EQ ? X.SEQ : X.SNE;
} else {
if (!a.ty || a.ty.canBeXML() || !d.ty || d.ty.canBeXML()) {
g = new R(null, null, q("asEquals"), null, [a, d], 0), b === X.NE && (g = n(X.FALSE, g));
}
}
}
fa && (g = fa.fold(g));
return g;
}
function f(b) {
return k(X.OR, b, e(0));
}
function d(b) {
return k(X.URSH, b, e(0));
}
function b(b) {
return p(b) ? b : n(X.PLUS, b);
}
function g(b) {
return n(X.FALSE, n(X.FALSE, b));
}
function r(b) {
b.shouldNotFloat = !0;
return b;
}
function w(b, a) {
return new R(null, null, b, null, a, 4);
}
function z(b, a) {
return w(q(b), [a]);
}
function A(b) {
return v(b) ? b : w(q("String"), [b]);
}
function B(b) {
return v(b) ? b : T(b) ? new Y(F.asCoerceString(s(b).value)) : w(q("asCoerceString"), [b]);
}
function M(b) {
return T(b) ? new Y(F.escapeXMLAttribute(s(b).value)) : w(q("escapeXMLAttribute"), [b]);
}
function N(b) {
return T(b) ? new Y(F.escapeXMLElement(s(b).value)) : w(q("escapeXMLElement"), [b]);
}
function K(b) {
H(b instanceof y);
return na[y.getQualifiedName(b)];
}
var y = c.AVM2.ABC.Multiname, D = c.AVM2.ABC.InstanceInfo, L = c.Debug.notImplemented, H = c.Debug.assert, J = c.Debug.assertUnreachable, C = c.ArrayUtilities.top, E = c.ArrayUtilities.unique, F = c.AVM2.Runtime, I = c.AVM2.Runtime.GlobalMultinameResolver, G = a.IR.Node, Z = a.IR.Start, Q = a.IR.Region, S = a.IR.Null, O = a.IR.Undefined, P = a.IR.True, V = a.IR.False, $ = a.IR.This, W = a.IR.Projection, x = a.IR.Binary, ea = a.IR.Unary, Y = a.IR.Constant, R = a.IR.Call, U = a.IR.Phi, ba = a.IR.Stop,
X = a.IR.Operator, ga = a.IR.Parameter, ja = a.IR.NewArray, aa = a.IR.NewObject, ia = a.IR.KeyValuePair, T = a.IR.isConstant, da = new c.IndentingWriter, fa = new a.IR.PeepholeOptimizer, la = function() {
function b(a) {
void 0 === a && (a = 0);
this.id = b._nextID += 1;
this.index = a;
this.local = [];
this.stack = [];
this.scope = [];
this.store = O;
this.loads = [];
this.saved = O;
}
b.prototype.clone = function(a) {
var d = new b;
d.index = void 0 !== a ? a : this.index;
d.local = this.local.slice(0);
d.stack = this.stack.slice(0);
d.scope = this.scope.slice(0);
d.loads = this.loads.slice(0);
d.saved = this.saved;
d.store = this.store;
return d;
};
b.prototype.matches = function(b) {
return this.stack.length === b.stack.length && this.scope.length === b.scope.length && this.local.length === b.local.length;
};
b.prototype.makeLoopPhis = function(a, d) {
function g(b) {
b = new U(a, b);
b.isLoop = !0;
return b;
}
var e = new b;
H(a);
e.index = this.index;
e.local = this.local.map(function(b, a) {
return d[a] ? g(b) : b;
});
e.stack = this.stack.map(g);
e.scope = this.scope.map(g);
e.loads = this.loads.slice(0);
e.saved = this.saved;
e.store = g(this.store);
return e;
};
b.tryOptimizePhi = function(b) {
if (b instanceof U) {
if (b.isLoop) {
return b;
}
var a = E(b.args);
if (1 === a.length) {
return b.seal(), h.countTimeline("Builder: OptimizedPhi"), a[0];
}
}
return b;
};
b.prototype.optimize = function() {
this.local = this.local.map(b.tryOptimizePhi);
this.stack = this.stack.map(b.tryOptimizePhi);
this.scope = this.scope.map(b.tryOptimizePhi);
this.saved = b.tryOptimizePhi(this.saved);
this.store = b.tryOptimizePhi(this.store);
};
b.mergeValue = function(b, a, d) {
b = a instanceof U && a.control === b ? a : new U(b, a);
b.pushValue(d);
return b;
};
b.mergeValues = function(a, d, g) {
for (var e = 0;e < d.length;e++) {
d[e] = b.mergeValue(a, d[e], g[e]);
}
};
b.prototype.merge = function(a, d) {
H(a);
H(this.matches(d), this + " !== " + d);
b.mergeValues(a, this.local, d.local);
b.mergeValues(a, this.stack, d.stack);
b.mergeValues(a, this.scope, d.scope);
this.store = b.mergeValue(a, this.store, d.store);
this.store.abstract = !0;
};
b.prototype.trace = function(b) {
b.writeLn(this.toString());
};
b.toBriefString = function(b) {
return b instanceof G ? b.toString(!0) : b;
};
b.prototype.toString = function() {
return "<" + String(this.id + " @ " + this.index).padRight(" ", 10) + (" M: " + b.toBriefString(this.store)).padRight(" ", 14) + (" X: " + b.toBriefString(this.saved)).padRight(" ", 14) + (" $: " + this.scope.map(b.toBriefString).join(", ")).padRight(" ", 20) + (" L: " + this.local.map(b.toBriefString).join(", ")).padRight(" ", 40) + (" S: " + this.stack.map(b.toBriefString).join(", ")).padRight(" ", 60);
};
b._nextID = 0;
return b;
}(), ca = z.bind(null, "asCoerceObject"), na = Object.create(null);
na[y.Int] = f;
na[y.Uint] = d;
na[y.Number] = b;
na[y.String] = B;
na[y.Object] = ca;
na[y.Boolean] = g;
var ma = Object.create(null);
ma[y.Int] = f;
ma[y.Uint] = d;
ma[y.Number] = z.bind(null, "Number");
ma[y.String] = z.bind(null, "String");
ma[y.Object] = z.bind(null, "Object");
ma[y.Boolean] = z.bind(null, "Boolean");
var ra = z.bind(null, "Object"), wa = function() {
function l(b, a, d, g) {
this.builder = b;
this.region = a;
this.block = d;
this.state = g;
this.abc = b.abc;
this.methodInfoConstant = b.methodInfoConstant;
this.bytecodes = b.methodInfo.analysis.bytecodes;
this.constantPool = b.abc.constantPool;
this.traceBuilder = b.traceBuilder;
this.methodInfo = b.methodInfo;
}
l.prototype.popMultiname = function() {
var b = this.constantPool.multinames[this.bc.index], d, g;
b.isRuntimeName() ? (d = this.state.stack.pop(), g = e(0)) : (d = e(b.name), g = e(b.flags));
b.isRuntimeNamespace() ? (b = new ja(this.region, [this.state.stack.pop()]), H(!(b instanceof a.IR.GetProperty), "Cannot float node : " + b), b.shouldFloat = !0) : b = e(b.namespaces);
return new a.IR.ASMultiname(b, d, g);
};
l.prototype.setIfStops = function(b) {
H(!this.stops);
b = new a.IR.If(this.region, b);
this.stops = [{control:new W(b, 2), target:this.bytecodes[this.bc.position + 1], state:this.state}, {control:new W(b, 1), target:this.bc.target, state:this.state}];
};
l.prototype.setJumpStop = function() {
H(!this.stops);
this.stops = [{control:this.region, target:this.bc.target, state:this.state}];
};
l.prototype.setThrowStop = function() {
H(!this.stops);
this.stops = [];
};
l.prototype.setReturnStop = function() {
H(!this.stops);
this.stops = [];
};
l.prototype.setSwitchStops = function(b) {
H(!this.stops);
if (2 < this.bc.targets.length) {
this.stops = [];
b = new a.IR.Switch(this.region, b);
for (var d = 0;d < this.bc.targets.length;d++) {
this.stops.push({control:new W(b, 0, e(d)), target:this.bc.targets[d], state:this.state});
}
} else {
H(2 === this.bc.targets.length), b = k(X.SEQ, b, e(0)), b = new a.IR.If(this.region, b), this.stops = [{control:new W(b, 2), target:this.bc.targets[1], state:this.state}, {control:new W(b, 1), target:this.bc.targets[0], state:this.state}];
}
};
l.prototype.savedScope = function() {
return this.state.saved;
};
l.prototype.topScope = function(b) {
var a = this.state.scope;
if (void 0 !== b) {
if (b < a.length) {
return a[a.length - 1 - b];
}
if (b === a.length) {
return this.savedScope();
}
var d = this.savedScope();
b -= a.length;
for (a = 0;a < b;a++) {
d = t(this.state, d, "parent");
}
return d;
}
return 0 < a.length ? C(a) : this.savedScope();
};
l.prototype.getGlobalScope = function() {
var b = this.bc.ti;
return b && b.object ? e(b.object) : new a.IR.ASGlobal(null, this.savedScope());
};
l.prototype.getScopeObject = function(b) {
return b instanceof a.IR.ASScope ? b.object : t(this.state, b, "object");
};
l.prototype.findProperty = function(b, d) {
var g = this.bc.ti, f = new a.IR.ASFindProperty(this.region, this.state.store, this.topScope(), b, this.methodInfoConstant, d);
if (g) {
if (g.object) {
return g.object instanceof c.AVM2.Runtime.Global && !g.object.scriptInfo.executing ? f : e(g.object);
}
if (void 0 !== g.scopeDepth) {
return this.getScopeObject(this.topScope(g.scopeDepth));
}
}
return f;
};
l.prototype.coerce = function(b, a) {
var d = K(b);
return d ? d(a) : a;
};
l.prototype.store = function(b) {
var a = this.state;
a.store = new W(b, 3);
b.loads = a.loads.slice(0);
a.loads.length = 0;
return b;
};
l.prototype.load = function(b) {
this.state.loads.push(b);
return b;
};
l.prototype.call = function(b, a, d) {
return this.store(new R(this.region, this.state.store, b, a, d, 4));
};
l.prototype.callCall = function(b, a, d) {
return this.store(new R(this.region, this.state.store, b, a, d, 16));
};
l.prototype.callProperty = function(b, d, g, f) {
var k = this.bc.ti, c = this.region, r = this.state;
if (k && k.trait) {
if (k.trait.isMethod()) {
return k = k.trait.holder instanceof D && k.trait.holder.isInterface() ? y.getPublicQualifiedName(y.getName(k.trait.name)) : y.getQualifiedName(k.trait.name), k = F.VM_OPEN_METHOD_PREFIX + k, this.store(new a.IR.CallProperty(c, r.store, b, e(k), g, 4));
}
if (k.trait.isClass()) {
d = k.trait.name;
H(d instanceof y);
if (d = ma[y.getQualifiedName(d)]) {
return d(g[0]);
}
k = y.getQualifiedName(k.trait.name);
return this.store(new a.IR.CallProperty(c, r.store, b, e(k), g, 16));
}
}
return(k = this.resolveMultinameGlobally(d)) ? this.store(new a.IR.ASCallProperty(c, r.store, b, e(y.getQualifiedName(k)), g, 6, f)) : this.store(new a.IR.ASCallProperty(c, r.store, b, d, g, 4, f));
};
l.prototype.getProperty = function(b, d, g) {
var f = this.bc.ti, k = this.region, c = this.state;
H(d instanceof a.IR.ASMultiname);
g = !!g;
if (f && f.trait) {
if (f.trait.isConst() && f.trait.hasDefaultValue) {
return e(f.trait.value);
}
b = new a.IR.GetProperty(k, c.store, b, e(y.getQualifiedName(f.trait.name)));
return f.trait.isGetter() ? this.store(b) : this.load(b);
}
if (p(d.name)) {
return this.store(new a.IR.ASGetProperty(k, c.store, b, d, 1));
}
if (f = this.resolveMultinameGlobally(d)) {
return this.store(new a.IR.ASGetProperty(k, c.store, b, e(y.getQualifiedName(f)), 2 | (g ? 8 : 0)));
}
h.countTimeline("Compiler: Slow ASGetProperty");
return this.store(new a.IR.ASGetProperty(k, c.store, b, d, g ? 8 : 0));
};
l.prototype.setProperty = function(b, d, g) {
var f = this.bc.ti, k = this.region, c = this.state;
H(d instanceof a.IR.ASMultiname);
if (f && f.trait) {
(d = f.trait.typeName ? K(f.trait.typeName) : null) && (g = d(g)), this.store(new a.IR.SetProperty(k, c.store, b, e(y.getQualifiedName(f.trait.name)), g));
} else {
if (p(d.name)) {
return this.store(new a.IR.ASSetProperty(k, c.store, b, d, g, 1));
}
this.resolveMultinameGlobally(d);
return this.store(new a.IR.ASSetProperty(k, c.store, b, d, g, 0));
}
};
l.prototype.callSuper = function(b, d, g, f) {
var k = this.bc.ti, c = this.region, r = this.state;
return k && k.trait && k.trait.isMethod() && k.baseClass ? (b = F.VM_OPEN_METHOD_PREFIX + y.getQualifiedName(k.trait.name), k = this.getJSProperty(e(k.baseClass), "traitsPrototype." + b), this.call(k, d, f)) : this.store(new a.IR.ASCallSuper(c, r.store, d, g, f, 4, b));
};
l.prototype.getSuper = function(b, d, g) {
var f = this.bc.ti, k = this.region, c = this.state;
return f && f.trait && f.trait.isGetter() && f.baseClass ? (b = F.VM_OPEN_GET_METHOD_PREFIX + y.getQualifiedName(f.trait.name), f = this.getJSProperty(e(f.baseClass), "traitsPrototype." + b), this.call(f, d, [])) : this.store(new a.IR.ASGetSuper(k, c.store, d, g, b));
};
l.prototype.setSuper = function(b, d, g, f) {
var k = this.bc.ti, c = this.region, r = this.state;
return k && k.trait && k.trait.isSetter() && k.baseClass ? (b = F.VM_OPEN_SET_METHOD_PREFIX + y.getQualifiedName(k.trait.name), k = this.getJSProperty(e(k.baseClass), "traitsPrototype." + b), this.call(k, d, [f])) : this.store(new a.IR.ASSetSuper(c, r.store, d, g, f, b));
};
l.prototype.constructSuper = function(b, a, d) {
var g = this.bc.ti;
if (g) {
if (g.noCallSuperNeeded) {
return;
}
if (g.baseClass) {
b = this.getJSProperty(e(g.baseClass), "instanceConstructorNoInitialize");
this.call(b, a, d);
return;
}
}
b = this.getJSProperty(b, "object.baseClass.instanceConstructorNoInitialize");
this.call(b, a, d);
};
l.prototype.getSlot = function(b, d) {
var g = this.bc.ti, f = this.region, k = this.state;
if (g) {
var c = g.trait;
if (c) {
if (c.isConst() && g.trait.hasDefaultValue) {
return e(c.value);
}
g = y.getQualifiedName(c.name);
return this.store(new a.IR.GetProperty(f, k.store, b, e(g)));
}
}
return this.store(new a.IR.ASGetSlot(null, k.store, b, d));
};
l.prototype.setSlot = function(b, d, g) {
var f = this.bc.ti, k = this.region, c = this.state;
if (f && (f = f.trait)) {
d = y.getQualifiedName(f.name);
this.store(new a.IR.SetProperty(k, c.store, b, e(d), g));
return;
}
this.store(new a.IR.ASSetSlot(k, c.store, b, d, g));
};
l.prototype.resolveMultinameGlobally = function(b) {
var a = b.namespaces, d = b.name;
if (c.AVM2.Runtime.globalMultinameAnalysis.value) {
if (T(a) && T(d) && !b.isAttribute()) {
if (!c.isNumeric(d.value) && c.isString(d.value) && d.value) {
return I.resolveMultiname(new y(a.value, d.value, b.flags));
}
h.countTimeline("GlobalMultinameResolver: Cannot resolve numeric or any names.");
} else {
h.countTimeline("GlobalMultinameResolver: Cannot resolve runtime multiname or attribute.");
}
}
};
l.prototype.getJSProperty = function(b, a) {
return t(this.state, b, a);
};
l.prototype.setJSProperty = function(b, d, g) {
this.store(new a.IR.SetProperty(null, this.state.store, b, e(d), g));
};
l.prototype.simplifyName = function(b) {
return b instanceof Y && b.value instanceof y && y.isQName(b.value) ? e(y.getQualifiedName(b.value)) : b;
};
l.prototype.getDescendants = function(b, d) {
var g = this.region, e = this.state;
d = this.simplifyName(d);
return new a.IR.ASGetDescendants(g, e.store, b, d);
};
l.prototype.truthyCondition = function(b) {
var a = this.state.stack, d;
b.isBinary && (d = a.pop());
a = a.pop();
b = d ? k(b, a, d) : n(b, a);
fa && (b = fa.fold(b, !0));
return b;
};
l.prototype.negatedTruthyCondition = function(b) {
b = n(X.FALSE, this.truthyCondition(b));
fa && (b = fa.fold(b, !0));
return b;
};
l.prototype.pushExpression = function(b, a) {
var d = this.state.stack, g;
b.isBinary ? (g = d.pop(), d = d.pop(), a && (g = f(g), d = f(d)), this.push(k(b, d, g))) : (d = d.pop(), a && (d = f(d)), this.push(n(b, d)));
};
l.prototype.push = function(b) {
var d = this.bc;
H(b instanceof a.IR.Node);
d.ti && !b.ty && (b.ty = d.ti.type);
this.state.stack.push(b);
};
l.prototype.pushLocal = function(b) {
this.push(this.state.local[b]);
};
l.prototype.popLocal = function(b) {
var a = this.state;
a.local[b] = r(a.stack.pop());
};
l.prototype.build = function() {
function l() {
return p.pop();
}
function n(b) {
return c.ArrayUtilities.popMany(p, b);
}
var t = this.block, z = this.state, s = this.state.local, p = this.state.stack, v = this.state.scope, D = this.region, K = this.bytecodes, J, C, E, x = this.push.bind(this);
this.stops = null;
this.traceBuilder && (da.writeLn("Processing Region: " + D + ", Block: " + t.bid), da.enter(("> state: " + D.entryState.toString()).padRight(" ", 100)));
for (var F = t.position, I = t.end.position;F <= I;F++) {
this.bc = t = K[F];
var G = t.op;
z.index = F;
switch(G) {
case 3:
this.store(new a.IR.Throw(D, l()));
this.builder.stopPoints.push({region:D, store:z.store, value:O});
this.setThrowStop();
break;
case 98:
this.pushLocal(t.index);
break;
case 208:
;
case 209:
;
case 210:
;
case 211:
this.pushLocal(G - 208);
break;
case 99:
this.popLocal(t.index);
break;
case 212:
;
case 213:
;
case 214:
;
case 215:
this.popLocal(G - 212);
break;
case 28:
;
case 48:
v.push(new a.IR.ASScope(this.topScope(), l(), 28 === G));
break;
case 29:
v.pop();
break;
case 100:
x(this.getGlobalScope());
break;
case 101:
x(this.getScopeObject(z.scope[t.index]));
break;
case 94:
;
case 93:
x(this.findProperty(this.popMultiname(), 93 === G));
break;
case 102:
E = this.popMultiname();
C = l();
x(this.getProperty(C, E, !1));
break;
case 89:
E = this.popMultiname();
C = l();
x(this.getDescendants(C, E));
break;
case 96:
E = this.popMultiname();
x(this.getProperty(this.findProperty(E, !0), E, !1));
break;
case 104:
;
case 97:
J = l();
E = this.popMultiname();
C = l();
this.setProperty(C, E, J);
break;
case 106:
E = this.popMultiname();
C = l();
x(this.store(new a.IR.ASDeleteProperty(D, z.store, C, E)));
break;
case 108:
C = l();
x(this.getSlot(C, e(t.index)));
break;
case 109:
J = l();
C = l();
this.setSlot(C, e(t.index), J);
break;
case 4:
E = this.popMultiname();
C = l();
x(this.getSuper(this.savedScope(), C, E));
break;
case 5:
J = l();
E = this.popMultiname();
C = l();
this.setSuper(this.savedScope(), C, E, J);
break;
case 241:
;
case 240:
break;
case 64:
x(w(this.builder.createFunctionCallee, [e(this.abc.methods[t.index]), this.topScope(), e(!0)]));
break;
case 65:
J = n(t.argCount);
C = l();
E = l();
x(this.callCall(E, C, J));
break;
case 70:
;
case 79:
;
case 76:
J = n(t.argCount);
E = this.popMultiname();
C = l();
J = this.callProperty(C, E, J, 76 === G);
79 !== G && x(J);
break;
case 69:
;
case 78:
E = this.popMultiname();
J = n(t.argCount);
C = l();
J = this.callSuper(this.savedScope(), C, E, J);
78 !== G && x(J);
break;
case 66:
J = n(t.argCount);
C = l();
x(this.store(new a.IR.ASNew(D, z.store, C, J)));
break;
case 73:
J = n(t.argCount);
C = l();
this.constructSuper(this.savedScope(), C, J);
break;
case 74:
J = n(t.argCount);
E = this.popMultiname();
C = l();
E = this.getProperty(C, E, !1);
x(this.store(new a.IR.ASNew(D, z.store, E, J)));
break;
case 128:
if (t.ti && t.ti.noCoercionNeeded) {
h.countTimeline("Compiler: NoCoercionNeeded");
break;
} else {
h.countTimeline("Compiler: CoercionNeeded");
}
J = l();
x(this.coerce(this.constantPool.multinames[t.index], J));
break;
case 131:
;
case 115:
x(f(l()));
break;
case 136:
;
case 116:
x(d(l()));
break;
case 132:
;
case 117:
x(b(l()));
break;
case 129:
;
case 118:
x(g(l()));
break;
case 120:
x(this.call(q("checkFilter"), null, [l()]));
break;
case 130:
break;
case 133:
x(B(l()));
break;
case 112:
x(A(l()));
break;
case 114:
x(M(l()));
break;
case 113:
x(N(l()));
break;
case 134:
if (t.ti && t.ti.noCoercionNeeded) {
h.countTimeline("Compiler: NoCoercionNeeded");
break;
} else {
h.countTimeline("Compiler: CoercionNeeded");
}
J = l();
C = this.constantPool.multinames[t.index];
E = new a.IR.ASMultiname(e(C.namespaces), e(C.name), e(C.flags));
C = this.getProperty(this.findProperty(E, !1), E);
x(this.call(q("asAsType"), null, [C, J]));
break;
case 135:
C = l();
J = l();
x(this.call(q("asAsType"), null, [C, J]));
break;
case 72:
;
case 71:
J = O;
72 === G && (J = l(), this.methodInfo.returnType && (t.ti && t.ti.noCoercionNeeded || (J = this.coerce(this.methodInfo.returnType, J))));
this.builder.stopPoints.push({region:D, store:z.store, value:J});
this.setReturnStop();
break;
case 30:
;
case 35:
J = l();
C = l();
x(new a.IR.CallProperty(D, z.store, C, e(30 === G ? "asNextName" : "asNextValue"), [J], 4));
break;
case 50:
J = new a.IR.ASNewHasNext2;
this.setJSProperty(J, "object", s[t.object]);
this.setJSProperty(J, "index", s[t.index]);
this.store(new a.IR.CallProperty(D, z.store, ra(s[t.object]), e("asHasNext2"), [J], 4));
s[t.object] = this.getJSProperty(J, "object");
x(s[t.index] = this.getJSProperty(J, "index"));
break;
case 32:
x(S);
break;
case 33:
x(O);
break;
case 38:
x(P);
break;
case 39:
x(V);
break;
case 40:
x(e(NaN));
break;
case 34:
L(String(t));
break;
case 36:
;
case 37:
x(e(t.value));
break;
case 44:
x(e(this.constantPool.strings[t.index]));
break;
case 45:
x(e(this.constantPool.ints[t.index]));
break;
case 46:
x(e(this.constantPool.uints[t.index]));
break;
case 47:
x(e(this.constantPool.doubles[t.index]));
break;
case 41:
l();
break;
case 42:
J = r(l());
x(J);
x(J);
break;
case 43:
z.stack.push(l(), l());
break;
case 239:
;
case 240:
;
case 241:
break;
case 16:
this.setJumpStop();
break;
case 12:
this.setIfStops(this.negatedTruthyCondition(X.LT));
break;
case 15:
this.setIfStops(this.negatedTruthyCondition(X.GE));
break;
case 14:
this.setIfStops(this.negatedTruthyCondition(X.GT));
break;
case 13:
this.setIfStops(this.negatedTruthyCondition(X.LE));
break;
case 24:
;
case 23:
;
case 22:
;
case 21:
;
case 17:
;
case 18:
;
case 19:
;
case 20:
;
case 25:
;
case 26:
this.setIfStops(this.truthyCondition(m(G)));
break;
case 27:
this.setSwitchStops(l());
break;
case 160:
C = l();
J = l();
E = u(J, C) ? X.ADD : c.AVM2.Runtime.useAsAdd ? X.AS_ADD : X.ADD;
x(k(E, J, C));
break;
case 161:
;
case 162:
;
case 163:
;
case 164:
;
case 165:
;
case 166:
;
case 167:
;
case 168:
;
case 169:
;
case 170:
;
case 171:
;
case 172:
;
case 173:
;
case 174:
;
case 175:
;
case 176:
;
case 144:
;
case 150:
;
case 151:
this.pushExpression(m(G));
break;
case 196:
;
case 197:
;
case 198:
;
case 199:
this.pushExpression(m(G), !0);
break;
case 145:
;
case 192:
;
case 147:
;
case 193:
x(e(1));
145 === G || 147 === G ? x(b(l())) : x(f(l()));
145 === G || 192 === G ? this.pushExpression(X.ADD) : this.pushExpression(X.SUB);
break;
case 146:
;
case 194:
;
case 148:
;
case 195:
x(e(1));
146 === G || 148 === G ? x(b(s[t.index])) : x(f(s[t.index]));
146 === G || 194 === G ? this.pushExpression(X.ADD) : this.pushExpression(X.SUB);
this.popLocal(t.index);
break;
case 177:
C = l();
J = l();
x(this.call(this.getJSProperty(C, "isInstanceOf"), null, [J]));
break;
case 178:
J = l();
E = this.popMultiname();
C = this.getProperty(this.findProperty(E, !1), E);
x(this.call(q("asIsType"), null, [C, J]));
break;
case 179:
C = l();
J = l();
x(this.call(q("asIsType"), null, [C, J]));
break;
case 180:
C = l();
J = l();
E = new a.IR.ASMultiname(O, J, e(0));
x(this.store(new a.IR.ASHasProperty(D, z.store, C, E)));
break;
case 149:
x(this.call(q("asTypeOf"), null, [l()]));
break;
case 8:
x(O);
this.popLocal(t.index);
break;
case 83:
J = n(t.argCount);
C = l();
E = q("applyType");
x(this.call(E, null, [this.methodInfoConstant, C, new ja(D, J)]));
break;
case 86:
J = n(t.argCount);
x(new ja(D, J));
break;
case 85:
C = [];
for (E = 0;E < t.argCount;E++) {
J = l();
var Q = l();
H(T(Q) && c.isString(Q.value));
Q = e(y.getPublicQualifiedName(Q.value));
C.push(new ia(Q, J));
}
x(new aa(D, C));
break;
case 87:
x(new a.IR.ASNewActivation(e(this.methodInfo)));
break;
case 88:
E = q("createClass");
x(this.call(E, null, [e(this.abc.classes[t.index]), l(), this.topScope()]));
break;
default:
L(String(t));
}
239 !== G && 241 !== G && 240 !== G && this.traceBuilder && da.writeLn(("state: " + z.toString()).padRight(" ", 100) + " : " + F + ", " + t.toString(this.abc));
}
this.traceBuilder && da.leave(("< state: " + z.toString()).padRight(" ", 100));
};
return l;
}(), qa = function() {
function b(a, d, g) {
H(a && a.abc && d);
this.abc = a.abc;
this.methodInfoConstant = new Y(a);
this.scope = d;
this.methodInfo = a;
this.hasDynamicScope = g;
this.traceBuilder = 3 < c.AVM2.Compiler.traceLevel.value;
this.createFunctionCallee = q("createFunction");
this.stopPoints = [];
this.bytecodes = this.methodInfo.analysis.bytecodes;
}
b.prototype.buildStart = function(b) {
var d = this.methodInfo, g = b.entryState = new la(0);
g.local.push(new $(b));
for (var f = this.hasDynamicScope ? 1 : 0, k = d.parameters.length, c = 0;c < k;c++) {
g.local.push(new ga(b, f + c, d.parameters[c].name));
}
for (c = k;c < d.localCount;c++) {
g.local.push(O);
}
g.store = new W(b, 3);
b.scope = this.hasDynamicScope ? new ga(b, 0, F.SAVED_SCOPE_NAME) : new Y(this.scope);
g.saved = new W(b, 4);
c = new a.IR.Arguments(b);
if (d.needsRest() || d.needsArguments()) {
var r = e(f + (d.needsRest() ? k : 0));
g.local[k + 1] = new R(b, g.store, q("sliceArguments"), null, [c, r], 4);
}
r = t(g, c, "length");
for (c = 0;c < k;c++) {
var m = d.parameters[c], w = c + 1, l = g.local[w];
if (void 0 !== m.value) {
var n;
n = new a.IR.Binary(X.LT, r, e(f + c + 1));
l = new a.IR.Latch(null, n, e(m.value), l);
}
m.type && !m.type.isAnyName() && (m = K(m.type)) && (l = m(l));
g.local[w] = l;
}
return b;
};
b.prototype.buildGraph = function() {
for (var b = this.methodInfo.analysis.blocks, d = this.traceBuilder, g = 0;g < b.length;g++) {
b[g].bdo = g, b[g].region = null;
}
var e = new c.SortedList(function(b, a) {
return b.block.bdo - a.block.bdo;
}), g = new Z;
this.buildStart(g);
for (e.push({region:g, block:b[0]});b = e.pop();) {
this.buildBlock(b.region, b.block, b.region.entryState.clone()).forEach(function(b) {
var g = b.target, f = g.region;
if (f) {
d && da.enter("Merging into region: " + f + " @ " + g.position + ", block " + g.bid + " {"), d && da.writeLn(" R " + f.entryState), d && da.writeLn("+ I " + b.state), f.entryState.merge(f, b.state), f.predecessors.push(b.control), d && da.writeLn(" = " + f.entryState), d && da.leave("}");
} else {
var f = g.region = new Q(b.control), k = null;
g.loop && (k = a.enableDirtyLocals.value && g.loop.getDirtyLocals(), d && da.writeLn("Adding PHIs to loop region. " + k));
f.entryState = g.loop ? b.state.makeLoopPhis(f, k) : b.state.clone(g.position);
d && da.writeLn("Adding new region: " + f + " @ " + g.position + " to worklist.");
e.push({region:f, block:g});
}
}), d && da.enter("Worklist: {"), e.forEach(function(b) {
d && da.writeLn(b.region + " " + b.block.bdo + " " + b.region.entryState);
}), d && da.leave("}");
}
d && da.writeLn("Done");
if (1 < this.stopPoints.length) {
var f = new Q(null), k = new U(f, null), r = new U(f, null);
this.stopPoints.forEach(function(b) {
f.predecessors.push(b.region);
k.pushValue(b.value);
r.pushValue(b.store);
});
b = new ba(f, r, k);
} else {
b = new ba(this.stopPoints[0].region, this.stopPoints[0].store, this.stopPoints[0].value);
}
return new a.IR.DFG(b);
};
b.prototype.buildBlock = function(b, a, d) {
H(b && a && d);
d.optimize();
var g = a.verifierEntryState;
if (g) {
this.traceBuilder && da.writeLn("Type State: " + g);
for (var e = 0;e < g.local.length;e++) {
var f = g.local[e], k = d.local[e];
k.ty || (k.ty = f);
}
}
a = new wa(this, b, a, d);
a.build();
g = a.stops;
g || (g = [], a.bc.position + 1 <= this.bytecodes.length && g.push({control:b, target:this.bytecodes[a.bc.position + 1], state:d}));
return g;
};
b.buildMethod = function(a, d, g, e) {
H(g);
H(d.analysis);
H(!d.hasExceptions());
h.countTimeline("Compiler: Compiled Methods");
h.enterTimeline("Compiler");
h.enterTimeline("Mark Loops");
d.analysis.markLoops();
h.leaveTimeline();
c.AVM2.Verifier.enabled.value && (h.enterTimeline("Verify"), a.verifyMethod(d, g), h.leaveTimeline());
a = 0 < c.AVM2.Compiler.traceLevel.value;
var f = 1 < c.AVM2.Compiler.traceLevel.value, k = 2 < c.AVM2.Compiler.traceLevel.value;
if (a) {
var r = window.performance.now()
}
h.enterTimeline("Build IR");
G.startNumbering();
g = (new b(d, g, e)).buildGraph();
h.leaveTimeline();
k && g.trace(da);
h.enterTimeline("Build CFG");
g = g.buildCFG();
h.leaveTimeline();
h.enterTimeline("Optimize Phis");
g.optimizePhis();
h.leaveTimeline();
h.enterTimeline("Schedule Nodes");
g.scheduleEarly();
h.leaveTimeline();
k && g.trace(da);
h.enterTimeline("Verify IR");
g.verify();
h.leaveTimeline();
h.enterTimeline("Allocate Variables");
g.allocateVariables();
h.leaveTimeline();
h.enterTimeline("Generate Source");
k = c.AVM2.Compiler.Backend.generate(g);
h.leaveTimeline();
f && da.writeLn(k.body);
G.stopNumbering();
h.leaveTimeline();
a && da.writeLn("Compiled " + (d.name ? "function " + d.name : "anonymous function") + " in " + (window.performance.now() - r).toPrecision(2) + "ms");
return k;
};
return b;
}(), ya = new c.AVM2.Verifier.Verifier;
a.compileMethod = function(b, a, d) {
return qa.buildMethod(ya, b, a, d);
};
})(h.Compiler || (h.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function h(a, b) {
var g = new m(null, a), f = a.abc.applicationDomain, k = [];
v(a.init, b, g, k, !1);
a.traits.forEach(function(a) {
if (a.isClass()) {
for (var d = [], c = a.classInfo;c;) {
if (d.unshift(c), c.instanceInfo.superName) {
c = f.findClassInfo(c.instanceInfo.superName);
} else {
break;
}
}
var l = g;
d.forEach(function(b) {
l = new m(l, b);
});
e(a.classInfo, b, l, k);
} else {
(a.isMethod() || a.isGetter() || a.isSetter()) && u(a, b, g, k);
}
});
k.forEach(function(a) {
v(a.methodInfo, b, a.scope, null, !0);
});
}
function v(a, b, g, e, k) {
if (t(a)) {
q(a);
try {
f = !1;
var c = n(a, g, k, !1, !1);
b.enter(a.index + ": ");
f ? b.writeLn("undefined") : b.writeLns(c.toSource());
b.leave(",");
e && p(a, b, g, e);
} catch (m) {
b.writeLn("// " + m);
}
} else {
b.writeLn("// Can't compile method: " + a.index);
}
}
function p(a, b, g, e) {
for (var f = a.analysis.bytecodes, k = a.abc.methods, c = 0;c < f.length;c++) {
var l = f[c];
if (64 === l.op) {
l = k[l.index];
q(l);
var n = new m(g, a);
e.push({scope:n, methodInfo:l});
p(l, b, n, e);
}
}
}
function u(a, b, g, e) {
(a.isMethod() || a.isGetter() || a.isSetter()) && a.methodInfo.hasBody && (b.writeLn("// " + a), v(a.methodInfo, b, g, e, !1));
}
function l(a, b, g, e) {
a.forEach(function(a) {
u(a, b, g, e);
});
}
function e(a, b, g, e) {
v(a.init, b, g, e, !1);
l(a.traits, b, g, e);
v(a.instanceInfo.init, b, g, e, !1);
l(a.instanceInfo.traits, b, g, e);
}
var m = c.AVM2.Runtime.Scope, t = c.AVM2.Runtime.canCompile, q = c.AVM2.Runtime.ensureFunctionIsInitialized, n = c.AVM2.Runtime.createCompiledFunction, k = c.AVM2.Runtime.LazyInitializer, f = !1;
jsGlobal.objectConstantName = function(a) {
if (a.hash) {
return "$(" + a.hash + ")";
}
if (a instanceof k) {
return a.getName();
}
f = !0;
};
a.compileAbc = function(a, b) {
b.enter("{");
b.enter("methods: {");
for (var g = 0;g < a.scripts.length;g++) {
h(a.scripts[g], b);
}
b.leave("}");
b.leave("}");
};
})(h.Compiler || (h.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
function h(b) {
var a = b.length, d = [], g;
for (g = 0;g < a;++g) {
d[g] = b.charAt(g);
}
return d;
}
function p(b) {
if (null === b) {
return "null";
}
if ("string" === typeof b) {
var a, d, g, f, k = 0, c = 0, n = b;
a = m[n];
if (!a) {
1024 === e && (m = Object.create(null), e = 0);
a = "";
"undefined" === typeof b[0] && (b = h(b));
d = 0;
for (g = b.length;d < g;++d) {
f = b[d];
if ("'" === f) {
++k;
} else {
if ('"' === f) {
++c;
} else {
if (0 <= "\\\n\r\u2028\u2029".indexOf(f)) {
var s = "\\";
switch(f) {
case "\\":
s += "\\";
break;
case "\n":
s += "n";
break;
case "\r":
s += "r";
break;
case "\u2028":
s += "u2028";
break;
case "\u2029":
s += "u2029";
break;
default:
throw Error("Incorrectly classified character");;
}
a += s;
continue;
} else {
if (!(" " <= f && "~" >= f)) {
var s = b[d + 1], p = f.charCodeAt(0), u = p.toString(16), H = "\\";
switch(f) {
case "\b":
H += "b";
break;
case "\f":
H += "f";
break;
case "\t":
H += "t";
break;
default:
H = 255 < p ? H + ("u" + "0000".slice(u.length) + u) : "\x00" === f && 0 > "0123456789".indexOf(s) ? H + "0" : "\x0B" === f ? H + "x0B" : H + ("x" + "00".slice(u.length) + u);
}
a += H;
continue;
}
}
}
}
a += f;
}
b = a;
a = '"';
"undefined" === typeof b[0] && (b = h(b));
d = 0;
for (g = b.length;d < g;++d) {
f = b[d], '"' === f && (a += "\\"), a += f;
}
a += '"';
m[n] = a;
e++;
}
return a;
}
if ("number" === typeof b) {
if (b !== b) {
throw Error("Numeric literal whose value is NaN");
}
if (0 > b || 0 === b && 0 > 1 / b) {
throw Error("Numeric literal whose value is negative");
}
b === 1 / 0 ? b = "1e+400" : (d = q[b], d || (1024 === t && (q = Object.create(null), t = 0), d = "" + b, q[b] = d, t++), b = d);
return b;
}
if ("boolean" === typeof b) {
return b ? "true" : "false";
}
l(b);
}
function u(b, a, d) {
for (var g = "", e = 0;e < b.length;e++) {
g += b[e].toSource(a), d && e < b.length - 1 && (g += d);
}
return g;
}
var l = c.Debug.assertUnreachable, e = 0, m = Object.create(null), t = 0, q = Object.create(null), n = {"||":3, "&&":4, "|":5, "^":6, "&":7, "==":8, "!=":8, "===":8, "!==":8, is:8, isnt:8, "<":9, ">":9, "<=":9, ">=":9, "in":9, "instanceof":9, "<<":10, ">>":10, ">>>":10, "+":11, "-":11, "*":12, "%":12, "/":12}, k = function() {
function b() {
this.type = "Node";
}
b.prototype.toSource = function(b) {
l("toSource called on abstract base class Node with type " + this.type);
return "";
};
return b;
}();
a.Node = k;
var f = function(b) {
function a() {
b.apply(this, arguments);
this.type = "Statement";
}
__extends(a, b);
return a;
}(k);
a.Statement = f;
var d = function(b) {
function a() {
b.apply(this, arguments);
this.type = "Expression";
}
__extends(a, b);
return a;
}(k);
a.Expression = d;
var b = function(b) {
function a(d) {
b.call(this);
this.body = d;
this.type = "Program";
}
__extends(a, b);
return a;
}(k);
a.Program = b;
b = function(b) {
function a() {
b.apply(this, arguments);
this.type = "EmptyStatement";
}
__extends(a, b);
return a;
}(f);
a.EmptyStatement = b;
b = function(b) {
function a(d) {
b.call(this);
this.body = d;
this.type = "BlockStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "{\n" + u(this.body, b) + "}";
};
return a;
}(f);
a.BlockStatement = b;
b = function(b) {
function a(d) {
b.call(this);
this.expression = d;
this.type = "ExpressionStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return this.expression.toSource(0) + ";\n";
};
return a;
}(f);
a.ExpressionStatement = b;
b = function(b) {
function a(d, g, e) {
b.call(this);
this.test = d;
this.consequent = g;
this.alternate = e;
this.type = "IfStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
b = "if(" + this.test.toSource(0) + "){" + this.consequent.toSource(0) + "}";
this.alternate && (b += "else{" + this.alternate.toSource(0) + "}");
return b;
};
return a;
}(f);
a.IfStatement = b;
b = function(b) {
function a(d, g) {
b.call(this);
this.label = d;
this.body = g;
this.type = "LabeledStatement";
}
__extends(a, b);
return a;
}(f);
a.LabeledStatement = b;
b = function(b) {
function a(d) {
b.call(this);
this.label = d;
this.type = "BreakStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
b = "break";
this.label && (b += " " + this.label.toSource(0));
return b + ";";
};
return a;
}(f);
a.BreakStatement = b;
b = function(b) {
function a(d) {
b.call(this);
this.label = d;
this.type = "ContinueStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
b = "continue";
this.label && (b += " " + this.label.toSource(0));
return b + ";";
};
return a;
}(f);
a.ContinueStatement = b;
b = function(b) {
function a(d, g) {
b.call(this);
this.object = d;
this.body = g;
this.type = "WithStatement";
}
__extends(a, b);
return a;
}(f);
a.WithStatement = b;
b = function(b) {
function a(d, g, e) {
b.call(this);
this.discriminant = d;
this.cases = g;
this.lexical = e;
this.type = "SwitchStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "switch(" + this.discriminant.toSource(0) + "){" + u(this.cases, 0, ";") + "};";
};
return a;
}(f);
a.SwitchStatement = b;
b = function(b) {
function a(d) {
b.call(this);
this.argument = d;
this.type = "ReturnStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
b = "return ";
this.argument && (b += this.argument.toSource(0));
return b + ";\n";
};
return a;
}(f);
a.ReturnStatement = b;
b = function(b) {
function a(d) {
b.call(this);
this.argument = d;
this.type = "ThrowStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "throw " + this.argument.toSource(0) + ";\n";
};
return a;
}(f);
a.ThrowStatement = b;
b = function(b) {
function a(d, g, e, f) {
b.call(this);
this.block = d;
this.handlers = g;
this.guardedHandlers = e;
this.finalizer = f;
this.type = "TryStatement";
}
__extends(a, b);
return a;
}(f);
a.TryStatement = b;
b = function(b) {
function a(d, g) {
b.call(this);
this.test = d;
this.body = g;
this.type = "WhileStatement";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "while(" + this.test.toSource(0) + "){" + this.body.toSource(0) + "}";
};
return a;
}(f);
a.WhileStatement = b;
b = function(b) {
function a(d, g) {
b.call(this);
this.body = d;
this.test = g;
this.type = "DoWhileStatement";
}
__extends(a, b);
return a;
}(f);
a.DoWhileStatement = b;
b = function(b) {
function a(d, g, e, f) {
b.call(this);
this.init = d;
this.test = g;
this.update = e;
this.body = f;
this.type = "ForStatement";
}
__extends(a, b);
return a;
}(f);
a.ForStatement = b;
b = function(b) {
function a(d, g, e, f) {
b.call(this);
this.left = d;
this.right = g;
this.body = e;
this.each = f;
this.type = "ForInStatement";
}
__extends(a, b);
return a;
}(f);
a.ForInStatement = b;
b = function(b) {
function a() {
b.apply(this, arguments);
this.type = "DebuggerStatement";
}
__extends(a, b);
return a;
}(f);
a.DebuggerStatement = b;
f = function(b) {
function a() {
b.apply(this, arguments);
this.type = "Declaration";
}
__extends(a, b);
return a;
}(f);
a.Declaration = f;
b = function(b) {
function a(d, g, e, f, k, c, m) {
b.call(this);
this.id = d;
this.params = g;
this.defaults = e;
this.rest = f;
this.body = k;
this.generator = c;
this.expression = m;
this.type = "FunctionDeclaration";
}
__extends(a, b);
return a;
}(f);
a.FunctionDeclaration = b;
f = function(b) {
function a(d, g) {
b.call(this);
this.declarations = d;
this.kind = g;
this.type = "VariableDeclaration";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return this.kind + " " + u(this.declarations, b, ",") + ";\n";
};
return a;
}(f);
a.VariableDeclaration = f;
f = function(b) {
function a(d, g) {
b.call(this);
this.id = d;
this.init = g;
this.type = "VariableDeclarator";
}
__extends(a, b);
a.prototype.toSource = function(b) {
b = this.id.toSource(1);
this.init && (b += "=" + this.init.toSource(1));
return b;
};
return a;
}(k);
a.VariableDeclarator = f;
f = function(b) {
function a(d) {
b.call(this);
this.name = d;
this.type = "Identifier";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return this.name;
};
return a;
}(d);
a.Identifier = f;
var g = function(b) {
function a(d) {
b.call(this);
this.value = d;
this.type = "Literal";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return p(this.value);
};
return a;
}(d);
a.Literal = g;
f = function(b) {
function a() {
b.apply(this, arguments);
this.type = "ThisExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "this";
};
return a;
}(d);
a.ThisExpression = f;
f = function(b) {
function a(d) {
b.call(this);
this.elements = d;
this.type = "ArrayExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "[" + u(this.elements, 1, ",") + "]";
};
return a;
}(d);
a.ArrayExpression = f;
f = function(b) {
function a(d) {
b.call(this);
this.properties = d;
this.type = "ObjectExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "{" + u(this.properties, 0, ",") + "}";
};
return a;
}(d);
a.ObjectExpression = f;
f = function(b) {
function a(d, g, e, f, k, c, m) {
b.call(this);
this.id = d;
this.params = g;
this.defaults = e;
this.rest = f;
this.body = k;
this.generator = c;
this.expression = m;
this.type = "FunctionExpression";
}
__extends(a, b);
return a;
}(d);
a.FunctionExpression = f;
f = function(b) {
function a(d) {
b.call(this);
this.expressions = d;
this.type = "SequenceExpression";
}
__extends(a, b);
return a;
}(d);
a.SequenceExpression = f;
f = function(b) {
function a(d, g, e) {
b.call(this);
this.operator = d;
this.prefix = g;
this.argument = e;
this.type = "UnaryExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
var a = this.argument.toSource(13), a = this.prefix ? this.operator + a : a + this.operator, a = " " + a;
return 13 < b ? "(" + a + ")" : a;
};
return a;
}(d);
a.UnaryExpression = f;
f = function(b) {
function a(d, g, e) {
b.call(this);
this.operator = d;
this.left = g;
this.right = e;
this.type = "BinaryExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
var a = n[this.operator], d = this.left.toSource(a) + this.operator + this.right.toSource(a + 1);
return a < b ? "(" + d + ")" : d;
};
return a;
}(d);
a.BinaryExpression = f;
b = function(b) {
function a(d, g, e) {
b.call(this);
this.operator = d;
this.left = g;
this.right = e;
this.type = "AssignmentExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
var a = this.left.toSource(1) + this.operator + this.right.toSource(1);
return 1 < b ? "(" + a + ")" : a;
};
return a;
}(d);
a.AssignmentExpression = b;
b = function(b) {
function a(d, g, e) {
b.call(this);
this.operator = d;
this.argument = g;
this.prefix = e;
this.type = "UpdateExpression";
}
__extends(a, b);
return a;
}(d);
a.UpdateExpression = b;
f = function(b) {
function a(d, g, e) {
b.call(this, d, g, e);
this.type = "LogicalExpression";
}
__extends(a, b);
return a;
}(f);
a.LogicalExpression = f;
f = function(b) {
function a(d, g, e) {
b.call(this);
this.test = d;
this.consequent = g;
this.alternate = e;
this.type = "ConditionalExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return this.test.toSource(3) + "?" + this.consequent.toSource(1) + ":" + this.alternate.toSource(1);
};
return a;
}(d);
a.ConditionalExpression = f;
f = function(b) {
function a(d, g) {
b.call(this);
this.callee = d;
this.type = "NewExpression";
this.arguments = g;
}
__extends(a, b);
a.prototype.toSource = function(b) {
return "new " + this.callee.toSource(b) + "(" + u(this.arguments, b, ",") + ")";
};
return a;
}(d);
a.NewExpression = f;
f = function(b) {
function a(d, g) {
b.call(this);
this.callee = d;
this.type = "CallExpression";
this.arguments = g;
}
__extends(a, b);
a.prototype.toSource = function(b) {
return this.callee.toSource(b) + "(" + u(this.arguments, b, ",") + ")";
};
return a;
}(d);
a.CallExpression = f;
d = function(b) {
function a(d, g, e) {
b.call(this);
this.object = d;
this.property = g;
this.computed = e;
this.type = "MemberExpression";
}
__extends(a, b);
a.prototype.toSource = function(b) {
var a = this.object.toSource(15);
this.object instanceof g && (a = "(" + a + ")");
var d = this.property.toSource(0), a = this.computed ? a + ("[" + d + "]") : a + ("." + d);
return 17 < b ? "(" + a + ")" : a;
};
return a;
}(d);
a.MemberExpression = d;
d = function(b) {
function a(d, g, e) {
b.call(this);
this.key = d;
this.value = g;
this.kind = e;
this.type = "Property";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return this.key.toSource(b) + ":" + this.value.toSource(b);
};
return a;
}(k);
a.Property = d;
d = function(b) {
function a(d, g) {
b.call(this);
this.test = d;
this.consequent = g;
this.type = "SwitchCase";
}
__extends(a, b);
a.prototype.toSource = function(b) {
return(this.test ? "case " + this.test.toSource(b) : "default") + ": " + u(this.consequent, b, ";");
};
return a;
}(k);
a.SwitchCase = d;
k = function(b) {
function a(d, g, e) {
b.call(this);
this.param = d;
this.guard = g;
this.body = e;
this.type = "CatchClause";
}
__extends(a, b);
return a;
}(k);
a.CatchClause = k;
})(a.AST || (a.AST = {}));
})(h.Compiler || (h.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
var c = function(a) {
function c(e, m, l) {
a.call(this);
this.parent = e;
this.object = m;
this.isWith = l;
}
__extends(c, a);
c.prototype.visitInputs = function(a) {
a(this.parent);
a(this.object);
};
return c;
}(a.Value);
a.ASScope = c;
c.prototype.nodeName = "ASScope";
c = function(a) {
function c(e, m, l) {
a.call(this);
this.namespaces = e;
this.name = m;
this.flags = l;
}
__extends(c, a);
c.prototype.visitInputs = function(a) {
a(this.namespaces);
a(this.name);
a(this.flags);
};
return c;
}(a.Value);
a.ASMultiname = c;
c.prototype.mustFloat = !0;
c.prototype.nodeName = "ASMultiname";
c = function(a) {
function c(e, m, l, q, n, k, f) {
a.call(this, e, m, l, q, n, k);
this.isLex = f;
}
__extends(c, a);
return c;
}(a.CallProperty);
a.ASCallProperty = c;
c.prototype.nodeName = "ASCallProperty";
c = function(a) {
function c(e, m, l, q, n, k, f) {
a.call(this, e, m, l, q, n, k);
this.scope = f;
}
__extends(c, a);
c.prototype.visitInputs = function(e) {
a.prototype.visitInputs.call(this, e);
e(this.scope);
};
return c;
}(a.CallProperty);
a.ASCallSuper = c;
c.prototype.nodeName = "ASCallSuper";
c = function(a) {
function c(e, m, l, q) {
a.call(this, e, m, l, q);
}
__extends(c, a);
return c;
}(a.New);
a.ASNew = c;
c.prototype.nodeName = "ASNew";
c = function(a) {
function c(e, m, l, q, n) {
a.call(this, e, m, l, q);
this.flags = n;
}
__extends(c, a);
return c;
}(a.GetProperty);
a.ASGetProperty = c;
c.prototype.nodeName = "ASGetProperty";
c = function(a) {
function c(e, m, l, q) {
a.call(this, e, m, l, q);
}
__extends(c, a);
return c;
}(a.GetProperty);
a.ASGetDescendants = c;
c.prototype.nodeName = "ASGetDescendants";
c = function(a) {
function c(e, m, l, q) {
a.call(this, e, m, l, q);
}
__extends(c, a);
return c;
}(a.GetProperty);
a.ASHasProperty = c;
c.prototype.nodeName = "ASHasProperty";
c = function(a) {
function c(e, m, l, q) {
a.call(this, e, m, l, q);
}
__extends(c, a);
return c;
}(a.GetProperty);
a.ASGetSlot = c;
c.prototype.nodeName = "ASGetSlot";
c = function(a) {
function c(e, m, l, q, n) {
a.call(this, e, m, l, q);
this.scope = n;
}
__extends(c, a);
c.prototype.visitInputs = function(e) {
a.prototype.visitInputs.call(this, e);
e(this.scope);
};
return c;
}(a.GetProperty);
a.ASGetSuper = c;
c.prototype.nodeName = "ASGetSuper";
c = function(a) {
function c(e, m, l, q, n, k) {
a.call(this, e, m, l, q, n);
this.flags = k;
}
__extends(c, a);
return c;
}(a.SetProperty);
a.ASSetProperty = c;
c.prototype.nodeName = "ASSetProperty";
c = function(a) {
function c(e, m, l, q, n) {
a.call(this, e, m, l, q, n);
}
__extends(c, a);
return c;
}(a.SetProperty);
a.ASSetSlot = c;
c.prototype.nodeName = "ASSetSlot";
c = function(a) {
function c(e, m, l, q, n, k) {
a.call(this, e, m, l, q, n);
this.scope = k;
}
__extends(c, a);
c.prototype.visitInputs = function(e) {
a.prototype.visitInputs.call(this, e);
e(this.scope);
};
return c;
}(a.SetProperty);
a.ASSetSuper = c;
c.prototype.nodeName = "ASSetSuper";
c = function(a) {
function c(e, m, l, q) {
a.call(this, e, m, l, q);
}
__extends(c, a);
return c;
}(a.DeleteProperty);
a.ASDeleteProperty = c;
c.prototype.nodeName = "ASDeleteProperty";
c = function(a) {
function c(e, m, l, q, n, k) {
a.call(this, e, m);
this.scope = l;
this.name = q;
this.methodInfo = n;
this.strict = k;
}
__extends(c, a);
c.prototype.visitInputs = function(e) {
a.prototype.visitInputs.call(this, e);
e(this.scope);
e(this.name);
};
return c;
}(a.StoreDependent);
a.ASFindProperty = c;
c.prototype.nodeName = "ASFindProperty";
c = function(a) {
function c(e, m) {
a.call(this);
this.control = e;
this.scope = m;
}
__extends(c, a);
c.prototype.visitInputs = function(a) {
this.control && a(this.control);
a(this.scope);
};
return c;
}(a.Value);
a.ASGlobal = c;
c.prototype.nodeName = "ASGlobal";
c = function(a) {
function c(e) {
a.call(this);
this.methodInfo = e;
}
__extends(c, a);
return c;
}(a.Value);
a.ASNewActivation = c;
c.prototype.nodeName = "ASNewActivation";
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
return c;
}(a.Value);
a.ASNewHasNext2 = h;
c.prototype.nodeName = "ASNewHasNext2";
})(a.IR || (a.IR = {}));
})(c.Compiler || (c.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
var v = c.ArrayUtilities.top, p = c.ArrayUtilities.peek, u = c.Debug.assert, l;
(function(a) {
(function(b) {
b[b.SEQ = 1] = "SEQ";
b[b.LOOP = 2] = "LOOP";
b[b.IF = 3] = "IF";
b[b.CASE = 4] = "CASE";
b[b.SWITCH = 5] = "SWITCH";
b[b.LABEL_CASE = 6] = "LABEL_CASE";
b[b.LABEL_SWITCH = 7] = "LABEL_SWITCH";
b[b.EXIT = 8] = "EXIT";
b[b.BREAK = 9] = "BREAK";
b[b.CONTINUE = 10] = "CONTINUE";
b[b.TRY = 11] = "TRY";
b[b.CATCH = 12] = "CATCH";
})(a.Kind || (a.Kind = {}));
var e = function() {
return function(b) {
this.kind = b;
};
}();
a.ControlNode = e;
var d = function(b) {
function a(d) {
b.call(this, 1);
this.body = d;
}
__extends(a, b);
a.prototype.trace = function(b) {
for (var a = this.body, d = 0, g = a.length;d < g;d++) {
a[d].trace(b);
}
};
a.prototype.first = function() {
return this.body[0];
};
a.prototype.slice = function(b, d) {
return new a(this.body.slice(b, d));
};
return a;
}(e);
a.Seq = d;
d = function(b) {
function a(d) {
b.call(this, 2);
this.body = d;
}
__extends(a, b);
a.prototype.trace = function(b) {
b.enter("loop {");
this.body.trace(b);
b.leave("}");
};
return a;
}(e);
a.Loop = d;
d = function(b) {
function a(d, g, e, f) {
b.call(this, 3);
this.cond = d;
this.then = g;
this.nothingThrownLabel = f;
this.negated = !1;
this.else = e;
}
__extends(a, b);
a.prototype.trace = function(b) {
this.cond.trace(b);
this.nothingThrownLabel && b.enter("if (label is " + this.nothingThrownLabel + ") {");
b.enter("if" + (this.negated ? " not" : "") + " {");
this.then && this.then.trace(b);
this.else && (b.outdent(), b.enter("} else {"), this.else.trace(b));
b.leave("}");
this.nothingThrownLabel && b.leave("}");
};
return a;
}(e);
a.If = d;
d = function(b) {
function a(d, g) {
b.call(this, 4);
this.index = d;
this.body = g;
}
__extends(a, b);
a.prototype.trace = function(b) {
0 <= this.index ? b.writeLn("case " + this.index + ":") : b.writeLn("default:");
b.indent();
this.body && this.body.trace(b);
b.outdent();
};
return a;
}(e);
a.Case = d;
d = function(b) {
function a(d, g, e) {
b.call(this, 5);
this.determinant = d;
this.cases = g;
this.nothingThrownLabel = e;
}
__extends(a, b);
a.prototype.trace = function(b) {
this.nothingThrownLabel && b.enter("if (label is " + this.nothingThrownLabel + ") {");
this.determinant.trace(b);
b.writeLn("switch {");
for (var a = 0, d = this.cases.length;a < d;a++) {
this.cases[a].trace(b);
}
b.writeLn("}");
this.nothingThrownLabel && b.leave("}");
};
return a;
}(e);
a.Switch = d;
d = function(b) {
function a(d, g) {
b.call(this, 6);
this.labels = d;
this.body = g;
}
__extends(a, b);
a.prototype.trace = function(b) {
b.enter("if (label is " + this.labels.join(" or ") + ") {");
this.body && this.body.trace(b);
b.leave("}");
};
return a;
}(e);
a.LabelCase = d;
d = function(b) {
function a(d) {
b.call(this, 7);
this.cases = d;
for (var g = {}, e = 0, f = d.length;e < f;e++) {
for (var k = d[e], c = 0, m = k.labels.length;c < m;c++) {
g[k.labels[c]] = k;
}
}
this.labelMap = g;
}
__extends(a, b);
a.prototype.trace = function(b) {
for (var a = 0, d = this.cases.length;a < d;a++) {
this.cases[a].trace(b);
}
};
return a;
}(e);
a.LabelSwitch = d;
d = function(b) {
function a(d) {
b.call(this, 8);
this.label = d;
}
__extends(a, b);
a.prototype.trace = function(b) {
b.writeLn("label = " + this.label);
};
return a;
}(e);
a.Exit = d;
d = function(b) {
function a(d, g) {
b.call(this, 9);
this.label = d;
this.head = g;
}
__extends(a, b);
a.prototype.trace = function(b) {
this.label && b.writeLn("label = " + this.label);
b.writeLn("break");
};
return a;
}(e);
a.Break = d;
d = function(b) {
function a(d, g) {
b.call(this, 10);
this.label = d;
this.head = g;
this.necessary = !0;
}
__extends(a, b);
a.prototype.trace = function(b) {
this.label && b.writeLn("label = " + this.label);
this.necessary && b.writeLn("continue");
};
return a;
}(e);
a.Continue = d;
d = function(b) {
function a(d, g) {
b.call(this, 11);
this.body = d;
this.catches = g;
}
__extends(a, b);
a.prototype.trace = function(b) {
b.enter("try {");
this.body.trace(b);
b.writeLn("label = " + this.nothingThrownLabel);
for (var a = 0, d = this.catches.length;a < d;a++) {
this.catches[a].trace(b);
}
b.leave("}");
};
return a;
}(e);
a.Try = d;
e = function(b) {
function a(d, g, e) {
b.call(this, 12);
this.varName = d;
this.typeName = g;
this.body = e;
}
__extends(a, b);
a.prototype.trace = function(b) {
b.outdent();
b.enter("} catch (" + (this.varName || "e") + (this.typeName ? " : " + this.typeName : "") + ") {");
this.body.trace(b);
};
return a;
}(e);
a.Catch = e;
})(l = a.Control || (a.Control = {}));
var e = c.BitSets.BITS_PER_WORD, m = c.BitSets.ADDRESS_BITS_PER_WORD, t = c.BitSets.BIT_INDEX_MASK, q = function(a) {
function f(d, b) {
a.call(this, d);
this.blockById = b;
}
__extends(f, a);
f.prototype.forEachBlock = function(a) {
u(a);
for (var b = this.blockById, g = this.bits, f = 0, k = g.length;f < k;f++) {
var c = g[f];
if (c) {
for (var m = 0;m < e;m++) {
c & 1 << m && a(b[f * e + m]);
}
}
}
};
f.prototype.choose = function() {
for (var a = this.blockById, b = this.bits, g = 0, f = b.length;g < f;g++) {
var k = b[g];
if (k) {
for (var c = 0;c < e;c++) {
if (k & 1 << c) {
return a[g * e + c];
}
}
}
}
};
f.prototype.members = function() {
for (var a = this.blockById, b = [], g = this.bits, f = 0, k = g.length;f < k;f++) {
var c = g[f];
if (c) {
for (var m = 0;m < e;m++) {
c & 1 << m && b.push(a[f * e + m]);
}
}
}
return b;
};
f.prototype.setBlocks = function(a) {
for (var b = this.bits, g = 0, e = a.length;g < e;g++) {
var f = a[g].id;
b[f >> m] |= 1 << (f & t);
}
};
return f;
}(c.BitSets.Uint32ArrayBitSet);
a.BlockSet = q;
var n = function() {
function a(e) {
this.makeBlockSetFactory(e.blocks.length, e.blocks);
this.hasExceptions = !1;
this.normalizeReachableBlocks(e.root);
}
a.prototype.makeBlockSetFactory = function(a, d) {
u(!this.boundBlockSet);
this.boundBlockSet = function() {
return new q(a, d);
};
};
a.prototype.normalizeReachableBlocks = function(a) {
u(0 === a.predecessors.length);
var d = this.boundBlockSet, b = [], g = {}, e = {}, k = [a];
for (e[a.id] = !0;a = v(k);) {
if (g[a.id]) {
1 === g[a.id] && (g[a.id] = 2, b.push(a)), e[a.id] = !1, k.pop();
} else {
g[a.id] = 1;
e[a.id] = !0;
for (var c = a.successors, m = 0, l = c.length;m < l;m++) {
var n = c[m];
e[n.id] && (a.spbacks || (a.spbacks = new d), a.spbacks.set(n.id));
!g[n.id] && k.push(n);
}
}
}
this.blocks = b.reverse();
};
a.prototype.computeDominance = function() {
var a = this.blocks, d = a.length, b = Array(d);
b[0] = 0;
for (var g = [], e = 0;e < d;e++) {
g[a[e].id] = e, a[e].dominatees = [];
}
for (var k = !0;k;) {
for (k = !1, e = 1;e < d;e++) {
var c = a[e].predecessors, m = c.length, l = g[c[0].id];
if (!(l in b)) {
for (var n = 1;n < m && !(l = g[c[n].id], l in b);n++) {
}
}
u(l in b);
for (n = 0;n < m;n++) {
var q = g[c[n].id];
if (q !== l && q in b) {
for (;q !== l;) {
for (;q > l;) {
q = b[q];
}
for (;l > q;) {
l = b[l];
}
}
l = q;
}
}
b[e] !== l && (b[e] = l, k = !0);
}
}
a[0].dominator = a[0];
for (e = 1;e < d;e++) {
g = a[e], n = a[b[e]], g.dominator = n, n.dominatees.push(g), g.npredecessors = g.predecessors.length;
}
d = [a[0]];
for (a[0].level || (a[0].level = 0);g = d.shift();) {
a = g.dominatees;
for (n = 0;n < a.length;n++) {
a[n].level = g.level + 1;
}
d.push.apply(d, a);
}
};
a.prototype.computeFrontiers = function() {
for (var a = this.boundBlockSet, d = this.blocks, b = 0, g = d.length;b < g;b++) {
d[b].frontier = new a;
}
b = 1;
for (g = d.length;b < g;b++) {
var a = d[b], e = a.predecessors;
if (2 <= e.length) {
for (var k = a.dominator, c = 0, m = e.length;c < m;c++) {
for (var l = e[c];l !== k;) {
l.frontier.set(a.id), l = l.dominator;
}
}
}
}
};
a.prototype.analyzeControlFlow = function() {
this.computeDominance();
return this.analyzedControlFlow = !0;
};
a.prototype.markLoops = function() {
function a(b) {
var d = 1, g = {}, e = {}, f = [], k = [], c = [], m = b.level + 1;
b = [b];
for (var r, l;r = v(b);) {
if (g[r.id]) {
if (p(k) === r) {
k.pop();
var w = [];
do {
l = f.pop(), e[l.id] = !0, w.push(l);
} while (l !== r);
(1 < w.length || l.spbacks && l.spbacks.get(l.id)) && c.push(w);
}
b.pop();
} else {
g[r.id] = d++;
f.push(r);
k.push(r);
l = r.successors;
for (var w = 0, n = l.length;w < n;w++) {
if (r = l[w], !(r.level < m)) {
var q = r.id;
if (!g[q]) {
b.push(r);
} else {
if (!e[q]) {
for (;g[p(k).id] > g[q];) {
k.pop();
}
}
}
}
}
}
}
return c;
}
function d(a, d) {
var g = new b;
g.setBlocks(a);
g.recount();
this.id = d;
this.body = g;
this.exit = new b;
this.save = {};
this.head = new b;
this.npredecessors = 0;
}
if (!this.analyzedControlFlow && !this.analyzeControlFlow()) {
return!1;
}
var b = this.boundBlockSet, g = function(a) {
for (var d = new b, g = 0, e = a.length;g < e;g++) {
var f = a[g], k = f.spbacks;
if (k) {
for (var f = f.successors, c = 0, m = f.length;c < m;c++) {
var r = f[c];
k.get(r.id) && d.set(r.dominator.id);
}
}
}
return d.members();
}(this.blocks);
if (0 >= g.length) {
return this.markedLoops = !0;
}
for (var g = g.sort(function(b, a) {
return b.level - a.level;
}), e = 0, k = g.length - 1;0 <= k;k--) {
var c = g[k], m = a(c);
if (0 !== m.length) {
for (var l = 0, n = m.length;l < n;l++) {
for (var q = m[l], t = new d(q, e++), h = 0, s = q.length;h < s;h++) {
var u = q[h];
if (u.level === c.level + 1 && !u.loop) {
u.loop = t;
t.head.set(u.id);
for (var H = u.predecessors, J = 0, C = H.length;J < C;J++) {
t.body.get(H[J].id) && u.npredecessors--;
}
t.npredecessors += u.npredecessors;
}
}
h = 0;
for (s = q.length;h < s;h++) {
u = q[h], u.level === c.level + 1 && (u.npredecessors = t.npredecessors);
}
t.head.recount();
}
}
}
return this.markedLoops = !0;
};
a.prototype.induceControlTree = function() {
function a(b, d) {
b.recount();
if (0 === b.count) {
return null;
}
b.save = d;
return b;
}
function d(k, c, m, n, q, t, h) {
for (var s = [];k;) {
if (1 < k.count) {
for (var p = new g, u = {}, H = [], J = k.members(), C = 0, E = J.length;C < E;C++) {
var F = J[C], I = F.id, G;
if (F.loop && k.contains(F.loop.head)) {
var Z = F.loop;
if (!Z.induced) {
for (var Q = Z.head.members(), S = 0, O = 0, P = Q.length;O < P;O++) {
S += k.save[Q[O].id];
}
if (0 < F.npredecessors - S) {
F.npredecessors -= k.save[I], F.save = k.save[I], G = d(F, p, u, n), H.push(new l.LabelCase([I], G));
} else {
O = 0;
for (P = Q.length;O < P;O++) {
G = Q[O], G.npredecessors -= S, G.save = S;
}
G = d(F, p, u, n);
H.push(new l.LabelCase(Z.head.toArray(), G));
Z.induced = !0;
}
}
} else {
F.npredecessors -= k.save[I], F.save = k.save[I], G = d(F, p, u, n), H.push(new l.LabelCase([I], G));
}
}
for (var F = [], O = 0, C = 0;C < H.length;C++) {
G = H[C];
E = G.labels;
Q = P = 0;
for (Z = E.length;Q < Z;Q++) {
I = E[Q], p.get(I) && 0 < J[C].npredecessors - k.save[I] ? F.push(I) : E[P++] = I;
}
E.length = P;
0 < E.length && (H[O++] = G);
}
H.length = O;
if (0 === H.length) {
for (C = 0;C < F.length;C++) {
I = F[C], m[I] = (m[I] || 0) + k.save[I], c.set(I);
}
break;
}
s.push(new l.LabelSwitch(H));
k = a(p, u);
} else {
1 === k.count ? (F = k.choose(), I = F.id, F.npredecessors -= k.save[I], F.save = k.save[I]) : (F = k, I = F.id);
if (q) {
q = !1;
} else {
if (n && !n.body.get(I)) {
F.npredecessors += F.save;
n.exit.set(I);
n.save[I] = (n.save[I] || 0) + F.save;
s.push(new l.Break(I, n));
break;
}
if (n && F.loop === n) {
F.npredecessors += F.save;
s.push(new l.Continue(I, n));
break;
}
if (F === h) {
break;
}
if (0 < F.npredecessors) {
F.npredecessors += F.save;
m[I] = (m[I] || 0) + F.save;
c.set(I);
s.push(t ? new l.Break(I, t) : new l.Exit(I));
break;
}
if (F.loop) {
var P = F.loop;
if (1 === P.head.count) {
p = d(P.head.choose(), null, null, P, !0);
} else {
p = [];
Q = P.head.members();
C = 0;
for (E = Q.length;C < E;C++) {
G = Q[C], u = G.id, G = d(G, null, null, P, !0), p.push(new l.LabelCase([u], G));
}
p = new l.LabelSwitch(p);
}
s.push(new l.Loop(p));
k = a(P.exit, P.save);
continue;
}
}
p = new g;
u = {};
if (b && F.hasCatches) {
G = F.successors;
H = [];
k = [];
C = 0;
for (E = G.length;C < E;C++) {
J = G[C], (J.exception ? H : k).push(J);
}
E = [];
for (C = 0;C < H.length;C++) {
J = H[C], J.npredecessors -= 1, J.save = 1, G = d(J, p, u, n), J = J.exception, E.push(new l.Catch(J.varName, J.typeName, G));
}
E = new l.Try(F, E);
} else {
k = F.successors, E = F;
}
if (2 < k.length) {
H = [];
for (C = k.length - 1;0 <= C;C--) {
J = k[C], J.npredecessors -= 1, J.save = 1, G = d(J, p, u, n, null, F, k[C + 1]), H.unshift(new l.Case(C, G));
}
v(H).index = void 0;
b && F.hasCatches ? (E.nothingThrownLabel = e, E = new l.Switch(E, H, e++)) : E = new l.Switch(E, H);
k = a(p, u);
} else {
2 === k.length ? (C = F.hasFlippedSuccessors ? k[1] : k[0], G = F.hasFlippedSuccessors ? k[0] : k[1], C.npredecessors -= 1, C.save = 1, C = d(C, p, u, n), G.npredecessors -= 1, G.save = 1, G = d(G, p, u, n), b && F.hasCatches ? (E.nothingThrownLabel = e, E = new l.If(E, C, G, e++)) : E = new l.If(E, C, G), k = a(p, u)) : (G = k[0]) ? b && F.hasCatches ? (E.nothingThrownLabel = G.id, u[G.id] = (u[G.id] || 0) + 1, p.set(G.id), k = a(p, u)) : (G.npredecessors -= 1, G.save = 1, k =
G) : b && F.hasCatches ? (E.nothingThrownLabel = -1, k = a(p, u)) : k = G;
}
s.push(E);
}
}
return 1 < s.length ? new l.Seq(s) : s[0];
}
var b = this.hasExceptions, g = this.boundBlockSet, e = this.blocks.length;
this.controlTree = d(this.blocks[0], new g, {});
};
a.prototype.restructureControlFlow = function() {
h.enterTimeline("Restructure Control Flow");
if (!this.markedLoops && !this.markLoops()) {
return h.leaveTimeline(), !1;
}
this.induceControlTree();
this.restructuredControlFlow = !0;
h.leaveTimeline();
return!0;
};
return a;
}();
a.Analysis = n;
a.analyze = function(a) {
a = new n(a);
a.restructureControlFlow();
return a.controlTree;
};
})(a.Looper || (a.Looper = {}));
})(h.Compiler || (h.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
function v(b, a) {
if ("string" === typeof b || null === b || !0 === b || !1 === b) {
return new B(b);
}
if (void 0 === b) {
return new M("undefined");
}
if ("object" === typeof b || "function" === typeof b) {
return b instanceof c.AVM2.Runtime.LazyInitializer ? m(l(ja, "C"), [new B(a.useConstant(b))]) : new y(aa, new B(a.useConstant(b)), !0);
}
if ("number" === typeof b && isNaN(b)) {
return new M("NaN");
}
if (Infinity === b) {
return new M("Infinity");
}
if (-Infinity === b) {
return new G("-", !0, new M("Infinity"));
}
if ("number" === typeof b && 0 > 1 / b) {
return new G("-", !0, new B(Math.abs(b)));
}
if ("number" === typeof b) {
return new B(b);
}
r("Cannot emit constant for value: " + b);
}
function p(b) {
g("string" === typeof b);
return new M(b);
}
function u(b) {
var a = b[0];
if (!("$" === a || "_" === a || "\\" === a || "a" <= a && "z" >= a || "A" <= a && "Z" >= a)) {
return!1;
}
for (a = 1;a < b.length;a++) {
var d = b[a];
if (!("$" === d || "_" === d || "\\" === d || "a" <= d && "z" >= d || "A" <= d && "Z" >= d || "0" <= d && "9" >= d)) {
return!1;
}
}
return!0;
}
function l(b, a) {
return u(a) ? new y(b, new M(a), !1) : new y(b, new B(a), !0);
}
function e(b, a) {
return u(a.value) ? new y(b, new M(a.value), !1) : new y(b, a, !0);
}
function m(b, a) {
g(a instanceof Array);
a.forEach(function(b) {
g(!(b instanceof Array));
g(void 0 !== b);
});
return new L(b, a);
}
function t(b, a, d) {
return m(l(b, "asCall"), [a].concat(d));
}
function q(b, a, d) {
return m(l(b, "call"), [a].concat(d));
}
function n(b, a) {
g(b && a);
return new H("=", b, a);
}
function k(b) {
return new N(b, "var");
}
function f(b, a, d) {
g(b);
g(b.compile, "Implement |compile| for " + b + " (" + b.nodeName + ")");
g(a instanceof ia);
g(!(b instanceof Array));
if (d || !b.variable) {
return b.compile(a);
}
g(b.variable, "Value has no variable: " + b);
return p(b.variable.name);
}
function d(b, a) {
return[f(b.namespaces, a), f(b.name, a), f(b.flags, a)];
}
function b(b, a) {
g(b instanceof Array);
return b.map(function(b) {
return f(b, a);
});
}
var g = c.Debug.assert, r = c.Debug.unexpected, w = c.Debug.notImplemented, z = c.ArrayUtilities.pushUnique, A = c.AVM2.Compiler.AST, B = A.Literal, M = A.Identifier, N = A.VariableDeclaration, K = A.VariableDeclarator, y = A.MemberExpression, D = A.BinaryExpression, L = A.CallExpression, H = A.AssignmentExpression, J = A.ExpressionStatement, C = A.ReturnStatement, E = A.ConditionalExpression, F = A.ObjectExpression, I = A.ArrayExpression, G = A.UnaryExpression, Z = A.NewExpression, Q = A.Property,
S = A.BlockStatement, O = A.ThisExpression, P = A.ThrowStatement, V = A.IfStatement, $ = A.WhileStatement, W = A.BreakStatement, x = A.ContinueStatement, ea = A.SwitchStatement, Y = A.SwitchCase, R = a.IR.Start, U = a.IR.Variable, ba = a.IR.Constant, X = a.IR.Operator, A = c.AVM2.Compiler.Looper.Control, ga = c.ArrayUtilities.last;
A.Break.prototype.compile = function(b) {
return b.compileBreak(this);
};
A.Continue.prototype.compile = function(b) {
return b.compileContinue(this);
};
A.Exit.prototype.compile = function(b) {
return b.compileExit(this);
};
A.LabelSwitch.prototype.compile = function(b) {
return b.compileLabelSwitch(this);
};
A.Seq.prototype.compile = function(b) {
return b.compileSequence(this);
};
A.Loop.prototype.compile = function(b) {
return b.compileLoop(this);
};
A.Switch.prototype.compile = function(b) {
return b.compileSwitch(this);
};
A.If.prototype.compile = function(b) {
return b.compileIf(this);
};
A.Try.prototype.compile = function(b) {
w("try");
return null;
};
var ja = new M("$F"), aa = new M("$C"), ia = function() {
function b() {
this.label = new U("$L");
this.variables = [];
this.constants = [];
this.lazyConstants = [];
this.parameters = [];
}
b.prototype.useConstant = function(b) {
b instanceof c.AVM2.Runtime.LazyInitializer ? (b = z(this.lazyConstants, b), this.constants[b] = null) : (b = z(this.constants, b), this.lazyConstants[b] = null);
return b;
};
b.prototype.useVariable = function(b) {
g(b);
return z(this.variables, b);
};
b.prototype.useParameter = function(b) {
return this.parameters[b.index] = b;
};
b.prototype.compileLabelBody = function(b) {
var a = [];
void 0 !== b.label && (this.useVariable(this.label), a.push(new J(n(p(this.label.name), new B(b.label)))));
return a;
};
b.prototype.compileBreak = function(b) {
b = this.compileLabelBody(b);
b.push(new W(null));
return new S(b);
};
b.prototype.compileContinue = function(b) {
b = this.compileLabelBody(b);
b.push(new x(null));
return new S(b);
};
b.prototype.compileExit = function(b) {
return new S(this.compileLabelBody(b));
};
b.prototype.compileIf = function(b) {
var a = b.cond.compile(this), d = null, e = null;
b.then && (d = b.then.compile(this));
b.else && (e = b.else.compile(this));
var k = f(a.end.predicate, this);
if (b.negated) {
a: {
b = k;
if (b instanceof ba) {
if (!0 === b.value || !1 === b.value) {
b = v(!b.value);
break a;
}
} else {
if (b instanceof M) {
b = new G(X.FALSE.name, !0, b);
break a;
}
}
g(b instanceof D || b instanceof G, b);
var k = b instanceof D ? b.left : b.argument, c = b.right, m = X.fromName(b.operator);
b = m === X.EQ && c instanceof B && !1 === c.value || m === X.FALSE ? k : m.not ? b instanceof D ? new D(m.not.name, k, c) : new G(m.not.name, !0, k) : new G(X.FALSE.name, !0, b);
}
} else {
b = k;
}
a.body.push(new V(b, d || new S([]), e || null));
return a;
};
b.prototype.compileSwitch = function(b) {
var a = b.determinant.compile(this), d = [];
b.cases.forEach(function(b) {
var a;
b.body && (a = b.body.compile(this));
b = "number" === typeof b.index ? new B(b.index) : void 0;
d.push(new Y(b, a ? [a] : []));
}, this);
b = f(a.end.determinant, this);
a.body.push(new ea(b, d, !1));
return a;
};
b.prototype.compileLabelSwitch = function(b) {
function a(b) {
g("number" === typeof b);
return new D("===", e, new B(b));
}
for (var d = null, e = p(this.label.name), f = b.cases.length - 1;0 <= f;f--) {
for (var k = b.cases[f], c = k.labels, m = a(c[0]), r = 1;r < c.length;r++) {
m = new D("||", m, a(c[r]));
}
d = new V(m, k.body ? k.body.compile(this) : new S([]), d);
}
return d;
};
b.prototype.compileLoop = function(b) {
b = b.body.compile(this);
return new $(v(!0), b);
};
b.prototype.compileSequence = function(b) {
var a = this, d = [];
b.body.forEach(function(b) {
b = b.compile(a);
b instanceof S ? d = d.concat(b.body) : d.push(b);
});
return new S(d);
};
b.prototype.compileBlock = function(b) {
for (var d = [], e = 1;e < b.nodes.length - 1;e++) {
var k = b.nodes[e], c;
k instanceof a.IR.Throw ? c = f(k, this, !0) : (k instanceof a.IR.Move ? (c = p(k.to.name), this.useVariable(k.to), k = f(k.from, this)) : (k.variable ? (c = p(k.variable.name), this.useVariable(k.variable)) : c = null, k = f(k, this, !0)), c = c ? new J(n(c, k)) : new J(k));
d.push(c);
}
e = ga(b.nodes);
e instanceof a.IR.Stop && d.push(new C(f(e.argument, this)));
d = new S(d);
d.end = ga(b.nodes);
g(d.end instanceof a.IR.End);
return d;
};
return b;
}();
s.Context = ia;
a.IR.Parameter.prototype.compile = function(b) {
b.useParameter(this);
return p(this.name);
};
a.IR.Constant.prototype.compile = function(b) {
return v(this.value, b);
};
a.IR.Variable.prototype.compile = function(b) {
return p(this.name);
};
a.IR.Phi.prototype.compile = function(b) {
g(this.variable);
return f(this.variable, b);
};
a.IR.ASScope.prototype.compile = function(b) {
var a = f(this.parent, b);
b = f(this.object, b);
var d = new B(this.isWith);
return new Z(p("Scope"), [a, b, d]);
};
a.IR.ASFindProperty.prototype.compile = function(b) {
var a = f(this.scope, b), g = d(this.name, b);
b = f(this.methodInfo, b);
var e = new B(this.strict);
return m(l(a, "findScopeProperty"), g.concat([b, e]));
};
a.IR.ASGetProperty.prototype.compile = function(b) {
var a = f(this.object, b);
if (this.flags & 1) {
return g(!(this.flags & 8)), m(l(a, "asGetNumericProperty"), [f(this.name.name, b)]);
}
if (this.flags & 2) {
return m(l(a, "asGetResolvedStringProperty"), [f(this.name, b)]);
}
b = d(this.name, b);
var e = new B(this.flags & 8);
return m(l(a, "asGetProperty"), b.concat(e));
};
a.IR.ASGetSuper.prototype.compile = function(b) {
var a = f(this.scope, b), g = f(this.object, b);
b = d(this.name, b);
return m(l(g, "asGetSuper"), [a].concat(b));
};
a.IR.Latch.prototype.compile = function(b) {
return new E(f(this.condition, b), f(this.left, b), f(this.right, b));
};
a.IR.Unary.prototype.compile = function(b) {
return new G(this.operator.name, !0, f(this.argument, b));
};
a.IR.Copy.prototype.compile = function(b) {
return f(this.argument, b);
};
a.IR.Binary.prototype.compile = function(b) {
var d = f(this.left, b);
b = f(this.right, b);
return this.operator === a.IR.Operator.AS_ADD ? m(p("asAdd"), [d, b]) : new D(this.operator.name, d, b);
};
a.IR.CallProperty.prototype.compile = function(b) {
var a = f(this.object, b), d = f(this.name, b), d = e(a, d), g = this.args.map(function(a) {
return f(a, b);
});
return this.flags & 16 ? t(d, a, g) : this.flags & 4 ? m(d, g) : q(d, a, g);
};
a.IR.ASCallProperty.prototype.compile = function(b) {
var a = f(this.object, b), g = this.args.map(function(a) {
return f(a, b);
});
if (this.flags & 2) {
return m(l(a, "asCallResolvedStringProperty"), [f(this.name, b), new B(this.isLex), new I(g)]);
}
var e = d(this.name, b);
return m(l(a, "asCallProperty"), e.concat([new B(this.isLex), new I(g)]));
};
a.IR.ASCallSuper.prototype.compile = function(b) {
var a = f(this.scope, b), g = f(this.object, b), e = this.args.map(function(a) {
return f(a, b);
}), k = d(this.name, b);
return m(l(g, "asCallSuper"), [a].concat(k).concat(new I(e)));
};
a.IR.Call.prototype.compile = function(b) {
var a = this.args.map(function(a) {
return f(a, b);
}), d = f(this.callee, b), g;
g = this.object ? f(this.object, b) : new B(null);
return this.flags & 16 ? t(d, g, a) : null === this.object ? m(d, a) : q(d, g, a);
};
a.IR.ASNew.prototype.compile = function(b) {
var a = this.args.map(function(a) {
return f(a, b);
}), d = f(this.callee, b), d = l(d, "instanceConstructor");
return new Z(d, a);
};
a.IR.This.prototype.compile = function(b) {
return new O;
};
a.IR.Throw.prototype.compile = function(b) {
b = f(this.argument, b);
return new P(b);
};
a.IR.Arguments.prototype.compile = function(b) {
return p("arguments");
};
a.IR.ASGlobal.prototype.compile = function(b) {
b = f(this.scope, b);
return l(l(b, "global"), "object");
};
a.IR.ASSetProperty.prototype.compile = function(b) {
var a = f(this.object, b), g = f(this.value, b);
if (this.flags & 1) {
return m(l(a, "asSetNumericProperty"), [f(this.name.name, b), g]);
}
b = d(this.name, b);
return m(l(a, "asSetProperty"), b.concat(g));
};
a.IR.ASSetSuper.prototype.compile = function(b) {
var a = f(this.scope, b), g = f(this.object, b), e = d(this.name, b);
b = f(this.value, b);
return m(l(g, "asSetSuper"), [a].concat(e).concat([b]));
};
a.IR.ASDeleteProperty.prototype.compile = function(b) {
var a = f(this.object, b);
b = d(this.name, b);
return m(l(a, "asDeleteProperty"), b);
};
a.IR.ASHasProperty.prototype.compile = function(b) {
var a = f(this.object, b);
b = d(this.name, b);
return m(l(a, "asHasProperty"), b);
};
a.IR.GlobalProperty.prototype.compile = function(b) {
return p(this.name);
};
a.IR.GetProperty.prototype.compile = function(b) {
var a = f(this.object, b);
b = f(this.name, b);
return e(a, b);
};
a.IR.SetProperty.prototype.compile = function(b) {
var a = f(this.object, b), d = f(this.name, b);
b = f(this.value, b);
return n(e(a, d), b);
};
a.IR.ASGetDescendants.prototype.compile = function(b) {
var a = f(this.object, b);
b = f(this.name, b);
return m(p("getDescendants"), [a, b]);
};
a.IR.ASSetSlot.prototype.compile = function(b) {
var a = f(this.object, b), d = f(this.name, b);
b = f(this.value, b);
return m(p("asSetSlot"), [a, d, b]);
};
a.IR.ASGetSlot.prototype.compile = function(b) {
var a = f(this.object, b);
b = f(this.name, b);
return m(p("asGetSlot"), [a, b]);
};
a.IR.Projection.prototype.compile = function(b) {
g(4 === this.type);
g(this.argument instanceof R);
return f(this.argument.scope, b);
};
a.IR.NewArray.prototype.compile = function(a) {
return new I(b(this.elements, a));
};
a.IR.NewObject.prototype.compile = function(b) {
var a = this.properties.map(function(a) {
var d = f(a.key, b);
a = f(a.value, b);
return new Q(d, a, "init");
});
return new F(a);
};
a.IR.ASNewActivation.prototype.compile = function(b) {
b = f(this.methodInfo, b);
return m(p("asCreateActivation"), [b]);
};
a.IR.ASNewHasNext2.prototype.compile = function(b) {
return new Z(p("HasNext2Info"), []);
};
a.IR.ASMultiname.prototype.compile = function(b) {
var a = f(this.namespaces, b), d = f(this.name, b);
b = f(this.flags, b);
return m(p("createName"), [a, d, b]);
};
a.IR.Block.prototype.compile = function(b) {
return b.compileBlock(this);
};
var T = function() {
function b(a, d, g, e) {
this.parameters = a;
this.body = d;
this.constants = g;
this.lazyConstants = e;
}
b.prototype.C = function(b) {
null === this.constants[b] && (this.constants[b] = this.lazyConstants[b].resolve(), this.lazyConstants[b] = null);
return this.constants[b];
};
b.id = 0;
return b;
}();
s.Compilation = T;
s.generate = function(b) {
h.enterTimeline("Looper");
var d = a.Looper.analyze(b);
h.leaveTimeline();
new c.IndentingWriter;
b = new ia;
h.enterTimeline("Construct AST");
var g = d.compile(b);
h.leaveTimeline();
for (var d = [], e = 0;e < b.parameters.length;e++) {
d.push(p(b.parameters[e] ? b.parameters[e].name : "_" + e));
}
e = "$$F" + T.id++;
if (b.constants.length) {
var f = new M(e), m = new y(f, new M("constants"), !1);
g.body.unshift(k([new K(p("$F"), f), new K(p("$C"), m)]));
}
b.variables.length && (h.countTimeline("Backend: Locals", b.variables.length), f = k(b.variables.map(function(b) {
return new K(p(b.name));
})), g.body.unshift(f));
h.enterTimeline("Serialize AST");
g = g.toSource();
h.leaveTimeline();
return jsGlobal[e] = new T(d.map(function(b) {
return b.name;
}), g, b.constants, b.lazyConstants);
};
})(a.Backend || (a.Backend = {}));
})(h.Compiler || (h.Compiler = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(d) {
h.enterTimeline("executeScript", {name:d.name});
var b = d.abc;
t(!d.executing && !d.executed);
var g = new a.Global(d);
b.applicationDomain.allowNatives && (g[e.getPublicQualifiedName("unsafeJSNative")] = c.AVM2.AS.getNative);
d.executing = !0;
b = new a.Scope(null, d.global);
a.createFunction(d.init, b, !1, !1).call(d.global, !1);
d.executed = !0;
h.leaveTimeline();
}
function v(a, b) {
void 0 === b && (b = "");
a.executed || a.executing || (2 <= c.AVM2.Runtime.traceExecution.value && console.log("Executing Script For: " + b), s(a));
}
function p(d) {
if (!a.playerglobal) {
return null;
}
for (var b = 0;b < d.namespaces.length;b++) {
var g = a.playerglobal.map[d.namespaces[b].uri + ":" + d.name];
if (g) {
break;
}
}
return g ? (d = g, d = (b = a.playerglobal.scripts[d]) ? new l(new Uint8Array(a.playerglobal.abcs, b.offset, b.length), d) : null, d) : null;
}
function u(a, b) {
return new Promise(function(g, e) {
var f = new XMLHttpRequest;
f.open("GET", a);
f.responseType = b;
f.onload = function() {
var k = f.response;
k ? ("json" === b && "json" !== f.responseType && (k = JSON.parse(k)), g(k)) : e("Unable to load " + a + ": " + f.statusText);
};
f.send();
});
}
var l = c.AVM2.ABC.AbcFile, e = c.AVM2.ABC.Multiname, m = c.Callback, t = c.Debug.assert, q = c.IndentingWriter;
a.executeScript = s;
a.ensureScriptIsExecuted = v;
(function(a) {
a[a.PUBLIC_PROPERTIES = 1] = "PUBLIC_PROPERTIES";
a[a.PUBLIC_METHODS = 2] = "PUBLIC_METHODS";
a[a.ALL = 3] = "ALL";
})(a.Glue || (a.Glue = {}));
a.playerglobalLoadedPromise;
a.playerglobal;
var n = function() {
function d(b, a) {
this.systemDomain = new k(this, null, b, !0);
this.applicationDomain = new k(this, this.systemDomain, a, !1);
this.findDefiningAbc = p;
this.exception = {value:void 0};
this.exceptions = [];
this.globals = Object.create(null);
}
d.initialize = function(b, a) {
t(!d.instance);
d.instance = new d(b, a);
};
d.currentAbc = function() {
for (var b = arguments.callee, a = null, d = 0;20 > d && b;d++) {
var e = b.methodInfo;
if (e) {
a = e.abc;
break;
}
b = b.caller;
}
return a;
};
d.currentDomain = function() {
var b = d.currentAbc();
if (null === b) {
return d.instance.systemDomain;
}
t(b && b.applicationDomain, "No domain environment was found on the stack, increase STACK_DEPTH or make sure that a compiled / interpreted function is on the call stack.");
return b.applicationDomain;
};
d.isPlayerglobalLoaded = function() {
return!!a.playerglobal;
};
d.loadPlayerglobal = function(b, d) {
if (a.playerglobalLoadedPromise) {
return Promise.reject("Playerglobal is already loaded");
}
a.playerglobalLoadedPromise = Promise.all([u(b, "arraybuffer"), u(d, "json")]).then(function(b) {
a.playerglobal = {abcs:b[0], map:Object.create(null), scripts:Object.create(null)};
b = b[1];
for (var d = 0;d < b.length;d++) {
var g = b[d];
a.playerglobal.scripts[g.name] = g;
if ("string" === typeof g.defs) {
a.playerglobal.map[g.defs] = g.name;
} else {
for (var e = 0;e < g.defs.length;e++) {
a.playerglobal.map[g.defs[e]] = g.name;
}
}
}
}, function(b) {
console.error(b);
});
return a.playerglobalLoadedPromise;
};
return d;
}();
a.AVM2 = n;
var k = function() {
function d(b, a, e, f) {
t(b instanceof n);
t(c.isNullOrUndefined(a) || a instanceof d);
this.vm = b;
this.abcs = [];
this.loadedAbcs = {};
this.loadedClasses = [];
this.classCache = Object.create(null);
this.scriptCache = Object.create(null);
this.classInfoCache = Object.create(null);
this.base = a;
this.allowNatives = f;
this.mode = e;
this.onMessage = new m;
this.system = a ? a.system : this;
}
d.passthroughCallable = function(b) {
return{call:function(a) {
Array.prototype.shift.call(arguments);
return b.asApply(a, arguments);
}, apply:function(a, d) {
return b.asApply(a, d);
}};
};
d.coerceCallable = function(b) {
return{call:function(d, e) {
return a.asCoerce(b, e);
}, apply:function(d, e) {
return a.asCoerce(b, e[0]);
}};
};
d.prototype.getType = function(b) {
return this.getProperty(b, !0, !0);
};
d.prototype.getProperty = function(b, a, d) {
if (d = this.findDefiningScript(b, d)) {
return d.script.executing ? d.script.global[e.getQualifiedName(d.trait.name)] : void 0;
}
if (a) {
return c.Debug.unexpected("Cannot find property " + b);
}
};
d.prototype.getClass = function(b, a) {
void 0 === a && (a = !0);
var d = this.classCache, f = d[b];
f || (f = d[b] = this.getProperty(e.fromSimpleName(b), a, !0));
f && t(f instanceof c.AVM2.AS.ASClass);
return f;
};
d.prototype.findDomainProperty = function(b, a, d) {
c.AVM2.Runtime.traceDomain.value && console.log("ApplicationDomain.findDomainProperty: " + b);
if (d = this.findDefiningScript(b, d)) {
return d.script.global;
}
if (a) {
return c.Debug.unexpected("Cannot find property " + b);
}
};
d.prototype.findClassInfo = function(b) {
var a;
if (e.isQName(b)) {
a = e.getQualifiedName(b);
var d = this.classInfoCache[a];
} else {
d = this.classInfoCache[b.runtimeId];
}
return d || this.base && (d = this.base.findClassInfo(b)) ? d : this.findClassInfoSlow(b, a);
};
d.prototype.findClassInfoSlow = function(b, a) {
for (var d = this.abcs, f = 0;f < d.length;f++) {
for (var k = d[f], k = k.scripts, c = 0;c < k.length;c++) {
for (var m = k[c].traits, l = 0;l < m.length;l++) {
var n = m[l];
if (n.isClass()) {
var q = e.getQualifiedName(n.name);
if (a) {
if (q === a) {
return this.classInfoCache[a] = n.classInfo;
}
} else {
for (var t = 0, h = b.namespaces.length;t < h;t++) {
var s = b.getQName(t);
if (q === e.getQualifiedName(s)) {
return this.classInfoCache[s] = n.classInfo;
}
}
}
}
}
}
}
if (!this.base && this.vm.findDefiningAbc && (k = this.vm.findDefiningAbc(b), null !== k && !this.loadedAbcs[k.name])) {
return this.loadedAbcs[k.name] = !0, this.loadAbc(k), this.findClassInfo(b);
}
};
d.prototype.findDefiningScript = function(b, a) {
var d = this.scriptCache[b.runtimeId];
return d && (d.script.executed || !a) || this.base && (d = this.base.findDefiningScript(b, a)) ? d : this.findDefiningScriptSlow(b, a);
};
d.prototype.findDefiningScriptSlow = function(b, a) {
h.countTimeline("ApplicationDomain: findDefiningScriptSlow");
for (var d = this.abcs, f = 0;f < d.length;f++) {
for (var k = d[f], k = k.scripts, m = 0;m < k.length;m++) {
var l = k[m], n = l.traits;
if (b instanceof e) {
for (var q = 0;q < n.length;q++) {
var t = n[q];
if (b.hasQName(t.name)) {
return a && v(l, String(t.name)), this.scriptCache[b.runtimeId] = {script:l, trait:t};
}
}
} else {
c.Debug.unexpected();
}
}
}
if (!this.base && this.vm.findDefiningAbc && (k = this.vm.findDefiningAbc(b), null !== k && !this.loadedAbcs[k.name])) {
return this.loadedAbcs[k.name] = !0, this.loadAbc(k), this.findDefiningScript(b, a);
}
};
d.prototype.compileAbc = function(b, a) {
c.AVM2.Compiler.compileAbc(b, a);
};
d.prototype.executeAbc = function(b) {
this.loadAbc(b);
s(b.lastScript);
};
d.prototype.loadAbc = function(b) {
c.AVM2.Runtime.traceExecution.value && console.log("Loading: " + b.name);
b.applicationDomain = this;
a.GlobalMultinameResolver.loadAbc(b);
this.abcs.push(b);
this.base || (h.AS.initialize(this), c.AVM2.Verifier.Type.initializeTypes(this));
};
d.prototype.broadcastMessage = function(b, a, d) {
try {
this.onMessage.notify1(b, {data:a, origin:d, source:this});
} catch (e) {
throw n.instance.exceptions.push({source:b, message:e.message, stack:e.stack}), e;
}
};
d.prototype.traceLoadedClasses = function() {
var b = new q;
[c.ArrayUtilities.last(this.loadedClasses)].forEach(function(a) {
a !== c.AVM2.AS.ASClass && a.trace(b);
});
};
return d;
}();
a.ApplicationDomain = k;
var f = function() {
function a(b) {
this.compartment = newGlobal("new-compartment");
this.compartment.homePath = homePath;
this.compartment.release = !1;
this.compartment.eval(snarf(b));
}
a.prototype.initializeShell = function(b, a) {
var d = this.compartment;
d.AVM2.initialize(b, a);
d.AVM2.instance.systemDomain.executeAbc(d.grabAbc(homePath + "src/avm2/generated/builtin/builtin.abc"));
d.AVM2.instance.systemDomain.executeAbc(d.grabAbc(homePath + "src/avm2/generated/shell/shell.abc"));
this.systemDomain = d.AVM2.instance.systemDomain;
this.applicationDomain = d.AVM2.instance.applicationDomain;
};
return a;
}();
a.SecurityDomain = f;
})(h.Runtime || (h.Runtime = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
var Glue = Shumway.AVM2.Runtime.Glue, ApplicationDomain = Shumway.AVM2.Runtime.ApplicationDomain, AVM2 = Shumway.AVM2.Runtime.AVM2, EXECUTION_MODE = Shumway.AVM2.Runtime.ExecutionMode;
(function(c) {
(function(h) {
(function(a) {
function s(a) {
return a.holder instanceof p ? "static " + a.holder.instanceInfo.name.getOriginalName() + "::" + a.name.getOriginalName() : a.holder instanceof u ? a.holder.name.getOriginalName() + "::" + a.name.getOriginalName() : a.name.getOriginalName();
}
var v = c.AVM2.ABC.Multiname, p = c.AVM2.ABC.ClassInfo, u = c.AVM2.ABC.InstanceInfo, l = c.Debug.assert, e = c.ObjectUtilities.defineReadOnlyProperty, m = c.FunctionUtilities.bindSafely;
a.getMethodOverrideKey = s;
a.checkMethodOverrides = function(e) {
if (e.name && (e = s(e), e in a.VM_METHOD_OVERRIDES)) {
return c.Debug.warning("Overriding Method: " + e), a.VM_METHOD_OVERRIDES[e];
}
};
var t = [[208, 48, 71], [208, 48, 208, 73, 0, 71]];
a.checkCommonMethodPatterns = function(a) {
return a.code && (c.ArrayUtilities.equals(a.code, t[0]) || c.ArrayUtilities.equals(a.code, t[1]) && a.holder instanceof u && v.getQualifiedName(a.holder.superName) === v.Object) ? function() {
} : null;
};
a.makeTrampoline = function(m, n, k, f, d, b) {
function g() {
h.countTimeline("Executing Trampoline");
1 <= c.AVM2.Runtime.traceExecution.value && (a.callWriter.writeLn("Trampoline: " + b), 3 <= c.AVM2.Runtime.traceExecution.value && console.log("Trampolining"));
r || g.trigger();
return r.asApply(this, arguments);
}
var r = null;
g.trigger = function() {
h.countTimeline("Triggering Trampoline");
r || (l(!m.methodInfo.isNative()), r = a.createFunction(m.methodInfo, n, !1, !1, !1), a.patch(f, r), m = n = f = null, l(r));
};
g.isTrampoline = !0;
g.patchTargets = f;
e(g, a.VM_LENGTH, d);
return g;
};
a.makeMemoizer = function(q, n) {
function k() {
n.value.isTrampoline && (n.value.trigger(), l(!n.value.isTrampoline, "We should avoid binding trampolines."));
var f = m(n.value, this);
c.ObjectUtilities.defineReadOnlyProperty(f, "asLength", n.value.length);
if (a.isNativePrototype(this)) {
return h.countTimeline("Runtime: Method Closures"), f;
}
f.methodInfo = n.value.methodInfo;
e(f, v.getPublicQualifiedName("prototype"), null);
e(this, q, f);
return f;
}
h.countTimeline("Runtime: Memoizers");
k.isMemoizer = !0;
return k;
};
})(h.Runtime || (h.Runtime = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
function a(b, a, d) {
d.flags = a.flags;
d.name = a.isRuntimeName() ? b.pop() : a.name;
d.namespaces = a.isRuntimeNamespace() ? [b.pop()] : a.namespaces;
}
var s = c.AVM2.Runtime.Scope, v = c.AVM2.Runtime.asCoerceByMultiname, p = c.AVM2.Runtime.asGetSlot, u = c.AVM2.Runtime.asSetSlot, l = c.AVM2.Runtime.asCoerce, e = c.AVM2.Runtime.asCoerceString, m = c.AVM2.Runtime.asAsType, t = c.AVM2.Runtime.asTypeOf, q = c.AVM2.Runtime.asIsInstanceOf, n = c.AVM2.Runtime.asIsType, k = c.AVM2.Runtime.applyType, f = c.AVM2.Runtime.createFunction, d = c.AVM2.Runtime.createClass, b = c.AVM2.Runtime.getDescendants, g = c.AVM2.Runtime.checkFilter, r = c.AVM2.Runtime.asAdd,
w = c.AVM2.Runtime.translateError, z = c.AVM2.Runtime.asCreateActivation, A = c.AVM2.Runtime.sliceArguments, B = c.ObjectUtilities.boxValue, M = c.ArrayUtilities.popManyInto, N = c.AVM2.Runtime.construct, K = c.AVM2.ABC.Multiname, y = c.Debug.assert, D = c.AVM2.Runtime.HasNext2Info, L = function() {
function b(a) {
this.parent = a;
this.stack = [];
this.isWith = [];
}
b.prototype.push = function(b, a) {
this.stack.push(b);
this.isWith.push(!!a);
};
b.prototype.get = function(b) {
return this.stack[b];
};
b.prototype.clear = function() {
this.stack.length = 0;
this.isWith.length = 0;
};
b.prototype.pop = function() {
this.isWith.pop();
this.stack.pop();
};
b.prototype.topScope = function() {
this.scopes || (this.scopes = []);
for (var b = this.parent, a = 0;a < this.stack.length;a++) {
var d = this.stack[a], g = this.isWith[a], e = this.scopes[a];
e && e.parent === b && e.object === d && e.isWith === g || (e = this.scopes[a] = new s(b, d, g));
b = e;
}
return b;
};
return b;
}(), H = function() {
function s() {
}
s.interpretMethod = function(s, H, J, I) {
y(H.analysis);
h.countTimeline("Interpret Method");
var G = H.abc, Z = G.constantPool.ints, Q = G.constantPool.uints, S = G.constantPool.doubles, O = G.constantPool.strings, P = G.methods, V = G.constantPool.multinames, $ = G.applicationDomain, W = H.exceptions;
s = [s];
for (var x = [], ea = new L(J), Y = H.parameters.length, R = I.length, U, ba = 0;ba < Y;ba++) {
var X = H.parameters[ba];
U = ba < R ? I[ba] : X.value;
X.type && !X.type.isAnyName() && (U = v(H, X.type, U));
s.push(U);
}
H.needsRest() ? s.push(A(I, Y)) : H.needsArguments() && s.push(A(I, 0));
I = H.analysis.bytecodes;
var ga, ja, aa, ia, T, da, Y = [], R = K.TEMPORARY, X = [], fa = 0, la = I.length;
a: for (;fa < la;) {
try {
var ca = I[fa], na = ca.op;
switch(na | 0) {
case 3:
throw x.pop();;
case 4:
a(x, V[ca.index], R);
x.push(x.pop().asGetSuper(J, R.namespaces, R.name, R.flags));
break;
case 5:
U = x.pop();
a(x, V[ca.index], R);
x.pop().asSetSuper(J, R.namespaces, R.name, R.flags, U);
break;
case 8:
s[ca.index] = void 0;
break;
case 12:
da = x.pop();
T = x.pop();
fa = T < da ? fa + 1 : ca.offset;
continue;
case 24:
da = x.pop();
T = x.pop();
fa = T >= da ? ca.offset : fa + 1;
continue;
case 13:
da = x.pop();
T = x.pop();
fa = T <= da ? fa + 1 : ca.offset;
continue;
case 23:
da = x.pop();
T = x.pop();
fa = T > da ? ca.offset : fa + 1;
continue;
case 14:
da = x.pop();
T = x.pop();
fa = T > da ? fa + 1 : ca.offset;
continue;
case 22:
da = x.pop();
T = x.pop();
fa = T <= da ? ca.offset : fa + 1;
continue;
case 15:
da = x.pop();
T = x.pop();
fa = T >= da ? fa + 1 : ca.offset;
continue;
case 21:
da = x.pop();
T = x.pop();
fa = T < da ? ca.offset : fa + 1;
continue;
case 16:
fa = ca.offset;
continue;
case 17:
fa = x.pop() ? ca.offset : fa + 1;
continue;
case 18:
fa = x.pop() ? fa + 1 : ca.offset;
continue;
case 19:
da = x.pop();
T = x.pop();
fa = asEquals(T, da) ? ca.offset : fa + 1;
continue;
case 20:
da = x.pop();
T = x.pop();
fa = asEquals(T, da) ? fa + 1 : ca.offset;
continue;
case 25:
da = x.pop();
T = x.pop();
fa = T === da ? ca.offset : fa + 1;
continue;
case 26:
da = x.pop();
T = x.pop();
fa = T !== da ? ca.offset : fa + 1;
continue;
case 27:
ja = x.pop();
if (0 > ja || ja >= ca.offsets.length) {
ja = ca.offsets.length - 1;
}
fa = ca.offsets[ja];
continue;
case 28:
ea.push(B(x.pop()), !0);
break;
case 29:
ea.pop();
break;
case 30:
ja = x.pop();
x[x.length - 1] = B(x[x.length - 1]).asNextName(ja);
break;
case 35:
ja = x.pop();
x[x.length - 1] = B(x[x.length - 1]).asNextValue(ja);
break;
case 50:
var ma = X[fa] || (X[fa] = new D(null, 0));
ga = s[ca.object];
ja = s[ca.index];
ma.object = ga;
ma.index = ja;
Object(ga).asHasNext2(ma);
s[ca.object] = ma.object;
s[ca.index] = ma.index;
x.push(!!ma.index);
break;
case 32:
x.push(null);
break;
case 33:
x.push(void 0);
break;
case 36:
;
case 37:
x.push(ca.value);
break;
case 44:
x.push(O[ca.index]);
break;
case 45:
x.push(Z[ca.index]);
break;
case 46:
x.push(Q[ca.index]);
break;
case 47:
x.push(S[ca.index]);
break;
case 38:
x.push(!0);
break;
case 39:
x.push(!1);
break;
case 40:
x.push(NaN);
break;
case 41:
x.pop();
break;
case 42:
x.push(x[x.length - 1]);
break;
case 43:
ga = x[x.length - 1];
x[x.length - 1] = x[x.length - 2];
x[x.length - 2] = ga;
break;
case 48:
ea.push(B(x.pop()), !1);
break;
case 64:
x.push(f(P[ca.index], ea.topScope(), !0, !1));
break;
case 65:
M(x, ca.argCount, Y);
ga = x.pop();
x[x.length - 1] = x[x.length - 1].asApply(ga, Y);
break;
case 66:
M(x, ca.argCount, Y);
x[x.length - 1] = N(x[x.length - 1], Y);
break;
case 71:
return;
case 72:
return H.returnType ? v(H, H.returnType, x.pop()) : x.pop();
case 73:
M(x, ca.argCount, Y);
ga = x.pop();
J.object.baseClass.instanceConstructorNoInitialize.apply(ga, Y);
break;
case 74:
M(x, ca.argCount, Y);
a(x, V[ca.index], R);
ga = B(x[x.length - 1]);
ga = ga.asConstructProperty(R.namespaces, R.name, R.flags, Y);
x[x.length - 1] = ga;
break;
case 75:
c.Debug.notImplemented("OP.callsuperid");
break;
case 76:
;
case 70:
;
case 79:
M(x, ca.argCount, Y);
a(x, V[ca.index], R);
ia = B(x.pop()).asCallProperty(R.namespaces, R.name, R.flags, 76 === na, Y);
79 !== na && x.push(ia);
break;
case 69:
;
case 78:
M(x, ca.argCount, Y);
a(x, V[ca.index], R);
ia = x.pop().asCallSuper(J, R.namespaces, R.name, R.flags, Y);
78 !== na && x.push(ia);
break;
case 83:
M(x, ca.argCount, Y);
x[x.length - 1] = k(H, x[x.length - 1], Y);
break;
case 85:
ga = {};
for (ba = 0;ba < ca.argCount;ba++) {
U = x.pop(), ga[K.getPublicQualifiedName(x.pop())] = U;
}
x.push(ga);
break;
case 86:
ga = [];
M(x, ca.argCount, Y);
ga.push.apply(ga, Y);
x.push(ga);
break;
case 87:
y(H.needsActivation());
x.push(z(H));
break;
case 88:
x[x.length - 1] = d(G.classes[ca.index], x[x.length - 1], ea.topScope());
break;
case 89:
a(x, V[ca.index], R);
void 0 === R.name && (R.name = "*");
x.push(b(x.pop(), R));
break;
case 90:
y(W[ca.index].scopeObject);
x.push(W[ca.index].scopeObject);
break;
case 94:
;
case 93:
a(x, V[ca.index], R);
x.push(ea.topScope().findScopeProperty(R.namespaces, R.name, R.flags, H, 93 === na, !1));
break;
case 96:
aa = V[ca.index];
ga = ea.topScope().findScopeProperty(aa.namespaces, aa.name, aa.flags, H, !0, !1);
x.push(ga.asGetProperty(aa.namespaces, aa.name, aa.flags));
break;
case 104:
;
case 97:
U = x.pop();
a(x, V[ca.index], R);
B(x.pop()).asSetProperty(R.namespaces, R.name, R.flags, U);
break;
case 98:
x.push(s[ca.index]);
break;
case 99:
s[ca.index] = x.pop();
break;
case 100:
x.push(J.global.object);
break;
case 101:
x.push(ea.get(ca.index));
break;
case 102:
a(x, V[ca.index], R);
x[x.length - 1] = B(x[x.length - 1]).asGetProperty(R.namespaces, R.name, R.flags);
break;
case 106:
a(x, V[ca.index], R);
x[x.length - 1] = B(x[x.length - 1]).asDeleteProperty(R.namespaces, R.name, R.flags);
break;
case 108:
x[x.length - 1] = p(x[x.length - 1], ca.index);
break;
case 109:
U = x.pop();
ga = x.pop();
u(ga, ca.index, U);
break;
case 112:
x[x.length - 1] = e(x[x.length - 1]);
break;
case 114:
x[x.length - 1] = h.Runtime.escapeXMLAttribute(x[x.length - 1]);
break;
case 113:
x[x.length - 1] = h.Runtime.escapeXMLElement(x[x.length - 1]);
break;
case 131:
;
case 115:
x[x.length - 1] |= 0;
break;
case 136:
;
case 116:
x[x.length - 1] >>>= 0;
break;
case 132:
;
case 117:
x[x.length - 1] = +x[x.length - 1];
break;
case 129:
;
case 118:
x[x.length - 1] = !!x[x.length - 1];
break;
case 120:
x[x.length - 1] = g(x[x.length - 1]);
break;
case 128:
x[x.length - 1] = l($.getType(V[ca.index]), x[x.length - 1]);
break;
case 130:
break;
case 133:
x[x.length - 1] = e(x[x.length - 1]);
break;
case 134:
x[x.length - 2] = m($.getType(V[ca.index]), x[x.length - 1]);
break;
case 135:
x[x.length - 2] = m(x.pop(), x[x.length - 1]);
break;
case 137:
ga = x[x.length - 1];
x[x.length - 1] = void 0 == ga ? null : ga;
break;
case 144:
x[x.length - 1] = -x[x.length - 1];
break;
case 145:
++x[x.length - 1];
break;
case 146:
++s[ca.index];
break;
case 147:
--x[x.length - 1];
break;
case 148:
--s[ca.index];
break;
case 149:
x[x.length - 1] = t(x[x.length - 1]);
break;
case 150:
x[x.length - 1] = !x[x.length - 1];
break;
case 151:
x[x.length - 1] = ~x[x.length - 1];
break;
case 160:
x[x.length - 2] = r(x[x.length - 2], x.pop());
break;
case 161:
x[x.length - 2] -= x.pop();
break;
case 162:
x[x.length - 2] *= x.pop();
break;
case 163:
x[x.length - 2] /= x.pop();
break;
case 164:
x[x.length - 2] %= x.pop();
break;
case 165:
x[x.length - 2] <<= x.pop();
break;
case 166:
x[x.length - 2] >>= x.pop();
break;
case 167:
x[x.length - 2] >>>= x.pop();
break;
case 168:
x[x.length - 2] &= x.pop();
break;
case 169:
x[x.length - 2] |= x.pop();
break;
case 170:
x[x.length - 2] ^= x.pop();
break;
case 171:
x[x.length - 2] = asEquals(x[x.length - 2], x.pop());
break;
case 172:
x[x.length - 2] = x[x.length - 2] === x.pop();
break;
case 173:
x[x.length - 2] = x[x.length - 2] < x.pop();
break;
case 174:
x[x.length - 2] = x[x.length - 2] <= x.pop();
break;
case 175:
x[x.length - 2] = x[x.length - 2] > x.pop();
break;
case 176:
x[x.length - 2] = x[x.length - 2] >= x.pop();
break;
case 177:
x[x.length - 2] = q(x.pop(), x[x.length - 1]);
break;
case 178:
x[x.length - 1] = n($.getType(V[ca.index]), x[x.length - 1]);
break;
case 179:
x[x.length - 2] = n(x.pop(), x[x.length - 1]);
break;
case 180:
x[x.length - 2] = B(x.pop()).asHasProperty(null, x[x.length - 1]);
break;
case 192:
x[x.length - 1] = (x[x.length - 1] | 0) + 1;
break;
case 193:
x[x.length - 1] = (x[x.length - 1] | 0) - 1;
break;
case 194:
s[ca.index] = (s[ca.index] | 0) + 1;
break;
case 195:
s[ca.index] = (s[ca.index] | 0) - 1;
break;
case 196:
x[x.length - 1] = ~x[x.length - 1];
break;
case 197:
x[x.length - 2] = x[x.length - 2] + x.pop() | 0;
break;
case 198:
x[x.length - 2] = x[x.length - 2] - x.pop() | 0;
break;
case 199:
x[x.length - 2] = x[x.length - 2] * x.pop() | 0;
break;
case 208:
;
case 209:
;
case 210:
;
case 211:
x.push(s[na - 208]);
break;
case 212:
;
case 213:
;
case 214:
;
case 215:
s[na - 212] = x.pop();
break;
case 6:
c.AVM2.AS.ASXML.defaultNamespace = O[ca.index];
break;
case 7:
c.AVM2.AS.ASXML.defaultNamespace = x.pop();
break;
case 239:
;
case 240:
;
case 241:
break;
default:
c.Debug.notImplemented(c.AVM2.opcodeName(na));
}
fa++;
} catch (ra) {
if (1 > W.length) {
throw ra;
}
for (var ra = w($, ra), ba = 0, wa = W.length;ba < wa;ba++) {
var qa = W[ba];
if (fa >= qa.start && fa <= qa.end && (!qa.typeName || $.getType(qa.typeName).isType(ra))) {
x.length = 0;
x.push(ra);
ea.clear();
fa = qa.offset;
continue a;
}
}
throw ra;
}
}
};
return s;
}();
h.Interpreter = H;
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
a.VM_METHOD_OVERRIDES["static mochi.as3.MochiServices::connect"] = function() {
};
a.VM_METHOD_OVERRIDES["static MochiBot::track"] = function() {
};
a.VM_METHOD_OVERRIDES["com.midasplayer.debug.DebugLog::trace"] = function(a) {
console.log(a);
};
a.VM_METHOD_OVERRIDES["com.midasplayer.engine.comm.DebugGameComm::getGameData"] = function() {
return'<gamedata randomseed="554884453" version="1">\n<musicOn>true</musicOn>\n<soundOn>true</soundOn>\n<isShortGame>false</isShortGame>\n<booster_1>0</booster_1>\n<booster_2>0</booster_2>\n<booster_3>0</booster_3>\n<booster_4>0</booster_4>\n<booster_5>0</booster_5>\n<bestScore>0</bestScore>\n<bestChain>0</bestChain>\n<bestLevel>0</bestLevel>\n<bestCrushed>0</bestCrushed>\n<bestMixed>0</bestMixed>\n<text id="outro.crushed">Candy crushed</text>\n<text id="outro.bestever">best ever</text>\n<text id="outro.trophy.two">scored {0} in one game</text>\n<text id="outro.combo_color_color">All Clear Created</text>\n<text id="outro.trophy.one">crushed {0} candy in one game</text>\n<text id="outro.score">Score</text>\n<text id="outro.opengame">Please register to play the full game</text>\n<text id="outro.chain">Longest chain</text>\n<text id="outro.time">Game ends in {0} seconds</text>\n<text id="outro.combo_color_line">Super Stripes Created</text>\n<text id="game.nomoves">No more moves!</text>\n<text id="outro.combo_wrapper_line">Mega-Candy Created</text>\n<text id="intro.time">Game starts in {0} seconds</text>\n<text id="outro.now">now</text>\n<text id="outro.level">Level reached</text>\n<text id="outro.title">Game Over</text>\n<text id="intro.info1">Match 3 Candy of the same colour to crush them. Matching 4 or 5 in different formations generates special sweets that are extra tasty.</text>\n<text id="intro.info2">You can also combine the special sweets for additional effects by switching them with each other. Try these combinations for a taste you will not forget: </text>\n<text id="outro.combo_color_wrapper">Double Colour Bombs Created</text>\n<text id="outro.trophy.three">made {0} combined candy in one game</text>\n<text id="intro.title">Play like this:</text>\n</gamedata>';
};
a.VM_METHOD_OVERRIDES["com.antkarlov.Preloader::com.antkarlov:Preloader.isUrl"] = function() {
return!0;
};
a.VM_METHOD_OVERRIDES["static com.demonsters.debugger.MonsterDebugger::initialize"] = function() {
};
a.VM_METHOD_OVERRIDES["com.spilgames.api.core.tracking.TrackConfig::getTrackers"] = function() {
return[];
};
a.VM_METHOD_OVERRIDES["org.robotlegs.base.CommandMap::org.robotlegs.base:CommandMap.verifyCommandClass"] = function() {
};
a.VM_METHOD_OVERRIDES["org.swiftsuspenders.injectionpoints.PropertyInjectionPoint::org.swiftsuspenders.injectionpoints:PropertyInjectionPoint.initializeInjection"] = function() {
};
a.VM_METHOD_OVERRIDES["org.swiftsuspenders.injectionpoints.NoParamsConstructorInjectionPoint::applyInjection"] = function() {
};
a.VM_METHOD_OVERRIDES["org.swiftsuspenders.injectionpoints.PropertyInjectionPoint::applyInjection"] = function() {
};
a.VM_METHOD_OVERRIDES["com.spilgames.api.components.TextFields.AutoFitTextFieldEx::com.spilgames.api.components.TextFields:AutoFitTextFieldEx.updateProperties"] = a.VM_METHOD_OVERRIDES["com.spilgames.api.components.TextFields.AutoFitTextFieldEx::com.spilgames.api.components.TextFields:AutoFitTextFieldEx.updateTextSize"] = function() {
};
a.VM_METHOD_OVERRIDES["Preloader::isNeedSite"] = function() {
return!0;
};
a.VM_METHOD_OVERRIDES["facebook.utils.FBURI::isFacebookURI"] = function() {
return!0;
};
a.VM_METHOD_OVERRIDES["facebook.utils.FBURI::is_facebook_cdn_url"] = function() {
return!!this.asGetPublicProperty("authority");
};
})(c.Runtime || (c.Runtime = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
function a(b, a) {
if (65535 < a.length) {
throw "AMF short string exceeded";
}
if (a.length) {
var d = c.StringUtilities.utf8decode(a);
b.writeByte(d.length >> 8 & 255);
b.writeByte(d.length & 255);
for (var e = 0;e < d.length;e++) {
b.writeByte(d[e]);
}
} else {
b.writeByte(0), b.writeByte(0);
}
}
function s(b) {
var a = b.readByte() << 8 | b.readByte();
if (!a) {
return "";
}
for (var d = new Uint8Array(a), e = 0;e < a;e++) {
d[e] = b.readByte();
}
return c.StringUtilities.utf8encode(d);
}
function v(b, a) {
var d = new ArrayBuffer(8), e = new DataView(d);
e.setFloat64(0, a, !1);
for (var f = 0;f < d.byteLength;f++) {
b.writeByte(e.getUint8(f));
}
}
function p(b) {
for (var a = new ArrayBuffer(8), d = new DataView(a), e = 0;e < a.byteLength;e++) {
d.setUint8(e, b.readByte());
}
return d.getFloat64(0, !1);
}
function u(b) {
var a = b.readByte();
if (0 === (a & 128)) {
return a;
}
var d = b.readByte();
if (0 === (d & 128)) {
return(a & 127) << 7 | d;
}
var e = b.readByte();
if (0 === (e & 128)) {
return(a & 127) << 14 | (d & 127) << 7 | e;
}
b = b.readByte();
return(a & 127) << 22 | (d & 127) << 15 | (e & 127) << 8 | b;
}
function l(b, a) {
if (0 === (a & 4294967168)) {
b.writeByte(a & 127);
} else {
if (0 === (a & 4294950912)) {
b.writeByte(128 | a >> 7 & 127), b.writeByte(a & 127);
} else {
if (0 === (a & 4292870144)) {
b.writeByte(128 | a >> 14 & 127), b.writeByte(128 | a >> 7 & 127), b.writeByte(a & 127);
} else {
if (0 === (a & 3221225472)) {
b.writeByte(128 | a >> 22 & 127), b.writeByte(128 | a >> 15 & 127), b.writeByte(128 | a >> 8 & 127), b.writeByte(a & 255);
} else {
throw "AMF3 U29 range";
}
}
}
}
}
function e(b, a) {
var d = u(b);
if (1 === d) {
return "";
}
var e = a.stringsCache || (a.stringsCache = []);
if (0 === (d & 1)) {
return e[d >> 1];
}
for (var d = d >> 1, f = new Uint8Array(d), k = 0;k < d;k++) {
f[k] = b.readByte();
}
d = c.StringUtilities.utf8encode(f);
e.push(d);
return d;
}
function m(b, a, d) {
if ("" === a) {
b.writeByte(1);
} else {
d = d.stringsCache || (d.stringsCache = []);
var e = d.indexOf(a);
if (0 <= e) {
l(b, e << 1);
} else {
for (d.push(a), a = c.StringUtilities.utf8decode(a), l(b, 1 | a.length << 1), d = 0;d < a.length;d++) {
b.writeByte(a[d]);
}
}
}
}
function t(b, a) {
var f = b.readByte();
switch(f) {
case 1:
return null;
case 0:
break;
case 2:
return!1;
case 3:
return!0;
case 4:
return u(b);
case 5:
return p(b);
case 6:
return e(b, a);
case 8:
return new Date(p(b));
case 10:
var c = u(b);
if (0 === (c & 1)) {
return a.objectsCache[c >> 1];
}
if (0 !== (c & 4)) {
throw "AMF3 Traits-Ext is not supported";
}
var m, l;
if (0 === (c & 2)) {
m = a.traitsCache[c >> 2], l = m.class;
} else {
m = {};
f = e(b, a);
l = (m.className = f) && h.aliasesCache.names[f];
m.class = l;
m.isDynamic = 0 !== (c & 8);
m.members = [];
for (var n = l && l.instanceBindings.slots, f = 0, c = c >> 4;f < c;f++) {
for (var q = e(b, a), s = null, c = 1;n && c < n.length;c++) {
if (n[c].name.name === q) {
s = n[c];
break;
}
}
m.members.push(s ? k.getQualifiedName(s.name) : k.getPublicQualifiedName(q));
}
(a.traitsCache || (a.traitsCache = [])).push(m);
}
n = l ? d(l, []) : {};
(a.objectsCache || (a.objectsCache = [])).push(n);
for (f = 0;f < m.members.length;f++) {
l = t(b, a), n[m.members[f]] = l;
}
if (m.isDynamic) {
for (;;) {
f = e(b, a);
if (!f.length) {
break;
}
l = t(b, a);
n.asSetPublicProperty(f, l);
}
}
return n;
case 9:
c = u(b);
if (0 === (c & 1)) {
return a.objectsCache[c >> 1];
}
m = [];
(a.objectsCache || (a.objectsCache = [])).push(m);
for (n = c >> 1;;) {
f = e(b, a);
if (!f.length) {
break;
}
l = t(b, a);
m.asSetPublicProperty(f, l);
}
for (f = 0;f < n;f++) {
l = t(b, a), m.asSetPublicProperty(f, l);
}
return m;
default:
throw "AMF3 Unknown marker " + f;;
}
}
function q(b, a, d) {
d = d.objectsCache || (d.objectsCache = []);
var e = d.indexOf(a);
if (0 > e) {
return d.push(a), !1;
}
l(b, e << 1);
return!0;
}
function n(b, a, d) {
switch(typeof a) {
case "boolean":
b.writeByte(a ? 3 : 2);
break;
case "number":
a === (a | 0) ? (b.writeByte(4), l(b, a)) : (b.writeByte(5), v(b, a));
break;
case "undefined":
b.writeByte(0);
break;
case "string":
b.writeByte(6);
m(b, a, d);
break;
case "object":
if (null === a) {
b.writeByte(1);
} else {
if (Array.isArray(a)) {
b.writeByte(9);
if (q(b, a, d)) {
break;
}
for (var e = 0;e in a;) {
++e;
}
l(b, e << 1 | 1);
f(a, function(a, f) {
c.isNumeric(a) && 0 <= a && a < e || (m(b, a, d), n(b, f, d));
});
m(b, "", d);
for (var t = 0;t < e;t++) {
n(b, a[t], d);
}
} else {
if (a instanceof Date) {
b.writeByte(8);
if (q(b, a, d)) {
break;
}
l(b, 1);
v(b, a.valueOf());
} else {
b.writeByte(10);
if (q(b, a, d)) {
break;
}
var t = !0, s = a.class;
if (s) {
var t = !s.classInfo.instanceInfo.isSealed(), p = h.aliasesCache.classes.get(s) || "", u, K = d.traitsCache || (d.traitsCache = []), y = d.traitsInfos || (d.traitsInfos = []), D = K.indexOf(s);
if (0 > D) {
var L = s.instanceBindings.slots;
u = [];
for (var D = [], H = 1;H < L.length;H++) {
var J = L[H];
J.name.getNamespace().isPublic() && (u.push(k.getQualifiedName(J.name)), D.push(J.name.name));
}
K.push(s);
y.push(u);
s = D.length;
l(b, (t ? 11 : 3) + (s << 4));
m(b, p, d);
for (H = 0;H < s;H++) {
m(b, D[H], d);
}
} else {
u = y[D], s = u.length, l(b, 1 + (D << 2));
}
for (H = 0;H < s;H++) {
n(b, a[u[H]], d);
}
} else {
l(b, 11), m(b, "", d);
}
t && (f(a, function(a, e) {
m(b, a, d);
n(b, e, d);
}), m(b, "", d));
}
}
}
;
}
}
var k = c.AVM2.ABC.Multiname, f = c.AVM2.Runtime.forEachPublicProperty, d = c.AVM2.Runtime.construct;
(function(b) {
b[b.NUMBER = 0] = "NUMBER";
b[b.BOOLEAN = 1] = "BOOLEAN";
b[b.STRING = 2] = "STRING";
b[b.OBJECT = 3] = "OBJECT";
b[b.NULL = 5] = "NULL";
b[b.UNDEFINED = 6] = "UNDEFINED";
b[b.REFERENCE = 7] = "REFERENCE";
b[b.ECMA_ARRAY = 8] = "ECMA_ARRAY";
b[b.OBJECT_END = 9] = "OBJECT_END";
b[b.STRICT_ARRAY = 10] = "STRICT_ARRAY";
b[b.DATE = 11] = "DATE";
b[b.LONG_STRING = 12] = "LONG_STRING";
b[b.XML = 15] = "XML";
b[b.TYPED_OBJECT = 16] = "TYPED_OBJECT";
b[b.AVMPLUS = 17] = "AVMPLUS";
})(h.AMF0Marker || (h.AMF0Marker = {}));
var b = function() {
function b() {
}
b.write = function(b, d) {
switch(typeof d) {
case "boolean":
b.writeByte(1);
b.writeByte(d ? 1 : 0);
break;
case "number":
b.writeByte(0);
v(b, d);
break;
case "undefined":
b.writeByte(6);
break;
case "string":
b.writeByte(2);
a(b, d);
break;
case "object":
null === d ? b.writeByte(5) : (Array.isArray(d) ? (b.writeByte(8), b.writeByte(d.length >>> 24 & 255), b.writeByte(d.length >> 16 & 255), b.writeByte(d.length >> 8 & 255), b.writeByte(d.length & 255), f(d, function(d, g) {
a(b, d);
this.write(b, g);
}, this)) : (b.writeByte(3), f(d, function(d, g) {
a(b, d);
this.write(b, g);
}, this)), b.writeByte(0), b.writeByte(0), b.writeByte(9));
}
};
b.read = function(b) {
var a = b.readByte();
switch(a) {
case 0:
return p(b);
case 1:
return!!b.readByte();
case 2:
return s(b);
case 3:
for (var d = {};;) {
a = s(b);
if (!a.length) {
break;
}
var g = this.read(b);
d.asSetPublicProperty(a, g);
}
if (9 !== b.readByte()) {
throw "AMF0 End marker is not found";
}
return d;
case 5:
return null;
case 6:
break;
case 8:
d = [];
for (d.length = b.readByte() << 24 | b.readByte() << 16 | b.readByte() << 8 | b.readByte();;) {
a = s(b);
if (!a.length) {
break;
}
g = this.read(b);
d.asSetPublicProperty(a, g);
}
if (9 !== b.readByte()) {
throw "AMF0 End marker is not found";
}
return d;
case 10:
d = [];
d.length = b.readByte() << 24 | b.readByte() << 16 | b.readByte() << 8 | b.readByte();
for (a = 0;a < d.length;a++) {
d[a] = this.read(b);
}
return d;
case 17:
return t(b, {});
default:
throw "AMF0 Unknown marker " + a;;
}
};
return b;
}();
h.AMF0 = b;
(function(b) {
b[b.UNDEFINED = 0] = "UNDEFINED";
b[b.NULL = 1] = "NULL";
b[b.FALSE = 2] = "FALSE";
b[b.TRUE = 3] = "TRUE";
b[b.INTEGER = 4] = "INTEGER";
b[b.DOUBLE = 5] = "DOUBLE";
b[b.STRING = 6] = "STRING";
b[b.XML_DOC = 7] = "XML_DOC";
b[b.DATE = 8] = "DATE";
b[b.ARRAY = 9] = "ARRAY";
b[b.OBJECT = 10] = "OBJECT";
b[b.XML = 11] = "XML";
b[b.BYTEARRAY = 12] = "BYTEARRAY";
b[b.VECTOR_INT = 13] = "VECTOR_INT";
b[b.VECTOR_UINT = 14] = "VECTOR_UINT";
b[b.VECTOR_DOUBLE = 15] = "VECTOR_DOUBLE";
b[b.VECTOR_OBJECT = 16] = "VECTOR_OBJECT";
b[b.DICTIONARY = 17] = "DICTIONARY";
})(h.AMF3Marker || (h.AMF3Marker = {}));
h.aliasesCache = {classes:new WeakMap, names:Object.create(null)};
b = function() {
function b() {
}
b.write = function(b, a) {
n(b, a, {});
};
b.read = function(b) {
return t(b, {});
};
return b;
}();
h.AMF3 = b;
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
console.timeEnd("Load AVM2 Dependencies");
console.time("Load SWF Parser");
(function(c) {
(function(h) {
(function(a) {
function h(a, e, c) {
return v(a, e, c) << 32 - c >> 32 - c;
}
function v(a, e, c) {
for (var l = e.bitBuffer, k = e.bitLength;c > k;) {
l = l << 8 | a[e.pos++], k += 8;
}
k -= c;
a = l >>> k & u[c];
e.bitBuffer = l;
e.bitLength = k;
return a;
}
var p = Math.pow;
a.readSi8 = function(a, e) {
return e.getInt8(e.pos++);
};
a.readSi16 = function(a, e) {
return e.getInt16(e.pos, e.pos += 2);
};
a.readSi32 = function(a, e) {
return e.getInt32(e.pos, e.pos += 4);
};
a.readUi8 = function(a, e) {
return a[e.pos++];
};
a.readUi16 = function(a, e) {
return e.getUint16(e.pos, e.pos += 2);
};
a.readUi32 = function(a, e) {
return e.getUint32(e.pos, e.pos += 4);
};
a.readFixed = function(a, e) {
return e.getInt32(e.pos, e.pos += 4) / 65536;
};
a.readFixed8 = function(a, e) {
return e.getInt16(e.pos, e.pos += 2) / 256;
};
a.readFloat16 = function(a, e) {
var c = e.getUint16(e.pos);
e.pos += 2;
var l = c >> 15 ? -1 : 1, k = (c & 31744) >> 10, c = c & 1023;
return k ? 31 === k ? c ? NaN : Infinity * l : l * p(2, k - 15) * (1 + c / 1024) : l * p(2, -14) * (c / 1024);
};
a.readFloat = function(a, e) {
return e.getFloat32(e.pos, e.pos += 4);
};
a.readDouble = function(a, e) {
return e.getFloat64(e.pos, e.pos += 8);
};
a.readEncodedU32 = function(a, e) {
var c = a[e.pos++];
if (!(c & 128)) {
return c;
}
c = c & 127 | a[e.pos++] << 7;
if (!(c & 16384)) {
return c;
}
c = c & 16383 | a[e.pos++] << 14;
if (!(c & 2097152)) {
return c;
}
c = c & 2097151 | a[e.pos++] << 21;
return c & 268435456 ? c & 268435455 | a[e.pos++] << 28 : c;
};
a.readBool = function(a, e) {
return!!a[e.pos++];
};
a.align = function(a, e) {
e.align();
};
a.readSb = h;
for (var u = new Uint32Array(33), l = 1, e = 0;32 >= l;++l) {
u[l] = e = e << 1 | 1;
}
a.readUb = v;
a.readFb = function(a, e, c) {
return h(a, e, c) / 65536;
};
a.readString = function(a, e, l) {
var n = e.pos;
if (l) {
a = a.subarray(n, n += l);
} else {
l = 0;
for (var k = n;a[k];k++) {
l++;
}
a = a.subarray(n, n += l);
n++;
}
e.pos = n;
e = c.StringUtilities.utf8encode(a);
0 <= e.indexOf("\x00") && (e = e.split("\x00").join(""));
return e;
};
})(h.Parser || (h.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
function v(d, g, e, f, k) {
e || (e = {});
e.id = a.readUi16(d, g);
var c = e.lineBounds = {};
b(d, g, c, f, k);
if (c = e.isMorph = 46 === k || 84 === k) {
var m = e.lineBoundsMorph = {};
b(d, g, m, f, k);
}
if (m = e.canHaveStrokes = 83 === k || 84 === k) {
var l = e.fillBounds = {};
b(d, g, l, f, k);
c && (l = e.fillBoundsMorph = {}, b(d, g, l, f, k));
e.flags = a.readUi8(d, g);
}
if (c) {
e.offsetMorph = a.readUi32(d, g);
var r = e, n, w, l = B(d, g, r, f, k, c, m), q = l.lineBits, t = l.fillBits, h = r.records = [];
do {
var s = {}, l = A(d, g, s, f, k, c, t, q, m, w);
n = l.eos;
t = l.fillBits;
q = l.lineBits;
w = l.bits;
h.push(s);
} while (!n);
l = M(d, g);
t = l.fillBits;
q = l.lineBits;
r = r.recordsMorph = [];
do {
h = {}, l = A(d, g, h, f, k, c, t, q, m, w), n = l.eos, t = l.fillBits, q = l.lineBits, w = l.bits, r.push(h);
} while (!n);
} else {
t = e;
w = B(d, g, t, f, k, c, m);
l = w.fillBits;
q = w.lineBits;
r = t.records = [];
do {
h = {}, w = A(d, g, h, f, k, c, l, q, m, n), t = w.eos, l = w.fillBits, q = w.lineBits, n = w.bits, r.push(h);
} while (!t);
}
return e;
}
function p(b, d, g, e, f, k) {
var m;
g || (g = {});
if (4 === f) {
return g.symbolId = a.readUi16(b, d), g.depth = a.readUi16(b, d), g.flags |= 4, g.matrix = w(b, d), d.pos < k && (g.flags |= 8, e = g.cxform = {}, z(b, d, e, f)), g;
}
m = g.flags = 26 < f ? a.readUi16(b, d) : a.readUi8(b, d);
g.depth = a.readUi16(b, d);
m & 2048 && (g.className = a.readString(b, d, 0));
m & 2 && (g.symbolId = a.readUi16(b, d));
m & 4 && (g.matrix = w(b, d));
if (m & 8) {
var l = g.cxform = {};
z(b, d, l, f);
}
m & 16 && (g.ratio = a.readUi16(b, d));
m & 32 && (g.name = a.readString(b, d, 0));
m & 64 && (g.clipDepth = a.readUi16(b, d));
if (m & 256) {
for (l = a.readUi8(b, d), f = g.filters = [];l--;) {
var r = {};
K(b, d, r);
f.push(r);
}
}
m & 512 && (g.blendMode = a.readUi8(b, d));
m & 1024 && (g.bmpCache = a.readUi8(b, d));
m & 8192 && (g.visibility = a.readUi8(b, d));
m & 16384 && (f = g, l = a.readUi8(b, d) | a.readUi8(b, d) << 24 | a.readUi8(b, d) << 16 | a.readUi8(b, d) << 8, f.backgroundColor = l);
if (m & 128) {
a.readUi16(b, d);
6 <= e ? a.readUi32(b, d) : a.readUi16(b, d);
m = g.events = [];
do {
f = {};
var l = b, r = d, n = f, q = e, t = n.flags = 6 <= q ? a.readUi32(l, r) : a.readUi16(l, r);
t ? (6 === q && (t &= -262145), q = n.length = a.readUi32(l, r), t & 131072 && (n.keyCode = a.readUi8(l, r), q--), t = r.pos + q, n.actionsData = l.subarray(r.pos, t), r.pos = t, l = !1) : l = !0;
if (l) {
break;
}
if (d.pos > k) {
c.Debug.warning("PlaceObject handler attempted to read clip events beyond tag end");
d.pos = k;
break;
}
m.push(f);
} while (1);
}
return g;
}
function u(b, d, g, e, f) {
g || (g = {});
5 === f && (g.symbolId = a.readUi16(b, d));
g.depth = a.readUi16(b, d);
return g;
}
function l(b, d, g, e, f, k, c) {
e = g || {};
e.id = a.readUi16(b, d);
if (21 < f) {
var m = a.readUi32(b, d);
90 === f && (e.deblock = a.readFixed8(b, d));
m += d.pos;
g = e.imgData = b.subarray(d.pos, m);
e.alphaData = b.subarray(m, k);
} else {
g = e.imgData = b.subarray(d.pos, k);
}
d.pos = k;
switch(g[0] << 8 | g[1]) {
case 65496:
;
case 65497:
e.mimeType = "image/jpeg";
break;
case 35152:
e.mimeType = "image/png";
break;
case 18249:
e.mimeType = "image/gif";
break;
default:
e.mimeType = "application/octet-stream";
}
e.jpegTables = 6 === f ? c : null;
return e;
}
function e(b, d, g, e, f, k) {
var c;
g || (g = {});
g.id = a.readUi16(b, d);
if (7 == f) {
var m = g.characters = [];
do {
var l = {};
c = b;
var r = d, n = l, q = e, t = f, h = a.readUi8(c, r), s = n.eob = !h;
n.flags = 8 <= q ? (h >> 5 & 1 ? 512 : 0) | (h >> 4 & 1 ? 256 : 0) : 0;
n.stateHitTest = h >> 3 & 1;
n.stateDown = h >> 2 & 1;
n.stateOver = h >> 1 & 1;
n.stateUp = h & 1;
s || (n.symbolId = a.readUi16(c, r), n.depth = a.readUi16(c, r), n.matrix = w(c, r), 34 === t && (q = n.cxform = {}, z(c, r, q, t)), n.flags & 256 && (n.filterCount = a.readUi8(c, r), t = n.filters = {}, K(c, r, t)), n.flags & 512 && (n.blendMode = a.readUi8(c, r)));
c = s;
m.push(l);
} while (!c);
g.actionsData = b.subarray(d.pos, k);
d.pos = k;
} else {
m = a.readUi8(b, d);
g.trackAsMenu = m >> 7 & 1;
l = a.readUi16(b, d);
m = g.characters = [];
do {
r = {};
n = a.readUi8(b, d);
c = r.eob = !n;
r.flags = 8 <= e ? (n >> 5 & 1 ? 512 : 0) | (n >> 4 & 1 ? 256 : 0) : 0;
r.stateHitTest = n >> 3 & 1;
r.stateDown = n >> 2 & 1;
r.stateOver = n >> 1 & 1;
r.stateUp = n & 1;
if (!c) {
r.symbolId = a.readUi16(b, d);
r.depth = a.readUi16(b, d);
r.matrix = w(b, d);
34 === f && (n = r.cxform = {}, z(b, d, n, f));
if (r.flags & 256) {
for (s = a.readUi8(b, d), n = g.filters = [];s--;) {
t = {}, K(b, d, t), n.push(t);
}
}
r.flags & 512 && (r.blendMode = a.readUi8(b, d));
}
m.push(r);
} while (!c);
if (l) {
for (e = g.buttonActions = [];d.pos < k;) {
f = b;
m = d;
c = k;
l = m.pos;
c = (r = a.readUi16(f, m)) ? l + r : c;
r = a.readUi16(f, m);
m.pos = c;
if (d.pos > k) {
break;
}
e.push({keyCode:(r & 65024) >> 9, stateTransitionFlags:r & 511, actionsData:f.subarray(l + 4, c)});
}
d.pos = k;
}
}
return g;
}
function m(b, d, g, e, f) {
g || (g = {});
g.id = a.readUi16(b, d);
for (var k = a.readUi16(b, d), c = g.glyphCount = k / 2, m = [], l = c - 1;l--;) {
m.push(a.readUi16(b, d));
}
g.offsets = [k].concat(m);
for (k = g.glyphs = [];c--;) {
m = {}, y(b, d, m, e, f), k.push(m);
}
return g;
}
function t(d, e, f, k, c) {
var m;
f || (f = {});
f.id = a.readUi16(d, e);
var l = f.bbox = {};
b(d, e, l, k, c);
f.matrix = w(d, e);
k = f.glyphBits = a.readUi8(d, e);
var l = f.advanceBits = a.readUi8(d, e), n = f.records = [];
do {
var q = {};
m = d;
var t = e, h = q, s = c, z = k, p = l, A = void 0;
a.align(m, t);
var v = a.readUb(m, t, 8), u = h.eot = !v, A = m, B = t, M = h, N = v, v = M.hasFont = N >> 3 & 1, y = M.hasColor = N >> 2 & 1, K = M.hasMoveY = N >> 1 & 1, N = M.hasMoveX = N & 1;
v && (M.fontId = a.readUi16(A, B));
y && (M.color = 33 === s ? r(A, B) : g(A, B));
N && (M.moveX = a.readSi16(A, B));
K && (M.moveY = a.readSi16(A, B));
v && (M.fontHeight = a.readUi16(A, B));
if (!u) {
for (A = a.readUi8(m, t), A = h.glyphCount = A, h = h.entries = [];A--;) {
B = {}, M = m, s = t, v = B, y = p, v.glyphIndex = a.readUb(M, s, z), v.advance = a.readSb(M, s, y), h.push(B);
}
}
m = u;
n.push(q);
} while (!m);
return f;
}
function q(b, d, g, e, f) {
g || (g = {});
15 == f && (g.soundId = a.readUi16(b, d));
89 == f && (g.soundClassName = a.readString(b, d, 0));
e = g;
f = {};
a.readUb(b, d, 2);
f.stop = a.readUb(b, d, 1);
f.noMultiple = a.readUb(b, d, 1);
var k = f.hasEnvelope = a.readUb(b, d, 1), c = f.hasLoops = a.readUb(b, d, 1), m = f.hasOutPoint = a.readUb(b, d, 1);
if (f.hasInPoint = a.readUb(b, d, 1)) {
f.inPoint = a.readUi32(b, d);
}
m && (f.outPoint = a.readUi32(b, d));
c && (f.loopCount = a.readUi16(b, d));
if (k) {
for (c = f.envelopeCount = a.readUi8(b, d), k = f.envelopes = [];c--;) {
var m = {}, l = b, r = d, n = m;
n.pos44 = a.readUi32(l, r);
n.volumeLeft = a.readUi16(l, r);
n.volumeRight = a.readUi16(l, r);
k.push(m);
}
}
e.soundInfo = f;
return g;
}
function n(b, d, g, e, f, k) {
g = g || {};
g.id = a.readUi16(b, d);
e = g.format = a.readUi8(b, d);
g.width = a.readUi16(b, d);
g.height = a.readUi16(b, d);
g.hasAlpha = 36 === f;
3 === e && (g.colorTableSize = a.readUi8(b, d));
g.bmpData = b.subarray(d.pos, k);
d.pos = k;
return g;
}
function k(d, g, e, f, k) {
e || (e = {});
e.id = a.readUi16(d, g);
var c = a.readUi8(d, g), m = e.hasLayout = c & 128 ? 1 : 0;
e.shiftJis = 5 < f && c & 64 ? 1 : 0;
e.smallText = c & 32 ? 1 : 0;
e.ansi = c & 16 ? 1 : 0;
var l = e.wideOffset = c & 8 ? 1 : 0, r = e.wide = c & 4 ? 1 : 0;
e.italic = c & 2 ? 1 : 0;
e.bold = c & 1 ? 1 : 0;
5 < f ? e.language = a.readUi8(d, g) : (a.readUi8(d, g), e.language = 0);
c = a.readUi8(d, g);
e.name = a.readString(d, g, c);
75 === k && (e.resolution = 20);
c = e.glyphCount = a.readUi16(d, g);
if (0 === c) {
return e;
}
var n = g.pos;
if (l) {
for (var l = e.offsets = [], w = c;w--;) {
l.push(a.readUi32(d, g));
}
e.mapOffset = a.readUi32(d, g);
} else {
l = e.offsets = [];
for (w = c;w--;) {
l.push(a.readUi16(d, g));
}
e.mapOffset = a.readUi16(d, g);
}
l = e.glyphs = [];
for (w = c;w--;) {
var q = {};
1 === e.offsets[c - w] + n - g.pos ? (a.readUi8(d, g), l.push({records:[{type:0, eos:!0, hasNewStyles:0, hasLineStyle:0, hasFillStyle1:0, hasFillStyle0:0, move:0}]})) : (y(d, g, q, f, k), l.push(q));
}
if (r) {
for (n = e.codes = [], l = c;l--;) {
n.push(a.readUi16(d, g));
}
} else {
for (n = e.codes = [], l = c;l--;) {
n.push(a.readUi8(d, g));
}
}
if (m) {
e.ascent = a.readUi16(d, g);
e.descent = a.readUi16(d, g);
e.leading = a.readSi16(d, g);
m = e.advance = [];
for (n = c;n--;) {
m.push(a.readSi16(d, g));
}
for (m = e.bbox = [];c--;) {
n = {}, b(d, g, n, f, k), m.push(n);
}
k = a.readUi16(d, g);
for (f = e.kerning = [];k--;) {
c = {}, m = d, n = g, l = c, r ? (l.code1 = a.readUi16(m, n), l.code2 = a.readUi16(m, n)) : (l.code1 = a.readUi8(m, n), l.code2 = a.readUi8(m, n)), l.adjustment = a.readUi16(m, n), f.push(c);
}
}
return e;
}
function f(b, d, g, e, f, k) {
g || (g = {});
g.id = a.readUi16(b, d);
e = a.readUi8(b, d);
f = g.hasFontData = e & 4 ? 1 : 0;
g.italic = e & 2 ? 1 : 0;
g.bold = e & 1 ? 1 : 0;
g.name = a.readString(b, d, 0);
f && (g.data = b.subarray(d.pos, k), d.pos = k);
return g;
}
function d(b, d, g) {
g || (g = {});
for (var e = a.readEncodedU32(b, d), f = g.scenes = [];e--;) {
var k = {};
k.offset = a.readEncodedU32(b, d);
k.name = a.readString(b, d, 0);
f.push(k);
}
e = a.readEncodedU32(b, d);
for (f = g.labels = [];e--;) {
k = {}, k.frame = a.readEncodedU32(b, d), k.name = a.readString(b, d, 0), f.push(k);
}
return g;
}
function b(b, d, g, e, f) {
a.align(b, d);
var k = a.readUb(b, d, 5);
e = a.readSb(b, d, k);
f = a.readSb(b, d, k);
var c = a.readSb(b, d, k), k = a.readSb(b, d, k);
g.xMin = e;
g.xMax = f;
g.yMin = c;
g.yMax = k;
a.align(b, d);
}
function g(b, d) {
return(a.readUi8(b, d) << 24 | a.readUi8(b, d) << 16 | a.readUi8(b, d) << 8 | 255) >>> 0;
}
function r(b, d) {
return a.readUi8(b, d) << 24 | a.readUi8(b, d) << 16 | a.readUi8(b, d) << 8 | a.readUi8(b, d);
}
function w(b, d) {
var g = {};
a.align(b, d);
if (a.readUb(b, d, 1)) {
var e = a.readUb(b, d, 5);
g.a = a.readFb(b, d, e);
g.d = a.readFb(b, d, e);
} else {
g.a = 1, g.d = 1;
}
a.readUb(b, d, 1) ? (e = a.readUb(b, d, 5), g.b = a.readFb(b, d, e), g.c = a.readFb(b, d, e)) : (g.b = 0, g.c = 0);
var e = a.readUb(b, d, 5), f = a.readSb(b, d, e), e = a.readSb(b, d, e);
g.tx = f;
g.ty = e;
a.align(b, d);
return g;
}
function z(b, d, g, e) {
a.align(b, d);
var f = a.readUb(b, d, 1), k = a.readUb(b, d, 1), c = a.readUb(b, d, 4);
k ? (g.redMultiplier = a.readSb(b, d, c), g.greenMultiplier = a.readSb(b, d, c), g.blueMultiplier = a.readSb(b, d, c), g.alphaMultiplier = 4 < e ? a.readSb(b, d, c) : 256) : (g.redMultiplier = 256, g.greenMultiplier = 256, g.blueMultiplier = 256, g.alphaMultiplier = 256);
f ? (g.redOffset = a.readSb(b, d, c), g.greenOffset = a.readSb(b, d, c), g.blueOffset = a.readSb(b, d, c), g.alphaOffset = 4 < e ? a.readSb(b, d, c) : 0) : (g.redOffset = 0, g.greenOffset = 0, g.blueOffset = 0, g.alphaOffset = 0);
a.align(b, d);
}
function A(b, d, g, e, f, k, c, m, l, r) {
var n, w = g.type = a.readUb(b, d, 1), q = a.readUb(b, d, 5);
n = g.eos = !(w || q);
if (w) {
e = (q & 15) + 2, (g.isStraight = q >> 4) ? (g.isGeneral = a.readUb(b, d, 1)) ? (g.deltaX = a.readSb(b, d, e), g.deltaY = a.readSb(b, d, e)) : (g.isVertical = a.readUb(b, d, 1)) ? g.deltaY = a.readSb(b, d, e) : g.deltaX = a.readSb(b, d, e) : (g.controlDeltaX = a.readSb(b, d, e), g.controlDeltaY = a.readSb(b, d, e), g.anchorDeltaX = a.readSb(b, d, e), g.anchorDeltaY = a.readSb(b, d, e)), b = e;
} else {
var t = g.hasNewStyles = 2 < f ? q >> 4 : 0, h = g.hasLineStyle = q >> 3 & 1, s = g.hasFillStyle1 = q >> 2 & 1, z = g.hasFillStyle0 = q >> 1 & 1;
if (g.move = q & 1) {
r = a.readUb(b, d, 5), g.moveX = a.readSb(b, d, r), g.moveY = a.readSb(b, d, r);
}
z && (g.fillStyle0 = a.readUb(b, d, c));
s && (g.fillStyle1 = a.readUb(b, d, c));
h && (g.lineStyle = a.readUb(b, d, m));
t && (b = B(b, d, g, e, f, k, l), m = b.lineBits, c = b.fillBits);
b = r;
}
return{type:w, flags:q, eos:n, fillBits:c, lineBits:m, bits:b};
}
function B(b, d, e, f, k, c, m) {
var l, n = a.readUi8(b, d);
l = 2 < k && 255 === n ? a.readUi16(b, d) : n;
for (n = e.fillStyles = [];l--;) {
var w = {};
N(b, d, w, f, k, c);
n.push(w);
}
n = a.readUi8(b, d);
n = 2 < k && 255 === n ? a.readUi16(b, d) : n;
for (e = e.lineStyles = [];n--;) {
l = {};
var w = b, q = d, t = l, h = f, s = k, z = c, p = m;
t.width = a.readUi16(w, q);
z && (t.widthMorph = a.readUi16(w, q));
if (p) {
a.align(w, q);
t.startCapsStyle = a.readUb(w, q, 2);
var p = t.jointStyle = a.readUb(w, q, 2), A = t.hasFill = a.readUb(w, q, 1);
t.noHscale = a.readUb(w, q, 1);
t.noVscale = a.readUb(w, q, 1);
t.pixelHinting = a.readUb(w, q, 1);
a.readUb(w, q, 5);
t.noClose = a.readUb(w, q, 1);
t.endCapsStyle = a.readUb(w, q, 2);
2 === p && (t.miterLimitFactor = a.readFixed8(w, q));
A ? (t = t.fillStyle = {}, N(w, q, t, h, s, z)) : (t.color = r(w, q), z && (t.colorMorph = r(w, q)));
} else {
t.color = 22 < s ? r(w, q) : g(w, q), z && (t.colorMorph = r(w, q));
}
e.push(l);
}
b = M(b, d);
return{fillBits:b.fillBits, lineBits:b.lineBits};
}
function M(b, d) {
a.align(b, d);
var g = a.readUb(b, d, 4), e = a.readUb(b, d, 4);
return{fillBits:g, lineBits:e};
}
function N(b, d, e, f, k, c) {
f = e.type = a.readUi8(b, d);
switch(f) {
case 0:
e.color = 22 < k || c ? r(b, d) : g(b, d);
c && (e.colorMorph = r(b, d));
break;
case 16:
;
case 18:
;
case 19:
e.matrix = w(b, d);
c && (e.matrixMorph = w(b, d));
83 === k ? (e.spreadMode = a.readUb(b, d, 2), e.interpolationMode = a.readUb(b, d, 2)) : a.readUb(b, d, 4);
for (var m = e.count = a.readUb(b, d, 4), l = e.records = [];m--;) {
var n = {}, q = b, t = d, h = n, s = k, z = c;
h.ratio = a.readUi8(q, t);
h.color = 22 < s ? r(q, t) : g(q, t);
z && (h.ratioMorph = a.readUi8(q, t), h.colorMorph = r(q, t));
l.push(n);
}
19 === f && (e.focalPoint = a.readSi16(b, d), c && (e.focalPointMorph = a.readSi16(b, d)));
break;
case 64:
;
case 65:
;
case 66:
;
case 67:
e.bitmapId = a.readUi16(b, d), e.condition = 64 === f || 67 === f, e.matrix = w(b, d), c && (e.matrixMorph = w(b, d));
}
}
function K(b, d, g) {
var e = g.type = a.readUi8(b, d);
switch(e) {
case 0:
;
case 2:
;
case 3:
;
case 4:
;
case 7:
var f;
f = 4 === e || 7 === e ? a.readUi8(b, d) : 1;
for (var k = g.colors = [], c = f;c--;) {
k.push(r(b, d));
}
3 === e && (g.hightlightColor = r(b, d));
if (4 === e || 7 === e) {
for (k = g.ratios = [];f--;) {
k.push(a.readUi8(b, d));
}
}
g.blurX = a.readFixed(b, d);
g.blurY = a.readFixed(b, d);
2 !== e && (g.angle = a.readFixed(b, d), g.distance = a.readFixed(b, d));
g.strength = a.readFixed8(b, d);
g.inner = a.readUb(b, d, 1);
g.knockout = a.readUb(b, d, 1);
g.compositeSource = a.readUb(b, d, 1);
3 === e || 4 === e || 7 === e ? (g.onTop = a.readUb(b, d, 1), g.quality = a.readUb(b, d, 4)) : g.quality = a.readUb(b, d, 5);
break;
case 1:
g.blurX = a.readFixed(b, d);
g.blurY = a.readFixed(b, d);
g.quality = a.readUb(b, d, 5);
a.readUb(b, d, 3);
break;
case 5:
f = g.matrixX = a.readUi8(b, d);
k = g.matrixY = a.readUi8(b, d);
g.divisor = a.readFloat(b, d);
g.bias = a.readFloat(b, d);
e = g.matrix = [];
for (f *= k;f--;) {
e.push(a.readFloat(b, d));
}
g.color = r(b, d);
a.readUb(b, d, 6);
g.clamp = a.readUb(b, d, 1);
g.preserveAlpha = a.readUb(b, d, 1);
break;
case 6:
for (g = g.matrix = [], e = 20;e--;) {
g.push(a.readFloat(b, d));
}
;
}
}
function y(b, a, d, g, e) {
var f, k;
k = M(b, a);
var c = k.fillBits, m = k.lineBits, l = d.records = [];
do {
var r = {};
k = A(b, a, r, g, e, !1, c, m, !1, f);
d = k.eos;
c = k.fillBits;
m = k.lineBits;
f = k.bits;
l.push(r);
} while (!d);
}
h.defineImage = l;
h.defineFont = m;
h.soundStreamHead = function(b, d) {
var g = {}, e = a.readUi8(b, d);
g.playbackRate = e >> 2 & 3;
g.playbackSize = e >> 1 & 1;
g.playbackType = e & 1;
var e = a.readUi8(b, d), f = g.streamCompression = e >> 4 & 15;
g.streamRate = e >> 2 & 3;
g.streamSize = e >> 1 & 1;
g.streamType = e & 1;
g.samplesCount = a.readUi16(b, d);
2 == f && (g.latencySeek = a.readSi16(b, d));
return g;
};
h.defineBitmap = n;
h.defineFont2 = k;
h.defineFont4 = f;
h.defineScene = d;
h.rgb = g;
h.tagHandlers = {0:void 0, 1:void 0, 2:v, 4:p, 5:u, 6:l, 7:e, 8:void 0, 9:void 0, 10:m, 11:t, 12:void 0, 13:void 0, 14:function(b, d, g, e, f, k) {
g || (g = {});
g.id = a.readUi16(b, d);
e = a.readUi8(b, d);
g.soundFormat = e >> 4 & 15;
g.soundRate = e >> 2 & 3;
g.soundSize = e >> 1 & 1;
g.soundType = e & 1;
g.samplesCount = a.readUi32(b, d);
g.soundData = b.subarray(d.pos, k);
d.pos = k;
return g;
}, 15:q, 17:void 0, 18:void 0, 19:void 0, 20:n, 21:l, 22:v, 23:void 0, 24:void 0, 26:p, 28:u, 32:v, 33:t, 34:e, 35:l, 36:n, 37:function(d, g, e, f, k) {
e || (e = {});
e.id = a.readUi16(d, g);
var c = e.bbox = {};
b(d, g, c, f, k);
f = a.readUi16(d, g);
k = e.hasText = f >> 7 & 1;
e.wordWrap = f >> 6 & 1;
e.multiline = f >> 5 & 1;
e.password = f >> 4 & 1;
e.readonly = f >> 3 & 1;
var c = e.hasColor = f >> 2 & 1, m = e.hasMaxLength = f >> 1 & 1, l = e.hasFont = f & 1, n = e.hasFontClass = f >> 15 & 1;
e.autoSize = f >> 14 & 1;
var w = e.hasLayout = f >> 13 & 1;
e.noSelect = f >> 12 & 1;
e.border = f >> 11 & 1;
e.wasStatic = f >> 10 & 1;
e.html = f >> 9 & 1;
e.useOutlines = f >> 8 & 1;
l && (e.fontId = a.readUi16(d, g));
n && (e.fontClass = a.readString(d, g, 0));
l && (e.fontHeight = a.readUi16(d, g));
c && (e.color = r(d, g));
m && (e.maxLength = a.readUi16(d, g));
w && (e.align = a.readUi8(d, g), e.leftMargin = a.readUi16(d, g), e.rightMargin = a.readUi16(d, g), e.indent = a.readSi16(d, g), e.leading = a.readSi16(d, g));
e.variableName = a.readString(d, g, 0);
k && (e.initialText = a.readString(d, g, 0));
return e;
}, 39:void 0, 43:void 0, 45:void 0, 46:v, 48:k, 56:void 0, 57:void 0, 58:void 0, 59:void 0, 60:void 0, 61:void 0, 62:void 0, 64:void 0, 65:void 0, 66:void 0, 69:void 0, 70:p, 71:void 0, 72:void 0, 73:void 0, 74:void 0, 75:k, 76:void 0, 77:void 0, 78:function(d, g, e, f, k) {
e || (e = {});
e.symbolId = a.readUi16(d, g);
var c = e.splitter = {};
b(d, g, c, f, k);
return e;
}, 82:void 0, 83:v, 84:v, 86:d, 87:function(b, d, g, e, f, k) {
g || (g = {});
g.id = a.readUi16(b, d);
a.readUi32(b, d);
g.data = b.subarray(d.pos, k);
d.pos = k;
return g;
}, 88:void 0, 89:q, 90:l, 91:f};
h.readHeader = function(b, d) {
var g = a.readUb(b, d, 5), e = a.readSb(b, d, g), f = a.readSb(b, d, g), k = a.readSb(b, d, g), g = a.readSb(b, d, g);
a.align(b, d);
var m = a.readUi8(b, d), m = a.readUi8(b, d) + m / 256, l = a.readUi16(b, d);
return{frameRate:m, frameCount:l, bounds:new c.Bounds(e, k, f, g)};
};
})(a.LowLevel || (a.LowLevel = {}));
})(h.Parser || (h.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.assert, v = c.Debug.assertUnreachable, p = c.IntegerUtilities.roundToMultipleOfFour, u = c.ArrayUtilities.Inflate;
(function(a) {
a[a.FORMAT_COLORMAPPED = 3] = "FORMAT_COLORMAPPED";
a[a.FORMAT_15BPP = 4] = "FORMAT_15BPP";
a[a.FORMAT_24BPP = 5] = "FORMAT_24BPP";
})(a.BitmapFormat || (a.BitmapFormat = {}));
a.defineBitmap = function(a) {
h.enterTimeline("defineBitmap");
var e, m = 0;
switch(a.format) {
case 3:
e = a.width;
var m = a.height, t = a.hasAlpha, q = p(e) - e, n = t ? 4 : 3, k = p((a.colorTableSize + 1) * n), f = k + (e + q) * m, d = u.inflate(a.bmpData, f, !0), b = new Uint32Array(e * m), g = 0, r = 0;
if (t) {
for (t = 0;t < m;t++) {
for (var w = 0;w < e;w++) {
var r = d[k++] << 2, z = d[r + 3], A = d[r + 0], B = d[r + 1], r = d[r + 2];
b[g++] = r << 24 | B << 16 | A << 8 | z;
}
k += q;
}
} else {
for (t = 0;t < m;t++) {
for (w = 0;w < e;w++) {
r = d[k++] * n, z = 255, A = d[r + 0], B = d[r + 1], r = d[r + 2], b[g++] = r << 24 | B << 16 | A << 8 | z;
}
k += q;
}
}
s(k === f, "We should be at the end of the data buffer now.");
s(g === e * m, "Should have filled the entire image.");
e = new Uint8Array(b.buffer);
m = 1;
break;
case 5:
n = a.width;
f = a.height;
q = a.hasAlpha;
e = f * n * 4;
m = u.inflate(a.bmpData, e, !0);
if (q) {
e = m;
} else {
q = new Uint32Array(n * f);
n *= f;
for (d = f = 0;d < n;d++) {
f++, b = m[f++], k = m[f++], g = m[f++], q[d] = g << 24 | k << 16 | b << 8 | 255;
}
s(f === e, "We should be at the end of the data buffer now.");
e = new Uint8Array(q.buffer);
}
m = 1;
break;
case 4:
c.Debug.notImplemented("parse15BPP");
e = null;
m = 1;
break;
default:
v("invalid bitmap format");
}
h.leaveTimeline();
return{definition:{type:"image", id:a.id, width:a.width, height:a.height, mimeType:"application/octet-stream", data:e, dataType:m, image:null}, type:"image"};
};
})(h.Parser || (h.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
a.defineButton = function(a, h) {
for (var p = a.characters, u = {up:[], over:[], down:[], hitTest:[]}, l = 0, e;(e = p[l++]) && !e.eob;) {
var m = h[e.symbolId];
m || c.Debug.warning("undefined character in button " + a.id);
m = {symbolId:m.id, code:4, depth:e.depth, flags:e.matrix ? 4 : 0, matrix:e.matrix};
e.stateUp && u.up.push(m);
e.stateOver && u.over.push(m);
e.stateDown && u.down.push(m);
e.stateHitTest && u.hitTest.push(m);
}
return{type:"button", id:a.id, buttonActions:a.buttonActions, states:u};
};
})(h.Parser || (h.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
function c(a) {
for (var e = 0;2 <= a;) {
a /= 2, ++e;
}
return l(2, e);
}
function h(a) {
return q(a >> 8 & 255, a & 255);
}
function p(a) {
return h(a >> 16) + h(a);
}
function u(a) {
for (var e = 0, f = 0, d = 0, b = 0, g = 0;g < a.length;g++) {
var c = a[g];
if (c) {
for (var c = c.records, m, l = 0, q = 0, t = 0;t < c.length;t++) {
m = c[t];
if (m.type) {
m.isStraight ? (l += m.deltaX || 0, q += -(m.deltaY || 0)) : (l += m.controlDeltaX, q += -m.controlDeltaY, l += m.anchorDeltaX, q += -m.anchorDeltaY);
} else {
if (m.eos) {
break;
}
m.move && (l = m.moveX, q = -m.moveY);
}
e > l && (e = l);
f > q && (f = q);
d < l && (d = l);
b < q && (b = q);
}
}
}
return 5E3 < Math.max(d - e, b - f);
}
var l = Math.pow, e = Math.min, m = Math.max, t = Math.log, q = String.fromCharCode;
a.defineFont = function(a) {
var k = "swf-font-" + a.id, f = a.name || k, d = {type:"font", id:a.id, name:f, bold:1 === a.bold, italic:1 === a.italic, codes:null, metrics:null, data:a.data, originalSize:!1}, b = a.glyphs, g = b ? a.glyphCount = b.length : 0;
if (!g) {
return d;
}
var l = {}, w = [], q = {}, A = [], B, M = !("advance" in a), N = 48 === a.code, K = 75 === a.code;
M && (a.advance = []);
B = Math.max.apply(null, a.codes) || 35;
if (a.codes) {
for (var y = 0;y < a.codes.length;y++) {
var D = a.codes[y];
if (32 > D || -1 < w.indexOf(D)) {
B++, 8232 == B && (B = 8240), D = B;
}
w.push(D);
q[D] = y;
}
B = w.concat();
w.sort(function(b, a) {
return b - a;
});
for (var y = 0, L;void 0 !== (D = w[y++]);) {
var H = D, J = H;
for (L = [y - 1];void 0 !== (D = w[y]) && J + 1 === D;) {
++J, L.push(y), ++y;
}
A.push([H, J, L]);
}
} else {
L = [];
for (y = 0;y < g;y++) {
D = 57344 + y, w.push(D), q[D] = y, L.push(y);
}
A.push([57344, 57344 + g - 1, L]);
B = w.concat();
}
var C = a.resolution || 1;
N && u(b) && (C = 20, d.originalSize = !0);
N = Math.ceil(a.ascent / C) || 1024;
L = -Math.ceil(a.descent / C) || 0;
for (var E = a.leading / C || 0, F = l["OS/2"] = "", I = "", G = "", Z = "", y = 0, Q;Q = A[y++];) {
H = Q[0], J = Q[1], D = Q[2][0], F += h(H), I += h(J), G += h(D - H + 1 & 65535), Z += h(0);
}
I += "\u00ff\u00ff";
F += "\u00ff\u00ff";
G += "\x00\u0001";
Z += "\x00\x00";
A = A.length + 1;
y = 2 * c(A);
H = 2 * A - y;
y = "\x00\x00" + h(2 * A) + h(y) + h(t(A) / t(2)) + h(H) + I + "\x00\x00" + F + G + Z;
l.cmap = "\x00\x00\x00\u0001\x00\u0003\x00\u0001\x00\x00\x00\f\x00\u0004" + h(y.length + 4) + y;
var S = "\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x001\x00", F = "\x00\x00", A = 16, I = 0, Z = [], H = [], J = [];
Q = [];
for (var y = G = 0, O = {};void 0 !== (D = w[y++]);) {
for (var P = b[q[D]], V = P.records, $ = 0, W = 0, x = "", ea = "", Y = 0, R = [], Y = -1, P = 0;P < V.length;P++) {
x = V[P];
if (x.type) {
0 > Y && (Y = 0, R[Y] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0});
if (x.isStraight) {
R[Y].commands.push(2);
var U = (x.deltaX || 0) / C, ba = -(x.deltaY || 0) / C;
} else {
R[Y].commands.push(3), U = x.controlDeltaX / C, ba = -x.controlDeltaY / C, $ += U, W += ba, R[Y].data.push($, W), U = x.anchorDeltaX / C, ba = -x.anchorDeltaY / C;
}
$ += U;
W += ba;
R[Y].data.push($, W);
} else {
if (x.eos) {
break;
}
if (x.move) {
Y++;
R[Y] = {data:[], commands:[], xMin:0, xMax:0, yMin:0, yMax:0};
R[Y].commands.push(1);
var X = x.moveX / C, x = -x.moveY / C, U = X - $, ba = x - W, $ = X, W = x;
R[Y].data.push($, W);
}
}
-1 < Y && (R[Y].xMin > $ && (R[Y].xMin = $), R[Y].yMin > W && (R[Y].yMin = W), R[Y].xMax < $ && (R[Y].xMax = $), R[Y].yMax < W && (R[Y].yMax = W));
}
K || R.sort(function(b, a) {
return(a.xMax - a.xMin) * (a.yMax - a.yMin) - (b.xMax - b.xMin) * (b.yMax - b.yMin);
});
O[D] = R;
}
for (y = 0;void 0 !== (D = w[y++]);) {
for (var P = b[q[D]], V = P.records, R = O[D], ga = 1, Y = 0, U = W = x = $ = "", D = W = $ = 0, V = -1024, X = 0, ja = -1024, ea = x = "", Y = 0, Y = -1, aa = [], ia = [], P = 0;P < R.length;P++) {
aa = aa.concat(R[P].data), ia = ia.concat(R[P].commands);
}
for (var T = W = $ = 0, da = 0, fa = "", R = "", la = 0, Y = 0, ga = 1, ea = "", P = 0;P < ia.length;P++) {
U = ia[P], 1 === U ? (Y && (++ga, ea += h(Y - 1)), T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\u0001", fa += h(U), R += h(ba), $ = T, W = da) : 2 === U ? (T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\u0001", fa += h(U), R += h(ba), $ = T, W = da) : 3 === U && (T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\x00", fa += h(U), R += h(ba), $ = T, W = da, Y++, T = aa[la++], da = aa[la++], U = T - $, ba = da - W, x += "\u0001", fa += h(U), R += h(ba),
$ = T, W = da), Y++, Y > I && (I = Y), D > $ && (D = $), X > W && (X = W), V < $ && (V = $), ja < W && (ja = W);
}
$ = ea += h((Y || 1) - 1);
W = fa;
U = R;
P || (D = V = X = ja = 0, x += "1");
P = h(ga) + h(D) + h(X) + h(V) + h(ja) + $ + "\x00\x00" + x + W + U;
P.length & 1 && (P += "\x00");
S += P;
F += h(A / 2);
A += P.length;
Z.push(D);
H.push(V);
J.push(X);
Q.push(ja);
ga > G && (G = ga);
Y > I && (I = Y);
M && a.advance.push((V - D) * C * 1.3);
}
F += h(A / 2);
l.glyf = S;
K || (y = Math.min.apply(null, J), 0 > y && (L = L || y));
l["OS/2"] = "\x00\u0001\x00\x00" + h(a.bold ? 700 : 400) + "\x00\u0005\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ALF " + h((a.italic ? 1 : 0) | (a.bold ? 32 : 0)) + h(w[0]) + h(w[w.length - 1]) + h(N) + h(L) + h(E) + h(N) + h(-L) + "\x00\x00\x00\x00\x00\x00\x00\x00";
l.head = "\x00\u0001\x00\x00\x00\u0001\x00\x00\x00\x00\x00\x00_\u000f<\u00f5\x00\x0B\u0004\x00\x00\x00\x00\x00" + p(Date.now()) + "\x00\x00\x00\x00" + p(Date.now()) + h(e.apply(null, Z)) + h(e.apply(null, J)) + h(m.apply(null, H)) + h(m.apply(null, Q)) + h((a.italic ? 2 : 0) | (a.bold ? 1 : 0)) + "\x00\b\x00\u0002\x00\x00\x00\x00";
w = a.advance;
l.hhea = "\x00\u0001\x00\x00" + h(N) + h(L) + h(E) + h(w ? m.apply(null, w) : 1024) + "\x00\x00\x00\x00\u0003\u00b8\x00\u0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" + h(g + 1);
b = "\x00\x00\x00\x00";
for (y = 0;y < g;++y) {
b += h(w ? w[y] / C : 1024) + "\x00\x00";
}
l.hmtx = b;
if (a.kerning) {
w = a.kerning;
C = w.length;
y = 2 * c(C);
C = "\x00\x00\x00\u0001\x00\x00" + h(14 + 6 * C) + "\x00\u0001" + h(C) + h(y) + h(t(C) / t(2)) + h(2 * C - y);
for (y = 0;x = w[y++];) {
C += h(q[x.code1]) + h(q[x.code2]) + h(x.adjustment);
}
l.kern = C;
}
l.loca = F;
l.maxp = "\x00\u0001\x00\x00" + h(g + 1) + h(I) + h(G) + "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
y = f.replace(/ /g, "");
k = [a.copyright || "Original licence", f, "Unknown", k, f, "1.0", y, "Unknown", "Unknown", "Unknown"];
y = k.length;
a = "\x00\x00" + h(y) + h(12 * y + 6);
for (y = A = 0;f = k[y++];) {
a += "\x00\u0001\x00\x00\x00\x00" + h(y - 1) + h(f.length) + h(A), A += f.length;
}
l.name = a + k.join("");
l.post = "\x00\u0003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
k = Object.keys(l);
y = k.length;
f = "\x00\u0001\x00\x00" + h(y) + "\x00\u0080\x00\u0003\x00 ";
g = "";
A = 16 * y + f.length;
for (y = 0;a = k[y++];) {
q = l[a];
w = q.length;
for (f += a + "\x00\x00\x00\x00" + p(A) + p(w);w & 3;) {
q += "\x00", ++w;
}
for (g += q;A & 3;) {
++A;
}
A += w;
}
l = f + g;
N = {ascent:N / 1024, descent:-L / 1024, leading:E / 1024};
L = new Uint8Array(l.length);
for (y = 0;y < l.length;y++) {
L[y] = l.charCodeAt(y) & 255;
}
d.codes = B;
d.metrics = N;
d.data = L;
return d;
};
})(c.Parser || (c.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(a, e) {
return a[e] << 8 | a[e + 1];
}
function v(a, e, l) {
var n = 0, k = e.length, f;
do {
for (var d = n;n < k && 255 !== e[n];) {
++n;
}
for (;n < k && 255 === e[n];) {
++n;
}
f = e[n++];
if (218 === f) {
n = k;
} else {
if (217 === f) {
n += 2;
continue;
} else {
if (208 > f || 216 < f) {
var b = s(e, n);
192 <= f && 195 >= f && (a.height = s(e, n + 3), a.width = s(e, n + 5));
n += b;
}
}
}
l.push(e.subarray(d, n));
} while (n < k);
a.width && a.height || c.Debug.warning("bad jpeg image");
return l;
}
function p(a, e) {
if (73 === e[12] && 72 === e[13] && 68 === e[14] && 82 === e[15]) {
a.width = e[16] << 24 | e[17] << 16 | e[18] << 8 | e[19];
a.height = e[20] << 24 | e[21] << 16 | e[22] << 8 | e[23];
var c = e[26];
a.hasAlpha = 4 === c || 6 === c;
}
}
function u(a) {
for (var e = 0, c = 0;c < a.length;c++) {
e += a[c].length;
}
for (var e = new Uint8Array(e), l = 0, c = 0;c < a.length;c++) {
var k = a[c];
e.set(k, l);
l += k.length;
}
return e;
}
var l = c.Debug.assert, e = c.ArrayUtilities.Inflate;
a.parseJpegChunks = v;
a.parsePngHeaders = p;
a.defineImage = function(a) {
h.enterTimeline("defineImage");
var t = {type:"image", id:a.id, mimeType:a.mimeType}, q = a.imgData;
if ("image/jpeg" === a.mimeType) {
var n = a.alphaData;
if (n) {
a = new c.JPEG.JpegImage;
a.parse(u(v(t, q, [])));
l(t.width === a.width);
l(t.height === a.height);
var q = t.width * t.height, n = e.inflate(n, q, !0), k = t.data = new Uint8ClampedArray(4 * q);
a.copyToImageData(t);
a = 0;
for (var f = 3;a < q;a++, f += 4) {
k[f] = n[a];
}
t.mimeType = "application/octet-stream";
t.dataType = 3;
} else {
n = [], a.jpegTables && n.push(a.jpegTables), v(t, q, n), a.jpegTables && 0 < a.jpegTables.byteLength && (n[1] = n[1].subarray(2)), t.data = u(n), t.dataType = 4;
}
} else {
p(t, q), t.data = q, t.dataType = 5;
}
h.leaveTimeline();
return t;
};
})(h.Parser || (h.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
a.defineLabel = function(a) {
return{type:"label", id:a.id, fillBounds:a.bbox, matrix:a.matrix, tag:{hasText:!0, initialText:"", html:!0, readonly:!0}, records:a.records, coords:null, static:!0, require:null};
};
})(c.Parser || (c.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function h(b, a, d, g) {
if (b) {
if (a.fill0) {
if (g = g[a.fill0 - 1], a.fill1 || a.line) {
g.addSegment(b.toReversed());
} else {
b.isReversed = !0;
return;
}
}
a.line && a.fill1 && (g = d[a.line - 1], g.addSegment(b.clone()));
}
}
function v(b, a, d, e) {
d && (b.morph = p(b, a, e));
if (a) {
b.miterLimit = 2 * (b.miterLimitFactor || 1.5);
if (!b.color && b.hasFill) {
var f = v(b.fillStyle, !1, !1, e);
b.type = f.type;
b.transform = f.transform;
b.colors = f.colors;
b.ratios = f.ratios;
b.focalPoint = f.focalPoint;
b.bitmapId = f.bitmapId;
b.bitmapIndex = f.bitmapIndex;
b.repeat = f.repeat;
b.fillStyle = null;
} else {
b.type = 0;
}
return b;
}
if (void 0 === b.type || 0 === b.type) {
return b;
}
switch(b.type) {
case 16:
;
case 18:
;
case 19:
f = b.records;
a = b.colors = [];
d = b.ratios = [];
for (e = 0;e < f.length;e++) {
var k = f[e];
a.push(k.color);
d.push(k.ratio);
}
f = 819.2;
break;
case 64:
;
case 65:
;
case 66:
;
case 67:
b.smooth = 66 !== b.type && 67 !== b.type;
b.repeat = 65 !== b.type && 67 !== b.type;
b.bitmapIndex = e.length;
e.push(b.bitmapId);
f = .05;
break;
default:
c.Debug.warning("shape parser encountered invalid fill style " + b.type);
}
if (!b.matrix) {
return b.transform = g, b;
}
a = b.matrix;
b.transform = {a:a.a * f, b:a.b * f, c:a.c * f, d:a.d * f, tx:a.tx / 20, ty:a.ty / 20};
b.matrix = null;
return b;
}
function p(b, a, d) {
var e = Object.create(b);
if (a) {
return e.width = b.widthMorph, !b.color && b.hasFill ? (b = p(b.fillStyle, !1, d), e.transform = b.transform, e.colors = b.colors, e.ratios = b.ratios) : e.color = b.colorMorph, e;
}
if (void 0 === b.type) {
return e;
}
if (0 === b.type) {
return e.color = b.colorMorph, e;
}
var k;
switch(b.type) {
case 16:
;
case 18:
;
case 19:
k = b.records;
a = e.colors = [];
d = e.ratios = [];
for (var c = 0;c < k.length;c++) {
var m = k[c];
a.push(m.colorMorph);
d.push(m.ratioMorph);
}
k = 819.2;
break;
case 64:
;
case 65:
;
case 66:
;
case 67:
k = .05;
break;
default:
f("shape parser encountered invalid fill style");
}
if (!b.matrix) {
return e.transform = g, e;
}
b = b.matrixMorph;
e.transform = {a:b.a * k, b:b.b * k, c:b.c * k, d:b.d * k, tx:b.tx / 20, ty:b.ty / 20};
return e;
}
function u(b, a, d, g) {
for (var e = [], f = 0;f < b.length;f++) {
var k = v(b[f], a, d, g);
e[f] = a ? new w(null, k) : new w(k, null);
}
return e;
}
function l(b, a) {
var d = b.noHscale ? b.noVscale ? 0 : 2 : b.noVscale ? 3 : 1, g = n(b.width, 0, 5100) | 0;
a.lineStyle(g, b.color, b.pixelHinting, d, b.endCapsStyle, b.jointStyle, b.miterLimit);
}
function e(b, a) {
var d = n(b.width, 0, 5100) | 0;
a.writeMorphLineStyle(d, b.color);
}
function m(b, a, d) {
d.beginGradient(b, a.colors, a.ratios, 16 === a.type ? 16 : 18, a.transform, a.spreadMethod, a.interpolationMode, a.focalPoint / 2 | 0);
}
var t = c.ArrayUtilities.DataBuffer, q = c.ShapeData, n = c.NumberUtilities.clamp, k = c.Debug.assert, f = c.Debug.assertUnreachable, d = Array.prototype.push, b;
(function(b) {
b[b.Solid = 0] = "Solid";
b[b.LinearGradient = 16] = "LinearGradient";
b[b.RadialGradient = 18] = "RadialGradient";
b[b.FocalRadialGradient = 19] = "FocalRadialGradient";
b[b.RepeatingBitmap = 64] = "RepeatingBitmap";
b[b.ClippedBitmap = 65] = "ClippedBitmap";
b[b.NonsmoothedRepeatingBitmap = 66] = "NonsmoothedRepeatingBitmap";
b[b.NonsmoothedClippedBitmap = 67] = "NonsmoothedClippedBitmap";
})(b || (b = {}));
var g = {a:1, b:0, c:0, d:1, tx:0, ty:0};
a.defineShape = function(b) {
for (var a = [], g = u(b.fillStyles, !1, !!b.recordsMorph, a), e = u(b.lineStyles, !0, !!b.recordsMorph, a), f = b.records, c = e, m = b.recordsMorph || null, e = null !== m, l = {fill0:0, fill1:0, line:0}, n = null, p, J, C = f.length - 1, E = 0, F = 0, I = 0, G = 0, Z, Q = 0, S = 0;Q < C;Q++) {
var O = f[Q], P;
e && (P = m[S++]);
if (0 === O.type) {
n && h(n, l, c, g), O.hasNewStyles && (p || (p = []), d.apply(p, g), g = u(O.fillStyles, !1, e, a), d.apply(p, c), c = u(O.lineStyles, !0, e, a), J && (p.push(J), J = null), l = {fill0:0, fill1:0, line:0}), O.hasFillStyle0 && (l.fill0 = O.fillStyle0), O.hasFillStyle1 && (l.fill1 = O.fillStyle1), O.hasLineStyle && (l.line = O.lineStyle), l.fill1 ? Z = g[l.fill1 - 1] : l.line ? Z = c[l.line - 1] : l.fill0 && (Z = g[l.fill0 - 1]), O.move && (E = O.moveX | 0, F = O.moveY | 0), Z && (n = r.FromDefaults(e),
Z.addSegment(n), e ? (0 === P.type ? (I = P.moveX | 0, G = P.moveY | 0) : (I = E, G = F, S--), n.morphMoveTo(E, F, I, G)) : n.moveTo(E, F));
} else {
k(1 === O.type);
n || (J || (J = new w(null, v({color:{red:0, green:0, blue:0, alpha:0}, width:20}, !0, e, a))), n = r.FromDefaults(e), J.addSegment(n), e ? n.morphMoveTo(E, F, I, G) : n.moveTo(E, F));
if (e) {
for (;P && 0 === P.type;) {
P = m[S++];
}
P || (P = O);
}
if (!O.isStraight || e && !P.isStraight) {
var V, $, W;
O.isStraight ? (W = O.deltaX | 0, O = O.deltaY | 0, V = E + (W >> 1), $ = F + (O >> 1), E += W, F += O) : (V = E + O.controlDeltaX | 0, $ = F + O.controlDeltaY | 0, E = V + O.anchorDeltaX | 0, F = $ + O.anchorDeltaY | 0);
if (e) {
if (P.isStraight) {
W = P.deltaX | 0, O = P.deltaY | 0, x = I + (W >> 1), ea = G + (O >> 1), I += W, G += O;
} else {
var x = I + P.controlDeltaX | 0, ea = G + P.controlDeltaY | 0, I = x + P.anchorDeltaX | 0, G = ea + P.anchorDeltaY | 0
}
n.morphCurveTo(V, $, E, F, x, ea, I, G);
} else {
n.curveTo(V, $, E, F);
}
} else {
E += O.deltaX | 0, F += O.deltaY | 0, e ? (I += P.deltaX | 0, G += P.deltaY | 0, n.morphLineTo(E, F, I, G)) : n.lineTo(E, F);
}
}
}
h(n, l, c, g);
p ? d.apply(p, g) : p = g;
d.apply(p, c);
J && p.push(J);
f = new q;
e && (f.morphCoordinates = new Int32Array(f.coordinates.length), f.morphStyles = new t(16));
for (Q = 0;Q < p.length;Q++) {
p[Q].serialize(f);
}
return{type:b.isMorph ? "morphshape" : "shape", id:b.id, fillBounds:b.fillBounds, lineBounds:b.lineBounds, morphFillBounds:b.fillBoundsMorph || null, morphLineBounds:b.lineBoundsMorph || null, shape:f.toPlainObject(), transferables:f.buffers, require:a.length ? a : null};
};
var r = function() {
function b(a, d, g, e, f, k) {
this.commands = a;
this.data = d;
this.morphData = g;
this.prev = e;
this.next = f;
this.isReversed = k;
this.id = b._counter++;
}
b.FromDefaults = function(a) {
var d = new t, g = new t;
d.endian = g.endian = "auto";
var e = null;
a && (e = new t, e.endian = "auto");
return new b(d, g, e, null, null, !1);
};
b.prototype.moveTo = function(b, a) {
this.commands.writeUnsignedByte(9);
this.data.write2Ints(b, a);
};
b.prototype.morphMoveTo = function(b, a, d, g) {
this.moveTo(b, a);
this.morphData.write2Ints(d, g);
};
b.prototype.lineTo = function(b, a) {
this.commands.writeUnsignedByte(10);
this.data.write2Ints(b, a);
};
b.prototype.morphLineTo = function(b, a, d, g) {
this.lineTo(b, a);
this.morphData.write2Ints(d, g);
};
b.prototype.curveTo = function(b, a, d, g) {
this.commands.writeUnsignedByte(11);
this.data.write4Ints(b, a, d, g);
};
b.prototype.morphCurveTo = function(b, a, d, g, e, f, k, c) {
this.curveTo(b, a, d, g);
this.morphData.write4Ints(e, f, k, c);
};
b.prototype.toReversed = function() {
k(!this.isReversed);
return new b(this.commands, this.data, this.morphData, null, null, !0);
};
b.prototype.clone = function() {
return new b(this.commands, this.data, this.morphData, null, null, this.isReversed);
};
b.prototype.storeStartAndEnd = function() {
var b = this.data.ints, a = b[0] + "," + b[1], d = (this.data.length >> 2) - 2, b = b[d] + "," + b[d + 1];
this.isReversed ? (this.startPoint = b, this.endPoint = a) : (this.startPoint = a, this.endPoint = b);
};
b.prototype.connectsTo = function(b) {
k(b !== this);
k(this.endPoint);
k(b.startPoint);
return this.endPoint === b.startPoint;
};
b.prototype.startConnectsTo = function(b) {
k(b !== this);
return this.startPoint === b.startPoint;
};
b.prototype.flipDirection = function() {
var b = "", b = this.startPoint;
this.startPoint = this.endPoint;
this.endPoint = b;
this.isReversed = !this.isReversed;
};
b.prototype.serialize = function(b, a) {
if (this.isReversed) {
this._serializeReversed(b, a);
} else {
var d = this.commands.bytes, g = this.data.length >> 2, e = this.morphData ? this.morphData.ints : null, f = this.data.ints;
k(9 === d[0]);
var c = 0;
f[0] === a.x && f[1] === a.y && c++;
for (var m = this.commands.length, l = 2 * c;c < m;c++) {
l = this._writeCommand(d[c], l, f, e, b);
}
k(l === g);
a.x = f[g - 2];
a.y = f[g - 1];
}
};
b.prototype._serializeReversed = function(b, a) {
var d = this.commands.length, g = (this.data.length >> 2) - 2, e = this.commands.bytes;
k(9 === e[0]);
var f = this.data.ints, c = this.morphData ? this.morphData.ints : null;
f[g] === a.x && f[g + 1] === a.y || this._writeCommand(9, g, f, c, b);
if (1 !== d) {
for (;1 < d--;) {
var g = g - 2, m = e[d];
b.writeCommandAndCoordinates(m, f[g], f[g + 1]);
c && b.writeMorphCoordinates(c[g], c[g + 1]);
11 === m && (g -= 2, b.writeCoordinates(f[g], f[g + 1]), c && b.writeMorphCoordinates(c[g], c[g + 1]));
}
k(0 === g);
}
a.x = f[0];
a.y = f[1];
};
b.prototype._writeCommand = function(b, a, d, g, e) {
e.writeCommandAndCoordinates(b, d[a++], d[a++]);
g && e.writeMorphCoordinates(g[a - 2], g[a - 1]);
11 === b && (e.writeCoordinates(d[a++], d[a++]), g && e.writeMorphCoordinates(g[a - 2], g[a - 1]));
return a;
};
b._counter = 0;
return b;
}(), w = function() {
function b(a, d) {
this.fillStyle = a;
this.lineStyle = d;
this._head = null;
}
b.prototype.addSegment = function(b) {
k(b);
k(null === b.next);
k(null === b.prev);
var a = this._head;
a && (k(b !== a), a.next = b, b.prev = a);
this._head = b;
};
b.prototype.removeSegment = function(b) {
b.prev && (b.prev.next = b.next);
b.next && (b.next.prev = b.prev);
};
b.prototype.insertSegment = function(b, a) {
var d = a.prev;
b.prev = d;
b.next = a;
d && (d.next = b);
a.prev = b;
};
b.prototype.head = function() {
return this._head;
};
b.prototype.serialize = function(b) {
var a = this.head();
if (a) {
for (;a;) {
a.storeStartAndEnd(), a = a.prev;
}
for (var d = this.head(), g = d, c = a = null, r = d.prev;d;) {
for (;r;) {
r.startConnectsTo(d) && r.flipDirection(), r.connectsTo(d) ? (r.next !== d && (this.removeSegment(r), this.insertSegment(r, d)), d = r, r = d.prev) : (r.startConnectsTo(g) && r.flipDirection(), g.connectsTo(r) ? (this.removeSegment(r), g.next = r, r = r.prev, g.next.prev = g, g.next.next = null, g = g.next) : r = r.prev);
}
r = d.prev;
a ? (c.next = d, d.prev = c, c = g, c.next = null) : (a = d, c = g);
if (!r) {
break;
}
d = g = r;
r = d.prev;
}
if (this.fillStyle) {
switch(r = this.fillStyle, d = r.morph, r.type) {
case 0:
b.beginFill(r.color);
d && b.writeMorphFill(d.color);
break;
case 16:
;
case 18:
;
case 19:
m(2, r, b);
d && b.writeMorphGradient(d.colors, d.ratios, d.transform);
break;
case 65:
;
case 64:
;
case 67:
;
case 66:
b.beginBitmap(3, r.bitmapIndex, r.transform, r.repeat, r.smooth);
d && b.writeMorphBitmap(d.transform);
break;
default:
f("Invalid fill style type: " + r.type);
}
} else {
switch(r = this.lineStyle, d = r.morph, k(r), r.type) {
case 0:
l(r, b);
d && e(d, b);
break;
case 16:
;
case 18:
;
case 19:
l(r, b);
m(6, r, b);
d && (e(d, b), b.writeMorphGradient(d.colors, d.ratios, d.transform));
break;
case 65:
;
case 64:
;
case 67:
;
case 66:
l(r, b), b.beginBitmap(7, r.bitmapIndex, r.transform, r.repeat, r.smooth), d && (e(d, b), b.writeMorphBitmap(d.transform));
}
}
d = {x:0, y:0};
for (r = a;r;) {
r.serialize(b, d), r = r.next;
}
this.fillStyle ? b.endFill() : b.endLine();
return b;
}
};
return b;
}();
})(h.Parser || (h.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function h(a, b, g, e, f) {
var k = e >> 3, c = g * b * k, k = g * k, m = a.length + (a.length & 1), l = new ArrayBuffer(t.length + m), n = new Uint8Array(l);
n.set(t);
if (f) {
f = 0;
for (var q = t.length;f < a.length;f += 2, q += 2) {
n[q] = a[f + 1], n[q + 1] = a[f];
}
} else {
n.set(a, t.length);
}
a = new DataView(l);
a.setUint32(4, m + 36, !0);
a.setUint16(22, g, !0);
a.setUint32(24, b, !0);
a.setUint32(28, c, !0);
a.setUint16(32, k, !0);
a.setUint16(34, e, !0);
a.setUint32(40, m, !0);
return{data:n, mimeType:"audio/wav"};
}
function v(a, b, g) {
function e(b) {
for (;c < b;) {
k = k << 8 | a[f++], c += 8;
}
c -= b;
return k >>> c & (1 << b) - 1;
}
for (var f = 0, k = 0, c = 0, m = 0, l = e(2), t = q[l];m < b.length;) {
var h = b[m++] = e(16) << 16 >> 16, s, p = e(6), v;
1 < g && (s = b[m++] = e(16) << 16 >> 16, v = e(6));
for (var u = 1 << l + 1, J = 0;4095 > J;J++) {
for (var C = e(l + 2), E = n[p], F = 0, I = u >> 1;I;I >>= 1, E >>= 1) {
C & I && (F += E);
}
h += (C & u ? -1 : 1) * (F + E);
b[m++] = h = -32768 > h ? -32768 : 32767 < h ? 32767 : h;
p += t[C & ~u];
p = 0 > p ? 0 : 88 < p ? 88 : p;
if (1 < g) {
C = e(l + 2);
E = n[v];
F = 0;
for (I = u >> 1;I;I >>= 1, E >>= 1) {
C & I && (F += E);
}
s += (C & u ? -1 : 1) * (F + E);
b[m++] = s = -32768 > s ? -32768 : 32767 < s ? 32767 : s;
v += t[C & ~u];
v = 0 > v ? 0 : 88 < v ? 88 : v;
}
}
}
}
function p(a) {
for (var b = new Float32Array(a.length), g = 0;g < b.length;g++) {
b[g] = (a[g] - 128) / 128;
}
this.currentSample += b.length / this.channels;
return{streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b};
}
function u(a) {
for (var b = new Float32Array(a.length / 2), g = 0, e = 0;g < b.length;g++, e += 2) {
b[g] = (a[e] << 24 | a[e + 1] << 16) / 2147483648;
}
this.currentSample += b.length / this.channels;
return{streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b};
}
function l(a) {
for (var b = new Float32Array(a.length / 2), g = 0, e = 0;g < b.length;g++, e += 2) {
b[g] = (a[e + 1] << 24 | a[e] << 16) / 2147483648;
}
this.currentSample += b.length / this.channels;
return{streamId:this.streamId, samplesCount:b.length / this.channels, pcm:b};
}
function e(a) {
var b = a[1] << 8 | a[0], g = a[3] << 8 | a[2];
this.currentSample += b;
return{streamId:this.streamId, samplesCount:b, data:new Uint8Array(a.subarray(4)), seek:g};
}
var m = [5512, 11250, 22500, 44100], t = new Uint8Array([82, 73, 70, 70, 0, 0, 0, 0, 87, 65, 86, 69, 102, 109, 116, 32, 16, 0, 0, 0, 1, 0, 2, 0, 68, 172, 0, 0, 16, 177, 2, 0, 4, 0, 16, 0, 100, 97, 116, 97, 0, 0, 0, 0]);
a.defineSound = function(a) {
var b = 1 == a.soundType ? 2 : 1, g = a.samplesCount, e = m[a.soundRate], f = a.soundData, k;
switch(a.soundFormat) {
case 0:
k = new Float32Array(g * b);
if (1 == a.soundSize) {
for (var c = g = 0;g < k.length;g++, c += 2) {
k[g] = (f[c] << 24 | f[c + 1] << 16) / 2147483648;
}
f = h(f, e, b, 16, !0);
} else {
for (g = 0;g < k.length;g++) {
k[g] = (f[g] - 128) / 128;
}
f = h(f, e, b, 8, !1);
}
break;
case 3:
k = new Float32Array(g * b);
if (1 == a.soundSize) {
for (c = g = 0;g < k.length;g++, c += 2) {
k[g] = (f[c + 1] << 24 | f[c] << 16) / 2147483648;
}
f = h(f, e, b, 16, !1);
} else {
for (g = 0;g < k.length;g++) {
k[g] = (f[g] - 128) / 128;
}
f = h(f, e, b, 8, !1);
}
break;
case 2:
f = {data:new Uint8Array(f.subarray(2)), mimeType:"audio/mpeg"};
break;
case 1:
c = new Int16Array(g * b);
v(f, c, b);
k = new Float32Array(g * b);
for (g = 0;g < k.length;g++) {
k[g] = c[g] / 32768;
}
f = h(new Uint8Array(c.buffer), e, b, 16, !(new Uint8Array((new Uint16Array([1])).buffer))[0]);
break;
default:
throw Error("Unsupported audio format: " + a.soundFormat);;
}
a = {type:"sound", id:a.id, sampleRate:e, channels:b, pcm:k, packaged:null};
f && (a.packaged = f);
return a;
};
var q = [[-1, 2], [-1, -1, 2, 4], [-1, -1, -1, -1, 2, 4, 6, 8], [-1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, 10, 13, 16]], n = [7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630,
9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767], k = 0, f = function() {
function a(b, d, e) {
this.streamId = k++;
this.samplesCount = b;
this.sampleRate = d;
this.channels = e;
this.format = null;
this.currentSample = 0;
}
a.FromTag = function(b) {
var g = new a(b.samplesCount, m[b.streamRate], 1 == b.streamType ? 2 : 1);
switch(b.streamCompression) {
case 0:
;
case 3:
g.format = "wave";
g.decode = 1 == b.soundSize ? 0 === b.streamCompression ? u : l : p;
break;
case 2:
g.format = "mp3";
g.decode = e;
break;
default:
return c.Debug.warning("Unsupported audio format: " + b.soundFormat), null;
}
return g;
};
return a;
}();
a.SoundStream = f;
})(h.Parser || (h.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
a.defineText = function(a) {
return{type:"text", id:a.id, fillBounds:a.bbox, variableName:a.variableName, tag:a, bold:!1, italic:!1};
};
})(c.Parser || (c.Parser = {}));
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("Parser");
h.enterTimeline = function(a, c) {
};
h.leaveTimeline = function(a) {
};
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
var Shumway$$inline_710 = Shumway || (Shumway = {}), SWF$$inline_711 = Shumway$$inline_710.SWF || (Shumway$$inline_710.SWF = {}), Option$$inline_712 = Shumway$$inline_710.Options.Option;
SWF$$inline_711.parserOptions = Shumway$$inline_710.Settings.shumwayOptions.register(new Shumway$$inline_710.Options.OptionSet("Parser Options"));
SWF$$inline_711.traceLevel = SWF$$inline_711.parserOptions.register(new Option$$inline_712("parsertracelevel", "Parser Trace Level", "number", 0, "Parser Trace Level"));
(function(c) {
(function(c) {
function a(a, c) {
for (var l = 0, q = [], n, k, f = 16;0 < f && !a[f - 1];) {
f--;
}
q.push({children:[], index:0});
var d = q[0], b;
for (n = 0;n < f;n++) {
for (k = 0;k < a[n];k++) {
d = q.pop();
for (d.children[d.index] = c[l];0 < d.index;) {
d = q.pop();
}
d.index++;
for (q.push(d);q.length <= n;) {
q.push(b = {children:[], index:0}), d.children[d.index] = b.children, d = b;
}
l++;
}
n + 1 < f && (q.push(b = {children:[], index:0}), d.children[d.index] = b.children, d = b);
}
return q[0].children;
}
function s(a, c, l, q, n, k, f, d, b) {
function g() {
if (0 < H) {
return H--, L >> H & 1;
}
L = a[c++];
if (255 == L) {
var b = a[c++];
if (b) {
throw "unexpected marker: " + (L << 8 | b).toString(16);
}
}
H = 7;
return L >>> 7;
}
function r(b) {
for (var a;null !== (a = g());) {
b = b[a];
if ("number" === typeof b) {
return b;
}
if ("object" !== typeof b) {
throw "invalid huffman sequence";
}
}
return null;
}
function w(b) {
for (var a = 0;0 < b;) {
var d = g();
if (null === d) {
return;
}
a = a << 1 | d;
b--;
}
return a;
}
function h(b) {
if (1 === b) {
return 1 === g() ? 1 : -1;
}
var a = w(b);
return a >= 1 << b - 1 ? a : a + (-1 << b) + 1;
}
function s(b, a) {
var d = r(b.huffmanTableDC), d = 0 === d ? 0 : h(d);
b.blockData[a] = b.pred += d;
for (d = 1;64 > d;) {
var g = r(b.huffmanTableAC), e = g & 15, g = g >> 4;
if (0 === e) {
if (15 > g) {
break;
}
d += 16;
} else {
d += g, b.blockData[a + u[d]] = h(e), d++;
}
}
}
function p(a, d) {
var g = r(a.huffmanTableDC), g = 0 === g ? 0 : h(g) << b;
a.blockData[d] = a.pred += g;
}
function v(a, d) {
a.blockData[d] |= g() << b;
}
function N(a, d) {
if (0 < J) {
J--;
} else {
for (var g = k;g <= f;) {
var e = r(a.huffmanTableAC), c = e & 15, e = e >> 4;
if (0 === c) {
if (15 > e) {
J = w(e) + (1 << e) - 1;
break;
}
g += 16;
} else {
g += e, a.blockData[d + u[g]] = h(c) * (1 << b), g++;
}
}
}
}
function K(a, d) {
for (var e = k, c = 0, m;e <= f;) {
m = u[e];
switch(C) {
case 0:
c = r(a.huffmanTableAC);
m = c & 15;
c >>= 4;
if (0 === m) {
15 > c ? (J = w(c) + (1 << c), C = 4) : (c = 16, C = 1);
} else {
if (1 !== m) {
throw "invalid ACn encoding";
}
E = h(m);
C = c ? 2 : 3;
}
continue;
case 1:
;
case 2:
a.blockData[d + m] ? a.blockData[d + m] += g() << b : (c--, 0 === c && (C = 2 == C ? 3 : 0));
break;
case 3:
a.blockData[d + m] ? a.blockData[d + m] += g() << b : (a.blockData[d + m] = E << b, C = 0);
break;
case 4:
a.blockData[d + m] && (a.blockData[d + m] += g() << b);
}
e++;
}
4 === C && (J--, 0 === J && (C = 0));
}
var y = l.mcusPerLine, D = c, L = 0, H = 0, J = 0, C = 0, E, F = q.length, I, G, Z, Q, S;
d = l.progressive ? 0 === k ? 0 === d ? p : v : 0 === d ? N : K : s;
var O = 0;
l = 1 == F ? q[0].blocksPerLine * q[0].blocksPerColumn : y * l.mcusPerColumn;
n || (n = l);
for (var P, V;O < l;) {
for (G = 0;G < F;G++) {
q[G].pred = 0;
}
J = 0;
if (1 == F) {
for (I = q[0], S = 0;S < n;S++) {
d(I, 64 * ((I.blocksPerLine + 1) * (O / I.blocksPerLine | 0) + O % I.blocksPerLine)), O++;
}
} else {
for (S = 0;S < n;S++) {
for (G = 0;G < F;G++) {
for (I = q[G], P = I.h, V = I.v, Z = 0;Z < V;Z++) {
for (Q = 0;Q < P;Q++) {
d(I, 64 * ((I.blocksPerLine + 1) * ((O / y | 0) * I.v + Z) + (O % y * I.h + Q)));
}
}
}
O++;
}
}
H = 0;
I = a[c] << 8 | a[c + 1];
if (65280 >= I) {
throw "marker was not found";
}
if (65488 <= I && 65495 >= I) {
c += 2;
} else {
break;
}
}
return c - D;
}
function v(a, c) {
for (var l = c.blocksPerLine, q = c.blocksPerColumn, n = new Int32Array(64), k = 0;k < q;k++) {
for (var f = 0;f < l;f++) {
for (var d = c, b = 64 * ((c.blocksPerLine + 1) * k + f), g = n, r = d.quantizationTable, w = void 0, h = void 0, s = void 0, p = void 0, v = void 0, u = void 0, K = void 0, y = void 0, D = void 0, L = void 0, L = 0;64 > L;L++) {
g[L] = d.blockData[b + L] * r[L];
}
for (L = 0;8 > L;++L) {
r = 8 * L, 0 === g[1 + r] && 0 === g[2 + r] && 0 === g[3 + r] && 0 === g[4 + r] && 0 === g[5 + r] && 0 === g[6 + r] && 0 === g[7 + r] ? (D = 5793 * g[0 + r] + 512 >> 10, g[0 + r] = D, g[1 + r] = D, g[2 + r] = D, g[3 + r] = D, g[4 + r] = D, g[5 + r] = D, g[6 + r] = D, g[7 + r] = D) : (w = 5793 * g[0 + r] + 128 >> 8, h = 5793 * g[4 + r] + 128 >> 8, s = g[2 + r], p = g[6 + r], v = 2896 * (g[1 + r] - g[7 + r]) + 128 >> 8, y = 2896 * (g[1 + r] + g[7 + r]) + 128 >> 8, u = g[3 + r] << 4, K =
g[5 + r] << 4, D = w - h + 1 >> 1, w = w + h + 1 >> 1, h = D, D = 3784 * s + 1567 * p + 128 >> 8, s = 1567 * s - 3784 * p + 128 >> 8, p = D, D = v - K + 1 >> 1, v = v + K + 1 >> 1, K = D, D = y + u + 1 >> 1, u = y - u + 1 >> 1, y = D, D = w - p + 1 >> 1, w = w + p + 1 >> 1, p = D, D = h - s + 1 >> 1, h = h + s + 1 >> 1, s = D, D = 2276 * v + 3406 * y + 2048 >> 12, v = 3406 * v - 2276 * y + 2048 >> 12, y = D, D = 799 * u + 4017 * K + 2048 >> 12, u = 4017 * u - 799 * K + 2048 >> 12, K =
D, g[0 + r] = w + y, g[7 + r] = w - y, g[1 + r] = h + K, g[6 + r] = h - K, g[2 + r] = s + u, g[5 + r] = s - u, g[3 + r] = p + v, g[4 + r] = p - v);
}
for (L = 0;8 > L;++L) {
r = L, 0 === g[8 + r] && 0 === g[16 + r] && 0 === g[24 + r] && 0 === g[32 + r] && 0 === g[40 + r] && 0 === g[48 + r] && 0 === g[56 + r] ? (D = 5793 * g[L + 0] + 8192 >> 14, g[0 + r] = D, g[8 + r] = D, g[16 + r] = D, g[24 + r] = D, g[32 + r] = D, g[40 + r] = D, g[48 + r] = D, g[56 + r] = D) : (w = 5793 * g[0 + r] + 2048 >> 12, h = 5793 * g[32 + r] + 2048 >> 12, s = g[16 + r], p = g[48 + r], v = 2896 * (g[8 + r] - g[56 + r]) + 2048 >> 12, y = 2896 * (g[8 + r] + g[56 + r]) + 2048 >> 12,
u = g[24 + r], K = g[40 + r], D = w - h + 1 >> 1, w = w + h + 1 >> 1, h = D, D = 3784 * s + 1567 * p + 2048 >> 12, s = 1567 * s - 3784 * p + 2048 >> 12, p = D, D = v - K + 1 >> 1, v = v + K + 1 >> 1, K = D, D = y + u + 1 >> 1, u = y - u + 1 >> 1, y = D, D = w - p + 1 >> 1, w = w + p + 1 >> 1, p = D, D = h - s + 1 >> 1, h = h + s + 1 >> 1, s = D, D = 2276 * v + 3406 * y + 2048 >> 12, v = 3406 * v - 2276 * y + 2048 >> 12, y = D, D = 799 * u + 4017 * K + 2048 >> 12, u = 4017 * u - 799 *
K + 2048 >> 12, K = D, g[0 + r] = w + y, g[56 + r] = w - y, g[8 + r] = h + K, g[48 + r] = h - K, g[16 + r] = s + u, g[40 + r] = s - u, g[24 + r] = p + v, g[32 + r] = p - v);
}
for (L = 0;64 > L;++L) {
w = b + L, h = g[L], h = -2056 >= h ? 0 : 2024 <= h ? 255 : h + 2056 >> 4, d.blockData[w] = h;
}
}
}
return c.blockData;
}
function p(a) {
return 0 >= a ? 0 : 255 <= a ? 255 : a;
}
var u = new Int32Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]), l = function() {
function e() {
}
e.prototype.parse = function(e) {
function c() {
var b = e[k] << 8 | e[k + 1];
k += 2;
return b;
}
function l() {
var b = c(), b = e.subarray(k, k + b - 2);
k += b.length;
return b;
}
function n(b) {
for (var a = Math.ceil(b.samplesPerLine / 8 / b.maxH), d = Math.ceil(b.scanLines / 8 / b.maxV), g = 0;g < b.components.length;g++) {
L = b.components[g];
var e = Math.ceil(Math.ceil(b.samplesPerLine / 8) * L.h / b.maxH), f = Math.ceil(Math.ceil(b.scanLines / 8) * L.v / b.maxV);
L.blockData = new Int16Array(64 * d * L.v * (a * L.h + 1));
L.blocksPerLine = e;
L.blocksPerColumn = f;
}
b.mcusPerLine = a;
b.mcusPerColumn = d;
}
var k = 0, f = null, d = null, b, g, r = [], w = [], h = [], p = c();
if (65496 != p) {
throw "SOI not found";
}
for (p = c();65497 != p;) {
var B, M;
switch(p) {
case 65504:
;
case 65505:
;
case 65506:
;
case 65507:
;
case 65508:
;
case 65509:
;
case 65510:
;
case 65511:
;
case 65512:
;
case 65513:
;
case 65514:
;
case 65515:
;
case 65516:
;
case 65517:
;
case 65518:
;
case 65519:
;
case 65534:
B = l();
65504 === p && 74 === B[0] && 70 === B[1] && 73 === B[2] && 70 === B[3] && 0 === B[4] && (f = {version:{major:B[5], minor:B[6]}, densityUnits:B[7], xDensity:B[8] << 8 | B[9], yDensity:B[10] << 8 | B[11], thumbWidth:B[12], thumbHeight:B[13], thumbData:B.subarray(14, 14 + 3 * B[12] * B[13])});
65518 === p && 65 === B[0] && 100 === B[1] && 111 === B[2] && 98 === B[3] && 101 === B[4] && 0 === B[5] && (d = {version:B[6], flags0:B[7] << 8 | B[8], flags1:B[9] << 8 | B[10], transformCode:B[11]});
break;
case 65499:
for (var p = c() + k - 2, N;k < p;) {
var K = e[k++], y = new Int32Array(64);
if (0 === K >> 4) {
for (B = 0;64 > B;B++) {
N = u[B], y[N] = e[k++];
}
} else {
if (1 === K >> 4) {
for (B = 0;64 > B;B++) {
N = u[B], y[N] = c();
}
} else {
throw "DQT: invalid table spec";
}
}
r[K & 15] = y;
}
break;
case 65472:
;
case 65473:
;
case 65474:
if (b) {
throw "Only single frame JPEGs supported";
}
c();
b = {};
b.extended = 65473 === p;
b.progressive = 65474 === p;
b.precision = e[k++];
b.scanLines = c();
b.samplesPerLine = c();
b.components = [];
b.componentIds = {};
B = e[k++];
for (p = y = K = 0;p < B;p++) {
N = e[k];
M = e[k + 1] >> 4;
var D = e[k + 1] & 15;
K < M && (K = M);
y < D && (y = D);
M = b.components.push({h:M, v:D, quantizationTable:r[e[k + 2]]});
b.componentIds[N] = M - 1;
k += 3;
}
b.maxH = K;
b.maxV = y;
n(b);
break;
case 65476:
N = c();
for (p = 2;p < N;) {
K = e[k++];
y = new Uint8Array(16);
for (B = M = 0;16 > B;B++, k++) {
M += y[B] = e[k];
}
D = new Uint8Array(M);
for (B = 0;B < M;B++, k++) {
D[B] = e[k];
}
p += 17 + M;
(0 === K >> 4 ? h : w)[K & 15] = a(y, D);
}
break;
case 65501:
c();
g = c();
break;
case 65498:
c();
N = e[k++];
B = [];
for (var L, p = 0;p < N;p++) {
K = b.componentIds[e[k++]], L = b.components[K], K = e[k++], L.huffmanTableDC = h[K >> 4], L.huffmanTableAC = w[K & 15], B.push(L);
}
p = e[k++];
N = e[k++];
K = e[k++];
p = s(e, k, b, B, g, p, N, K >> 4, K & 15);
k += p;
break;
default:
if (255 == e[k - 3] && 192 <= e[k - 2] && 254 >= e[k - 2]) {
k -= 3;
break;
}
throw "unknown JPEG marker " + p.toString(16);;
}
p = c();
}
this.width = b.samplesPerLine;
this.height = b.scanLines;
this.jfif = f;
this.adobe = d;
this.components = [];
for (p = 0;p < b.components.length;p++) {
L = b.components[p], this.components.push({output:v(b, L), scaleX:L.h / b.maxH, scaleY:L.v / b.maxV, blocksPerLine:L.blocksPerLine, blocksPerColumn:L.blocksPerColumn});
}
this.numComponents = this.components.length;
};
e.prototype._getLinearizedBlockData = function(a, e) {
var c = this.width / a, l = this.height / e, k, f, d, b, g, r, w = 0, h, s = this.components.length, p = a * e * s, v = new Uint8Array(p), u = new Uint32Array(a);
for (r = 0;r < s;r++) {
k = this.components[r];
f = k.scaleX * c;
d = k.scaleY * l;
w = r;
h = k.output;
b = k.blocksPerLine + 1 << 3;
for (g = 0;g < a;g++) {
k = 0 | g * f, u[g] = (k & 4294967288) << 3 | k & 7;
}
for (f = 0;f < e;f++) {
for (k = 0 | f * d, k = b * (k & 4294967288) | (k & 7) << 3, g = 0;g < a;g++) {
v[w] = h[k + u[g]], w += s;
}
}
}
if (l = this.decodeTransform) {
for (r = 0;r < p;) {
for (c = k = 0;k < s;k++, r++, c += 2) {
v[r] = (v[r] * l[c] >> 8) + l[c + 1];
}
}
}
return v;
};
e.prototype._isColorConversionNeeded = function() {
return this.adobe && this.adobe.transformCode ? !0 : 3 == this.numComponents ? !0 : !1;
};
e.prototype._convertYccToRgb = function(a) {
for (var e, c, l, k = 0, f = a.length;k < f;k += 3) {
e = a[k], c = a[k + 1], l = a[k + 2], a[k] = p(e - 179.456 + 1.402 * l), a[k + 1] = p(e + 135.459 - .344 * c - .714 * l), a[k + 2] = p(e - 226.816 + 1.772 * c);
}
return a;
};
e.prototype._convertYcckToRgb = function(a) {
for (var e, c, l, k, f, d, b, g, r, w, h, s, v, u, N = 0, K = 0, y = a.length;K < y;K += 4) {
e = a[K];
c = a[K + 1];
l = a[K + 2];
k = a[K + 3];
f = c * c;
d = c * l;
b = c * e;
g = c * k;
r = l * l;
w = l * k;
h = l * e;
s = e * e;
v = e * k;
u = k * k;
var D = -122.67195406894 - 6.60635669420364E-5 * f + 4.37130475926232E-4 * d - 5.4080610064599E-5 * b + 4.8449797120281E-4 * g - .154362151871126 * c - 9.57964378445773E-4 * r + 8.17076911346625E-4 * h - .00477271405408747 * w + 1.53380253221734 * l + 9.61250184130688E-4 * s - .00266257332283933 * v + .48357088451265 * e - 3.36197177618394E-4 * u + .484791561490776 * k, L = 107.268039397724 + 2.19927104525741E-5 * f - 6.40992018297945E-4 * d + 6.59397001245577E-4 * b + 4.26105652938837E-4 *
g - .176491792462875 * c - 7.78269941513683E-4 * r + .00130872261408275 * h + 7.70482631801132E-4 * w - .151051492775562 * l + .00126935368114843 * s - .00265090189010898 * v + .25802910206845 * e - 3.18913117588328E-4 * u - .213742400323665 * k;
e = -20.810012546947 - 5.70115196973677E-4 * f - 2.63409051004589E-5 * d + .0020741088115012 * b - .00288260236853442 * g + .814272968359295 * c - 1.53496057440975E-5 * r - 1.32689043961446E-4 * h + 5.60833691242812E-4 * w - .195152027534049 * l + .00174418132927582 * s - .00255243321439347 * v + .116935020465145 * e - 3.43531996510555E-4 * u + .24165260232407 * k;
a[N++] = p(D);
a[N++] = p(L);
a[N++] = p(e);
}
return a;
};
e.prototype._convertYcckToCmyk = function(a) {
for (var e, c, l, k = 0, f = a.length;k < f;k += 4) {
e = a[k], c = a[k + 1], l = a[k + 2], a[k] = p(434.456 - e - 1.402 * l), a[k + 1] = p(119.541 - e + .344 * c + .714 * l), a[k + 2] = p(481.816 - e - 1.772 * c);
}
return a;
};
e.prototype._convertCmykToRgb = function(a) {
for (var e, c, l, k, f = 0, d = 1 / 255 / 255, b = 0, g = a.length;b < g;b += 4) {
e = a[b];
c = a[b + 1];
l = a[b + 2];
k = a[b + 3];
var r = e * (-4.387332384609988 * e + 54.48615194189176 * c + 18.82290502165302 * l + 212.25662451639585 * k - 72734.4411664936) + c * (1.7149763477362134 * c - 5.6096736904047315 * l - 17.873870861415444 * k - 1401.7366389350734) + l * (-2.5217340131683033 * l - 21.248923337353073 * k + 4465.541406466231) - k * (21.86122147463605 * k + 48317.86113160301), w = e * (8.841041422036149 * e + 60.118027045597366 * c + 6.871425592049007 * l + 31.159100130055922 * k - 20220.756542821975) + c *
(-15.310361306967817 * c + 17.575251261109482 * l + 131.35250912493976 * k - 48691.05921601825) + l * (4.444339102852739 * l + 9.8632861493405 * k - 6341.191035517494) - k * (20.737325471181034 * k + 47890.15695978492);
e = e * (.8842522430003296 * e + 8.078677503112928 * c + 30.89978309703729 * l - .23883238689178934 * k - 3616.812083916688) + c * (10.49593273432072 * c + 63.02378494754052 * l + 50.606957656360734 * k - 28620.90484698408) + l * (.03296041114873217 * l + 115.60384449646641 * k - 49363.43385999684) - k * (22.33816807309886 * k + 45932.16563550634);
a[f++] = 0 <= r ? 255 : -16581375 >= r ? 0 : 255 + r * d | 0;
a[f++] = 0 <= w ? 255 : -16581375 >= w ? 0 : 255 + w * d | 0;
a[f++] = 0 <= e ? 255 : -16581375 >= e ? 0 : 255 + e * d | 0;
}
return a;
};
e.prototype.getData = function(a, e, c) {
if (4 < this.numComponents) {
throw "Unsupported color mode";
}
a = this._getLinearizedBlockData(a, e);
return 3 === this.numComponents ? this._convertYccToRgb(a) : 4 === this.numComponents ? this._isColorConversionNeeded() ? c ? this._convertYcckToRgb(a) : this._convertYcckToCmyk(a) : this._convertCmykToRgb(a) : a;
};
e.prototype.copyToImageData = function(a) {
var e = a.width, c = a.height, l = e * c * 4;
a = a.data;
var e = this.getData(e, c, !0), k = c = 0, f, d, b, g;
switch(this.components.length) {
case 1:
for (;k < l;) {
f = e[c++], a[k++] = f, a[k++] = f, a[k++] = f, a[k++] = 255;
}
break;
case 3:
for (;k < l;) {
b = e[c++], g = e[c++], f = e[c++], a[k++] = b, a[k++] = g, a[k++] = f, a[k++] = 255;
}
break;
case 4:
for (;k < l;) {
b = e[c++], g = e[c++], f = e[c++], d = e[c++], b = 255 - p(b * (1 - d / 255) + d), g = 255 - p(g * (1 - d / 255) + d), f = 255 - p(f * (1 - d / 255) + d), a[k++] = b, a[k++] = g, a[k++] = f, a[k++] = 255;
}
break;
default:
throw "Unsupported color mode";;
}
};
return e;
}();
c.JpegImage = l;
})(c.JPEG || (c.JPEG = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
function a() {
this.bitBuffer = this.bitLength = 0;
}
function s(a) {
if (this.pos + a > this.end) {
throw c.StreamNoDataError;
}
}
function v() {
return this.end - this.pos;
}
function p(a, c) {
var h = new l(this.bytes);
h.pos = a;
h.end = c;
return h;
}
function u(a) {
var c = this.bytes, l = this.end + a.length;
if (l > c.length) {
throw "stream buffer overfow";
}
c.set(a, this.end);
this.end = l;
}
c.StreamNoDataError = {};
var l = function() {
return function(e, c, l, q) {
void 0 === c && (c = 0);
e.buffer instanceof ArrayBuffer && (c += e.byteOffset, e = e.buffer);
void 0 === l && (l = e.byteLength - c);
void 0 === q && (q = l);
var n = new Uint8Array(e, c, q);
e = new DataView(e, c, q);
e.bytes = n;
e.pos = 0;
e.end = l;
e.bitBuffer = 0;
e.bitLength = 0;
e.align = a;
e.ensure = s;
e.remaining = v;
e.substream = p;
e.push = u;
return e;
};
}();
c.Stream = l;
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
function a() {
s || (s = new Worker(h.MP3WORKER_PATH), s.addEventListener("message", function(a) {
"console" === a.data.action && console[a.data.method].call(console, a.data.message);
}));
return s;
}
h.MP3WORKER_PATH = "../../lib/mp3/mp3worker.js";
var s = null, v = 0, p = function() {
function h() {
this._sessionId = v++;
this._onworkermessageBound = this.onworkermessage.bind(this);
this._worker = a();
this._worker.addEventListener("message", this._onworkermessageBound, !1);
this._worker.postMessage({sessionId:this._sessionId, action:"create"});
}
h.prototype.onworkermessage = function(a) {
if (a.data.sessionId === this._sessionId) {
switch(a.data.action) {
case "closed":
if (this.onclosed) {
this.onclosed();
}
this._worker.removeEventListener("message", this._onworkermessageBound, !1);
this._worker = null;
break;
case "frame":
this.onframedata(a.data.frameData, a.data.channels, a.data.sampleRate, a.data.bitRate);
break;
case "id3":
if (this.onid3tag) {
this.onid3tag(a.data.id3Data);
}
break;
case "error":
if (this.onerror) {
this.onerror(a.data.message);
}
;
}
}
};
h.prototype.pushAsync = function(a) {
this._worker.postMessage({sessionId:this._sessionId, action:"decode", data:a});
};
h.prototype.close = function() {
this._worker.postMessage({sessionId:this._sessionId, action:"close"});
};
h.processAll = function(a) {
var e = 8E3, m = new Float32Array(e), t = 0, q = [], n = !1, k = new c.PromiseWrapper, f = new h;
f.onframedata = function(a, b, g, f) {
b = a.length + t;
if (b > e) {
do {
e *= 2;
} while (b > e);
b = new Float32Array(e);
b.set(m);
m = b;
}
m.set(a, t);
t += a.length;
};
f.onid3tag = function(a) {
q.push(a);
};
f.onclosed = function() {
n || k.resolve({data:m.subarray(0, t), id3Tags:q});
};
f.onerror = function(a) {
n || (n = !0, k.reject(a));
};
f.pushAsync(a);
f.close();
return k.promise;
};
return h;
}();
h.MP3DecoderSession = p;
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
__extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(h) {
function a(b, a) {
return b && a ? "boldItalic" : b ? "bold" : a ? "italic" : "regular";
}
function s(b, a) {
switch(b.code) {
case 6:
;
case 21:
;
case 35:
;
case 90:
return c.SWF.Parser.defineImage(b);
case 20:
;
case 36:
return c.SWF.Parser.defineBitmap(b);
case 7:
;
case 34:
return c.SWF.Parser.defineButton(b, a);
case 37:
return c.SWF.Parser.defineText(b);
case 10:
;
case 48:
;
case 75:
;
case 91:
return c.SWF.Parser.defineFont(b);
case 46:
;
case 84:
;
case 2:
;
case 22:
;
case 32:
;
case 83:
return c.SWF.Parser.defineShape(b);
case 14:
return c.SWF.Parser.defineSound(b);
case 39:
return b;
case 87:
return{type:"binary", id:b.id, data:b.data};
case 11:
;
case 33:
return c.SWF.Parser.defineLabel(b);
default:
return b;
}
}
var v = c.Debug.assert, p = c.SWF.Parser, u = h.Stream, l = c.ArrayUtilities.Inflate, e = p.SwfTag, m = p.DefinitionTags, t = p.ImageDefinitionTags, q = p.FontDefinitionTags, n = p.ControlTags, k = function() {
function k(b, a) {
v(67 === b[0] || 70 === b[0], "Unsupported compression format: " + (90 === b[0] ? "LZMA" : b[0] + ""));
v(87 === b[1]);
v(83 === b[2]);
v(30 <= b.length, "At least the header must be complete here.");
0 < h.traceLevel.value && console.log("Create SWFFile");
this.isCompressed = !1;
this.swfVersion = 0;
this.useAVM1 = !0;
this.backgroundColor = 4294967295;
this.bounds = null;
this.frameCount = this.frameRate = 0;
this.sceneAndFrameLabelData = this.attributes = null;
this.bytesLoaded = 0;
this.bytesTotal = a;
this.framesLoaded = this.pendingUpdateDelays = 0;
this.frames = [];
this.abcBlocks = [];
this.dictionary = [];
this.fonts = [];
this.symbolClassesMap = [];
this.symbolClassesList = [];
this.eagerlyParsedSymbolsMap = [];
this.eagerlyParsedSymbolsList = [];
this._currentExports = this._currentInitActionBlocks = this._currentActionBlocks = this._currentControlTags = this._currentSoundStreamBlock = this._currentSoundStreamHead = this._currentFrameLabel = this._jpegTables = null;
this._endTagEncountered = !1;
this.readHeaderAndInitialize(b);
}
k.prototype.appendLoadedData = function(b) {
this.bytesLoaded += b.length;
v(this.bytesLoaded <= this.bytesTotal);
this._endTagEncountered || (this.isCompressed ? this._decompressor.push(b) : this.processDecompressedData(b), this.scanLoadedData());
};
k.prototype.getSymbol = function(b) {
if (this.eagerlyParsedSymbolsMap[b]) {
return this.eagerlyParsedSymbolsMap[b];
}
var a = this.dictionary[b];
if (!a) {
return null;
}
a = 39 === a.tagCode ? this.parseSpriteTimeline(a) : this.getParsedTag(a);
a.className = this.symbolClassesMap[b] || null;
return a;
};
k.prototype.getParsedTag = function(b) {
h.enterTimeline("Parse tag " + e[b.tagCode]);
this._dataStream.align();
this._dataStream.pos = b.byteOffset;
var a = {code:b.tagCode}, d = p.LowLevel.tagHandlers[b.tagCode];
c.Debug.assert(d, "handler shall exists here");
var g = b.byteOffset + b.byteLength;
d(this.data, this._dataStream, a, this.swfVersion, b.tagCode, g);
d = this._dataStream.pos;
v(d <= g);
d < g && (c.Debug.warning("Scanning " + e[b.tagCode] + " at offset " + b.byteOffset + " consumed " + (d - b.byteOffset) + " of " + b.byteLength + " bytes. (" + (g - d) + " left)"), this._dataStream.pos = g);
b = s(a, this.dictionary);
h.leaveTimeline();
return b;
};
k.prototype.readHeaderAndInitialize = function(b) {
h.enterTimeline("Initialize SWFFile");
this.isCompressed = 67 === b[0];
this.swfVersion = b[3];
this._loadStarted = Date.now();
this._uncompressedLength = b[4] | b[5] << 8 | b[6] << 16 | b[7] << 24;
this.bytesLoaded = b.length;
this.data = new Uint8Array(this._uncompressedLength);
this._dataStream = new u(this.data.buffer);
this._dataStream.pos = 8;
this._dataView = this._dataStream;
if (this.isCompressed) {
this.data.set(b.subarray(0, 8));
this._uncompressedLoadedLength = 8;
this._decompressor = l.create(!0);
var a = this;
this._decompressor.onData = function(b) {
a.data.set(b, a._uncompressedLoadedLength);
a._uncompressedLoadedLength += b.length;
a._decompressor.onData = a.processDecompressedData.bind(a);
a.parseHeaderContents();
};
this._decompressor.push(b.subarray(8));
} else {
this.data.set(b), this._uncompressedLoadedLength = b.length, this._decompressor = null, this.parseHeaderContents();
}
h.leaveTimeline();
this._lastScanPosition = this._dataStream.pos;
this.scanLoadedData();
};
k.prototype.parseHeaderContents = function() {
var b = p.LowLevel.readHeader(this.data, this._dataStream);
this.bounds = b.bounds;
this.frameRate = b.frameRate;
this.frameCount = b.frameCount;
};
k.prototype.processDecompressedData = function(b) {
this.data.set(b, this._uncompressedLoadedLength);
this._uncompressedLoadedLength += b.length;
this._uncompressedLoadedLength === this._uncompressedLength && (this._decompressor.close(), this._decompressor = null);
};
k.prototype.scanLoadedData = function() {
h.enterTimeline("Scan loaded SWF file tags");
this._dataStream.pos = this._lastScanPosition;
this.scanTagsToOffset(this._uncompressedLoadedLength, !0);
this._lastScanPosition = this._dataStream.pos;
h.leaveTimeline();
};
k.prototype.scanTagsToOffset = function(b, a) {
for (var d = new g(0, 0, 0), e;(e = this._dataStream.pos) < b - 1;) {
this.parseNextTagHeader(d);
if (0 === d.tagCode) {
a && (this._endTagEncountered = !0, console.log("SWF load time: " + (.001 * (Date.now() - this._loadStarted)).toFixed(4) + "sec"));
break;
}
var f = d.byteOffset + d.byteLength;
if (f > b) {
this._dataStream.pos = e;
break;
}
this.scanTag(d, a);
v(this._dataStream.pos <= f);
this._dataStream.pos < f && this.emitTagSlopWarning(d, f);
}
};
k.prototype.parseNextTagHeader = function(b) {
var a = this._dataStream.pos, d = this._dataView.getUint16(a, !0), a = a + 2;
b.tagCode = d >> 6;
d &= 63;
if (63 === d) {
if (a + 4 > this._uncompressedLoadedLength) {
return;
}
d = this._dataView.getUint32(a, !0);
a += 4;
}
this._dataStream.pos = a;
b.byteOffset = a;
b.byteLength = d;
};
k.prototype.scanTag = function(a, g) {
var f = this._dataStream, k = f.pos;
v(k === a.byteOffset);
var l = a.tagCode, r = a.byteLength;
1 < h.traceLevel.value && console.info("Scanning tag " + e[l] + " (start: " + k + ", end: " + (k + r) + ")");
if (39 === l) {
this.addLazySymbol(l, k, r), k += r, f.pos += 4, this.scanTagsToOffset(k, !1), this._dataStream.pos < w && (this.emitTagSlopWarning(a, w), f.pos = k);
} else {
if (t[l]) {
f = this.addLazySymbol(l, k, r), this.decodeEmbeddedImage(f);
} else {
if (q[l]) {
f = this.addLazySymbol(l, k, r), this.registerEmbeddedFont(f);
} else {
if (m[l]) {
this.addLazySymbol(l, k, r), this.jumpToNextTag(r);
} else {
if (g || 76 === l || 56 === l) {
if (n[l]) {
this.addControlTag(l, k, r);
} else {
switch(l) {
case 69:
this.setFileAttributes(r);
break;
case 86:
this.setSceneAndFrameLabelData(r);
break;
case 9:
this.backgroundColor = p.LowLevel.rgb(this.data, this._dataStream);
break;
case 8:
this._jpegTables || (this._jpegTables = 0 === r ? new Uint8Array(0) : this.data.subarray(f.pos, f.pos + r - 2));
this.jumpToNextTag(r);
break;
case 82:
;
case 72:
if (this.useAVM1) {
this.jumpToNextTag(r);
} else {
var w = k + r, k = new d;
82 === l ? (k.flags = p.readUi32(this.data, f), k.name = p.readString(this.data, f, 0)) : (k.flags = 0, k.name = "");
k.data = this.data.subarray(f.pos, w);
this.abcBlocks.push(k);
f.pos = w;
}
break;
case 76:
w = k + r;
for (r = p.readUi16(this.data, f);r--;) {
k = p.readUi16(this.data, f), l = p.readString(this.data, f, 0), 0 < h.traceLevel.value && console.log("Registering symbol class " + l + " to symbol " + k), this.symbolClassesMap[k] = l, this.symbolClassesList.push({id:k, className:l});
}
f.pos = w;
break;
case 59:
this.useAVM1 && (w = this._currentInitActionBlocks || (this._currentInitActionBlocks = []), f = this._dataView.getUint16(f.pos, !0), w.push({spriteId:f, actionsData:this.data.subarray(k + 2, k + r)}));
this.jumpToNextTag(r);
break;
case 12:
this.useAVM1 && (this._currentActionBlocks || (this._currentActionBlocks = [])).push(this.data.subarray(f.pos, f.pos + r));
this.jumpToNextTag(r);
break;
case 18:
;
case 45:
f = p.LowLevel.soundStreamHead(this.data, this._dataStream);
this._currentSoundStreamHead = p.SoundStream.FromTag(f);
break;
case 19:
this._currentSoundStreamBlock = this.data.subarray(f.pos, f.pos += r);
break;
case 43:
w = f.pos + r;
this._currentFrameLabel = p.readString(this.data, f, 0);
f.pos = w;
break;
case 1:
this.finishFrame();
break;
case 0:
break;
case 56:
w = f.pos + r;
r = p.readUi16(this.data, f);
for (l = this._currentExports || (this._currentExports = []);r--;) {
var k = p.readUi16(this.data, f), s = p.readString(this.data, f, 0);
if (f.pos > w) {
f.pos = w;
break;
}
l.push(new b(k, s));
}
f.pos = w;
break;
case 23:
;
case 17:
;
case 13:
;
case 62:
;
case 78:
;
case 57:
;
case 71:
c.Debug.warning("Unsupported tag encountered " + l + ": " + e[l]);
this.jumpToNextTag(r);
break;
case 74:
;
case 73:
;
case 65:
;
case 66:
this.jumpToNextTag(r);
break;
case 58:
;
case 64:
;
case 63:
;
case 88:
;
case 41:
;
case 77:
;
case 24:
this.jumpToNextTag(r);
break;
case 51:
;
case 44:
;
case 50:
;
case 53:
;
case 42:
;
case 38:
;
case 52:
;
case 3:
;
case 31:
;
case 47:
;
case 16:
;
case 29:
console.info("Ignored tag (these shouldn't occur) " + l + ": " + e[l]);
this.jumpToNextTag(r);
break;
default:
c.Debug.warning("Tag not handled by the parser: " + l + ": " + e[l]), this.jumpToNextTag(r);
}
}
} else {
this.jumpToNextTag(r);
}
}
}
}
}
};
k.prototype.parseSpriteTimeline = function(b) {
h.enterTimeline("parseSpriteTimeline");
var a = this.data, d = this._dataStream, e = this._dataView, k = {id:b.id, type:"sprite", frames:[]}, m = b.byteOffset + b.byteLength, l = k.frames, r = null, n = [], w = null, q = null, t = null, s = null;
d.pos = b.byteOffset + 2;
k.frameCount = e.getUint16(d.pos, !0);
d.pos += 2;
for (b = new g(0, 0, 0);d.pos < m;) {
this.parseNextTagHeader(b);
var z = b.byteLength, u = b.tagCode;
if (d.pos + z > m) {
c.Debug.warning("DefineSprite child tags exceed DefineSprite tag length and are dropped");
break;
}
if (p.ControlTags[u]) {
n.push(new g(u, d.pos, z)), d.pos += z;
} else {
switch(u) {
case 12:
this.useAVM1 && (t || (t = []), t.push(a.subarray(d.pos, d.pos + z)));
break;
case 59:
this.useAVM1 && (s || (s = []), u = e.getUint16(d.pos, !0), d.pos += 2, s.push({spriteId:u, actionsData:a.subarray(d.pos, d.pos + z)}));
break;
case 43:
z = d.pos + z;
r = p.readString(a, d, 0);
d.pos = z;
z = 0;
break;
case 1:
l.push(new f(n, r, w, q, t, s, null));
r = null;
n = [];
s = t = q = w = null;
break;
case 0:
d.pos = m, z = 0;
}
d.pos += z;
v(d.pos <= m);
}
}
h.leaveTimeline();
return k;
};
k.prototype.jumpToNextTag = function(b) {
this._dataStream.pos += b;
};
k.prototype.emitTagSlopWarning = function(b, a) {
var d = this._dataStream.pos - b.byteOffset;
c.Debug.warning("Scanning " + e[b.tagCode] + " at offset " + b.byteOffset + " consumed " + d + " of " + b.byteLength + " bytes. (" + (b.byteLength - d) + " left)");
this._dataStream.pos = a;
};
k.prototype.finishFrame = function() {
0 === this.pendingUpdateDelays && this.framesLoaded++;
this.frames.push(new f(this._currentControlTags, this._currentFrameLabel, this._currentSoundStreamHead, this._currentSoundStreamBlock, this._currentActionBlocks, this._currentInitActionBlocks, this._currentExports));
this._currentExports = this._currentInitActionBlocks = this._currentActionBlocks = this._currentSoundStreamBlock = this._currentSoundStreamHead = this._currentControlTags = this._currentFrameLabel = null;
};
k.prototype.setFileAttributes = function(b) {
this.attributes && this.jumpToNextTag(b);
b = this.data[this._dataStream.pos];
this._dataStream.pos += 4;
this.attributes = {network:b & 1, relativeUrls:b & 2, noCrossDomainCaching:b & 4, doAbc:b & 8, hasMetadata:b & 16, useGpu:b & 32, useDirectBlit:b & 64};
this.useAVM1 = !this.attributes.doAbc;
};
k.prototype.setSceneAndFrameLabelData = function(b) {
this.sceneAndFrameLabelData && this.jumpToNextTag(b);
this.sceneAndFrameLabelData = p.LowLevel.defineScene(this.data, this._dataStream, null);
};
k.prototype.addControlTag = function(b, a, d) {
(this._currentControlTags || (this._currentControlTags = [])).push(new g(b, a, d));
this.jumpToNextTag(d);
};
k.prototype.addLazySymbol = function(b, a, d) {
var g = this._dataStream.getUint16(this._dataStream.pos, !0);
a = new r(g, b, a, d);
this.dictionary[g] = a;
0 < h.traceLevel.value && console.info("Registering symbol " + g + " of type " + e[b]);
return a;
};
k.prototype.decodeEmbeddedFont = function(b) {
var d = this.getParsedTag(b);
b = new w(d.id, b, "font", d);
0 < h.traceLevel.value && console.info("Decoding embedded font " + d.id + " with name '" + d.name + "'", d);
this.eagerlyParsedSymbolsMap[b.id] = b;
this.eagerlyParsedSymbolsList.push(b);
this.fonts.push({name:d.name, id:d.id, style:a(d.bold, d.italic)});
};
k.prototype.registerEmbeddedFont = function(b) {
if (inFirefox) {
var d = this._dataStream, g = d.getUint16(d.pos, !0), e, f;
10 === b.tagCode ? (f = "__autofont__" + b.byteOffset, e = "regular") : (e = this.data[d.pos + 2], e = a(!!(e & 2), !!(e & 1)), f = this.data[d.pos + 4], d.pos += 5, f = p.readString(this.data, d, f));
this.fonts.push({name:f, id:g, style:e});
0 < h.traceLevel.value && console.info("Registering embedded font " + g + " with name '" + f + "'");
d.pos = b.byteOffset + b.byteLength;
} else {
this.decodeEmbeddedFont(b);
}
};
k.prototype.decodeEmbeddedImage = function(b) {
var a = this.getParsedTag(b), d = new w(a.id, b, "image", a);
0 < h.traceLevel.value && console.info("Decoding embedded image " + a.id + " of type " + e[b.tagCode] + " (start: " + b.byteOffset + ", end: " + (b.byteOffset + b.byteLength) + ")");
this.eagerlyParsedSymbolsMap[d.id] = d;
this.eagerlyParsedSymbolsList.push(d);
};
return k;
}();
h.SWFFile = k;
var f = function() {
return function(b, a, d, g, e, f, k) {
b && Object.freeze(b);
this.controlTags = b;
this.labelName = a;
e && Object.freeze(e);
this.soundStreamHead = d;
this.soundStreamBlock = g;
this.actionBlocks = e;
f && Object.freeze(f);
this.initActionBlocks = f;
k && Object.freeze(k);
this.exports = k;
};
}();
h.SWFFrame = f;
var d = function() {
return function() {
};
}();
h.ABCBlock = d;
h.InitActionBlock = function() {
return function() {
};
}();
var b = function() {
return function(b, a) {
this.symbolId = b;
this.className = a;
};
}();
h.SymbolExport = b;
var g = function() {
return function(b, a, d) {
this.tagCode = b;
this.byteOffset = a;
this.byteLength = d;
};
}();
h.UnparsedTag = g;
var r = function(b) {
function a(d, g, e, f) {
b.call(this, g, e, f);
this.id = d;
}
__extends(a, b);
return a;
}(g);
h.DictionaryEntry = r;
var w = function(b) {
function a(d, g, e, f) {
b.call(this, d, g.tagCode, g.byteOffset, g.byteLength);
this.type = e;
this.definition = f;
this.ready = !1;
}
__extends(a, b);
return a;
}(r);
h.EagerlyParsedDictionaryEntry = w;
})(c.SWF || (c.SWF = {}));
})(Shumway || (Shumway = {}));
(function(c) {
var h;
(function(a) {
a[a.JPG = 16767231] = "JPG";
a[a.PNG = 8998990] = "PNG";
a[a.GIF = 4671814] = "GIF";
})(h || (h = {}));
var a = {16767231:"image/jpeg", 8998990:"image/png", 4671814:"image/gif"};
h = function() {
function c(a, h) {
this.type = 4;
this.bytesLoaded = a.length;
a.length === h ? this.data = a : (this.data = new Uint8Array(h), this.data.set(a));
this.setMimetype();
}
Object.defineProperty(c.prototype, "bytesTotal", {get:function() {
return this.data.length;
}, enumerable:!0, configurable:!0});
c.prototype.appendLoadedData = function(a) {
this.data.set(a, this.bytesLoaded);
this.bytesLoaded += a.length;
};
c.prototype.setMimetype = function() {
this.mimeType = a[this.data[0] << 16 | this.data[1] << 8 | this.data[2]];
};
return c;
}();
c.ImageFile = h;
})(Shumway || (Shumway = {}));
(function(c) {
var h = c.Debug.assert, a = c.SWF.SWFFile, s = function() {
return function(a, c) {
this.bytesLoaded = a;
this.framesLoaded = c;
};
}();
c.LoadProgressUpdate = s;
var v = function() {
function p(a) {
h(a);
this._file = null;
this._listener = a;
this._delayedUpdatesPromise = this._loadingServiceSession = null;
this._bytesLoaded = 0;
}
p.prototype.loadFile = function(a) {
this._bytesLoaded = 0;
var e = this._loadingServiceSession = c.FileLoadingService.instance.createSession();
e.onopen = this.processLoadOpen.bind(this);
e.onprogress = this.processNewData.bind(this);
e.onerror = this.processError.bind(this);
e.onclose = this.processLoadClose.bind(this);
e.open(a);
};
p.prototype.abortLoad = function() {
};
p.prototype.loadBytes = function(a) {
this.processLoadOpen();
this.processNewData(a, {bytesLoaded:a.length, bytesTotal:a.length});
this.processLoadClose();
};
p.prototype.processLoadOpen = function() {
h(!this._file);
};
p.prototype.processNewData = function(l, e) {
this._bytesLoaded += l.length;
if (8192 > this._bytesLoaded && this._bytesLoaded < e.bytesTotal) {
this._queuedInitialData || (this._queuedInitialData = new Uint8Array(Math.min(8192, e.bytesTotal))), this._queuedInitialData.set(l, this._bytesLoaded - l.length);
} else {
if (this._queuedInitialData) {
var m = new Uint8Array(this._bytesLoaded);
m.set(this._queuedInitialData);
m.set(l, this._bytesLoaded - l.length);
l = m;
this._queuedInitialData = null;
}
var t = this._file, q = m = 0;
if (t) {
t instanceof a && (m = t.eagerlyParsedSymbolsList.length, q = t.framesLoaded), t.appendLoadedData(l);
} else {
var t = l, n = e.bytesTotal, k = t[0] << 16 | t[1] << 8 | t[2], t = 22355 === (k & 65535) ? new a(t, n) : 16767231 === k || 8998990 === k || 4671814 === k ? new c.ImageFile(t, n) : null;
t = this._file = t;
this._listener.onLoadOpen(t);
}
if (t instanceof a) {
this.processSWFFileUpdate(t, m, q);
} else {
if (h(t instanceof c.ImageFile), this._listener.onLoadProgress(new s(e.bytesLoaded, -1)), e.bytesLoaded === e.bytesTotal) {
this._listener.onImageBytesLoaded();
}
}
}
};
p.prototype.processError = function(a) {
c.Debug.warning("Loading error encountered:", a);
};
p.prototype.processLoadClose = function() {
this._file.bytesLoaded !== this._file.bytesTotal && c.Debug.warning("Not Implemented: processing loadClose when loading was aborted");
};
p.prototype.processSWFFileUpdate = function(a, e, m) {
var t;
if (e = a.eagerlyParsedSymbolsList.length - e) {
t = this._listener.onNewEagerlyParsedSymbols(a.eagerlyParsedSymbolsList, e);
this._delayedUpdatesPromise && (t = Promise.all([this._delayedUpdatesPromise, t]));
this._delayedUpdatesPromise = t;
this._lastDelayedUpdate = n = new s(a.bytesLoaded, a.frames.length);
a.pendingUpdateDelays++;
var q = this;
a.framesLoaded = m;
t.then(function() {
0 < c.SWF.traceLevel.value && console.log("Reducing pending update delays from " + a.pendingUpdateDelays + " to " + (a.pendingUpdateDelays - 1));
a.pendingUpdateDelays--;
h(0 <= a.pendingUpdateDelays);
a.framesLoaded = n.framesLoaded;
q._listener.onLoadProgress(n);
q._delayedUpdatesPromise === t && (q._delayedUpdatesPromise = null, q._lastDelayedUpdate = null);
});
} else {
var n = this._lastDelayedUpdate;
n ? (h(n.framesLoaded <= a.frames.length), n.bytesLoaded = a.bytesLoaded, n.framesLoaded = a.frames.length) : (h(a.framesLoaded === a.frames.length), this._listener.onLoadProgress(new s(a.bytesLoaded, a.framesLoaded)));
}
};
return p;
}();
c.FileLoader = v;
var p;
(function(a) {
a[a.SWF = 22355] = "SWF";
a[a.JPG = 16767231] = "JPG";
a[a.PNG = 8998990] = "PNG";
a[a.GIF = 4671814] = "GIF";
})(p || (p = {}));
})(Shumway || (Shumway = {}));
console.timeEnd("Load SWF Parser");
console.time("Load Flash TS Dependencies");
(function(c) {
function h(a) {
var e = {};
a = a.split(",");
for (var k = 0;k < a.length;k++) {
e[a[k]] = !0;
}
return e;
}
var a = /^<([-A-Za-z0-9_]+)((?:\s+[-A-Za-z0-9_]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/, s = /^<\/([-A-Za-z0-9_]+)[^>]*>/, v = /([-A-Za-z0-9_]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g, p = h("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"), u = h("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),
l = h("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"), e = h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"), m = h("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"), t = h("script,style");
c.HTMLParser = function(c, n) {
function k() {
return this[this.length - 1];
}
function f(b, a, g, f) {
a = a.toLowerCase();
if (u[a]) {
for (;k() && l[k()];) {
d("", k());
}
}
e[a] && k() == a && d("", a);
(f = p[a] || !!f) || r.push(a);
if (n.start) {
var c = Object.create(null);
g.replace(v, function(b, a, d, g, e) {
a = a.toLowerCase();
c[a] = d ? d : g ? g : e ? e : m[a] ? a : "";
return b;
});
n.start && n.start(a, c, !!f);
}
}
function d(b, a) {
if (a) {
for (d = r.length - 1;0 <= d && r[d] != a;d--) {
}
} else {
var d = 0
}
if (0 <= d) {
for (var g = r.length - 1;g >= d;g--) {
n.end && n.end(r[g]);
}
r.length = d;
}
}
for (var b, g, r = [], w = c;c;) {
g = !0;
if (k() && t[k()]) {
c = c.replace(new RegExp("(.*)</" + k() + "[^>]*>"), function(b, a) {
a = a.replace(/\x3c!--(.*?)--\x3e/g, "$1").replace(/<!\[CDATA\[(.*?)]]\x3e/g, "$1");
n.chars && n.chars(a);
return "";
}), d("", k());
} else {
if (0 == c.indexOf("\x3c!--")) {
b = c.indexOf("--\x3e"), 0 <= b && (n.comment && n.comment(c.substring(4, b)), c = c.substring(b + 3), g = !1);
} else {
if (0 == c.indexOf("</")) {
if (b = c.match(s)) {
c = c.substring(b[0].length), b[0].replace(s, d), g = !1;
}
} else {
0 == c.indexOf("<") && (b = c.match(a)) && (c = c.substring(b[0].length), b[0].replace(a, f), g = !1);
}
}
g && (b = c.indexOf("<"), g = 0 > b ? c : c.substring(0, b), c = 0 > b ? "" : c.substring(b), n.chars && n.chars(g));
}
if (c == w) {
throw "Parse Error: " + c;
}
w = c;
}
d();
};
})(Shumway || (Shumway = {}));
(function(c) {
var h = c.Debug.notImplemented, a = c.Debug.somewhatImplemented, s = c.Bounds, v = c.ArrayUtilities.DataBuffer, p = c.ColorUtilities, u = c.AVM2.AS.flash;
(function(a) {
a[a.None = 0] = "None";
a[a.DirtyBounds = 1] = "DirtyBounds";
a[a.DirtyContent = 2] = "DirtyContent";
a[a.DirtyStyle = 4] = "DirtyStyle";
a[a.DirtyFlow = 8] = "DirtyFlow";
a[a.Dirty = a.DirtyBounds | a.DirtyContent | a.DirtyStyle | a.DirtyFlow] = "Dirty";
})(c.TextContentFlags || (c.TextContentFlags = {}));
var l = {lt:"<", gt:">", amp:"&", quot:'"', apos:"'", nbsp:"\u00a0"}, e = function() {
function e(a) {
this._id = u.display.DisplayObject.getNextSyncID();
this._bounds = new s(0, 0, 0, 0);
this._plainText = "";
this._autoSize = this._borderColor = this._backgroundColor = 0;
this._wordWrap = !1;
this._scrollV = 1;
this.flags = this._scrollH = 0;
this.defaultTextFormat = a || new u.text.TextFormat;
this.textRuns = [];
this.textRunData = new v;
this.coords = this.matrix = null;
}
e.prototype.parseHtml = function(e, m, n) {
var k = "", f = this.textRuns, d = f.length = 0, b = 0, g = this.defaultTextFormat.clone(), r = null, w = [], s;
c.HTMLParser(e, s = {chars:function(a) {
for (var e = "", m = 0;m < a.length;m++) {
var n = a.charAt(m);
if ("&" !== n) {
e += n;
} else {
if (n = c.StringUtilities.indexOfAny(a, ["&", ";"], m + 1), 0 < n) {
m = a.substring(m + 1, n);
if (1 < m.length && "#" === m.charAt(0)) {
var w = 0, w = 2 < m.length && "x" === m.charAt(1) ? parseInt(m.substring(1)) : parseInt(m.substring(2), 16), e = e + String.fromCharCode(w)
} else {
void 0 !== l[m] ? e += l[m] : c.Debug.unexpected(m);
}
m = n;
} else {
for (var q in l) {
if (a.indexOf(q, m + 1) === m + 1) {
e += l[q];
m += q.length;
break;
}
}
}
}
}
a = e;
k += a;
b += a.length;
b - d && (r && r.textFormat.equals(g) ? r.endIndex = b : (r = new u.text.TextRun(d, b, g), f.push(r)), d = b);
}, start:function(b, d) {
var e = !1;
m && (e = m.hasStyle(b)) && (w.push(g), g = g.clone(), m.applyStyle(g, b));
switch(b) {
case "a":
w.push(g);
a("<a/>");
var f = d.target || g.target, c = d.url || g.url;
if (f !== g.target || c !== g.url) {
e || (g = g.clone()), g.target = f, g.url = c;
}
break;
case "b":
w.push(g);
g.bold || (e || (g = g.clone()), g.bold = !0);
break;
case "font":
w.push(g);
var f = p.isValidHexColor(d.color) ? p.hexToRGB(d.color) : g.color, c = d.face || g.font, l = isNaN(d.size) ? g.size : +d.size;
if (f !== g.color || c !== g.font || l !== g.size) {
e || (g = g.clone()), g.color = f, g.font = c, g.size = l;
}
break;
case "img":
h("<img/>");
break;
case "i":
w.push(g);
g.italic || (e || (g = g.clone()), g.italic = !0);
break;
case "li":
if (w.push(g), g.bullet || (e || (g = g.clone()), g.bullet = !0), "\r" === k[k.length - 1]) {
break;
}
;
case "br":
n && s.chars("\r");
break;
case "span":
;
case "p":
f = !1;
w.push(g);
m && d.class && (c = "." + d.class, f = m.hasStyle(c)) && (e || (g = g.clone()), m.applyStyle(g, c));
if ("span" === b) {
break;
}
c = d.align;
-1 < u.text.TextFormatAlign.toNumber(c) && c !== g.align && (e || f || (g = g.clone()), g.align = c);
break;
case "textformat":
w.push(g);
var f = isNaN(d.blockindent) ? g.blockIndent : +d.blockindent, c = isNaN(d.indent) ? g.indent : +d.indent, l = isNaN(d.leading) ? g.leading : +d.leading, r = isNaN(d.leftmargin) ? g.leftMargin : +d.leftmargin, t = isNaN(d.rightmargin) ? g.rightMargin : +d.rightmargin;
if (f !== g.blockIndent || c !== g.indent || l !== g.leading || r !== g.leftMargin || t !== g.rightMargin) {
e || (g = g.clone()), g.blockIndent = f, g.indent = c, g.leading = l, g.leftMargin = r, g.rightMargin = t;
}
break;
case "u":
w.push(g), g.underline || (e || (g = g.clone()), g.underline = !0);
}
}, end:function(b) {
switch(b) {
case "li":
;
case "p":
n && s.chars("\r");
case "a":
;
case "b":
;
case "font":
;
case "i":
;
case "textformat":
;
case "u":
g = w.pop(), m && m.hasStyle(b) && (g = w.pop());
}
}});
this._plainText = k;
this._serializeTextRuns();
};
Object.defineProperty(e.prototype, "plainText", {get:function() {
return this._plainText;
}, set:function(a) {
this._plainText = a;
this.textRuns.length = 0;
a && (a = new u.text.TextRun(0, a.length, this.defaultTextFormat), this.textRuns[0] = a);
this._serializeTextRuns();
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "bounds", {get:function() {
return this._bounds;
}, set:function(a) {
this._bounds.copyFrom(a);
this.flags |= 1;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "autoSize", {get:function() {
return this._autoSize;
}, set:function(a) {
a !== this._autoSize && (this._autoSize = a, this._plainText && (this.flags |= 8));
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "wordWrap", {get:function() {
return this._wordWrap;
}, set:function(a) {
a !== this._wordWrap && (this._wordWrap = a, this._plainText && (this.flags |= 8));
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "scrollV", {get:function() {
return this._scrollV;
}, set:function(a) {
a !== this._scrollV && (this._scrollV = a, this._plainText && (this.flags |= 8));
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "scrollH", {get:function() {
return this._scrollH;
}, set:function(a) {
a !== this._scrollH && (this._scrollH = a, this._plainText && (this.flags |= 8));
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "backgroundColor", {get:function() {
return this._backgroundColor;
}, set:function(a) {
a !== this._backgroundColor && (this._backgroundColor = a, this.flags |= 4);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "borderColor", {get:function() {
return this._borderColor;
}, set:function(a) {
a !== this._borderColor && (this._borderColor = a, this.flags |= 4);
}, enumerable:!0, configurable:!0});
e.prototype._serializeTextRuns = function() {
var a = this.textRuns;
this.textRunData.clear();
for (var e = 0;e < a.length;e++) {
this._writeTextRun(a[e]);
}
this.flags |= 2;
};
e.prototype._writeTextRun = function(a) {
var e = this.textRunData;
e.writeInt(a.beginIndex);
e.writeInt(a.endIndex);
a = a.textFormat;
var c = +a.size;
e.writeInt(c);
var k = u.text.Font.getByNameAndStyle(a.font, a.style) || u.text.Font.getDefaultFont();
k.fontType === u.text.FontType.EMBEDDED ? e.writeUTF("swffont" + k._id) : e.writeUTF(k._fontFamily);
e.writeInt(k.ascent * c);
e.writeInt(k.descent * c);
e.writeInt(null === a.leading ? k.leading * c : +a.leading);
var f = c = !1;
k.fontType === u.text.FontType.DEVICE && (c = null === a.bold ? k.fontStyle === u.text.FontStyle.BOLD || k.fontType === u.text.FontStyle.BOLD_ITALIC : !!a.bold, f = null === a.italic ? k.fontStyle === u.text.FontStyle.ITALIC || k.fontType === u.text.FontStyle.BOLD_ITALIC : !!a.italic);
e.writeBoolean(c);
e.writeBoolean(f);
e.writeInt(+a.color);
e.writeInt(u.text.TextFormatAlign.toNumber(a.align));
e.writeBoolean(!!a.bullet);
e.writeInt(+a.indent);
e.writeInt(+a.kerning);
e.writeInt(+a.leftMargin);
e.writeInt(+a.letterSpacing);
e.writeInt(+a.rightMargin);
e.writeBoolean(!!a.underline);
};
e.prototype.appendText = function(a, e) {
e || (e = this.defaultTextFormat);
var c = this._plainText, k = new u.text.TextRun(c.length, c.length + a.length, e);
this._plainText = c + a;
this.textRuns.push(k);
this._writeTextRun(k);
};
e.prototype.prependText = function(a, e) {
e || (e = this.defaultTextFormat);
this._plainText = a + this._plainText;
for (var c = this.textRuns, k = a.length, f = 0;f < c.length;f++) {
var d = c[f];
d.beginIndex += k;
d.endIndex += k;
}
c.unshift(new u.text.TextRun(0, k, e));
this._serializeTextRuns();
};
e.prototype.replaceText = function(a, e, c, k) {
if (!(e < a) && c) {
if (0 === e) {
this.prependText(c, k);
} else {
var f = this._plainText;
if (a >= f.length) {
this.appendText(c, k);
} else {
var d = this.defaultTextFormat, b = d;
k && (b = b.clone(), b.merge(k));
if (0 >= a && e >= f.length) {
k ? (this.defaultTextFormat = b, this.plainText = c, this.defaultTextFormat = d) : this.plainText = c;
} else {
for (var d = this.textRuns, g = [], m = a + c.length, l = m - e, h = 0;h < d.length;h++) {
var s = d[h];
if (a < s.endIndex) {
if (a <= s.beginIndex && m >= s.endIndex) {
continue;
}
var p = s.containsIndex(a), v = s.containsIndex(e);
if (p && v) {
if (k) {
p = s.clone();
p.endIndex = a;
g.push(p);
h--;
s.beginIndex = a + 1;
continue;
}
} else {
p ? s.endIndex = a : v ? k ? (g.push(new u.text.TextRun(a, m, b)), s.beginIndex = m) : (s.beginIndex = a, s.endIndex += l) : (s.beginIndex += l, s.endIndex += l);
}
}
g.push(s);
}
this._plainText = f.substring(0, a) + c + f.substring(e);
this.textRuns = g;
this._serializeTextRuns();
}
}
}
}
};
return e;
}();
c.TextContent = e;
})(Shumway || (Shumway = {}));
var Shumway$$inline_755 = Shumway || (Shumway = {}), AVM2$$inline_756 = Shumway$$inline_755.AVM2 || (Shumway$$inline_755.AVM2 = {}), AS$$inline_757 = AVM2$$inline_756.AS || (AVM2$$inline_756.AS = {});
AS$$inline_757.flashOptions = Shumway$$inline_755.Settings.shumwayOptions.register(new Shumway$$inline_755.Options.OptionSet("Flash Options"));
AS$$inline_757.traceEventsOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option("te", "Trace Events", "boolean", !1, "Trace dispatching of events."));
AS$$inline_757.traceLoaderOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option("tp", "Trace Loader", "boolean", !1, "Trace loader execution."));
AS$$inline_757.disableAudioOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option("da", "Disable Audio", "boolean", !1, "Disables audio."));
AS$$inline_757.webAudioOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use WebAudio for Sound", "boolean", !1, "Enables WebAudio API for MovieClip sound stream. (MP3 format is an exception)"));
AS$$inline_757.webAudioMP3Option = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use MP3 decoding to WebAudio", "boolean", !1, "Enables WebAudio API and software MP3 decoding and disables any AUDIO tag usage for MP3 format"));
AS$$inline_757.mediaSourceOption = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use Media Source for Video", "boolean", !1, "Enables Media Source Extension API for NetStream."));
AS$$inline_757.mediaSourceMP3Option = AS$$inline_757.flashOptions.register(new Shumway$$inline_755.Options.Option(null, "Use Media Source for MP3", "boolean", !0, "Enables Media Source Extension API for MP3 streams."));
__extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(h) {
var a = c.isInteger, s = c.Debug.assert, v = c.Debug.warning, p = c.Bounds, u = c.AVM2.AS.flash, l = function() {
function e(m, l) {
s(a(m.id));
this.data = m;
if (m.className) {
var n = c.AVM2.Runtime.AVM2.instance.applicationDomain;
try {
this.symbolClass = n.getClass(m.className);
} catch (k) {
v("Symbol " + m.id + " bound to non-existing class " + m.className), this.symbolClass = l;
}
} else {
this.symbolClass = l;
}
this.isAVM1Object = !1;
}
Object.defineProperty(e.prototype, "id", {get:function() {
return this.data.id;
}, enumerable:!0, configurable:!0});
return e;
}();
h.Symbol = l;
var e = function(a) {
function e(c, l, k) {
a.call(this, c, l);
this.dynamic = k;
}
__extends(e, a);
e.prototype._setBoundsFromData = function(a) {
this.fillBounds = a.fillBounds ? p.FromUntyped(a.fillBounds) : null;
this.lineBounds = a.lineBounds ? p.FromUntyped(a.lineBounds) : null;
!this.lineBounds && this.fillBounds && (this.lineBounds = this.fillBounds.clone());
};
return e;
}(l);
h.DisplaySymbol = e;
l = function(a) {
function e(c) {
a.call(this, c, u.utils.ByteArray);
}
__extends(e, a);
e.FromData = function(a) {
var c = new e(a);
c.buffer = a.data;
c.byteLength = a.data.byteLength;
return c;
};
return e;
}(l);
h.BinarySymbol = l;
h.SoundStart = function() {
return function(a, e) {
this.soundId = a;
this.soundInfo = e;
};
}();
})(c.Timeline || (c.Timeline = {}));
})(Shumway || (Shumway = {}));
var RtmpJs;
(function(c) {
var h = function() {
function a(c) {
this.onmessage = null;
this.id = c;
this.buffer = null;
this.bufferLength = 0;
this.lastStreamId = -1;
this.lastTypeId = this.lastLength = this.lastTimestamp = 0;
this.lastMessageComplete = !1;
this.waitingForBytes = 0;
this.sentStreamId = -1;
this.sentTypeId = this.sentLength = this.sentTimestamp = 0;
}
a.prototype.setBuffer = function() {
this.buffer || (this.buffer = new Uint8Array(128), this.bufferLength = 0);
};
a.prototype.abort = function() {
this.buffer ? this.bufferLength = 0 : this.lastMessageComplete || (this.lastMessageComplete = !0, this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:null, firstChunk:!1, lastChunk:!0}));
};
a.prototype._push = function(a, c, h) {
if (this.onmessage) {
if (c && h || !this.buffer) {
this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:a, firstChunk:c, lastChunk:h});
} else {
if (c && (this.bufferLength = 0, this.lastLength > this.buffer.length && (this.buffer = new Uint8Array(this.lastLength))), this.buffer.set(a, this.bufferLength), this.bufferLength += a.length, h) {
this.onmessage({timestamp:this.lastTimestamp, streamId:this.lastStreamId, chunkedStreamId:this.id, typeId:this.lastTypeId, data:this.buffer.subarray(0, this.bufferLength), firstChunk:!0, lastChunk:!0});
}
}
}
};
return a;
}();
c.ChunkedStream = h;
var a = function() {
function a() {
this.onack = this.onusercontrolmessage = null;
this.ondata = function(a) {
};
this.onclose = function() {
};
this.oncreated = null;
this.state = "uninitialized";
this.buffer = new Uint8Array(4092);
this.bufferLength = 0;
this.chunkSize = 128;
this.chunkStreams = [];
this.peerChunkSize = 128;
this.lastAckSent = this.bytesReceived = this.windowAckSize = this.bandwidthLimitType = this.peerAckWindowSize = 0;
}
a.prototype.push = function(a) {
var c = a.length + this.bufferLength;
if (c > this.buffer.length) {
for (var h = 2 * this.buffer.length;c > h;) {
h *= 2;
}
524288 < h && this._fail("Buffer overflow");
h = new Uint8Array(h);
h.set(this.buffer);
this.buffer = h;
}
for (var h = 0, l = this.bufferLength;h < a.length;h++, l++) {
this.buffer[l] = a[h];
}
this.bufferLength = c;
this.bytesReceived += a.length;
for (this.peerAckWindowSize && this.bytesReceived - this.lastAckSent >= this.peerAckWindowSize && this._sendAck();0 < this.bufferLength;) {
a = 0;
switch(this.state) {
case "uninitialized":
if (1 > this.bufferLength) {
return;
}
this.serverVersion = this.buffer[0];
a = 1;
3 !== this.serverVersion && this._fail("Unsupported protocol version: " + this.serverVersion);
this.state = "version_received";
break;
case "version_received":
if (1536 > this.bufferLength) {
return;
}
a = 1536;
c = Date.now() - this.epochStart | 0;
this.buffer[4] = c >>> 24 & 255;
this.buffer[5] = c >>> 16 & 255;
this.buffer[6] = c >>> 8 & 255;
this.buffer[7] = c & 255;
this.ondata(this.buffer.subarray(0, 1536));
this.state = "ack_sent";
break;
case "ack_sent":
if (1536 > this.bufferLength) {
return;
}
a = 1536;
for (h = 8;1536 > h;h++) {
this.buffer[h] !== this.randomData[h] && this._fail("Random data do not match @" + h);
}
this.state = "handshake_done";
this.lastAckSent = this.bytesReceived;
this._initialize();
break;
case "handshake_done":
a = this._parseChunkedData();
if (!a) {
return;
}
break;
default:
return;
}
this.buffer.set(this.buffer.subarray(a, this.bufferLength), 0);
this.bufferLength -= a;
}
};
a.prototype._initialize = function() {
var a = this._getChunkStream(2);
a.setBuffer();
a.onmessage = function(a) {
if (0 === a.streamId) {
switch(console.log("Control message: " + a.typeId), a.typeId) {
case 1:
var c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3];
1 <= c && 2147483647 >= c && (this.peerChunkSize = c);
break;
case 2:
c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3];
3 <= c && 65599 >= c && this._getChunkStream(c).abort();
break;
case 3:
if (this.onack) {
this.onack();
}
break;
case 4:
if (this.onusercontrolmessage) {
this.onusercontrolmessage({type:a.data[0] << 8 | a.data[1], data:a.data.subarray(2)});
}
break;
case 5:
c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3];
if (0 > c) {
break;
}
this.peerAckWindowSize = c;
break;
case 6:
c = a.data[0] << 24 | a.data[1] << 16 | a.data[2] << 8 | a.data[3];
a = a.data[4];
if (0 > c || 2 < a) {
break;
}
if (1 === a || 2 === a && 1 === this.bandwidthLimitType) {
c = Math.min(this.windowAckSize, c);
}
c !== this.ackWindowSize && (this.ackWindowSize = c, c = new Uint8Array([c >>> 24 & 255, c >>> 16 & 255, c >>> 8 & 255, c & 255]), this._sendMessage(2, {typeId:5, streamId:0, data:c}), 2 !== a && (this.bandwidthLimitType = a));
}
}
}.bind(this);
if (this.oncreated) {
this.oncreated();
}
};
a.prototype.setChunkSize = function(a) {
if (1 > a || 2147483647 < a) {
throw Error("Invalid chunk size");
}
this._sendMessage(2, {streamId:0, typeId:1, data:new Uint8Array([a >>> 24 & 255, a >>> 16 & 255, a >>> 8 & 255, a & 255])});
this.chunkSize = a;
};
a.prototype.send = function(a, c) {
if (3 > a || 65599 < a) {
throw Error("Invalid chunkStreamId");
}
return this._sendMessage(a, c);
};
a.prototype.sendUserControlMessage = function(a, c) {
var h = new Uint8Array(2 + c.length);
h[0] = a >> 8 & 255;
h[1] = a & 255;
h.set(c, 2);
this._sendMessage(2, {typeId:4, streamId:0, data:h});
};
a.prototype._sendAck = function() {
var a = new Uint8Array([this.bytesReceived >>> 24 & 255, this.bytesReceived >>> 16 & 255, this.bytesReceived >>> 8 & 255, this.bytesReceived & 255]);
this._sendMessage(2, {typeId:3, streamId:0, data:a});
};
a.prototype._sendMessage = function(a, c) {
var h = c.data, l = h.length, e = this._getChunkStream(a), m = ("timestamp" in c ? c.timestamp : Date.now() - this.epochStart) | 0, t = m - e.sentTimestamp | 0, q = new Uint8Array(this.chunkSize + 18), n;
64 > a ? (n = 1, q[0] = a) : 320 > a ? (n = 2, q[0] = 0, q[1] = a - 64) : (n = 3, q[0] = 1, q[1] = a - 64 >> 8 & 255, q[2] = a - 64 & 255);
var k = n, f = 0;
c.streamId !== e.sentStreamId || 0 > t ? (0 !== (m & 4278190080) ? (f = m, q[k] = q[k + 1] = q[k + 2] = 255) : (q[k] = m >> 16 & 255, q[k + 1] = m >> 8 & 255, q[k + 2] = m & 255), k += 3, q[k++] = l >> 16 & 255, q[k++] = l >> 8 & 255, q[k++] = l & 255, q[k++] = c.typeId, q[k++] = c.streamId & 255, q[k++] = c.streamId >> 8 & 255, q[k++] = c.streamId >> 16 & 255, q[k++] = c.streamId >> 24 & 255) : l !== e.sentLength || c.typeId !== e.sentTypeId ? (q[0] |= 64, 0 !== (t & 4278190080) ? (f = t,
q[k] = q[k + 1] = q[k + 2] = 255) : (q[k] = t >> 16 & 255, q[k + 1] = t >> 8 & 255, q[k + 2] = t & 255), k += 3, q[k++] = l >> 16 & 255, q[k++] = l >> 8 & 255, q[k++] = l & 255, q[k++] = c.typeId) : 0 !== t ? (q[0] |= 128, 0 !== (t & 4278190080) ? (f = t, q[k] = q[k + 1] = q[k + 2] = 255) : (q[k] = t >> 16 & 255, q[k + 1] = t >> 8 & 255, q[k + 2] = t & 255), k += 3) : q[0] |= 192;
f && (q[k++] = f >>> 24 & 255, q[k++] = f >>> 16 & 255, q[k++] = f >>> 8 & 255, q[k++] = f & 255);
e.sentTimestamp = m;
e.sentStreamId = c.streamId;
e.sentTypeId = c.typeId;
e.sentLength = l;
for (e = 0;e < l;) {
t = Math.min(l - e, this.chunkSize), q.set(h.subarray(e, e + t), k), e += t, this.ondata(q.subarray(0, k + t)), q[0] |= 192, k = n;
}
return m;
};
a.prototype._getChunkStream = function(a) {
var c = this.chunkStreams[a];
c || (this.chunkStreams[a] = c = new h(a), c.setBuffer(), c.onmessage = function(a) {
if (this.onmessage) {
this.onmessage(a);
}
}.bind(this));
return c;
};
a.prototype._parseChunkedData = function() {
if (!(1 > this.bufferLength)) {
var a = this.buffer[0] >> 6 & 3, c = 1, h = this.buffer[0] & 63;
if (0 === h) {
if (2 > this.bufferLength) {
return;
}
h = this.buffer[1] + 64;
c = 2;
} else {
if (1 === h) {
if (2 > this.bufferLength) {
return;
}
h = (this.buffer[1] << 8) + this.buffer[2] + 64;
c = 3;
}
}
var l = 0 === a ? 11 : 1 === a ? 7 : 2 === a ? 3 : 0;
if (!(this.bufferLength < c + l)) {
var e = 3 !== a && 255 === this.buffer[c] && 255 === this.buffer[c + 1] && 255 === this.buffer[c + 2] ? 4 : 0, m = c + l + e;
if (!(this.bufferLength < m)) {
var t = this._getChunkStream(h), q;
q = 3 === a ? t.lastTimestamp : this.buffer[c] << 16 | this.buffer[c + 1] << 8 | this.buffer[c + 2];
e && (q = c + l, q = this.buffer[q] << 24 | this.buffer[q + 1] << 16 | this.buffer[q + 2] << 8 | this.buffer[q + 3]);
if (1 === a || 2 === a) {
q = t.lastTimestamp + q | 0;
}
var l = t.lastLength, e = t.lastTypeId, n = t.lastStreamId;
if (0 === a || 1 === a) {
l = this.buffer[c + 3] << 16 | this.buffer[c + 4] << 8 | this.buffer[c + 5], e = this.buffer[c + 6];
}
0 === a && (n = this.buffer[c + 10] << 24 | this.buffer[c + 9] << 16 | this.buffer[c + 8] << 8 | this.buffer[c + 7]);
var k;
3 === a && t.waitingForBytes ? (k = !1, a = Math.min(t.waitingForBytes, this.peerChunkSize), c = t.waitingForBytes - a) : (k = !0, a = Math.min(l, this.peerChunkSize), c = l - a);
if (!(this.bufferLength < m + a)) {
return!k && c || console.log("Chunk received: cs:" + h + "; f/l:" + k + "/" + !c + "; len:" + l), t.lastTimestamp = q, t.lastLength = l, t.lastTypeId = e, t.lastStreamId = n, t.lastMessageComplete = !c, t.waitingForBytes = c, t._push(this.buffer.subarray(m, m + a), k, !c), m + a;
}
}
}
}
};
a.prototype.start = function() {
this.epochStart = Date.now();
this.ondata(new Uint8Array([3]));
this.randomData = new Uint8Array(1536);
this.randomData[0] = 0;
this.randomData[1] = 0;
this.randomData[2] = 0;
this.randomData[3] = 0;
for (var a = 8;1536 > a;a++) {
this.randomData[a] = 256 * Math.random() | 0;
}
this.ondata(this.randomData);
console.log("## connected");
};
a.prototype.stop = function(a) {
a && console.error("socket error!!!");
console.log("## closed");
};
a.prototype._fail = function(a) {
console.error("failed: " + a);
this.state = "failed";
this.onclose();
throw Error(a);
};
return a;
}();
c.ChunkedChannel = a;
})(RtmpJs || (RtmpJs = {}));
(function(c) {
var h = Shumway.AVM2.AS.flash, a = function() {
function a() {
this._streams = [];
}
a.prototype.connect = function(a, c) {
throw Error("Abstract BaseTransport.connect method");
};
a.prototype._initChannel = function(a, v) {
var l = new c.ChunkedChannel, e = this;
l.oncreated = function() {
var e = new h.utils.ByteArray;
e.objectEncoding = 0;
e.writeObject("connect");
e.writeObject(1);
e.writeObject(a);
e.writeObject(v || null);
console.log(".. Connect sent");
l.send(3, {streamId:0, typeId:20, data:new Uint8Array(e._buffer, 0, e.length)});
};
l.onmessage = function(a) {
console.log(".. Data received: typeId:" + a.typeId + ", streamId:" + a.streamId + ", cs: " + a.chunkedStreamId);
if (0 !== a.streamId) {
e._streams[a.streamId]._push(a);
} else {
if (20 === a.typeId || 17 === a.typeId) {
var c = new h.utils.ByteArray;
c.writeRawBytes(a.data);
c.position = 0;
c.objectEncoding = 20 === a.typeId ? 0 : 3;
a = c.readObject();
void 0 === a && (c.objectEncoding = 0, a = c.readObject());
var l = c.readObject();
if ("_result" === a || "_error" === a) {
if (a = "_error" === a, 1 === l) {
if (l = c.readObject(), c = c.readObject(), e.onconnected) {
e.onconnected({properties:l, information:c, isError:a});
}
} else {
var n = c.readObject(), c = c.readObject();
if (e.onstreamcreated) {
var k = new s(e, c);
e._streams[c] = k;
e.onstreamcreated({transactionId:l, commandObject:n, streamId:c, stream:k, isError:a});
}
}
} else {
"onBWCheck" === a || "onBWDone" === a ? e.sendCommandOrResponse("_error", l, null, {code:"NetConnection.Call.Failed", level:"error"}) : (c.readObject(), c.position < c.length && c.readObject());
}
}
}
};
l.onusercontrolmessage = function(a) {
console.log(".. Event " + a.type + " +" + a.data.length + " bytes");
6 === a.type && l.sendUserControlMessage(7, a.data);
};
return this.channel = l;
};
a.prototype.call = function(a, c, l, e) {
var m = this.channel, t = new h.utils.ByteArray;
t.objectEncoding = 0;
t.writeObject(a);
t.writeObject(c);
t.writeObject(l);
t.writeObject(e);
m.send(3, {streamId:0, typeId:20, data:new Uint8Array(t._buffer, 0, t.length)});
};
a.prototype.createStream = function(a) {
this.sendCommandOrResponse("createStream", a, null);
};
a.prototype.sendCommandOrResponse = function(a, c, l, e) {
var m = this.channel, t = new h.utils.ByteArray;
t.writeByte(0);
t.objectEncoding = 0;
t.writeObject(a);
t.writeObject(c);
t.writeObject(l || null);
3 < arguments.length && t.writeObject(e);
m.send(3, {streamId:0, typeId:17, data:new Uint8Array(t._buffer, 0, t.length)});
};
a.prototype._setBuffer = function(a) {
this.channel.sendUserControlMessage(3, new Uint8Array([a >> 24 & 255, a >> 16 & 255, a >> 8 & 255, a & 255, 0, 0, 0, 100]));
};
a.prototype._sendCommand = function(a, c) {
this.channel.send(8, {streamId:a, typeId:20, data:c});
};
return a;
}();
c.BaseTransport = a;
var s = function() {
function a(c, h) {
this.transport = c;
this.streamId = h;
}
a.prototype.play = function(a, c, l, e) {
var m = new h.utils.ByteArray;
m.objectEncoding = 0;
m.writeObject("play");
m.writeObject(0);
m.writeObject(null);
m.writeObject(a);
1 < arguments.length && m.writeObject(c);
2 < arguments.length && m.writeObject(l);
3 < arguments.length && m.writeObject(e);
this.transport._sendCommand(this.streamId, new Uint8Array(m._buffer, 0, m.length));
this.transport._setBuffer(this.streamId);
};
a.prototype._push = function(a) {
switch(a.typeId) {
case 8:
;
case 9:
if (this.ondata) {
this.ondata(a);
}
break;
case 18:
;
case 20:
var c = [], l = new h.utils.ByteArray;
l.writeRawBytes(a.data);
l.position = 0;
for (l.objectEncoding = 0;l.position < l.length;) {
c.push(l.readObject());
}
18 === a.typeId && this.onscriptdata && this.onscriptdata.apply(this, c);
20 === a.typeId && this.oncallback && this.oncallback.apply(this, c);
}
};
return a;
}();
c.parseConnectionString = function(a) {
var c = a.indexOf(":");
if (0 > c || "/" !== a[c + 1]) {
return null;
}
var h = a.substring(0, c).toLocaleLowerCase();
if ("rtmp" !== h && "rtmpt" !== h && "rtmps" !== h && "rtmpe" !== h && "rtmpte" !== h && "rtmfp" !== h) {
return null;
}
var l, e, m = c + 1;
if ("/" === a[c + 2]) {
m = a.indexOf("/", c + 3);
if (0 > m) {
return;
}
var t = a.indexOf(":", c + 1);
0 <= t && t < m ? (l = a.substring(c + 3, t), e = +a.substring(t + 1, m)) : l = a.substring(c + 3, m);
}
return{protocol:h, host:l, port:e, app:a.substring(m)};
};
})(RtmpJs || (RtmpJs = {}));
(function(c) {
(function(h) {
function a(a, c, e) {
c || (c = p);
var m = window.createRtmpXHR, h = m ? m() : new XMLHttpRequest({mozSystem:!0});
h.open("POST", a, !0);
h.responseType = "arraybuffer";
h.setRequestHeader("Content-Type", "application/x-fcs");
h.onload = function(a) {
e(new Uint8Array(h.response), h.status);
};
h.onerror = function(a) {
console.log("error");
throw Error("HTTP error");
};
h.send(c);
}
var s = navigator.mozTCPSocket, v = function(a) {
function c(e) {
a.call(this);
"string" === typeof e && (e = {host:e});
this.host = e.host || "localhost";
this.port = e.port || 1935;
this.ssl = !!e.ssl || !1;
}
__extends(c, a);
c.prototype.connect = function(a, c) {
function l(b) {
return d.send(b.buffer, b.byteOffset, b.byteLength);
}
if (!s) {
throw Error("Your browser does not support socket communication.\nCurrenly only Firefox with enabled mozTCPSocket is allowed (see README.md).");
}
var q = this._initChannel(a, c), n = [], k = !1, f = window.createRtmpSocket, d = f ? f({host:this.host, port:this.port, ssl:this.ssl}) : s.open(this.host, this.port, {useSecureTransport:this.ssl, binaryType:"arraybuffer"});
d.onopen = function(b) {
q.ondata = function(b) {
b = new Uint8Array(b);
n.push(b);
1 < n.length || (console.log("Bytes written: " + b.length), l(b) && n.shift());
};
q.onclose = function() {
d.close();
};
q.start();
};
d.ondrain = function(b) {
n.shift();
for (console.log("Write completed");0 < n.length;) {
console.log("Bytes written: " + n[0].length);
if (!l(n[0])) {
break;
}
n.shift();
}
};
d.onclose = function(b) {
q.stop(k);
};
d.onerror = function(b) {
k = !0;
console.error("socket error: " + b.data);
};
d.ondata = function(b) {
console.log("Bytes read: " + b.data.byteLength);
q.push(new Uint8Array(b.data));
};
};
return c;
}(c.BaseTransport);
h.RtmpTransport = v;
v = function(c) {
function l(a) {
c.call(this);
var m = (a.ssl ? "https" : "http") + "://" + (a.host || "localhost");
a.port && (m += ":" + a.port);
this.baseUrl = m;
this.stopped = !1;
this.sessionId = null;
this.requestId = 0;
this.data = [];
}
__extends(l, c);
l.prototype.connect = function(e, c) {
var l = this._initChannel(e, c);
l.ondata = function(a) {
console.log("Bytes written: " + a.length);
this.data.push(new Uint8Array(a));
}.bind(this);
l.onclose = function() {
this.stopped = !0;
}.bind(this);
a(this.baseUrl + "/fcs/ident2", null, function(e, c) {
if (404 !== c) {
throw Error("Unexpected response: " + c);
}
a(this.baseUrl + "/open/1", null, function(a, e) {
this.sessionId = String.fromCharCode.apply(null, a).slice(0, -1);
console.log("session id: " + this.sessionId);
this.tick();
l.start();
}.bind(this));
}.bind(this));
};
l.prototype.tick = function() {
var e = function(a, e) {
if (200 !== e) {
throw Error("Invalid HTTP status");
}
var f = a[0];
1 < a.length && this.channel.push(a.subarray(1));
setTimeout(this.tick.bind(this), 16 * f);
}.bind(this);
if (this.stopped) {
a(this.baseUrl + "/close/2", null, function() {
});
} else {
if (0 < this.data.length) {
var c, l = 0;
this.data.forEach(function(a) {
l += a.length;
});
var h = 0;
c = new Uint8Array(l);
this.data.forEach(function(a) {
c.set(a, h);
h += a.length;
});
this.data.length = 0;
a(this.baseUrl + "/send/" + this.sessionId + "/" + this.requestId++, c, e);
} else {
a(this.baseUrl + "/idle/" + this.sessionId + "/" + this.requestId++, null, e);
}
}
};
return l;
}(c.BaseTransport);
h.RtmptTransport = v;
var p = new Uint8Array([0]);
})(c.Browser || (c.Browser = {}));
})(RtmpJs || (RtmpJs = {}));
(function(c) {
(function(c) {
(function(a) {
function c(a) {
for (var e = [], d = 1;d < arguments.length;d++) {
e[d - 1] = arguments[d];
}
return Array.prototype.concat.apply(a, e);
}
function h(a, e, d) {
a[e] = d >> 24 & 255;
a[e + 1] = d >> 16 & 255;
a[e + 2] = d >> 8 & 255;
a[e + 3] = d & 255;
}
function p(a) {
return a.charCodeAt(0) << 24 | a.charCodeAt(1) << 16 | a.charCodeAt(2) << 8 | a.charCodeAt(3);
}
var u = Shumway.StringUtilities.utf8decode, l = [1, 0, 0, 0, 1, 0, 0, 0, 1], e = [0, 0, 0], m = function() {
function a(e, d) {
this.boxtype = e;
"uuid" === e && (this.userType = d);
}
a.prototype.layout = function(a) {
this.offset = a;
a = 8;
this.userType && (a += 16);
return this.size = a;
};
a.prototype.write = function(a) {
h(a, this.offset, this.size);
h(a, this.offset + 4, p(this.boxtype));
if (!this.userType) {
return 8;
}
a.set(this.userType, this.offset + 8);
return 24;
};
a.prototype.toUint8Array = function() {
var a = this.layout(0), a = new Uint8Array(a);
this.write(a);
return a;
};
return a;
}();
a.Box = m;
var t = function(a) {
function e(d, b, g) {
void 0 === b && (b = 0);
void 0 === g && (g = 0);
a.call(this, d);
this.version = b;
this.flags = g;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 4;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, this.version << 24 | this.flags);
return b + 4;
};
return e;
}(m);
a.FullBox = t;
var q = function(a) {
function e(d, b, g) {
a.call(this, "ftype");
this.majorBrand = d;
this.minorVersion = b;
this.compatibleBrands = g;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 4 * (2 + this.compatibleBrands.length);
};
e.prototype.write = function(d) {
var b = this, e = a.prototype.write.call(this, d);
h(d, this.offset + e, p(this.majorBrand));
h(d, this.offset + e + 4, this.minorVersion);
e += 8;
this.compatibleBrands.forEach(function(a) {
h(d, b.offset + e, p(a));
e += 4;
}, this);
return e;
};
return e;
}(m);
a.FileTypeBox = q;
q = function(a) {
function e(d, b) {
a.call(this, d);
this.children = b;
}
__extends(e, a);
e.prototype.layout = function(d) {
var b = a.prototype.layout.call(this, d);
this.children.forEach(function(a) {
a && (b += a.layout(d + b));
});
return this.size = b;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
this.children.forEach(function(a) {
a && (b += a.write(d));
});
return b;
};
return e;
}(m);
a.BoxContainerBox = q;
var n = function(a) {
function e(d, b, g, f) {
a.call(this, "moov", c([d], b, [g, f]));
this.header = d;
this.tracks = b;
this.extendsBox = g;
this.userData = f;
}
__extends(e, a);
return e;
}(q);
a.MovieBox = n;
n = function(a) {
function e(d, b, g, f, c, m, n, h) {
void 0 === f && (f = 1);
void 0 === c && (c = 1);
void 0 === m && (m = l);
void 0 === n && (n = -20828448E5);
void 0 === h && (h = -20828448E5);
a.call(this, "mvhd", 0, 0);
this.timescale = d;
this.duration = b;
this.nextTrackId = g;
this.rate = f;
this.volume = c;
this.matrix = m;
this.creationTime = n;
this.modificationTime = h;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 16 + 4 + 2 + 2 + 8 + 36 + 24 + 4;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, (this.creationTime - -20828448E5) / 1E3 | 0);
h(d, this.offset + b + 4, (this.modificationTime - -20828448E5) / 1E3 | 0);
h(d, this.offset + b + 8, this.timescale);
h(d, this.offset + b + 12, this.duration);
b += 16;
h(d, this.offset + b, 65536 * this.rate | 0);
h(d, this.offset + b + 4, (256 * this.volume | 0) << 16);
h(d, this.offset + b + 8, 0);
h(d, this.offset + b + 12, 0);
b += 16;
h(d, this.offset + b, 65536 * this.matrix[0] | 0);
h(d, this.offset + b + 4, 65536 * this.matrix[1] | 0);
h(d, this.offset + b + 8, 65536 * this.matrix[2] | 0);
h(d, this.offset + b + 12, 65536 * this.matrix[3] | 0);
h(d, this.offset + b + 16, 65536 * this.matrix[4] | 0);
h(d, this.offset + b + 20, 65536 * this.matrix[5] | 0);
h(d, this.offset + b + 24, 1073741824 * this.matrix[6] | 0);
h(d, this.offset + b + 28, 1073741824 * this.matrix[7] | 0);
h(d, this.offset + b + 32, 1073741824 * this.matrix[8] | 0);
b += 36;
h(d, this.offset + b, 0);
h(d, this.offset + b + 4, 0);
h(d, this.offset + b + 8, 0);
h(d, this.offset + b + 12, 0);
h(d, this.offset + b + 16, 0);
h(d, this.offset + b + 20, 0);
b += 24;
h(d, this.offset + b, this.nextTrackId);
return b + 4;
};
return e;
}(t);
a.MovieHeaderBox = n;
(function(a) {
a[a.TRACK_ENABLED = 1] = "TRACK_ENABLED";
a[a.TRACK_IN_MOVIE = 2] = "TRACK_IN_MOVIE";
a[a.TRACK_IN_PREVIEW = 4] = "TRACK_IN_PREVIEW";
})(a.TrackHeaderFlags || (a.TrackHeaderFlags = {}));
n = function(a) {
function e(d, b, g, f, c, m, n, h, q, t, s) {
void 0 === n && (n = 0);
void 0 === h && (h = 0);
void 0 === q && (q = l);
void 0 === t && (t = -20828448E5);
void 0 === s && (s = -20828448E5);
a.call(this, "tkhd", 0, d);
this.trackId = b;
this.duration = g;
this.width = f;
this.height = c;
this.volume = m;
this.alternateGroup = n;
this.layer = h;
this.matrix = q;
this.creationTime = t;
this.modificationTime = s;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 20 + 8 + 6 + 2 + 36 + 8;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, (this.creationTime - -20828448E5) / 1E3 | 0);
h(d, this.offset + b + 4, (this.modificationTime - -20828448E5) / 1E3 | 0);
h(d, this.offset + b + 8, this.trackId);
h(d, this.offset + b + 12, 0);
h(d, this.offset + b + 16, this.duration);
b += 20;
h(d, this.offset + b, 0);
h(d, this.offset + b + 4, 0);
h(d, this.offset + b + 8, this.layer << 16 | this.alternateGroup);
h(d, this.offset + b + 12, (256 * this.volume | 0) << 16);
b += 16;
h(d, this.offset + b, 65536 * this.matrix[0] | 0);
h(d, this.offset + b + 4, 65536 * this.matrix[1] | 0);
h(d, this.offset + b + 8, 65536 * this.matrix[2] | 0);
h(d, this.offset + b + 12, 65536 * this.matrix[3] | 0);
h(d, this.offset + b + 16, 65536 * this.matrix[4] | 0);
h(d, this.offset + b + 20, 65536 * this.matrix[5] | 0);
h(d, this.offset + b + 24, 1073741824 * this.matrix[6] | 0);
h(d, this.offset + b + 28, 1073741824 * this.matrix[7] | 0);
h(d, this.offset + b + 32, 1073741824 * this.matrix[8] | 0);
b += 36;
h(d, this.offset + b, 65536 * this.width | 0);
h(d, this.offset + b + 4, 65536 * this.height | 0);
return b + 8;
};
return e;
}(t);
a.TrackHeaderBox = n;
n = function(a) {
function e(d, b, g, f, c) {
void 0 === g && (g = "unk");
void 0 === f && (f = -20828448E5);
void 0 === c && (c = -20828448E5);
a.call(this, "mdhd", 0, 0);
this.timescale = d;
this.duration = b;
this.language = g;
this.creationTime = f;
this.modificationTime = c;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 16 + 4;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, (this.creationTime - -20828448E5) / 1E3 | 0);
h(d, this.offset + b + 4, (this.modificationTime - -20828448E5) / 1E3 | 0);
h(d, this.offset + b + 8, this.timescale);
h(d, this.offset + b + 12, this.duration);
var e = this.language;
h(d, this.offset + b + 16, ((e.charCodeAt(0) & 31) << 10 | (e.charCodeAt(1) & 31) << 5 | e.charCodeAt(2) & 31) << 16);
return b + 20;
};
return e;
}(t);
a.MediaHeaderBox = n;
n = function(a) {
function e(d, b) {
a.call(this, "hdlr", 0, 0);
this.handlerType = d;
this.name = b;
this._encodedName = u(this.name);
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 8 + 12 + (this._encodedName.length + 1);
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, 0);
h(d, this.offset + b + 4, p(this.handlerType));
h(d, this.offset + b + 8, 0);
h(d, this.offset + b + 12, 0);
h(d, this.offset + b + 16, 0);
b += 20;
d.set(this._encodedName, this.offset + b);
d[this.offset + b + this._encodedName.length] = 0;
return b += this._encodedName.length + 1;
};
return e;
}(t);
a.HandlerBox = n;
n = function(a) {
function e(d) {
void 0 === d && (d = 0);
a.call(this, "smhd", 0, 0);
this.balance = d;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 4;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, (256 * this.balance | 0) << 16);
return b + 4;
};
return e;
}(t);
a.SoundMediaHeaderBox = n;
n = function(a) {
function f(d, b) {
void 0 === d && (d = 0);
void 0 === b && (b = e);
a.call(this, "vmhd", 0, 0);
this.graphicsMode = d;
this.opColor = b;
}
__extends(f, a);
f.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 8;
};
f.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, this.graphicsMode << 16 | this.opColor[0]);
h(d, this.offset + b + 4, this.opColor[1] << 16 | this.opColor[2]);
return b + 8;
};
return f;
}(t);
a.VideoMediaHeaderBox = n;
a.SELF_CONTAINED_DATA_REFERENCE_FLAG = 1;
n = function(e) {
function f(d, b) {
void 0 === b && (b = null);
e.call(this, "url ", 0, d);
this.location = b;
d & a.SELF_CONTAINED_DATA_REFERENCE_FLAG || (this._encodedLocation = u(b));
}
__extends(f, e);
f.prototype.layout = function(a) {
a = e.prototype.layout.call(this, a);
this._encodedLocation && (a += this._encodedLocation.length + 1);
return this.size = a;
};
f.prototype.write = function(a) {
var b = e.prototype.write.call(this, a);
this._encodedLocation && (a.set(this._encodedLocation, this.offset + b), a[this.offset + b + this._encodedLocation.length] = 0, b += this._encodedLocation.length);
return b;
};
return f;
}(t);
a.DataEntryUrlBox = n;
n = function(a) {
function e(d) {
a.call(this, "dref", 0, 0);
this.entries = d;
}
__extends(e, a);
e.prototype.layout = function(d) {
var b = a.prototype.layout.call(this, d) + 4;
this.entries.forEach(function(a) {
b += a.layout(d + b);
});
return this.size = b;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, this.entries.length);
this.entries.forEach(function(a) {
b += a.write(d);
});
return b;
};
return e;
}(t);
a.DataReferenceBox = n;
n = function(a) {
function e(d) {
a.call(this, "dinf", [d]);
this.dataReference = d;
}
__extends(e, a);
return e;
}(q);
a.DataInformationBox = n;
n = function(a) {
function e(d) {
a.call(this, "stsd", 0, 0);
this.entries = d;
}
__extends(e, a);
e.prototype.layout = function(d) {
var b = a.prototype.layout.call(this, d), b = b + 4;
this.entries.forEach(function(a) {
b += a.layout(d + b);
});
return this.size = b;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, this.entries.length);
b += 4;
this.entries.forEach(function(a) {
b += a.write(d);
});
return b;
};
return e;
}(t);
a.SampleDescriptionBox = n;
n = function(a) {
function e(d, b, g, f, c) {
a.call(this, "stbl", [d, b, g, f, c]);
this.sampleDescriptions = d;
this.timeToSample = b;
this.sampleToChunk = g;
this.sampleSizes = f;
this.chunkOffset = c;
}
__extends(e, a);
return e;
}(q);
a.SampleTableBox = n;
n = function(a) {
function e(d, b, g) {
a.call(this, "minf", [d, b, g]);
this.header = d;
this.info = b;
this.sampleTable = g;
}
__extends(e, a);
return e;
}(q);
a.MediaInformationBox = n;
n = function(a) {
function e(d, b, g) {
a.call(this, "mdia", [d, b, g]);
this.header = d;
this.handler = b;
this.info = g;
}
__extends(e, a);
return e;
}(q);
a.MediaBox = n;
n = function(a) {
function e(d, b) {
a.call(this, "trak", [d, b]);
this.header = d;
this.media = b;
}
__extends(e, a);
return e;
}(q);
a.TrackBox = n;
n = function(a) {
function e(d, b, g, f, c) {
a.call(this, "trex", 0, 0);
this.trackId = d;
this.defaultSampleDescriptionIndex = b;
this.defaultSampleDuration = g;
this.defaultSampleSize = f;
this.defaultSampleFlags = c;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 20;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, this.trackId);
h(d, this.offset + b + 4, this.defaultSampleDescriptionIndex);
h(d, this.offset + b + 8, this.defaultSampleDuration);
h(d, this.offset + b + 12, this.defaultSampleSize);
h(d, this.offset + b + 16, this.defaultSampleFlags);
return b + 20;
};
return e;
}(t);
a.TrackExtendsBox = n;
n = function(a) {
function e(d, b, g) {
a.call(this, "mvex", c([d], b, [g]));
this.header = d;
this.tracDefaults = b;
this.levels = g;
}
__extends(e, a);
return e;
}(q);
a.MovieExtendsBox = n;
n = function(a) {
function e(d, b) {
a.call(this, "meta", 0, 0);
this.handler = d;
this.otherBoxes = b;
}
__extends(e, a);
e.prototype.layout = function(d) {
var b = a.prototype.layout.call(this, d), b = b + this.handler.layout(d + b);
this.otherBoxes.forEach(function(a) {
b += a.layout(d + b);
});
return this.size = b;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d), b = b + this.handler.write(d);
this.otherBoxes.forEach(function(a) {
b += a.write(d);
});
return b;
};
return e;
}(t);
a.MetaBox = n;
n = function(a) {
function e(d) {
a.call(this, "mfhd", 0, 0);
this.sequenceNumber = d;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 4;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, this.sequenceNumber);
return b + 4;
};
return e;
}(t);
a.MovieFragmentHeaderBox = n;
(function(a) {
a[a.BASE_DATA_OFFSET_PRESENT = 1] = "BASE_DATA_OFFSET_PRESENT";
a[a.SAMPLE_DESCRIPTION_INDEX_PRESENT = 2] = "SAMPLE_DESCRIPTION_INDEX_PRESENT";
a[a.DEFAULT_SAMPLE_DURATION_PRESENT = 8] = "DEFAULT_SAMPLE_DURATION_PRESENT";
a[a.DEFAULT_SAMPLE_SIZE_PRESENT = 16] = "DEFAULT_SAMPLE_SIZE_PRESENT";
a[a.DEFAULT_SAMPLE_FLAGS_PRESENT = 32] = "DEFAULT_SAMPLE_FLAGS_PRESENT";
})(a.TrackFragmentFlags || (a.TrackFragmentFlags = {}));
n = function(a) {
function e(d, b, g, f, c, m, l) {
a.call(this, "tfhd", 0, d);
this.trackId = b;
this.baseDataOffset = g;
this.sampleDescriptionIndex = f;
this.defaultSampleDuration = c;
this.defaultSampleSize = m;
this.defaultSampleFlags = l;
}
__extends(e, a);
e.prototype.layout = function(d) {
d = a.prototype.layout.call(this, d) + 4;
var b = this.flags;
b & 1 && (d += 8);
b & 2 && (d += 4);
b & 8 && (d += 4);
b & 16 && (d += 4);
b & 32 && (d += 4);
return this.size = d;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d), e = this.flags;
h(d, this.offset + b, this.trackId);
b += 4;
e & 1 && (h(d, this.offset + b, 0), h(d, this.offset + b + 4, this.baseDataOffset), b += 8);
e & 2 && (h(d, this.offset + b, this.sampleDescriptionIndex), b += 4);
e & 8 && (h(d, this.offset + b, this.defaultSampleDuration), b += 4);
e & 16 && (h(d, this.offset + b, this.defaultSampleSize), b += 4);
e & 32 && (h(d, this.offset + b, this.defaultSampleFlags), b += 4);
return b;
};
return e;
}(t);
a.TrackFragmentHeaderBox = n;
n = function(a) {
function e(d) {
a.call(this, "tfdt", 0, 0);
this.baseMediaDecodeTime = d;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 4;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, this.baseMediaDecodeTime);
return b + 4;
};
return e;
}(t);
a.TrackFragmentBaseMediaDecodeTimeBox = n;
n = function(a) {
function e(d, b, g) {
a.call(this, "traf", [d, b, g]);
this.header = d;
this.decodeTime = b;
this.run = g;
}
__extends(e, a);
return e;
}(q);
a.TrackFragmentBox = n;
(function(a) {
a[a.IS_LEADING_MASK = 201326592] = "IS_LEADING_MASK";
a[a.SAMPLE_DEPENDS_ON_MASK = 50331648] = "SAMPLE_DEPENDS_ON_MASK";
a[a.SAMPLE_DEPENDS_ON_OTHER = 16777216] = "SAMPLE_DEPENDS_ON_OTHER";
a[a.SAMPLE_DEPENDS_ON_NO_OTHERS = 33554432] = "SAMPLE_DEPENDS_ON_NO_OTHERS";
a[a.SAMPLE_IS_DEPENDED_ON_MASK = 12582912] = "SAMPLE_IS_DEPENDED_ON_MASK";
a[a.SAMPLE_HAS_REDUNDANCY_MASK = 3145728] = "SAMPLE_HAS_REDUNDANCY_MASK";
a[a.SAMPLE_PADDING_VALUE_MASK = 917504] = "SAMPLE_PADDING_VALUE_MASK";
a[a.SAMPLE_IS_NOT_SYNC = 65536] = "SAMPLE_IS_NOT_SYNC";
a[a.SAMPLE_DEGRADATION_PRIORITY_MASK = 65535] = "SAMPLE_DEGRADATION_PRIORITY_MASK";
})(a.SampleFlags || (a.SampleFlags = {}));
(function(a) {
a[a.DATA_OFFSET_PRESENT = 1] = "DATA_OFFSET_PRESENT";
a[a.FIRST_SAMPLE_FLAGS_PRESENT = 4] = "FIRST_SAMPLE_FLAGS_PRESENT";
a[a.SAMPLE_DURATION_PRESENT = 256] = "SAMPLE_DURATION_PRESENT";
a[a.SAMPLE_SIZE_PRESENT = 512] = "SAMPLE_SIZE_PRESENT";
a[a.SAMPLE_FLAGS_PRESENT = 1024] = "SAMPLE_FLAGS_PRESENT";
a[a.SAMPLE_COMPOSITION_TIME_OFFSET = 2048] = "SAMPLE_COMPOSITION_TIME_OFFSET";
})(a.TrackRunFlags || (a.TrackRunFlags = {}));
t = function(a) {
function e(d, b, g, f) {
a.call(this, "trun", 1, d);
this.samples = b;
this.dataOffset = g;
this.firstSampleFlags = f;
}
__extends(e, a);
e.prototype.layout = function(d) {
d = a.prototype.layout.call(this, d) + 4;
var b = this.samples.length, e = this.flags;
e & 1 && (d += 4);
e & 4 && (d += 4);
e & 256 && (d += 4 * b);
e & 512 && (d += 4 * b);
e & 1024 && (d += 4 * b);
e & 2048 && (d += 4 * b);
return this.size = d;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d), e = this.samples.length, f = this.flags;
h(d, this.offset + b, e);
b += 4;
f & 1 && (h(d, this.offset + b, this.dataOffset), b += 4);
f & 4 && (h(d, this.offset + b, this.firstSampleFlags), b += 4);
for (var c = 0;c < e;c++) {
var m = this.samples[c];
f & 256 && (h(d, this.offset + b, m.duration), b += 4);
f & 512 && (h(d, this.offset + b, m.size), b += 4);
f & 1024 && (h(d, this.offset + b, m.flags), b += 4);
f & 2048 && (h(d, this.offset + b, m.compositionTimeOffset), b += 4);
}
return b;
};
return e;
}(t);
a.TrackRunBox = t;
t = function(a) {
function e(d, b) {
a.call(this, "moof", c([d], b));
this.header = d;
this.trafs = b;
}
__extends(e, a);
return e;
}(q);
a.MovieFragmentBox = t;
t = function(a) {
function e(d) {
a.call(this, "mdat");
this.chunks = d;
}
__extends(e, a);
e.prototype.layout = function(d) {
var b = a.prototype.layout.call(this, d);
this.chunks.forEach(function(a) {
b += a.length;
});
return this.size = b;
};
e.prototype.write = function(d) {
var b = this, e = a.prototype.write.call(this, d);
this.chunks.forEach(function(a) {
d.set(a, b.offset + e);
e += a.length;
}, this);
return e;
};
return e;
}(m);
a.MediaDataBox = t;
t = function(a) {
function e(d, b) {
a.call(this, d);
this.dataReferenceIndex = b;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + 8;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, 0);
h(d, this.offset + b + 4, this.dataReferenceIndex);
return b + 8;
};
return e;
}(m);
a.SampleEntry = t;
q = function(a) {
function e(d, b, g, f, c, m) {
void 0 === g && (g = 2);
void 0 === f && (f = 16);
void 0 === c && (c = 44100);
void 0 === m && (m = null);
a.call(this, d, b);
this.channelCount = g;
this.sampleSize = f;
this.sampleRate = c;
this.otherBoxes = m;
}
__extends(e, a);
e.prototype.layout = function(d) {
var b = a.prototype.layout.call(this, d) + 20;
this.otherBoxes && this.otherBoxes.forEach(function(a) {
b += a.layout(d + b);
});
return this.size = b;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
h(d, this.offset + b, 0);
h(d, this.offset + b + 4, 0);
h(d, this.offset + b + 8, this.channelCount << 16 | this.sampleSize);
h(d, this.offset + b + 12, 0);
h(d, this.offset + b + 16, this.sampleRate << 16);
b += 20;
this.otherBoxes && this.otherBoxes.forEach(function(a) {
b += a.write(d);
});
return b;
};
return e;
}(t);
a.AudioSampleEntry = q;
a.COLOR_NO_ALPHA_VIDEO_SAMPLE_DEPTH = 24;
t = function(e) {
function f(d, b, g, f, c, m, l, n, h, q) {
void 0 === c && (c = "");
void 0 === m && (m = 72);
void 0 === l && (l = 72);
void 0 === n && (n = 1);
void 0 === h && (h = a.COLOR_NO_ALPHA_VIDEO_SAMPLE_DEPTH);
void 0 === q && (q = null);
e.call(this, d, b);
this.width = g;
this.height = f;
this.compressorName = c;
this.horizResolution = m;
this.vertResolution = l;
this.frameCount = n;
this.depth = h;
this.otherBoxes = q;
if (31 < c.length) {
throw Error("invalid compressor name");
}
}
__extends(f, e);
f.prototype.layout = function(a) {
var b = e.prototype.layout.call(this, a) + 16 + 12 + 4 + 2 + 32 + 2 + 2;
this.otherBoxes && this.otherBoxes.forEach(function(e) {
b += e.layout(a + b);
});
return this.size = b;
};
f.prototype.write = function(a) {
var b = e.prototype.write.call(this, a);
h(a, this.offset + b, 0);
h(a, this.offset + b + 4, 0);
h(a, this.offset + b + 8, 0);
h(a, this.offset + b + 12, 0);
b += 16;
h(a, this.offset + b, this.width << 16 | this.height);
h(a, this.offset + b + 4, 65536 * this.horizResolution | 0);
h(a, this.offset + b + 8, 65536 * this.vertResolution | 0);
b += 12;
h(a, this.offset + b, 0);
h(a, this.offset + b + 4, this.frameCount << 16);
b += 6;
a[this.offset + b] = this.compressorName.length;
for (var g = 0;31 > g;g++) {
a[this.offset + b + g + 1] = g < this.compressorName.length ? this.compressorName.charCodeAt(g) & 127 : 0;
}
b += 32;
h(a, this.offset + b, this.depth << 16 | 65535);
b += 4;
this.otherBoxes && this.otherBoxes.forEach(function(e) {
b += e.write(a);
});
return b;
};
return f;
}(t);
a.VideoSampleEntry = t;
m = function(a) {
function e(d, b) {
a.call(this, d);
this.data = b;
}
__extends(e, a);
e.prototype.layout = function(d) {
return this.size = a.prototype.layout.call(this, d) + this.data.length;
};
e.prototype.write = function(d) {
var b = a.prototype.write.call(this, d);
d.set(this.data, this.offset + b);
return b + this.data.length;
};
return e;
}(m);
a.RawTag = m;
})(c.Iso || (c.Iso = {}));
})(c.MP4 || (c.MP4 = {}));
})(RtmpJs || (RtmpJs = {}));
(function(c) {
(function(c) {
function a(a) {
for (var e = a.length >> 1, c = new Uint8Array(e), k = 0;k < e;k++) {
c[k] = parseInt(a.substr(2 * k, 2), 16);
}
return c;
}
var s = [5500, 11025, 22050, 44100], v = ["PCM", "ADPCM", "MP3", "PCM le", "Nellymouser16", "Nellymouser8", "Nellymouser", "G.711 A-law", "G.711 mu-law", null, "AAC", "Speex", "MP3 8khz"], p;
(function(a) {
a[a.HEADER = 0] = "HEADER";
a[a.RAW = 1] = "RAW";
})(p || (p = {}));
var u = [null, "JPEG", "Sorenson", "Screen", "VP6", "VP6 alpha", "Screen2", "AVC"], l;
(function(a) {
a[a.KEY = 1] = "KEY";
a[a.INNER = 2] = "INNER";
a[a.DISPOSABLE = 3] = "DISPOSABLE";
a[a.GENERATED = 4] = "GENERATED";
a[a.INFO = 5] = "INFO";
})(l || (l = {}));
var e;
(function(a) {
a[a.HEADER = 0] = "HEADER";
a[a.NALU = 1] = "NALU";
a[a.END = 2] = "END";
})(e || (e = {}));
var m;
(function(a) {
a[a.CAN_GENERATE_HEADER = 0] = "CAN_GENERATE_HEADER";
a[a.NEED_HEADER_DATA = 1] = "NEED_HEADER_DATA";
a[a.MAIN_PACKETS = 2] = "MAIN_PACKETS";
})(m || (m = {}));
p = function() {
function e(a) {
var c = this;
this.oncodecinfo = function(a) {
};
this.ondata = function(a) {
throw Error("MP4Mux.ondata is not set");
};
this.metadata = a;
this.trackStates = this.metadata.tracks.map(function(a, e) {
var d = {trackId:e + 1, trackInfo:a, cachedDuration:0, samplesProcessed:0, initializationData:[]};
c.metadata.audioTrackId === e && (c.audioTrackState = d);
c.metadata.videoTrackId === e && (c.videoTrackState = d);
return d;
}, this);
this._checkIfNeedHeaderData();
this.filePos = 0;
this.cachedPackets = [];
this.chunkIndex = 0;
}
e.prototype.pushPacket = function(a, e, c) {
0 === this.state && this._tryGenerateHeader();
switch(a) {
case 8:
a = this.audioTrackState;
var f = 0, d = 1, b = e[f], g = b >> 4, m;
f++;
switch(g) {
case 10:
d = e[f++];
m = 1024;
break;
case 2:
m = e[f + 1] >> 3 & 3;
var l = e[f + 1] >> 1 & 3;
m = 1 === l ? 3 === m ? 1152 : 576 : 3 === l ? 384 : 1152;
}
e = {codecDescription:v[g], codecId:g, data:e.subarray(f), rate:s[b >> 2 & 3], size:b & 2 ? 16 : 8, channels:b & 1 ? 2 : 1, samples:m, packetType:d};
if (!a || a.trackInfo.codecId !== e.codecId) {
throw Error("Unexpected audio packet codec: " + e.codecDescription);
}
switch(e.codecId) {
default:
throw Error("Unsupported audio codec: " + e.codecDescription);;
case 2:
break;
case 10:
if (0 === e.packetType) {
a.initializationData.push(e.data);
return;
}
;
}
this.cachedPackets.push({packet:e, timestamp:c, trackId:a.trackId});
break;
case 9:
a = this.videoTrackState;
f = 0;
b = e[f] >> 4;
d = e[f] & 15;
f++;
b = {frameType:b, codecId:d, codecDescription:u[d]};
switch(d) {
case 7:
d = e[f++];
b.packetType = d;
b.compositionTime = (e[f] << 24 | e[f + 1] << 16 | e[f + 2] << 8) >> 8;
f += 3;
break;
case 4:
b.packetType = 1, b.horizontalOffset = e[f] >> 4 & 15, b.verticalOffset = e[f] & 15, b.compositionTime = 0, f++;
}
b.data = e.subarray(f);
if (!a || a.trackInfo.codecId !== b.codecId) {
throw Error("Unexpected video packet codec: " + b.codecDescription);
}
switch(b.codecId) {
default:
throw Error("unsupported video codec: " + b.codecDescription);;
case 4:
break;
case 7:
if (0 === b.packetType) {
a.initializationData.push(b.data);
return;
}
;
}
this.cachedPackets.push({packet:b, timestamp:c, trackId:a.trackId});
break;
default:
throw Error("unknown packet type: " + a);;
}
1 === this.state && this._tryGenerateHeader();
200 <= this.cachedPackets.length && 2 === this.state && this._chunk();
};
e.prototype.flush = function() {
0 < this.cachedPackets.length && this._chunk();
};
e.prototype._checkIfNeedHeaderData = function() {
this.trackStates.some(function(a) {
return 10 === a.trackInfo.codecId || 7 === a.trackInfo.codecId;
}) ? this.state = 1 : this.state = 0;
};
e.prototype._tryGenerateHeader = function() {
if (this.trackStates.every(function(b) {
switch(b.trackInfo.codecId) {
case 10:
;
case 7:
return 0 < b.initializationData.length;
default:
return!0;
}
})) {
for (var e = ["isom"], m = [], k = 0;k < this.trackStates.length;k++) {
var f = this.trackStates[k], d = f.trackInfo, b;
switch(d.codecId) {
case 10:
var g = f.initializationData[0];
b = new c.Iso.AudioSampleEntry("mp4a", 1, d.channels, d.samplesize, d.samplerate);
var l = new Uint8Array(41 + g.length);
l.set(a("0000000003808080"), 0);
l[8] = 32 + g.length;
l.set(a("00020004808080"), 9);
l[16] = 18 + g.length;
l.set(a("40150000000000FA000000000005808080"), 17);
l[34] = g.length;
l.set(g, 35);
l.set(a("068080800102"), 35 + g.length);
b.otherBoxes = [new c.Iso.RawTag("esds", l)];
f.mimeTypeCodec = "mp4a.40." + (g[0] >> 3);
break;
case 2:
b = new c.Iso.AudioSampleEntry(".mp3", 1, d.channels, d.samplesize, d.samplerate);
f.mimeTypeCodec = "mp3";
break;
case 7:
g = f.initializationData[0];
b = new c.Iso.VideoSampleEntry("avc1", 1, d.width, d.height);
b.otherBoxes = [new c.Iso.RawTag("avcC", g)];
f.mimeTypeCodec = "avc1." + (16777216 | g[1] << 16 | g[2] << 8 | g[3]).toString(16).substr(1);
e.push("iso2", "avc1", "mp41");
break;
case 4:
b = new c.Iso.VideoSampleEntry("VP6F", 1, d.width, d.height);
b.otherBoxes = [new c.Iso.RawTag("glbl", a("00"))];
f.mimeTypeCodec = "avc1.42001E";
break;
default:
throw Error("not supported track type");;
}
var w;
f === this.audioTrackState ? w = new c.Iso.TrackBox(new c.Iso.TrackHeaderBox(3, f.trackId, -1, 0, 0, 1, k), new c.Iso.MediaBox(new c.Iso.MediaHeaderBox(d.timescale, -1, d.language), new c.Iso.HandlerBox("soun", "SoundHandler"), new c.Iso.MediaInformationBox(new c.Iso.SoundMediaHeaderBox, new c.Iso.DataInformationBox(new c.Iso.DataReferenceBox([new c.Iso.DataEntryUrlBox(c.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])), new c.Iso.SampleTableBox(new c.Iso.SampleDescriptionBox([b]), new c.Iso.RawTag("stts",
a("0000000000000000")), new c.Iso.RawTag("stsc", a("0000000000000000")), new c.Iso.RawTag("stsz", a("000000000000000000000000")), new c.Iso.RawTag("stco", a("0000000000000000")))))) : f === this.videoTrackState && (w = new c.Iso.TrackBox(new c.Iso.TrackHeaderBox(3, f.trackId, -1, d.width, d.height, 0, k), new c.Iso.MediaBox(new c.Iso.MediaHeaderBox(d.timescale, -1, d.language), new c.Iso.HandlerBox("vide", "VideoHandler"), new c.Iso.MediaInformationBox(new c.Iso.VideoMediaHeaderBox, new c.Iso.DataInformationBox(new c.Iso.DataReferenceBox([new c.Iso.DataEntryUrlBox(c.Iso.SELF_CONTAINED_DATA_REFERENCE_FLAG)])),
new c.Iso.SampleTableBox(new c.Iso.SampleDescriptionBox([b]), new c.Iso.RawTag("stts", a("0000000000000000")), new c.Iso.RawTag("stsc", a("0000000000000000")), new c.Iso.RawTag("stsz", a("000000000000000000000000")), new c.Iso.RawTag("stco", a("0000000000000000")))))));
m.push(w);
}
k = new c.Iso.MovieExtendsBox(null, [new c.Iso.TrackExtendsBox(1, 1, 0, 0, 0), new c.Iso.TrackExtendsBox(2, 1, 0, 0, 0)], null);
f = new c.Iso.BoxContainerBox("udat", [new c.Iso.MetaBox(new c.Iso.RawTag("hdlr", a("00000000000000006D6469726170706C000000000000000000")), [new c.Iso.RawTag("ilst", a("00000025A9746F6F0000001D6461746100000001000000004C61766635342E36332E313034"))])]);
d = new c.Iso.MovieHeaderBox(1E3, 0, this.trackStates.length + 1);
m = new c.Iso.MovieBox(d, m, k, f);
e = new c.Iso.FileTypeBox("isom", 512, e);
k = e.layout(0);
f = m.layout(k);
k = new Uint8Array(k + f);
e.write(k);
m.write(k);
this.trackStates.map(function(b) {
return b.mimeTypeCodec;
});
this.ondata(k);
this.filePos += k.length;
this.state = 2;
}
};
e.prototype._chunk = function() {
var a, e = this.cachedPackets;
if (0 !== e.length) {
for (var k = [], f = 0, d = [], b = [], g = 0;g < this.trackStates.length;g++) {
var m = this.trackStates[g], l = m.trackInfo, t = m.trackId, s = e.filter(function(b) {
return b.trackId === t;
});
if (0 !== s.length) {
var p = new c.Iso.TrackFragmentBaseMediaDecodeTimeBox(m.cachedDuration), u;
b.push(f);
switch(l.codecId) {
case 10:
;
case 2:
u = [];
for (a = 0;a < s.length;a++) {
var v = s[a].packet, K = Math.round(v.samples * l.timescale / l.samplerate);
k.push(v.data);
f += v.data.length;
u.push({duration:K, size:v.data.length});
m.samplesProcessed += v.samples;
}
a = 32;
a = new c.Iso.TrackFragmentHeaderBox(a, t, 0, 0, 0, 0, 33554432);
s = 769;
u = new c.Iso.TrackRunBox(s, u, 0, 0);
m.cachedDuration = Math.round(m.samplesProcessed * l.timescale / l.samplerate);
break;
case 7:
;
case 4:
u = [];
v = m.samplesProcessed;
K = Math.round(v * l.timescale / l.framerate);
for (a = 0;a < s.length;a++) {
var y = s[a].packet;
v++;
var D = Math.round(v * l.timescale / l.framerate), L = D - K, K = D, H = Math.round(v * l.timescale / l.framerate + y.compositionTime * l.timescale / 1E3);
k.push(y.data);
f += y.data.length;
u.push({duration:L, size:y.data.length, flags:1 === y.frameType ? 33554432 : 16842752, compositionTimeOffset:H - D});
}
a = 32;
a = new c.Iso.TrackFragmentHeaderBox(a, t, 0, 0, 0, 0, 33554432);
s = 3841;
u = new c.Iso.TrackRunBox(s, u, 0, 0);
m.cachedDuration = K;
m.samplesProcessed = v;
break;
default:
throw Error("Un codec");;
}
m = new c.Iso.TrackFragmentBox(a, p, u);
d.push(m);
}
}
this.cachedPackets.splice(0, e.length);
g = new c.Iso.MovieFragmentHeaderBox(++this.chunkIndex);
e = new c.Iso.MovieFragmentBox(g, d);
f = e.layout(0);
k = new c.Iso.MediaDataBox(k);
m = k.layout(f);
l = f + 8;
for (g = 0;g < d.length;g++) {
d[g].run.dataOffset = l + b[g];
}
d = new Uint8Array(f + m);
e.write(d);
k.write(d);
this.ondata(d);
this.filePos += d.length;
}
};
return e;
}();
c.MP4Mux = p;
c.parseFLVMetadata = function(a) {
var e = [], c = -1, k = -1, f = +a.asGetPublicProperty("duration"), d, b, g = a.asGetPublicProperty("audiocodecid");
switch(g) {
case 2:
;
case "mp3":
d = "mp3";
b = 2;
break;
case 10:
;
case "mp4a":
d = "mp4a";
b = 10;
break;
default:
if (!isNaN(g)) {
throw Error("Unsupported audio codec: " + g);
}
d = null;
b = -1;
}
var m, l, h = a.asGetPublicProperty("videocodecid");
switch(h) {
case 4:
;
case "vp6f":
m = "vp6f";
l = 4;
break;
case 7:
;
case "avc1":
m = "avc1";
l = 7;
break;
default:
if (!isNaN(h)) {
throw Error("Unsupported video codec: " + h);
}
m = null;
l = -1;
}
d = null === d ? null : {codecDescription:d, codecId:b, language:"und", timescale:+a.asGetPublicProperty("audiosamplerate") || 44100, samplerate:+a.asGetPublicProperty("audiosamplerate") || 44100, channels:+a.asGetPublicProperty("audiochannels") || 2, samplesize:16};
m = null === m ? null : {codecDescription:m, codecId:l, language:"und", timescale:6E4, framerate:+a.asGetPublicProperty("videoframerate") || +a.asGetPublicProperty("framerate"), width:+a.asGetPublicProperty("width"), height:+a.asGetPublicProperty("height")};
if (a = a.asGetPublicProperty("trackinfo")) {
for (l = 0;l < a.length;l++) {
b = a[l];
var s = b.asGetPublicProperty("sampledescription")[0];
s.asGetPublicProperty("sampletype") === g ? (d.language = b.asGetPublicProperty("language"), d.timescale = +b.asGetPublicProperty("timescale")) : s.asGetPublicProperty("sampletype") === h && (m.language = b.asGetPublicProperty("language"), m.timescale = +b.asGetPublicProperty("timescale"));
}
}
m && (k = e.length, e.push(m));
d && (c = e.length, e.push(d));
return{tracks:e, duration:f, audioTrackId:c, videoTrackId:k};
};
})(c.MP4 || (c.MP4 = {}));
})(RtmpJs || (RtmpJs = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(h) {
function p(a) {
switch(a) {
case e:
;
case -m:
return 0;
case l:
;
case -l:
return-1;
case m:
;
case -e:
return 0;
default:
return Math.cos(a);
}
}
function u(a) {
switch(a) {
case e:
;
case -m:
return 1;
case l:
;
case -l:
return 0;
case m:
;
case -e:
return-1;
default:
return Math.sin(a);
}
}
var l = Math.PI, e = l / 2, m = l + e, t = 2 * l, q = function(a) {
function e(a, d, b, g, c, k) {
void 0 === a && (a = 1);
void 0 === d && (d = 0);
void 0 === b && (b = 0);
void 0 === g && (g = 1);
void 0 === c && (c = 0);
void 0 === k && (k = 0);
var m = this._data = new Float64Array(6);
m[0] = a;
m[1] = d;
m[2] = b;
m[3] = g;
m[4] = c;
m[5] = k;
}
__extends(e, a);
e.FromUntyped = function(a) {
return new c.geom.Matrix(a.a, a.b, a.c, a.d, a.tx, a.ty);
};
e.FromDataBuffer = function(a) {
return new c.geom.Matrix(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat());
};
Object.defineProperty(e.prototype, "a", {get:function() {
return this._data[0];
}, set:function(a) {
this._data[0] = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "b", {get:function() {
return this._data[1];
}, set:function(a) {
this._data[1] = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "c", {get:function() {
return this._data[2];
}, set:function(a) {
this._data[2] = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "d", {get:function() {
return this._data[3];
}, set:function(a) {
this._data[3] = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "tx", {get:function() {
return this._data[4];
}, set:function(a) {
this._data[4] = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "ty", {get:function() {
return this._data[5];
}, set:function(a) {
this._data[5] = a;
}, enumerable:!0, configurable:!0});
e.prototype.concat = function(a) {
var d = this._data;
a = a._data;
var b = d[0] * a[0], e = 0, c = 0, k = d[3] * a[3], m = d[4] * a[0] + a[4], l = d[5] * a[3] + a[5];
if (0 !== d[1] || 0 !== d[2] || 0 !== a[1] || 0 !== a[2]) {
b += d[1] * a[2], k += d[2] * a[1], e += d[0] * a[1] + d[1] * a[3], c += d[2] * a[0] + d[3] * a[2], m += d[5] * a[2], l += d[4] * a[1];
}
d[0] = b;
d[1] = e;
d[2] = c;
d[3] = k;
d[4] = m;
d[5] = l;
};
e.prototype.preMultiply = function(a) {
this.preMultiplyInto(a, this);
};
e.prototype.preMultiplyInto = function(a, d) {
var b = this._data, e = a._data, c = d._data, k = e[0] * b[0], m = 0, l = 0, n = e[3] * b[3], h = e[4] * b[0] + b[4], q = e[5] * b[3] + b[5];
if (0 !== e[1] || 0 !== e[2] || 0 !== b[1] || 0 !== b[2]) {
k += e[1] * b[2], n += e[2] * b[1], m += e[0] * b[1] + e[1] * b[3], l += e[2] * b[0] + e[3] * b[2], h += e[5] * b[2], q += e[4] * b[1];
}
c[0] = k;
c[1] = m;
c[2] = l;
c[3] = n;
c[4] = h;
c[5] = q;
};
e.prototype.invert = function() {
this.invertInto(this);
};
e.prototype.invertInto = function(a) {
var d = this._data, b = a._data, e = d[1], c = d[2], k = d[4], m = d[5];
if (0 === e && 0 === c) {
var l = b[0] = 1 / d[0], d = b[3] = 1 / d[3];
b[1] = b[2] = 0;
b[4] = -l * k;
b[5] = -d * m;
} else {
var l = d[0], d = d[3], n = l * d - e * c;
0 === n ? a.identity() : (n = 1 / n, a = 0, a = b[0] = d * n, e = b[1] = -e * n, c = b[2] = -c * n, d = b[3] = l * n, b[4] = -(a * k + c * m), b[5] = -(e * k + d * m));
}
};
e.prototype.identity = function() {
var a = this._data;
a[0] = a[3] = 1;
a[1] = a[2] = a[4] = a[5] = 0;
};
e.prototype.createBox = function(a, d, b, e, c) {
void 0 === b && (b = 0);
void 0 === e && (e = 0);
void 0 === c && (c = 0);
var k = this._data;
if (0 !== b) {
var m = p(b);
b = u(b);
k[0] = m * a;
k[1] = b * d;
k[2] = -b * a;
k[3] = m * d;
} else {
k[0] = a, k[1] = 0, k[2] = 0, k[3] = d;
}
k[4] = e;
k[5] = c;
};
e.prototype.createGradientBox = function(a, d, b, e, c) {
void 0 === b && (b = 0);
void 0 === e && (e = 0);
void 0 === c && (c = 0);
this.createBox(a / 1638.4, d / 1638.4, b, e + a / 2, c + d / 2);
};
e.prototype.rotate = function(a) {
a = +a;
if (0 !== a) {
var d = this._data, b = p(a);
a = u(a);
var e = d[0], c = d[1], k = d[2], m = d[3], l = d[4], n = d[5];
d[0] = e * b - c * a;
d[1] = e * a + c * b;
d[2] = k * b - m * a;
d[3] = k * a + m * b;
d[4] = l * b - n * a;
d[5] = l * a + n * b;
}
};
e.prototype.translate = function(a, d) {
var b = this._data;
b[4] += a;
b[5] += d;
};
e.prototype.scale = function(a, d) {
var b = this._data;
1 !== a && (b[0] *= a, b[2] *= a, b[4] *= a);
1 !== d && (b[1] *= d, b[3] *= d, b[5] *= d);
};
e.prototype.deltaTransformPoint = function(a) {
return new h.Point(this._data[0] * a.x + this._data[2] * a.y, this._data[1] * a.x + this._data[3] * a.y);
};
e.prototype.transformX = function(a, d) {
var b = this._data;
return b[0] * a + b[2] * d + b[4];
};
e.prototype.transformY = function(a, d) {
var b = this._data;
return b[1] * a + b[3] * d + b[5];
};
e.prototype.transformPoint = function(a) {
var d = this._data;
return new h.Point(d[0] * a.x + d[2] * a.y + d[4], d[1] * a.x + d[3] * a.y + d[5]);
};
e.prototype.transformPointInPlace = function(a) {
var d = this._data;
a.setTo(d[0] * a.x + d[2] * a.y + d[4], d[1] * a.x + d[3] * a.y + d[5]);
return a;
};
e.prototype.transformBounds = function(a) {
var d = this._data, b = d[0], e = d[1], c = d[2], k = d[3], m = d[4], l = d[5], n = a.xMin, h = a.yMin, q = a.width, t = a.height, d = Math.round(b * n + c * h + m), s = Math.round(e * n + k * h + l), p = Math.round(b * (n + q) + c * h + m), u = Math.round(e * (n + q) + k * h + l), v = Math.round(b * (n + q) + c * (h + t) + m), q = Math.round(e * (n + q) + k * (h + t) + l), b = Math.round(b * n + c * (h + t) + m), e = Math.round(e * n + k * (h + t) + l), k = 0;
d > p && (k = d, d = p, p = k);
v > b && (k = v, v = b, b = k);
a.xMin = d < v ? d : v;
a.xMax = p > b ? p : b;
s > u && (k = s, s = u, u = k);
q > e && (k = q, q = e, e = k);
a.yMin = s < q ? s : q;
a.yMax = u > e ? u : e;
};
e.prototype.getDeterminant = function() {
var a = this._data;
return a[0] * a[3] - a[1] * a[2];
};
e.prototype.getScaleX = function() {
var a = this._data;
if (1 === a[0] && 0 === a[1]) {
return 1;
}
a = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
return 0 > this.getDeterminant() ? -a : a;
};
e.prototype.getScaleY = function() {
var a = this._data;
if (0 === a[2] && 1 === a[3]) {
return 1;
}
a = Math.sqrt(a[2] * a[2] + a[3] * a[3]);
return 0 > this.getDeterminant() ? -a : a;
};
e.prototype.getAbsoluteScaleX = function() {
return Math.abs(this.getScaleX());
};
e.prototype.getAbsoluteScaleY = function() {
return Math.abs(this.getScaleY());
};
e.prototype.getSkewX = function() {
return Math.atan2(this._data[3], this._data[2]) - Math.PI / 2;
};
e.prototype.getSkewY = function() {
return Math.atan2(this._data[1], this._data[0]);
};
e.prototype.copyFrom = function(a) {
var d = this._data;
a = a._data;
d[0] = a[0];
d[1] = a[1];
d[2] = a[2];
d[3] = a[3];
d[4] = a[4];
d[5] = a[5];
};
e.prototype.copyFromUntyped = function(a) {
var d = this._data;
d[0] = a.a;
d[1] = a.b;
d[2] = a.c;
d[3] = a.d;
d[4] = a.tx;
d[5] = a.ty;
};
e.prototype.setTo = function(a, d, b, e, c, k) {
var m = this._data;
m[0] = a;
m[1] = d;
m[2] = b;
m[3] = e;
m[4] = c;
m[5] = k;
};
e.prototype.toTwipsInPlace = function() {
var a = this._data;
a[4] = 20 * a[4] | 0;
a[5] = 20 * a[5] | 0;
return this;
};
e.prototype.toPixelsInPlace = function() {
var a = this._data;
a[4] /= 20;
a[5] /= 20;
return this;
};
e.prototype.copyRowTo = function(a, d) {
var b = this._data;
a >>>= 0;
0 === a ? (d.x = b[0], d.y = b[2], d.z = b[4]) : 1 === a ? (d.x = b[1], d.y = b[3], d.z = b[5]) : 2 === a && (d.x = 0, d.y = 0, d.z = 1);
};
e.prototype.copyColumnTo = function(a, d) {
var b = this._data;
a >>>= 0;
0 === a ? (d.x = b[0], d.y = b[1], d.z = 0) : 1 === a ? (d.x = b[2], d.y = b[3], d.z = 0) : 2 === a && (d.x = b[4], d.y = b[5], d.z = 1);
};
e.prototype.copyRowFrom = function(a, d) {
var b = this._data;
a >>>= 0;
0 === a ? (b[0] = d.x, b[2] = d.y, b[4] = d.z) : 1 === a && (b[1] = d.x, b[3] = d.y, b[5] = d.z);
};
e.prototype.copyColumnFrom = function(a, d) {
var b = this._data;
a >>>= 0;
0 === a ? (b[0] = d.x, b[2] = d.y, b[4] = d.z) : 1 === a && (b[1] = d.x, b[3] = d.y, b[5] = d.z);
};
e.prototype.updateScaleAndRotation = function(a, d, b, e) {
var c = this._data;
if (0 !== b && b !== t || 0 !== e && e !== t) {
var k = p(b), m = u(b);
b === e ? (c[0] = k * a, c[1] = m * a) : (c[0] = p(e) * a, c[1] = u(e) * a);
c[2] = -m * d;
c[3] = k * d;
} else {
c[0] = a, c[1] = c[2] = 0, c[3] = d;
}
};
e.prototype.clone = function() {
var a = this._data;
return new c.geom.Matrix(a[0], a[1], a[2], a[3], a[4], a[5]);
};
e.prototype.equals = function(a) {
var d = this._data;
a = a._data;
return d[0] === a[0] && d[1] === a[1] && d[2] === a[2] && d[3] === a[3] && d[4] === a[4] && d[5] === a[5];
};
e.prototype.toString = function() {
var a = this._data;
return "(a=" + a[0] + ", b=" + a[1] + ", c=" + a[2] + ", d=" + a[3] + ", tx=" + a[4] + ", ty=" + a[5] + ")";
};
e.prototype.writeExternal = function(a) {
var d = this._data;
a.writeFloat(d[0]);
a.writeFloat(d[1]);
a.writeFloat(d[2]);
a.writeFloat(d[3]);
a.writeFloat(d[4]);
a.writeFloat(d[5]);
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.FROZEN_IDENTITY_MATRIX = Object.freeze(new e);
e.TEMP_MATRIX = new e;
return e;
}(a.ASNative);
h.Matrix = q;
})(c.geom || (c.geom = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
function p(a, e, c, k, f, d, b) {
var g = e * e, m = c * c, l = k * k, p = g + m + l, u = Math.sqrt(p);
e /= u;
c /= u;
k /= u;
g /= p;
m /= p;
l /= p;
p = Math.cos(a);
a = Math.sin(a);
return new h.geom.Matrix3D([g + (m + l) * p, e * c * (1 - p) + k * a, e * k * (1 - p) - c * a, 0, e * c * (1 - p) - k * a, m + (g + l) * p, c * k * (1 - p) + e * a, 0, e * k * (1 - p) + c * a, c * k * (1 - p) - e * a, l + (g + m) * p, 0, (f * (m + l) - e * (d * c + b * k)) * (1 - p) + (d * k - b * c) * a, (d * (g + l) - c * (f * e + b * k)) * (1 - p) + (b * e - f * k) * a, (b * (g + m) - k * (f * e + d * c)) * (1 - p) + (f * c - d * e) * a, 1]);
}
var u = c.Debug.notImplemented, l = c.AVM2.Runtime.asCoerceString, e = new Uint32Array([0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15]), m = function(c) {
function m(a) {
void 0 === a && (a = null);
this._matrix = new Float32Array(16);
a && 16 <= a.length ? this.copyRawDataFrom(a) : this.identity();
}
__extends(m, c);
m.interpolate = function(a, e, f) {
u("public flash.geom.Matrix3D::static interpolate");
};
Object.defineProperty(m.prototype, "rawData", {get:function() {
var e = new a.Float64Vector;
this.copyRawDataTo(e);
return e;
}, set:function(a) {
this.copyRawDataFrom(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "position", {get:function() {
var a = this._matrix;
return new h.geom.Vector3D(a[12], a[13], a[14]);
}, set:function(a) {
var e = this._matrix;
e[12] = a.x;
e[13] = a.y;
e[14] = a.z;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "determinant", {get:function() {
var a = this._matrix, e = a[4], f = a[8], d = a[12], b = a[5], g = a[9], c = a[13], m = a[6], l = a[10], h = a[14], q = a[7], t = a[11], s = a[15];
return a[0] * (b * (l * s - t * h) - m * (g * s - t * c) + q * (g * h - l * c)) - a[1] * (e * (l * s - t * h) - m * (f * s - t * d) + q * (f * h - l * d)) + a[2] * (e * (g * s - t * c) - b * (f * s - t * d) + q * (f * c - g * d)) - a[3] * (e * (g * h - l * c) - b * (f * h - l * d) + m * (f * c - g * d));
}, enumerable:!0, configurable:!0});
m.prototype.clone = function() {
return new h.geom.Matrix3D(this._matrix);
};
m.prototype.copyToMatrix3D = function(a) {
a._matrix.set(this._matrix);
};
m.prototype.append = function(a) {
var e = a._matrix, f = this._matrix;
a = this._matrix;
var d = e[0], b = e[4], g = e[8], c = e[12], m = e[1], l = e[5], h = e[9], q = e[13], t = e[2], s = e[6], p = e[10], u = e[14], v = e[3], L = e[7], H = e[11], e = e[15], J = f[0], C = f[4], E = f[8], F = f[12], I = f[1], G = f[5], Z = f[9], Q = f[13], S = f[2], O = f[6], P = f[10], V = f[14], $ = f[3], W = f[7], x = f[11], f = f[15];
a[0] = d * J + b * I + g * S + c * $;
a[1] = m * J + l * I + h * S + q * $;
a[2] = t * J + s * I + p * S + u * $;
a[3] = v * J + L * I + H * S + e * $;
a[4] = d * C + b * G + g * O + c * W;
a[5] = m * C + l * G + h * O + q * W;
a[6] = t * C + s * G + p * O + u * W;
a[7] = v * C + L * G + H * O + e * W;
a[8] = d * E + b * Z + g * P + c * x;
a[9] = m * E + l * Z + h * P + q * x;
a[10] = t * E + s * Z + p * P + u * x;
a[11] = v * E + L * Z + H * P + e * x;
a[12] = d * F + b * Q + g * V + c * f;
a[13] = m * F + l * Q + h * V + q * f;
a[14] = t * F + s * Q + p * V + u * f;
a[15] = v * F + L * Q + H * V + e * f;
};
m.prototype.prepend = function(a) {
var e = this._matrix, c = a._matrix;
a = this._matrix;
var d = e[0], b = e[4], g = e[8], m = e[12], l = e[1], h = e[5], q = e[9], t = e[13], s = e[2], p = e[6], u = e[10], v = e[14], D = e[3], L = e[7], H = e[11], e = e[15], J = c[0], C = c[4], E = c[8], F = c[12], I = c[1], G = c[5], Z = c[9], Q = c[13], S = c[2], O = c[6], P = c[10], V = c[14], $ = c[3], W = c[7], x = c[11], c = c[15];
a[0] = d * J + b * I + g * S + m * $;
a[1] = l * J + h * I + q * S + t * $;
a[2] = s * J + p * I + u * S + v * $;
a[3] = D * J + L * I + H * S + e * $;
a[4] = d * C + b * G + g * O + m * W;
a[5] = l * C + h * G + q * O + t * W;
a[6] = s * C + p * G + u * O + v * W;
a[7] = D * C + L * G + H * O + e * W;
a[8] = d * E + b * Z + g * P + m * x;
a[9] = l * E + h * Z + q * P + t * x;
a[10] = s * E + p * Z + u * P + v * x;
a[11] = D * E + L * Z + H * P + e * x;
a[12] = d * F + b * Q + g * V + m * c;
a[13] = l * F + h * Q + q * V + t * c;
a[14] = s * F + p * Q + u * V + v * c;
a[15] = D * F + L * Q + H * V + e * c;
};
m.prototype.invert = function() {
var a = this.determinant;
if (1E-7 > Math.abs(a)) {
return!1;
}
var a = 1 / a, e = this._matrix, c = e[0], d = e[1], b = e[2], g = e[3], m = e[4], l = e[5], h = e[6], q = e[7], t = e[8], s = e[9], p = e[10], u = e[11], v = e[12], D = e[13], L = e[14], H = e[15];
e[0] = a * (l * (p * H - L * u) - s * (h * H - L * q) + D * (h * u - p * q));
e[1] = -a * (d * (p * H - L * u) - s * (b * H - L * g) + D * (b * u - p * g));
e[2] = a * (d * (h * H - L * q) - l * (b * H - L * g) + D * (b * q - h * g));
e[3] = -a * (d * (h * u - p * q) - l * (b * u - p * g) + s * (b * q - h * g));
e[4] = -a * (m * (p * H - L * u) - t * (h * H - L * q) + v * (h * u - p * q));
e[5] = a * (c * (p * H - L * u) - t * (b * H - L * g) + v * (b * u - p * g));
e[6] = -a * (c * (h * H - L * q) - m * (b * H - L * g) + v * (b * q - h * g));
e[7] = a * (c * (h * u - p * q) - m * (b * u - p * g) + t * (b * q - h * g));
e[8] = a * (m * (s * H - D * u) - t * (l * H - D * q) + v * (l * u - s * q));
e[9] = -a * (c * (s * H - D * u) - t * (d * H - D * g) + v * (d * u - s * g));
e[10] = a * (c * (l * H - D * q) - m * (d * H - D * g) + v * (d * q - l * g));
e[11] = -a * (c * (l * u - s * q) - m * (d * u - s * g) + t * (d * q - l * g));
e[12] = -a * (m * (s * L - D * p) - t * (l * L - D * h) + v * (l * p - s * h));
e[13] = a * (c * (s * L - D * p) - t * (d * L - D * b) + v * (d * p - s * b));
e[14] = -a * (c * (l * L - D * h) - m * (d * L - D * b) + v * (d * h - l * b));
e[15] = a * (c * (l * p - s * h) - m * (d * p - s * b) + t * (d * h - l * b));
return!0;
};
m.prototype.identity = function() {
var a = this._matrix;
a[0] = a[5] = a[10] = a[15] = 1;
a[1] = a[2] = a[3] = a[4] = a[6] = a[7] = a[8] = a[9] = a[11] = a[12] = a[13] = a[14] = 0;
};
m.prototype.decompose = function(a) {
void 0 === a && (a = "eulerAngles");
l(a);
u("public flash.geom.Matrix3D::decompose");
};
m.prototype.recompose = function(a, e) {
void 0 === e && (e = "eulerAngles");
l(e);
u("public flash.geom.Matrix3D::recompose");
};
m.prototype.appendTranslation = function(a, e, c) {
a = +a;
e = +e;
c = +c;
var d = this._matrix, b = d[3], g = d[7], m = d[11], l = d[15];
d[0] += a * b;
d[1] += e * b;
d[2] += c * b;
d[4] += a * g;
d[5] += e * g;
d[6] += c * g;
d[8] += a * m;
d[9] += e * m;
d[10] += c * m;
d[12] += a * l;
d[13] += e * l;
d[14] += c * l;
};
m.prototype.appendRotation = function(a, e, c) {
void 0 === c && (c = null);
this.append(p(+a / 180 * Math.PI, e.x, e.y, e.z, c ? c.x : 0, c ? c.y : 0, c ? c.z : 0));
};
m.prototype.appendScale = function(a, e, c) {
a = +a;
e = +e;
c = +c;
var d = this._matrix;
d[0] *= a;
d[1] *= e;
d[2] *= c;
d[4] *= a;
d[5] *= e;
d[6] *= c;
d[8] *= a;
d[9] *= e;
d[10] *= c;
d[12] *= a;
d[13] *= e;
d[14] *= c;
};
m.prototype.prependTranslation = function(a, e, c) {
a = +a;
e = +e;
c = +c;
var d = this._matrix, b = d[1], g = d[5], m = d[9], l = d[2], h = d[6], q = d[10], t = d[3], s = d[7], p = d[11];
d[12] += d[0] * a + d[4] * e + d[8] * c;
d[13] += b * a + g * e + m * c;
d[14] += l * a + h * e + q * c;
d[15] += t * a + s * e + p * c;
};
m.prototype.prependRotation = function(a, e, c) {
void 0 === c && (c = null);
this.prepend(p(+a / 180 * Math.PI, e.x, e.y, e.z, c ? c.x : 0, c ? c.y : 0, c ? c.z : 0));
};
m.prototype.prependScale = function(a, e, c) {
a = +a;
e = +e;
c = +c;
var d = this._matrix;
d[0] *= a;
d[1] *= a;
d[2] *= a;
d[3] *= a;
d[4] *= e;
d[5] *= e;
d[6] *= e;
d[7] *= e;
d[8] *= c;
d[9] *= c;
d[10] *= c;
d[11] *= c;
};
m.prototype.transformVector = function(a) {
var e = this._matrix, c = a.x, d = a.y;
a = a.z;
return new h.geom.Vector3D(e[0] * c + e[4] * d + e[8] * a + e[12], e[1] * c + e[5] * d + e[9] * a + e[13], e[2] * c + e[6] * d + e[10] * a + e[14]);
};
m.prototype.deltaTransformVector = function(a) {
var e = this._matrix, c = a.x, d = a.y;
a = a.z;
return new h.geom.Vector3D(e[0] * c + e[4] * d + e[8] * a, e[1] * c + e[5] * d + e[9] * a, e[2] * c + e[6] * d + e[10] * a);
};
m.prototype.transformVectors = function(a, e) {
for (var c = this._matrix, d = c[0], b = c[4], g = c[8], m = c[12], l = c[1], h = c[5], q = c[9], t = c[13], s = c[2], p = c[6], u = c[10], c = c[14], v = 0;v < a.length - 2;v += 3) {
var D = a.asGetNumericProperty(v), L = a.asGetNumericProperty(v + 1), H = a.asGetNumericProperty(v + 2);
e.push(d * D + b * L + g * H + m);
e.push(l * D + h * L + q * H + t);
e.push(s * D + p * L + u * H + c);
}
};
m.prototype.transpose = function() {
var a = this._matrix, e;
e = a[1];
a[1] = a[4];
a[4] = e;
e = a[2];
a[2] = a[8];
a[5] = e;
e = a[3];
a[3] = a[12];
a[12] = e;
e = a[6];
a[6] = a[9];
a[9] = e;
e = a[7];
a[7] = a[13];
a[13] = e;
e = a[11];
a[11] = a[14];
a[14] = e;
};
m.prototype.pointAt = function(a, e, c) {
u("public flash.geom.Matrix3D::pointAt");
};
m.prototype.interpolateTo = function(a, e) {
u("public flash.geom.Matrix3D::interpolateTo");
};
m.prototype.copyFrom = function(a) {
this._matrix.set(a._matrix);
};
m.prototype.copyRawDataTo = function(a) {
var c = 0, f = !1;
void 0 === c && (c = 0);
void 0 === f && (f = !1);
var c = c >>> 0, d = this._matrix;
if (f) {
for (f = 0, c |= 0;16 > f;f++, c++) {
a.asSetNumericProperty(c, d[e[f]]);
}
} else {
for (f = 0, c |= 0;16 > f;f++, c++) {
a.asSetNumericProperty(c, d[f]);
}
}
};
m.prototype.copyRawDataFrom = function(a) {
var c = 0, f = !1;
void 0 === c && (c = 0);
void 0 === f && (f = !1);
var c = c >>> 0, d = this._matrix;
if (f) {
for (f = 0, c |= 0;16 > f;f++, c++) {
d[e[f]] = a.asGetNumericProperty(c) || 0;
}
} else {
for (f = 0, c |= 0;16 > f;f++, c++) {
d[f] = a.asGetNumericProperty(c) || 0;
}
}
};
m.prototype.copyRowTo = function(a, e) {
var c = a >>> 0 | 0, d = this._matrix;
e.x = d[c];
e.y = d[c + 4];
e.z = d[c + 8];
e.w = d[c + 12];
};
m.prototype.copyColumnTo = function(a, e) {
var c = a >>> 0 << 2, d = this._matrix;
e.x = d[c];
e.y = d[c + 1];
e.z = d[c + 2];
e.w = d[c + 3];
};
m.prototype.copyRowFrom = function(a, e) {
var c = a >>> 0 | 0, d = this._matrix;
d[c] = e.x;
d[c + 4] = e.y;
d[c + 8] = e.z;
d[c + 12] = e.w;
};
m.prototype.copyColumnFrom = function(a, e) {
var c = a >>> 0 << 2, d = this._matrix;
d[c] = e.x;
d[c + 1] = e.y;
d[c + 2] = e.z;
d[c + 3] = e.w;
};
m.classInitializer = null;
m.initializer = null;
m.classSymbols = null;
m.instanceSymbols = null;
return m;
}(a.ASNative);
v.Matrix3D = m;
})(h.geom || (h.geom = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.geom.Orientation3D");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.EULER_ANGLES = "eulerAngles";
e.AXIS_ANGLE = "axisAngle";
e.QUATERNION = "quaternion";
return e;
}(a.ASNative);
h.Orientation3D = u;
})(h.geom || (h.geom = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.geom.PerspectiveProjection");
}
__extends(c, a);
Object.defineProperty(c.prototype, "fieldOfView", {get:function() {
s("public flash.geom.PerspectiveProjection::get fieldOfView");
}, set:function(a) {
s("public flash.geom.PerspectiveProjection::set fieldOfView");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "projectionCenter", {get:function() {
s("public flash.geom.PerspectiveProjection::get projectionCenter");
}, set:function(a) {
s("public flash.geom.PerspectiveProjection::set projectionCenter");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "focalLength", {get:function() {
s("public flash.geom.PerspectiveProjection::get focalLength");
}, set:function(a) {
s("public flash.geom.PerspectiveProjection::set focalLength");
}, enumerable:!0, configurable:!0});
c.prototype.toMatrix3D = function() {
s("public flash.geom.PerspectiveProjection::toMatrix3D");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.PerspectiveProjection = l;
})(h.geom || (h.geom = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c(a, m) {
void 0 === a && (a = 0);
void 0 === m && (m = 0);
this.x = +a;
this.y = +m;
}
__extends(c, a);
Object.defineProperty(c.prototype, "native_x", {get:function() {
return this.x;
}, set:function(a) {
this.x = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_y", {get:function() {
return this.y;
}, set:function(a) {
this.y = a;
}, enumerable:!0, configurable:!0});
c.prototype.Point = function(a, c) {
void 0 === a && (a = 0);
void 0 === c && (c = 0);
this.x = a;
this.y = c;
};
Object.defineProperty(c.prototype, "length", {get:function() {
return Math.sqrt(this.x * this.x + this.y * this.y);
}, enumerable:!0, configurable:!0});
c.interpolate = function(a, m, h) {
var q = 1 - h;
return new c(a.x * h + m.x * q, a.y * h + m.y * q);
};
c.distance = function(a, c) {
var l = c.x - a.x, h = c.y - a.y;
return 0 === l ? Math.abs(h) : 0 === h ? Math.abs(l) : Math.sqrt(l * l + h * h);
};
c.polar = function(a, m) {
a = +a;
m = +m;
return new c(a * Math.cos(m), a * Math.sin(m));
};
c.prototype.clone = function() {
return new c(this.x, this.y);
};
c.prototype.offset = function(a, c) {
this.x += +a;
this.y += +c;
};
c.prototype.equals = function(a) {
return this.x === a.x && this.y === a.y;
};
c.prototype.subtract = function(a) {
return new c(this.x - a.x, this.y - a.y);
};
c.prototype.add = function(a) {
return new c(this.x + a.x, this.y + a.y);
};
c.prototype.normalize = function(a) {
if (0 !== this.x || 0 !== this.y) {
a = +a / this.length, this.x *= a, this.y *= a;
}
};
c.prototype.copyFrom = function(a) {
this.x = a.x;
this.y = a.y;
};
c.prototype.setTo = function(a, c) {
this.x = +a;
this.y = +c;
};
c.prototype.toTwips = function() {
this.x = 20 * this.x | 0;
this.y = 20 * this.y | 0;
return this;
};
c.prototype.toPixels = function() {
this.x /= 20;
this.y /= 20;
return this;
};
c.prototype.round = function() {
this.x = Math.round(this.x);
this.y = Math.round(this.y);
return this;
};
c.prototype.toString = function() {
return "(x=" + this.x + ", y=" + this.y + ")";
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
c.Point = h;
})(c.geom || (c.geom = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function l(a, c, l, h) {
void 0 === a && (a = 0);
void 0 === c && (c = 0);
void 0 === l && (l = 0);
void 0 === h && (h = 0);
this.x = +a;
this.y = +c;
this.width = +l;
this.height = +h;
}
__extends(l, a);
l.FromBounds = function(a) {
var c = a.xMin, h = a.yMin;
return new l(c / 20, h / 20, (a.xMax - c) / 20, (a.yMax - h) / 20);
};
Object.defineProperty(l.prototype, "native_x", {get:function() {
return this.x;
}, set:function(a) {
this.x = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "native_y", {get:function() {
return this.y;
}, set:function(a) {
this.y = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "native_width", {get:function() {
return this.width;
}, set:function(a) {
this.width = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "native_height", {get:function() {
return this.height;
}, set:function(a) {
this.height = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "left", {get:function() {
return this.x;
}, set:function(a) {
a = +a;
this.width += this.x - a;
this.x = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "right", {get:function() {
return this.x + this.width;
}, set:function(a) {
this.width = +a - this.x;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "top", {get:function() {
return this.y;
}, set:function(a) {
a = +a;
this.height += this.y - a;
this.y = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "bottom", {get:function() {
return this.y + this.height;
}, set:function(a) {
this.height = +a - this.y;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "topLeft", {get:function() {
return new c.Point(this.left, this.top);
}, set:function(a) {
this.top = a.y;
this.left = a.x;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "bottomRight", {get:function() {
return new c.Point(this.right, this.bottom);
}, set:function(a) {
this.bottom = a.y;
this.right = a.x;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "size", {get:function() {
return new c.Point(this.width, this.height);
}, set:function(a) {
this.width = a.x;
this.height = a.y;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "area", {get:function() {
return this.width * this.height;
}, enumerable:!0, configurable:!0});
l.prototype.clone = function() {
return new l(this.x, this.y, this.width, this.height);
};
l.prototype.isEmpty = function() {
return 0 >= this.width || 0 >= this.height;
};
l.prototype.setEmpty = function() {
this.height = this.width = this.y = this.x = 0;
};
l.prototype.inflate = function(a, c) {
a = +a;
c = +c;
this.x -= a;
this.y -= c;
this.width += 2 * a;
this.height += 2 * c;
};
l.prototype.inflatePoint = function(a) {
this.inflate(a.x, a.y);
};
l.prototype.offset = function(a, c) {
this.x += +a;
this.y += +c;
};
l.prototype.offsetPoint = function(a) {
this.offset(a.x, a.y);
};
l.prototype.contains = function(a, c) {
a = +a;
c = +c;
return a >= this.x && a < this.right && c >= this.y && c < this.bottom;
};
l.prototype.containsPoint = function(a) {
return this.contains(a.x, a.y);
};
l.prototype.containsRect = function(a) {
var c = a.x + a.width, l = a.y + a.height, h = this.x + this.width, n = this.y + this.height;
return a.x >= this.x && a.x < h && a.y >= this.y && a.y < n && c > this.x && c <= h && l > this.y && l <= n;
};
l.prototype.intersection = function(a) {
return this.clone().intersectInPlace(a);
};
l.prototype.intersects = function(a) {
return Math.max(this.x, a.x) <= Math.min(this.right, a.right) && Math.max(this.y, a.y) <= Math.min(this.bottom, a.bottom);
};
l.prototype.intersectInPlace = function(a) {
var c = this.x, l = this.y, h = a.x, n = a.y, k = Math.max(c, h), c = Math.min(c + this.width, h + a.width);
if (k <= c && (h = Math.max(l, n), a = Math.min(l + this.height, n + a.height), h <= a)) {
return this.setTo(k, h, c - k, a - h), this;
}
this.setEmpty();
return this;
};
l.prototype.intersectInPlaceInt32 = function(a) {
var c = this.x | 0, l = this.y | 0, h = this.width | 0, n = this.height | 0, k = a.x | 0, f = a.width | 0, d = Math.max(c, k) | 0, c = Math.min(c + h | 0, k + f | 0) | 0;
if (d <= c && (h = a.y | 0, k = a.height | 0, a = Math.max(l, h) | 0, l = Math.min(l + n | 0, h + k | 0), a <= l)) {
return this.setTo(d, a, c - d, l - a), this;
}
this.setEmpty();
return this;
};
l.prototype.union = function(a) {
return this.clone().unionInPlace(a);
};
l.prototype.unionInPlace = function(a) {
if (a.isEmpty()) {
return this;
}
if (this.isEmpty()) {
return this.copyFrom(a), this;
}
var c = Math.min(this.x, a.x), l = Math.min(this.y, a.y);
this.setTo(c, l, Math.max(this.right, a.right) - c, Math.max(this.bottom, a.bottom) - l);
return this;
};
l.prototype.equals = function(a) {
return this === a || this.x === a.x && this.y === a.y && this.width === a.width && this.height === a.height;
};
l.prototype.copyFrom = function(a) {
this.x = a.x;
this.y = a.y;
this.width = a.width;
this.height = a.height;
};
l.prototype.setTo = function(a, c, l, h) {
this.x = +a;
this.y = +c;
this.width = +l;
this.height = +h;
};
l.prototype.toTwips = function() {
this.x = 20 * this.x | 0;
this.y = 20 * this.y | 0;
this.width = 20 * this.width | 0;
this.height = 20 * this.height | 0;
return this;
};
l.prototype.getBaseWidth = function(a) {
return Math.abs(Math.cos(a)) * this.width + Math.abs(Math.sin(a)) * this.height;
};
l.prototype.getBaseHeight = function(a) {
return Math.abs(Math.sin(a)) * this.width + Math.abs(Math.cos(a)) * this.height;
};
l.prototype.toPixels = function() {
this.x /= 20;
this.y /= 20;
this.width /= 20;
this.height /= 20;
return this;
};
l.prototype.snapInPlace = function() {
var a = Math.ceil(this.x + this.width), c = Math.ceil(this.y + this.height);
this.x = Math.floor(this.x);
this.y = Math.floor(this.y);
this.width = a - this.x;
this.height = c - this.y;
return this;
};
l.prototype.roundInPlace = function() {
var a = Math.round(this.x + this.width), c = Math.round(this.y + this.height);
this.x = Math.round(this.x);
this.y = Math.round(this.y);
this.width = a - this.x;
this.height = c - this.y;
return this;
};
l.prototype.toString = function() {
return "(x=" + this.x + ", y=" + this.y + ", w=" + this.width + ", h=" + this.height + ")";
};
l.prototype.writeExternal = function(a) {
a.writeFloat(this.x);
a.writeFloat(this.y);
a.writeFloat(this.width);
a.writeFloat(this.height);
};
l.prototype.readExternal = function(a) {
this.x = a.readFloat();
this.y = a.readFloat();
this.width = a.readFloat();
this.height = a.readFloat();
};
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
return l;
}(a.ASNative);
c.Rectangle = h;
})(c.geom || (c.geom = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.AVM2.Runtime.throwError, e = c.AVM2.Errors, m = function(a) {
function c(a) {
a || l("ArgumentError", e.NullPointerError, "displayObject");
this._displayObject = a;
}
__extends(c, a);
Object.defineProperty(c.prototype, "matrix", {get:function() {
return this._displayObject._getMatrix().clone().toPixelsInPlace();
}, set:function(a) {
this._displayObject._setMatrix(a, !0);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "colorTransform", {get:function() {
return this._displayObject._colorTransform.clone();
}, set:function(a) {
this._displayObject._setColorTransform(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "concatenatedMatrix", {get:function() {
var a = this._displayObject._getConcatenatedMatrix().clone().toPixelsInPlace();
this._displayObject._stage || a.scale(5, 5);
return a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "concatenatedColorTransform", {get:function() {
return this._displayObject._getConcatenatedColorTransform();
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "pixelBounds", {get:function() {
p("public flash.geom.Transform::get pixelBounds");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "matrix3D", {get:function() {
var a = this._displayObject._matrix3D;
return a && a.clone();
}, set:function(a) {
v.Matrix3D.isType(a) || l("TypeError", e.CheckTypeFailedError, a, "flash.geom.Matrix3D");
a = a.rawData;
this.matrix = new h.geom.Matrix(a.asGetPublicProperty(0), a.asGetPublicProperty(1), a.asGetPublicProperty(4), a.asGetPublicProperty(5), a.asGetPublicProperty(12), a.asGetPublicProperty(13));
u("public flash.geom.Transform::set matrix3D");
}, enumerable:!0, configurable:!0});
c.prototype.getRelativeMatrix3D = function(a) {
p("public flash.geom.Transform::getRelativeMatrix3D");
};
Object.defineProperty(c.prototype, "perspectiveProjection", {get:function() {
p("public flash.geom.Transform::get perspectiveProjection");
}, set:function(a) {
p("public flash.geom.Transform::set perspectiveProjection");
}, enumerable:!0, configurable:!0});
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
v.Transform = m;
})(h.geom || (h.geom = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.geom.Utils3D");
}
__extends(c, a);
c.projectVector = function(a, e) {
s("public flash.geom.Utils3D::static projectVector");
};
c.projectVectors = function(a, e, c, k) {
s("public flash.geom.Utils3D::static projectVectors");
};
c.pointTowards = function(a, e, c, k, f) {
s("public flash.geom.Utils3D::static pointTowards");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.Utils3D = l;
})(h.geom || (h.geom = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c(a, m, l, h) {
void 0 === a && (a = 0);
void 0 === m && (m = 0);
void 0 === l && (l = 0);
void 0 === h && (h = 0);
this.x = +a;
this.y = +m;
this.z = +l;
this.w = +h;
}
__extends(c, a);
Object.defineProperty(c.prototype, "native_x", {get:function() {
return this.x;
}, set:function(a) {
this.x = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_y", {get:function() {
return this.y;
}, set:function(a) {
this.y = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_z", {get:function() {
return this.z;
}, set:function(a) {
this.z = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_w", {get:function() {
return this.w;
}, set:function(a) {
this.w = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "length", {get:function() {
return Math.sqrt(this.lengthSquared);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "lengthSquared", {get:function() {
return this.x * this.x + this.y * this.y + this.z * this.z;
}, enumerable:!0, configurable:!0});
c.angleBetween = function(a, c) {
return Math.acos(a.dotProduct(c) / (a.length * c.length));
};
c.distance = function(a, c) {
return a.subtract(c).length;
};
c.prototype.dotProduct = function(a) {
return this.x * a.x + this.y * a.y + this.z * a.z;
};
c.prototype.crossProduct = function(a) {
return new c(this.y * a.z - this.z * a.y, this.z * a.x - this.x * a.z, this.x * a.y - this.y * a.x, 1);
};
c.prototype.normalize = function() {
var a = this.length;
0 !== a ? (this.x /= a, this.y /= a, this.z /= a) : this.x = this.y = this.z = 0;
return a;
};
c.prototype.scaleBy = function(a) {
a = +a;
this.x *= a;
this.y *= a;
this.z *= a;
};
c.prototype.incrementBy = function(a) {
this.x += a.x;
this.y += a.y;
this.z += a.z;
};
c.prototype.decrementBy = function(a) {
this.x -= a.x;
this.y -= a.y;
this.z -= a.z;
};
c.prototype.add = function(a) {
return new c(this.x + a.x, this.y + a.y, this.z + a.z);
};
c.prototype.subtract = function(a) {
return new c(this.x - a.x, this.y - a.y, this.z - a.z);
};
c.prototype.negate = function() {
this.x = -this.x;
this.y = -this.y;
this.z = -this.z;
};
c.prototype.equals = function(a, c) {
return this.x === a.x && this.y === a.y && this.z === a.z && (!c || this.w === a.w);
};
c.prototype.nearEquals = function(a, c, l) {
return Math.abs(this.x - a.x) < c && Math.abs(this.y - a.y) < c && Math.abs(this.z - a.z) < c && (!l || Math.abs(this.w - a.w) < c);
};
c.prototype.project = function() {
this.x /= this.w;
this.y /= this.w;
this.z /= this.w;
};
c.prototype.copyFrom = function(a) {
this.x = a.x;
this.y = a.y;
this.z = a.z;
};
c.prototype.setTo = function(a, c, l) {
this.x = +a;
this.y = +c;
this.z = +l;
};
c.prototype.clone = function() {
return new c(this.x, this.y, this.z, this.w);
};
c.prototype.toString = function() {
return "Vector3D(" + this.x + ", " + this.y + ", " + this.z + ")";
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.X_AXIS = Object.freeze(new c(1, 0, 0));
c.Y_AXIS = Object.freeze(new c(0, 1, 0));
c.Z_AXIS = Object.freeze(new c(0, 0, 1));
return c;
}(a.ASNative);
c.Vector3D = h;
})(c.geom || (c.geom = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.accessibility.Accessibility");
}
__extends(c, a);
Object.defineProperty(c, "active", {get:function() {
s("public flash.accessibility.Accessibility::get active");
return c._active;
}, enumerable:!0, configurable:!0});
c.sendEvent = function(a, e, c, k) {
s("public flash.accessibility.Accessibility::static sendEvent");
};
c.updateProperties = function() {
s("public flash.accessibility.Accessibility::static updateProperties");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c._active = !1;
return c;
}(a.ASNative);
h.Accessibility = l;
})(h.accessibility || (h.accessibility = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.accessibility.AccessibilityImplementation");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.AccessibilityImplementation = u;
})(h.accessibility || (h.accessibility = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
c.AccessibilityProperties = h;
})(c.accessibility || (c.accessibility = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.assert, u = c.AVM2.Runtime.asCoerceString, l = function(a) {
function m(a, e, c) {
this._type = u(a);
this._bubbles = !!e;
this._cancelable = !!c;
this._currentTarget = this._target = null;
this._eventPhase = h.EventPhase.AT_TARGET;
this._isDefaultPrevented = this._stopImmediatePropagation = this._stopPropagation = !1;
}
__extends(m, a);
m.getInstance = function(a, e) {
var c;
void 0 === e && (e = !1);
void 0 === c && (c = !1);
var k = m._instances[a];
k || (k = new m(a, e, c), m._instances[a] = k);
k._bubbles = e;
k._cancelable = c;
return k;
};
m.getBroadcastInstance = function(a) {
var e, c;
void 0 === e && (e = !1);
void 0 === c && (c = !1);
var k = m._instances[a];
k || (k = new m(a, e, c), m._instances[a] = k, s(m.isBroadcastEventType(a)));
k._isBroadcastEvent = !0;
k._bubbles = e;
k._cancelable = c;
return k;
};
m.isBroadcastEventType = function(a) {
switch(a) {
case m.ENTER_FRAME:
;
case m.EXIT_FRAME:
;
case m.FRAME_CONSTRUCTED:
;
case m.RENDER:
;
case m.ACTIVATE:
;
case m.DEACTIVATE:
return!0;
}
return!1;
};
Object.defineProperty(m.prototype, "type", {get:function() {
return this._type;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "bubbles", {get:function() {
return this._bubbles;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "cancelable", {get:function() {
return this._cancelable;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "target", {get:function() {
return this._target;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "currentTarget", {get:function() {
return this._currentTarget;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "eventPhase", {get:function() {
return this._eventPhase;
}, enumerable:!0, configurable:!0});
m.prototype.stopPropagation = function() {
this._stopPropagation = !0;
};
m.prototype.stopImmediatePropagation = function() {
this._stopImmediatePropagation = this._stopPropagation = !0;
};
m.prototype.preventDefault = function() {
this._cancelable && (this._isDefaultPrevented = !0);
};
m.prototype.isDefaultPrevented = function() {
return this._isDefaultPrevented;
};
m.prototype.isBroadcastEvent = function() {
return!!this._isBroadcastEvent;
};
m.prototype.clone = function() {
return new m(this._type, this._bubbles, this._cancelable);
};
m.prototype.toString = function() {
return this.formatToString("Event", "type", "bubbles", "cancelable", "eventPhase");
};
m.prototype.formatToString = function(a) {
for (var e = [], c = 1;c < arguments.length;c++) {
e[c - 1] = arguments[c];
}
for (var c = "[" + a, k = 0;k < e.length;k++) {
var f = e[k], d = this.asGetPublicProperty(f);
"string" === typeof d && (d = '"' + d + '"');
c += " " + f + "=" + d;
}
return c + "]";
};
m.classInitializer = function() {
m._instances = c.ObjectUtilities.createMap();
};
m.initializer = null;
m.classSymbols = null;
m.instanceSymbols = null;
m.ACTIVATE = "activate";
m.ADDED = "added";
m.ADDED_TO_STAGE = "addedToStage";
m.CANCEL = "cancel";
m.CHANGE = "change";
m.CLEAR = "clear";
m.CLOSE = "close";
m.COMPLETE = "complete";
m.CONNECT = "connect";
m.COPY = "copy";
m.CUT = "cut";
m.DEACTIVATE = "deactivate";
m.ENTER_FRAME = "enterFrame";
m.FRAME_CONSTRUCTED = "frameConstructed";
m.EXIT_FRAME = "exitFrame";
m.FRAME_LABEL = "frameLabel";
m.ID3 = "id3";
m.INIT = "init";
m.MOUSE_LEAVE = "mouseLeave";
m.OPEN = "open";
m.PASTE = "paste";
m.REMOVED = "removed";
m.REMOVED_FROM_STAGE = "removedFromStage";
m.RENDER = "render";
m.RESIZE = "resize";
m.SCROLL = "scroll";
m.TEXT_INTERACTION_MODE_CHANGE = "textInteractionModeChange";
m.SELECT = "select";
m.SELECT_ALL = "selectAll";
m.SOUND_COMPLETE = "soundComplete";
m.TAB_CHILDREN_CHANGE = "tabChildrenChange";
m.TAB_ENABLED_CHANGE = "tabEnabledChange";
m.TAB_INDEX_CHANGE = "tabIndexChange";
m.UNLOAD = "unload";
m.FULLSCREEN = "fullScreen";
m.CONTEXT3D_CREATE = "context3DCreate";
m.TEXTURE_READY = "textureReady";
m.VIDEO_FRAME = "videoFrame";
m.SUSPEND = "suspend";
m.AVM1_INIT = "initialize";
m.AVM1_CONSTRUCT = "construct";
m.AVM1_LOAD = "load";
return m;
}(a.ASNative);
h.Event = l;
})(h.events || (h.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
(function(v) {
var p = c.AVM2.Runtime.asCoerceString, u = c.isFunction, l = c.isNullOrUndefined, e = c.AVM2.Runtime.throwError, m = c.Debug.assert, t = c.AVM2.AS.traceEventsOption, q = function() {
return function(a, b, e) {
this.listener = a;
this.useCapture = b;
this.priority = e;
};
}(), n = function() {
function a() {
this._aliasCount = 0;
this._entries = [];
}
a.prototype.isEmpty = function() {
return 0 === this._entries.length;
};
a.prototype.insert = function(a, d, e) {
for (var c = this._entries, f = c.length, k = f - 1;0 <= k;k--) {
var m = c[k];
if (m.listener === a) {
return;
}
if (e > m.priority) {
f = k;
} else {
break;
}
}
c = this.ensureNonAliasedEntries();
c.splice(f, 0, new q(a, d, e));
};
a.prototype.ensureNonAliasedEntries = function() {
var a = this._entries;
0 < this._aliasCount && (a = this._entries = a.slice(), this._aliasCount = 0);
return a;
};
a.prototype.remove = function(a) {
for (var d = this._entries, e = 0;e < d.length;e++) {
if (d[e].listener === a) {
this.ensureNonAliasedEntries().splice(e, 1);
break;
}
}
};
a.prototype.snapshot = function() {
this._aliasCount++;
return this._entries;
};
a.prototype.releaseSnapshot = function(a) {
this._entries === a && 0 < this._aliasCount && this._aliasCount--;
};
return a;
}(), k = function() {
function a() {
this.reset();
}
a.prototype.reset = function() {
this._queues = Object.create(null);
};
a.prototype.add = function(a, d) {
m(v.Event.isBroadcastEventType(a), "Can only register broadcast events.");
var e = this._queues[a] || (this._queues[a] = []);
0 <= e.indexOf(d) || e.push(d);
};
a.prototype.remove = function(a, d) {
m(v.Event.isBroadcastEventType(a), "Can only unregister broadcast events.");
var e = this._queues[a];
m(e, "There should already be a queue for this.");
var c = e.indexOf(d);
m(0 <= c, "Target should be somewhere in this queue.");
e[c] = null;
m(0 > e.indexOf(d), "Target shouldn't be in this queue anymore.");
};
a.prototype.dispatchEvent = function(a) {
m(a.isBroadcastEvent(), "Cannot dispatch non-broadcast events.");
var d = this._queues[a.type];
if (d) {
t.value && console.log("Broadcast event of type " + a._type + " to " + d.length + " listeners");
for (var e = 0, c = 0;c < d.length;c++) {
var f = d[c];
null === f ? e++ : f.dispatchEvent(a);
}
if (16 < e && e > d.length >> 1) {
e = [];
for (c = 0;c < d.length;c++) {
d[c] && e.push(d[c]);
}
this._queues[a.type] = e;
}
}
};
a.prototype.getQueueLength = function(a) {
return this._queues[a] ? this._queues[a].length : 0;
};
return a;
}();
v.BroadcastEventDispatchQueue = k;
var f = function(d) {
function b(a) {
void 0 === a && (a = null);
this._target = a || this;
}
__extends(b, d);
b.prototype.toString = function() {
return a.ASObject.dynamicPrototype.$BgtoString.call(this);
};
b.prototype._getListenersForType = function(a, b) {
var d = a ? this._captureListeners : this._targetOrBubblingListeners;
return d ? d[b] : null;
};
b.prototype._getListeners = function(a) {
return a ? this._captureListeners || (this._captureListeners = Object.create(null)) : this._targetOrBubblingListeners || (this._targetOrBubblingListeners = Object.create(null));
};
b.prototype.addEventListener = function(a, d, c, f, k) {
void 0 === c && (c = !1);
void 0 === f && (f = 0);
void 0 === k && (k = !1);
(2 > arguments.length || 5 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/addEventListener()", 2, arguments.length);
u(d) || e("TypeError", h.Errors.CheckTypeFailedError, d, "Function");
l(a) && e("TypeError", h.Errors.NullPointerError, "type");
a = p(a);
c = !!c;
f |= 0;
k = !!k;
var m = this._getListeners(c);
(m[a] || (m[a] = new n)).insert(d, c, f);
!c && v.Event.isBroadcastEventType(a) && b.broadcastEventDispatchQueue.add(a, this);
};
b.prototype.removeEventListener = function(a, d, c) {
void 0 === c && (c = !1);
(2 > arguments.length || 3 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/removeEventListener()", 2, arguments.length);
u(d) || e("TypeError", h.Errors.CheckTypeFailedError, d, "Function");
l(a) && e("TypeError", h.Errors.NullPointerError, "type");
a = p(a);
var f = this._getListeners(!!c), k = f[a];
k && (k.remove(d), k.isEmpty() && (!c && v.Event.isBroadcastEventType(a) && b.broadcastEventDispatchQueue.remove(a, this), f[a] = null));
};
b.prototype._hasTargetOrBubblingEventListener = function(a) {
return!(!this._targetOrBubblingListeners || !this._targetOrBubblingListeners[a]);
};
b.prototype._hasCaptureEventListener = function(a) {
return!(!this._captureListeners || !this._captureListeners[a]);
};
b.prototype._hasEventListener = function(a) {
return this._hasTargetOrBubblingEventListener(a) || this._hasCaptureEventListener(a);
};
b.prototype.hasEventListener = function(a) {
1 !== arguments.length && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length);
l(a) && e("TypeError", h.Errors.NullPointerError, "type");
a = p(a);
return this._hasEventListener(a);
};
b.prototype.willTrigger = function(a) {
1 !== arguments.length && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/hasEventListener()", 1, arguments.length);
l(a) && e("TypeError", h.Errors.NullPointerError, "type");
a = p(a);
if (this._hasEventListener(a)) {
return!0;
}
if (s.display.DisplayObject.isType(this)) {
var b = this._parent;
do {
if (b._hasEventListener(a)) {
return!0;
}
} while (b = b._parent);
}
return!1;
};
b.prototype._skipDispatchEvent = function(a) {
if (this._hasEventListener(a.type)) {
return!1;
}
if (!a.isBroadcastEvent() && a._bubbles && s.display.DisplayObject.isType(this)) {
for (var b = this._parent;b;b = b._parent) {
if (b._hasEventListener(a.type)) {
return!1;
}
}
}
return!0;
};
b.prototype.dispatchEvent = function(a) {
1 !== arguments.length && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.events::EventDispatcher/dispatchEvent()", 1, arguments.length);
if (this._skipDispatchEvent(a)) {
return!0;
}
t.value && console.log("Dispatch event of type " + a._type);
h.counter.count("EventDispatcher::dispatchEvent");
var d = a._type, c = this._target;
h.counter.count("EventDispatcher::dispatchEvent(" + d + ")");
var f = !0, k = [];
if (!a.isBroadcastEvent() && s.display.DisplayObject.isType(this)) {
for (var l = this._parent;l;) {
l._hasEventListener(d) && k.push(l), l = l._parent;
}
for (l = k.length - 1;0 <= l && f;l--) {
var n = k[l];
if (n._hasCaptureEventListener(d)) {
var q = n._getListenersForType(!0, d);
m(q);
f = b.callListeners(q, a, c, n, v.EventPhase.CAPTURING_PHASE);
}
}
}
f && (q = this._getListenersForType(!1, d)) && (f = b.callListeners(q, a, c, c, v.EventPhase.AT_TARGET));
if (!a.isBroadcastEvent() && f && a.bubbles) {
for (l = 0;l < k.length && f;l++) {
n = k[l], n._hasTargetOrBubblingEventListener(d) && (q = n._getListenersForType(!1, d), f = b.callListeners(q, a, c, n, v.EventPhase.BUBBLING_PHASE));
}
}
return!a._isDefaultPrevented;
};
b.callListeners = function(a, b, d, e, c) {
if (a.isEmpty()) {
return!0;
}
b._target && (b = b.asCallPublicProperty("clone", null));
for (var f = a.snapshot(), k = 0;k < f.length;k++) {
var m = f[k];
b._target = d;
b._currentTarget = e;
b._eventPhase = c;
m.listener(b);
if (b._stopImmediatePropagation) {
break;
}
}
a.releaseSnapshot(f);
return!b._stopPropagation;
};
b.classInitializer = function() {
b.broadcastEventDispatchQueue = new k;
};
b.initializer = function() {
this._target = this;
this._targetOrBubblingListeners = this._captureListeners = null;
};
b.classSymbols = null;
b.instanceSymbols = null;
return b;
}(a.ASNative);
v.EventDispatcher = f;
})(s.events || (s.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
a.call(this);
s("public flash.events.EventPhase");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.CAPTURING_PHASE = 1;
e.AT_TARGET = 2;
e.BUBBLING_PHASE = 3;
return e;
}(a.ASNative);
h.EventPhase = u;
})(h.events || (h.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = function(a) {
function e(e, c, h, n) {
a.call(this, e, c, h);
this._text = n;
}
__extends(e, a);
Object.defineProperty(e.prototype, "text", {get:function() {
return this._text;
}, set:function(a) {
this._text = a;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
var a = new e(this.type, this.bubbles, this.cancelable, this.text);
this.copyNativeData(a);
return a;
};
e.prototype.toString = function() {
return this.formatToString("TextEvent", "type", "bubbles", "cancelable", "text");
};
e.prototype.copyNativeData = function(a) {
p("public flash.events.TextEvent::copyNativeData");
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.LINK = "link";
e.TEXT_INPUT = "textInput";
return e;
}(a.events.Event);
h.TextEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(c) {
var h = function(a) {
function c(e, m, l, h, n) {
void 0 === m && (m = !1);
void 0 === l && (l = !1);
void 0 === h && (h = "");
void 0 === n && (n = 0);
a.call(this, e, m, l, h);
this.setID(n);
}
__extends(c, a);
c.prototype.setID = function(a) {
this._id = a;
};
Object.defineProperty(c.prototype, "errorID", {get:function() {
return this._id;
}, enumerable:!0, configurable:!0});
c.prototype.clone = function() {
return new c(this.type, this.bubbles, this.cancelable, this.text, this.errorID);
};
c.prototype.toString = function() {
return this.formatToString("ErrorEvent", "type", "bubbles", "cancelable", "text", "errorID");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.ERROR = "error";
return c;
}(a.events.TextEvent);
c.ErrorEvent = h;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e(e, c, h, n) {
a.call(this, void 0, void 0, void 0);
p("public flash.events.GameInputEvent");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.DEVICE_ADDED = "deviceAdded";
e.DEVICE_REMOVED = "deviceRemoved";
return e;
}(a.events.Event);
h.GameInputEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.AVM2.Runtime.asCoerceString, u = c.Debug.dummyConstructor, l = c.Debug.somewhatImplemented, e = function(e) {
function c(a, l, k, f, d, b, g, r, h) {
e.call(this, void 0, void 0, void 0);
u("public flash.events.GestureEvent");
}
__extends(c, e);
Object.defineProperty(c.prototype, "localX", {get:function() {
return this._localX;
}, set:function(a) {
this._localX = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "localY", {get:function() {
return this._localY;
}, set:function(a) {
this._localY = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "stageX", {get:function() {
l("public flash.events.GestureEvent::stageX");
return 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "stageY", {get:function() {
l("public flash.events.GestureEvent::stageY");
return 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "ctrlKey", {get:function() {
return this._ctrlKey;
}, set:function(a) {
this._ctrlKey = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "altKey", {get:function() {
return this._altKey;
}, set:function(a) {
this._altKey = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "shiftKey", {get:function() {
return this._shiftKey;
}, set:function(a) {
this._shiftKey = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "phase", {get:function() {
return this._phase;
}, set:function(a) {
this._phase = p(a);
}, enumerable:!0, configurable:!0});
c.prototype.updateAfterEvent = function() {
l("public flash.events.GestureEvent::updateAfterEvent");
};
c.prototype.NativeCtor = function(a, e, c, f, d, b) {
this._phase = p(a);
this._localX = +e;
this._localY = +c;
this._ctrlKey = !!f;
this._altKey = !!d;
this._shiftKey = !!b;
};
c.prototype.clone = function() {
return new a.events.GestureEvent(this.type, this.bubbles, this.cancelable, this.phase, this.localX, this.localY, this.ctrlKey, this.altKey, this.shiftKey);
};
c.prototype.toString = function() {
return this.formatToString("GestureEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "ctrlKey", "altKey", "shiftKey");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.GESTURE_TWO_FINGER_TAP = "gestureTwoFingerTap";
return c;
}(a.events.Event);
h.GestureEvent = e;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e(e, c, h, n) {
a.call(this, void 0, void 0, void 0);
p("public flash.events.HTTPStatusEvent");
}
__extends(e, a);
e.prototype._setStatus = function(a) {
this._status = a;
};
Object.defineProperty(e.prototype, "status", {get:function() {
return this._status;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "responseURL", {get:function() {
return this._responseURL;
}, set:function(a) {
this._responseURL = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "responseHeaders", {get:function() {
return this._responseHeaders;
}, set:function(a) {
this._responseHeaders = a;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
var a = new h.HTTPStatusEvent(this.type, this.bubbles, this.cancelable, this.status);
a.responseURL = this.responseURL;
a.responseHeaders = this.responseHeaders;
return a;
};
e.prototype.toString = function() {
return this.formatToString("HTTPStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "status", "responseURL", "responseHeaders");
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.HTTP_STATUS = "httpStatus";
e.HTTP_RESPONSE_STATUS = "httpResponseStatus";
return e;
}(a.events.Event);
h.HTTPStatusEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(c) {
var h = function(a) {
function c(e, m, l, h, n) {
void 0 === m && (m = !1);
void 0 === l && (l = !1);
void 0 === h && (h = "");
void 0 === n && (n = 0);
a.call(this, e, m, l, h, n);
}
__extends(c, a);
c.prototype.clone = function() {
var a = new c(this.type, this.bubbles, this.cancelable, this.text, this.errorID);
this.copyNativeData(a);
return a;
};
c.prototype.toString = function() {
return this.formatToString("IOErrorEvent", "type", "bubbles", "cancelable", "text", "errorID");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.IO_ERROR = "ioError";
c.NETWORK_ERROR = "networkError";
c.DISK_ERROR = "diskError";
c.VERIFY_ERROR = "verifyError";
return c;
}(a.events.ErrorEvent);
c.IOErrorEvent = h;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e(e, c, h, n, k, f, d, b, g) {
a.call(this, void 0, void 0, void 0);
p("public flash.events.KeyboardEvent");
}
__extends(e, a);
Object.defineProperty(e.prototype, "charCode", {get:function() {
return this._charCode;
}, set:function(a) {
this._charCode = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "keyCode", {get:function() {
return this._keyCode;
}, set:function(a) {
this._keyCode = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "keyLocation", {get:function() {
return this._keyLocation;
}, set:function(a) {
this._keyLocation = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "ctrlKey", {get:function() {
return this._ctrlKey;
}, set:function(a) {
this._ctrlKey = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "altKey", {get:function() {
return this._altKey;
}, set:function(a) {
this._altKey = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "shiftKey", {get:function() {
return this._shiftKey;
}, set:function(a) {
this._shiftKey = a;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
return new h.KeyboardEvent(this.type, this.bubbles, this.cancelable, this.charCode, this.keyCode, this.keyLocation, this.ctrlKey, this.altKey, this.shiftKey);
};
e.prototype.toString = function() {
return this.formatToString("KeyboardEvent", "type", "bubbles", "cancelable", "eventPhase", "charCode", "keyCode", "keyLocation", "ctrlKey", "altKey", "shiftKey");
};
e.prototype.updateAfterEvent = function() {
c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering();
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.KEY_DOWN = "keyDown";
e.KEY_UP = "keyUp";
return e;
}(a.events.Event);
h.KeyboardEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(e) {
function m(a, c, m, k, f, d, b, g, l, h, s) {
e.call(this, void 0, void 0, void 0);
u("public flash.events.MouseEvent");
}
__extends(m, e);
m.typeFromDOMType = function(a) {
switch(a) {
case "click":
return m.CLICK;
case "dblclick":
return m.DOUBLE_CLICK;
case "mousedown":
return m.MOUSE_DOWN;
case "mouseout":
;
case "mouseover":
;
case "mousemove":
return m.MOUSE_MOVE;
case "mouseup":
return m.MOUSE_UP;
default:
p(a);
}
};
Object.defineProperty(m.prototype, "localX", {get:function() {
return this._localX / 20 | 0;
}, set:function(a) {
this._localX = 20 * a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "localY", {get:function() {
return this._localY / 20 | 0;
}, set:function(a) {
this._localY = 20 * a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "stageX", {get:function() {
return isNaN(this.localX + this.localY) ? Number.NaN : this._getGlobalPoint().x / 20 | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "stageY", {get:function() {
return isNaN(this.localX + this.localY) ? Number.NaN : this._getGlobalPoint().y / 20 | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "movementX", {get:function() {
return this._movementX || 0;
}, set:function(a) {
this._movementX = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "movementY", {get:function() {
return this._movementY || 0;
}, set:function(a) {
this._movementY = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "delta", {get:function() {
return this._delta;
}, set:function(a) {
this._delta = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "ctrlKey", {get:function() {
return this._ctrlKey;
}, set:function(a) {
this._ctrlKey = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "altKey", {get:function() {
return this._altKey;
}, set:function(a) {
this._altKey = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "shiftKey", {get:function() {
return this._shiftKey;
}, set:function(a) {
this._shiftKey = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "buttonDown", {get:function() {
return this._buttonDown;
}, set:function(a) {
this._buttonDown = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "relatedObject", {get:function() {
return this._relatedObject;
}, set:function(a) {
this._relatedObject = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "isRelatedObjectInaccessible", {get:function() {
return this._isRelatedObjectInaccessible;
}, set:function(a) {
this._isRelatedObjectInaccessible = a;
}, enumerable:!0, configurable:!0});
m.prototype.updateAfterEvent = function() {
c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering();
};
m.prototype._getGlobalPoint = function() {
var e = this._position;
e || (e = this._position = new a.geom.Point);
this.target ? (e.setTo(this._localX, this._localY), this._target._getConcatenatedMatrix().transformPointInPlace(e)) : e.setTo(0, 0);
return e;
};
m.prototype.clone = function() {
return new a.events.MouseEvent(this.type, this.bubbles, this.cancelable, this.localX, this.localY, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey, this.buttonDown, this.delta);
};
m.prototype.toString = function() {
return this.formatToString("MouseEvent", "type", "bubbles", "cancelable", "eventPhase", "localX", "localY", "relatedObject", "ctrlKey", "altKey", "shiftKey", "buttonDown", "delta");
};
m.classInitializer = null;
m.initializer = null;
m.classSymbols = null;
m.instanceSymbols = null;
m.CLICK = "click";
m.DOUBLE_CLICK = "doubleClick";
m.MOUSE_DOWN = "mouseDown";
m.MOUSE_MOVE = "mouseMove";
m.MOUSE_OUT = "mouseOut";
m.MOUSE_OVER = "mouseOver";
m.MOUSE_UP = "mouseUp";
m.RELEASE_OUTSIDE = "releaseOutside";
m.MOUSE_WHEEL = "mouseWheel";
m.ROLL_OUT = "rollOut";
m.ROLL_OVER = "rollOver";
m.MIDDLE_CLICK = "middleClick";
m.MIDDLE_MOUSE_DOWN = "middleMouseDown";
m.MIDDLE_MOUSE_UP = "middleMouseUp";
m.RIGHT_CLICK = "rightClick";
m.RIGHT_MOUSE_DOWN = "rightMouseDown";
m.RIGHT_MOUSE_UP = "rightMouseUp";
m.CONTEXT_MENU = "contextMenu";
return m;
}(a.events.Event);
h.MouseEvent = l;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(c) {
var h = function(c) {
function l(a, c, l, h) {
}
__extends(l, c);
Object.defineProperty(l.prototype, "info", {get:function() {
return this._info;
}, set:function(a) {
this._info = a;
}, enumerable:!0, configurable:!0});
l.prototype.clone = function() {
return new a.events.NetStatusEvent(this.type, this.bubbles, this.cancelable, this.info);
};
l.prototype.toString = function() {
return this.formatToString("NetStatusEvent", "type", "bubbles", "cancelable", "eventPhase", "info");
};
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
l.NET_STATUS = "netStatus";
return l;
}(a.events.Event);
c.NetStatusEvent = h;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(c) {
function e(a, e, h, n, k) {
c.call(this, void 0, void 0, void 0);
p("public flash.events.ProgressEvent");
}
__extends(e, c);
Object.defineProperty(e.prototype, "bytesLoaded", {get:function() {
return this._bytesLoaded;
}, set:function(a) {
this._bytesLoaded = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "bytesTotal", {get:function() {
return this._bytesTotal;
}, set:function(a) {
this._bytesTotal = a;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
return new a.events.ProgressEvent(this._type, this._bubbles, this._cancelable, this._bytesLoaded, this._bytesTotal);
};
e.prototype.toString = function() {
return this.formatToString("ProgressEvent", "bubbles", "cancelable", "eventPhase", "bytesLoaded", "bytesTotal");
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.PROGRESS = "progress";
e.SOCKET_DATA = "socketData";
return e;
}(a.events.Event);
h.ProgressEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e(e, c, h, n, k) {
a.call(this, void 0, void 0, void 0, void 0, void 0);
p("public flash.events.SecurityErrorEvent");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.SECURITY_ERROR = "securityError";
return e;
}(a.events.ErrorEvent);
h.SecurityErrorEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e(e, c, h) {
a.call(this, void 0, void 0, void 0);
p("public flash.events.TimerEvent");
}
__extends(e, a);
e.prototype.clone = function() {
return new h.TimerEvent(this.type, this.bubbles, this.cancelable);
};
e.prototype.toString = function() {
return this.formatToString("TimerEvent", "type", "bubbles", "cancelable", "eventPhase");
};
e.prototype.updateAfterEvent = function() {
c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering();
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.TIMER = "timer";
e.TIMER_COMPLETE = "timerComplete";
return e;
}(a.events.Event);
h.TimerEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.somewhatImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function m(c, m, l, k, f, d, b, g, r, h, s, p, v, M) {
a.call(this, void 0, void 0, void 0);
u("public flash.events.TouchEvent");
}
__extends(m, a);
Object.defineProperty(m.prototype, "touchPointID", {get:function() {
return this._touchPointID;
}, set:function(a) {
this._touchPointID = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "isPrimaryTouchPoint", {get:function() {
return this._isPrimaryTouchPoint;
}, set:function(a) {
this._isPrimaryTouchPoint = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "localX", {get:function() {
return this._localX;
}, set:function(a) {
this._localX = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "localY", {get:function() {
return this._localY;
}, set:function(a) {
this._localY = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "sizeX", {get:function() {
return this._sizeX;
}, set:function(a) {
this._sizeX = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "sizeY", {get:function() {
return this._sizeY;
}, set:function(a) {
this._sizeY = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "pressure", {get:function() {
return this._pressure;
}, set:function(a) {
this._pressure = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "relatedObject", {get:function() {
return this._relatedObject;
}, set:function(a) {
this._relatedObject = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "ctrlKey", {get:function() {
return this._ctrlKey;
}, set:function(a) {
this._ctrlKey = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "altKey", {get:function() {
return this._altKey;
}, set:function(a) {
this._altKey = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "shiftKey", {get:function() {
return this._shiftKey;
}, set:function(a) {
this._shiftKey = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "stageX", {get:function() {
p("TouchEvent::get stageX");
return this._localX;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "stageY", {get:function() {
p("TouchEvent::get stageY");
return this._localY;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "isRelatedObjectInaccessible", {get:function() {
return this._isRelatedObjectInaccessible;
}, set:function(a) {
this._isRelatedObjectInaccessible = a;
}, enumerable:!0, configurable:!0});
m.prototype.clone = function() {
return new h.TouchEvent(this.type, this.bubbles, this.cancelable, this.touchPointID, this.isPrimaryTouchPoint, this.localX, this.localY, this.sizeX, this.sizeY, this.pressure, this.relatedObject, this.ctrlKey, this.altKey, this.shiftKey);
};
m.prototype.toString = function() {
return this.formatToString("TouchEvent", "type", "bubbles", "cancelable", "eventPhase", "touchPointID", "isPrimaryTouchPoint", "localX", "localY", "sizeX", "sizeY", "pressure", "relatedObject", "ctrlKey", "altKey", "shiftKey");
};
m.prototype.updateAfterEvent = function() {
c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestRendering();
};
m.classInitializer = null;
m.initializer = null;
m.classSymbols = null;
m.instanceSymbols = null;
m.TOUCH_BEGIN = "touchBegin";
m.TOUCH_END = "touchEnd";
m.TOUCH_MOVE = "touchMove";
m.TOUCH_OVER = "touchOver";
m.TOUCH_OUT = "touchOut";
m.TOUCH_ROLL_OVER = "touchRollOver";
m.TOUCH_ROLL_OUT = "touchRollOut";
m.TOUCH_TAP = "touchTap";
m.PROXIMITY_BEGIN = "proximityBegin";
m.PROXIMITY_END = "proximityEnd";
m.PROXIMITY_MOVE = "proximityMove";
m.PROXIMITY_OUT = "proximityOut";
m.PROXIMITY_OVER = "proximityOver";
m.PROXIMITY_ROLL_OUT = "proximityRollOut";
m.PROXIMITY_ROLL_OVER = "proximityRollOver";
return m;
}(a.events.Event);
h.TouchEvent = l;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e(e, c, h, n) {
a.call(this, void 0, void 0, void 0, void 0, void 0);
p("public flash.events.UncaughtErrorEvent");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.UNCAUGHT_ERROR = "uncaughtError";
return e;
}(a.events.ErrorEvent);
h.UncaughtErrorEvent = u;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(c) {
var h = function(a) {
function l() {
c.EventDispatcher.instanceConstructorNoInitialize.call(this);
}
__extends(l, a);
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
return l;
}(a.events.EventDispatcher);
c.UncaughtErrorEvents = h;
})(a.events || (a.events = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.isNullOrUndefined, e = c.AVM2.Runtime.asCoerceString, m = c.AVM2.Runtime.throwError, t = c.AVM2.Runtime.checkNullParameter, q = c.Debug.assert, n = c.Bounds, k = a.geom, f = a.events;
(function(a) {
a[a.None = 0] = "None";
a[a.Visible = 1] = "Visible";
a[a.InvalidLineBounds = 2] = "InvalidLineBounds";
a[a.InvalidFillBounds = 4] = "InvalidFillBounds";
a[a.InvalidMatrix = 8] = "InvalidMatrix";
a[a.InvalidInvertedMatrix = 16] = "InvalidInvertedMatrix";
a[a.InvalidConcatenatedMatrix = 32] = "InvalidConcatenatedMatrix";
a[a.InvalidInvertedConcatenatedMatrix = 64] = "InvalidInvertedConcatenatedMatrix";
a[a.InvalidConcatenatedColorTransform = 128] = "InvalidConcatenatedColorTransform";
a[a.Constructed = 256] = "Constructed";
a[a.Destroyed = 512] = "Destroyed";
a[a.NeedsLoadEvent = 1024] = "NeedsLoadEvent";
a[a.OwnedByTimeline = 2048] = "OwnedByTimeline";
a[a.AnimatedByTimeline = 4096] = "AnimatedByTimeline";
a[a.HasFrameScriptPending = 8192] = "HasFrameScriptPending";
a[a.ContainsFrameScriptPendingChildren = 16384] = "ContainsFrameScriptPendingChildren";
a[a.ContainsMorph = 32768] = "ContainsMorph";
a[a.CacheAsBitmap = 65536] = "CacheAsBitmap";
a[a.DirtyMatrix = 1048576] = "DirtyMatrix";
a[a.DirtyChildren = 2097152] = "DirtyChildren";
a[a.DirtyGraphics = 4194304] = "DirtyGraphics";
a[a.DirtyTextContent = 8388608] = "DirtyTextContent";
a[a.DirtyBitmapData = 16777216] = "DirtyBitmapData";
a[a.DirtyNetStream = 33554432] = "DirtyNetStream";
a[a.DirtyColorTransform = 67108864] = "DirtyColorTransform";
a[a.DirtyMask = 134217728] = "DirtyMask";
a[a.DirtyClipDepth = 268435456] = "DirtyClipDepth";
a[a.DirtyDescendents = 536870912] = "DirtyDescendents";
a[a.DirtyMiscellaneousProperties = 1073741824] = "DirtyMiscellaneousProperties";
a[a.Dirty = a.DirtyMatrix | a.DirtyChildren | a.DirtyGraphics | a.DirtyTextContent | a.DirtyBitmapData | a.DirtyNetStream | a.DirtyColorTransform | a.DirtyMask | a.DirtyClipDepth | a.DirtyMiscellaneousProperties] = "Dirty";
a[a.Bubbling = a.ContainsFrameScriptPendingChildren | a.ContainsMorph] = "Bubbling";
})(v.DisplayObjectFlags || (v.DisplayObjectFlags = {}));
var d = v.DisplayObjectFlags;
(function(a) {
a[a.None = 0] = "None";
a[a.Continue = 0] = "Continue";
a[a.Stop = 1] = "Stop";
a[a.Skip = 2] = "Skip";
a[a.FrontToBack = 8] = "FrontToBack";
a[a.Filter = 16] = "Filter";
})(v.VisitorFlags || (v.VisitorFlags = {}));
(function(a) {
a[a.HitTestBounds = 0] = "HitTestBounds";
a[a.HitTestBoundsAndMask = 1] = "HitTestBoundsAndMask";
a[a.HitTestShape = 2] = "HitTestShape";
a[a.Mouse = 3] = "Mouse";
a[a.ObjectsUnderPoint = 4] = "ObjectsUnderPoint";
a[a.Drop = 5] = "Drop";
})(v.HitTestingType || (v.HitTestingType = {}));
(function(a) {
a[a.None = 0] = "None";
a[a.Bounds = 1] = "Bounds";
a[a.Shape = 2] = "Shape";
})(v.HitTestingResult || (v.HitTestingResult = {}));
var b = function(b) {
function r() {
f.EventDispatcher.instanceConstructorNoInitialize.call(this);
this._addReference();
this._setFlags(256);
}
__extends(r, b);
r.getNextSyncID = function() {
return this._syncID++;
};
r.reset = function() {
this._advancableInstances = new c.WeakList;
};
r.prototype.createAnimatedDisplayObject = function(b, d, e) {
var g = b.symbolClass;
b = g.isSubtypeOf(a.display.BitmapData) ? a.display.Bitmap.initializeFrom(b) : g.initializeFrom(b);
d.flags & 32 && (b._name = d.name);
b._setFlags(4096);
b._animate(d);
e && g.instanceConstructorNoInitialize.call(b);
return b;
};
r.performFrameNavigation = function(b, d) {
b ? (r._runScripts = d, h.enterTimeline("DisplayObject.performFrameNavigation", {instances:0})) : d = r._runScripts;
q(16384 > v.DisplayObject._advancableInstances.length, "Too many advancable instances.");
v.DisplayObject._advancableInstances.forEach(function(a) {
a._initFrame(b);
});
b && d && r._broadcastFrameEvent(f.Event.ENTER_FRAME);
v.DisplayObject._advancableInstances.forEach(function(a) {
a._constructFrame();
});
d ? (r._broadcastFrameEvent(f.Event.FRAME_CONSTRUCTED), v.DisplayObject._advancableInstances.forEach(function(a) {
v.MovieClip.isInstanceOf(a) && !a.parent && a._enqueueFrameScripts();
}), a.display.DisplayObject._stage._enqueueFrameScripts(), v.MovieClip.runFrameScripts(), r._broadcastFrameEvent(f.Event.EXIT_FRAME)) : v.MovieClip.reset();
b && (h.leaveTimeline(), r._runScripts = !0);
};
r._broadcastFrameEvent = function(a) {
var b;
switch(a) {
case f.Event.ENTER_FRAME:
;
case f.Event.FRAME_CONSTRUCTED:
;
case f.Event.EXIT_FRAME:
;
case f.Event.RENDER:
b = f.Event.getBroadcastInstance(a);
}
q(b, "Invalid frame event.");
f.EventDispatcher.broadcastEventDispatchQueue.dispatchEvent(b);
};
r.prototype._setInitialName = function() {
this._name = "instance" + a.display.DisplayObject._instanceID++;
};
r.prototype._setParent = function(a, b) {
var e = this._parent;
q(a !== this);
this._parent = a;
this._setDepth(b);
if (a) {
this._addReference();
var g = 0;
this._hasFlags(8192) && (g |= 16384);
this._hasAnyFlags(d.Bubbling) && (g |= this._displayObjectFlags & d.Bubbling);
g && a._propagateFlagsUp(g);
}
e && this._removeReference();
};
r.prototype._setDepth = function(a) {
-1 < a ? this._setFlags(2048) : this._removeFlags(2048);
this._depth = a;
};
r.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, b) {
this._fillBounds.width = a;
this._fillBounds.height = b;
this._lineBounds.width = a;
this._lineBounds.height = b;
this._removeFlags(6);
this._invalidateParentFillAndLineBounds(!0, !0);
};
r.prototype._setFillAndLineBoundsFromSymbol = function(a) {
q(a.fillBounds || a.lineBounds, "Fill or Line bounds are not defined in the symbol.");
a.fillBounds && (this._fillBounds.copyFrom(a.fillBounds), this._removeFlags(4));
a.lineBounds && (this._lineBounds.copyFrom(a.lineBounds), this._removeFlags(2));
this._invalidateParentFillAndLineBounds(!!a.fillBounds, !!a.lineBounds);
};
r.prototype._setFlags = function(a) {
this._displayObjectFlags |= a;
};
r.prototype._setDirtyFlags = function(a) {
this._displayObjectFlags |= a;
this._parent && this._parent._propagateFlagsUp(536870912);
};
r.prototype._toggleFlags = function(a, b) {
this._displayObjectFlags = b ? this._displayObjectFlags | a : this._displayObjectFlags & ~a;
};
r.prototype._removeFlags = function(a) {
this._displayObjectFlags &= ~a;
};
r.prototype._hasFlags = function(a) {
return(this._displayObjectFlags & a) === a;
};
r.prototype._hasAnyFlags = function(a) {
return!!(this._displayObjectFlags & a);
};
r.prototype._propagateFlagsUp = function(a) {
if (!this._hasFlags(a)) {
this._setFlags(a);
var b = this._parent;
b && b._propagateFlagsUp(a);
}
};
r.prototype._propagateFlagsDown = function(a) {
this._setFlags(a);
};
r.prototype._findNearestAncestor = function() {
for (var a = this;a;) {
if (!1 === a._hasFlags(128)) {
return a;
}
a = a._parent;
}
return null;
};
r.prototype._findFurthestAncestorOrSelf = function() {
for (var a = this;a;) {
if (!a._parent) {
return a;
}
a = a._parent;
}
};
r.prototype._isAncestor = function(a) {
for (;a;) {
if (a === this) {
return!0;
}
a = a._parent;
}
return!1;
};
r._clampRotation = function(a) {
a %= 360;
180 < a ? a -= 360 : -180 > a && (a += 360);
return a;
};
r._getAncestors = function(a, b) {
var d = r._path;
for (d.length = 0;a && a !== b;) {
d.push(a), a = a._parent;
}
q(a === b, "Last ancestor is not an ancestor.");
return d;
};
r.prototype._getConcatenatedMatrix = function() {
this._hasFlags(32) && (this._parent ? this._parent._getConcatenatedMatrix().preMultiplyInto(this._getMatrix(), this._concatenatedMatrix) : this._concatenatedMatrix.copyFrom(this._getMatrix()), this._removeFlags(32));
return this._concatenatedMatrix;
};
r.prototype._getInvertedConcatenatedMatrix = function() {
this._hasFlags(64) && (this._getConcatenatedMatrix().invertInto(this._invertedConcatenatedMatrix), this._removeFlags(64));
return this._invertedConcatenatedMatrix;
};
r.prototype._setMatrix = function(a, b) {
if (b || !this._matrix.equals(a)) {
var d = this._matrix;
d.copyFrom(a);
b && d.toTwipsInPlace();
this._scaleX = d.getScaleX();
this._scaleY = d.getScaleY();
this._skewX = a.getSkewX();
this._skewY = a.getSkewY();
this._rotation = r._clampRotation(180 * this._skewY / Math.PI);
this._removeFlags(8);
this._setFlags(16);
this._setDirtyFlags(1048576);
this._invalidatePosition();
}
};
r.prototype._getMatrix = function() {
this._hasFlags(8) && (this._matrix.updateScaleAndRotation(this._scaleX, this._scaleY, this._skewX, this._skewY), this._removeFlags(8));
return this._matrix;
};
r.prototype._getInvertedMatrix = function() {
this._hasFlags(16) && (this._getMatrix().invertInto(this._invertedMatrix), this._removeFlags(16));
return this._invertedMatrix;
};
r.prototype._getConcatenatedColorTransform = function() {
if (!this.stage) {
return this._colorTransform.clone();
}
if (this._hasFlags(128)) {
var b = this._findNearestAncestor(), d = r._getAncestors(this, b), e = d.length - 1;
a.display.Stage.isType(d[e]) && e--;
for (var g = b && !a.display.Stage.isType(b) ? b._concatenatedColorTransform.clone() : new k.ColorTransform;0 <= e;) {
b = d[e--], q(b._hasFlags(128)), g.preMultiply(b._colorTransform), g.convertToFixedPoint(), b._concatenatedColorTransform.copyFrom(g), b._removeFlags(128);
}
}
return this._concatenatedColorTransform;
};
r.prototype._setColorTransform = function(a) {
this._colorTransform.copyFrom(a);
this._colorTransform.convertToFixedPoint();
this._propagateFlagsDown(128);
this._setDirtyFlags(67108864);
};
r.prototype._invalidateFillAndLineBounds = function(a, b) {
this._propagateFlagsUp((b ? 2 : 0) | (a ? 4 : 0));
};
r.prototype._invalidateParentFillAndLineBounds = function(a, b) {
this._parent && this._parent._invalidateFillAndLineBounds(a, b);
};
r.prototype._getContentBounds = function(a) {
void 0 === a && (a = !0);
var b, d;
a ? (b = 2, d = this._lineBounds) : (b = 4, d = this._fillBounds);
if (this._hasFlags(b)) {
var e = this._getGraphics();
e ? d.copyFrom(e._getContentBounds(a)) : d.setToSentinels();
this._getChildBounds(d, a);
this._removeFlags(b);
}
return d;
};
r.prototype._getChildBounds = function(a, b) {
};
r.prototype._getTransformedBounds = function(a, b) {
var d = this._getContentBounds(b).clone();
if (a === this || d.isEmpty()) {
return d;
}
var e;
a ? (e = k.Matrix.TEMP_MATRIX, a._getInvertedConcatenatedMatrix().preMultiplyInto(this._getConcatenatedMatrix(), e)) : e = this._getConcatenatedMatrix();
e.transformBounds(d);
return d;
};
r.prototype._stopTimelineAnimation = function() {
this._removeFlags(4096);
};
r.prototype._invalidateMatrix = function() {
this._setDirtyFlags(1048576);
this._setFlags(24);
this._invalidatePosition();
};
r.prototype._invalidatePosition = function() {
this._propagateFlagsDown(96);
this._invalidateParentFillAndLineBounds(!0, !0);
};
r.prototype._animate = function(b) {
q(this._hasFlags(4096));
var d = !(b.flags & 1) && b.flags & 2;
b.flags & 4 ? (k.Matrix.TEMP_MATRIX.copyFromUntyped(b.matrix), this._setMatrix(k.Matrix.TEMP_MATRIX, !1)) : d && this._setMatrix(k.Matrix.FROZEN_IDENTITY_MATRIX, !1);
b.flags & 8 ? (k.ColorTransform.TEMP_COLOR_TRANSFORM.copyFromUntyped(b.cxform), this._setColorTransform(k.ColorTransform.TEMP_COLOR_TRANSFORM)) : d && this._setColorTransform(k.ColorTransform.FROZEN_IDENTITY_COLOR_TRANSFORM);
if (b.flags & 16 || d) {
var e = b.ratio | 0;
e !== this._ratio && (q(0 <= e && 65535 >= e), this._ratio = e, this._setDirtyFlags(1073741824));
}
if (b.flags & 64 || d) {
e = void 0 === b.clipDepth ? -1 : b.clipDepth, e !== this._clipDepth && (this._clipDepth = e, this._setDirtyFlags(268435456));
}
if (b.flags & 256) {
for (var e = [], g = b.filters, c = 0;c < g.length;c++) {
var f = g[c], m;
switch(f.type) {
case 0:
m = a.filters.DropShadowFilter.FromUntyped(f);
break;
case 1:
m = a.filters.BlurFilter.FromUntyped(f);
break;
case 2:
m = a.filters.GlowFilter.FromUntyped(f);
break;
case 3:
m = a.filters.BevelFilter.FromUntyped(f);
break;
case 4:
m = a.filters.GradientGlowFilter.FromUntyped(f);
break;
case 5:
m = a.filters.ConvolutionFilter.FromUntyped(f);
break;
case 6:
m = a.filters.ColorMatrixFilter.FromUntyped(f);
break;
case 7:
m = a.filters.GradientBevelFilter.FromUntyped(f);
break;
default:
q(m, "Unknown filter type.");
}
e.push(m);
}
this._filters = e;
this._setDirtyFlags(1073741824);
} else {
d && (this._filters = null, this._setDirtyFlags(1073741824));
}
if (b.flags & 512 || d) {
m = a.display.BlendMode.fromNumber(void 0 === b.blendMode ? 1 : b.blendMode), m !== this._blendMode && (this._blendMode = m, this._setDirtyFlags(1073741824));
}
if (b.flags & 1024 || d) {
m = 0 < b.bmpCache, m !== this._hasFlags(65536) && (this._toggleFlags(65536, m), this._setDirtyFlags(1073741824));
}
if (b.flags & 8192 || d) {
b = 0 !== b.visibility, b !== this._hasFlags(1) && (this._toggleFlags(1, b), this._setDirtyFlags(1073741824));
}
};
r.prototype._propagateEvent = function(a) {
this.visit(function(b) {
b.dispatchEvent(a);
return 0;
}, 0);
};
Object.defineProperty(r.prototype, "x", {get:function() {
return this._getX();
}, set:function(a) {
a = 20 * a | 0;
this._stopTimelineAnimation();
if (this._canHaveTextContent()) {
var b = this._getContentBounds();
a -= b.xMin;
}
a !== this._matrix.tx && (this._matrix.tx = a, this._invertedMatrix.tx = -a, this._invalidatePosition(), this._setDirtyFlags(1048576));
}, enumerable:!0, configurable:!0});
r.prototype._getX = function() {
var a = this._matrix.tx;
if (this._canHaveTextContent()) {
var b = this._getContentBounds(), a = a + b.xMin
}
return a / 20;
};
Object.defineProperty(r.prototype, "y", {get:function() {
return this._getY();
}, set:function(a) {
a = 20 * a | 0;
this._stopTimelineAnimation();
if (this._canHaveTextContent()) {
var b = this._getContentBounds();
a -= b.yMin;
}
a !== this._matrix.ty && (this._matrix.ty = a, this._invertedMatrix.ty = -a, this._invalidatePosition(), this._setDirtyFlags(1048576));
}, enumerable:!0, configurable:!0});
r.prototype._getY = function() {
var a = this._matrix.ty;
if (this._canHaveTextContent()) {
var b = this._getContentBounds(), a = a + b.yMin
}
return a / 20;
};
Object.defineProperty(r.prototype, "scaleX", {get:function() {
return Math.abs(this._scaleX);
}, set:function(a) {
a = +a;
this._stopTimelineAnimation();
a !== this._scaleX && (this._scaleX = a, this._invalidateMatrix());
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "scaleY", {get:function() {
return this._scaleY;
}, set:function(a) {
a = +a;
this._stopTimelineAnimation();
a !== this._scaleY && (this._scaleY = a, this._invalidateMatrix());
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "scaleZ", {get:function() {
return this._scaleZ;
}, set:function(a) {
p("public DisplayObject::set scaleZ");
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "rotation", {get:function() {
return this._rotation;
}, set:function(a) {
a = +a;
this._stopTimelineAnimation();
a = r._clampRotation(a);
if (a !== this._rotation) {
var b = (a - this._rotation) / 180 * Math.PI;
this._skewX += b;
this._skewY += b;
this._rotation = a;
this._invalidateMatrix();
}
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "rotationX", {get:function() {
return this._rotationX;
}, set:function(a) {
p("public DisplayObject::set rotationX");
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "rotationY", {get:function() {
return this._rotationY;
}, set:function(a) {
p("public DisplayObject::set rotationY");
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "rotationZ", {get:function() {
return this._rotationZ;
}, set:function(a) {
p("public DisplayObject::set rotationZ");
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "width", {get:function() {
return this._getWidth();
}, set:function(a) {
this._setWidth(a);
}, enumerable:!0, configurable:!0});
r.prototype._getWidth = function() {
return this._getTransformedBounds(this._parent, !0).width / 20;
};
r.prototype._setWidth = function(a) {
a = 20 * a | 0;
this._stopTimelineAnimation();
if (!(0 > a)) {
var b = this._getContentBounds(!0);
if (this._canHaveTextContent()) {
var d = this._getContentBounds();
this._setFillAndLineBoundsFromWidthAndHeight(a, b.height);
} else {
var d = this._getTransformedBounds(this._parent, !0), e = this._rotation / 180 * Math.PI, g = b.getBaseWidth(e);
g && (this._scaleY = d.height / b.getBaseHeight(e), this._scaleX = a / g, this._invalidateMatrix());
}
}
};
Object.defineProperty(r.prototype, "height", {get:function() {
return this._getHeight();
}, set:function(a) {
this._setHeight(a);
}, enumerable:!0, configurable:!0});
r.prototype._getHeight = function() {
return this._getTransformedBounds(this._parent, !0).height / 20;
};
r.prototype._setHeight = function(a) {
a = 20 * a | 0;
this._stopTimelineAnimation();
if (!(0 > a)) {
var b = this._getContentBounds(!0);
if (this._canHaveTextContent()) {
var d = this._getContentBounds();
this._setFillAndLineBoundsFromWidthAndHeight(b.width, a);
} else {
var d = this._getTransformedBounds(this._parent, !0), e = this._rotation / 180 * Math.PI, g = b.getBaseHeight(e);
g && (b = b.getBaseWidth(e), this._scaleY = a / g, this._scaleX = d.width / b, this._invalidateMatrix());
}
}
};
Object.defineProperty(r.prototype, "mask", {get:function() {
return this._mask;
}, set:function(a) {
if (this._mask !== a && a !== this) {
a && a._maskedObject && (a._maskedObject.mask = null);
if (this._mask = a) {
a._maskedObject = this;
}
this._setDirtyFlags(134217728);
}
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "transform", {get:function() {
return this._getTransform();
}, set:function(a) {
this._stopTimelineAnimation();
a.matrix3D ? this._matrix3D = a.matrix3D : this._setMatrix(a.matrix, !0);
this._setColorTransform(a.colorTransform);
}, enumerable:!0, configurable:!0});
r.prototype._getTransform = function() {
return new a.geom.Transform(this);
};
r.prototype.destroy = function() {
this._setFlags(512);
};
Object.defineProperty(r.prototype, "root", {get:function() {
var a = this;
do {
if (a._root === a) {
return a;
}
a = a._parent;
} while (a);
return null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "stage", {get:function() {
var b = this;
do {
if (b._stage === b) {
return q(a.display.Stage.isType(b)), b;
}
b = b._parent;
} while (b);
return null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "name", {get:function() {
return this._name;
}, set:function(a) {
t(a, "name");
this._name = e(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "parent", {get:function() {
return this._parent;
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "alpha", {get:function() {
return this._colorTransform.alphaMultiplier;
}, set:function(a) {
this._stopTimelineAnimation();
a = +a;
a !== this._colorTransform.alphaMultiplier && (this._colorTransform.alphaMultiplier = a, this._colorTransform.convertToFixedPoint(), this._propagateFlagsDown(128), this._setDirtyFlags(67108864));
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "blendMode", {get:function() {
return this._blendMode;
}, set:function(a) {
this._stopTimelineAnimation();
a = e(a);
a !== this._blendMode && (0 > v.BlendMode.toNumber(a) && m("ArgumentError", h.Errors.InvalidEnumError, "blendMode"), this._blendMode = a, this._setDirtyFlags(1073741824));
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "scale9Grid", {get:function() {
return this._getScale9Grid();
}, set:function(a) {
this._stopTimelineAnimation();
this._scale9Grid = n.FromRectangle(a);
this._setDirtyFlags(1073741824);
}, enumerable:!0, configurable:!0});
r.prototype._getScale9Grid = function() {
return this._scale9Grid ? a.geom.Rectangle.FromBounds(this._scale9Grid) : null;
};
Object.defineProperty(r.prototype, "cacheAsBitmap", {get:function() {
return this._getCacheAsBitmap();
}, set:function(a) {
this._hasFlags(65536) || (this._toggleFlags(65536, !!a), this._setDirtyFlags(1073741824));
}, enumerable:!0, configurable:!0});
r.prototype._getCacheAsBitmap = function() {
return this._filters && 0 < this._filters.length || this._hasFlags(65536);
};
Object.defineProperty(r.prototype, "filters", {get:function() {
return this._getFilters();
}, set:function(b) {
this._filters || (this._filters = []);
var d = !1;
l(b) ? (d = 0 < this.filters.length, this._filters.length = 0) : (this._filters = b.map(function(b) {
q(a.filters.BitmapFilter.isType(b));
return b.clone();
}), d = !0);
d && this._setDirtyFlags(1073741824);
}, enumerable:!0, configurable:!0});
r.prototype._getFilters = function() {
return this._filters ? this._filters.map(function(a) {
return a.clone();
}) : [];
};
Object.defineProperty(r.prototype, "visible", {get:function() {
return this._hasFlags(1);
}, set:function(a) {
a = !!a;
a !== this._hasFlags(1) && (this._toggleFlags(1, a), this._setDirtyFlags(1073741824));
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "z", {get:function() {
return this._z;
}, set:function(a) {
this._z = +a;
p("public DisplayObject::set z");
}, enumerable:!0, configurable:!0});
r.prototype.getBounds = function(a) {
return k.Rectangle.FromBounds(this._getTransformedBounds(a || this, !0));
};
r.prototype.getRect = function(a) {
return k.Rectangle.FromBounds(this._getTransformedBounds(a || this, !1));
};
r.prototype.globalToLocal = function(a) {
return this._getInvertedConcatenatedMatrix().transformPointInPlace(a.clone().toTwips()).round().toPixels();
};
r.prototype.localToGlobal = function(a) {
return this._getConcatenatedMatrix().transformPointInPlace(a.clone().toTwips()).round().toPixels();
};
r.prototype.globalToLocal3D = function(a) {
p("public DisplayObject::globalToLocal3D");
return null;
};
r.prototype.localToGlobal3D = function(a) {
p("public DisplayObject::localToGlobal3D");
return null;
};
r.prototype.local3DToGlobal = function(a) {
p("public DisplayObject::local3DToGlobal");
return null;
};
r.prototype.visit = function(a, b, d) {
void 0 === d && (d = 0);
var e, g, c = b & 8;
for (e = [this];0 < e.length;) {
g = e.pop();
var f = 0, f = b & 16 && !g._hasAnyFlags(d) ? 2 : a(g);
if (0 === f) {
if (g = g._children) {
for (var f = g.length, k = 0;k < f;k++) {
e.push(g[c ? k : f - 1 - k]);
}
}
} else {
if (1 === f) {
break;
}
}
}
};
Object.defineProperty(r.prototype, "loaderInfo", {get:function() {
var a = this.root;
return a ? (q(a._loaderInfo, "No LoaderInfo object found on root."), a._loaderInfo) : null;
}, enumerable:!0, configurable:!0});
r.prototype._canHaveGraphics = function() {
return!1;
};
r.prototype._getGraphics = function() {
return null;
};
r.prototype._canHaveTextContent = function() {
return!1;
};
r.prototype._getTextContent = function() {
return null;
};
r.prototype._ensureGraphics = function() {
q(this._canHaveGraphics());
if (this._graphics) {
return this._graphics;
}
this._graphics = new a.display.Graphics;
this._graphics._setParent(this);
this._invalidateFillAndLineBounds(!0, !0);
this._setDirtyFlags(4194304);
return this._graphics;
};
r.prototype._setStaticContentFromSymbol = function(b) {
q(!b.dynamic);
this._canHaveGraphics() ? (q(b instanceof a.display.ShapeSymbol), this._graphics = b.graphics, this._setDirtyFlags(4194304)) : a.text.StaticText.isType(this) && (q(b instanceof a.text.TextSymbol), this._textContent = b.textContent, this._setDirtyFlags(8388608));
this._symbol = b;
this._setFillAndLineBoundsFromSymbol(b);
};
r.prototype.hitTestObject = function(a) {
q(a && r.isType(a));
var b = this._getContentBounds(!1).clone(), d = a._getContentBounds(!1).clone();
this._getConcatenatedMatrix().transformBounds(b);
a._getConcatenatedMatrix().transformBounds(d);
return b.intersects(d);
};
r.prototype.hitTestPoint = function(a, b, d) {
return!!this._containsGlobalPoint(20 * +a | 0, 20 * +b | 0, d ? 2 : 0, null);
};
r.prototype._containsPoint = function(a, b, d, e, g, c) {
var f = this._boundsAndMaskContainPoint(a, b, d, e, g);
if (0 === f || 2 > g) {
return f;
}
(a = this._containsPointDirectly(d, e, a, b)) && c && (5 === g ? c[0] = this : (4 === g || v.InteractiveObject.isType(this) && this._mouseEnabled) && c.push(this));
return a ? 2 : f;
};
r.prototype._containsGlobalPoint = function(a, b, d, e) {
var g = this._getInvertedConcatenatedMatrix();
return this._containsPoint(a, b, g.transformX(a, b), g.transformY(a, b), d, e);
};
r.prototype._boundsAndMaskContainPoint = function(a, b, d, e, g) {
return 1 <= g && this._hasFlags(32768) ? 1 : 3 <= g && !this._hasFlags(1) || !this._getContentBounds().contains(d, e) ? 0 : 0 !== g && this._mask ? this._mask._containsGlobalPoint(a, b, 1, null) : 1;
};
r.prototype._containsPointDirectly = function(a, b, d, e) {
return!1;
};
Object.defineProperty(r.prototype, "scrollRect", {get:function() {
return this._getScrollRect();
}, set:function(a) {
this._scrollRect = a ? a.clone() : null;
u("public DisplayObject::set scrollRect");
}, enumerable:!0, configurable:!0});
r.prototype._getScrollRect = function() {
return this._scrollRect ? this._scrollRect.clone() : null;
};
Object.defineProperty(r.prototype, "opaqueBackground", {get:function() {
return this._opaqueBackground;
}, set:function(a) {
q(null === a || c.isInteger(a));
this._opaqueBackground = a;
}, enumerable:!0, configurable:!0});
r.prototype._getDistance = function(a) {
for (var b = 0, d = this;d !== a;) {
b++, d = d._parent;
}
return b;
};
r.prototype.findNearestCommonAncestor = function(a) {
if (!a) {
return null;
}
for (var b = this, d = b._getDistance(null), e = a._getDistance(null);d > e;) {
b = b._parent, d--;
}
for (;e > d;) {
a = a._parent, e--;
}
for (;b !== a;) {
b = b._parent, a = a._parent;
}
return b;
};
r.prototype._getLocalMousePosition = function() {
var b = a.ui.Mouse._currentPosition;
this._parent && (b = this._parent.globalToLocal(a.ui.Mouse._currentPosition));
return b;
};
Object.defineProperty(r.prototype, "mouseX", {get:function() {
return this._getLocalMousePosition().x;
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "mouseY", {get:function() {
return this._getLocalMousePosition().y;
}, enumerable:!0, configurable:!0});
r.prototype.debugName = function(a) {
void 0 === a && (a = !1);
var b = this._id + " [" + this._depth + "]: (" + this._referenceCount + ") " + this;
if (a) {
a = [];
for (var e = 0;32 > e;e++) {
this._hasFlags(1 << e) && a.push(d[1 << e]);
}
b += " " + a.join("|");
}
return b;
};
r.prototype.debugTrace = function(a, b) {
void 0 === a && (a = 1024);
void 0 === b && (b = "");
var d = this, e = new c.IndentingWriter;
this.visit(function(g) {
var f = g._getDistance(d);
if (f > a) {
return 2;
}
f = b + c.StringUtilities.multiple(" ", f);
e.writeObject(f + g.debugName() + ", bounds: " + g.getBounds(null).toString(), {"...":{value:g}});
return 0;
}, 0);
};
r.prototype._addReference = function() {
this._referenceCount++;
};
r.prototype._removeReference = function() {
this._referenceCount--;
if (0 === this._referenceCount && this._children) {
for (var a = this._children, b = 0;b < a.length;b++) {
a[b]._removeReference();
}
}
};
Object.defineProperty(r.prototype, "accessibilityProperties", {get:function() {
return this._accessibilityProperties;
}, set:function(a) {
this._accessibilityProperties = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(r.prototype, "blendShader", {set:function(a) {
p("public DisplayObject::set blendShader");
}, enumerable:!0, configurable:!0});
r._syncID = 0;
r._instanceID = 1;
r.classInitializer = function() {
this.reset();
};
r.initializer = function(b) {
h.counter.count("DisplayObject::initializer");
this._id = a.display.DisplayObject.getNextSyncID();
this._displayObjectFlags = 2085617767;
this._stage = this._root = null;
this._setInitialName();
this._mask = this._parent = null;
this._z = 0;
this._scaleY = this._scaleX = 1;
this._skewY = this._skewX = 0;
this._scaleZ = 1;
this._height = this._width = this._rotationZ = this._rotationY = this._rotationX = this._rotation = 0;
this._filters = this._scrollRect = this._opaqueBackground = null;
this._blendMode = v.BlendMode.NORMAL;
q(this._blendMode);
this._accessibilityProperties = this._loaderInfo = this._scale9Grid = null;
this._fillBounds = new n(0, 0, 0, 0);
this._lineBounds = new n(0, 0, 0, 0);
this._clipDepth = -1;
this._concatenatedMatrix = new k.Matrix;
this._invertedConcatenatedMatrix = new k.Matrix;
this._matrix = new k.Matrix;
this._invertedMatrix = new k.Matrix;
this._matrix3D = null;
this._colorTransform = new k.ColorTransform;
this._concatenatedColorTransform = new k.ColorTransform;
this._depth = -1;
this._ratio = 0;
this._index = -1;
this._maskedObject = null;
this._mouseDown = this._mouseOver = !1;
this._children = this._graphics = this._symbol = null;
this._referenceCount = 0;
b && (b.scale9Grid && (this._scale9Grid = b.scale9Grid), this._symbol = b);
};
r.classSymbols = null;
r.instanceSymbols = null;
r._runScripts = !0;
r._path = [];
return r;
}(a.events.EventDispatcher);
v.DisplayObject = b;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.AVM2.Runtime.asCoerceString, u = c.Debug.assert, l = c.AVM2.Runtime.throwError, e = function(e) {
function t(a, e, c) {
void 0 === a && (a = null);
void 0 === e && (e = "auto");
void 0 === c && (c = !1);
v.DisplayObject.instanceConstructorNoInitialize.call(this);
this._symbol ? this._bitmapData.class.instanceConstructorNoInitialize.call(this._bitmapData) : this.bitmapData = a;
this._pixelSnapping = p(e);
this._smoothing = !!c;
}
__extends(t, e);
Object.defineProperty(t.prototype, "pixelSnapping", {get:function() {
return this._pixelSnapping;
}, set:function(a) {
0 > v.PixelSnapping.toNumber(a) && l("ArgumentError", h.Errors.InvalidEnumError, "pixelSnapping");
this._pixelSnapping = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(t.prototype, "smoothing", {get:function() {
return this._smoothing;
}, set:function(a) {
this._smoothing = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(t.prototype, "bitmapData", {get:function() {
return this._bitmapData;
}, set:function(a) {
this._bitmapData !== a && (this._bitmapData && this._bitmapData._removeBitmapReferrer(this), a && a._addBitmapReferrer(this));
(this._bitmapData = a) && this._setFillAndLineBoundsFromWidthAndHeight(20 * a.width | 0, 20 * a.height | 0);
this._invalidateParentFillAndLineBounds(!0, !0);
this._setDirtyFlags(16777216);
}, enumerable:!0, configurable:!0});
t.prototype._getContentBounds = function(a) {
return this._bitmapData ? this._bitmapData._getContentBounds() : new c.Bounds(0, 0, 0, 0);
};
t.prototype._containsPointDirectly = function(a, e, c, f) {
u(this._getContentBounds().contains(a, e));
return!0;
};
t.classInitializer = null;
t.initializer = function(e) {
this._smoothing = this._pixelSnapping = this._bitmapData = null;
if (e) {
var c = e.symbolClass;
c.isSubtypeOf(a.display.Bitmap) && (c = a.display.BitmapData);
this._bitmapData = c.initializeFrom(e);
this._setFillAndLineBoundsFromWidthAndHeight(20 * e.width | 0, 20 * e.height | 0);
}
};
t.classSymbols = null;
t.instanceSymbols = null;
return t;
}(a.display.DisplayObject);
v.Bitmap = e;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.warning, u = function(a) {
function e() {
h.DisplayObject.instanceConstructorNoInitialize.call(this);
}
__extends(e, a);
e.prototype._canHaveGraphics = function() {
return!0;
};
e.prototype._getGraphics = function() {
return this._graphics;
};
Object.defineProperty(e.prototype, "graphics", {get:function() {
return this._ensureGraphics();
}, enumerable:!0, configurable:!0});
e.prototype._containsPointDirectly = function(a, e, c, l) {
c = this._getGraphics();
return!!c && c._containsPoint(a, e, !0, 0);
};
e.classSymbols = null;
e.instanceSymbols = null;
e.classInitializer = null;
e.initializer = function(a) {
this._graphics = null;
a && this._setStaticContentFromSymbol(a);
};
return e;
}(a.display.DisplayObject);
h.Shape = u;
u = function(c) {
function e(a, e) {
c.call(this, a, e, !1);
this.graphics = null;
}
__extends(e, c);
e.FromData = function(c, l) {
var h = new e(c, a.display.Shape);
h._setBoundsFromData(c);
h.graphics = a.display.Graphics.FromData(c);
h.processRequires(c.require, l);
return h;
};
e.prototype.processRequires = function(a, e) {
if (a) {
for (var c = this.graphics._textures, l = 0;l < a.length;l++) {
var k = e.getSymbolById(a[l]);
k ? c.push(k.getSharedInstance()) : (65535 !== a[l] && p("Bitmap symbol " + a[l] + " required by shape, but not defined."), c.push(null));
}
}
};
return e;
}(c.Timeline.DisplaySymbol);
h.ShapeSymbol = u;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = a.display.DisplayObject, e = a.events, m = function(a) {
function c() {
l.instanceConstructorNoInitialize.call(this);
}
__extends(c, a);
Object.defineProperty(c.prototype, "tabEnabled", {get:function() {
return this._tabEnabled;
}, set:function(a) {
a = !!a;
var c = this._tabEnabled;
this._tabEnabled = a;
c !== a && this.dispatchEvent(e.Event.getInstance(e.Event.TAB_ENABLED_CHANGE, !0));
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "tabIndex", {get:function() {
return this._tabIndex;
}, set:function(a) {
a |= 0;
var c = this._tabIndex;
this._tabIndex = a;
c !== a && this.dispatchEvent(e.Event.getInstance(e.Event.TAB_INDEX_CHANGE, !0));
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "focusRect", {get:function() {
return this._focusRect;
}, set:function(a) {
u("public flash.display.InteractiveObject::set focusRect");
this._focusRect = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "mouseEnabled", {get:function() {
return this._mouseEnabled;
}, set:function(a) {
this._mouseEnabled = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "doubleClickEnabled", {get:function() {
return this._doubleClickEnabled;
}, set:function(a) {
this._doubleClickEnabled = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "accessibilityImplementation", {get:function() {
return this._accessibilityImplementation;
}, set:function(a) {
p("public flash.display.InteractiveObject::set accessibilityImplementation");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "softKeyboardInputAreaOfInterest", {get:function() {
return this._softKeyboardInputAreaOfInterest;
}, set:function(a) {
p("public flash.display.InteractiveObject::set softKeyboardInputAreaOfInterest");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "needsSoftKeyboard", {get:function() {
return this._needsSoftKeyboard;
}, set:function(a) {
p("public flash.display.InteractiveObject::set needsSoftKeyboard");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "contextMenu", {get:function() {
return this._contextMenu;
}, set:function(a) {
u("public flash.display.InteractiveObject::set contextMenu");
this._contextMenu = a;
}, enumerable:!0, configurable:!0});
c.prototype.requestSoftKeyboard = function() {
p("public flash.display.InteractiveObject::requestSoftKeyboard");
};
c.classInitializer = null;
c.initializer = function() {
this._tabEnabled = !1;
this._tabIndex = -1;
this._focusRect = null;
this._mouseEnabled = !0;
this._doubleClickEnabled = !1;
this._softKeyboardInputAreaOfInterest = this._accessibilityImplementation = null;
this._needsSoftKeyboard = !1;
this._contextMenu = null;
};
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.display.DisplayObject);
h.InteractiveObject = m;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.assert, l = function(a) {
function e(a, c, k, f) {
void 0 === a && (a = null);
void 0 === c && (c = null);
void 0 === k && (k = null);
void 0 === f && (f = null);
h.InteractiveObject.instanceConstructorNoInitialize.call(this);
a && (this.upState = a);
c && (this.overState = c);
k && (this.downState = k);
f && (this.hitTestState = f);
this._updateButton();
}
__extends(e, a);
e.prototype._initFrame = function(a) {
a && this._updateButton();
};
e.prototype._constructFrame = function() {
};
Object.defineProperty(e.prototype, "useHandCursor", {get:function() {
return this._useHandCursor;
}, set:function(a) {
this._useHandCursor = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "enabled", {get:function() {
return this._enabled;
}, set:function(a) {
this._enabled = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "trackAsMenu", {get:function() {
return this._trackAsMenu;
}, set:function(a) {
p("public flash.display.SimpleButton::set trackAsMenu");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "upState", {get:function() {
return this._upState;
}, set:function(a) {
var e = this._upState;
a._parent && a._parent.removeChild(a);
this._upState = a;
this._currentState === e && this._updateButton();
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "overState", {get:function() {
return this._overState;
}, set:function(a) {
var e = this._overState;
a._parent && a._parent.removeChild(a);
this._overState = a;
this._currentState === e && this._updateButton();
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "downState", {get:function() {
return this._downState;
}, set:function(a) {
var e = this._downState;
a._parent && a._parent.removeChild(a);
this._downState = a;
this._currentState === e && this._updateButton();
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "hitTestState", {get:function() {
return this._hitTestState;
}, set:function(a) {
this._hitTestState = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "soundTransform", {get:function() {
p("public flash.display.SimpleButton::get soundTransform");
}, set:function(a) {
p("public flash.display.SimpleButton::set soundTransform");
}, enumerable:!0, configurable:!0});
e.prototype._containsPoint = function(a, e, c, f, d, b) {
c = 3 === d ? this._hitTestState : this._currentState;
if (!c) {
return 0;
}
c._parent = this;
a = c._containsGlobalPoint(a, e, d, b);
c._parent = null;
0 !== a && 3 === d && b && this._mouseEnabled && (b[0] = this, u(1 === b.length));
return a;
};
e.prototype._getChildBounds = function(a, e) {
this._currentState && (this._currentState._parent = this, a.unionInPlace(this._currentState._getTransformedBounds(this, e)), this._currentState._parent = null);
};
e.prototype._propagateFlagsDown = function(a) {
this._hasFlags(a) || (this._setFlags(a), this._upState && this._upState._propagateFlagsDown(a), this._overState && this._overState._propagateFlagsDown(a), this._downState && this._downState._propagateFlagsDown(a), this._hitTestState && this._hitTestState._propagateFlagsDown(a));
};
e.prototype._updateButton = function() {
var a;
a = this._mouseOver ? this._mouseDown ? this._downState : this._overState : this._upState;
a !== this._currentState && ((this._currentState = a) ? this._children[0] = a : this._children.length = 0, this._setDirtyFlags(2097152), this._invalidateFillAndLineBounds(!0, !0));
};
e.classInitializer = null;
e.initializer = function(a) {
h.DisplayObject._advancableInstances.push(this);
this._enabled = this._useHandCursor = !0;
this._trackAsMenu = !1;
this._currentState = this._hitTestState = this._downState = this._overState = this._upState = null;
this._children = [];
if (this._symbol = a) {
a.upState && (this._upState = this.createAnimatedDisplayObject(a.upState.symbol, a.upState.placeObjectTag, !0)), a.overState && (this._overState = this.createAnimatedDisplayObject(a.overState.symbol, a.overState.placeObjectTag, !0)), a.downState && (this._downState = this.createAnimatedDisplayObject(a.downState.symbol, a.downState.placeObjectTag, !0)), a.hitTestState && (this._hitTestState = this.createAnimatedDisplayObject(a.hitTestState.symbol, a.hitTestState.placeObjectTag, !0))
;
}
};
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.display.InteractiveObject);
h.SimpleButton = l;
var e = function() {
return function(a, e) {
this.symbol = a;
this.placeObjectTag = e;
};
}();
h.ButtonState = e;
l = function(m) {
function l(e, c) {
m.call(this, e, a.display.SimpleButton, !0);
this.hitTestState = this.downState = this.overState = this.upState = null;
this.loaderInfo = c;
}
__extends(l, m);
l.FromData = function(m, n) {
var k = new l(m, n);
n.actionScriptVersion === h.ActionScriptVersion.ACTIONSCRIPT2 && (k.isAVM1Object = !0);
var f = m.states, d = null, b, g;
for (g in f) {
var r = f[g];
if (1 === r.length) {
if (b = r[0], d = n.getSymbolById(b.symbolId), !d) {
continue;
}
} else {
b = {flags:1, depth:1}, d = new a.display.SpriteSymbol({id:-1, className:null}, n), d.frames.push(new c.SWF.SWFFrame(r));
}
k[g + "State"] = new e(d, b);
}
return k;
};
return l;
}(c.Timeline.DisplaySymbol);
h.ButtonSymbol = l;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.Debug.assert, u = c.Debug.notImplemented, l = c.AVM2.Runtime.asCoerceString, e = c.AVM2.Runtime.throwError, m = c.AVM2.Runtime.checkParameterType, t = c.NumberUtilities.clamp, q = c.AVM2.ABC.Multiname, n = a.events, k = function(c) {
function d() {
v.InteractiveObject.instanceConstructorNoInitialize.call(this);
this._setDirtyFlags(2097152);
}
__extends(d, c);
d.prototype._invalidateChildren = function() {
this._setDirtyFlags(2097152);
this._invalidateFillAndLineBounds(!0, !0);
};
d.prototype._propagateFlagsDown = function(a) {
if (!this._hasFlags(a)) {
this._setFlags(a);
for (var d = this._children, e = 0;e < d.length;e++) {
d[e]._propagateFlagsDown(a);
}
}
};
d.prototype._constructChildren = function() {
h.counter.count("DisplayObjectContainer::_constructChildren");
for (var a = this._children, d = 0;d < a.length;d++) {
var e = a[d];
e._hasFlags(256) || (e.class.instanceConstructorNoInitialize.call(e), e._removeReference(), e._name && (this[q.getPublicQualifiedName(e._name)] = e), e._setFlags(256), e._symbol && e._symbol.isAVM1Object && (e.dispatchEvent(n.Event.getInstance(n.Event.AVM1_INIT)), e.dispatchEvent(n.Event.getInstance(n.Event.AVM1_CONSTRUCT)), e._setFlags(1024), e._hasAnyFlags(24576) && this._setFlags(16384)), e.dispatchEvent(n.Event.getInstance(n.Event.ADDED, !0)), e.stage && e.dispatchEvent(n.Event.getInstance(n.Event.ADDED_TO_STAGE)));
}
};
d.prototype._enqueueFrameScripts = function() {
if (this._hasFlags(16384)) {
this._removeFlags(16384);
for (var a = this._children, e = 0;e < a.length;e++) {
var c = a[e];
(d.isType(c) || v.AVM1Movie.isType(c)) && c._enqueueFrameScripts();
}
}
};
Object.defineProperty(d.prototype, "numChildren", {get:function() {
return this._children.length;
}, enumerable:!0, configurable:!0});
d.prototype._getNumChildren = function() {
return this._children.length;
};
Object.defineProperty(d.prototype, "textSnapshot", {get:function() {
u("public DisplayObjectContainer::get textSnapshot");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "tabChildren", {get:function() {
return this._tabChildren;
}, set:function(a) {
this._setTabChildren(a);
}, enumerable:!0, configurable:!0});
d.prototype._getTabChildren = function() {
return this._tabChildren;
};
d.prototype._setTabChildren = function(a) {
a = !!a;
var d = this._tabChildren;
this._tabChildren = a;
d !== a && this.dispatchEvent(n.Event.getInstance(n.Event.TAB_CHILDREN_CHANGE, !0));
};
Object.defineProperty(d.prototype, "mouseChildren", {get:function() {
return this._mouseChildren;
}, set:function(a) {
this._setMouseChildren(a);
}, enumerable:!0, configurable:!0});
d.prototype._getMouseChildren = function() {
return this._mouseChildren;
};
d.prototype._setMouseChildren = function(a) {
this._mouseChildren = !!a;
};
d.prototype.addChild = function(b) {
m(b, "child", a.display.DisplayObject);
return this.addChildAt(b, this._children.length);
};
d.prototype.addChildAt = function(b, g) {
m(b, "child", a.display.DisplayObject);
h.counter.count("DisplayObjectContainer::addChildAt");
g |= 0;
p(b._hasFlags(256), "Child is not fully constructed.");
b === this && e("ArgumentError", h.Errors.CantAddSelfError);
d.isType(b) && b.contains(this) && e("ArgumentError", h.Errors.CantAddParentError);
var c = this._children;
(0 > g || g > c.length) && e("RangeError", h.Errors.ParamRangeError);
if (b._parent === this) {
return this.setChildIndex(b, t(g, 0, c.length - 1)), b;
}
b._parent && (d.prototype.removeChildAt.call(b._parent, b._parent.getChildIndex(b)), g = t(g, 0, c.length));
for (var f = c.length - 1;f >= g;f--) {
c[f]._index++;
}
c.splice(g, 0, b);
b._setParent(this, -1);
b._index = g;
b._invalidatePosition();
b.dispatchEvent(n.Event.getInstance(n.Event.ADDED, !0));
b.stage && b._propagateEvent(n.Event.getInstance(n.Event.ADDED_TO_STAGE));
this._invalidateChildren();
b._addReference();
return b;
};
d.prototype.addTimelineObjectAtDepth = function(a, d) {
h.counter.count("DisplayObjectContainer::addTimelineObjectAtDepth");
d |= 0;
for (var e = this._children, c = e.length - 1, f = c + 1, k = c;0 <= k;k--) {
var m = e[k];
if (-1 < m._depth) {
if (m._depth < d) {
f = k + 1;
break;
}
f = k;
}
}
if (f > c) {
e.push(a), a._index = f;
} else {
for (e.splice(f, 0, a), k = f;k < e.length;k++) {
e[k]._index = k;
}
}
a._setParent(this, d);
a._invalidatePosition();
this._invalidateChildren();
};
d.prototype.removeChild = function(b) {
m(b, "child", a.display.DisplayObject);
return this.removeChildAt(this.getChildIndex(b));
};
d.prototype.removeChildAt = function(a) {
h.counter.count("DisplayObjectContainer::removeChildAt");
a |= 0;
var d = this._children;
(0 > a || a >= d.length) && e("RangeError", h.Errors.ParamRangeError);
var c = d[a];
c._hasFlags(256) && (c.dispatchEvent(n.Event.getInstance(n.Event.REMOVED, !0)), this.stage && c._propagateEvent(n.Event.getInstance(n.Event.REMOVED_FROM_STAGE)), a = this.getChildIndex(c));
d.splice(a, 1);
for (var f = d.length - 1;f >= a;f--) {
d[f]._index--;
}
c._setParent(null, -1);
c._index = -1;
c._invalidatePosition();
this._invalidateChildren();
return c;
};
d.prototype.getChildIndex = function(b) {
m(b, "child", a.display.DisplayObject);
b._parent !== this && e("ArgumentError", h.Errors.NotAChildError);
return b._index;
};
d.prototype.setChildIndex = function(b, d) {
d |= 0;
m(b, "child", a.display.DisplayObject);
var c = this._children;
(0 > d || d >= c.length) && e("RangeError", h.Errors.ParamRangeError);
b._parent !== this && e("ArgumentError", h.Errors.NotAChildError);
b._setDepth(-1);
var f = this.getChildIndex(b);
if (1 !== c.length && f !== d) {
if (d === f + 1 || d === f - 1) {
this._swapChildrenAt(f, d);
} else {
for (c.splice(f, 1), c.splice(d, 0, b), f = f < d ? f : d;f < c.length;) {
c[f]._index = f++;
}
}
this._invalidateChildren();
}
};
d.prototype.getChildAt = function(a) {
a |= 0;
var d = this._children;
(0 > a || a >= d.length) && e("RangeError", h.Errors.ParamRangeError);
a = this._lookupChildByIndex(a);
if (!a) {
return null;
}
a._addReference();
return a;
};
d.prototype.getTimelineObjectAtDepth = function(a) {
a |= 0;
for (var d = this._children, e = 0;e < d.length;e++) {
var c = d[e];
if (c._depth > a) {
break;
}
if (c._depth === a) {
return c;
}
}
return null;
};
d.prototype.getClipDepthIndex = function(a) {
a |= 0;
for (var d = this._children, e = this._children.length - 1, c = !0, f = e;0 <= f;f--) {
var k = d[f];
if (!(0 > k._depth)) {
if (k._depth <= a) {
return c ? e : f;
}
c = !1;
}
}
return 0;
};
d.prototype.getChildByName = function(a) {
a = l(a);
return(a = this._lookupChildByName(a)) ? (a._addReference(), a) : null;
};
d.prototype._lookupChildByIndex = function(a) {
return(a = this._children[a]) && a._hasFlags(256) ? a : null;
};
d.prototype._lookupChildByName = function(a) {
for (var d = this._children, e = 0;e < d.length;e++) {
var c = d[e];
if (c._hasFlags(256) && c.name === a) {
return c;
}
}
return null;
};
d.prototype._containsPoint = function(a, d, e, c, f, k) {
return this._containsPointImpl(a, d, e, c, f, k, !1);
};
d.prototype._containsPointImpl = function(a, d, e, c, f, k, m) {
var l;
if (!m && (l = this._boundsAndMaskContainPoint(a, d, e, c, f), 0 === l || 2 > f)) {
return l;
}
m = !1;
for (var h = this._getUnclippedChildren(f, a, d), n = h ? h.length : 0;n--;) {
if (l = h[n], !l._maskedObject && (l = l._containsGlobalPoint(a, d, f, k), 2 === l)) {
if (3 > f) {
return l;
}
m = !0;
if (!(4 <= f)) {
p(3 === f);
p(1 >= k.length);
if (!this._mouseEnabled) {
return k.length = 0, l;
}
this._mouseChildren || (k[0] = this);
if (0 !== k.length) {
return p(v.InteractiveObject.isType(k[0])), 2;
}
}
}
}
if (m && 4 > f) {
return 3 === f && 0 === k.length && (k[0] = this), 2;
}
(a = this._containsPointDirectly(e, c, a, d)) && (5 === f ? k[0] = this : (4 === f || k && this._mouseEnabled) && k.push(this));
return m || a ? 2 : 0;
};
d.prototype._getUnclippedChildren = function(a, d, e) {
var c = this._children;
if (!c) {
return null;
}
for (var f, k = 0;c && k < c.length;k++) {
var m = c[k];
-1 !== m._clipDepth ? (f || (f = c.slice(0, k)), 2 !== a && (p(3 <= a), m._containsGlobalPoint(d, e, 2, null) || (k = this.getClipDepthIndex(m._clipDepth)))) : f && f.push(m);
}
return f || c;
};
d.prototype._getChildBounds = function(a, d) {
for (var e = this._children, c = 0;c < e.length;c++) {
a.unionInPlace(e[c]._getTransformedBounds(this, d));
}
};
d.prototype.getObjectsUnderPoint = function(a) {
h.counter.count("DisplayObjectContainer::getObjectsUnderPoint");
var d = [];
this._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, 4, d);
return d.reverse();
};
d.prototype.areInaccessibleObjectsUnderPoint = function(a) {
u("public DisplayObjectContainer::areInaccessibleObjectsUnderPoint");
};
d.prototype.contains = function(b) {
m(b, "child", a.display.DisplayObject);
return this._isAncestor(b);
};
d.prototype.swapChildrenAt = function(a, d) {
a |= 0;
d |= 0;
var c = this._children;
(0 > a || a >= c.length || 0 > d || d >= c.length) && e("RangeError", h.Errors.ParamRangeError);
this._swapChildrenAt(a, d);
a !== d && this._invalidateChildren();
};
d.prototype._swapChildrenAt = function(a, d) {
var e = this._children, c = e[a], f = e[d];
e[d] = c;
c._setDepth(-1);
c._index = d;
e[a] = f;
f._setDepth(-1);
f._index = a;
};
d.prototype.swapChildren = function(b, d) {
m(b, "child", a.display.DisplayObject);
m(d, "child", a.display.DisplayObject);
this.swapChildrenAt(this.getChildIndex(b), this.getChildIndex(d));
};
d.prototype.removeChildren = function(a, d) {
void 0 === a && (a = 0);
void 0 === d && (d = 2147483647);
a |= 0;
d |= 0;
(0 > a || 0 > d || d < a || d >= this._children.length) && e("RangeError", h.Errors.ParamRangeError);
var c = d - a + 1;
if (0 < c) {
for (;c--;) {
this.removeChildAt(a);
}
}
};
d.bindings = null;
d.classSymbols = null;
d.classInitializer = null;
d.initializer = function() {
this._mouseChildren = this._tabChildren = !0;
this._children = [];
};
return d;
}(a.display.InteractiveObject);
v.DisplayObjectContainer = k;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.JointStyle");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.ROUND;
case 1:
return e.BEVEL;
case 2:
return e.MITER;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.ROUND:
return 0;
case e.BEVEL:
return 1;
case e.MITER:
return 2;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.ROUND = "round";
e.BEVEL = "bevel";
e.MITER = "miter";
return e;
}(a.ASNative);
h.JointStyle = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.CapsStyle");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.ROUND;
case 1:
return e.NONE;
case 2:
return e.SQUARE;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.ROUND:
return 0;
case e.NONE:
return 1;
case e.SQUARE:
return 2;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.ROUND = "round";
e.NONE = "none";
e.SQUARE = "square";
return e;
}(a.ASNative);
h.CapsStyle = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.LineScaleMode");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.NONE;
case 1:
return e.NORMAL;
case 2:
return e.VERTICAL;
case 3:
return e.HORIZONTAL;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.NONE:
return 0;
case e.NORMAL:
return 1;
case e.VERTICAL:
return 2;
case e.HORIZONTAL:
return 3;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.NORMAL = "normal";
e.VERTICAL = "vertical";
e.HORIZONTAL = "horizontal";
e.NONE = "none";
return e;
}(a.ASNative);
h.LineScaleMode = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.GradientType");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 16:
return e.LINEAR;
case 18:
return e.RADIAL;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.LINEAR:
return 16;
case e.RADIAL:
return 18;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.LINEAR = "linear";
e.RADIAL = "radial";
return e;
}(a.ASNative);
h.GradientType = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.SpreadMethod");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.PAD;
case 1:
return e.REFLECT;
case 2:
return e.REPEAT;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.PAD:
return 0;
case e.REFLECT:
return 1;
case e.REPEAT:
return 2;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.PAD = "pad";
e.REFLECT = "reflect";
e.REPEAT = "repeat";
return e;
}(a.ASNative);
h.SpreadMethod = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.InterpolationMethod");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.RGB;
case 1:
return e.LINEAR_RGB;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.RGB:
return 0;
case e.LINEAR_RGB:
return 1;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.RGB = "rgb";
e.LINEAR_RGB = "linearRGB";
return e;
}(a.ASNative);
h.InterpolationMethod = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c(a, m, l, h) {
void 0 === a && (a = null);
void 0 === m && (m = null);
void 0 === l && (l = !0);
void 0 === h && (h = !1);
this.bitmapData = a;
this.matrix = m;
this.repeat = !!l;
this.smooth = !!h;
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
c.GraphicsBitmapFill = h;
})(c.display || (c.display = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.GraphicsEndFill");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.GraphicsEndFill = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.AVM2.Runtime.asCoerceString, u = function(a) {
function e(a, e, c, l, k, f, d, b) {
void 0 === a && (a = "linear");
void 0 === e && (e = null);
void 0 === c && (c = null);
void 0 === l && (l = null);
void 0 === k && (k = null);
void 0 === f && (f = "pad");
void 0 === d && (d = "rgb");
void 0 === b && (b = 0);
this.type = s(a);
this.colors = e;
this.alphas = c;
this.ratios = l;
this.matrix = k;
this.spreadMethod = f;
this.interpolationMethod = s(d);
this.focalPointRatio = +b;
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.GraphicsGradientFill = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.AVM2.Runtime.asCoerceString, u = function(a) {
function e(a, e, c) {
void 0 === a && (a = null);
void 0 === e && (e = null);
void 0 === c && (c = "evenOdd");
this.commands = a;
this.data = e;
this.winding = s(c);
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.GraphicsPath = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.GraphicsPathCommand");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.NO_OP = void 0;
e.MOVE_TO = 1;
e.LINE_TO = 2;
e.CURVE_TO = 3;
e.WIDE_MOVE_TO = 4;
e.WIDE_LINE_TO = 5;
e.CUBIC_CURVE_TO = 6;
return e;
}(a.ASNative);
h.GraphicsPathCommand = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.GraphicsPathWinding");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.EVEN_ODD = "evenOdd";
e.NON_ZERO = "nonZero";
return e;
}(a.ASNative);
h.GraphicsPathWinding = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c(a, m) {
void 0 === a && (a = 0);
void 0 === m && (m = 1);
this.color = a >>> 0;
this.alpha = +m;
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
c.GraphicsSolidFill = h;
})(c.display || (c.display = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.AVM2.Runtime.asCoerceString, u = function(a) {
function e(a, e, c, l, k, f, d) {
void 0 === a && (a = NaN);
void 0 === e && (e = !1);
void 0 === c && (c = "normal");
void 0 === l && (l = "none");
void 0 === k && (k = "round");
void 0 === f && (f = 3);
void 0 === d && (d = null);
this.thickness = +a;
this.pixelHinting = !!e;
this.scaleMode = s(c);
this.caps = s(l);
this.joints = s(k);
this.miterLimit = +f;
this.fill = d;
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.GraphicsStroke = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = function(a) {
function c(a, e, m, k) {
void 0 === k && (k = "none");
u(k);
s("public flash.display.GraphicsTrianglePath");
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.GraphicsTrianglePath = l;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
(function(v) {
function p(a, b, d, e) {
a = d - a;
b = e - b;
return a * a + b * b;
}
function u(a, b, d, e) {
var c = 1 - e;
return a * c * c + 2 * b * c * e + d * e * e;
}
function l(a, b, d) {
var e = (a - b) / (a - 2 * b + d);
return 0 > e ? a : 1 < e ? d : u(a, b, d, e);
}
function e(a, b, d, e, c) {
var g = c * c, f = 1 - c, k = f * f;
return a * f * k + 3 * b * c * k + 3 * d * f * g + e * c * g;
}
function m(a, b, d, c) {
var g = b - a, f;
f = 2 * (d - b);
var k = c - d;
g + k === f && (k *= 1.0001);
var m = 2 * g - f, l = f - 2 * g, l = Math.sqrt(l * l - 4 * g * (g - f + k));
f = 2 * (g - f + k);
g = (m + l) / f;
m = (m - l) / f;
l = [];
0 <= g && 1 >= g && l.push(Math.round(e(a, b, d, c, g)));
0 <= m && 1 >= m && l.push(Math.round(e(a, b, d, c, m)));
return l;
}
function t(a, b, d, e, c, g, f, k, m) {
function l(a) {
return a * (w + a * (t + a * u)) + b - m;
}
function r(b) {
0 > b ? b = 0 : 1 < b && (b = 1);
return a + b * (n + b * (s + b * p));
}
function h(a, b, d, e) {
if (!(Math.abs(d - b) <= e)) {
var c = .5 * (b + d);
0 >= a(b) * a(d) ? (v = b, z = d) : (h(a, b, c, e), h(a, c, d, e));
}
}
var n = 3 * (d - a), w = 3 * (e - b), s = 3 * (c - d) - n, t = 3 * (g - e) - w, p = f - a - n - s, u = k - b - w - t, v = 0, z = 1;
h(l, 0, 1, .05);
g = q(v, z, l);
if (1E-5 < Math.abs(l(g))) {
return[];
}
d = [];
1 >= g && d.push(r(g));
e = u;
c = g * e + t;
f = c * c - 4 * e * (g * c + w);
if (0 > f) {
return d;
}
f = Math.sqrt(f);
e = 1 / (e + e);
g = (f - c) * e;
e *= -c - f;
0 <= g && 1 >= g && d.push(r(g));
0 <= e && 1 >= e && d.push(r(e));
return d;
}
function q(a, b, d) {
var e, c, g, f, k, m, l = a;
c = d(a);
if (0 === c) {
return a;
}
f = d(b);
if (0 === f) {
return b;
}
if (0 < f * c) {
return a;
}
for (var r = 0, h = 0;50 > h;++h) {
r++;
e = .5 * (b + a);
g = d(e);
if (0 === g) {
break;
}
if (1E-6 > Math.abs(e - a)) {
break;
}
0 < g * c && (a = b, b = c, c = f, f = b);
b = g - c;
m = f - g;
k = f - c;
if (f * k < 2 * g * b) {
b = e, f = g;
} else {
f = (e - a) / b;
b = (b - m) / (m * k);
b = a - f * c * (1 - b * g);
f = d(b);
if (0 === f || 1E-6 > Math.abs(b - l)) {
return b;
}
l = b;
0 > f * c || (a = b, c = f, b = e, f = g);
}
}
return e;
}
function n(a, b, d, e, c, g) {
return g > b !== e > b && a < (d - c) * (b - g) / (e - g) + c;
}
var k = c.Debug.notImplemented, f = c.AVM2.Runtime.asCoerceString, d = c.AVM2.Runtime.throwError, b = c.NumberUtilities.clamp, g = c.Bounds, r = c.Debug.assert, w = c.Debug.assertUnreachable, z = s.display.GradientType, A = s.display.SpreadMethod, B = s.display.InterpolationMethod, M = s.display.LineScaleMode, N = s.display.CapsStyle, K = s.display.JointStyle, y = c.ShapeData, D = function(a) {
function q() {
this._id = s.display.DisplayObject.getNextSyncID();
this._graphicsData = new y;
this._textures = [];
this._fillBounds = new g(134217728, 134217728, 134217728, 134217728);
this._lineBounds = new g(134217728, 134217728, 134217728, 134217728);
this._lastX = this._lastY = 0;
this._boundsIncludeLastCoordinates = !0;
this._parent = null;
this._topLeftStrokeWidth = this._bottomRightStrokeWidth = 0;
this._isDirty = !0;
}
__extends(q, a);
q.FromData = function(a) {
var b = new s.display.Graphics;
b._graphicsData = y.FromPlainObject(a.shape);
a.lineBounds && (b._lineBounds.copyFrom(a.lineBounds), b._fillBounds.copyFrom(a.fillBounds || a.lineBounds));
return b;
};
q.prototype.getGraphicsData = function() {
return this._graphicsData;
};
q.prototype.getUsedTextures = function() {
return this._textures;
};
q.prototype._setStrokeWidth = function(a) {
switch(a) {
case 1:
this._topLeftStrokeWidth = 0;
this._bottomRightStrokeWidth = 1;
break;
case 3:
this._topLeftStrokeWidth = 1;
this._bottomRightStrokeWidth = 2;
break;
default:
this._bottomRightStrokeWidth = this._topLeftStrokeWidth = a = Math.ceil(.5 * a) | 0;
}
};
q.prototype._setParent = function(a) {
r(!this._parent);
this._parent = a;
};
q.prototype._invalidate = function() {
r(this._parent, "Graphics instances must have a parent.");
this._parent._invalidateFillAndLineBounds(!0, !0);
this._parent._propagateFlagsUp(536870912);
this._isDirty = !0;
};
q.prototype._getContentBounds = function(a) {
void 0 === a && (a = !0);
return a ? this._lineBounds : this._fillBounds;
};
q.prototype.clear = function() {
this._graphicsData.isEmpty() || (this._graphicsData.clear(), this._textures.length = 0, this._fillBounds.setToSentinels(), this._lineBounds.setToSentinels(), this._lastX = this._lastY = 0, this._boundsIncludeLastCoordinates = !1, this._invalidate());
};
q.prototype.beginFill = function(a, d) {
void 0 === d && (d = 1);
a = a >>> 0 & 16777215;
d = Math.round(255 * b(+d, -1, 1)) | 0;
this._graphicsData.beginFill(a << 8 | d);
};
q.prototype.beginGradientFill = function(a, b, d, e, c, g, f, k) {
void 0 === c && (c = null);
void 0 === g && (g = "pad");
void 0 === f && (f = "rgb");
void 0 === k && (k = 0);
this._writeGradientStyle(2, a, b, d, e, c, g, f, k, !1);
};
q.prototype.beginBitmapFill = function(a, b, d, e) {
void 0 === b && (b = null);
void 0 === d && (d = !0);
void 0 === e && (e = !1);
this._writeBitmapStyle(3, a, b, d, e, !1);
};
q.prototype.endFill = function() {
this._graphicsData.endFill();
};
q.prototype.lineStyle = function(a, d, e, c, g, k, m, l) {
void 0 === d && (d = 0);
void 0 === e && (e = 1);
void 0 === c && (c = !1);
void 0 === g && (g = "normal");
void 0 === k && (k = null);
void 0 === m && (m = null);
void 0 === l && (l = 3);
a = +a;
d = d >>> 0 & 16777215;
e = Math.round(255 * b(+e, -1, 1));
c = !!c;
g = f(g);
k = f(k);
m = f(m);
l = b(+l | 0, 0, 255);
isNaN(a) ? (this._setStrokeWidth(0), this._graphicsData.endLine()) : (a = 20 * b(+a, 0, 255) | 0, this._setStrokeWidth(a), g = M.toNumber(f(g)), 0 > g && (g = M.toNumber(M.NORMAL)), k = N.toNumber(f(k)), 0 > k && (k = N.toNumber(N.ROUND)), m = K.toNumber(f(m)), 0 > m && (m = K.toNumber(K.ROUND)), this._graphicsData.lineStyle(a, d << 8 | e, c, g, k, m, l));
};
q.prototype.lineGradientStyle = function(a, b, d, e, c, g, f, k) {
void 0 === c && (c = null);
void 0 === g && (g = "pad");
void 0 === f && (f = "rgb");
void 0 === k && (k = 0);
this._writeGradientStyle(6, a, b, d, e, c, g, f, k, !this._graphicsData.hasLines);
};
q.prototype.lineBitmapStyle = function(a, b, d, e) {
void 0 === b && (b = null);
void 0 === d && (d = !0);
void 0 === e && (e = !1);
this._writeBitmapStyle(7, a, b, d, e, !this._graphicsData.hasLines);
};
q.prototype.drawRect = function(a, b, d, e) {
a = 20 * a | 0;
b = 20 * b | 0;
d = a + (20 * d | 0);
e = b + (20 * e | 0);
a === this._lastX && b === this._lastY || this._graphicsData.moveTo(a, b);
this._graphicsData.lineTo(d, b);
this._graphicsData.lineTo(d, e);
this._graphicsData.lineTo(a, e);
this._graphicsData.lineTo(a, b);
this._extendBoundsByPoint(d, e);
this._applyLastCoordinates(a, b);
this._invalidate();
};
q.prototype.drawRoundRect = function(a, b, d, e, c, g) {
a = +a;
b = +b;
d = +d;
e = +e;
c = +c;
if ((g = +g) && c) {
c = c / 2 | 0;
g = g / 2 | 0;
var f = d / 2, k = e / 2;
c > f && (c = f);
g > k && (g = k);
f === c && k === g ? c === g ? this.drawCircle(a + c, b + g, c) : this.drawEllipse(a, b, 2 * c, 2 * g) : (d = a + d, e = b + e, f = a + c, c = d - c, k = b + g, g = e - g, this.moveTo(d, g), this.curveTo(d, e, c, e), this.lineTo(f, e), this.curveTo(a, e, a, g), this.lineTo(a, k), this.curveTo(a, b, f, b), this.lineTo(c, b), this.curveTo(d, b, d, k), this.lineTo(d, g));
} else {
this.drawRect(a, b, d, e);
}
};
q.prototype.drawRoundRectComplex = function(a, b, d, e, c, g, f, k) {
a = +a;
b = +b;
d = +d;
e = +e;
c = +c;
g = +g;
f = +f;
k = +k;
if (c | g | f | k) {
d = a + d;
e = b + e;
var m = a + c;
this.moveTo(d, e - k);
this.curveTo(d, e, d - k, e);
this.lineTo(a + f, e);
this.curveTo(a, e, a, e - f);
this.lineTo(a, b + c);
this.curveTo(a, b, m, b);
this.lineTo(d - g, b);
this.curveTo(d, b, d, b + g);
this.lineTo(d, e - k);
} else {
this.drawRect(a, b, d, e);
}
};
q.prototype.drawCircle = function(a, b, d) {
d = +d;
this.drawEllipse(+a - d, +b - d, 2 * d, 2 * d);
};
q.prototype.drawEllipse = function(a, b, d, e) {
d = +d / 2;
e = +e / 2;
a = +a + d;
b = +b + e;
var c = a + d, g = b;
this.moveTo(c, g);
for (var f = 0, k = 1, m = 0, l = 0;4 > l;l++) {
var r = f + Math.PI / 2, f = 4 / 3 * Math.tan((r - f) / 4), h = c - m * f * d, n = g + k * f * e, k = Math.cos(r), m = Math.sin(r), c = a + k * d, g = b + m * e;
this.cubicCurveTo(h, n, c + m * f * d, g - k * f * e, c, g);
f = r;
}
};
q.prototype.moveTo = function(a, b) {
a = 20 * a | 0;
b = 20 * b | 0;
this._graphicsData.moveTo(a, b);
this._lastX = a;
this._lastY = b;
this._boundsIncludeLastCoordinates = !1;
};
q.prototype.lineTo = function(a, b) {
a = 20 * a | 0;
b = 20 * b | 0;
this._graphicsData.lineTo(a, b);
this._applyLastCoordinates(a, b);
this._invalidate();
};
q.prototype.curveTo = function(a, b, d, e) {
a = 20 * a | 0;
b = 20 * b | 0;
d = 20 * d | 0;
e = 20 * e | 0;
this._graphicsData.curveTo(a, b, d, e);
(a < this._lastX || a > d) && this._extendBoundsByX(l(this._lastX, a, d) | 0);
(b < this._lastY || b > e) && this._extendBoundsByY(l(this._lastY, b, e) | 0);
this._applyLastCoordinates(d, e);
this._invalidate();
};
q.prototype.cubicCurveTo = function(a, b, d, e, c, g) {
a = 20 * a | 0;
b = 20 * b | 0;
d = 20 * d | 0;
e = 20 * e | 0;
c = 20 * c | 0;
g = 20 * g | 0;
this._graphicsData.cubicCurveTo(a, b, d, e, c, g);
var f = this._lastX, k = this._lastY;
if (a < f || d < f || a > c || d > c) {
for (a = m(f, a, d, c), d = a.length;d--;) {
this._extendBoundsByX(a[d] | 0);
}
}
if (b < k || e < k || b > g || e > g) {
for (a = m(k, b, e, g), d = a.length;d--;) {
this._extendBoundsByY(a[d] | 0);
}
}
this._applyLastCoordinates(c, g);
this._invalidate();
};
q.prototype.copyFrom = function(a) {
this._graphicsData = a._graphicsData.clone();
this._fillBounds = a._fillBounds.clone();
this._lineBounds = a._lineBounds.clone();
this._textures = a._textures.concat();
this._lastX = a._lastX;
this._lastY = a._lastY;
this._boundsIncludeLastCoordinates = a._boundsIncludeLastCoordinates;
this._invalidate();
};
q.prototype.drawPath = function(a, b, d) {
void 0 === d && (d = "evenOdd");
f(d);
k("public flash.display.Graphics::drawPath");
};
q.prototype.drawTriangles = function(a, b, d, e) {
void 0 === e && (e = "none");
f(e);
k("public flash.display.Graphics::drawTriangles");
};
q.prototype.drawGraphicsData = function(a) {
k("public flash.display.Graphics::drawGraphicsData");
};
q.prototype._containsPoint = function(a, b, d, e) {
var c = this._graphicsData.hasLines;
if (!e && !(d && c ? this._lineBounds : this._fillBounds).contains(a, b)) {
return!1;
}
var g = !1;
this._graphicsData.hasFills ? g = this._fillContainsPoint(a, b, e) : r(c, "Can't have non-empty bounds without line or fill set.");
!g && d && (g = this._linesContainsPoint(a, b, e));
return g;
};
q.prototype._fillContainsPoint = function(a, b, d) {
for (var e = this._graphicsData, c = e.commands, g = e.commandsPosition, f = e.coordinates, k = e.morphCoordinates, m = 0, l = 0, h = 0, q = 0, s = 0, p, v, z = !1, A = !1, B = 0, M = 0, N = !1, y = 0;y < g;y++) {
p = c[y];
switch(p) {
case 9:
r(m <= e.coordinatesPosition - 2);
z && A && n(a, b, l, h, B, M) && (N = !N);
z = !0;
l = B = f[m++];
h = M = f[m++];
d && (l = B += (k[m - 2] - B) * d, h = M += (k[m - 2] - M) * d);
continue;
case 10:
r(m <= e.coordinatesPosition - 2);
q = f[m++];
s = f[m++];
d && (q += (k[m - 2] - q) * d, s += (k[m - 1] - s) * d);
A && n(a, b, l, h, q, s) && (N = !N);
break;
case 11:
r(m <= e.coordinatesPosition - 4);
p = f[m++];
v = f[m++];
q = f[m++];
s = f[m++];
d && (p += (k[m - 4] - p) * d, v += (k[m - 3] - v) * d, q += (k[m - 2] - q) * d, s += (k[m - 1] - s) * d);
var K;
if (K = A) {
if (v > b === h > b && s > b === h > b) {
K = !1;
} else {
if (l >= a && p >= a && q >= a) {
K = !0;
} else {
K = h - 2 * v + s;
v = 2 * (v - h);
var D = v * v - 4 * K * (h - b);
0 > D ? K = !1 : (D = Math.sqrt(D), K = 1 / (K + K), h = (D - v) * K, v = (-v - D) * K, K = !1, 0 <= h && 1 >= h && u(l, p, q, h) > a && (K = !K), 0 <= v && 1 >= v && u(l, p, q, v) > a && (K = !K));
}
}
}
K && (N = !N);
break;
case 12:
r(m <= e.coordinatesPosition - 6);
p = f[m++];
v = f[m++];
var D = f[m++], L = f[m++], q = f[m++], s = f[m++];
d && (p += (k[m - 6] - p) * d, v += (k[m - 5] - v) * d, D += (k[m - 4] - D) * d, L += (k[m - 3] - L) * d, q += (k[m - 2] - q) * d, s += (k[m - 1] - s) * d);
if (K = A) {
K = a;
var H = h > b;
if (v > b === H && L > b === H && s > b === H) {
K = !1;
} else {
if (l < K && p < K && D < K && q < K) {
K = !1;
} else {
H = !1;
l = t(l, h, p, v, D, L, q, s, b);
for (p = l.length;p;p--) {
l[p] >= K && (H = !H);
}
K = H;
}
}
}
K && (N = !N);
break;
case 1:
;
case 2:
;
case 3:
;
case 4:
z && A && n(a, b, l, h, B, M) && (N = !N);
if (N) {
return!0;
}
z = !1;
A = 4 !== p;
break;
case 5:
m++;
break;
case 6:
;
case 7:
;
case 8:
break;
default:
w("Invalid command " + p + " encountered at index" + (y - 1) + " of " + g);
}
l = q;
h = s;
}
r(y === g);
r(m === e.coordinatesPosition);
z && A && n(a, b, l, h, B, M) && (N = !N);
return N;
};
q.prototype._linesContainsPoint = function(a, b, d) {
for (var c = this._graphicsData, g = c.commands, f = c.commandsPosition, k = c.coordinates, h = c.morphCoordinates, n = 0, q = 0, s = 0, t = 0, v = 0, z, A, B, M, N, y = 0, K = 0, D = 0, L = 0, H = 0, aa = 0, ia = K = 0;ia < f;ia++) {
z = g[ia];
switch(z) {
case 9:
r(n <= c.coordinatesPosition - 2);
q = k[n++];
s = k[n++];
d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d);
continue;
case 10:
r(n <= c.coordinatesPosition - 2);
if (0 === y) {
q = k[n++];
s = k[n++];
d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d);
continue;
}
t = k[n++];
v = k[n++];
d && (t += (h[n - 2] - t) * d, v += (h[n - 1] - v) * d);
if (q === t && s === v) {
break;
}
if (H < q && H < t || L > q && L > t || K < s && K < v || aa > s && aa > v) {
break;
}
if (t === q || v === s) {
return!0;
}
N = ((a - q) * (t - q) + (b - s) * (v - s)) / p(q, s, t, v);
if (0 > N) {
if (p(a, b, q, s) <= D) {
return!0;
}
break;
}
if (1 < N) {
if (p(a, b, t, v) <= D) {
return!0;
}
break;
}
if (p(a, b, q + N * (t - q), s + N * (v - s)) <= D) {
return!0;
}
break;
case 11:
r(n <= c.coordinatesPosition - 4);
if (0 === y) {
n += 2;
q = k[n++];
s = k[n++];
d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d);
continue;
}
z = k[n++];
A = k[n++];
t = k[n++];
v = k[n++];
d && (z += (h[n - 4] - z) * d, A += (h[n - 3] - A) * d, t += (h[n - 2] - t) * d, v += (h[n - 1] - v) * d);
var T = l(q, z, t);
if (H < q && H < T && H < t || L > q && L > T && L > t) {
break;
}
T = l(s, A, v);
if (K < s && K < T && K < v || aa > s && aa > T && aa > v) {
break;
}
for (N = 0;1 > N;N += .02) {
if (B = u(q, z, t, N), !(B < L || B > H) && (M = u(s, A, v, N), !(M < aa || M > K) && (a - B) * (a - B) + (b - M) * (b - M) < D)) {
return!0;
}
}
break;
case 12:
r(n <= c.coordinatesPosition - 6);
if (0 === y) {
n += 4;
n++;
q = k[n++];
d && (q += (h[n - 2] - q) * d, s += (h[n - 1] - s) * d);
continue;
}
z = k[n++];
A = k[n++];
var T = k[n++], da = k[n++], t = k[n++], v = k[n++];
d && (z += (h[n - 6] - z) * d, A += (h[n - 5] - A) * d, T += (h[n - 4] - T) * d, da += (h[n - 3] - da) * d, t += (h[n - 2] - t) * d, v += (h[n - 1] - v) * d);
for (B = m(q, z, T, t);2 > B.length;) {
B.push(t);
}
if (H < q && H < t && H < B[0] && H < B[1] || L > q && L > t && L > B[0] && L > B[1]) {
break;
}
for (B = m(s, A, da, v);2 > B.length;) {
B.push(v);
}
if (K < s && K < v && K < B[0] && K < B[1] || aa > s && aa > v && aa > B[0] && aa > B[1]) {
break;
}
for (N = 0;1 > N;N += .02) {
if (B = e(q, z, T, t, N), !(B < L || B > H) && (M = e(s, A, da, v, N), !(M < aa || M > K) && (a - B) * (a - B) + (b - M) * (b - M) < D)) {
return!0;
}
}
break;
case 5:
y = k[n++];
d && (y += (h[n - 1] - y) * d);
K = y >> 2;
D = K * K;
L = a - K;
H = a + K;
aa = b - K;
K = b + K;
break;
case 1:
;
case 2:
;
case 3:
;
case 4:
;
case 6:
;
case 7:
;
case 8:
break;
default:
w("Invalid command " + z + " encountered at index" + (ia - 1) + " of " + f);
}
q = t;
s = v;
}
r(ia === f);
r(n === c.coordinatesPosition);
return!1;
};
q.prototype._writeBitmapStyle = function(a, b, e, g, f, k) {
c.isNullOrUndefined(b) ? d("TypeError", h.Errors.NullPointerError, "bitmap") : s.display.BitmapData.isType(b) || d("TypeError", h.Errors.CheckTypeFailedError, "bitmap", "flash.display.BitmapData");
c.isNullOrUndefined(e) ? e = s.geom.Matrix.FROZEN_IDENTITY_MATRIX : s.geom.Matrix.isType(e) || d("TypeError", h.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix");
g = !!g;
f = !!f;
k || (k = this._textures.length, this._textures.push(b), this._graphicsData.beginBitmap(a, k, e, g, f));
};
q.prototype._writeGradientStyle = function(a, e, g, k, m, l, r, n, q, w) {
c.isNullOrUndefined(e) && d("TypeError", h.Errors.NullPointerError, "type");
e = z.toNumber(f(e));
0 > e && d("ArgumentError", h.Errors.InvalidEnumError, "type");
c.isNullOrUndefined(g) && d("TypeError", h.Errors.NullPointerError, "colors");
g instanceof Array || d("TypeError", h.Errors.CheckTypeFailedError, "colors", "Array");
k instanceof Array || d("TypeError", h.Errors.CheckTypeFailedError, "alphas", "Array");
c.isNullOrUndefined(k) && d("TypeError", h.Errors.NullPointerError, "alphas");
m instanceof Array || d("TypeError", h.Errors.CheckTypeFailedError, "ratios", "Array");
c.isNullOrUndefined(m) && d("TypeError", h.Errors.NullPointerError, "ratios");
var t = [], p = [], u = g.length, v = u === k.length && u === m.length;
if (v) {
for (var M = 0;M < u;M++) {
var N = +m[M];
if (255 < N || 0 > N) {
v = !1;
break;
}
t[M] = g[M] << 8 & 4294967040 | 255 * b(+k[M], 0, 1);
p[M] = N;
}
}
v && (c.isNullOrUndefined(l) ? l = s.geom.Matrix.FROZEN_IDENTITY_MATRIX : s.geom.Matrix.isType(l) || d("TypeError", h.Errors.CheckTypeFailedError, "matrix", "flash.geom.Matrix"), w || (g = A.toNumber(f(r)), 0 > g && (g = A.toNumber(A.PAD)), n = B.toNumber(f(n)), 0 > n && (n = B.toNumber(B.RGB)), q = b(+q, -1, 1) / 2 * 255 | 0, this._graphicsData.beginGradient(a, t, p, e, l, g, n, q)));
};
q.prototype._extendBoundsByPoint = function(a, b) {
this._extendBoundsByX(a);
this._extendBoundsByY(b);
};
q.prototype._extendBoundsByX = function(a) {
this._fillBounds.extendByX(a);
var b = this._lineBounds;
134217728 === b.xMin ? (b.xMin = a - this._topLeftStrokeWidth, b.xMax = a + this._bottomRightStrokeWidth) : (b.xMin = Math.min(a - this._topLeftStrokeWidth, b.xMin), b.xMax = Math.max(a + this._bottomRightStrokeWidth, b.xMax));
};
q.prototype._extendBoundsByY = function(a) {
this._fillBounds.extendByY(a);
var b = this._lineBounds;
134217728 === b.yMin ? (b.yMin = a - this._topLeftStrokeWidth, b.yMax = a + this._bottomRightStrokeWidth) : (b.yMin = Math.min(a - this._topLeftStrokeWidth, b.yMin), b.yMax = Math.max(a + this._bottomRightStrokeWidth, b.yMax));
};
q.prototype._applyLastCoordinates = function(a, b) {
this._boundsIncludeLastCoordinates || this._extendBoundsByPoint(this._lastX, this._lastY);
this._boundsIncludeLastCoordinates = !0;
this._lastX = a;
this._lastY = b;
this._extendBoundsByPoint(a, b);
};
q.classInitializer = null;
q.initializer = null;
q.classSymbols = null;
q.instanceSymbols = null;
return q;
}(a.ASNative);
v.Graphics = D;
})(s.display || (s.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Timeline, l = c.NumberUtilities.clamp, e;
(function(a) {
a[a.Inactive = 0] = "Inactive";
a[a.LockToPointer = 1] = "LockToPointer";
a[a.PreserveDistance = 2] = "PreserveDistance";
})(e || (e = {}));
e = function(e) {
function t() {
h.DisplayObjectContainer.instanceConstructorNoInitialize.call(this);
this._constructChildren();
}
__extends(t, e);
t.prototype._addFrame = function(a) {
var e = this._symbol.frames;
e.push(a);
1 === e.length && this._initializeChildren(a);
};
t.prototype._initializeChildren = function(a) {
a.controlTags && this._processControlTags(a.controlTags, !1);
};
t.prototype._processControlTags = function(a, e) {
if (e) {
for (var k = this._children.slice(), f = 0;f < k.length;f++) {
var d = k[f];
if (!(0 > d._depth)) {
for (var b = null, g = 0;g < a.length;g++) {
if (a[g].depth === d._depth) {
b = a[g];
break;
}
}
b && d._symbol.id === b.symbolId && d._ratio === (b.ratio | 0) || this._removeAnimatedChild(d);
}
}
}
k = this._symbol.loaderInfo;
for (f = 0;f < a.length;f++) {
switch(d = a[f], b = void 0 === d.tagCode ? d : k._file.getParsedTag(d), b.code) {
case 5:
;
case 28:
(d = this.getTimelineObjectAtDepth(b.depth | 0)) && this._removeAnimatedChild(d);
break;
case 4:
;
case 26:
;
case 70:
var g = b, m = g.depth, d = this.getTimelineObjectAtDepth(m), l = -1 < g.symbolId;
if (g.flags & 1) {
if (!d) {
break;
}
} else {
if (!l || d && (!e || !l)) {
c.Debug.warning("Warning: Failed to place object at depth " + m + ".");
break;
}
}
var h = null;
if (l && (h = k.getSymbolById(g.symbolId), !h)) {
break;
}
d ? (h && !h.dynamic && d._setStaticContentFromSymbol(h), d._hasFlags(4096) && d._animate(b)) : (d = this.createAnimatedDisplayObject(h, g, !1), this.addTimelineObjectAtDepth(d, m), h.isAVM1Object && c.AVM1.Lib.initializeAVM1Object(d, h.avm1Context, g));
}
}
};
t.prototype._removeAnimatedChild = function(a) {
this.removeChild(a);
if (a._name) {
var e = c.AVM2.ABC.Multiname.getPublicQualifiedName(a._name);
this[e] === a && (this[e] = null);
}
};
t.prototype._canHaveGraphics = function() {
return!0;
};
t.prototype._getGraphics = function() {
return this._graphics;
};
Object.defineProperty(t.prototype, "graphics", {get:function() {
return this._ensureGraphics();
}, enumerable:!0, configurable:!0});
Object.defineProperty(t.prototype, "buttonMode", {get:function() {
return this._buttonMode;
}, set:function(a) {
this._buttonMode = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(t.prototype, "dropTarget", {get:function() {
return this._dropTarget;
}, enumerable:!0, configurable:!0});
Object.defineProperty(t.prototype, "hitArea", {get:function() {
return this._hitArea;
}, set:function(a) {
this._hitArea !== a && (a && a._hitTarget && (a._hitTarget._hitArea = null), this._hitArea = a) && (a._hitTarget = this);
}, enumerable:!0, configurable:!0});
Object.defineProperty(t.prototype, "useHandCursor", {get:function() {
return this._useHandCursor;
}, set:function(a) {
this._useHandCursor = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(t.prototype, "soundTransform", {get:function() {
p("public flash.display.Sprite::get soundTransform");
}, set:function(a) {
p("public flash.display.Sprite::set soundTransform");
}, enumerable:!0, configurable:!0});
t.prototype.startDrag = function(e, c) {
void 0 === e && (e = !1);
void 0 === c && (c = null);
if (e) {
this._dragMode = 1;
} else {
this._dragMode = 2;
var k = this._getLocalMousePosition();
this._dragDeltaX = this.x - k.x;
this._dragDeltaY = this.y - k.y;
}
this._dragBounds = c;
a.ui.Mouse.draggableObject = this;
};
t.prototype.stopDrag = function() {
a.ui.Mouse.draggableObject === this && (a.ui.Mouse.draggableObject = null, this._dragDeltaY = this._dragDeltaX = this._dragMode = 0, this._dragBounds = null);
};
t.prototype._updateDragState = function(a) {
void 0 === a && (a = null);
var e = this._getLocalMousePosition(), c = e.x, e = e.y;
2 === this._dragMode && (c += this._dragDeltaX, e += this._dragDeltaY);
if (this._dragBounds) {
var f = this._dragBounds, c = l(c, f.left, f.right), e = l(e, f.top, f.bottom)
}
this.x = c;
this.y = e;
this._dropTarget = a;
};
t.prototype.startTouchDrag = function(a, e, c) {
p("public flash.display.Sprite::startTouchDrag");
};
t.prototype.stopTouchDrag = function(a) {
p("public flash.display.Sprite::stopTouchDrag");
};
t.prototype._containsPoint = function(a, e, c, f, d, b) {
if (!(5 === d && 0 < this._dragMode)) {
var g = this._boundsAndMaskContainPoint(a, e, c, f, d);
!g && 3 === d && this._hitArea && this._mouseEnabled && (g = this._hitArea._getInvertedConcatenatedMatrix(), g = this._hitArea._boundsAndMaskContainPoint(a, e, g.transformX(a, e), g.transformY(a, e), d));
return 0 === g || 2 > d ? g : this._containsPointImpl(a, e, c, f, d, b, !0);
}
};
t.prototype._containsPointDirectly = function(a, e, c, f) {
if (this._hitArea) {
return!!this._hitArea._containsGlobalPoint(c, f, 2, null);
}
c = this._getGraphics();
return!!c && c._containsPoint(a, e, !0, 0);
};
t.classInitializer = null;
t.initializer = function(a) {
this._graphics = null;
this._buttonMode = !1;
this._hitArea = this._dropTarget = null;
this._useHandCursor = !0;
this._dragDeltaY = this._dragDeltaX = this._dragMode = 0;
this._hitTarget = this._dragBounds = null;
a && (a.isRoot && (this._root = this), a.numFrames && 0 < a.frames.length && this._initializeChildren(a.frames[0]));
};
t.classSymbols = null;
t.instanceSymbols = null;
return t;
}(a.display.DisplayObjectContainer);
h.Sprite = e;
u = function(e) {
function c(l, h) {
e.call(this, l, a.display.MovieClip, !0);
this.numFrames = 1;
this.frames = [];
this.labels = [];
this.frameScripts = [];
this.loaderInfo = h;
}
__extends(c, e);
c.FromData = function(e, m) {
var k = new c(e, m);
k.numFrames = e.frameCount;
m.actionScriptVersion === h.ActionScriptVersion.ACTIONSCRIPT2 && (k.isAVM1Object = !0, k.avm1Context = m._avm1Context);
k.frameScripts = [];
for (var f = e.frames, d = 0;d < f.length;d++) {
var b = m.getFrame(e, d), g = b.actionBlocks;
if (g) {
for (var l = 0;l < g.length;l++) {
k.frameScripts.push(d), k.frameScripts.push(g[l]);
}
}
b.labelName && k.labels.push(new a.display.FrameLabel(b.labelName, d + 1));
k.frames.push(b);
}
return k;
};
return c;
}(u.DisplaySymbol);
h.SpriteSymbol = u;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.Debug.assert, u = c.Debug.assertUnreachable, l = c.AVM2.Runtime.asCoerceString, e = c.AVM2.Runtime.throwError, m = c.Telemetry, t = a.events;
(function(a) {
a[a.SWF1 = 1] = "SWF1";
a[a.SWF9 = 9] = "SWF9";
a[a.SWF10 = 10] = "SWF10";
})(v.FrameNavigationModel || (v.FrameNavigationModel = {}));
var q = function() {
function a(e) {
this._mc = e;
this._soundStream = this._startSoundRegistrations = null;
}
a.prototype.registerStartSounds = function(a, d) {
null === this._startSoundRegistrations && (this._startSoundRegistrations = {});
this._startSoundRegistrations[a] = d;
};
a.prototype.initSoundStream = function(a) {
this._soundStream = new v.MovieClipSoundStream(a, this._mc);
};
a.prototype.addSoundStreamBlock = function(a, d) {
this._soundStream && this._soundStream.appendBlock(a, d);
};
a.prototype._startSounds = function(a) {
if (a = this._startSoundRegistrations[a]) {
for (var d = this._soundClips || (this._soundClips = {}), b = this._mc.loaderInfo, e = 0;e < a.length;e++) {
var c = a[e], k = c.soundId, c = c.soundInfo, m = d[k];
if (!m) {
var l = b.getSymbolById(k);
if (!l) {
continue;
}
m = l.symbolClass;
l = m.initializeFrom(l);
m.instanceConstructorNoInitialize.call(l);
d[k] = m = {object:l};
}
m.channel && (m.channel.stop(), m.channel = null);
c.stop || (m.channel = m.object.play(0, c.hasLoops ? c.loopCount : 0));
}
}
};
a.prototype.syncSounds = function(a) {
null !== this._startSoundRegistrations && this._startSounds(a);
this._soundStream && this._soundStream.playFrame(a);
};
return a;
}(), n = function(k) {
function f() {
v.Sprite.instanceConstructorNoInitialize.call(this);
}
__extends(f, k);
f.reset = function() {
f.frameNavigationModel = 10;
f._callQueue = [];
};
f.runFrameScripts = function() {
h.enterTimeline("MovieClip.executeFrame");
var a = f._callQueue;
f._callQueue = [];
for (var b = 0;b < a.length;b++) {
var e = a[b];
e._hasFlags(1024) ? (e._removeFlags(1024), e.dispatchEvent(t.Event.getInstance(t.Event.AVM1_LOAD))) : (e._allowFrameNavigation = 1 === v.MovieClip.frameNavigationModel, e.callFrame(e._currentFrame), e._allowFrameNavigation = !0, e._nextFrame !== e._currentFrame && (9 === v.MovieClip.frameNavigationModel ? (e._advanceFrame(), e._constructFrame(), e._removeFlags(8192), e.callFrame(e._currentFrame)) : v.DisplayObject.performFrameNavigation(!1, !0)));
}
h.leaveTimeline();
};
f.prototype._addFrame = function(a) {
var b = this._symbol, e = b.frames;
e.push(a);
a.labelName && this.addFrameLabel(a.labelName, e.length);
a.soundStreamHead && this._initSoundStream(a.soundStreamHead);
a.soundStreamBlock && this._addSoundStreamBlock(e.length, a.soundStreamBlock);
if (b.isAVM1Object && (c.AVM1.Lib.getAVM1Object(this, b.avm1Context).addFrameActionBlocks(e.length - 1, a), a.exports)) {
a = a.exports;
for (var f = 0;f < a.length;f++) {
var k = a[f];
b.avm1Context.addAsset(k.className, k.symbolId, null);
}
}
1 === e.length && this._initializeChildren(e[0]);
};
f.prototype._initFrame = function(a) {
if (a) {
if (this.buttonMode && (a = null, this._mouseOver ? a = this._mouseDown ? "_down" : "_over" : null !== this._currentButtonState && (a = "_up"), a !== this._currentButtonState && this._buttonFrames[a])) {
this.stop();
this._gotoFrame(a, null);
this._currentButtonState = a;
this._advanceFrame();
return;
}
1 < this._totalFrames && !this._stopped && this._hasFlags(256) && this._nextFrame++;
}
this._advanceFrame();
};
f.prototype._constructFrame = function() {
this._constructChildren();
};
f.prototype._enqueueFrameScripts = function() {
this._hasFlags(1024) && f._callQueue.push(this);
this._hasFlags(8192) && (this._removeFlags(8192), f._callQueue.push(this));
k.prototype._enqueueFrameScripts.call(this);
};
Object.defineProperty(f.prototype, "currentFrame", {get:function() {
return this._currentFrame - this._sceneForFrameIndex(this._currentFrame).offset;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "framesLoaded", {get:function() {
return this._frames.length;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "totalFrames", {get:function() {
return this._totalFrames;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "trackAsMenu", {get:function() {
return this._trackAsMenu;
}, set:function(a) {
this._trackAsMenu = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "scenes", {get:function() {
return this._scenes.map(function(a) {
return a.clone();
});
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "currentScene", {get:function() {
return this._sceneForFrameIndex(this._currentFrame).clone();
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "currentLabel", {get:function() {
var a = this._labelForFrame(this._currentFrame);
return a ? a.name : null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "currentLabels", {get:function() {
return this._sceneForFrameIndex(this._currentFrame).labels;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "currentFrameLabel", {get:function() {
var a = this._sceneForFrameIndex(this._currentFrame);
return(a = a.getLabelByFrame(this._currentFrame - a.offset)) && a.name;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "enabled", {get:function() {
return this._enabled;
}, set:function(a) {
this._enabled = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "isPlaying", {get:function() {
return this._isPlaying;
}, enumerable:!0, configurable:!0});
f.prototype.play = function() {
1 < this._totalFrames && (this._isPlaying = !0);
this._stopped = !1;
};
f.prototype.stop = function() {
this._isPlaying = !1;
this._stopped = !0;
};
f.prototype._getAbsFrameNumber = function(a, b) {
var c = 10 !== v.MovieClip.frameNavigationModel, f;
if (null !== b) {
b = l(b);
var k = this._scenes;
p(k.length, "There should be at least one scene defined.");
for (var m = 0;m < k.length && (f = k[m], f.name !== b);m++) {
}
if (m === k.length) {
if (c) {
return;
}
e("ArgumentError", h.Errors.SceneNotFoundError, b);
}
} else {
f = this._sceneForFrameIndex(this._currentFrame);
}
k = parseInt(a, 10);
if (k != a) {
k = f.getLabelByName(a, c);
if (!k) {
if (c) {
return;
}
e("ArgumentError", h.Errors.FrameLabelNotFoundError, a, b);
}
k = k.frame;
}
return f.offset + k;
};
f.prototype._gotoFrame = function(a, b) {
var e = this._getAbsFrameNumber(a, b);
void 0 !== e && this._gotoFrameAbs(e);
};
f.prototype._gotoFrameAbs = function(a) {
1 > a ? a = 1 : a > this._totalFrames && (a = this._totalFrames);
a !== this._nextFrame && (this._nextFrame = a, this._allowFrameNavigation && (9 === v.MovieClip.frameNavigationModel ? (this._advanceFrame(), this._constructFrame()) : v.DisplayObject.performFrameNavigation(!1, !0)));
};
f.prototype._advanceFrame = function() {
var a = this._currentFrame, b = this._nextFrame;
b > this._totalFrames && (b = 1);
if (a === b) {
this._nextFrame = b;
} else {
if (b > this.framesLoaded) {
this._nextFrame = b;
} else {
var e = this._frames[b - 1];
if (e !== this._frames[a - 1] && (this._seekToFrame(b), e.controlTags)) {
for (var a = e.controlTags, f, e = 0;e < a.length;e++) {
var k = a[e];
15 === k.tagCode && (k = this._symbol.loaderInfo._file.getParsedTag(k));
15 === k.code && (f || (f = []), f.push(new c.Timeline.SoundStart(k.soundId, k.soundInfo)));
}
f && this._registerStartSounds(b, f);
}
this._frameScripts[b] && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384));
this._currentFrame = this._nextFrame = b;
this._syncSounds(b);
}
}
};
f.prototype._seekToFrame = function(a) {
var b = this._currentFrame, e = this._frames;
if (a === b + 1) {
e = e[a - 1], e.controlTags && this._processControlTags(e.controlTags, !1);
} else {
for (var c = e[b - 1], f = this._symbol.loaderInfo, k = a < b, m = [], l, b = k ? 0 : b;a-- > b;) {
var h = e[a];
if (h !== c && (c = h, h = h.controlTags)) {
for (var n = h.length;n--;) {
var q = h[n], q = void 0 === q.tagCode ? q : f._file.getParsedTag(q);
switch(q.code) {
case 5:
;
case 28:
l || (l = Object.create(null));
l[q.depth] = !0;
k || m.push(q);
break;
case 4:
;
case 26:
;
case 70:
l && l[q.depth] || m.push(q);
break;
default:
m.push(q);
}
}
}
}
m.reverse();
this._processControlTags(m, k);
}
};
f.prototype._sceneForFrameIndex = function(a) {
var b = this._scenes;
if (0 === a) {
return b[0];
}
for (var e = 0;e < b.length;e++) {
var c = b[e];
if (c.offset < a && c.offset + c.numFrames >= a) {
return c;
}
}
u("Must have at least one scene covering all frames.");
};
f.prototype._labelForFrame = function(a) {
for (var b = this._scenes, e = null, c = 0;c < b.length;c++) {
var f = b[c];
if (f.offset > a) {
break;
}
for (var k = f.labels, m = 0;m < k.length;m++) {
var l = k[m];
if (l.frame > a - f.offset) {
return e;
}
e = l;
}
}
return e;
};
f.prototype.callFrame = function(a) {
if (a = this._frameScripts[a | 0]) {
try {
a.call(this);
} catch (b) {
throw m.instance.reportTelemetry({topic:"error", error:2}), this.stop(), b;
}
}
};
f.prototype.nextFrame = function() {
this.gotoAndStop(this._currentFrame + 1);
};
f.prototype.prevFrame = function() {
this.gotoAndStop(this._currentFrame - 1);
};
f.prototype.gotoAndPlay = function(a, b) {
void 0 === b && (b = null);
(0 === arguments.length || 2 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length);
b = l(b);
a = l(a) + "";
this.play();
this._gotoFrame(a, b);
};
f.prototype.gotoAndStop = function(a, b) {
void 0 === b && (b = null);
(0 === arguments.length || 2 < arguments.length) && e("ArgumentError", h.Errors.WrongArgumentCountError, "flash.display::MovieClip/gotoAndPlay()", 1, arguments.length);
b = l(b);
a = l(a) + "";
this.stop();
this._gotoFrame(a, b);
};
f.prototype.addFrameScript = function(a, b) {
if (this._currentFrame) {
var c = arguments.length;
c & 1 && e("ArgumentError", h.Errors.TooFewArgumentsError, c, c + 1);
for (var f = this._frameScripts, k = this._totalFrames, m = 0;m < c;m += 2) {
var l = (arguments[m] | 0) + 1;
1 > l || l > k || (f[l] = arguments[m + 1], l === this._currentFrame && (this._setFlags(8192), this._parent && this._propagateFlagsUp(16384)));
}
}
};
Object.defineProperty(f.prototype, "_avm1SymbolClass", {get:function() {
return this._symbol && this._symbol.avm1SymbolClass || null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "_isFullyLoaded", {get:function() {
return this.framesLoaded >= this.totalFrames;
}, enumerable:!0, configurable:!0});
f.prototype._registerStartSounds = function(a, b) {
null === this._sounds && (this._sounds = new q(this));
this._sounds.registerStartSounds(a, b);
};
f.prototype._initSoundStream = function(a) {
null === this._sounds && (this._sounds = new q(this));
this._sounds.initSoundStream(a);
};
f.prototype._addSoundStreamBlock = function(a, b) {
this._sounds.addSoundStreamBlock(a, b);
};
f.prototype._syncSounds = function(a) {
null !== this._sounds && this._sounds.syncSounds(a);
};
f.prototype.addScene = function(a, b, e, c) {
this._scenes.push(new v.Scene(a, b, e, c));
};
f.prototype.addFrameLabel = function(d, b) {
var e = this._sceneForFrameIndex(b);
e.getLabelByName(d, !1) || e.labels.push(new a.display.FrameLabel(d, b - e.offset));
};
f.prototype.prevScene = function() {
var a = this._sceneForFrameIndex(this._currentFrame);
0 !== a.offset && this._gotoFrameAbs(this._sceneForFrameIndex(a.offset).offset + 1);
};
f.prototype.nextScene = function() {
var a = this._sceneForFrameIndex(this._currentFrame);
a.offset + a.numFrames !== this._totalFrames && this._gotoFrameAbs(a.offset + a.numFrames + 1);
};
f.prototype._containsPointImpl = function(a, b, e, c, f, m, l) {
a = k.prototype._containsPointImpl.call(this, a, b, e, c, f, m, !0);
2 === a && 3 === f && "_as2Object" in this && !this.buttonMode && m[0] === this && (m.length = 0);
return a;
};
f.classInitializer = function() {
f.reset();
};
f.initializer = function(a) {
v.DisplayObject._advancableInstances.push(this);
this._currentFrame = 0;
this._totalFrames = 1;
this._trackAsMenu = !1;
this._scenes = [];
this._enabled = !0;
this._isPlaying = !1;
this._frames = [];
this._frameScripts = [];
this._nextFrame = 1;
this._stopped = !1;
this._allowFrameNavigation = !0;
this._sounds = null;
this._buttonFrames = Object.create(null);
this._currentButtonState = null;
if (a) {
if (this._totalFrames = a.numFrames, this._currentFrame = 1, a.isRoot || this.addScene("", a.labels, 0, a.numFrames), this._frames = a.frames, a.isAVM1Object) {
if (a.frameScripts) {
var b = c.AVM1.Lib.getAVM1Object(this, a.avm1Context);
b.context = a.avm1Context;
for (var e = a.frameScripts, f = 0;f < e.length;f += 2) {
b.addFrameScript(e[f], e[f + 1]);
}
}
a.avm1Name && (this.name = a.avm1Name);
}
} else {
this.addScene("", [], 0, this._totalFrames);
}
};
f.classSymbols = null;
f.instanceSymbols = null;
return f;
}(a.display.Sprite);
v.MovieClip = n;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
function p(a, e) {
var c = !1, d;
a.addEventListener("timeupdate", function(a) {
c ? performance.now() : (d = performance.now(), c = !0);
});
a.addEventListener("pause", function(a) {
c = !1;
});
a.addEventListener("seeking", function(a) {
c = !1;
});
}
var u = c.SWF.MP3DecoderSession, l = function() {
function a(e) {
this._element = e;
}
Object.defineProperty(a.prototype, "isReady", {get:function() {
return!!this._channel;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "element", {get:function() {
return this._element;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "currentTime", {get:function() {
return this._element.currentTime;
}, enumerable:!0, configurable:!0});
a.prototype.playFrom = function(a) {
var e = this._element;
e.paused ? (e.play(), e.addEventListener("playing", function b(c) {
e.removeEventListener("playing", b);
e.currentTime = a;
})) : e.currentTime = a;
};
Object.defineProperty(a.prototype, "paused", {get:function() {
return this._element.paused;
}, set:function(a) {
var e = this._element;
a ? e.paused || e.pause() : e.paused && e.play();
}, enumerable:!0, configurable:!0});
a.prototype.createChannel = function() {
this._channel = h.media.SoundChannel.initializeFrom({element:this._element});
};
a.prototype.queueData = function(a) {
c.Debug.abstractMethod("HTMLAudioElementAdapter::queueData");
};
a.prototype.finish = function() {
c.Debug.abstractMethod("HTMLAudioElementAdapter::finish");
};
return a;
}(), e = function(a) {
function e(c) {
a.call(this, c);
this._mediaSource = new MediaSource;
this._sourceBuffer = null;
this._updating = !1;
this._loading = !0;
this._rawFrames = [];
this._isReady = !1;
this._mediaSource.addEventListener("sourceopen", this._openMediaSource.bind(this));
this.element.src = URL.createObjectURL(this._mediaSource);
}
__extends(e, a);
e.prototype._appendSoundData = function() {
0 !== this._rawFrames.length && !this._updating && this._sourceBuffer && (this._loading ? (this._updating = !0, this._sourceBuffer.appendBuffer(this._rawFrames.shift()), this._isReady || (this._isReady = !0, this.createChannel())) : this._mediaSource.endOfStream());
};
e.prototype._openMediaSource = function() {
var a = this._mediaSource.addSourceBuffer("audio/mpeg");
a.addEventListener("update", function() {
this._updating = !1;
this._appendSoundData();
}.bind(this));
this._sourceBuffer = a;
this._appendSoundData();
};
e.prototype.queueData = function(a) {
this._rawFrames.push(a.data);
this._appendSoundData();
};
e.prototype.finish = function() {
this._loading = !1;
this._appendSoundData();
};
return e;
}(l), m = function(a) {
function e(c) {
a.call(this, c);
this._rawFrames = [];
}
__extends(e, a);
e.prototype.queueData = function(a) {
this._rawFrames.push(a.data);
};
e.prototype.finish = function() {
this.element.src = URL.createObjectURL(new Blob(this._rawFrames));
this.createChannel();
};
return e;
}(l), t = function() {
function a(e) {
this._sound = this._channel = null;
this._data = e;
this._position = 0;
}
Object.defineProperty(a.prototype, "currentTime", {get:function() {
return NaN;
}, enumerable:!0, configurable:!0});
a.prototype.playFrom = function(a) {
};
Object.defineProperty(a.prototype, "paused", {get:function() {
return!1;
}, set:function(a) {
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "isReady", {get:function() {
return!!this._channel;
}, enumerable:!0, configurable:!0});
a.prototype.queueData = function(a) {
this._data.pcm.set(a.pcm, this._position);
this._position += a.pcm.length;
};
a.prototype.finish = function() {
var a = h.media.Sound.initializeFrom(this._data), e = a.play();
this._sound = a;
this._channel = e;
};
return a;
}(), q = function(a) {
function e(c) {
a.call(this, c);
this._decoderPosition = 0;
this._decoderSession = new u;
this._decoderSession.onframedata = function(a) {
var b = this._decoderPosition;
c.pcm.set(a, b);
this._decoderPosition = b + a.length;
}.bind(this);
this._decoderSession.onclosed = function() {
t.prototype.finish.call(this);
}.bind(this);
this._decoderSession.onerror = function(a) {
console.warn("MP3DecoderSession error: " + a);
};
}
__extends(e, a);
e.prototype.queueData = function(a) {
this._decoderSession.pushAsync(a.data);
};
e.prototype.finish = function() {
this._decoderSession.close();
};
return e;
}(t), l = function() {
function c(k, f) {
this.movieClip = f;
this.decode = k.decode;
this.data = {sampleRate:k.sampleRate, channels:k.channels};
this.seekIndex = [];
this.position = 0;
this.wasFullyLoaded = !1;
this.waitFor = this.expectedFrame = 0;
var d = "mp3" === k.format;
if (d && !a.webAudioMP3Option.value) {
var b = document.createElement("audio");
b.preload = "metadata";
b.loop = !1;
p(b, f);
if (b.canPlayType("audio/mpeg")) {
this.element = b;
a.mediaSourceMP3Option.value ? "undefined" !== typeof MediaSource && MediaSource.isTypeSupported("audio/mpeg") ? this.soundStreamAdapter = new e(b) : (console.warn("MediaSource is not supported"), this.soundStreamAdapter = new m(b)) : this.soundStreamAdapter = new m(b);
return;
}
}
this.data.pcm = new Float32Array((k.samplesCount + 1) * this.movieClip.totalFrames * k.channels);
this.soundStreamAdapter = d ? new q(this.data) : new t(this.data);
}
c.prototype.appendBlock = function(a, e) {
var d = this.decode(e), b = this.position;
this.seekIndex[a] = b + d.seek * this.data.channels;
this.position = b + d.samplesCount * this.data.channels;
this.soundStreamAdapter.queueData(d);
};
c.prototype.playFrame = function(a) {
if (!isNaN(this.seekIndex[a]) && (!this.wasFullyLoaded && this.movieClip._isFullyLoaded && (this.wasFullyLoaded = !0, this.soundStreamAdapter.finish()), this.soundStreamAdapter.isReady && !isNaN(this.soundStreamAdapter.currentTime))) {
var e = this.data, e = this.seekIndex[a] / e.sampleRate / e.channels, d = this.soundStreamAdapter.currentTime;
this.expectedFrame !== a ? this.soundStreamAdapter.playFrom(e) : 0 < this.waitFor ? this.waitFor <= e && (this.soundStreamAdapter.paused = !1, this.waitFor = 0) : 1 < d - e ? (console.warn("Sound is faster than frames by " + (d - e)), this.waitFor = d - .25, this.soundStreamAdapter.paused = !0) : 1 < e - d && (console.warn("Sound is slower than frames by " + (e - d)), this.soundStreamAdapter.playFrom(e + .25));
this.expectedFrame = a + 1;
}
};
return c;
}();
v.MovieClipSoundStream = l;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.Debug.somewhatImplemented, e = c.AVM2.Runtime.asCoerceString, m = c.AVM2.Runtime.throwError, t = function(c) {
function n() {
v.DisplayObjectContainer.instanceConstructorNoInitialize.call(this);
this._root = this;
this._stage = this;
this._frameRate = 24;
this._scaleMode = v.StageScaleMode.SHOW_ALL;
this._align = "";
this._stageHeight = this._stageWidth = 0;
this._showDefaultContextMenu = !0;
this._focus = null;
this._colorCorrection = v.ColorCorrection.DEFAULT;
this._colorCorrectionSupport = v.ColorCorrectionSupport.DEFAULT_OFF;
this._stageFocusRect = !0;
this._quality = v.StageQuality.HIGH;
this._fullScreenSourceRect = this._displayState = null;
this._mouseLock = !1;
this._stageVideos = new a.GenericVector(0, !0, a.ASObject);
this._stage3Ds = null;
this._colorARGB = 4294967295;
this._fullScreenHeight = this._fullScreenWidth = 0;
this._wmodeGPU = !1;
this._softKeyboardRect = new s.geom.Rectangle;
this._allowsFullScreenInteractive = this._allowsFullScreen = !1;
this._contentsScaleFactor = 1;
this._displayContextInfo = null;
this._stageContainerHeight = this._stageContainerWidth = this._timeout = -1;
this._invalidated = !1;
}
__extends(n, c);
n.prototype.setRoot = function(a) {
this.addTimelineObjectAtDepth(a, 0);
};
Object.defineProperty(n.prototype, "frameRate", {get:function() {
return this._frameRate;
}, set:function(a) {
this._frameRate = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "scaleMode", {get:function() {
return this._scaleMode;
}, set:function(a) {
a = e(a);
0 > s.display.StageScaleMode.toNumber(a) && m("ArgumentError", h.Errors.InvalidEnumError, "scaleMode");
this._scaleMode = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "align", {get:function() {
return this._align;
}, set:function(a) {
a = e(a);
a = s.display.StageAlign.toNumber(a);
u(0 <= a);
this._align = s.display.StageAlign.fromNumber(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "stageWidth", {get:function() {
if (this.scaleMode !== v.StageScaleMode.NO_SCALE) {
return this._stageWidth / 20 | 0;
}
u(0 <= this._stageContainerWidth);
return this._stageContainerWidth;
}, set:function(a) {
}, enumerable:!0, configurable:!0});
n.prototype._setInitialName = function() {
this._name = null;
};
n.prototype.setStageWidth = function(a) {
u((a | 0) === a);
this._stageWidth = 20 * a | 0;
};
Object.defineProperty(n.prototype, "stageHeight", {get:function() {
if (this.scaleMode !== v.StageScaleMode.NO_SCALE) {
return this._stageHeight / 20 | 0;
}
u(0 <= this._stageContainerHeight);
return this._stageContainerHeight;
}, set:function(a) {
}, enumerable:!0, configurable:!0});
n.prototype.setStageHeight = function(a) {
u((a | 0) === a);
this._stageHeight = 20 * a | 0;
};
n.prototype.setStageColor = function(a) {
this._colorARGB = a;
};
n.prototype.setStageContainerSize = function(a, e, d) {
this._contentsScaleFactor = d;
if (this._stageContainerWidth !== a || this._stageContainerHeight !== e) {
this._stageContainerWidth = a, this._stageContainerHeight = e, this.scaleMode === v.StageScaleMode.NO_SCALE && this.dispatchEvent(s.events.Event.getInstance(s.events.Event.RESIZE));
}
};
Object.defineProperty(n.prototype, "showDefaultContextMenu", {get:function() {
return this._showDefaultContextMenu;
}, set:function(a) {
this._showDefaultContextMenu = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "focus", {get:function() {
return this._focus;
}, set:function(a) {
this._focus = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "colorCorrection", {get:function() {
return this._colorCorrection;
}, set:function(a) {
p("public flash.display.Stage::set colorCorrection");
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "colorCorrectionSupport", {get:function() {
return this._colorCorrectionSupport;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "stageFocusRect", {get:function() {
return this._stageFocusRect;
}, set:function(a) {
this._stageFocusRect = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "quality", {get:function() {
return this._quality.toUpperCase();
}, set:function(a) {
a = (e(a) || "").toLowerCase();
0 > s.display.StageQuality.toNumber(a) && (a = s.display.StageQuality.HIGH);
this._quality = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "displayState", {get:function() {
return this._displayState;
}, set:function(a) {
a = e(a);
0 > s.display.StageDisplayState.toNumber(a) && (a = s.display.StageDisplayState.NORMAL);
this._displayState = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "fullScreenSourceRect", {get:function() {
return this._fullScreenSourceRect;
}, set:function(a) {
p("public flash.display.Stage::set fullScreenSourceRect");
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "mouseLock", {get:function() {
return this._mouseLock;
}, set:function(a) {
l("public flash.display.Stage::set mouseLock");
this._mouseLock = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "stageVideos", {get:function() {
l("public flash.display.Stage::get stageVideos");
return this._stageVideos;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "stage3Ds", {get:function() {
p("public flash.display.Stage::get stage3Ds");
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "color", {get:function() {
return this._colorARGB;
}, set:function(a) {
this._colorARGB = a | 4278190080;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "alpha", {get:function() {
return this._colorTransform.alphaMultiplier;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "fullScreenWidth", {get:function() {
return this._fullScreenWidth;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "fullScreenHeight", {get:function() {
return this._fullScreenHeight;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "wmodeGPU", {get:function() {
return this._wmodeGPU;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "softKeyboardRect", {get:function() {
return this._softKeyboardRect;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "allowsFullScreen", {get:function() {
return this._allowsFullScreen;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "allowsFullScreenInteractive", {get:function() {
return this._allowsFullScreenInteractive;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "contentsScaleFactor", {get:function() {
return this._contentsScaleFactor;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "displayContextInfo", {get:function() {
return this._displayContextInfo;
}, enumerable:!0, configurable:!0});
n.prototype.removeChildAt = function(a) {
return c.prototype.removeChildAt.call(this, a);
};
n.prototype.swapChildrenAt = function(a, e) {
c.prototype.swapChildrenAt.call(this, a, e);
};
Object.defineProperty(n.prototype, "width", {get:function() {
return this._getWidth();
}, set:function(a) {
this._setWidth(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "height", {get:function() {
return this._getHeight();
}, set:function(a) {
this._setHeight(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "mouseChildren", {get:function() {
return this._mouseChildren;
}, set:function(a) {
this._setMouseChildren(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "numChildren", {get:function() {
return this._children.length;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "tabChildren", {get:function() {
return this._tabChildren;
}, set:function(a) {
this._setTabChildren(a);
}, enumerable:!0, configurable:!0});
n.prototype.addChild = function(a) {
return c.prototype.addChild.call(this, a);
};
n.prototype.addChildAt = function(a, e) {
return c.prototype.addChildAt.call(this, a, e);
};
n.prototype.setChildIndex = function(a, e) {
c.prototype.setChildIndex.call(this, a, e);
};
n.prototype.addEventListener = function(a, e, d, b, g) {
c.prototype.addEventListener.call(this, a, e, d, b, g);
};
n.prototype.hasEventListener = function(a) {
return c.prototype.hasEventListener.call(this, a);
};
n.prototype.willTrigger = function(a) {
return c.prototype.willTrigger.call(this, a);
};
n.prototype.dispatchEvent = function(a) {
return c.prototype.dispatchEvent.call(this, a);
};
n.prototype.invalidate = function() {
this._invalidated = !0;
};
n.prototype.isFocusInaccessible = function() {
p("public flash.display.Stage::isFocusInaccessible");
};
n.prototype.requireOwnerPermissions = function() {
};
n.prototype.render = function() {
this._invalidated && (v.DisplayObject._broadcastFrameEvent(s.events.Event.RENDER), this._invalidated = !1);
};
Object.defineProperty(n.prototype, "name", {get:function() {
return this._name;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "mask", {get:function() {
return this._mask;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "visible", {get:function() {
return this._hasFlags(1);
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "x", {get:function() {
return this._getX();
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "y", {get:function() {
return this._getY();
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "z", {get:function() {
return this._z;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "scaleX", {get:function() {
return Math.abs(this._scaleX);
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "scaleY", {get:function() {
return this._scaleY;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "scaleZ", {get:function() {
return this._scaleZ;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "rotation", {get:function() {
return this._rotation;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "rotationX", {get:function() {
return this._rotationX;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "rotationY", {get:function() {
return this._rotationX;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "rotationZ", {get:function() {
return this._rotationX;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "cacheAsBitmap", {get:function() {
return this._getCacheAsBitmap();
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "opaqueBackground", {get:function() {
return this._opaqueBackground;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "scrollRect", {get:function() {
return this._getScrollRect();
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "filters", {get:function() {
return this._getFilters();
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "blendMode", {get:function() {
return this._blendMode;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "transform", {get:function() {
return this._getTransform();
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "accessibilityProperties", {get:function() {
return this._accessibilityProperties;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "scale9Grid", {get:function() {
return this._getScale9Grid();
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "tabEnabled", {get:function() {
return this._tabEnabled;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "tabIndex", {get:function() {
return this._tabIndex;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "focusRect", {get:function() {
return this._focusRect;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "mouseEnabled", {get:function() {
return this._mouseEnabled;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "accessibilityImplementation", {get:function() {
return this._accessibilityImplementation;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "textSnapshot", {get:function() {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
return null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "contextMenu", {get:function() {
return this._contextMenu;
}, set:function(a) {
m("IllegalOperationError", h.Errors.InvalidStageMethodError);
}, enumerable:!0, configurable:!0});
n.classInitializer = null;
n.classSymbols = null;
n.instanceSymbols = null;
n.initializer = null;
return n;
}(s.display.DisplayObjectContainer);
v.Stage = t;
})(s.display || (s.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.ActionScriptVersion");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.ACTIONSCRIPT2 = 2;
e.ACTIONSCRIPT3 = 3;
return e;
}(a.ASNative);
h.ActionScriptVersion = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.BlendMode");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
;
case 1:
return e.NORMAL;
case 2:
return e.LAYER;
case 3:
return e.MULTIPLY;
case 4:
return e.SCREEN;
case 5:
return e.LIGHTEN;
case 6:
return e.DARKEN;
case 7:
return e.DIFFERENCE;
case 8:
return e.ADD;
case 9:
return e.SUBTRACT;
case 10:
return e.INVERT;
case 11:
return e.ALPHA;
case 12:
return e.ERASE;
case 13:
return e.OVERLAY;
case 14:
return e.HARDLIGHT;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.NORMAL:
return 1;
case e.LAYER:
return 2;
case e.MULTIPLY:
return 3;
case e.SCREEN:
return 4;
case e.LIGHTEN:
return 5;
case e.DARKEN:
return 6;
case e.DIFFERENCE:
return 7;
case e.ADD:
return 8;
case e.SUBTRACT:
return 9;
case e.INVERT:
return 10;
case e.ALPHA:
return 11;
case e.ERASE:
return 12;
case e.OVERLAY:
return 13;
case e.HARDLIGHT:
return 14;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.NORMAL = "normal";
e.LAYER = "layer";
e.MULTIPLY = "multiply";
e.SCREEN = "screen";
e.LIGHTEN = "lighten";
e.DARKEN = "darken";
e.ADD = "add";
e.SUBTRACT = "subtract";
e.DIFFERENCE = "difference";
e.INVERT = "invert";
e.OVERLAY = "overlay";
e.HARDLIGHT = "hardlight";
e.ALPHA = "alpha";
e.ERASE = "erase";
e.SHADER = "shader";
return e;
}(a.ASNative);
h.BlendMode = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.ColorCorrection");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.DEFAULT;
case 1:
return e.ON;
case 2:
return e.OFF;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.DEFAULT:
return 0;
case e.ON:
return 1;
case e.OFF:
return 2;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.DEFAULT = "default";
e.ON = "on";
e.OFF = "off";
return e;
}(a.ASNative);
h.ColorCorrection = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.ColorCorrectionSupport");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.UNSUPPORTED;
case 1:
return e.DEFAULT_ON;
case 2:
return e.DEFAULT_OFF;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.UNSUPPORTED:
return 0;
case e.DEFAULT_ON:
return 1;
case e.DEFAULT_OFF:
return 2;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.UNSUPPORTED = "unsupported";
e.DEFAULT_ON = "defaultOn";
e.DEFAULT_OFF = "defaultOff";
return e;
}(a.ASNative);
h.ColorCorrectionSupport = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.FocusDirection");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.TOP = "top";
e.BOTTOM = "bottom";
e.NONE = "none";
return e;
}(a.ASNative);
h.FocusDirection = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.AVM2.Runtime.asCoerceString, u = function(a) {
function e(a, e) {
this._name = p(a);
this._frame = e | 0;
}
__extends(e, a);
Object.defineProperty(e.prototype, "name", {get:function() {
return this._name;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "frame", {get:function() {
return this._frame;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
return new e(this._name, this._frame);
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.events.EventDispatcher);
h.FrameLabel = u;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.Debug.somewhatImplemented, e = c.ArrayUtilities.DataBuffer, m = c.AVM2.Runtime.asCoerceString, t = c.AVM2.Runtime.throwError, q = c.AVM2.Runtime.AVM2, n = c.IntegerUtilities.swap32, k = c.ColorUtilities.premultiplyARGB, f = c.ColorUtilities.unpremultiplyARGB, d = c.ColorUtilities.RGBAToARGB, b = c.ArrayUtilities.indexOf, g = h.geom.Rectangle, r = function(r) {
function v(a, b, d, e) {
void 0 === d && (d = !0);
void 0 === e && (e = 4294967295);
a |= 0;
b |= 0;
d = !!d;
e |= 0;
var c = this._symbol;
c && (a = c.width | 0, b = c.height | 0);
(a > v.MAXIMUM_WIDTH || 0 >= a || b > v.MAXIMUM_HEIGHT || 0 >= b || a * b > v.MAXIMUM_DIMENSION) && t("ArgumentError", q.Errors.InvalidBitmapData);
this._rect = new g(0, 0, a, b);
this._transparent = d;
c ? (u(c.syncId), this._id = c.syncId, 1 === c.type || 2 === c.type || 3 === c.type ? (u(c.data), this._setData(c.data, c.type)) : (this._isDirty = !1, this._isRemoteDirty = !0), this._solidFillColorPBGRA = null) : (this._id = h.display.DisplayObject.getNextSyncID(), this._setData(new Uint8Array(a * b * 4), 1), 0 === e >> 24 && d ? this._solidFillColorPBGRA = 0 : this.fillRect(this._rect, e));
this._bitmapReferrers = [];
u(this._isDirty === !!this._data);
u(this._isRemoteDirty === !this._data);
}
__extends(v, r);
v.prototype._setData = function(a, b) {
a instanceof Uint8ClampedArray && (a = new Uint8Array(a.buffer));
u(a instanceof Uint8Array);
this._data = a;
this._type = b;
this._view = new Int32Array(a.buffer);
this._dataBuffer = e.FromArrayBuffer(a.buffer);
this._isDirty = !0;
this._isRemoteDirty = !1;
};
v.prototype._addBitmapReferrer = function(a) {
var d = b(this._bitmapReferrers, a);
u(0 > d);
this._bitmapReferrers.push(a);
};
v.prototype._removeBitmapReferrer = function(a) {
a = b(this._bitmapReferrers, a);
u(0 <= a);
this._bitmapReferrers[a] = null;
};
v.prototype._invalidate = function() {
if (!this._isDirty) {
this._isDirty = !0;
this._isRemoteDirty = !1;
for (var a = 0;a < this._bitmapReferrers.length;a++) {
var b = this._bitmapReferrers[a];
b && b._setDirtyFlags(16777216);
}
}
};
v.prototype._getTemporaryRectangleFrom = function(a, b) {
void 0 === b && (b = 0);
u(0 <= b && b < v._temporaryRectangles.length);
var d = v._temporaryRectangles[b];
a && d.copyFrom(a);
return d;
};
v.prototype.getDataBuffer = function() {
return this._dataBuffer;
};
v.prototype._getContentBounds = function() {
return c.Bounds.FromRectangle(this._rect);
};
v.prototype._getPixelData = function(a) {
var b = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a);
if (!b.isEmpty()) {
a = b.x;
for (var d = b.x + b.width, e = b.y, c = b.y + b.height, g = this._view, f = this._rect.width, b = new Int32Array(b.area), k = 0;e < c;e++) {
for (var m = e * f, l = a;l < d;l++) {
var h = g[m + l], r = h & 255, h = 255 * (h >>> 8) / r << 8 | r;
b[k++] = h;
}
}
return b;
}
};
v.prototype._putPixelData = function(a, b) {
var d = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a);
if (!d.isEmpty()) {
for (var e = d.x, c = d.x + d.width, g = d.y + d.height, f = this._view, k = this._rect.width, m = a.width * a.height - d.height + (e - a.x), l = a.width - d.width, h = this._transparent ? 0 : 255, d = d.y;d < g;d++) {
for (var r = d * k, n = e;n < c;n++) {
var q = b[m++], w = q & h;
f[r + n] = (((q >>> 8) * w + 254) / 255 & 16777215) << 8 | w;
}
m += l;
}
this._invalidate();
}
};
Object.defineProperty(v.prototype, "width", {get:function() {
return this._rect.width;
}, enumerable:!0, configurable:!0});
Object.defineProperty(v.prototype, "height", {get:function() {
return this._rect.height;
}, enumerable:!0, configurable:!0});
Object.defineProperty(v.prototype, "rect", {get:function() {
return this._rect.clone();
}, enumerable:!0, configurable:!0});
Object.defineProperty(v.prototype, "transparent", {get:function() {
return this._transparent;
}, enumerable:!0, configurable:!0});
v.prototype.clone = function() {
l("public flash.display.BitmapData::clone");
var a = new v(this._rect.width, this._rect.height, this._transparent, this._solidFillColorPBGRA);
a._view.set(this._view);
return a;
};
v.prototype.getPixel = function(a, b) {
return this.getPixel32(a | 0, b | 0) & 16777215;
};
v.prototype.getPixel32 = function(a, b) {
a |= 0;
b |= 0;
if (!this._rect.contains(a, b)) {
return 0;
}
this._ensureBitmapData();
var e = this._view[b * this._rect.width + a];
switch(this._type) {
case 1:
return e = n(e), f(e) >>> 0;
case 3:
return d(n(e));
default:
return c.Debug.notImplemented(c.ImageType[this._type]), 0;
}
};
v.prototype.setPixel = function(a, b, d) {
a |= 0;
b |= 0;
d |= 0;
this._rect.contains(a, b) && (this._ensureBitmapData(), a = b * this._rect.width + a, d = d & 16777215 | (this._view[a] & 255) << 24, d = k(d), this._view[a] = n(d), this._invalidate(), this._solidFillColorPBGRA = null);
};
v.prototype.setPixel32 = function(a, b, d) {
a |= 0;
b |= 0;
if (this._rect.contains(a, b)) {
this._ensureBitmapData();
var e = d >>> 24;
d &= 16777215;
e = this._transparent ? k(d | e << 24) : d | 4278190080;
this._view[b * this._rect.width + a] = n(e);
this._invalidate();
this._solidFillColorPBGRA = null;
}
};
v.prototype.applyFilter = function(a, b, d, e) {
l("public flash.display.BitmapData::applyFilter " + e);
};
v.prototype.colorTransform = function(a, b) {
l("public flash.display.BitmapData::colorTransform");
};
v.prototype.compare = function(a) {
p("public flash.display.BitmapData::compare");
};
v.prototype.copyChannel = function(a, b, d, e, c) {
p("public flash.display.BitmapData::copyChannel");
};
v.prototype.copyPixels = function(a, b, d, e, c, g) {
void 0 === e && (e = null);
void 0 === c && (c = null);
void 0 === g && (g = !1);
g = !!g;
if (e || c) {
p("public flash.display.BitmapData::copyPixels - Alpha");
} else {
var f = this._getTemporaryRectangleFrom(b, 0).roundInPlace();
b = this._rect;
c = a._rect;
var k = Math.max(f.x, 0);
e = Math.max(f.y, 0);
var m = Math.min(f.x + f.width, c.width), h = Math.min(f.y + f.height, c.height);
c = d.x | 0 + (k - f.x);
f = d.y | 0 + (e - f.y);
0 > c && (k -= c, c = 0);
0 > f && (e -= f, f = 0);
d = Math.min(m - k, b.width - c);
b = Math.min(h - e, b.height - f);
if (!(0 >= d || 0 >= b)) {
var m = k, h = e, r = c, n = f;
e = a._rect.width;
c = this._rect.width;
this._ensureBitmapData();
a._ensureBitmapData();
k = a._view;
f = this._view;
a._type !== this._type && l("public flash.display.BitmapData::copyPixels - Color Format Conversion");
if (g && 1 !== this._type) {
p("public flash.display.BitmapData::copyPixels - Merge Alpha");
} else {
if (null === this._solidFillColorPBGRA || this._solidFillColorPBGRA !== a._solidFillColorPBGRA) {
null !== a._solidFillColorPBGRA && 255 === (a._solidFillColorPBGRA & 255) && (g = !1);
if (g) {
this._copyPixelsAndMergeAlpha(k, m, h, e, f, r, n, c, d, b);
} else {
if (a = h * e + m | 0, g = n * c + r | 0, 0 === (d & 3)) {
for (m = 0;m < b;m = m + 1 | 0) {
for (h = 0;h < d;h = h + 4 | 0) {
f[g + h + 0 | 0] = k[a + h + 0 | 0], f[g + h + 1 | 0] = k[a + h + 1 | 0], f[g + h + 2 | 0] = k[a + h + 2 | 0], f[g + h + 3 | 0] = k[a + h + 3 | 0];
}
a = a + e | 0;
g = g + c | 0;
}
} else {
for (m = 0;m < b;m = m + 1 | 0) {
for (h = 0;h < d;h = h + 1 | 0) {
f[g + h | 0] = k[a + h | 0];
}
a = a + e | 0;
g = g + c | 0;
}
}
}
this._solidFillColorPBGRA = null;
this._invalidate();
}
}
}
}
};
v.prototype._copyPixelsAndMergeAlpha = function(a, b, d, e, c, g, f, k, m, l) {
b = d * e + b | 0;
g = f * k + g | 0;
for (f = 0;f < l;f = f + 1 | 0) {
for (d = 0;d < m;d = d + 1 | 0) {
var h = a[b + d | 0], r = h & 255;
if (255 === r) {
c[g + d | 0] = h;
} else {
if (0 !== r) {
var n = h & 16711935, h = h >> 8 & 16711935, q = c[g + d | 0], w = q & 16711935, q = q >> 8 & 16711935, r = 256 - r, w = Math.imul(w, r) >> 8, q = Math.imul(q, r) >> 8;
c[g + d | 0] = (h + q & 16711935) << 8 | n + w & 16711935;
}
}
}
b = b + e | 0;
g = g + k | 0;
}
};
v.prototype.dispose = function() {
this._rect.setEmpty();
this._view = null;
this._invalidate();
};
v.prototype.draw = function(a, b, d, e, c, g) {
void 0 === b && (b = null);
void 0 === d && (d = null);
void 0 === e && (e = null);
void 0 === c && (c = null);
void 0 === g && (g = !1);
l("public flash.display.BitmapData::draw");
var f = q.instance.globals["Shumway.Player.Utils"];
b && (b = b.clone().toTwipsInPlace());
f.drawToBitmap(this, a, b, d, e, c, g);
this._isRemoteDirty = !0;
};
v.prototype.drawWithQuality = function(a, b, d, e, c, g, f) {
void 0 === e && (e = null);
void 0 === f && (f = null);
m(e);
m(f);
p("public flash.display.BitmapData::drawWithQuality");
};
v.prototype.fillRect = function(a, b) {
this._ensureBitmapData();
u(1 === this._type);
var d = this._transparent ? k(b) : b | 4278190080, d = n(d), e = this._getTemporaryRectangleFrom(this._rect).intersectInPlace(a);
if (!e.isEmpty() && this._solidFillColorPBGRA !== d) {
var c = this._view;
if (e.equals(this._rect)) {
var g = c.length | 0;
if (0 === (g & 3)) {
for (var f = 0;f < g;f += 4) {
c[f] = d, c[f + 1] = d, c[f + 2] = d, c[f + 3] = d;
}
} else {
for (f = 0;f < g;f++) {
c[f] = d;
}
}
this._solidFillColorPBGRA = d;
} else {
for (var g = e.x | 0, f = e.x + e.width | 0, m = e.y + e.height | 0, l = this._rect.width | 0, e = e.y | 0;e < m;e++) {
for (var h = e * l | 0, r = g;r < f;r++) {
c[h + r] = d;
}
}
this._solidFillColorPBGRA = null;
}
this._invalidate();
}
};
v.prototype.floodFill = function(a, b, d) {
p("public flash.display.BitmapData::floodFill");
};
v.prototype.generateFilterRect = function(a, b) {
p("public flash.display.BitmapData::generateFilterRect");
};
v.prototype.getColorBoundsRect = function(a, b, d) {
p("public flash.display.BitmapData::getColorBoundsRect");
};
v.prototype.getPixels = function(a) {
var b = new h.utils.ByteArray;
this.copyPixelsToByteArray(a, b);
return b;
};
v.prototype.copyPixelsToByteArray = function(a, b) {
var d = this._getPixelData(a);
d && b.writeRawBytes(new Uint8Array(d));
};
v.prototype.getVector = function(b) {
var d = new a.Uint32Vector(e.length), e = this._getPixelData(b);
if (!e) {
return d;
}
d.length = e.length;
d._view().set(e);
return d;
};
v.prototype.hitTest = function(a, b, d, e, c) {
p("public flash.display.BitmapData::hitTest");
};
v.prototype.merge = function(a, b, d, e, c, g, f) {
l("public flash.display.BitmapData::merge");
};
v.prototype.noise = function(a, b, d, e, c) {
l("public flash.display.BitmapData::noise");
};
v.prototype.paletteMap = function(a, b, d, e, c, g, f) {
l("public flash.display.BitmapData::paletteMap");
};
v.prototype.perlinNoise = function(a, b, d, e, c, g, f, k, m) {
l("public flash.display.BitmapData::perlinNoise");
};
v.prototype.pixelDissolve = function(a, b, d, e, c, g) {
p("public flash.display.BitmapData::pixelDissolve");
};
v.prototype.scroll = function(a, b) {
p("public flash.display.BitmapData::scroll");
};
v.prototype.setPixels = function(a, b) {
this._putPixelData(a, new Int32Array(b.readRawBytes()));
};
v.prototype.setVector = function(a, b) {
this._putPixelData(a, b._view());
};
v.prototype.threshold = function(a, b, d, e, c, g, f, k) {
m(e);
p("public flash.display.BitmapData::threshold");
};
v.prototype.lock = function() {
this._locked = !0;
};
v.prototype.unlock = function(a) {
this._locked = !1;
};
v.prototype.histogram = function(a) {
p("public flash.display.BitmapData::histogram");
};
v.prototype.encode = function(a, b, d) {
p("public flash.display.BitmapData::encode");
};
v.prototype._ensureBitmapData = function() {
if (this._isRemoteDirty) {
var a = c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].requestBitmapData(this);
this._setData(a.getBytes(), 3);
this._isDirty = this._isRemoteDirty = !1;
this._solidFillColorPBGRA = null;
}
u(!(4 === this._type || 5 === this._type || 6 === this._type));
1 !== this._type && (c.ColorUtilities.convertImage(this._type, 1, this._view, this._view), this._type = 1, this._solidFillColorPBGRA = null);
u(this._data);
u(this._dataBuffer);
u(this._view);
};
v.classInitializer = function() {
};
v.initializer = function(a) {
this._symbol = a;
};
v.classSymbols = null;
v.instanceSymbols = null;
v.MAXIMUM_WIDTH = 8191;
v.MAXIMUM_HEIGHT = 8191;
v.MAXIMUM_DIMENSION = 16777215;
v._temporaryRectangles = [new h.geom.Rectangle, new h.geom.Rectangle, new h.geom.Rectangle];
return v;
}(a.ASNative);
v.BitmapData = r;
r = function(a) {
function b(d) {
a.call(this, d, h.display.BitmapData, !1);
this.ready = !1;
}
__extends(b, a);
b.FromData = function(a) {
var d = new b(a);
d.width = a.width || -1;
d.height = a.height || -1;
d.syncId = h.display.DisplayObject.getNextSyncID();
d.data = a.data;
switch(a.mimeType) {
case "application/octet-stream":
d.type = a.dataType;
d.ready = !0;
break;
case "image/jpeg":
d.type = 4;
break;
case "image/png":
d.type = 5;
break;
case "image/gif":
d.type = 6;
break;
default:
p(a.mimeType);
}
return d;
};
b.prototype.getSharedInstance = function() {
return this.sharedInstance || this.createSharedInstance();
};
b.prototype.createSharedInstance = function() {
u(this.ready);
this.sharedInstance = this.symbolClass.initializeFrom(this);
this.symbolClass.instanceConstructorNoInitialize.call(this.sharedInstance);
return this.sharedInstance;
};
Object.defineProperty(b.prototype, "resolveAssetCallback", {get:function() {
return this._unboundResolveAssetCallback.bind(this);
}, enumerable:!0, configurable:!0});
b.prototype._unboundResolveAssetCallback = function(a) {
u(!this.ready);
this.ready = !0;
a ? (u(a.width), u(a.height), this.width = a.width, this.height = a.height) : c.Debug.error("Error while decoding image");
};
return b;
}(c.Timeline.DisplaySymbol);
v.BitmapSymbol = r;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.BitmapDataChannel");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.RED = 1;
e.GREEN = 2;
e.BLUE = 4;
e.ALPHA = 8;
return e;
}(a.ASNative);
h.BitmapDataChannel = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.BitmapEncodingColorSpace");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.COLORSPACE_AUTO = "auto";
e.COLORSPACE_4_4_4 = "4:4:4";
e.COLORSPACE_4_2_2 = "4:2:2";
e.COLORSPACE_4_2_0 = "4:2:0";
return e;
}(a.ASNative);
h.BitmapEncodingColorSpace = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e(a) {
s("public flash.display.JPEGEncoderOptions");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.JPEGEncoderOptions = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
var p = c.Debug.assert, u = c.AVM2.Runtime.throwError, l = h.display.ActionScriptVersion, e = c.AVM2.Runtime.AVM2, m = h.events, t = c.FileLoader, q = c.AVM2.ABC.AbcFile, n = c.SWF.SWFFile, k;
(function(a) {
a[a.Unloaded = 0] = "Unloaded";
a[a.Opened = 1] = "Opened";
a[a.Initialized = 2] = "Initialized";
a[a.Complete = 3] = "Complete";
})(k || (k = {}));
var f;
(function(a) {
a[a.External = 0] = "External";
a[a.Bytes = 1] = "Bytes";
})(f || (f = {}));
k = function(d) {
function b() {
v.DisplayObjectContainer.instanceConstructorNoInitialize.call(this);
this._content = null;
b._rootLoader && (this._contentID = v.DisplayObject._instanceID++);
this._contentLoaderInfo = new v.LoaderInfo(v.LoaderInfo.CtorToken);
this._contentLoaderInfo._loader = this;
this._fileLoader = null;
this._loadStatus = 0;
}
__extends(b, d);
b.getRootLoader = function() {
if (b._rootLoader) {
return b._rootLoader;
}
var a = new h.display.Loader;
h.display.DisplayObject._instanceID--;
a._contentLoaderInfo._loader = null;
return b._rootLoader = a;
};
b.reset = function() {
b._loadQueue.forEach(function(a) {
return a.unload();
});
b.classInitializer();
};
b.processEvents = function() {
b.processEarlyEvents();
b.processLateEvents();
};
b.processEarlyEvents = function() {
for (var a = b._loadQueue, d = 0;d < a.length;d++) {
var e = a[d];
p(3 !== e._loadStatus);
var f = e._contentLoaderInfo, k = e._imageSymbol;
if (f._file instanceof c.ImageFile) {
if (!k || !k.ready || e._queuedLoadUpdate) {
continue;
}
p(f.bytesLoaded === f.bytesTotal);
e._applyDecodedImage(k);
p(e._content);
}
1 === e._loadStatus && e._content && (f.dispatchEvent(m.Event.getInstance(m.Event.INIT)), e._loadStatus = 2, e === b._rootLoader && f.dispatchEvent(new m.ProgressEvent(m.ProgressEvent.PROGRESS, !1, !1, f.bytesLoaded, f.bytesTotal)));
2 === e._loadStatus && f.bytesLoaded === f.bytesTotal && (a.splice(d--, 1), p(-1 === a.indexOf(e)), e._loadStatus = 3, f.dispatchEvent(m.Event.getInstance(m.Event.COMPLETE)));
}
};
b.processLateEvents = function() {
for (var a = b._loadQueue, d = 0;d < a.length;d++) {
var e = a[d];
p(3 !== e._loadStatus);
var c = e._contentLoaderInfo, f = e._queuedLoadUpdate, k = c._bytesTotal;
if (f && k || 1 === e._loadStatus) {
e._queuedLoadUpdate = null, 0 === e._loadStatus && (0 === e._loadingType && c.dispatchEvent(m.Event.getInstance(m.Event.OPEN)), c.dispatchEvent(new m.ProgressEvent(m.ProgressEvent.PROGRESS, !1, !1, 0, k)), e._loadStatus = 1), f && (e._applyLoadUpdate(f), c.dispatchEvent(new m.ProgressEvent(m.ProgressEvent.PROGRESS, !1, !1, f.bytesLoaded, k)));
}
}
};
b.prototype._setStage = function(a) {
p(this === b.getRootLoader());
this._stage = a;
};
b.prototype._initFrame = function(a) {
};
b.prototype._constructFrame = function() {
this === b.getRootLoader() && this._content ? (v.DisplayObject._advancableInstances.remove(this), this._children[0] = this._content, this._constructChildren(), this._children.length = 0) : this._constructChildren();
};
b.prototype.addChild = function(a) {
u("IllegalOperationError", e.Errors.InvalidLoaderMethodError);
return null;
};
b.prototype.addChildAt = function(a, b) {
u("IllegalOperationError", e.Errors.InvalidLoaderMethodError);
return null;
};
b.prototype.removeChild = function(a) {
u("IllegalOperationError", e.Errors.InvalidLoaderMethodError);
return null;
};
b.prototype.removeChildAt = function(a) {
u("IllegalOperationError", e.Errors.InvalidLoaderMethodError);
return null;
};
b.prototype.setChildIndex = function(a, b) {
u("IllegalOperationError", e.Errors.InvalidLoaderMethodError);
};
b.prototype._describeData = function(a) {
var b = [], d;
for (d in a) {
b.push(d + ":" + c.StringUtilities.toSafeString(a[d]));
}
return "{" + b.join(", ") + "}";
};
Object.defineProperty(b.prototype, "content", {get:function() {
return 0 === this._loadStatus ? null : this._content;
}, enumerable:!0, configurable:!0});
Object.defineProperty(b.prototype, "contentLoaderInfo", {get:function() {
return this._contentLoaderInfo;
}, enumerable:!0, configurable:!0});
b.prototype._getJPEGLoaderContextdeblockingfilter = function(a) {
return h.system.JPEGLoaderContext.isType(a) ? a.deblockingFilter : 0;
};
Object.defineProperty(b.prototype, "uncaughtErrorEvents", {get:function() {
return this._uncaughtErrorEvents;
}, enumerable:!0, configurable:!0});
b.prototype.load = function(d, e) {
this.close();
this._contentLoaderInfo._url = d.url;
this._applyLoaderContext(e);
this._loadingType = 0;
this._fileLoader = new t(this);
a.traceLoaderOption.value && console.log("Loading url " + d.url);
this._fileLoader.loadFile(d._toFileRequest());
this._queuedLoadUpdate = null;
p(-1 === b._loadQueue.indexOf(this));
b._loadQueue.push(this);
};
b.prototype.loadBytes = function(d, e) {
this.close();
this._contentLoaderInfo._url = (this.loaderInfo ? this.loaderInfo._url : "") + "/[[DYNAMIC]]/" + ++b._embeddedContentLoadCount;
this._applyLoaderContext(e);
this._loadingType = 1;
this._fileLoader = new t(this);
this._queuedLoadUpdate = null;
a.traceLoaderOption.value && console.log("Loading embedded symbol " + this._contentLoaderInfo._url);
this._fileLoader.loadBytes(new Uint8Array(d.bytes, 0, d.length));
p(-1 === b._loadQueue.indexOf(this));
b._loadQueue.push(this);
};
b.prototype.close = function() {
var a = b._loadQueue.indexOf(this);
-1 < a && b._loadQueue.splice(a, 1);
this._contentLoaderInfo.reset();
this._fileLoader && (this._fileLoader = null);
};
b.prototype._unload = function(a, b) {
2 > this._loadStatus ? this._loadStatus = 0 : (this.close(), this._content = null, this._contentLoaderInfo._loader = null, this._loadStatus = 0, this.dispatchEvent(m.Event.getInstance(m.Event.UNLOAD)));
};
b.prototype.unload = function() {
this._unload(!1, !1);
};
b.prototype.unloadAndStop = function(a) {
this._unload(!0, !!a);
};
b.prototype._applyLoaderContext = function(a) {
var b = {};
if (a && a.parameters) {
var d = a.parameters, f;
for (f in d) {
var k = d[f];
c.isString(k) || u("IllegalOperationError", e.Errors.ObjectWithStringsParamError, "LoaderContext.parameters");
b[f] = k;
}
}
a && a.applicationDomain && (a = new h.system.ApplicationDomain(h.system.ApplicationDomain.currentDomain), this._contentLoaderInfo._applicationDomain = a);
this._contentLoaderInfo._parameters = b;
};
b.prototype.onLoadOpen = function(a) {
this._contentLoaderInfo.setFile(a);
};
b.prototype.onLoadProgress = function(a) {
p(a);
this._queuedLoadUpdate = a;
};
b.prototype.onNewEagerlyParsedSymbols = function(a, b) {
for (var d = [], e = a.length - b;e < a.length;e++) {
var c = this._contentLoaderInfo.getSymbolById(a[e].id);
c.ready || (p(c.resolveAssetPromise), p(!1 === c.ready), d.push(c.resolveAssetPromise.promise));
}
return Promise.all(d);
};
b.prototype.onImageBytesLoaded = function() {
var a = this._contentLoaderInfo._file;
p(a instanceof c.ImageFile);
var a = {id:-1, data:a.data, mimeType:a.mimeType, dataType:a.type, type:"image"}, b = v.BitmapSymbol.FromData(a);
this._imageSymbol = b;
e.instance.globals["Shumway.Player.Utils"].registerFontOrImage(b, a);
p(b.resolveAssetPromise);
p(!1 === b.ready);
};
b.prototype._applyDecodedImage = function(a) {
a = a.createSharedInstance();
this._content = new h.display.Bitmap(a);
this._contentLoaderInfo._width = 20 * this._content.width;
this._contentLoaderInfo._height = 20 * this._content.height;
this.addTimelineObjectAtDepth(this._content, 0);
};
b.prototype._applyLoadUpdate = function(a) {
var b = this._contentLoaderInfo;
b._bytesLoaded = a.bytesLoaded;
var d = b._file;
if (d instanceof n && 0 !== d.framesLoaded) {
if (b._allowCodeExecution) {
var c = e.instance.applicationDomain, f = d.abcBlocks.length;
if (0 < f - b._abcBlocksLoaded) {
for (a = b._abcBlocksLoaded;a < f;a++) {
var k = d.abcBlocks[a], m = new q(k.data, k.name);
k.flags ? c.loadAbc(m) : c.executeAbc(m);
}
b._abcBlocksLoaded = f;
}
f = d.symbolClassesList.length;
if (0 < f - b._mappedSymbolsLoaded) {
for (a = b._mappedSymbolsLoaded;a < f;a++) {
k = d.symbolClassesList[a], m = c.getClass(k.className), Object.defineProperty(m, "defaultInitializerArgument", {get:b.getSymbolResolver(m, k.id), configurable:!0});
}
b._mappedSymbolsLoaded = f;
}
}
if (inFirefox && (c = d.fonts.length, 0 < c - b._fontsLoaded)) {
for (a = b._fontsLoaded;a < c;a++) {
h.text.Font.registerEmbeddedFont(d.fonts[a], b);
}
b._fontsLoaded = c;
}
c = b.getRootSymbol();
f = d.framesLoaded - c.frames.length;
if (0 !== f) {
for ((a = this._content) || (a = this.createContentRoot(c, d.sceneAndFrameLabelData)), d = a, a = 0;a < f;a++) {
k = b.getFrame(null, c.frames.length), d._addFrame(k);
}
}
}
};
b.prototype.onLoadComplete = function() {
};
b.prototype.onLoadError = function() {
c.Debug.warning("Not implemented: flash.display.Loader loading-error handling");
};
b.prototype.createContentRoot = function(a, d) {
a.isAVM1Object && this._initAvm1(a);
var e = a.symbolClass.initializeFrom(a);
h.display.DisplayObject._instanceID--;
e._name = this === b._rootLoader ? "root1" : "instance" + this._contentID;
if (v.MovieClip.isType(e)) {
var c = e;
if (d) {
for (var f = d.scenes, k = 0, m = f.length;k < m;k++) {
var n = f[k], q = n.offset;
c.addScene(n.name, [], q, (k < m - 1 ? f[k + 1].offset : a.numFrames) - q);
}
f = d.labels;
for (k = 0;k < f.length;k++) {
m = f[k], c.addFrameLabel(m.name, m.frame + 1);
}
} else {
c.addScene("Scene 1", [], 0, a.numFrames);
}
}
c = this._contentLoaderInfo;
e._loaderInfo = c;
k = e;
c.actionScriptVersion === l.ACTIONSCRIPT2 ? e = this._initAvm1Root(e) : this === b.getRootLoader() && (v.MovieClip.frameNavigationModel = 10 > c.swfVersion ? 9 : 10);
this._content = e;
this === b.getRootLoader() ? (b.runtimeStartTime = Date.now(), this._stage.setRoot(e)) : this.addTimelineObjectAtDepth(e, 0);
return k;
};
b.prototype._initAvm1 = function(a) {
var d = this._contentLoaderInfo, e;
this.loaderInfo && this.loaderInfo._avm1Context ? e = d._avm1Context = this.loaderInfo._avm1Context : (c.AVM1.Lib.installObjectMethods(), e = c.AVM1.AVM1Context.create(d), d._avm1Context = e, this === b.getRootLoader() && (e.globals.Key._bind(this._stage, e), e.globals.Mouse._bind(this._stage, e), v.MovieClip.frameNavigationModel = 1));
a.avm1Context = e;
};
b.prototype._initAvm1Root = function(a) {
var b = this._contentLoaderInfo._avm1Context, d = c.AVM1.Lib.getAVM1Object(a, b);
if (this.loaderInfo && this.loaderInfo._avm1Context) {
return d.context = this.loaderInfo._avm1Context, a;
}
b.root = d;
a.addEventListener("frameConstructed", b.flushPendingScripts.bind(b), !1, Number.MAX_VALUE);
a = new h.display.AVM1Movie(a);
var b = this._contentLoaderInfo._parameters, e;
for (e in b) {
e in d || (d[e] = b[e]);
}
return a;
};
b.classInitializer = function() {
b._rootLoader = null;
b._loadQueue = [];
b.runtimeStartTime = 0;
b._embeddedContentLoadCount = 0;
};
b.initializer = function() {
v.DisplayObject._advancableInstances.push(this);
};
b.classSymbols = null;
b.instanceSymbols = null;
return b;
}(h.display.DisplayObjectContainer);
v.Loader = k;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.Debug.assert, u = c.Debug.notImplemented, l = c.Debug.somewhatImplemented, e = c.SWF.SWFFile, m = function(m) {
function q(e) {
e !== q.CtorToken && throwError("ArgumentError", h.Errors.CantInstantiateError, "LoaderInfo$");
a.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
this._loader = null;
this.reset();
}
__extends(q, m);
q.prototype.reset = function() {
this._url = "";
this._file = null;
this._bytesTotal = this._bytesLoaded = 0;
this._parameters = this._applicationDomain = null;
this._height = this._width = 0;
this._uncaughtErrorEvents = this._bytes = this._content = this._childSandboxBridge = this._parentSandboxBridge = this._sharedEvents = null;
this._allowCodeExecution = !0;
this._dictionary = [];
this._fontsLoaded = this._mappedSymbolsLoaded = this._abcBlocksLoaded = 0;
this._avm1Context = null;
};
q.prototype.setFile = function(a) {
p(!this._file);
this._file = a;
this._bytesTotal = a.bytesTotal;
a instanceof e ? (a = a.bounds, this._width = a.xMax - a.xMin, this._height = a.yMax - a.yMin) : p(a instanceof c.ImageFile);
};
q.getLoaderInfoByDefinition = function(a) {
u("public flash.display.LoaderInfo::static getLoaderInfoByDefinition");
};
Object.defineProperty(q.prototype, "loaderURL", {get:function() {
return this._loader.loaderInfo.url;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "url", {get:function() {
return this._file ? this._url : null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "isURLInaccessible", {get:function() {
l("public flash.display.LoaderInfo::get isURLInaccessible");
return this._file ? !1 : !0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "bytesLoaded", {get:function() {
return this._bytesLoaded;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "bytesTotal", {get:function() {
return this._bytesTotal;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "applicationDomain", {get:function() {
l("public flash.display.LoaderInfo::get applicationDomain");
return this._file ? a.system.ApplicationDomain.currentDomain : null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "swfVersion", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
this._file instanceof e || throwError("Error", h.Errors.LoadingObjectNotSWFError);
return this._file.swfVersion;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "actionScriptVersion", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
this._file instanceof e || throwError("Error", h.Errors.LoadingObjectNotSWFError);
return this._file.useAVM1 ? v.ActionScriptVersion.ACTIONSCRIPT2 : v.ActionScriptVersion.ACTIONSCRIPT3;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "frameRate", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
this._file instanceof e || throwError("Error", h.Errors.LoadingObjectNotSWFError);
return this._file.frameRate;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "width", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
return this._width / 20 | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "height", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
return this._height / 20 | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "contentType", {get:function() {
return this._file ? this._file instanceof c.ImageFile ? this._file.mimeType : "application/x-shockwave-flash" : null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "sharedEvents", {get:function() {
l("public flash.display.LoaderInfo::get sharedEvents");
this._sharedEvents || (this._sharedEvents = new a.events.EventDispatcher);
return this._sharedEvents;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "parentSandboxBridge", {get:function() {
l("public flash.display.LoaderInfo::get parentSandboxBridge");
return this._parentSandboxBridge;
}, set:function(a) {
l("public flash.display.LoaderInfo::set parentSandboxBridge");
this._parentSandboxBridge = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "childSandboxBridge", {get:function() {
l("public flash.display.LoaderInfo::get childSandboxBridge");
return this._childSandboxBridge;
}, set:function(a) {
l("public flash.display.LoaderInfo::set childSandboxBridge");
this._childSandboxBridge = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "sameDomain", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
l("public flash.display.LoaderInfo::get sameDomain");
return!0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "childAllowsParent", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
l("public flash.display.LoaderInfo::get childAllowsParent");
return!0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "parentAllowsChild", {get:function() {
this._file || throwError("Error", h.Errors.LoadingObjectNotInitializedError);
l("public flash.display.LoaderInfo::get parentAllowsChild");
return!0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "loader", {get:function() {
return this._loader;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "content", {get:function() {
return this._loader && this._loader.content;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "bytes", {get:function() {
if (!this._file) {
return new a.utils.ByteArray;
}
u("public flash.display.LoaderInfo::get bytes");
return null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "parameters", {get:function() {
l("public flash.display.LoaderInfo::get parameters");
return this._parameters ? c.ObjectUtilities.cloneObject(this._parameters) : {};
}, enumerable:!0, configurable:!0});
Object.defineProperty(q.prototype, "uncaughtErrorEvents", {get:function() {
l("public flash.display.LoaderInfo::_getUncaughtErrorEvents");
this._uncaughtErrorEvents || (this._uncaughtErrorEvents = new a.events.UncaughtErrorEvents);
return this._uncaughtErrorEvents;
}, enumerable:!0, configurable:!0});
q.prototype.getSymbolResolver = function(a, e) {
return this.resolveClassSymbol.bind(this, a, e);
};
q.prototype.getSymbolById = function(m) {
var k = this._dictionary[m];
if (k) {
return!1 === k.ready ? (c.Debug.warning("Accessing symbol that's not yet ready."), null) : k;
}
p(this._file instanceof e);
var f = this._file.getSymbol(m);
if (!f) {
return 65535 !== m && c.Debug.warning("Unknown symbol requested: " + m), null;
}
switch(f.type) {
case "shape":
k = a.display.ShapeSymbol.FromData(f, this);
break;
case "morphshape":
k = a.display.MorphShapeSymbol.FromData(f, this);
break;
case "image":
f.definition && (f = f.definition);
k = a.display.BitmapSymbol.FromData(f);
break;
case "label":
k = a.text.TextSymbol.FromLabelData(f, this);
break;
case "text":
k = a.text.TextSymbol.FromTextData(f, this);
this._syncAVM1Attributes(k);
break;
case "button":
k = a.display.ButtonSymbol.FromData(f, this);
this._syncAVM1Attributes(k);
break;
case "sprite":
k = a.display.SpriteSymbol.FromData(f, this);
break;
case "font":
f.definition && (f = f.definition);
var k = a.text.FontSymbol.FromData(f), d = a.text.Font.initializeFrom(k);
a.text.Font.instanceConstructorNoInitialize.call(d);
break;
case "sound":
k = a.media.SoundSymbol.FromData(f);
break;
case "binary":
k = c.Timeline.BinarySymbol.FromData(f);
}
p(k, "Unknown symbol type " + f.type);
this._dictionary[m] = k;
!1 === k.ready && h.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].registerFontOrImage(k, f);
return k;
};
q.prototype.getRootSymbol = function() {
p(this._file instanceof e);
p(0 < this._file.framesLoaded);
var c = this._dictionary[0];
c || (c = new a.display.SpriteSymbol({id:0, className:this._file.symbolClassesMap[0]}, this), c.isRoot = !0, c.numFrames = this._file.frameCount, this._syncAVM1Attributes(c), this._dictionary[0] = c);
return c;
};
q.prototype._syncAVM1Attributes = function(a) {
this.actionScriptVersion === v.ActionScriptVersion.ACTIONSCRIPT2 && (a.isAVM1Object = !0, a.avm1Context = this._avm1Context);
};
q.prototype.getFrame = function(a, c) {
var f = this._file;
p(f instanceof e);
a || (a = f);
return a.frames[c];
};
q.prototype.resolveClassSymbol = function(a, e) {
var f = this.getSymbolById(e);
if (f) {
return Object.defineProperty(a, "defaultInitializerArgument", {value:f}), f;
}
c.Debug.warning("Attempt to resolve symbol for AVM2 class failed: Symbol " + e + " not found.");
};
q.classInitializer = null;
q.initializer = null;
q.classSymbols = null;
q.instanceSymbols = null;
q.CtorToken = {};
return q;
}(a.events.EventDispatcher);
v.LoaderInfo = m;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(c) {
var h = function(a) {
function l() {
c.DisplayObject.instanceConstructorNoInitialize.call(this);
}
__extends(l, a);
l.prototype._canHaveGraphics = function() {
return!0;
};
l.prototype._getGraphics = function() {
return this._graphics;
};
Object.defineProperty(l.prototype, "graphics", {get:function() {
return this._ensureGraphics();
}, enumerable:!0, configurable:!0});
l.prototype._containsPointDirectly = function(a, c, l, h) {
return(l = this._getGraphics()) && l._containsPoint(a, c, !0, this._ratio / 65535);
};
l.classSymbols = null;
l.instanceSymbols = null;
l.classInitializer = null;
l.initializer = function(a) {
this._graphics = null;
a && this._setStaticContentFromSymbol(a);
this._setFlags(32768);
};
return l;
}(a.display.DisplayObject);
c.MorphShape = h;
h = function(c) {
function l(e) {
c.call(this, e, a.display.MorphShape);
}
__extends(l, c);
l.FromData = function(e, c) {
var h = new l(e);
h._setBoundsFromData(e);
h.graphics = a.display.Graphics.FromData(e);
h.processRequires(e.require, c);
h.morphFillBounds = e.morphFillBounds;
h.morphLineBounds = e.morphLineBounds;
return h;
};
return l;
}(a.display.ShapeSymbol);
c.MorphShapeSymbol = h;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(c) {
var h = function(c) {
function l() {
a.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
}
__extends(l, c);
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
return l;
}(a.events.EventDispatcher);
c.NativeMenu = h;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.somewhatImplemented, u = function(c) {
function e() {
a.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
this._enabled = !0;
}
__extends(e, c);
Object.defineProperty(e.prototype, "enabled", {get:function() {
p("public flash.display.NativeMenuItem::get enabled");
return this._enabled;
}, set:function(a) {
a = !!a;
p("public flash.display.NativeMenuItem::set enabled");
this._enabled = a;
}, enumerable:!0, configurable:!0});
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.events.EventDispatcher);
h.NativeMenuItem = u;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e(a) {
s("public flash.display.PNGEncoderOptions");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.PNGEncoderOptions = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.PixelSnapping");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.NEVER;
case 1:
return e.ALWAYS;
case 2:
return e.AUTO;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.NEVER:
return 0;
case e.ALWAYS:
return 1;
case e.AUTO:
return 2;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.NEVER = "never";
e.ALWAYS = "always";
e.AUTO = "auto";
return e;
}(a.ASNative);
h.PixelSnapping = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.SWFVersion");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.FLASH1 = 1;
e.FLASH2 = 2;
e.FLASH3 = 3;
e.FLASH4 = 4;
e.FLASH5 = 5;
e.FLASH6 = 6;
e.FLASH7 = 7;
e.FLASH8 = 8;
e.FLASH9 = 9;
e.FLASH10 = 10;
e.FLASH11 = 11;
e.FLASH12 = 12;
return e;
}(a.ASNative);
h.SWFVersion = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.AVM2.Runtime.asCoerceString, u = function(a) {
function e(a, e, c, l) {
this._name = s(a);
this._labels = e;
this.offset = c;
this._numFrames = l | 0;
}
__extends(e, a);
Object.defineProperty(e.prototype, "name", {get:function() {
return this._name;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "labels", {get:function() {
return this._labels;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "numFrames", {get:function() {
return this._numFrames;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
var a = this._labels.map(function(a) {
return a.clone();
});
return new e(this._name, a, this.offset, this._numFrames);
};
e.prototype.getLabelByName = function(a, e) {
e && (a = a.toLowerCase());
for (var c = this._labels, l = 0;l < c.length;l++) {
var k = c[l];
if (e ? k.name.toLowerCase() === a : k.name === a) {
return k;
}
}
return null;
};
e.prototype.getLabelByFrame = function(a) {
for (var e = this._labels, c = 0;c < e.length;c++) {
var l = e[c];
if (l.frame === a) {
return l;
}
}
return null;
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.Scene = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.StageAlign");
}
__extends(e, a);
e.fromNumber = function(a) {
if (0 === a) {
return "";
}
var e = "";
a & 1 && (e += "T");
a & 2 && (e += "B");
a & 4 && (e += "L");
a & 8 && (e += "R");
return e;
};
e.toNumber = function(a) {
var e = 0;
a = a.toUpperCase();
0 <= a.indexOf("T") && (e |= 1);
0 <= a.indexOf("B") && (e |= 2);
0 <= a.indexOf("L") && (e |= 4);
0 <= a.indexOf("R") && (e |= 8);
return e;
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.TOP = "T";
e.LEFT = "L";
e.BOTTOM = "B";
e.RIGHT = "R";
e.TOP_LEFT = "TL";
e.TOP_RIGHT = "TR";
e.BOTTOM_LEFT = "BL";
e.BOTTOM_RIGHT = "BR";
return e;
}(a.ASNative);
h.StageAlign = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.StageDisplayState");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.FULL_SCREEN;
case 1:
return e.FULL_SCREEN_INTERACTIVE;
case 2:
return e.NORMAL;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.FULL_SCREEN:
return 0;
case e.FULL_SCREEN_INTERACTIVE:
return 1;
case e.NORMAL:
return 2;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.FULL_SCREEN = "fullScreen";
e.FULL_SCREEN_INTERACTIVE = "fullScreenInteractive";
e.NORMAL = "normal";
return e;
}(a.ASNative);
h.StageDisplayState = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.StageQuality");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.LOW;
case 1:
return e.MEDIUM;
case 2:
return e.HIGH;
case 3:
return e.BEST;
case 4:
return e.HIGH_8X8;
case 5:
return e.HIGH_8X8_LINEAR;
case 6:
return e.HIGH_16X16;
case 7:
return e.HIGH_16X16_LINEAR;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a) {
case e.LOW:
return 0;
case e.MEDIUM:
return 1;
case e.HIGH:
return 2;
case e.BEST:
return 3;
case e.HIGH_8X8:
return 4;
case e.HIGH_8X8_LINEAR:
return 5;
case e.HIGH_16X16:
return 6;
case e.HIGH_16X16_LINEAR:
return 7;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.LOW = "low";
e.MEDIUM = "medium";
e.HIGH = "high";
e.BEST = "best";
e.HIGH_8X8 = "8x8";
e.HIGH_8X8_LINEAR = "8x8linear";
e.HIGH_16X16 = "16x16";
e.HIGH_16X16_LINEAR = "16x16linear";
return e;
}(a.ASNative);
h.StageQuality = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.StageScaleMode");
}
__extends(e, a);
e.fromNumber = function(a) {
switch(a) {
case 0:
return e.SHOW_ALL;
case 1:
return e.EXACT_FIT;
case 2:
return e.NO_BORDER;
case 4:
return e.NO_SCALE;
default:
return null;
}
};
e.toNumber = function(a) {
switch(a.toLowerCase()) {
case e.SHOW_ALL_LOWERCASE:
return 0;
case e.EXACT_FIT_LOWERCASE:
return 1;
case e.NO_BORDER_LOWERCASE:
return 2;
case e.NO_SCALE_LOWERCASE:
return 4;
default:
return-1;
}
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.SHOW_ALL = "showAll";
e.EXACT_FIT = "exactFit";
e.NO_BORDER = "noBorder";
e.NO_SCALE = "noScale";
e.SHOW_ALL_LOWERCASE = "showall";
e.EXACT_FIT_LOWERCASE = "exactfit";
e.NO_BORDER_LOWERCASE = "noborder";
e.NO_SCALE_LOWERCASE = "noscale";
return e;
}(a.ASNative);
h.StageScaleMode = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.display.TriangleCulling");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.NONE = "none";
e.POSITIVE = "positive";
e.NEGATIVE = "negative";
return e;
}(a.ASNative);
h.TriangleCulling = u;
})(h.display || (h.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = function(c) {
function e(e) {
a.display.DisplayObject.instanceConstructorNoInitialize.call(this);
this._children = [];
this._children[0] = this._content = e;
e._setParent(this, 0);
this._setDirtyFlags(2097152);
this._invalidateFillAndLineBounds(!0, !0);
h.DisplayObject._advancableInstances.push(this);
this._constructed = !1;
}
__extends(e, c);
e.prototype.call = function(a) {
p("AVM1Movie#call");
};
e.prototype.addCallback = function(a, e) {
p("AVM1Movie#call");
};
e.prototype._initFrame = function(a) {
};
e.prototype._constructFrame = function() {
this._constructed || (this._constructed = !0, h.DisplayObjectContainer.prototype._constructChildren.call(this));
this._content._constructFrame();
};
e.prototype._enqueueFrameScripts = function() {
this._removeFlags(16384);
this._content._enqueueFrameScripts();
};
e.prototype._propagateFlagsDown = function(a) {
this._hasFlags(a) || (this._setFlags(a), this._content._propagateFlagsDown(a));
};
e.prototype._containsPoint = function(a, e, c, l, k, f) {
return 3 === k ? this._content._containsPoint(a, e, c, l, k, f) : 0 === k && this._getContentBounds().contains(c, l) ? 1 : 0;
};
e.prototype._getChildBounds = function(a, e) {
var c = this._content._getContentBounds(e).clone();
this._getConcatenatedMatrix().transformBounds(c);
a.unionInPlace(c);
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.display.DisplayObject);
h.AVM1Movie = u;
})(a.display || (a.display = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = function(a) {
function c(a, e) {
void 0 === a && (a = "");
u(a);
s("public flash.errors.IllegalOperationError");
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASError);
h.IllegalOperationError = l;
})(h.errors || (h.errors = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = c.Telemetry, e = c.AVM2.Runtime.forEachPublicProperty, m = c.ExternalInterfaceService, t = function(c) {
function h() {
s("public flash.external.ExternalInterface");
}
__extends(h, c);
h._getAvailable = function() {
return m.instance.enabled;
};
h._initJS = function() {
h.initialized || (l.instance.reportTelemetry({topic:"feature", feature:1}), h.initialized = !0, m.instance.initJS(h._callIn));
};
h._callIn = function(e, c) {
var d = h.registeredCallbacks[e];
if (d) {
return d(e, a.ASJSON.transformJSValueToAS(c, !0));
}
};
h._getPropNames = function(a) {
var c = [];
e(a, function(a) {
c.push(a);
}, null);
return c;
};
h._addCallback = function(a, e, d) {
d ? (m.instance.unregisterCallback(a), delete h.registeredCallbacks[a]) : (m.instance.registerCallback(a), h.registeredCallbacks[a] = e);
};
h._evalJS = function(a) {
a = u(a);
return m.instance.eval(a);
};
h._callOut = function(a) {
a = u(a);
return m.instance.call(a);
};
Object.defineProperty(h, "available", {get:function() {
return h._getAvailable();
}, enumerable:!0, configurable:!0});
Object.defineProperty(h, "objectID", {get:function() {
return m.instance.getId();
}, enumerable:!0, configurable:!0});
Object.defineProperty(h, "activeX", {get:function() {
return!1;
}, enumerable:!0, configurable:!0});
h.classInitializer = null;
h.initializer = null;
h.classSymbols = null;
h.instanceSymbols = null;
h.initialized = !1;
h.registeredCallbacks = Object.create(null);
return h;
}(a.ASNative);
h.ExternalInterface = t;
})(h.external || (h.external = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.LOW = 1;
c.MEDIUM = 2;
c.HIGH = 3;
return c;
}(a.ASNative);
c.BitmapFilterQuality = h;
})(c.filters || (c.filters = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.INNER = "inner";
c.OUTER = "outer";
c.FULL = "full";
return c;
}(a.ASNative);
c.BitmapFilterType = h;
})(c.filters || (c.filters = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = function(a) {
function c() {
}
__extends(c, a);
c._updateBlurBounds = function(a, m, h, q, n) {
void 0 === n && (n = !1);
q = c.blurFilterStepWidths[q - 1];
n && (n = q / 4, m -= n, h -= n);
a.inflate(Math.ceil((1 > m ? 1 : m) * q), Math.ceil((1 > h ? 1 : h) * q));
};
c.prototype._updateFilterBounds = function(a) {
};
c.prototype._serialize = function(a) {
a.writeInt(-1);
};
c.prototype.clone = function() {
return null;
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.EPS = 1E-9;
c.blurFilterStepWidths = [.5, 1.05, 1.35, 1.55, 1.75, 1.9, 2, 2.1, 2.2, 2.3, 2.5, 3, 3, 3.5, 3.5];
return c;
}(a.ASNative);
h.BitmapFilter = s;
s = function() {
function a() {
}
a.sanitize = function(a, e, m) {
if (c.isNullOrUndefined(a) || 0 === a.length) {
this.colors = [], this.alphas = [], this.ratios = [];
} else {
var h;
c.isNullOrUndefined(m) ? (this.colors = this.sanitizeColors(a), h = this.colors.length, this.ratios = this.initArray(h), c.isNullOrUndefined(e) ? this.alphas = this.initArray(h) : this.alphas = this.sanitizeAlphas(e, h, h, 1)) : 0 === m.length ? (this.colors = [], this.alphas = [], this.ratios = []) : (h = Math.min(a.length, m.length, 16), this.colors = this.sanitizeColors(a, h), this.ratios = this.sanitizeRatios(m, h), c.isNullOrUndefined(e) ? this.alphas = this.initArray(h) : this.alphas =
this.sanitizeAlphas(e, h, h, 1));
}
};
a.sanitizeColors = function(a, e) {
void 0 === e && (e = 16);
for (var c = [], h = 0, q = Math.min(a.length, e);h < q;h++) {
c[h] = a[h] >>> 0 & 16777215;
}
return c;
};
a.sanitizeAlphas = function(a, e, m, h) {
void 0 === e && (e = 16);
void 0 === m && (m = 0);
void 0 === h && (h = 0);
var q = [], n = 0;
for (e = Math.min(a.length, e);n < e;n++) {
q[n] = c.NumberUtilities.clamp(+a[n], 0, 1);
}
for (;n < m;) {
q[n++] = h;
}
return q;
};
a.sanitizeRatios = function(a, e, m) {
var h;
void 0 === e && (e = 16);
void 0 === m && (m = 0);
void 0 === h && (h = 0);
var q = [], n = 0;
for (e = Math.min(a.length, e);n < e;n++) {
q[n] = c.NumberUtilities.clamp(+a[n], 0, 255);
}
for (;n < m;) {
q[n++] = h;
}
return q;
};
a.initArray = function(a) {
var e;
void 0 === e && (e = 0);
for (var c = Array(a), h = 0;h < a;h++) {
c[h] = e;
}
return c;
};
return a;
}();
h.GradientArrays = s;
})(h.filters || (h.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.AVM2.Runtime.asCoerceString, u = c.Debug.assert, l = function(e) {
function m(a, e, c, k, f, d, b, g, m, l, h, s) {
void 0 === a && (a = 4);
void 0 === e && (e = 45);
void 0 === c && (c = 16777215);
void 0 === k && (k = 1);
void 0 === f && (f = 0);
void 0 === d && (d = 1);
void 0 === b && (b = 4);
void 0 === g && (g = 4);
void 0 === m && (m = 1);
void 0 === l && (l = 1);
void 0 === h && (h = "inner");
void 0 === s && (s = !1);
this.distance = a;
this.angle = e;
this.highlightColor = c;
this.highlightAlpha = k;
this.shadowColor = f;
this.shadowAlpha = d;
this.blurX = b;
this.blurY = g;
this.strength = m;
this.quality = l;
this.type = h;
this.knockout = s;
}
__extends(m, e);
m.FromUntyped = function(e) {
var c = e.highlightColor >>> 8, l = (e.highlightColor & 255) / 255;
u(e.colors && 1 === e.colors.length, "colors must be Array of length 1");
var k = e.colors[0] >>> 8, f = (e.colors[0] & 255) / 255, d = a.filters.BitmapFilterType.OUTER;
e.onTop ? d = a.filters.BitmapFilterType.FULL : e.inner && (d = a.filters.BitmapFilterType.INNER);
return new m(e.distance, 180 * e.angle / Math.PI, c, l, k, f, e.blurX, e.blurY, e.strength, e.quality, d, e.knockout);
};
m.prototype._updateFilterBounds = function(a) {
if (this.type !== v.BitmapFilterType.INNER && (v.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
var e = this._angle * Math.PI / 180;
a.x += Math.floor(Math.cos(e) * this._distance);
a.y += Math.floor(Math.sin(e) * this._distance);
0 < a.left && (a.left = 0);
0 < a.top && (a.top = 0);
}
};
Object.defineProperty(m.prototype, "distance", {get:function() {
return this._distance;
}, set:function(a) {
this._distance = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "angle", {get:function() {
return this._angle;
}, set:function(a) {
this._angle = +a % 360;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "highlightColor", {get:function() {
return this._highlightColor;
}, set:function(a) {
this._highlightColor = a >>> 0 & 16777215;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "highlightAlpha", {get:function() {
return this._highlightAlpha;
}, set:function(a) {
this._highlightAlpha = c.NumberUtilities.clamp(+a, 0, 1);
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "shadowColor", {get:function() {
return this._shadowColor;
}, set:function(a) {
this._shadowColor = a >>> 0 & 16777215;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "shadowAlpha", {get:function() {
return this._shadowAlpha;
}, set:function(a) {
this._shadowAlpha = c.NumberUtilities.clamp(+a, 0, 1);
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "blurX", {get:function() {
return this._blurX;
}, set:function(a) {
this._blurX = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "blurY", {get:function() {
return this._blurY;
}, set:function(a) {
this._blurY = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "knockout", {get:function() {
return this._knockout;
}, set:function(a) {
this._knockout = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "quality", {get:function() {
return this._quality;
}, set:function(a) {
this._quality = c.NumberUtilities.clamp(a | 0, 0, 15);
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "strength", {get:function() {
return this._strength;
}, set:function(a) {
this._strength = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "type", {get:function() {
return this._type;
}, set:function(a) {
a = p(a);
null === a ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL;
}, enumerable:!0, configurable:!0});
m.prototype.clone = function() {
return new m(this._distance, this._angle, this._highlightColor, this._highlightAlpha, this._shadowColor, this._shadowAlpha, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout);
};
m.classInitializer = null;
m.initializer = null;
m.classSymbols = null;
m.instanceSymbols = null;
return m;
}(a.filters.BitmapFilter);
v.BevelFilter = l;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = function(a) {
function l(a, c, l) {
void 0 === a && (a = 4);
void 0 === c && (c = 4);
void 0 === l && (l = 1);
this.blurX = a;
this.blurY = c;
this.quality = l;
}
__extends(l, a);
l.FromUntyped = function(a) {
return new l(a.blurX, a.blurY, a.quality);
};
l.prototype._updateFilterBounds = function(a) {
h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality, !0);
};
l.prototype._serialize = function(a) {
a.ensureAdditionalCapacity(16);
a.writeIntUnsafe(1);
a.writeFloatUnsafe(this._blurX);
a.writeFloatUnsafe(this._blurY);
a.writeIntUnsafe(this._quality);
};
Object.defineProperty(l.prototype, "blurX", {get:function() {
return this._blurX;
}, set:function(a) {
this._blurX = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "blurY", {get:function() {
return this._blurY;
}, set:function(a) {
this._blurY = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "quality", {get:function() {
return this._quality;
}, set:function(a) {
this._quality = c.NumberUtilities.clamp(a | 0, 0, 15);
}, enumerable:!0, configurable:!0});
l.prototype.clone = function() {
return new l(this._blurX, this._blurY, this._quality);
};
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
return l;
}(a.filters.BitmapFilter);
h.BlurFilter = p;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = function(a) {
function l(a) {
void 0 === a && (a = null);
a ? this.matrix = a : this._matrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
}
__extends(l, a);
l.FromUntyped = function(a) {
return new l(a.matrix);
};
l.prototype._serialize = function(a) {
var c = this._matrix;
a.ensureAdditionalCapacity(4 * (c.length + 1));
a.writeIntUnsafe(6);
for (var l = 0;l < c.length;l++) {
a.writeFloatUnsafe(c[l]);
}
};
Object.defineProperty(l.prototype, "matrix", {get:function() {
return this._matrix.concat();
}, set:function(a) {
if (c.isNullOrUndefined(a)) {
h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "matrix");
} else {
for (var m = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], l = 0, q = Math.min(a.length, 20);l < q;l++) {
m[l] = c.toNumber(a[l]);
}
this._matrix = m;
}
}, enumerable:!0, configurable:!0});
l.prototype.clone = function() {
return new l(this.matrix);
};
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
return l;
}(a.filters.BitmapFilter);
v.ColorMatrixFilter = p;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = function(a) {
function l(a, c, l, h, n, k, f, d, b) {
void 0 === a && (a = 0);
void 0 === c && (c = 0);
void 0 === l && (l = null);
void 0 === h && (h = 1);
void 0 === n && (n = 0);
void 0 === k && (k = !0);
void 0 === f && (f = !0);
void 0 === d && (d = 0);
void 0 === b && (b = 0);
this.matrixX = a;
this.matrixY = c;
l ? this.matrix = l : this._matrix = this._expandArray([], this._matrixX * this._matrixY);
this.divisor = h;
this.bias = n;
this.preserveAlpha = k;
this.clamp = f;
this.color = d;
this.alpha = b;
}
__extends(l, a);
l.FromUntyped = function(a) {
return new l(a.matrixX, a.matrixY, a.matrix, a.divisor, a.bias, a.preserveAlpha, a.clamp, a.color >>> 8, (a.color & 255) / 255);
};
l.prototype._expandArray = function(a, c) {
if (a) {
for (var l = a.length;l < c;) {
a[l++] = 0;
}
}
return a;
};
Object.defineProperty(l.prototype, "matrix", {get:function() {
return this._matrix.slice(0, this._matrixX * this._matrixY);
}, set:function(a) {
if (c.isNullOrUndefined(a)) {
h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "matrix");
} else {
for (var m = this._matrixX * this._matrixY, l = Math.min(a.length, m), q = Array(l), n = 0;n < l;n++) {
q[n] = c.toNumber(a[n]);
}
this._expandArray(q, m);
this._matrix = q;
}
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "matrixX", {get:function() {
return this._matrixX;
}, set:function(a) {
a = c.NumberUtilities.clamp(+a, 0, 15) | 0;
this._matrixX !== a && (this._matrixX = a, this._expandArray(this._matrix, a * this._matrixY));
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "matrixY", {get:function() {
return this._matrixY;
}, set:function(a) {
a = c.NumberUtilities.clamp(+a, 0, 15) | 0;
this._matrixY !== a && (this._matrixY = a, this._expandArray(this._matrix, a * this._matrixX));
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "divisor", {get:function() {
return this._divisor;
}, set:function(a) {
this._divisor = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "bias", {get:function() {
return this._bias;
}, set:function(a) {
this._bias = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "preserveAlpha", {get:function() {
return this._preserveAlpha;
}, set:function(a) {
this._preserveAlpha = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "clamp", {get:function() {
return this._clamp;
}, set:function(a) {
this._clamp = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "color", {get:function() {
return this._color;
}, set:function(a) {
this._color = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "alpha", {get:function() {
return this._alpha;
}, set:function(a) {
this._alpha = c.NumberUtilities.clamp(+a, 0, 1);
}, enumerable:!0, configurable:!0});
l.prototype.clone = function() {
return new l(this._matrixX, this._matrixY, this.matrix, this._divisor, this._bias, this._preserveAlpha, this._clamp, this._color, this._alpha);
};
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
return l;
}(a.filters.BitmapFilter);
v.ConvolutionFilter = p;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.filters.DisplacementMapFilterMode");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.WRAP = "wrap";
e.CLAMP = "clamp";
e.IGNORE = "ignore";
e.COLOR = "color";
return e;
}(a.ASNative);
h.DisplacementMapFilterMode = u;
})(h.filters || (h.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.somewhatImplemented, u = c.AVM2.Runtime.asCoerceString, l = function(a) {
function c(a, e, m, k, f, d, b, g, l) {
void 0 === a && (a = null);
void 0 === e && (e = null);
void 0 === m && (m = 0);
void 0 === k && (k = 0);
void 0 === f && (f = 0);
void 0 === d && (d = 0);
void 0 === b && (b = "wrap");
void 0 === g && (g = 0);
void 0 === l && (l = 0);
this.mapBitmap = a;
this.mapPoint = e;
this.componentX = m;
this.componentY = k;
this.scaleX = f;
this.scaleY = d;
this.mode = b;
this.color = g;
this.alpha = l;
}
__extends(c, a);
c.FromUntyped = function(a) {
return new c(a.mapBitmap, a.mapPoint, a.componentX, a.componentY, a.scaleX, a.scaleY, a.mode, a.color, a.alpha);
};
Object.defineProperty(c.prototype, "mapBitmap", {get:function() {
p("public flash.filters.DisplacementMapFilter::get mapBitmap");
return this._mapBitmap;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set mapBitmap");
this._mapBitmap = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "mapPoint", {get:function() {
p("public flash.filters.DisplacementMapFilter::get mapPoint");
return this._mapPoint;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set mapPoint");
this._mapPoint = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "componentX", {get:function() {
return this._componentX;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set componentX");
this._componentX = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "componentY", {get:function() {
return this._componentY;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set componentY");
this._componentY = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "scaleX", {get:function() {
return this._scaleX;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set scaleX");
this._scaleX = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "scaleY", {get:function() {
return this._scaleY;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set scaleY");
this._scaleY = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "mode", {get:function() {
return this._mode;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set mode");
this._mode = u(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "color", {get:function() {
return this._color;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set color");
this._color = a >>> 0 & 16777215;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "alpha", {get:function() {
return this._alpha;
}, set:function(a) {
p("public flash.filters.DisplacementMapFilter::set alpha");
this._alpha = +a;
}, enumerable:!0, configurable:!0});
c.prototype.clone = function() {
return new c(this._mapBitmap, this._mapPoint, this._componentX, this._componentY, this._scaleX, this._scaleY, this._mode, this._color, this._alpha);
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.filters.BitmapFilter);
h.DisplacementMapFilter = l;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.assert, u = function(a) {
function e(a, e, c, l, k, f, d, b, g, h, w) {
void 0 === a && (a = 4);
void 0 === e && (e = 45);
void 0 === c && (c = 0);
void 0 === l && (l = 1);
void 0 === k && (k = 4);
void 0 === f && (f = 4);
void 0 === d && (d = 1);
void 0 === b && (b = 1);
void 0 === g && (g = !1);
void 0 === h && (h = !1);
void 0 === w && (w = !1);
this.distance = a;
this.angle = e;
this.color = c;
this.alpha = l;
this.blurX = k;
this.blurY = f;
this.strength = d;
this.quality = b;
this.inner = g;
this.knockout = h;
this.hideObject = w;
}
__extends(e, a);
e.FromUntyped = function(a) {
p(a.colors && 1 === a.colors.length, "colors must be Array of length 1");
return new e(a.distance, 180 * a.angle / Math.PI, a.colors[0] >>> 8, (a.colors[0] & 255) / 255, a.blurX, a.blurY, a.strength, a.quality, a.inner, a.knockout, !a.compositeSource);
};
e.prototype._updateFilterBounds = function(a) {
if (!this.inner && (h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
var e = this._angle * Math.PI / 180;
a.x += Math.floor(Math.cos(e) * this._distance);
a.y += Math.floor(Math.sin(e) * this._distance);
0 < a.left && (a.left = 0);
0 < a.top && (a.top = 0);
}
};
Object.defineProperty(e.prototype, "distance", {get:function() {
return this._distance;
}, set:function(a) {
this._distance = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "angle", {get:function() {
return this._angle;
}, set:function(a) {
this._angle = +a % 360;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "color", {get:function() {
return this._color;
}, set:function(a) {
this._color = a >>> 0 & 16777215;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "alpha", {get:function() {
return this._alpha;
}, set:function(a) {
this._alpha = c.NumberUtilities.clamp(+a, 0, 1);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurX", {get:function() {
return this._blurX;
}, set:function(a) {
this._blurX = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurY", {get:function() {
return this._blurY;
}, set:function(a) {
this._blurY = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "hideObject", {get:function() {
return this._hideObject;
}, set:function(a) {
this._hideObject = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "inner", {get:function() {
return this._inner;
}, set:function(a) {
this._inner = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "knockout", {get:function() {
return this._knockout;
}, set:function(a) {
this._knockout = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "quality", {get:function() {
return this._quality;
}, set:function(a) {
this._quality = c.NumberUtilities.clamp(a | 0, 0, 15);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "strength", {get:function() {
return this._strength;
}, set:function(a) {
this._strength = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
return new e(this._distance, this._angle, this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout, this._hideObject);
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.filters.BitmapFilter);
h.DropShadowFilter = u;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.assert, u = function(a) {
function e(a, e, c, l, k, f, d, b) {
void 0 === a && (a = 16711680);
void 0 === e && (e = 1);
void 0 === c && (c = 6);
void 0 === l && (l = 6);
void 0 === k && (k = 2);
void 0 === f && (f = 1);
void 0 === d && (d = !1);
void 0 === b && (b = !1);
this.color = a;
this.alpha = e;
this.blurX = c;
this.blurY = l;
this.strength = k;
this.quality = f;
this.inner = d;
this.knockout = b;
}
__extends(e, a);
e.FromUntyped = function(a) {
p(a.colors && 1 === a.colors.length, "colors must be Array of length 1");
return new e(a.colors[0] >>> 8, (a.colors[0] & 255) / 255, a.blurX, a.blurY, a.strength, a.quality, a.inner, a.knockout);
};
e.prototype._updateFilterBounds = function(a) {
h.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality);
};
Object.defineProperty(e.prototype, "color", {get:function() {
return this._color;
}, set:function(a) {
this._color = a >>> 0 & 16777215;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "alpha", {get:function() {
return this._alpha;
}, set:function(a) {
this._alpha = c.NumberUtilities.clamp(+a, 0, 1);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurX", {get:function() {
return this._blurX;
}, set:function(a) {
this._blurX = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurY", {get:function() {
return this._blurY;
}, set:function(a) {
this._blurY = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "inner", {get:function() {
return this._inner;
}, set:function(a) {
this._inner = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "knockout", {get:function() {
return this._knockout;
}, set:function(a) {
this._knockout = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "quality", {get:function() {
return this._quality;
}, set:function(a) {
this._quality = c.NumberUtilities.clamp(a | 0, 0, 15);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "strength", {get:function() {
return this._strength;
}, set:function(a) {
this._strength = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
return new e(this._color, this._alpha, this._blurX, this._blurY, this._strength, this._quality, this._inner, this._knockout);
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.filters.BitmapFilter);
h.GlowFilter = u;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.AVM2.Runtime.asCoerceString, u = function(l) {
function e(a, e, c, l, k, f, d, b, g, h, w) {
void 0 === a && (a = 4);
void 0 === e && (e = 45);
void 0 === c && (c = null);
void 0 === l && (l = null);
void 0 === k && (k = null);
void 0 === f && (f = 4);
void 0 === d && (d = 4);
void 0 === b && (b = 1);
void 0 === g && (g = 1);
void 0 === h && (h = "inner");
void 0 === w && (w = !1);
this.distance = a;
this.angle = e;
v.GradientArrays.sanitize(c, l, k);
this._colors = v.GradientArrays.colors;
this._alphas = v.GradientArrays.alphas;
this._ratios = v.GradientArrays.ratios;
this.blurX = f;
this.blurY = d;
this.strength = b;
this.quality = g;
this.type = h;
this.knockout = w;
}
__extends(e, l);
e.FromUntyped = function(c) {
for (var l = [], h = [], n = 0;n < c.colors.length;n++) {
var k = c.colors[n];
l.push(k >>> 8);
h.push(k & 255) / 255;
}
n = a.filters.BitmapFilterType.OUTER;
c.onTop ? n = a.filters.BitmapFilterType.FULL : c.inner && (n = a.filters.BitmapFilterType.INNER);
return new e(c.distance, 180 * c.angle / Math.PI, l, h, c.ratios, c.blurX, c.blurY, c.strength, c.quality, n, c.knockout);
};
e.prototype._updateFilterBounds = function(a) {
if (this.type !== v.BitmapFilterType.INNER && (v.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
var e = this._angle * Math.PI / 180;
a.x += Math.floor(Math.cos(e) * this._distance);
a.y += Math.floor(Math.sin(e) * this._distance);
0 < a.left && (a.left = 0);
0 < a.top && (a.top = 0);
}
};
Object.defineProperty(e.prototype, "distance", {get:function() {
return this._distance;
}, set:function(a) {
this._distance = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "angle", {get:function() {
return this._angle;
}, set:function(a) {
this._angle = +a % 360;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "colors", {get:function() {
return this._colors.concat();
}, set:function(a) {
c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "colors") : (this._colors = v.GradientArrays.sanitizeColors(a), a = this._colors.length, this._alphas = v.GradientArrays.sanitizeAlphas(this._alphas, a, a), this._ratios = v.GradientArrays.sanitizeRatios(this._ratios, a, a));
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "alphas", {get:function() {
return this._alphas.concat();
}, set:function(a) {
c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "alphas") : (v.GradientArrays.sanitize(this._colors, a, this._ratios), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "ratios", {get:function() {
return this._ratios.concat();
}, set:function(a) {
c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "ratios") : (v.GradientArrays.sanitize(this._colors, this._alphas, a), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurX", {get:function() {
return this._blurX;
}, set:function(a) {
this._blurX = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurY", {get:function() {
return this._blurY;
}, set:function(a) {
this._blurY = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "knockout", {get:function() {
return this._knockout;
}, set:function(a) {
this._knockout = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "quality", {get:function() {
return this._quality;
}, set:function(a) {
this._quality = c.NumberUtilities.clamp(a | 0, 0, 15);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "strength", {get:function() {
return this._strength;
}, set:function(a) {
this._strength = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "type", {get:function() {
return this._type;
}, set:function(a) {
a = p(a);
null === a ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
return new e(this._distance, this._angle, this._colors, this._alphas, this._ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout);
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.filters.BitmapFilter);
v.GradientBevelFilter = u;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.AVM2.Runtime.asCoerceString, u = function(l) {
function e(a, e, c, l, k, f, d, b, g, h, w) {
void 0 === a && (a = 4);
void 0 === e && (e = 45);
void 0 === c && (c = null);
void 0 === l && (l = null);
void 0 === k && (k = null);
void 0 === f && (f = 4);
void 0 === d && (d = 4);
void 0 === b && (b = 1);
void 0 === g && (g = 1);
void 0 === h && (h = "inner");
void 0 === w && (w = !1);
this.distance = a;
this.angle = e;
v.GradientArrays.sanitize(c, l, k);
this._colors = v.GradientArrays.colors;
this._alphas = v.GradientArrays.alphas;
this._ratios = v.GradientArrays.ratios;
this.blurX = f;
this.blurY = d;
this.strength = b;
this.quality = g;
this.type = h;
this.knockout = w;
}
__extends(e, l);
e.FromUntyped = function(c) {
for (var l = [], h = [], n = 0;n < c.colors.length;n++) {
var k = c.colors[n];
l.push(k >>> 8);
h.push(k & 255) / 255;
}
n = a.filters.BitmapFilterType.OUTER;
c.onTop ? n = a.filters.BitmapFilterType.FULL : c.inner && (n = a.filters.BitmapFilterType.INNER);
return new e(c.distance, 180 * c.angle / Math.PI, l, h, c.ratios, c.blurX, c.blurY, c.strength, c.quality, n, c.knockout);
};
e.prototype._updateFilterBounds = function(a) {
if (this.type !== v.BitmapFilterType.INNER && (v.BitmapFilter._updateBlurBounds(a, this._blurX, this._blurY, this._quality), 0 !== this._distance)) {
var e = this._angle * Math.PI / 180;
a.x += Math.floor(Math.cos(e) * this._distance);
a.y += Math.floor(Math.sin(e) * this._distance);
0 < a.left && (a.left = 0);
0 < a.top && (a.top = 0);
}
};
Object.defineProperty(e.prototype, "distance", {get:function() {
return this._distance;
}, set:function(a) {
this._distance = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "angle", {get:function() {
return this._angle;
}, set:function(a) {
this._angle = +a % 360;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "colors", {get:function() {
return this._colors.concat();
}, set:function(a) {
c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "colors") : (this._colors = v.GradientArrays.sanitizeColors(a), a = this._colors.length, this._alphas = v.GradientArrays.sanitizeAlphas(this._alphas, a, a), this._ratios = v.GradientArrays.sanitizeRatios(this._ratios, a, a));
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "alphas", {get:function() {
return this._alphas.concat();
}, set:function(a) {
c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "alphas") : (v.GradientArrays.sanitize(this._colors, a, this._ratios), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "ratios", {get:function() {
return this._ratios.concat();
}, set:function(a) {
c.isNullOrUndefined(a) ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "ratios") : (v.GradientArrays.sanitize(this._colors, this._alphas, a), this._colors = v.GradientArrays.colors, this._alphas = v.GradientArrays.alphas, this._ratios = v.GradientArrays.ratios);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurX", {get:function() {
return this._blurX;
}, set:function(a) {
this._blurX = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blurY", {get:function() {
return this._blurY;
}, set:function(a) {
this._blurY = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "knockout", {get:function() {
return this._knockout;
}, set:function(a) {
this._knockout = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "quality", {get:function() {
return this._quality;
}, set:function(a) {
this._quality = c.NumberUtilities.clamp(a | 0, 0, 15);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "strength", {get:function() {
return this._strength;
}, set:function(a) {
this._strength = c.NumberUtilities.clamp(+a, 0, 255);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "type", {get:function() {
return this._type;
}, set:function(a) {
a = p(a);
null === a ? h.Runtime.throwError("TypeError", h.Errors.NullPointerError, "type") : this._type = a === v.BitmapFilterType.INNER || a === v.BitmapFilterType.OUTER ? a : v.BitmapFilterType.FULL;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
return new e(this._distance, this._angle, this._colors, this._alphas, this._ratios, this._blurX, this._blurY, this._strength, this._quality, this._type, this._knockout);
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.filters.BitmapFilter);
v.GradientGlowFilter = u;
})(a.filters || (a.filters = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.IntegerUtilities.toS16, u = c.IntegerUtilities.clampS8U8, l = function(a) {
function c(a, e, l, k, f, d, b, g) {
void 0 === a && (a = 1);
void 0 === e && (e = 1);
void 0 === l && (l = 1);
void 0 === k && (k = 1);
void 0 === f && (f = 0);
void 0 === d && (d = 0);
void 0 === b && (b = 0);
void 0 === g && (g = 0);
this.redMultiplier = +a;
this.greenMultiplier = +e;
this.blueMultiplier = +l;
this.alphaMultiplier = +k;
this.redOffset = +f;
this.greenOffset = +d;
this.blueOffset = +b;
this.alphaOffset = +g;
}
__extends(c, a);
Object.defineProperty(c.prototype, "native_redMultiplier", {get:function() {
return this.redMultiplier;
}, set:function(a) {
this.redMultiplier = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_greenMultiplier", {get:function() {
return this.greenMultiplier;
}, set:function(a) {
this.greenMultiplier = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_blueMultiplier", {get:function() {
return this.blueMultiplier;
}, set:function(a) {
this.blueMultiplier = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_alphaMultiplier", {get:function() {
return this.alphaMultiplier;
}, set:function(a) {
this.alphaMultiplier = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_redOffset", {get:function() {
return this.redOffset;
}, set:function(a) {
this.redOffset = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_greenOffset", {get:function() {
return this.greenOffset;
}, set:function(a) {
this.greenOffset = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_blueOffset", {get:function() {
return this.blueOffset;
}, set:function(a) {
this.blueOffset = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "native_alphaOffset", {get:function() {
return this.alphaOffset;
}, set:function(a) {
this.alphaOffset = +a;
}, enumerable:!0, configurable:!0});
c.prototype.ColorTransform = function(a, e, c, k, f, d, b, g) {
void 0 === a && (a = 1);
void 0 === e && (e = 1);
void 0 === c && (c = 1);
void 0 === k && (k = 1);
void 0 === f && (f = 0);
void 0 === d && (d = 0);
void 0 === b && (b = 0);
void 0 === g && (g = 0);
this.redMultiplier = a;
this.greenMultiplier = e;
this.blueMultiplier = c;
this.alphaMultiplier = k;
this.redOffset = f;
this.greenOffset = d;
this.blueOffset = b;
this.alphaOffset = g;
};
Object.defineProperty(c.prototype, "color", {get:function() {
return this.redOffset << 16 | this.greenOffset << 8 | this.blueOffset;
}, set:function(a) {
this.redOffset = a >> 16 & 255;
this.greenOffset = a >> 8 & 255;
this.blueOffset = a & 255;
this.redMultiplier = this.greenMultiplier = this.blueMultiplier = 1;
}, enumerable:!0, configurable:!0});
c.prototype.concat = function(a) {
this.redMultiplier *= a.redMultiplier;
this.greenMultiplier *= a.greenMultiplier;
this.blueMultiplier *= a.blueMultiplier;
this.alphaMultiplier *= a.alphaMultiplier;
this.redOffset += a.redOffset;
this.greenOffset += a.greenOffset;
this.blueOffset += a.blueOffset;
this.alphaOffset += a.alphaOffset;
};
c.prototype.preMultiply = function(a) {
this.redOffset += a.redOffset * this.redMultiplier;
this.greenOffset += a.greenOffset * this.greenMultiplier;
this.blueOffset += a.blueOffset * this.blueMultiplier;
this.alphaOffset += a.alphaOffset * this.alphaMultiplier;
this.redMultiplier *= a.redMultiplier;
this.greenMultiplier *= a.greenMultiplier;
this.blueMultiplier *= a.blueMultiplier;
this.alphaMultiplier *= a.alphaMultiplier;
};
c.prototype.copyFrom = function(a) {
this.redMultiplier = a.redMultiplier;
this.greenMultiplier = a.greenMultiplier;
this.blueMultiplier = a.blueMultiplier;
this.alphaMultiplier = a.alphaMultiplier;
this.redOffset = a.redOffset;
this.greenOffset = a.greenOffset;
this.blueOffset = a.blueOffset;
this.alphaOffset = a.alphaOffset;
};
c.prototype.copyFromUntyped = function(a) {
this.redMultiplier = a.redMultiplier / 256;
this.greenMultiplier = a.greenMultiplier / 256;
this.blueMultiplier = a.blueMultiplier / 256;
this.alphaMultiplier = a.alphaMultiplier / 256;
this.redOffset = a.redOffset;
this.greenOffset = a.greenOffset;
this.blueOffset = a.blueOffset;
this.alphaOffset = a.alphaOffset;
};
c.prototype.setTo = function(a, e, c, k, f, d, b, g) {
this.redMultiplier = a;
this.greenMultiplier = e;
this.blueMultiplier = c;
this.alphaMultiplier = k;
this.redOffset = f;
this.greenOffset = d;
this.blueOffset = b;
this.alphaOffset = g;
};
c.prototype.clone = function() {
return new c(this.redMultiplier, this.greenMultiplier, this.blueMultiplier, this.alphaMultiplier, this.redOffset, this.greenOffset, this.blueOffset, this.alphaOffset);
};
c.prototype.convertToFixedPoint = function() {
this.redMultiplier = u(this.redMultiplier);
this.greenMultiplier = u(this.greenMultiplier);
this.blueMultiplier = u(this.blueMultiplier);
this.alphaMultiplier = u(this.alphaMultiplier);
this.redOffset = s(this.redOffset);
this.greenOffset = s(this.greenOffset);
this.blueOffset = s(this.blueOffset);
this.alphaOffset = s(this.alphaOffset);
return this;
};
c.prototype.toString = function() {
return "(redMultiplier=" + this.redMultiplier + ", greenMultiplier=" + this.greenMultiplier + ", blueMultiplier=" + this.blueMultiplier + ", alphaMultiplier=" + this.alphaMultiplier + ", redOffset=" + this.redOffset + ", greenOffset=" + this.greenOffset + ", blueOffset=" + this.blueOffset + ", alphaOffset=" + this.alphaOffset + ")";
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.FROZEN_IDENTITY_COLOR_TRANSFORM = Object.freeze(new c);
c.TEMP_COLOR_TRANSFORM = new c;
return c;
}(a.ASNative);
h.ColorTransform = l;
})(h.geom || (h.geom = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) {
function e() {
u("public flash.media.Camera");
}
__extends(e, a);
Object.defineProperty(e.prototype, "names", {get:function() {
p("public flash.media.Camera::get names");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "isSupported", {get:function() {
p("public flash.media.Camera::get isSupported");
}, enumerable:!0, configurable:!0});
e.getCamera = function(a) {
void 0 === a && (a = null);
l(a);
p("public flash.media.Camera::static getCamera");
};
e._scanHardware = function() {
p("public flash.media.Camera::static _scanHardware");
};
Object.defineProperty(e.prototype, "activityLevel", {get:function() {
p("public flash.media.Camera::get activityLevel");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "bandwidth", {get:function() {
p("public flash.media.Camera::get bandwidth");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "currentFPS", {get:function() {
p("public flash.media.Camera::get currentFPS");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "fps", {get:function() {
p("public flash.media.Camera::get fps");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "height", {get:function() {
p("public flash.media.Camera::get height");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "index", {get:function() {
p("public flash.media.Camera::get index");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "keyFrameInterval", {get:function() {
p("public flash.media.Camera::get keyFrameInterval");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "loopback", {get:function() {
p("public flash.media.Camera::get loopback");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "motionLevel", {get:function() {
p("public flash.media.Camera::get motionLevel");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "motionTimeout", {get:function() {
p("public flash.media.Camera::get motionTimeout");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "muted", {get:function() {
p("public flash.media.Camera::get muted");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "name", {get:function() {
p("public flash.media.Camera::get name");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "position", {get:function() {
p("public flash.media.Camera::get position");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "quality", {get:function() {
p("public flash.media.Camera::get quality");
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "width", {get:function() {
p("public flash.media.Camera::get width");
}, enumerable:!0, configurable:!0});
e.prototype.setCursor = function(a) {
p("public flash.media.Camera::setCursor");
};
e.prototype.setKeyFrameInterval = function(a) {
p("public flash.media.Camera::setKeyFrameInterval");
};
e.prototype.setLoopback = function(a) {
p("public flash.media.Camera::setLoopback");
};
e.prototype.setMode = function(a, e, c, f) {
p("public flash.media.Camera::setMode");
};
e.prototype.setMotionLevel = function(a, e) {
p("public flash.media.Camera::setMotionLevel");
};
e.prototype.setQuality = function(a, e) {
p("public flash.media.Camera::setQuality");
};
e.prototype.drawToBitmapData = function(a) {
p("public flash.media.Camera::drawToBitmapData");
};
e.prototype.copyToByteArray = function(a, e) {
p("public flash.media.Camera::copyToByteArray");
};
e.prototype.copyToVector = function(a, e) {
p("public flash.media.Camera::copyToVector");
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.events.EventDispatcher);
h.Camera = e;
})(a.media || (a.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var s = c.Debug.dummyConstructor, u = function(a) {
function e() {
s("public flash.media.ID3Info");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = "songName artist album year comment genre track".split(" ");
return e;
}(a.ASNative);
h.ID3Info = u;
})(h.media || (h.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.Debug.dummyConstructor, e = c.AVM2.Runtime.asCoerceString, m = function(a) {
function c() {
l("public flash.media.Microphone");
}
__extends(c, a);
Object.defineProperty(c, "names", {get:function() {
u("public flash.media.Microphone::get names");
return[];
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "isSupported", {get:function() {
u("public flash.media.Microphone::get isSupported");
return!1;
}, enumerable:!0, configurable:!0});
c.getMicrophone = function(a) {
p("public flash.media.Microphone::static getMicrophone");
};
c.getEnhancedMicrophone = function(a) {
p("public flash.media.Microphone::static getEnhancedMicrophone");
};
Object.defineProperty(c.prototype, "rate", {get:function() {
p("public flash.media.Microphone::get rate");
}, set:function(a) {
p("public flash.media.Microphone::set rate");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "codec", {get:function() {
p("public flash.media.Microphone::get codec");
}, set:function(a) {
e(a);
p("public flash.media.Microphone::set codec");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "framesPerPacket", {get:function() {
p("public flash.media.Microphone::get framesPerPacket");
}, set:function(a) {
p("public flash.media.Microphone::set framesPerPacket");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "encodeQuality", {get:function() {
p("public flash.media.Microphone::get encodeQuality");
}, set:function(a) {
p("public flash.media.Microphone::set encodeQuality");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "noiseSuppressionLevel", {get:function() {
p("public flash.media.Microphone::get noiseSuppressionLevel");
}, set:function(a) {
p("public flash.media.Microphone::set noiseSuppressionLevel");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "enableVAD", {get:function() {
p("public flash.media.Microphone::get enableVAD");
}, set:function(a) {
p("public flash.media.Microphone::set enableVAD");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "activityLevel", {get:function() {
p("public flash.media.Microphone::get activityLevel");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "gain", {get:function() {
p("public flash.media.Microphone::get gain");
}, set:function(a) {
p("public flash.media.Microphone::set gain");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "index", {get:function() {
p("public flash.media.Microphone::get index");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "muted", {get:function() {
p("public flash.media.Microphone::get muted");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "name", {get:function() {
p("public flash.media.Microphone::get name");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "silenceLevel", {get:function() {
p("public flash.media.Microphone::get silenceLevel");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "silenceTimeout", {get:function() {
p("public flash.media.Microphone::get silenceTimeout");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "useEchoSuppression", {get:function() {
p("public flash.media.Microphone::get useEchoSuppression");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "soundTransform", {get:function() {
p("public flash.media.Microphone::get soundTransform");
}, set:function(a) {
p("public flash.media.Microphone::set soundTransform");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "enhancedOptions", {get:function() {
p("public flash.media.Microphone::get enhancedOptions");
}, set:function(a) {
p("public flash.media.Microphone::set enhancedOptions");
}, enumerable:!0, configurable:!0});
c.prototype.setSilenceLevel = function(a, e) {
p("public flash.media.Microphone::setSilenceLevel");
};
c.prototype.setUseEchoSuppression = function(a) {
p("public flash.media.Microphone::setUseEchoSuppression");
};
c.prototype.setLoopBack = function(a) {
p("public flash.media.Microphone::setLoopBack");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.Microphone = m;
})(a.media || (a.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
function p(a, e) {
var d = document.createElement("audio");
d.canPlayType(a.mimeType) ? (d.preload = "metadata", d.src = URL.createObjectURL(new Blob([a.data], {type:a.mimeType})), d.load(), d.addEventListener("loadedmetadata", function() {
e({duration:1E3 * this.duration});
})) : e({duration:0});
}
var u = c.Debug.notImplemented, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.Telemetry, t = c.AVM2.ABC.Multiname, q = function() {
return function() {
};
}(), n = function(k) {
function f(a, b) {
h.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
this._isBuffering = this._isURLInaccessible = !1;
this.load(a, b);
}
__extends(f, k);
Object.defineProperty(f.prototype, "url", {get:function() {
return this._url;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "isURLInaccessible", {get:function() {
e("public flash.media.Sound::get isURLInaccessible");
return this._isURLInaccessible;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "length", {get:function() {
return this._length;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "isBuffering", {get:function() {
e("public flash.media.Sound::get isBuffering");
return this._isBuffering;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "bytesLoaded", {get:function() {
return this._bytesLoaded;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "bytesTotal", {get:function() {
return this._bytesTotal;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "id3", {get:function() {
return this._id3;
}, enumerable:!0, configurable:!0});
f.prototype.loadCompressedDataFromByteArray = function(a, b) {
u("public flash.media.Sound::loadCompressedDataFromByteArray");
};
f.prototype.loadPCMFromByteArray = function(a, b, e, c, f) {
void 0 === e && (e = "float");
l(e);
u("public flash.media.Sound::loadPCMFromByteArray");
};
f.prototype.play = function(d, b, e) {
void 0 === d && (d = 0);
void 0 === b && (b = 0);
void 0 === e && (e = null);
d = +d;
b |= 0;
var f = new h.media.SoundChannel;
f._sound = this;
f._soundTransform = c.isNullOrUndefined(e) ? new h.media.SoundTransform : e;
this._playQueue.push({channel:f, startTime:d});
if (a.disableAudioOption.value) {
return f;
}
this._soundData && (a.webAudioOption.value || a.webAudioMP3Option.value ? this._soundData.pcm ? f._playSoundDataViaChannel(this._soundData, d, b) : "audio/mpeg" === this._soundData.mimeType && a.webAudioMP3Option.value ? c.SWF.MP3DecoderSession.processAll(new Uint8Array(this._soundData.data)).then(function(a) {
this._soundData.pcm = a.data;
this._soundData.end = a.data.length;
f._playSoundDataViaChannel(this._soundData, d, b);
}.bind(this), function(a) {
console.warn("Unable to decode MP3 data: " + a);
}) : console.warn("Unable to decode packaged sound data of type: " + this._soundData.mimeType) : f._playSoundDataViaAudio(this._soundData, d, b));
return f;
};
f.prototype.close = function() {
e("public flash.media.Sound::close");
};
f.prototype.extract = function(a, b, e) {
u("public flash.media.Sound::extract");
};
f.prototype.load = function(d, b) {
if (d) {
var e = this, c = this._stream = new h.net.URLStream, f = new h.utils.ByteArray, k = 0, l = a.webAudioOption.value, m = null, n = new q;
n.completed = !1;
c.addEventListener("progress", function(a) {
e._bytesLoaded = a[t.getPublicQualifiedName("bytesLoaded")];
e._bytesTotal = a[t.getPublicQualifiedName("bytesTotal")];
l && !m && (m = decodeMP3(n, function(a, b) {
0 === e._length && (e._soundData = n, e._playQueue.forEach(function(a) {
a.channel._playSoundDataViaChannel(n, a.startTime);
}));
e._length = b ? 1E3 * a : 1E3 * Math.max(a, m.estimateDuration(e._bytesTotal));
}));
var b = c.bytesAvailable;
c.readBytes(f, k, b);
m && m.pushData(new Uint8Array(f._buffer, k, b));
k += b;
e.dispatchEvent(a);
});
c.addEventListener("complete", function(a) {
e.dispatchEvent(a);
n.data = f._buffer;
n.mimeType = "audio/mpeg";
n.completed = !0;
l || (e._soundData = n, p(n, function(a) {
e._length = a.duration;
}), e._playQueue.forEach(function(a) {
a.channel._playSoundDataViaAudio(n, a.startTime);
}));
m && m.close();
});
c.load(d);
}
};
f.classInitializer = null;
f.initializer = function(a) {
this._playQueue = [];
this._url = null;
this._bytesLoaded = this._bytesTotal = this._length = 0;
this._id3 = new h.media.ID3Info;
m.instance.reportTelemetry({topic:"feature", feature:5});
if (a) {
var b = new q;
b.sampleRate = a.sampleRate;
b.channels = a.channels;
b.completed = !0;
a.pcm && (b.pcm = a.pcm, b.end = a.pcm.length);
a.packaged && (b.data = a.packaged.data.buffer, b.mimeType = a.packaged.mimeType);
var e = this;
p(b, function(a) {
e._length = a.duration;
});
this._soundData = b;
}
};
f.classSymbols = null;
f.instanceSymbols = null;
return f;
}(h.events.EventDispatcher);
v.Sound = n;
n = function(a) {
function e(d) {
a.call(this, d, h.media.Sound);
}
__extends(e, a);
e.FromData = function(a) {
var b = new e(a);
b.channels = a.channels;
b.sampleRate = a.sampleRate;
b.pcm = a.pcm;
b.packaged = a.packaged;
return b;
};
return e;
}(c.Timeline.Symbol);
v.SoundSymbol = n;
})(h.media || (h.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.assert, u = c.Debug.dummyConstructor, l = c.Debug.somewhatImplemented, e = c.Debug.error, m = function() {
function a(e, c) {
this._sourceRate = e;
this._targetRate = c;
this._tail = [];
this._sourceOffset = 0;
}
a.prototype.getData = function(a, e) {
for (var d = this._sourceRate / this._targetRate, b = this._sourceOffset, c = Math.ceil((e - 1) * d + b) + 1, l = [], m = 0;m < a.length;m++) {
l.push(new Float32Array(c));
}
this.ondatarequested({data:l, count:c});
for (m = 0;m < a.length;m++) {
for (var h = a[m], n = l[m], q = 0;q < e;q++) {
var p = q * d + b, s = p | 0, t = Math.ceil(p) | 0, u = 0 > s ? this._tail[m] : n[s];
s === t ? h[q] = u : (p -= s, h[q] = u * (1 - p) + n[t] * p);
}
this._tail[m] = n[c - 1];
}
this._sourceOffset = (e - 1) * d + b - (c - 1);
};
return a;
}(), t = function() {
function a(e, c) {
var d = a._cachedContext;
d || (d = new AudioContext, a._cachedContext = d);
this._context = d;
this._contextSampleRate = d.sampleRate || 44100;
this._channels = c;
this._sampleRate = e;
this._contextSampleRate !== e && (this._resampler = new m(e, this._contextSampleRate), this._resampler.ondatarequested = function(a) {
this.requestData(a.data, a.count);
}.bind(this));
}
a.prototype.setVolume = function(a) {
};
a.prototype.start = function() {
var a = this._context.createScriptProcessor(2048, 0, this._channels), e = this;
a.onaudioprocess = function(a) {
for (var b = [], c = 0;c < e._channels;c++) {
b.push(a.outputBuffer.getChannelData(c));
}
a = b[0].length;
e._resampler ? e._resampler.getData(b, a) : e.requestData(b, a);
};
a.connect(this._context.destination);
this._source = a;
};
a.prototype.stop = function() {
this._source.disconnect(this._context.destination);
};
a.prototype.requestData = function(a, e) {
var d = this._channels, b = new Float32Array(e * d);
this.ondatarequested({data:b, count:b.length});
for (var c = 0, l = 0;c < e;c++) {
for (var m = 0;m < d;m++) {
a[m][c] = b[l++];
}
}
};
a.isSupported = function() {
return "undefined" !== typeof AudioContext;
};
return a;
}(), q = function(m) {
function k() {
u("public flash.media.SoundChannel");
}
__extends(k, m);
Object.defineProperty(k.prototype, "position", {get:function() {
return this._position;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "soundTransform", {get:function() {
return this._soundTransform;
}, set:function(e) {
l("public flash.media.SoundChannel::set soundTransform");
this._soundTransform = c.isNullOrUndefined(e) ? new a.media.SoundTransform : e;
h.SoundMixer._updateSoundSource(this);
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "leftPeak", {get:function() {
return this._leftPeak;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "rightPeak", {get:function() {
return this._rightPeak;
}, enumerable:!0, configurable:!0});
k.prototype.stop = function() {
this._element && (h.SoundMixer._unregisterSoundSource(this), this._element.loop = !1, this._element.pause(), this._element.removeAttribute("src"));
this._audioChannel && (h.SoundMixer._unregisterSoundSource(this), this._audioChannel.stop());
};
k.prototype._playSoundDataViaAudio = function(e, d, b) {
if (e.mimeType) {
h.SoundMixer._registerSoundSource(this);
this._position = d;
var c = this, k = 0, l = document.createElement("audio");
l.canPlayType(e.mimeType) ? (l.preload = "metadata", l.loop = 0 < b, l.src = URL.createObjectURL(new Blob([e.data], {type:e.mimeType})), l.addEventListener("loadeddata", function() {
l.currentTime = d / 1E3;
l.play();
}), l.addEventListener("timeupdate", function() {
var a = l.currentTime;
b && k > a && (--b, b || (l.loop = !1), a < d / 1E3 && (l.currentTime = d / 1E3));
c._position = 1E3 * (k = a);
}), l.addEventListener("ended", function() {
h.SoundMixer._unregisterSoundSource(c);
c.dispatchEvent(new a.events.Event("soundComplete", !1, !1));
c._element = null;
}), this._element = l, h.SoundMixer._updateSoundSource(this)) : console.error('ERROR: "' + e.mimeType + '" type playback is not supported by the browser');
}
};
k.prototype._playSoundDataViaChannel = function(c, d, b) {
p(c.pcm, "no pcm data found");
h.SoundMixer._registerSoundSource(this);
var g = this, k = Math.round(d / 1E3 * c.sampleRate) * c.channels, l = k;
this._position = d;
t.isSupported ? d = new t(c.sampleRate, c.channels) : (e("PCM data playback is not supported by the browser"), d = void 0);
this._audioChannel = d;
this._audioChannel.ondatarequested = function(d) {
var e = c.end;
if (l >= e && c.completed) {
h.SoundMixer._unregisterSoundSource(this), g._audioChannel.stop(), g.dispatchEvent(new a.events.Event("soundComplete", !1, !1));
} else {
var m = d.count;
d = d.data;
var n = c.pcm;
do {
for (var q = Math.min(e - l, m), p = 0;p < q;p++) {
d[p] = n[l++];
}
m -= q;
if (l >= e) {
if (!b) {
break;
}
b--;
l = k;
}
} while (0 < m);
g._position = l / c.sampleRate / c.channels * 1E3;
}
};
this._audioChannel.start();
h.SoundMixer._updateSoundSource(this);
};
k.prototype.stopSound = function() {
this.stop();
};
k.prototype.updateSoundLevels = function(a) {
this._element && (this._element.volume = 0 >= a ? 0 : 1 <= a ? 1 : a);
this._audioChannel && this._audioChannel.setVolume(a);
};
k.classInitializer = null;
k.initializer = function(e) {
this._element = null;
this._rightPeak = this._leftPeak = this._position = 0;
this._pcmData = null;
this._soundTransform = new a.media.SoundTransform;
};
k.classSymbols = null;
k.instanceSymbols = null;
return k;
}(a.events.EventDispatcher);
h.SoundChannel = q;
})(a.media || (a.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e(a, e) {
p("public flash.media.SoundLoaderContext");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.SoundLoaderContext = s;
})(h.media || (h.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = function(a) {
function m() {
u("public flash.media.SoundMixer");
}
__extends(m, a);
Object.defineProperty(m, "bufferTime", {get:function() {
p("public flash.media.SoundMixer::get bufferTime");
return m._bufferTime;
}, set:function(a) {
e("public flash.media.SoundMixer::set bufferTime");
m._bufferTime = a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m, "soundTransform", {get:function() {
e("public flash.media.SoundMixer::get soundTransform");
return c.isNullOrUndefined(m._soundTransform) ? new h.media.SoundTransform : new h.media.SoundTransform(m._soundTransform.volume, m._soundTransform.pan);
}, set:function(a) {
e("public flash.media.SoundMixer::set soundTransform");
m._soundTransform = c.isNullOrUndefined(a) ? new h.media.SoundTransform : a;
m._updateAllSoundSources();
}, enumerable:!0, configurable:!0});
Object.defineProperty(m, "audioPlaybackMode", {get:function() {
p("public flash.media.SoundMixer::get audioPlaybackMode");
}, set:function(a) {
l(a);
p("public flash.media.SoundMixer::set audioPlaybackMode");
}, enumerable:!0, configurable:!0});
Object.defineProperty(m, "useSpeakerphoneForVoice", {get:function() {
p("public flash.media.SoundMixer::get useSpeakerphoneForVoice");
}, set:function(a) {
p("public flash.media.SoundMixer::set useSpeakerphoneForVoice");
}, enumerable:!0, configurable:!0});
m.stopAll = function() {
m._registeredSoundSources.forEach(function(a) {
a.stopSound();
});
m._registeredSoundSources = [];
};
m.computeSpectrum = function(a, c, f) {
e("public flash.media.SoundMixer::static computeSpectrum");
c = new Float32Array(1024);
for (f = 0;1024 > f;f++) {
c[f] = Math.random();
}
a.writeRawBytes(c);
a.position = 0;
};
m.areSoundsInaccessible = function() {
p("public flash.media.SoundMixer::static areSoundsInaccessible");
};
m._getMasterVolume = function() {
return m._masterVolume;
};
m._setMasterVolume = function(a) {
m._masterVolume = +a;
m._updateAllSoundSources();
};
m._registerSoundSource = function(a) {
m._registeredSoundSources.push(a);
};
m._unregisterSoundSource = function(a) {
a = m._registeredSoundSources.indexOf(a);
0 <= a && m._registeredSoundSources.splice(a, 1);
};
m._updateSoundSource = function(a) {
var e = a.soundTransform.volume;
m._soundTransform && (e *= m._soundTransform.volume);
e *= m._getMasterVolume();
a.updateSoundLevels(e);
};
m._updateAllSoundSources = function() {
m._registeredSoundSources.forEach(m._updateSoundSource);
};
m.classInitializer = null;
m.initializer = null;
m.classSymbols = null;
m.instanceSymbols = null;
m._masterVolume = 1;
m._registeredSoundSources = [];
m._bufferTime = 0;
return m;
}(a.ASNative);
v.SoundMixer = m;
})(h.media || (h.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = c.Debug.somewhatImplemented, l = function(a) {
function c(a, e) {
p("public flash.media.SoundTransform");
}
__extends(c, a);
Object.defineProperty(c.prototype, "volume", {get:function() {
return this._volume;
}, set:function(a) {
this._volume = +a;
this._updateTransform();
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "leftToLeft", {get:function() {
return this._leftToLeft;
}, set:function(a) {
this._leftToLeft = +a;
this._updateTransform();
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "leftToRight", {get:function() {
return this._leftToRight;
}, set:function(a) {
this._leftToRight = +a;
this._updateTransform();
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "rightToRight", {get:function() {
return this._rightToRight;
}, set:function(a) {
this._rightToRight = +a;
this._updateTransform();
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "rightToLeft", {get:function() {
return this._rightToLeft;
}, set:function(a) {
this._rightToLeft = +a;
this._updateTransform();
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "pan", {get:function() {
return 0 === this._leftToRight && 0 === this._rightToLeft ? 1 - this._leftToLeft * this._leftToLeft : 0;
}, set:function(a) {
this.leftToLeft = Math.sqrt(1 - a);
this.leftToRight = 0;
this.rightToRight = Math.sqrt(1 + a);
this.rightToLeft = 0;
}, enumerable:!0, configurable:!0});
c.prototype._updateTransform = function() {
s("public flash.media.SoundTransform::_updateTransform");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.SoundTransform = l;
})(h.media || (h.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.media.StageVideo");
}
__extends(c, a);
Object.defineProperty(c.prototype, "viewPort", {get:function() {
p("public flash.media.StageVideo::get viewPort");
}, set:function(a) {
p("public flash.media.StageVideo::set viewPort");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "pan", {get:function() {
p("public flash.media.StageVideo::get pan");
}, set:function(a) {
p("public flash.media.StageVideo::set pan");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "zoom", {get:function() {
p("public flash.media.StageVideo::get zoom");
}, set:function(a) {
p("public flash.media.StageVideo::set zoom");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "depth", {get:function() {
p("public flash.media.StageVideo::get depth");
}, set:function(a) {
p("public flash.media.StageVideo::set depth");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "videoWidth", {get:function() {
p("public flash.media.StageVideo::get videoWidth");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "videoHeight", {get:function() {
p("public flash.media.StageVideo::get videoHeight");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "colorSpaces", {get:function() {
p("public flash.media.StageVideo::get colorSpaces");
}, enumerable:!0, configurable:!0});
c.prototype.attachNetStream = function(a) {
p("public flash.media.StageVideo::attachNetStream");
};
c.prototype.attachCamera = function(a) {
p("public flash.media.StageVideo::attachCamera");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.StageVideo = l;
})(a.media || (a.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.media.StageVideoAvailability");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.AVAILABLE = "available";
e.UNAVAILABLE = "unavailable";
return e;
}(a.ASNative);
h.StageVideoAvailability = s;
})(h.media || (h.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.Debug.assert, e = function(e) {
function c(e, l) {
void 0 === e && (e = 320);
void 0 === l && (l = 240);
a.display.DisplayObject.instanceConstructorNoInitialize.call(this);
e = e | 0 || 320;
l = l | 0 || 240;
this._setFillAndLineBoundsFromWidthAndHeight(20 * e, 20 * l);
}
__extends(c, e);
Object.defineProperty(c.prototype, "deblocking", {get:function() {
return this._deblocking;
}, set:function(a) {
this._deblocking = a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "smoothing", {get:function() {
return this._smoothing;
}, set:function(a) {
this._smoothing = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "videoWidth", {get:function() {
return this._videoWidth;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "videoHeight", {get:function() {
return this._videoHeight;
}, enumerable:!0, configurable:!0});
c.prototype._containsPointDirectly = function(a, e, c, f) {
l(this._getContentBounds().contains(a, e));
return!0;
};
c.prototype.clear = function() {
u("public flash.media.Video::clear");
};
c.prototype.attachNetStream = function(a) {
if (this._netStream !== a) {
this._netStream && (this._netStream._videoReferrer = null);
if (this._netStream = a) {
a._videoReferrer = this;
}
this._setDirtyFlags(33554432);
}
};
c.prototype.attachCamera = function(a) {
p("public flash.media.Video::attachCamera");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.display.DisplayObject);
h.Video = e;
})(a.media || (a.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.media.VideoStreamSettings");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.VideoStreamSettings = s;
})(h.media || (h.media = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = c.AVM2.Runtime.asCoerceString, l = function(a) {
function c(a, e, l) {
p("public flash.net.FileFilter");
}
__extends(c, a);
Object.defineProperty(c.prototype, "description", {get:function() {
return this._description;
}, set:function(a) {
this._description = s(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "extension", {get:function() {
return this._extension;
}, set:function(a) {
this._extension = s(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "macType", {get:function() {
return this._macType;
}, set:function(a) {
this._macType = s(a);
}, enumerable:!0, configurable:!0});
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.FileFilter = l;
})(h.net || (h.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.FileLoadingService, t = function(a) {
function c() {
u("public flash.net.LocalConnection");
}
__extends(c, a);
c.prototype.close = function() {
p("public flash.net.LocalConnection::close");
};
c.prototype.connect = function(a) {
l(a);
p("public flash.net.LocalConnection::connect");
};
Object.defineProperty(c.prototype, "domain", {get:function() {
e("public flash.net.LocalConnection::get domain");
var a = m.instance.resolveUrl("/");
return(a = /:\/\/(.+?)[:?#\/]/.exec(a)) && a[1];
}, enumerable:!0, configurable:!0});
c.prototype.send = function(a, e) {
l(a);
l(e);
p("public flash.net.LocalConnection::send");
};
Object.defineProperty(c.prototype, "client", {get:function() {
p("public flash.net.LocalConnection::get client");
}, set:function(a) {
p("public flash.net.LocalConnection::set client");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "isPerUser", {get:function() {
p("public flash.net.LocalConnection::get isPerUser");
}, set:function(a) {
p("public flash.net.LocalConnection::set isPerUser");
}, enumerable:!0, configurable:!0});
c.prototype.allowDomain = function() {
p("public flash.net.LocalConnection::allowDomain");
};
c.prototype.allowInsecureDomain = function() {
p("public flash.net.LocalConnection::allowInsecureDomain");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.LocalConnection = t;
})(a.net || (a.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.AVM2.Runtime.wrapJSObject, t = c.Telemetry, q = c.AVM2.AS.flash.events, n = function(a) {
function c() {
u("public flash.net.NetConnection");
}
__extends(c, a);
Object.defineProperty(c, "defaultObjectEncoding", {get:function() {
return c._defaultObjectEncoding;
}, set:function(a) {
c._defaultObjectEncoding = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "connected", {get:function() {
return this._connected;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "uri", {get:function() {
return this._uri;
}, enumerable:!0, configurable:!0});
c.prototype.connect = function(a) {
a = l(a);
e("public flash.net.NetConnection::connect");
if (this._uri = a) {
var b = RtmpJs.parseConnectionString(a);
if (!b || !b.host || "rtmp" !== b.protocol && "rtmpt" !== b.protocol && "rtmps" !== b.protocol) {
this.dispatchEvent(new q.NetStatusEvent(q.NetStatusEvent.NET_STATUS, !1, !1, m({level:"status", code:"NetConnection.Connect.Failed"})));
} else {
a = m({app:b.app, flashver:"MAC 11,6,602,180", swfUrl:"http://localhost:5080/demos/Something.swf", tcUrl:a, fpad:!1, audioCodecs:4095, videoCodecs:255, videoFunction:1, pageUrl:"http://localhost:5080/demos/Something.html", objectEncoding:0});
this._protocol = b.protocol;
var c = "rtmps" === b.protocol || "rtmpt" === b.protocol && (443 === b.port || 8443 === b.port);
this._usingTLS = c;
this._rtmpConnection = b = "rtmp" === b.protocol || "rtmps" === b.protocol ? new RtmpJs.Browser.RtmpTransport({host:b.host, port:b.port || 1935, ssl:c}) : new RtmpJs.Browser.RtmptTransport({host:b.host, port:b.port || 80, ssl:c});
this._rtmpCreateStreamCallbacks = [null, null];
b.onresponse = function(a) {
};
b.onevent = function(a) {
};
b.onconnected = function(a) {
this._connected = !0;
this.dispatchEvent(new q.NetStatusEvent(q.NetStatusEvent.NET_STATUS, !1, !1, m({level:"status", code:"NetConnection.Connect.Success"})));
}.bind(this);
b.onstreamcreated = function(a) {
console.log("#streamcreated: " + a.streamId);
var b = this._rtmpCreateStreamCallbacks[a.transactionId];
delete this._rtmpCreateStreamCallbacks[a.transactionId];
b(a.stream, a.streamId);
}.bind(this);
b.connect(a);
}
} else {
this._connected = !0, this.dispatchEvent(new q.NetStatusEvent(q.NetStatusEvent.NET_STATUS, !1, !1, m({level:"status", code:"NetConnection.Connect.Success"})));
}
};
c.prototype._createRtmpStream = function(a) {
var b = this._rtmpCreateStreamCallbacks.length;
this._rtmpCreateStreamCallbacks[b] = a;
this._rtmpConnection.createStream(b);
};
Object.defineProperty(c.prototype, "client", {get:function() {
return this._client;
}, set:function(a) {
this._client = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "objectEncoding", {get:function() {
return this._objectEncoding;
}, set:function(a) {
a >>>= 0;
e("public flash.net.NetConnection::set objectEncoding");
this._objectEncoding = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "proxyType", {get:function() {
return this._proxyType;
}, set:function(a) {
a = l(a);
e("public flash.net.NetConnection::set proxyType");
this._proxyType = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "connectedProxyType", {get:function() {
p("public flash.net.NetConnection::get connectedProxyType");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "usingTLS", {get:function() {
return this._usingTLS;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "protocol", {get:function() {
return this._protocol;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "maxPeerConnections", {get:function() {
p("public flash.net.NetConnection::get maxPeerConnections");
}, set:function(a) {
p("public flash.net.NetConnection::set maxPeerConnections");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "nearID", {get:function() {
p("public flash.net.NetConnection::get nearID");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "farID", {get:function() {
p("public flash.net.NetConnection::get farID");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "nearNonce", {get:function() {
p("public flash.net.NetConnection::get nearNonce");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "farNonce", {get:function() {
p("public flash.net.NetConnection::get farNonce");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "unconnectedPeerStreams", {get:function() {
p("public flash.net.NetConnection::get unconnectedPeerStreams");
}, enumerable:!0, configurable:!0});
c.prototype.ctor = function() {
this._uri = null;
this._connected = !1;
this._client = null;
this._proxyType = "none";
this._objectEncoding = c.defaultObjectEncoding;
this._usingTLS = !1;
this._protocol = null;
t.instance.reportTelemetry({topic:"feature", feature:6});
};
c.prototype.invoke = function(a) {
return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1));
};
c.prototype.invokeWithArgsArray = function(a, b) {
return this._invoke.call(this, a >>> 0, b);
};
c.prototype._invoke = function(a, b) {
var c = !1;
switch(a) {
case 2:
c = !0;
}
(c ? e : p)("private flash.net.NetConnection::_invoke (" + a + ")");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = ["close", "addHeader", "call"];
c._defaultObjectEncoding = 3;
return c;
}(a.events.EventDispatcher);
h.NetConnection = n;
})(a.net || (a.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.AVM2.Runtime.wrapJSObject, t = c.AVM2.AS.flash.events;
v = c.AVM2.AS.flash.net;
var q = c.AVM2.AS.flash.utils, n = c.FileLoadingService, k = c.AVM2.Runtime.AVM2, f = function(a) {
function d(a, e) {
void 0 === e && (e = "connectToFMS");
t.EventDispatcher.instanceConstructorNoInitialize.call(this);
this._connection = a;
this._peerID = l(e);
this._id = h.display.DisplayObject.getNextSyncID();
this._isDirty = !0;
this._soundTransform = new h.media.SoundTransform;
this._contentTypeHint = null;
this._checkPolicyFile = !0;
this._videoStream = new b;
this._videoStream._onEnsurePlay = function() {
this._notifyVideoControl(2, {paused:!1, time:NaN});
}.bind(this);
}
__extends(d, a);
d.prototype.dispose = function() {
p("public flash.net.NetStream::dispose");
};
d.prototype._getVideoStreamURL = function() {
return this._videoStream.url;
};
d.prototype.play = function(a) {
h.media.SoundMixer._registerSoundSource(this);
a = l(a);
k.instance.globals["Shumway.Player.Utils"].registerEventListener(this._id, this.processVideoEvent.bind(this));
this._connection && this._connection.uri ? this._videoStream.playInConnection(this._connection, a) : null !== a || this._connection ? this._videoStream.play(a, this.checkPolicyFile) : this._videoStream.openInDataGenerationMode();
this._notifyVideoControl(1, {url:this._videoStream.url});
};
d.prototype.play2 = function(a) {
p("public flash.net.NetStream::play2");
};
Object.defineProperty(d.prototype, "info", {get:function() {
p("public flash.net.NetStream::get info");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multicastInfo", {get:function() {
p("public flash.net.NetStream::get multicastInfo");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "soundTransform", {get:function() {
return this._soundTransform;
}, set:function(a) {
this._soundTransform = a;
h.media.SoundMixer._updateSoundSource(this);
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "checkPolicyFile", {get:function() {
return this._checkPolicyFile;
}, set:function(a) {
this._checkPolicyFile = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "client", {get:function() {
return this._client;
}, set:function(a) {
e("public flash.net.NetStream::set client");
this._client = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "objectEncoding", {get:function() {
p("public flash.net.NetStream::get objectEncoding");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multicastPushNeighborLimit", {get:function() {
p("public flash.net.NetStream::get multicastPushNeighborLimit");
}, set:function(a) {
p("public flash.net.NetStream::set multicastPushNeighborLimit");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multicastWindowDuration", {get:function() {
p("public flash.net.NetStream::get multicastWindowDuration");
}, set:function(a) {
p("public flash.net.NetStream::set multicastWindowDuration");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multicastRelayMarginDuration", {get:function() {
p("public flash.net.NetStream::get multicastRelayMarginDuration");
}, set:function(a) {
p("public flash.net.NetStream::set multicastRelayMarginDuration");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multicastAvailabilityUpdatePeriod", {get:function() {
p("public flash.net.NetStream::get multicastAvailabilityUpdatePeriod");
}, set:function(a) {
p("public flash.net.NetStream::set multicastAvailabilityUpdatePeriod");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multicastFetchPeriod", {get:function() {
p("public flash.net.NetStream::get multicastFetchPeriod");
}, set:function(a) {
p("public flash.net.NetStream::set multicastFetchPeriod");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multicastAvailabilitySendToAll", {get:function() {
p("public flash.net.NetStream::get multicastAvailabilitySendToAll");
}, set:function(a) {
p("public flash.net.NetStream::set multicastAvailabilitySendToAll");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "farID", {get:function() {
p("public flash.net.NetStream::get farID");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "nearNonce", {get:function() {
p("public flash.net.NetStream::get nearNonce");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "farNonce", {get:function() {
p("public flash.net.NetStream::get farNonce");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "peerStreams", {get:function() {
p("public flash.net.NetStream::get peerStreams");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "audioReliable", {get:function() {
p("public flash.net.NetStream::get audioReliable");
}, set:function(a) {
p("public flash.net.NetStream::set audioReliable");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "videoReliable", {get:function() {
p("public flash.net.NetStream::get videoReliable");
}, set:function(a) {
p("public flash.net.NetStream::set videoReliable");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "dataReliable", {get:function() {
p("public flash.net.NetStream::get dataReliable");
}, set:function(a) {
p("public flash.net.NetStream::set dataReliable");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "audioSampleAccess", {get:function() {
p("public flash.net.NetStream::get audioSampleAccess");
}, set:function(a) {
p("public flash.net.NetStream::set audioSampleAccess");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "videoSampleAccess", {get:function() {
p("public flash.net.NetStream::get videoSampleAccess");
}, set:function(a) {
p("public flash.net.NetStream::set videoSampleAccess");
}, enumerable:!0, configurable:!0});
d.prototype.appendBytes = function(a) {
a = new Uint8Array(a._buffer, 0, a.length);
this._videoStream.appendBytes(a);
};
d.prototype.appendBytesAction = function(a) {
this._videoStream.appendBytesAction(a);
};
Object.defineProperty(d.prototype, "useHardwareDecoder", {get:function() {
p("public flash.net.NetStream::get useHardwareDecoder");
}, set:function(a) {
p("public flash.net.NetStream::set useHardwareDecoder");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "useJitterBuffer", {get:function() {
p("public flash.net.NetStream::get useJitterBuffer");
}, set:function(a) {
p("public flash.net.NetStream::set useJitterBuffer");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "videoStreamSettings", {get:function() {
p("public flash.net.NetStream::get videoStreamSettings");
}, set:function(a) {
p("public flash.net.NetStream::set videoStreamSettings");
}, enumerable:!0, configurable:!0});
d.prototype.invoke = function(a) {
return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1));
};
d.prototype.invokeWithArgsArray = function(a, b) {
return this._invoke.call(this, a >>> 0, b);
};
Object.defineProperty(d.prototype, "inBufferSeek", {get:function() {
return this._inBufferSeek;
}, set:function(a) {
this._inBufferSeek = !!a;
}, enumerable:!0, configurable:!0});
d.prototype._invoke = function(a, b) {
var d = !1, c;
switch(a) {
case 4:
this._videoStream.bufferTime = b[0];
d = !0;
break;
case 202:
switch(b[1]) {
case "pause":
d = !0;
this._notifyVideoControl(2, {paused:!!b[3], time:b[4] / 1E3});
break;
case "seek":
d = !0, this._notifyVideoControl(3, {time:b[3] / 1E3});
}
break;
case 300:
c = this._notifyVideoControl(4, null);
d = !0;
break;
case 302:
c = this._videoStream.bufferTime;
d = !0;
break;
case 303:
c = this._notifyVideoControl(5, null);
d = !0;
break;
case 305:
c = this._notifyVideoControl(7, null);
d = !0;
break;
case 306:
c = this._notifyVideoControl(8, null), d = !0;
}
(d ? e : p)("NetStream._invoke (" + a + ")");
return c;
};
d.prototype._notifyVideoControl = function(a, b) {
return k.instance.globals["Shumway.Player.Utils"].notifyVideoControl(this._id, a, b);
};
d.prototype.processVideoEvent = function(a, b) {
this._videoStream.processVideoPlaybackEvent(a, b);
switch(a) {
case 0:
h.media.SoundMixer._updateSoundSource(this);
break;
case 1:
this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Play.Start", level:"status"})));
break;
case 2:
this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Play.Stop", level:"status"})));
h.media.SoundMixer._unregisterSoundSource(this);
break;
case 3:
this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Buffer.Full", level:"status"})));
break;
case 5:
this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Buffer.Empty", level:"status"})));
break;
case 6:
this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:4 === b.code ? "NetStream.Play.NoSupportedTrackFound" : 3 === b.code ? "NetStream.Play.FileStructureInvalid" : "NetStream.Play.StreamNotFound", level:"error"})));
break;
case 8:
this.dispatchEvent(new t.NetStatusEvent(t.NetStatusEvent.NET_STATUS, !1, !1, m({code:"NetStream.Seek.Notify", level:"status"})));
break;
case 7:
if (this._client) {
var d = {};
d.asSetPublicProperty("width", b.videoWidth);
d.asSetPublicProperty("height", b.videoHeight);
d.asSetPublicProperty("duration", b.duration);
this._client.asCallPublicProperty("onMetaData", [d]);
}
;
}
};
d.prototype.stopSound = function() {
this.pause();
};
d.prototype.updateSoundLevels = function(a) {
this._notifyVideoControl(6, {volume:a});
};
d.classInitializer = null;
d.initializer = null;
d.classSymbols = null;
d.instanceSymbols = null;
d.DIRECT_CONNECTIONS = "directConnections";
d.CONNECT_TO_FMS = "connectToFMS";
return d;
}(h.events.EventDispatcher);
v.NetStream = f;
var d;
(function(a) {
a[a.CLOSED = 0] = "CLOSED";
a[a.OPENED = 1] = "OPENED";
a[a.ENDED = 2] = "ENDED";
a[a.OPENED_DATA_GENERATION = 3] = "OPENED_DATA_GENERATION";
a[a.ERROR = 4] = "ERROR";
})(d || (d = {}));
var b = function() {
function b() {
this._domReady = new c.PromiseWrapper;
this._metadataReady = new c.PromiseWrapper;
this._started = !1;
this._buffer = "empty";
this._bufferTime = .1;
this._contentTypeHint = this._mediaSourceBuffer = this._mediaSource = this._url = null;
this._state = 0;
}
Object.defineProperty(b.prototype, "state", {get:function() {
return this._state;
}, enumerable:!0, configurable:!0});
Object.defineProperty(b.prototype, "bufferTime", {get:function() {
return this._bufferTime;
}, enumerable:!0, configurable:!0});
Object.defineProperty(b.prototype, "url", {get:function() {
return this._url;
}, enumerable:!0, configurable:!0});
b.prototype.play = function(b, d) {
u(0 === this._state);
this._state = 1;
var c = a.mediaSourceOption.value;
c && "undefined" === typeof MediaSource && (console.warn("MediaSource API is not enabled, falling back to regular playback"), c = !1);
if (c) {
var g = new MediaSource;
g.addEventListener("sourceopen", function(a) {
this._mediaSource = g;
}.bind(this));
g.addEventListener("sourceend", function(a) {
this._mediaSource = null;
}.bind(this));
if (b) {
this._url = URL.createObjectURL(g);
c = new v.URLRequest(b);
c._checkPolicyFile = d;
var f = new v.URLStream;
f.addEventListener("httpStatus", function(a) {
if (a = a.asGetPublicProperty("responseHeaders").filter(function(a) {
return "Content-Type" === a.asGetPublicProperty("name");
})[0]) {
a = a.asGetPublicProperty("value"), "application/octet-stream" !== a && (this._contentTypeHint = a);
}
}.bind(this));
f.addEventListener("progress", function(a) {
a = f.bytesAvailable;
var b = new q.ByteArray;
f.readBytes(b, 0, a);
a = new Uint8Array(b._buffer, 0, b.length);
this.appendBytes(a);
}.bind(this));
f.addEventListener("complete", function(a) {
this.appendBytesAction("endSequence");
}.bind(this));
f.load(c);
} else {
this._url = null;
}
} else {
e("public flash.net.NetStream::play"), this._url = n.instance.resolveUrl(b);
}
};
b.prototype.playInConnection = function(a, b) {
this.openInDataGenerationMode();
var d = this, e, c = {packets:0, init:function(a) {
if (a.asGetPublicProperty("audiocodecid") || a.asGetPublicProperty("videocodecid")) {
a = RtmpJs.MP4.parseFLVMetadata(a), e = new RtmpJs.MP4.MP4Mux(a), e.ondata = function(a) {
d.appendBytes(new Uint8Array(a));
}.bind(this);
}
}, packet:function(a, b, d) {
e.pushPacket(a, new Uint8Array(b), d);
}, generate:function() {
e.flush();
}};
a._createRtmpStream(function(a, d) {
a.ondata = function(a) {
console.log("#packet (" + a.typeId + "): @" + a.timestamp);
0 < a.data.length && c.packet(a.typeId, a.data, a.timestamp);
};
a.oncallback = function() {
console.log("#callback");
};
a.onscriptdata = function(a, b) {
console.log("#object: " + a);
"onMetaData" === a && c.init(b);
};
a.play(b);
});
};
b.prototype.openInDataGenerationMode = function() {
u(0 === this._state);
this._state = 3;
var a = new MediaSource;
a.addEventListener("sourceopen", function(b) {
this._mediaSource = a;
this._ensurePlaying();
}.bind(this));
a.addEventListener("sourceend", function(a) {
this._mediaSource = null;
}.bind(this));
this._url = URL.createObjectURL(a);
};
b.prototype.appendBytes = function(a) {
u(3 === this._state || 1 === this._state);
if (this._mediaSource) {
if (!this._mediaSourceBuffer) {
var b = this._contentTypeHint || 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"';
this._mediaSourceBufferLock = Promise.resolve(void 0);
this._mediaSourceBuffer = this._mediaSource.addSourceBuffer(b);
}
var d = this._mediaSourceBuffer;
this._mediaSourceBufferLock = this._mediaSourceBufferLock.then(function() {
d.appendBuffer(a);
return new Promise(function(a) {
d.addEventListener("update", function M() {
d.removeEventListener("update", M);
a();
});
});
});
}
e("public flash.net.NetStream::appendBytes");
};
b.prototype.appendBytesAction = function(a) {
u(3 === this._state || 1 === this._state);
a = l(a);
"endSequence" === a && this._mediaSourceBufferLock.then(function() {
this._mediaSource && this._mediaSource.endOfStream();
this.close();
}.bind(this));
e("public flash.net.NetStream::appendBytesAction");
};
b.prototype.close = function() {
this._state = 0;
};
b.prototype._ensurePlaying = function() {
this._onEnsurePlay && this._onEnsurePlay();
};
b.prototype._detectContentType = function(a) {
return'video/mp4; codecs="avc1.42E01E, mp4a.40.2"';
};
b.prototype.processVideoPlaybackEvent = function(a, b) {
switch(a) {
case 0:
this._domReady.resolve(void 0);
break;
case 1:
if (this._started) {
break;
}
this._started = !0;
break;
case 2:
this._started = !1;
break;
case 3:
this._buffer = "full";
break;
case 4:
this._buffer = "progress";
break;
case 5:
this._buffer = "empty";
break;
case 7:
this._metadataReady.resolve({videoWidth:b.videoWidth, videoHeight:b.videoHeight});
}
};
return b;
}();
})(h.net || (h.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = c.AVM2.Runtime.asCoerceString, l = function(a) {
function c(a, e, l, k, f, d, b, g, m, h, v, A, B, M, N, K, y, D, L, H, J, C, E, F, I) {
void 0 === E && (E = null);
void 0 === F && (F = null);
s(E);
s(F);
p("public flash.net.NetStreamInfo");
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.NetStreamInfo = l;
})(h.net || (h.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e(a, e, c, l, k, f, d, b, g, h, w, s, u, v, M, N, K, y, D) {
p("public flash.net.NetStreamMulticastInfo");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.NetStreamMulticastInfo = s;
})(h.net || (h.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e() {
p("public flash.net.NetStreamPlayOptions");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.events.EventDispatcher);
h.NetStreamPlayOptions = u;
})(a.net || (a.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e(a, e) {
p("public flash.net.Responder");
}
__extends(e, a);
e.prototype.ctor = function(a, e) {
this._result = a;
this._status = e;
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.Responder = s;
})(h.net || (h.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.AVM2.Runtime.asCoerceString, l = c.Debug.somewhatImplemented, e = function(e) {
function h() {
a.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
this._data = Object.create(null);
}
__extends(h, e);
h.deleteAll = function(a) {
u(a);
p("public flash.net.SharedObject::static deleteAll");
};
h.getDiskUsage = function(a) {
u(a);
p("public flash.net.SharedObject::static getDiskUsage");
};
h._create = function(a, e) {
var k = new h;
k._path = a;
k._data = e;
k._objectEncoding = h._defaultObjectEncoding;
c.Telemetry.instance.reportTelemetry({topic:"feature", feature:3});
return k;
};
h.getLocal = function(a, e, c) {
void 0 === e && (e = null);
a = u(a);
e = u(e);
a = (e || "") + "/" + a;
if (h._sharedObjects[a]) {
return h._sharedObjects[a];
}
e = sessionStorage.getItem(a);
e = h._create(a, e ? JSON.parse(e) : {});
return h._sharedObjects[a] = e;
};
h.getRemote = function(a, e, c, f) {
void 0 === e && (e = null);
u(a);
u(e);
p("public flash.net.SharedObject::static getRemote");
};
Object.defineProperty(h, "defaultObjectEncoding", {get:function() {
return h._defaultObjectEncoding;
}, set:function(a) {
h._defaultObjectEncoding = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "data", {get:function() {
return this._data;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "objectEncoding", {get:function() {
return this._objectEncoding;
}, set:function(a) {
this._objectEncoding = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "client", {get:function() {
p("public flash.net.SharedObject::get client");
}, set:function(a) {
p("public flash.net.SharedObject::set client");
}, enumerable:!0, configurable:!0});
h.prototype.setDirty = function(a) {
u(a);
l("public flash.net.SharedObject::setDirty");
};
h.prototype.invoke = function(a) {
return this._invoke(a >>> 0, Array.prototype.slice.call(arguments, 1));
};
h.prototype.invokeWithArgsArray = function(a, e) {
return this._invoke(a >>> 0, e);
};
h.prototype._invoke = function(a, e) {
var c = !1, f;
switch(a) {
case 4:
f = JSON.stringify(this._data).length - 2;
c = !0;
break;
case 6:
this._data = {};
sessionStorage.removeItem(this._path);
c = !0;
break;
case 2:
sessionStorage.setItem(this._path, JSON.stringify(this._data));
f = c = !0;
break;
case 3:
c = !0;
}
(c ? l : p)("private flash.net.SharedObject::_invoke (" + a + ")");
return f;
};
h.classInitializer = null;
h.initializer = null;
h.classSymbols = null;
h.instanceSymbols = null;
h._sharedObjects = Object.create(null);
h._defaultObjectEncoding = 3;
return h;
}(a.events.EventDispatcher);
h.SharedObject = e;
})(a.net || (a.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.AVM2.Errors, t = c.AVM2.Runtime.throwError, q = function(a) {
function c(a, d) {
void 0 === a && (a = null);
l(a);
u("public flash.net.Socket");
}
__extends(c, a);
Object.defineProperty(c.prototype, "bytesAvailable", {get:function() {
p("public flash.net.Socket::get bytesAvailable");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "connected", {get:function() {
p("public flash.net.Socket::get connected");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "objectEncoding", {get:function() {
p("public flash.net.Socket::get objectEncoding");
}, set:function(a) {
p("public flash.net.Socket::set objectEncoding");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "endian", {get:function() {
p("public flash.net.Socket::get endian");
}, set:function(a) {
l(a);
p("public flash.net.Socket::set endian");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "bytesPending", {get:function() {
p("public flash.net.Socket::get bytesPending");
}, enumerable:!0, configurable:!0});
c.prototype.readBytes = function(a, d, b) {
p("public flash.net.Socket::readBytes");
};
c.prototype.writeBytes = function(a, d, b) {
p("public flash.net.Socket::writeBytes");
};
c.prototype.writeBoolean = function(a) {
p("public flash.net.Socket::writeBoolean");
};
c.prototype.writeByte = function(a) {
p("public flash.net.Socket::writeByte");
};
c.prototype.writeShort = function(a) {
p("public flash.net.Socket::writeShort");
};
c.prototype.writeInt = function(a) {
p("public flash.net.Socket::writeInt");
};
c.prototype.writeUnsignedInt = function(a) {
p("public flash.net.Socket::writeUnsignedInt");
};
c.prototype.writeFloat = function(a) {
p("public flash.net.Socket::writeFloat");
};
c.prototype.writeDouble = function(a) {
p("public flash.net.Socket::writeDouble");
};
c.prototype.writeMultiByte = function(a, d) {
l(a);
l(d);
p("public flash.net.Socket::writeMultiByte");
};
c.prototype.writeUTF = function(a) {
l(a);
p("public flash.net.Socket::writeUTF");
};
c.prototype.writeUTFBytes = function(a) {
l(a);
p("public flash.net.Socket::writeUTFBytes");
};
c.prototype.readBoolean = function() {
p("public flash.net.Socket::readBoolean");
};
c.prototype.readByte = function() {
p("public flash.net.Socket::readByte");
};
c.prototype.readUnsignedByte = function() {
p("public flash.net.Socket::readUnsignedByte");
};
c.prototype.readShort = function() {
p("public flash.net.Socket::readShort");
};
c.prototype.readUnsignedShort = function() {
p("public flash.net.Socket::readUnsignedShort");
};
c.prototype.readInt = function() {
p("public flash.net.Socket::readInt");
};
c.prototype.readUnsignedInt = function() {
p("public flash.net.Socket::readUnsignedInt");
};
c.prototype.readFloat = function() {
p("public flash.net.Socket::readFloat");
};
c.prototype.readDouble = function() {
p("public flash.net.Socket::readDouble");
};
c.prototype.readMultiByte = function(a, d) {
l(d);
p("public flash.net.Socket::readMultiByte");
};
c.prototype.readUTF = function() {
p("public flash.net.Socket::readUTF");
};
c.prototype.readUTFBytes = function(a) {
p("public flash.net.Socket::readUTFBytes");
};
c.prototype.flush = function() {
p("public flash.net.Socket::flush");
};
c.prototype.writeObject = function(a) {
p("public flash.net.Socket::writeObject");
};
c.prototype.readObject = function() {
p("public flash.net.Socket::readObject");
};
c.prototype.internalGetSecurityErrorMessage = function(a, d) {
l(a);
e("flash.net.Socket::internalGetSecurityErrorMessage");
return "SecurityErrorEvent";
};
c.prototype.internalConnect = function(a, d) {
a = l(a);
d |= 0;
e("flash.net.Socket::internalConnect");
t("SecurityError", m.SocketConnectError, a, d);
};
c.prototype.didFailureOccur = function() {
e("flash.net.Socket::didFailureOccur");
return!0;
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.Socket = q;
})(a.net || (a.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = a.events.Event, u = a.events.IOErrorEvent, l = a.events.ProgressEvent, e = a.events.HTTPStatusEvent, m = a.events.SecurityErrorEvent, t = function(q) {
function n(c) {
a.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
var f = this._stream = new h.URLStream;
f.addEventListener(p.OPEN, this.onStreamOpen.bind(this));
f.addEventListener(p.COMPLETE, this.onStreamComplete.bind(this));
f.addEventListener(l.PROGRESS, this.onStreamProgress.bind(this));
f.addEventListener(u.IO_ERROR, this.onStreamIOError.bind(this));
f.addEventListener(e.HTTP_STATUS, this.onStreamHTTPStatus.bind(this));
f.addEventListener(e.HTTP_RESPONSE_STATUS, this.onStreamHTTPResponseStatus.bind(this));
f.addEventListener(m.SECURITY_ERROR, this.onStreamSecurityError.bind(this));
this.$BgdataFormat = "text";
c && this.load(c);
}
__extends(n, q);
Object.defineProperty(n.prototype, "data", {get:function() {
return this.$Bgdata;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "dataFormat", {get:function() {
return this.$BgdataFormat;
}, set:function(a) {
c.Debug.assert("string" === typeof a);
this.$BgdataFormat = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "bytesLoaded", {get:function() {
return this.$BgbytesLoaded;
}, enumerable:!0, configurable:!0});
Object.defineProperty(n.prototype, "bytesTotal", {get:function() {
return this.$BgbytesTotal;
}, enumerable:!0, configurable:!0});
n.prototype.load = function(a) {
this._stream.load(a);
};
n.prototype.close = function() {
this._stream.close();
};
n.prototype.complete = function() {
var e = new a.utils.ByteArray;
this._stream.readBytes(e);
if ("binary" === this.$BgdataFormat) {
this.$Bgdata = e;
} else {
var c = e.toString();
0 < e.length && "variables" === this.$BgdataFormat ? (e = new h.URLVariables, this._ignoreDecodeErrors && (e._ignoreDecodingErrors = !0), e.decode(String(c)), this.$Bgdata = e) : this.$Bgdata = c;
}
};
n.prototype.addEventListener = function(a, c, d, b, g) {
q.prototype.addEventListener.call(this, a, c, d, b, g);
a === e.HTTP_RESPONSE_STATUS && (this._httpResponseEventBound = !0);
};
n.prototype.onStreamOpen = function(a) {
this.dispatchEvent(a);
};
n.prototype.onStreamComplete = function(a) {
this.complete();
this.dispatchEvent(a);
};
n.prototype.onStreamProgress = function(a) {
this.$BgbytesLoaded = a.bytesLoaded;
this.$BgbytesTotal = a.bytesTotal;
this.dispatchEvent(a);
};
n.prototype.onStreamIOError = function(a) {
this.complete();
this.dispatchEvent(a);
};
n.prototype.onStreamHTTPStatus = function(a) {
this.dispatchEvent(a);
};
n.prototype.onStreamHTTPResponseStatus = function(a) {
this._httpResponseEventBound && this.dispatchEvent(a);
};
n.prototype.onStreamSecurityError = function(a) {
this.dispatchEvent(a);
};
n.classInitializer = null;
n.initializer = null;
n.classSymbols = null;
n.instanceSymbols = null;
return n;
}(a.events.EventDispatcher);
h.URLLoader = t;
})(a.net || (a.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
(function(v) {
var p = c.AVM2.Runtime.asCoerceString, u = c.AVM2.Runtime.throwError, l = function(a) {
function c(a) {
void 0 === a && (a = null);
this._url = p(a);
}
__extends(c, a);
Object.defineProperty(c.prototype, "url", {get:function() {
return this._url;
}, set:function(a) {
this._url = a = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "data", {get:function() {
return this._data;
}, set:function(a) {
this._data = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "method", {get:function() {
return this._method;
}, set:function(a) {
a = p(a);
"get" !== a && "GET" !== a && "post" !== a && "POST" !== a && u("ArgumentError", h.Errors.InvalidArgumentError);
this._method = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "contentType", {get:function() {
return this._contentType;
}, set:function(a) {
this._contentType = a = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "requestHeaders", {get:function() {
return this._requestHeaders;
}, set:function(a) {
Array.isArray(a) || u("ArgumentError", h.Errors.InvalidArgumentError, "value");
this._requestHeaders = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "digest", {get:function() {
return this._digest;
}, set:function(a) {
this._digest = a = p(a);
}, enumerable:!0, configurable:!0});
c.prototype._toFileRequest = function() {
var a = {};
a.url = this._url;
a.method = this._method;
a.checkPolicyFile = this._checkPolicyFile;
if (this._data) {
if (a.mimeType = this._contentType, s.utils.ByteArray.isType(this._data)) {
a.data = new Uint8Array(this._data._buffer, 0, this._data.length);
} else {
var e = this._data.asGetPublicProperty("toString").call(this._data);
if ("GET" === this._method) {
var c = a.url.lastIndexOf("?");
a.url = (0 > c ? a.url : a.url.substring(0, c)) + "?" + e;
} else {
a.data = e;
}
}
}
return a;
};
c.classInitializer = null;
c.initializer = function() {
this._url = null;
this._method = "GET";
this._digest = this._data = null;
this._contentType = "application/x-www-form-urlencoded";
this._requestHeaders = [];
this._checkPolicyFile = !0;
};
c.classSymbols = null;
c.bindings = null;
return c;
}(a.ASNative);
v.URLRequest = l;
})(s.net || (s.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.AVM2.Runtime.asCoerceString, s = function(a) {
function e(a, e) {
void 0 === a && (a = "");
void 0 === e && (e = "");
p(a);
p(e);
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = ["name!", "value!"];
return e;
}(a.ASNative);
h.URLRequestHeader = s;
})(h.net || (h.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.FileLoadingService, m = c.AVM2.Runtime.throwError, t = c.AVM2.AS.flash.utils, q = function(c) {
function k() {
u("public flash.net.URLStream");
}
__extends(k, c);
Object.defineProperty(k.prototype, "connected", {get:function() {
return this._connected;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "bytesAvailable", {get:function() {
return this._buffer.length - this._buffer.position;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "objectEncoding", {get:function() {
return this._buffer.objectEncoding;
}, set:function(a) {
this._buffer.objectEncoding = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "endian", {get:function() {
return this._buffer.endian;
}, set:function(a) {
a = l(a);
this._buffer.endian = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "diskCacheEnabled", {get:function() {
p("public flash.net.URLStream::get diskCacheEnabled");
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "position", {get:function() {
return this._buffer.position;
}, set:function(a) {
this._buffer.position = +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "length", {get:function() {
return this._buffer.length;
}, enumerable:!0, configurable:!0});
k.prototype.load = function(c) {
var d = a.events.Event, b = a.events.IOErrorEvent, g = a.events.ProgressEvent, k = a.events.HTTPStatusEvent, l = e.instance.createSession(), h = this;
l.onprogress = function(a, b) {
var d = h._buffer.position;
h._buffer.position = h._writePosition;
h._buffer.writeRawBytes(a);
h._writePosition = h._buffer.position;
h._buffer.position = d;
h.dispatchEvent(new g(g.PROGRESS, !1, !1, b.bytesLoaded, b.bytesTotal));
};
l.onerror = function(a) {
h._connected = !1;
h.dispatchEvent(new b(b.IO_ERROR, !1, !1, a));
};
l.onopen = function() {
h._connected = !0;
h.dispatchEvent(new d(d.OPEN, !1, !1));
};
l.onhttpstatus = function(b, d, e) {
d = new k(k.HTTP_STATUS, !1, !1, d);
var c = [];
e.split(/(?:\n|\r?\n)/g).forEach(function(d) {
if (d = /^([^:]+): (.*)$/.exec(d)) {
c.push(new a.net.URLRequestHeader(d[1], d[2])), "Location" === d[1] && (b = d[2]);
}
});
d.asSetPublicProperty("responseHeaders", c);
d.asSetPublicProperty("responseURL", b);
h.dispatchEvent(d);
};
l.onclose = function() {
h._connected = !1;
h.dispatchEvent(new d(d.COMPLETE, !1, !1));
};
l.open(c._toFileRequest());
this._session = l;
};
k.prototype.readBytes = function(a, d, b) {
void 0 === d && (d = 0);
void 0 === b && (b = 0);
d >>>= 0;
b >>>= 0;
0 > b && m("ArgumentError", h.Errors.InvalidArgumentError, "length");
this._buffer.readBytes(a, d, b);
};
k.prototype.readBoolean = function() {
p("public flash.net.URLStream::readBoolean");
};
k.prototype.readByte = function() {
return this._buffer.readByte();
};
k.prototype.readUnsignedByte = function() {
p("public flash.net.URLStream::readUnsignedByte");
};
k.prototype.readShort = function() {
p("public flash.net.URLStream::readShort");
};
k.prototype.readUnsignedShort = function() {
return this._buffer.readUnsignedShort();
};
k.prototype.readUnsignedInt = function() {
p("public flash.net.URLStream::readUnsignedInt");
};
k.prototype.readInt = function() {
p("public flash.net.URLStream::readInt");
};
k.prototype.readFloat = function() {
p("public flash.net.URLStream::readFloat");
};
k.prototype.readDouble = function() {
p("public flash.net.URLStream::readDouble");
};
k.prototype.readMultiByte = function(a, d) {
l(d);
p("public flash.net.URLStream::readMultiByte");
};
k.prototype.readUTF = function() {
return this._buffer.readUTF();
};
k.prototype.readUTFBytes = function(a) {
return this._buffer.readUTFBytes(a);
};
k.prototype.close = function() {
this._session.close();
};
k.prototype.readObject = function() {
p("public flash.net.URLStream::readObject");
};
k.prototype.stop = function() {
p("public flash.net.URLStream::stop");
};
k.classInitializer = null;
k.initializer = function() {
this._buffer = new t.ByteArray;
this._writePosition = 0;
this._connected = !1;
};
k.classSymbols = null;
k.instanceSymbols = null;
return k;
}(a.events.EventDispatcher);
v.URLStream = q;
})(a.net || (a.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
(function(s) {
var p = c.AVM2.Runtime.asCoerceString, u = function(a) {
function e(a) {
void 0 === a && (a = null);
this._ignoreDecodingErrors = !1;
a && this.decode(a);
}
__extends(e, a);
e.prototype.decode = function(a) {
a = p(a);
a = a.split("&");
for (var e = 0;e < a.length;e++) {
var c = a[e], l = c.indexOf("=");
0 > l && (this._ignoreDecodingErrors ? l = c.length : throwError("Error", h.Errors.DecodeParamError));
var k = unescape(c.substring(0, l).split("+").join(" ")), c = unescape(c.substring(l + 1).split("+").join(" ")), l = this.asGetPublicProperty(k);
"undefined" === typeof l ? this.asSetPublicProperty(k, c) : Array.isArray(l) ? l.push(c) : this.asSetPublicProperty(k, [l, c]);
}
};
e.prototype.toString = function() {
for (var a = [], e = this.asGetEnumerableKeys(), c = 0;c < e.length;c++) {
var l = e[c].split(" ").join("+"), k = this.asGetPublicProperty(l), l = escape(l).split(" ").join("+");
if (Array.isArray(k)) {
for (var f = 0;f < k.length;f++) {
a.push(l + "=" + escape(k[f]));
}
} else {
a.push(l + "=" + escape(k));
}
}
return a.join("&");
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
s.URLVariables = u;
})(s.net || (s.net = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.sensors.Accelerometer");
}
__extends(c, a);
Object.defineProperty(c.prototype, "isSupported", {get:function() {
p("public flash.sensors.Accelerometer::get isSupported");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "muted", {get:function() {
p("public flash.sensors.Accelerometer::get muted");
}, enumerable:!0, configurable:!0});
c.prototype.setRequestedUpdateInterval = function(a) {
p("public flash.sensors.Accelerometer::setRequestedUpdateInterval");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.Accelerometer = l;
})(a.sensors || (a.sensors = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.sensors.Geolocation");
}
__extends(c, a);
Object.defineProperty(c.prototype, "isSupported", {get:function() {
p("public flash.sensors.Geolocation::get isSupported");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "muted", {get:function() {
p("public flash.sensors.Geolocation::get muted");
}, enumerable:!0, configurable:!0});
c.prototype.setRequestedUpdateInterval = function(a) {
p("public flash.sensors.Geolocation::setRequestedUpdateInterval");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.Geolocation = l;
})(a.sensors || (a.sensors = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.AVM2.Runtime.asCoerceString, l = c.AVM2.Runtime.AVM2, e = c.AVM2.Runtime.ApplicationDomain, m = c.AVM2.ABC.Multiname, t = function(a) {
function c(a) {
void 0 === a && (a = null);
a instanceof e ? this._runtimeDomain = a : (a = a ? a._runtimeDomain : l.currentDomain().system, this._runtimeDomain = new e(a.vm, a, 2, !1));
}
__extends(c, a);
Object.defineProperty(c, "currentDomain", {get:function() {
return new c(l.currentDomain());
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "MIN_DOMAIN_MEMORY_LENGTH", {get:function() {
p("public flash.system.ApplicationDomain::get MIN_DOMAIN_MEMORY_LENGTH");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "parentDomain", {get:function() {
return this._runtimeDomain.base ? new c(this._runtimeDomain.base) : null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "domainMemory", {get:function() {
p("public flash.system.ApplicationDomain::get domainMemory");
}, set:function(a) {
p("public flash.system.ApplicationDomain::set domainMemory");
}, enumerable:!0, configurable:!0});
c.prototype.getDefinition = function(a) {
return(a = s(a)) ? (a = a.replace("::", "."), this._runtimeDomain.getProperty(m.fromSimpleName(a), !0, !0)) : null;
};
c.prototype.hasDefinition = function(a) {
return(a = s(a)) ? (a = a.replace("::", "."), !!this._runtimeDomain.findDomainProperty(m.fromSimpleName(a), !1, !1)) : !1;
};
c.prototype.getQualifiedDefinitionNames = function() {
p("public flash.system.ApplicationDomain::getQualifiedDefinitionNames");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.ApplicationDomain = t;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = c.ObjectUtilities.toKeyValueArray, t = function(a) {
function c() {
s("public flash.system.Capabilities");
}
__extends(c, a);
Object.defineProperty(c, "isEmbeddedInAcrobat", {get:function() {
p("public flash.system.Capabilities::get isEmbeddedInAcrobat");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasEmbeddedVideo", {get:function() {
p("public flash.system.Capabilities::get hasEmbeddedVideo");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasAudio", {get:function() {
p("public flash.system.Capabilities::get hasAudio");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "avHardwareDisable", {get:function() {
p("public flash.system.Capabilities::get avHardwareDisable");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasAccessibility", {get:function() {
e("public flash.system.Capabilities::get hasAccessibility");
return c._hasAccessibility;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasAudioEncoder", {get:function() {
p("public flash.system.Capabilities::get hasAudioEncoder");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasMP3", {get:function() {
p("public flash.system.Capabilities::get hasMP3");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasPrinting", {get:function() {
p("public flash.system.Capabilities::get hasPrinting");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasScreenBroadcast", {get:function() {
p("public flash.system.Capabilities::get hasScreenBroadcast");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasScreenPlayback", {get:function() {
p("public flash.system.Capabilities::get hasScreenPlayback");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasStreamingAudio", {get:function() {
p("public flash.system.Capabilities::get hasStreamingAudio");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasStreamingVideo", {get:function() {
p("public flash.system.Capabilities::get hasStreamingVideo");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasVideoEncoder", {get:function() {
p("public flash.system.Capabilities::get hasVideoEncoder");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "isDebugger", {get:function() {
e("public flash.system.Capabilities::get isDebugger");
return c._isDebugger;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "localFileReadDisable", {get:function() {
p("public flash.system.Capabilities::get localFileReadDisable");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "language", {get:function() {
e("public flash.system.Capabilities::get language");
return c._language;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "manufacturer", {get:function() {
e("public flash.system.Capabilities::get manufacturer");
return c._manufacturer;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "os", {get:function() {
if (null === c._os) {
var a, e = window.navigator.userAgent;
0 < e.indexOf("Macintosh") ? a = "Mac OS 10.5.2" : 0 < e.indexOf("Windows") ? a = "Windows XP" : 0 < e.indexOf("Linux") ? a = "Linux" : /(iPad|iPhone|iPod|Android)/.test(e) ? a = "iPhone3,1" : p("public flash.system.Capabilities::get os");
c._os = a;
}
return c._os;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "cpuArchitecture", {get:function() {
p("public flash.system.Capabilities::get cpuArchitecture");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "playerType", {get:function() {
e("public flash.system.Capabilities::get playerType");
return c._playerType;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "serverString", {get:function() {
var a = m({OS:c.os}).map(function(a) {
return a[0] + "=" + encodeURIComponent(a[1]);
}).join("&");
e("Capabilities.serverString: " + a);
return a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "version", {get:function() {
return c._version;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "screenColor", {get:function() {
return "color";
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "pixelAspectRatio", {get:function() {
p("public flash.system.Capabilities::get pixelAspectRatio");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "screenDPI", {get:function() {
e("public flash.system.Capabilities::get screenDPI");
return c._screenDPI;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "screenResolutionX", {get:function() {
e("public flash.system.Capabilities::get screenResolutionX");
return window.screen.width;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "screenResolutionY", {get:function() {
e("public flash.system.Capabilities::get screenResolutionY");
return window.screen.height;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "touchscreenType", {get:function() {
p("public flash.system.Capabilities::get touchscreenType");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasIME", {get:function() {
p("public flash.system.Capabilities::get hasIME");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasTLS", {get:function() {
p("public flash.system.Capabilities::get hasTLS");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "maxLevelIDC", {get:function() {
p("public flash.system.Capabilities::get maxLevelIDC");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "supports32BitProcesses", {get:function() {
p("public flash.system.Capabilities::get supports32BitProcesses");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "supports64BitProcesses", {get:function() {
p("public flash.system.Capabilities::get supports64BitProcesses");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "_internal", {get:function() {
p("public flash.system.Capabilities::get _internal");
}, enumerable:!0, configurable:!0});
c.hasMultiChannelAudio = function(a) {
l(a);
p("public flash.system.Capabilities::static hasMultiChannelAudio");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c._hasAccessibility = !1;
c._isDebugger = !1;
c._language = "en";
c._manufacturer = "Mozilla Research";
c._os = null;
c._playerType = "PlugIn";
c._version = "SHUMWAY 10,0,0,0";
c._screenDPI = 96;
return c;
}(a.ASNative);
h.Capabilities = t;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = c.AVM2.Runtime.asCoerceString, l = function(a) {
function l() {
p("packageInternal flash.system.FSCommand");
}
__extends(l, a);
l._fscommand = function(a, e) {
a = s(a);
e = s(e);
console.log("FSCommand: " + a + "; " + e);
a = a.toLowerCase();
if ("debugger" === a) {
debugger;
} else {
c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].executeFSCommand(a, e);
}
};
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
return l;
}(a.ASNative);
h.FSCommand = l;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.system.ImageDecodingPolicy");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.ON_DEMAND = "onDemand";
e.ON_LOAD = "onLoad";
return e;
}(a.ASNative);
h.ImageDecodingPolicy = s;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(h) {
var p = function(a) {
function l(a, l, h) {
void 0 === a && (a = !1);
void 0 === l && (l = null);
void 0 === h && (h = null);
this.checkPolicyFile = a;
this.applicationDomain = l;
this.securityDomain = h;
this.imageDecodingPolicy = c.system.ImageDecodingPolicy.ON_DEMAND;
}
__extends(l, a);
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = "checkPolicyFile! applicationDomain! securityDomain! allowCodeImport! requestedContentParent! parameters! imageDecodingPolicy!".split(" ");
return l;
}(a.ASNative);
h.LoaderContext = p;
})(c.system || (c.system = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function e(a, e, c, l) {
p("public flash.system.JPEGLoaderContext");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.system.LoaderContext);
h.JPEGLoaderContext = u;
})(a.system || (a.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.system.MessageChannel");
}
__extends(c, a);
Object.defineProperty(c.prototype, "messageAvailable", {get:function() {
p("public flash.system.MessageChannel::get messageAvailable");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "state", {get:function() {
p("public flash.system.MessageChannel::get state");
}, enumerable:!0, configurable:!0});
c.prototype.send = function(a, e) {
p("public flash.system.MessageChannel::send");
};
c.prototype.receive = function(a) {
p("public flash.system.MessageChannel::receive");
};
c.prototype.close = function() {
p("public flash.system.MessageChannel::close");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.MessageChannel = l;
})(a.system || (a.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.system.MessageChannelState");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.OPEN = "open";
e.CLOSING = "closing";
e.CLOSED = "closed";
return e;
}(a.ASNative);
h.MessageChannelState = s;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = c.Debug.somewhatImplemented, m = function(a) {
function h() {
s("public flash.system.Security");
}
__extends(h, a);
Object.defineProperty(h, "exactSettings", {get:function() {
return h._exactSettings;
}, set:function(a) {
h._exactSettings = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h, "disableAVM1Loading", {get:function() {
p("public flash.system.Security::get disableAVM1Loading");
}, set:function(a) {
p("public flash.system.Security::set disableAVM1Loading");
}, enumerable:!0, configurable:!0});
Object.defineProperty(h, "sandboxType", {get:function() {
e("public flash.system.Security::get sandboxType");
return h._sandboxType;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h, "pageDomain", {get:function() {
e("public flash.system.Security::get pageDomain");
var a = c.FileLoadingService.instance.resolveUrl("/").split("/");
a.pop();
return a.pop();
}, enumerable:!0, configurable:!0});
h.allowDomain = function() {
e('public flash.system.Security::static allowDomain ["' + Array.prototype.join.call(arguments, '", "') + '"]');
};
h.allowInsecureDomain = function() {
e("public flash.system.Security::static allowInsecureDomain");
};
h.loadPolicyFile = function(a) {
l(a);
e("public flash.system.Security::static loadPolicyFile");
};
h.showSettings = function(a) {
void 0 === a && (a = "default");
l(a);
p("public flash.system.Security::static showSettings");
};
h.duplicateSandboxBridgeInputArguments = function(a, e) {
p("public flash.system.Security::static duplicateSandboxBridgeInputArguments");
};
h.duplicateSandboxBridgeOutputArgument = function(a, e) {
p("public flash.system.Security::static duplicateSandboxBridgeOutputArgument");
};
h.classInitializer = null;
h.initializer = null;
h.classSymbols = null;
h.instanceSymbols = null;
h.REMOTE = "remote";
h.LOCAL_WITH_FILE = "localWithFile";
h.LOCAL_WITH_NETWORK = "localWithNetwork";
h.LOCAL_TRUSTED = "localTrusted";
h.APPLICATION = "application";
h._exactSettings = !1;
h._sandboxType = "remote";
return h;
}(a.ASNative);
h.Security = m;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.somewhatImplemented, s = function(a) {
function e() {
}
__extends(e, a);
Object.defineProperty(e, "currentDomain", {get:function() {
this._currentDomain || (this._currentDomain = new h.SecurityDomain);
p("public flash.system.SecurityDomain::get currentDomain");
return this._currentDomain;
}, enumerable:!0, configurable:!0});
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.SecurityDomain = s;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.system.SecurityPanel");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.DEFAULT = "default";
e.PRIVACY = "privacy";
e.LOCAL_STORAGE = "localStorage";
e.MICROPHONE = "microphone";
e.CAMERA = "camera";
e.DISPLAY = "display";
e.SETTINGS_MANAGER = "settingsManager";
return e;
}(a.ASNative);
h.SecurityPanel = s;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.system.TouchscreenType");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.FINGER = "finger";
e.STYLUS = "stylus";
e.NONE = "none";
return e;
}(a.ASNative);
h.TouchscreenType = s;
})(h.system || (h.system = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.fromNumber = function(a) {
switch(a) {
case 1:
return c.NORMAL;
case 2:
return c.ADVANCED;
default:
return null;
}
};
c.toNumber = function(a) {
switch(a) {
case c.NORMAL:
return 1;
case c.ADVANCED:
return 2;
default:
return-1;
}
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.NORMAL = "normal";
c.ADVANCED = "advanced";
return c;
}(a.ASNative);
c.AntiAliasType = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.REGULAR = "regular";
c.BOLD = "bold";
c.ITALIC = "italic";
c.BOLD_ITALIC = "boldItalic";
return c;
}(a.ASNative);
c.FontStyle = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.EMBEDDED = "embedded";
c.EMBEDDED_CFF = "embeddedCFF";
c.DEVICE = "device";
return c;
}(a.ASNative);
c.FontType = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
var p = c.Debug.somewhatImplemented, u = c.AVM2.Runtime.asCoerceString, l = h.text.FontStyle, e = h.text.FontType, m = function(a) {
function m() {
}
__extends(m, a);
m._getFontMetrics = function(a, e) {
return this._deviceFontMetrics[a + e] || this._deviceFontMetrics[a];
};
m.resolveFontName = function(a) {
return "_sans" === a ? m.DEFAULT_FONT_SANS : "_serif" === a ? m.DEFAULT_FONT_SERIF : "_typewriter" === a ? m.DEFAULT_FONT_TYPEWRITER : a;
};
m.getBySymbolId = function(a) {
return this._fontsBySymbolId[a];
};
m.getByNameAndStyle = function(a, f) {
for (var d, b, g = a.split(","), l = 0;l < g.length && !b;l++) {
d = g[l].toLowerCase() + f, b = this._fontsByName[d];
}
b || (b = new m, b._fontName = g[0], b._fontFamily = m.resolveFontName(g[0].toLowerCase()), b._fontStyle = f, b._fontType = e.DEVICE, this._fontsByName[d] = b);
b._fontType === e.DEVICE && (d = m._getFontMetrics(b._fontName, b._fontStyle), d || (c.Debug.warning('Font metrics for "' + b._fontName + '" unknown. Fallback to default.'), d = m._getFontMetrics(m.DEFAULT_FONT_SANS, b._fontStyle), b._fontFamily = m.DEFAULT_FONT_SANS), b.ascent = d[0], b.descent = d[1], b.leading = d[2]);
return b;
};
m.getDefaultFont = function() {
return m.getByNameAndStyle(m.DEFAULT_FONT_SANS, l.REGULAR);
};
m.enumerateFonts = function(a) {
p("public flash.text.Font::static enumerateFonts");
return m._fonts.slice();
};
m.registerFont = function(a) {
p("Font.registerFont");
};
m.registerEmbeddedFont = function(a, e) {
var d = h.display.DisplayObject.getNextSyncID(), b = {get:m.resolveEmbeddedFont.bind(m, e, a.id, d), configurable:!0};
Object.defineProperty(m._fontsByName, a.name.toLowerCase() + a.style, b);
Object.defineProperty(m._fontsByName, "swffont" + d + a.style, b);
Object.defineProperty(m._fontsBySymbolId, d + "", b);
};
m.resolveEmbeddedFont = function(a, e, d) {
a.getSymbolById(e).syncId = d;
return m._fontsBySymbolId[e];
};
Object.defineProperty(m.prototype, "fontName", {get:function() {
return this._fontName;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "fontStyle", {get:function() {
return this._fontStyle;
}, enumerable:!0, configurable:!0});
Object.defineProperty(m.prototype, "fontType", {get:function() {
return this._fontType;
}, enumerable:!0, configurable:!0});
m.prototype.hasGlyphs = function(a) {
u(a);
p("Font#hasGlyphs");
return!0;
};
m.DEFAULT_FONT_SANS = "Arial";
m.DEFAULT_FONT_SERIF = "Times New Roman";
m.DEFAULT_FONT_TYPEWRITER = "Courier New";
m.classInitializer = function() {
m._fonts = [];
m._fontsBySymbolId = c.ObjectUtilities.createMap();
m._fontsByName = c.ObjectUtilities.createMap();
m.DEVICE_FONT_METRICS_WIN = {Arial:[1, .25, 0], "Arial Baltic":[1, .25, 0], "Arial Black":[1.0833, .3333, 0], "Arial CE":[1, .25, 0], "Arial CYR":[1, .25, 0], "Arial Greek":[1, .25, 0], "Arial TUR":[1, .25, 0], "Comic Sans MS":[1.0833, .3333, 0], "Courier New":[1, .25, 0], "Courier New Baltic":[1, .25, 0], "Courier New CE":[1, .25, 0], "Courier New CYR":[1, .25, 0], "Courier New Greek":[1, .25, 0], "Courier New TUR":[1, .25, 0], "Estrangelo Edessa":[.75, .3333, 0], "Franklin Gothic Medium":[1,
.3333, 0], Gautami:[.9167, .8333, 0], Georgia:[1, .25, 0], Impact:[1.0833, .25, 0], Latha:[1.0833, .25, 0], "Lucida Console":[.75, .25, 0], "Lucida Sans Unicode":[1.0833, .25, 0], Mangal:[1.0833, .25, 0], Marlett:[1, 0, 0], "Microsoft Sans Serif":[1.0833, .1667, 0], "MV Boli":[.9167, .25, 0], "Palatino Linotype":[1.0833, .3333, 0], Raavi:[1.0833, .6667, 0], Shruti:[1, .5, 0], Sylfaen:[1, .3333, 0], Symbol:[1, .25, 0], Tahoma:[1, .1667, 0], "Times New Roman":[1, .25, 0], "Times New Roman Baltic":[1,
.25, 0], "Times New Roman CE":[1, .25, 0], "Times New Roman CYR":[1, .25, 0], "Times New Roman Greek":[1, .25, 0], "Times New Roman TUR":[1, .25, 0], "Trebuchet MS":[1.0833, .4167, 0], Tunga:[1, .75, 0], Verdana:[1, .1667, 0], Webdings:[1.0833, .5, 0], Wingdings:[.9167, .25, 0]};
m.DEVICE_FONT_METRICS_MAC = {"Al Bayan Bold":[1, .5833, 0], "Al Bayan Plain":[1, .5, 0], "Al Nile":[.8333, .5, 0], "Al Nile Bold":[.8333, .5, 0], "Al Tarikh Regular":[.5833, .4167, 0], "American Typewriter":[.9167, .25, 0], "American Typewriter Bold":[.9167, .25, 0], "American Typewriter Condensed":[.9167, .25, 0], "American Typewriter Condensed Bold":[.9167, .25, 0], "American Typewriter Condensed Light":[.8333, .25, 0], "American Typewriter Light":[.9167, .25, 0], "Andale Mono":[.9167,
.25, 0], "Apple Braille":[.75, .25, 0], "Apple Braille Outline 6 Dot":[.75, .25, 0], "Apple Braille Outline 8 Dot":[.75, .25, 0], "Apple Braille Pinpoint 6 Dot":[.75, .25, 0], "Apple Braille Pinpoint 8 Dot":[.75, .25, 0], "Apple Chancery":[1.0833, .5, 0], "Apple Color Emoji":[1.25, .4167, 0], "Apple SD Gothic Neo Bold":[.9167, .3333, 0], "Apple SD Gothic Neo Heavy":[.9167, .3333, 0], "Apple SD Gothic Neo Light":[.9167, .3333, 0], "Apple SD Gothic Neo Medium":[.9167, .3333, 0], "Apple SD Gothic Neo Regular":[.9167,
.3333, 0], "Apple SD Gothic Neo SemiBold":[.9167, .3333, 0], "Apple SD Gothic Neo Thin":[.9167, .3333, 0], "Apple SD Gothic Neo UltraLight":[.9167, .3333, 0], "Apple SD GothicNeo ExtraBold":[.9167, .3333, 0], "Apple Symbols":[.6667, .25, 0], "AppleGothic Regular":[.9167, .3333, 0], "AppleMyungjo Regular":[.8333, .3333, 0], Arial:[.9167, .25, 0], "Arial Black":[1.0833, .3333, 0], "Arial Bold":[.9167, .25, 0], "Arial Bold Italic":[.9167, .25, 0], "Arial Hebrew":[.75, .3333, 0], "Arial Hebrew Bold":[.75,
.3333, 0], "Arial Hebrew Light":[.75, .3333, 0], "Arial Hebrew Scholar":[.75, .3333, 0], "Arial Hebrew Scholar Bold":[.75, .3333, 0], "Arial Hebrew Scholar Light":[.75, .3333, 0], "Arial Italic":[.9167, .25, 0], "Arial Narrow":[.9167, .25, 0], "Arial Narrow Bold":[.9167, .25, 0], "Arial Narrow Bold Italic":[.9167, .25, 0], "Arial Narrow Italic":[.9167, .25, 0], "Arial Rounded MT Bold":[.9167, .25, 0], "Arial Unicode MS":[1.0833, .25, 0], "Athelas Bold":[.9167, .25, 0], "Athelas Bold Italic":[.9167,
.25, 0], "Athelas Italic":[.9167, .25, 0], "Athelas Regular":[.9167, .25, 0], "Avenir Black":[1, .3333, 0], "Avenir Black Oblique":[1, .3333, 0], "Avenir Book":[1, .3333, 0], "Avenir Book Oblique":[1, .3333, 0], "Avenir Heavy":[1, .3333, 0], "Avenir Heavy Oblique":[1, .3333, 0], "Avenir Light":[1, .3333, 0], "Avenir Light Oblique":[1, .3333, 0], "Avenir Medium":[1, .3333, 0], "Avenir Medium Oblique":[1, .3333, 0], "Avenir Next Bold":[1, .3333, 0], "Avenir Next Bold Italic":[1, .3333,
0], "Avenir Next Condensed Bold":[1, .3333, 0], "Avenir Next Condensed Bold Italic":[1, .3333, 0], "Avenir Next Condensed Demi Bold":[1, .3333, 0], "Avenir Next Condensed Demi Bold Italic":[1, .3333, 0], "Avenir Next Condensed Heavy":[1, .3333, 0], "Avenir Next Condensed Heavy Italic":[1, .3333, 0], "Avenir Next Condensed Italic":[1, .3333, 0], "Avenir Next Condensed Medium":[1, .3333, 0], "Avenir Next Condensed Medium Italic":[1, .3333, 0], "Avenir Next Condensed Regular":[1, .3333,
0], "Avenir Next Condensed Ultra Light":[1, .3333, 0], "Avenir Next Condensed Ultra Light Italic":[1, .3333, 0], "Avenir Next Demi Bold":[1, .3333, 0], "Avenir Next Demi Bold Italic":[1, .3333, 0], "Avenir Next Heavy":[1, .3333, 0], "Avenir Next Heavy Italic":[1, .3333, 0], "Avenir Next Italic":[1, .3333, 0], "Avenir Next Medium":[1, .3333, 0], "Avenir Next Medium Italic":[1, .3333, 0], "Avenir Next Regular":[1, .3333, 0], "Avenir Next Ultra Light":[1, .3333, 0], "Avenir Next Ultra Light Italic":[1,
.3333, 0], "Avenir Oblique":[1, .3333, 0], "Avenir Roman":[1, .3333, 0], Ayuthaya:[1.0833, .3333, 0], "Baghdad Regular":[.9167, .4167, 0], "Bangla MN":[1.0833, .75, 0], "Bangla MN Bold":[1.0833, .75, 0], "Bangla Sangam MN":[.9167, .4167, 0], "Bangla Sangam MN Bold":[.9167, .4167, 0], "Baoli SC Regular":[1.0833, .3333, 0], Baskerville:[.9167, .25, 0], "Baskerville Bold":[.9167, .25, 0], "Baskerville Bold Italic":[.9167, .25, 0], "Baskerville Italic":[.9167, .25, 0], "Baskerville SemiBold":[.9167,
.25, 0], "Baskerville SemiBold Italic":[.9167, .25, 0], "Beirut Regular":[.75, .25, 0], "Big Caslon Medium":[.9167, .25, 0], "Bodoni 72 Bold":[.9167, .25, 0], "Bodoni 72 Book":[.9167, .25, 0], "Bodoni 72 Book Italic":[.9167, .3333, 0], "Bodoni 72 Oldstyle Bold":[.9167, .25, 0], "Bodoni 72 Oldstyle Book":[.9167, .25, 0], "Bodoni 72 Oldstyle Book Italic":[.9167, .3333, 0], "Bodoni 72 Smallcaps Book":[.9167, .25, 0], "Bodoni Ornaments":[.8333, .1667, 0], "Bradley Hand Bold":[.8333, .4167,
0], "Brush Script MT Italic":[.9167, .3333, 0], Chalkboard:[1, .25, 0], "Chalkboard Bold":[1, .25, 0], "Chalkboard SE Bold":[1.1667, .25, 0], "Chalkboard SE Light":[1.1667, .25, 0], "Chalkboard SE Regular":[1.1667, .25, 0], Chalkduster:[1, .25, 0], "Charter Black":[1, .25, 0], "Charter Black Italic":[1, .25, 0], "Charter Bold":[1, .25, 0], "Charter Bold Italic":[1, .25, 0], "Charter Italic":[1, .25, 0], "Charter Roman":[1, .25, 0], Cochin:[.9167, .25, 0], "Cochin Bold":[.9167, .25,
0], "Cochin Bold Italic":[.9167, .25, 0], "Cochin Italic":[.9167, .25, 0], "Comic Sans MS":[1.0833, .25, 0], "Comic Sans MS Bold":[1.0833, .25, 0], Copperplate:[.75, .25, 0], "Copperplate Bold":[.75, .25, 0], "Copperplate Light":[.75, .25, 0], "Corsiva Hebrew":[.6667, .3333, 0], "Corsiva Hebrew Bold":[.6667, .3333, 0], Courier:[.75, .25, 0], "Courier Bold":[.75, .25, 0], "Courier Bold Oblique":[.75, .25, 0], "Courier New":[.8333, .3333, 0], "Courier New Bold":[.8333, .3333, 0], "Courier New Bold Italic":[.8333,
.3333, 0], "Courier New Italic":[.8333, .3333, 0], "Courier Oblique":[.75, .25, 0], "Damascus Bold":[.5833, .4167, 0], "Damascus Light":[.5833, .4167, 0], "Damascus Medium":[.5833, .4167, 0], "Damascus Regular":[.5833, .4167, 0], "Damascus Semi Bold":[.5833, .4167, 0], "DecoType Naskh Regular":[1.1667, .6667, 0], "Devanagari MT":[.9167, .6667, 0], "Devanagari MT Bold":[.9167, .6667, 0], "Devanagari Sangam MN":[.9167, .4167, 0], "Devanagari Sangam MN Bold":[.9167, .4167, 0], Didot:[.9167,
.3333, 0], "Didot Bold":[1, .3333, 0], "Didot Italic":[.9167, .25, 0], "DIN Alternate Bold":[.9167, .25, 0], "DIN Condensed Bold":[.75, .25, 0], "Diwan Kufi Regular":[1.4167, .5, 0], "Diwan Thuluth Regular":[1, .6667, 0], "Euphemia UCAS":[1.0833, .25, 0], "Euphemia UCAS Bold":[1.0833, .25, 0], "Euphemia UCAS Italic":[1.0833, .25, 0], "Farah Regular":[.75, .25, 0], "Farisi Regular":[1.0833, 1, 0], "Futura Condensed ExtraBold":[1, .25, 0], "Futura Condensed Medium":[1, .25, 0], "Futura Medium":[1,
.25, 0], "Futura Medium Italic":[1, .25, 0], "GB18030 Bitmap":[1.1667, .1667, 0], "Geeza Pro Bold":[.9167, .3333, 0], "Geeza Pro Regular":[.9167, .3333, 0], Geneva:[1, .25, 0], Georgia:[.9167, .25, 0], "Georgia Bold":[.9167, .25, 0], "Georgia Bold Italic":[.9167, .25, 0], "Georgia Italic":[.9167, .25, 0], "Gill Sans":[.9167, .25, 0], "Gill Sans Bold":[.9167, .25, 0], "Gill Sans Bold Italic":[.9167, .25, 0], "Gill Sans Italic":[.9167, .25, 0], "Gill Sans Light":[.9167, .25, 0], "Gill Sans Light Italic":[.9167,
.25, 0], "Gill Sans SemiBold":[.9167, .25, 0], "Gill Sans SemiBold Italic":[.9167, .25, 0], "Gill Sans UltraBold":[1, .25, 0], "Gujarati MT":[.9167, .6667, 0], "Gujarati MT Bold":[.9167, .6667, 0], "Gujarati Sangam MN":[.8333, .4167, 0], "Gujarati Sangam MN Bold":[.8333, .4167, 0], "GungSeo Regular":[.8333, .25, 0], "Gurmukhi MN":[.9167, .25, 0], "Gurmukhi MN Bold":[.9167, .25, 0], "Gurmukhi MT":[.8333, .4167, 0], "Gurmukhi Sangam MN":[.9167, .3333, 0], "Gurmukhi Sangam MN Bold":[.9167,
.3333, 0], "Hannotate SC Bold":[1.0833, .3333, 0], "Hannotate SC Regular":[1.0833, .3333, 0], "Hannotate TC Bold":[1.0833, .3333, 0], "Hannotate TC Regular":[1.0833, .3333, 0], "HanziPen SC Bold":[1.0833, .3333, 0], "HanziPen SC Regular":[1.0833, .3333, 0], "HanziPen TC Bold":[1.0833, .3333, 0], "HanziPen TC Regular":[1.0833, .3333, 0], "HeadLineA Regular":[.8333, .1667, 0], "Heiti SC Light":[.8333, .1667, 0], "Heiti SC Medium":[.8333, .1667, 0], "Heiti TC Light":[.8333, .1667, 0],
"Heiti TC Medium":[.8333, .1667, 0], Helvetica:[.75, .25, 0], "Helvetica Bold":[.75, .25, 0], "Helvetica Bold Oblique":[.75, .25, 0], "Helvetica Light":[.75, .25, 0], "Helvetica Light Oblique":[.75, .25, 0], "Helvetica Neue":[.9167, .25, 0], "Helvetica Neue Bold":[1, .25, 0], "Helvetica Neue Bold Italic":[1, .25, 0], "Helvetica Neue Condensed Black":[1, .25, 0], "Helvetica Neue Condensed Bold":[1, .25, 0], "Helvetica Neue Italic":[.9167, .25, 0], "Helvetica Neue Light":[1, .25, 0],
"Helvetica Neue Light Italic":[.9167, .25, 0], "Helvetica Neue Medium":[1, .25, 0], "Helvetica Neue Medium Italic":[1, .25, 0], "Helvetica Neue Thin":[1, .25, 0], "Helvetica Neue Thin Italic":[1, .25, 0], "Helvetica Neue UltraLight":[.9167, .25, 0], "Helvetica Neue UltraLight Italic":[.9167, .25, 0], "Helvetica Oblique":[.75, .25, 0], Herculanum:[.8333, .1667, 0], "Hiragino Kaku Gothic Pro W3":[.9167, .0833, 0], "Hiragino Kaku Gothic Pro W6":[.9167, .0833, 0], "Hiragino Kaku Gothic ProN W3":[.9167,
.0833, 0], "Hiragino Kaku Gothic ProN W6":[.9167, .0833, 0], "Hiragino Kaku Gothic Std W8":[.9167, .0833, 0], "Hiragino Kaku Gothic StdN W8":[.9167, .0833, 0], "Hiragino Maru Gothic Pro W4":[.9167, .0833, 0], "Hiragino Maru Gothic ProN W4":[.9167, .0833, 0], "Hiragino Mincho Pro W3":[.9167, .0833, 0], "Hiragino Mincho Pro W6":[.9167, .0833, 0], "Hiragino Mincho ProN W3":[.9167, .0833, 0], "Hiragino Mincho ProN W6":[.9167, .0833, 0], "Hiragino Sans GB W3":[.9167, .0833, 0], "Hiragino Sans GB W6":[.9167,
.0833, 0], "Hoefler Text":[.75, .25, 0], "Hoefler Text Black":[.75, .25, 0], "Hoefler Text Black Italic":[.75, .25, 0], "Hoefler Text Italic":[.75, .25, 0], "Hoefler Text Ornaments":[.8333, .1667, 0], Impact:[1, .25, 0], InaiMathi:[.8333, .4167, 0], "Iowan Old Style Black":[1, .3333, 0], "Iowan Old Style Black Italic":[1, .3333, 0], "Iowan Old Style Bold":[1, .3333, 0], "Iowan Old Style Bold Italic":[1, .3333, 0], "Iowan Old Style Italic":[1, .3333, 0], "Iowan Old Style Roman":[1, .3333,
0], "Iowan Old Style Titling":[1, .3333, 0], "ITF Devanagari Bold":[1.0833, .3333, 0], "ITF Devanagari Book":[1.0833, .3333, 0], "ITF Devanagari Demi":[1.0833, .3333, 0], "ITF Devanagari Light":[1.0833, .3333, 0], "ITF Devanagari Medium":[1.0833, .3333, 0], "Kailasa Regular":[1.0833, .5833, 0], "Kaiti SC Black":[1.0833, .3333, 0], "Kaiti SC Bold":[1.0833, .3333, 0], "Kaiti SC Regular":[1.0833, .3333, 0], "Kaiti TC Bold":[1.0833, .3333, 0], "Kaiti TC Regular":[1.0833, .3333, 0], "Kannada MN":[.9167,
.25, 0], "Kannada MN Bold":[.9167, .25, 0], "Kannada Sangam MN":[1, .5833, 0], "Kannada Sangam MN Bold":[1, .5833, 0], "Kefa Bold":[.9167, .25, 0], "Kefa Regular":[.9167, .25, 0], "Khmer MN":[1, .8333, 0], "Khmer MN Bold":[1, .8333, 0], "Khmer Sangam MN":[1.0833, .8333, 0], "Kohinoor Devanagari Bold":[1.0833, .3333, 0], "Kohinoor Devanagari Book":[1.0833, .3333, 0], "Kohinoor Devanagari Demi":[1.0833, .3333, 0], "Kohinoor Devanagari Light":[1.0833, .3333, 0], "Kohinoor Devanagari Medium":[1.0833,
.3333, 0], "Kokonor Regular":[1.0833, .5833, 0], Krungthep:[1, .25, 0], "KufiStandardGK Regular":[.9167, .5, 0], "Lantinghei SC Demibold":[1, .3333, 0], "Lantinghei SC Extralight":[1, .3333, 0], "Lantinghei SC Heavy":[1, .3333, 0], "Lantinghei TC Demibold":[1, .3333, 0], "Lantinghei TC Extralight":[1, .3333, 0], "Lantinghei TC Heavy":[1, .3333, 0], "Lao MN":[.9167, .4167, 0], "Lao MN Bold":[.9167, .4167, 0], "Lao Sangam MN":[1, .3333, 0], "Libian SC Regular":[1.0833, .3333, 0], "LiHei Pro":[.8333,
.1667, 0], "LiSong Pro":[.8333, .1667, 0], "Lucida Grande":[1, .25, 0], "Lucida Grande Bold":[1, .25, 0], Luminari:[1, .3333, 0], "Malayalam MN":[1, .4167, 0], "Malayalam MN Bold":[1, .4167, 0], "Malayalam Sangam MN":[.8333, .4167, 0], "Malayalam Sangam MN Bold":[.8333, .4167, 0], "Marion Bold":[.6667, .3333, 0], "Marion Italic":[.6667, .3333, 0], "Marion Regular":[.6667, .3333, 0], "Marker Felt Thin":[.8333, .25, 0], "Marker Felt Wide":[.9167, .25, 0], "Menlo Bold":[.9167, .25, 0],
"Menlo Bold Italic":[.9167, .25, 0], "Menlo Italic":[.9167, .25, 0], "Menlo Regular":[.9167, .25, 0], "Microsoft Sans Serif":[.9167, .25, 0], "Mishafi Gold Regular":[.75, .6667, 0], "Mishafi Regular":[.75, .6667, 0], Monaco:[1, .25, 0], Mshtakan:[.9167, .25, 0], "Mshtakan Bold":[.9167, .25, 0], "Mshtakan BoldOblique":[.9167, .25, 0], "Mshtakan Oblique":[.9167, .25, 0], "Muna Black":[.75, .3333, 0], "Muna Bold":[.75, .3333, 0], "Muna Regular":[.75, .3333, 0], "Myanmar MN":[1, .4167,
0], "Myanmar MN Bold":[1, .4167, 0], "Myanmar Sangam MN":[.9167, .4167, 0], "Nadeem Regular":[.9167, .4167, 0], "Nanum Brush Script":[.9167, .25, 0], "Nanum Pen Script":[.9167, .25, 0], NanumGothic:[.9167, .25, 0], "NanumGothic Bold":[.9167, .25, 0], "NanumGothic ExtraBold":[.9167, .25, 0], NanumMyeongjo:[.9167, .25, 0], "NanumMyeongjo Bold":[.9167, .25, 0], "NanumMyeongjo ExtraBold":[.9167, .25, 0], "New Peninim MT":[.75, .3333, 0], "New Peninim MT Bold":[.75, .3333, 0], "New Peninim MT Bold Inclined":[.75,
.3333, 0], "New Peninim MT Inclined":[.75, .3333, 0], "Noteworthy Bold":[1.25, .3333, 0], "Noteworthy Light":[1.25, .3333, 0], "Optima Bold":[.9167, .25, 0], "Optima Bold Italic":[.9167, .25, 0], "Optima ExtraBlack":[1, .25, 0], "Optima Italic":[.9167, .25, 0], "Optima Regular":[.9167, .25, 0], "Oriya MN":[.9167, .25, 0], "Oriya MN Bold":[.9167, .25, 0], "Oriya Sangam MN":[.8333, .4167, 0], "Oriya Sangam MN Bold":[.8333, .4167, 0], Osaka:[1, .25, 0], "Osaka-Mono":[.8333, .1667, 0],
Palatino:[.8333, .25, 0], "Palatino Bold":[.8333, .25, 0], "Palatino Bold Italic":[.8333, .25, 0], "Palatino Italic":[.8333, .25, 0], Papyrus:[.9167, .5833, 0], "Papyrus Condensed":[.9167, .5833, 0], "PCMyungjo Regular":[.8333, .25, 0], "Phosphate Inline":[.9167, .25, 0], "Phosphate Solid":[.9167, .25, 0], "PilGi Regular":[.8333, .25, 0], "Plantagenet Cherokee":[.6667, .25, 0], "PT Mono":[.9167, .25, 0], "PT Mono Bold":[.9167, .25, 0], "PT Sans":[.9167, .25, 0], "PT Sans Bold":[.9167,
.25, 0], "PT Sans Bold Italic":[.9167, .25, 0], "PT Sans Caption":[.9167, .25, 0], "PT Sans Caption Bold":[.9167, .25, 0], "PT Sans Italic":[.9167, .25, 0], "PT Sans Narrow":[.9167, .25, 0], "PT Sans Narrow Bold":[.9167, .25, 0], "PT Serif":[1, .25, 0], "PT Serif Bold":[1, .25, 0], "PT Serif Bold Italic":[1, .25, 0], "PT Serif Caption":[1, .25, 0], "PT Serif Caption Italic":[1, .25, 0], "PT Serif Italic":[1, .25, 0], Raanana:[.75, .25, 0], "Raanana Bold":[.75, .25, 0], "Sana Regular":[.75,
.25, 0], Sathu:[.9167, .3333, 0], "Savoye LET Plain CC.:1.0":[1.0833, .75, 0], "Savoye LET Plain:1.0":[.6667, .5, 0], Seravek:[.9167, .3333, 0], "Seravek Bold":[.9167, .3333, 0], "Seravek Bold Italic":[.9167, .3333, 0], "Seravek ExtraLight":[.9167, .3333, 0], "Seravek ExtraLight Italic":[.9167, .3333, 0], "Seravek Italic":[.9167, .3333, 0], "Seravek Light":[.9167, .3333, 0], "Seravek Light Italic":[.9167, .3333, 0], "Seravek Medium":[.9167, .3333, 0], "Seravek Medium Italic":[.9167,
.3333, 0], "Shree Devanagari 714":[.9167, .4167, 0], "Shree Devanagari 714 Bold":[.9167, .4167, 0], "Shree Devanagari 714 Bold Italic":[.9167, .4167, 0], "Shree Devanagari 714 Italic":[.9167, .4167, 0], "SignPainter-HouseScript":[.6667, .1667, 0], Silom:[1, .3333, 0], "Sinhala MN":[.9167, .25, 0], "Sinhala MN Bold":[.9167, .25, 0], "Sinhala Sangam MN":[1.1667, .3333, 0], "Sinhala Sangam MN Bold":[1.1667, .3333, 0], "Skia Black":[.75, .25, 0], "Skia Black Condensed":[.75, .25, 0], "Skia Black Extended":[.75,
.25, 0], "Skia Bold":[.75, .25, 0], "Skia Condensed":[.75, .25, 0], "Skia Extended":[.75, .25, 0], "Skia Light":[.75, .25, 0], "Skia Light Condensed":[.75, .25, 0], "Skia Light Extended":[.75, .25, 0], "Skia Regular":[.75, .25, 0], "Snell Roundhand":[.9167, .3333, 0], "Snell Roundhand Black":[.9167, .3333, 0], "Snell Roundhand Bold":[.9167, .3333, 0], "Songti SC Black":[1.0833, .3333, 0], "Songti SC Bold":[1.0833, .3333, 0], "Songti SC Light":[1.0833, .3333, 0], "Songti SC Regular":[1.0833,
.3333, 0], "Songti TC Bold":[1.0833, .3333, 0], "Songti TC Light":[1.0833, .3333, 0], "Songti TC Regular":[1.0833, .3333, 0], STFangsong:[.8333, .1667, 0], STHeiti:[.8333, .1667, 0], "STIXGeneral-Bold":[1.0833, .4167, 0], "STIXGeneral-BoldItalic":[1.0833, .4167, 0], "STIXGeneral-Italic":[1.0833, .4167, 0], "STIXGeneral-Regular":[1.0833, .4167, 0], "STIXIntegralsD-Bold":[2.1667, .4167, 0], "STIXIntegralsD-Regular":[2.1667, .4167, 0], "STIXIntegralsSm-Bold":[1.0833, .4167, 0], "STIXIntegralsSm-Regular":[1.0833,
.4167, 0], "STIXIntegralsUp-Bold":[1.0833, .4167, 0], "STIXIntegralsUp-Regular":[1.0833, .4167, 0], "STIXIntegralsUpD-Bold":[2.1667, .4167, 0], "STIXIntegralsUpD-Regular":[2.1667, .4167, 0], "STIXIntegralsUpSm-Bold":[1.0833, .4167, 0], "STIXIntegralsUpSm-Regular":[1.0833, .4167, 0], "STIXNonUnicode-Bold":[1.4167, .5833, 0], "STIXNonUnicode-BoldItalic":[1.4167, .5833, 0], "STIXNonUnicode-Italic":[1.4167, .5833, 0], "STIXNonUnicode-Regular":[1.4167, .5833, 0], "STIXSizeFiveSym-Regular":[1,
.4167, 0], "STIXSizeFourSym-Bold":[2.5833, .5, 0], "STIXSizeFourSym-Regular":[2.5833, .5, 0], "STIXSizeOneSym-Bold":[1.5833, .3333, 0], "STIXSizeOneSym-Regular":[1.5833, .3333, 0], "STIXSizeThreeSym-Bold":[2.5833, .5, 0], "STIXSizeThreeSym-Regular":[2.5833, .5, 0], "STIXSizeTwoSym-Bold":[2.0833, .4167, 0], "STIXSizeTwoSym-Regular":[2.0833, .4167, 0], "STIXVariants-Bold":[1.0833, .4167, 0], "STIXVariants-Regular":[1.0833, .4167, 0], STKaiti:[.8333, .1667, 0], STSong:[.8333, .1667, 0],
STXihei:[.8333, .1667, 0], "Sukhumvit Set Bold":[1.0833, .5, 0], "Sukhumvit Set Light":[1.0833, .5, 0], "Sukhumvit Set Medium":[1.0833, .5, 0], "Sukhumvit Set Semi Bold":[1.0833, .5, 0], "Sukhumvit Set Text":[1.0833, .5, 0], "Sukhumvit Set Thin":[1.0833, .5, 0], "Superclarendon Black":[1, .25, 0], "Superclarendon Black Italic":[1, .25, 0], "Superclarendon Bold":[1, .25, 0], "Superclarendon Bold Italic":[1, .25, 0], "Superclarendon Italic":[1, .25, 0], "Superclarendon Light":[1, .25,
0], "Superclarendon Light Italic":[1, .25, 0], "Superclarendon Regular":[1, .25, 0], Symbol:[.6667, .3333, 0], "System Font Bold":[1, .25, 0], "System Font Bold Italic":[1, .25, 0], "System Font Heavy":[1, .25, 0], "System Font Italic":[1, .25, 0], "System Font Light":[1, .25, 0], "System Font Medium Italic P4":[1, .25, 0], "System Font Medium P4":[1, .25, 0], "System Font Regular":[1, .25, 0], "System Font Thin":[1, .25, 0], "System Font UltraLight":[1, .25, 0], Tahoma:[1, .1667, 0],
"Tahoma Negreta":[1, .1667, 0], "Tamil MN":[.9167, .25, 0], "Tamil MN Bold":[.9167, .25, 0], "Tamil Sangam MN":[.75, .25, 0], "Tamil Sangam MN Bold":[.75, .25, 0], "Telugu MN":[.9167, .25, 0], "Telugu MN Bold":[.9167, .25, 0], "Telugu Sangam MN":[1, .5833, 0], "Telugu Sangam MN Bold":[1, .5833, 0], Thonburi:[1.0833, .25, 0], "Thonburi Bold":[1.0833, .25, 0], "Thonburi Light":[1.0833, .25, 0], "Times Bold":[.75, .25, 0], "Times Bold Italic":[.75, .25, 0], "Times Italic":[.75, .25, 0],
"Times New Roman":[.9167, .25, 0], "Times New Roman Bold":[.9167, .25, 0], "Times New Roman Bold Italic":[.9167, .25, 0], "Times New Roman Italic":[.9167, .25, 0], "Times Roman":[.75, .25, 0], Trattatello:[1.1667, .6667, 0], "Trebuchet MS":[.9167, .25, 0], "Trebuchet MS Bold":[.9167, .25, 0], "Trebuchet MS Bold Italic":[.9167, .25, 0], "Trebuchet MS Italic":[.9167, .25, 0], Verdana:[1, .25, 0], "Verdana Bold":[1, .25, 0], "Verdana Bold Italic":[1, .25, 0], "Verdana Italic":[1, .25,
0], "Waseem Light":[.9167, .5833, 0], "Waseem Regular":[.9167, .5833, 0], "Wawati SC Regular":[1.0833, .3333, 0], "Wawati TC Regular":[1.0833, .3333, 0], Webdings:[.8333, .1667, 0], "Weibei SC Bold":[1.0833, .3333, 0], "Weibei TC Bold":[1.0833, .3333, 0], Wingdings:[.9167, .25, 0], "Wingdings 2":[.8333, .25, 0], "Wingdings 3":[.9167, .25, 0], "Xingkai SC Bold":[1.0833, .3333, 0], "Xingkai SC Light":[1.0833, .3333, 0], "Yuanti SC Bold":[1.0833, .3333, 0], "Yuanti SC Light":[1.0833, .3333,
0], "Yuanti SC Regular":[1.0833, .3333, 0], "YuGothic Bold":[.9167, .0833, 0], "YuGothic Medium":[.9167, .0833, 0], "YuMincho Demibold":[.9167, .0833, 0], "YuMincho Medium":[.9167, .0833, 0], "Yuppy SC Regular":[1.0833, .3333, 0], "Yuppy TC Regular":[1.0833, .3333, 0], "Zapf Dingbats":[.8333, .1667, 0], Zapfino:[1.9167, 1.5, 0]};
m.DEVICE_FONT_METRICS_LINUX = {KacstFarsi:[1.0417, .5208, 0], Meera:[.651, .4557, 0], FreeMono:[.7812, .1953, 0], Loma:[1.1719, .4557, 0], "Century Schoolbook L":[.9766, .3255, 0], KacstTitleL:[1.0417, .5208, 0], Garuda:[1.3021, .5859, 0], Rekha:[1.1068, .2604, 0], Purisa:[1.1068, .5208, 0], "DejaVu Sans Mono":[.9115, .2604, 0], Vemana2000:[.9115, .8464, 0], KacstOffice:[1.0417, .5208, 0], Umpush:[1.237, .651, 0], OpenSymbol:[.7812, .1953, 0], Sawasdee:[1.1068, .4557, 0], "URW Palladio L":[.9766,
.3255, 0], FreeSerif:[.9115, .3255, 0], KacstDigital:[1.0417, .5208, 0], "Ubuntu Condensed":[.9115, .1953, 0], mry_KacstQurn:[1.4323, .7161, 0], "URW Gothic L":[.9766, .2604, 0], Dingbats:[.8464, .1953, 0], "URW Chancery L":[.9766, .3255, 0], "Phetsarath OT":[1.1068, .5208, 0], "Tlwg Typist":[.9115, .3906, 0], KacstLetter:[1.0417, .5208, 0], utkal:[1.1719, .651, 0], Norasi:[1.237, .5208, 0], KacstOne:[1.237, .651, 0], "Liberation Sans Narrow":[.9115, .2604, 0], Symbol:[1.0417, .3255,
0], NanumMyeongjo:[.9115, .2604, 0], Untitled1:[.651, .5859, 0], "Lohit Gujarati":[.9115, .3906, 0], "Liberation Mono":[.8464, .3255, 0], KacstArt:[1.0417, .5208, 0], Mallige:[.9766, .651, 0], "Bitstream Charter":[.9766, .2604, 0], NanumGothic:[.9115, .2604, 0], "Liberation Serif":[.9115, .2604, 0], Ubuntu:[.9115, .1953, 0], "Courier 10 Pitch":[.8464, .3255, 0], "Nimbus Sans L":[.9766, .3255, 0], TakaoPGothic:[.9115, .1953, 0], "WenQuanYi Micro Hei Mono":[.9766, .2604, 0], "DejaVu Sans":[.9115,
.2604, 0], Kedage:[.9766, .651, 0], Kinnari:[1.3021, .5208, 0], TlwgMono:[.8464, .3906, 0], "Standard Symbols L":[1.0417, .3255, 0], "Lohit Punjabi":[1.1719, .651, 0], "Nimbus Mono L":[.8464, .3255, 0], Rachana:[.651, .5859, 0], Waree:[1.237, .4557, 0], KacstPoster:[1.0417, .5208, 0], "Khmer OS":[1.3021, .7161, 0], FreeSans:[.9766, .3255, 0], gargi:[.9115, .3255, 0], "Nimbus Roman No9 L":[.9115, .3255, 0], "DejaVu Serif":[.9115, .2604, 0], "WenQuanYi Micro Hei":[.9766, .2604, 0], "Ubuntu Light":[.9115,
.1953, 0], TlwgTypewriter:[.9115, .3906, 0], KacstPen:[1.0417, .5208, 0], "Tlwg Typo":[.9115, .3906, 0], "Mukti Narrow":[1.237, .4557, 0], "Ubuntu Mono":[.8464, .1953, 0], "Lohit Bengali":[.9766, .4557, 0], "Liberation Sans":[.9115, .2604, 0], KacstDecorative:[1.1068, .5208, 0], "Khmer OS System":[1.237, .5859, 0], Saab:[.9766, .651, 0], KacstTitle:[1.0417, .5208, 0], "Mukti Narrow Bold":[1.237, .4557, 0], "Lohit Hindi":[.9766, .5208, 0], KacstQurn:[1.0417, .5208, 0], "URW Bookman L":[.9766,
.3255, 0], KacstNaskh:[1.0417, .5208, 0], KacstScreen:[1.0417, .5208, 0], Pothana2000:[.9115, .8464, 0], "Lohit Tamil":[.8464, .3906, 0], KacstBook:[1.0417, .5208, 0], Sans:[.9115, .2604, 0], Times:[.9115, .3255, 0], Monospace:[.9115, .2604, 0]};
m.DEVICE_FONT_METRICS_BUILTIN = {_sans:[.9, .22, .08], _serif:[.88, .26, .08], _typewriter:[.86, .24, .08]};
m.DEVICE_FONT_METRICS_WIN.__proto__ = m.DEVICE_FONT_METRICS_BUILTIN;
m.DEVICE_FONT_METRICS_MAC.__proto__ = m.DEVICE_FONT_METRICS_BUILTIN;
m.DEVICE_FONT_METRICS_LINUX.__proto__ = m.DEVICE_FONT_METRICS_BUILTIN;
var a = self.navigator.userAgent;
-1 < a.indexOf("Windows") ? m._deviceFontMetrics = m.DEVICE_FONT_METRICS_WIN : /(Macintosh|iPad|iPhone|iPod|Android)/.test(a) ? (m._deviceFontMetrics = this.DEVICE_FONT_METRICS_MAC, m.DEFAULT_FONT_SANS = "Helvetica", m.DEFAULT_FONT_SERIF = "Times Roman", m.DEFAULT_FONT_TYPEWRITER = "Courier") : (m._deviceFontMetrics = this.DEVICE_FONT_METRICS_LINUX, m.DEFAULT_FONT_SANS = "Sans", m.DEFAULT_FONT_SERIF = "Times", m.DEFAULT_FONT_TYPEWRITER = "Monospace");
var a = m._deviceFontMetrics, e;
for (e in a) {
a[e.toLowerCase()] = a[e];
}
};
m.classSymbols = null;
m.instanceSymbols = null;
m.initializer = function(a) {
this._fontType = this._fontStyle = this._fontFamily = this._fontName = null;
this.leading = this.descent = this.ascent = 0;
this.advances = null;
if (a) {
this._symbol = a;
c.Debug.assert(a.syncId);
this._id = a.syncId;
this._fontName = a.name;
this._fontFamily = m.resolveFontName(a.name);
this._fontStyle = a.bold ? a.italic ? l.BOLD_ITALIC : l.BOLD : a.italic ? l.ITALIC : l.REGULAR;
var f = a.metrics;
f && (this.ascent = f.ascent, this.descent = f.descent, this.leading = f.leading, this.advances = f.advances);
this._fontType = f ? e.EMBEDDED : e.DEVICE;
f = Object.getOwnPropertyDescriptor(m._fontsBySymbolId, a.syncId + "");
f && f.value || (f = {value:this, configurable:!0}, Object.defineProperty(m._fontsBySymbolId, a.syncId + "", f), Object.defineProperty(m._fontsByName, a.name.toLowerCase() + this._fontStyle, f), this._fontType === e.EMBEDDED && Object.defineProperty(m._fontsByName, "swffont" + a.syncId + this._fontStyle, f));
} else {
this._id = h.display.DisplayObject.getNextSyncID();
}
};
return m;
}(a.ASNative);
v.Font = m;
var t = function(a) {
function e(c) {
a.call(this, c, m);
}
__extends(e, a);
e.FromData = function(a) {
var c = new e(a);
c.ready = !a.metrics;
c.name = a.name;
c.data = {id:a.id};
c.bold = a.bold;
c.italic = a.italic;
c.originalSize = a.originalSize;
c.codes = a.codes;
c.metrics = a.metrics;
c.syncId = h.display.DisplayObject.getNextSyncID();
return c;
};
Object.defineProperty(e.prototype, "resolveAssetCallback", {get:function() {
return this._unboundResolveAssetCallback.bind(this);
}, enumerable:!0, configurable:!0});
e.prototype._unboundResolveAssetCallback = function(a) {
c.Debug.assert(!this.ready);
this.ready = !0;
};
return e;
}(c.Timeline.Symbol);
v.FontSymbol = t;
})(h.text || (h.text = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.fromNumber = function(a) {
switch(a) {
case 0:
return c.NONE;
case 1:
return c.PIXEL;
case 2:
return c.SUBPIXEL;
default:
return null;
}
};
c.toNumber = function(a) {
switch(a) {
case c.NONE:
return 0;
case c.PIXEL:
return 1;
case c.SUBPIXEL:
return 2;
default:
return-1;
}
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.NONE = "none";
c.PIXEL = "pixel";
c.SUBPIXEL = "subpixel";
return c;
}(a.ASNative);
c.GridFitType = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(c) {
var h = function(c) {
function l() {
a.display.DisplayObject.instanceConstructorNoInitialize.call(this);
}
__extends(l, c);
l.prototype._canHaveTextContent = function() {
return!0;
};
l.prototype._getTextContent = function() {
return this._textContent;
};
Object.defineProperty(l.prototype, "text", {get:function() {
return this._textContent.plainText;
}, enumerable:!0, configurable:!0});
l.classInitializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
l.initializer = function(a) {
this._textContent = null;
a && this._setStaticContentFromSymbol(a);
};
return l;
}(a.display.DisplayObject);
c.StaticText = h;
})(a.text || (a.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
function p(a, e, c) {
for (;e < c;) {
switch(a[e]) {
case " ":
;
case "\n":
;
case "\r":
;
case "\t":
e++;
break;
default:
return e;
}
}
l(e === c);
return c;
}
var u = c.AVM2.Runtime.asCoerceString, l = c.Debug.assert, e = function(e) {
function c() {
h.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
this.clear();
}
__extends(c, e);
Object.defineProperty(c.prototype, "styleNames", {get:function() {
var a = this._rules, e = [], c;
for (c in a) {
a[c] && e.push(c);
}
return e;
}, enumerable:!0, configurable:!0});
c.prototype.getStyle = function(e) {
e = u(e);
return(e = this._rules[e.toLowerCase()]) ? a.ASJSON.transformJSValueToAS(e, !1) : null;
};
c.prototype.applyStyle = function(a, e) {
e = u(e);
var c = this._rules[e.toLowerCase()];
return c ? a.transform(c) : a;
};
c.prototype.setStyle = function(e, c) {
"object" === typeof c && (e = u(e), this._rules[e.toLowerCase()] = a.ASJSON.transformASValueToJS(c, !1));
};
c.prototype.hasStyle = function(a) {
return!!this._rules[a.toLowerCase()];
};
c.prototype.clear = function() {
this._rules = Object.create(null);
};
c.prototype.transform = function(e) {
if ("object" !== typeof e) {
return null;
}
e = a.ASJSON.transformASValueToJS(e, !1);
var c = new v.TextFormat;
c.transform(e);
return c;
};
c.prototype.parseCSS = function(a) {
a = u(a) + "";
for (var e = a.length, c = p(a, 0, e), f = {}, d = [], b = !1, g = "";c < e;) {
var h = a[c++];
switch(h) {
case "{":
b = !1;
d.push(g);
a: {
var g = a, h = e, m = f;
l(0 < c);
l("{" === g[c - 1]);
var s = {}, t = "", v = !1, M = !1, c = p(g, c, h);
b: for (;c < h;) {
var N = g[c++];
switch(N) {
case "}":
if (0 < t.length) {
c = -1;
break a;
}
break b;
case ":":
var K = "", y = t, t = "", M = v = !1;
for (;c < h;) {
switch(N = g[c], N) {
case ";":
;
case "\r":
;
case "\n":
c++, c = p(g, c, h);
case "}":
s[y] = K;
continue b;
default:
c++, K += N;
}
}
c = -1;
break a;
case "-":
":" === g[c] ? t += N : M = !0;
break;
case " ":
;
case "\n":
;
case "\r":
;
case "\t":
v = !0;
t += N;
M = !1;
break;
default:
if (v) {
c = -1;
break a;
}
M && (N = N.toUpperCase(), M = !1);
t += N;
}
}
if ("}" !== g[c - 1]) {
c = -1;
} else {
for (g = 0;g < d.length;g++) {
m[d[g]] = s;
}
}
}
if (-1 === c) {
return;
}
l("}" === a[c - 1]);
d = [];
g = "";
c = p(a, c, e);
break;
case ",":
b = !1;
d.push(g);
g = "";
c = p(a, c, e);
break;
case " ":
;
case "\n":
;
case "\r":
;
case "\t":
b = !0;
c = p(a, c, e);
break;
default:
if (b) {
return;
}
g += h;
}
}
a = this._rules;
for (g in f) {
a[g.toLowerCase()] = f[g];
}
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(h.events.EventDispatcher);
v.StyleSheet = e;
})(h.text || (h.text = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.LCD = "lcd";
c.CRT = "crt";
c.DEFAULT = "default";
return c;
}(a.ASNative);
c.TextDisplayMode = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.assert, l = c.Debug.warning, e = c.Debug.somewhatImplemented, m = c.AVM2.Runtime.throwError, t = c.AVM2.Runtime.asCoerceString, q = c.NumberUtilities.clamp, n = function(f) {
function d() {
a.display.InteractiveObject.instanceConstructorNoInitialize.call(this);
}
__extends(d, f);
d.prototype._setFillAndLineBoundsFromSymbol = function(a) {
f.prototype._setFillAndLineBoundsFromSymbol.call(this, a);
this._textContent.bounds = this._lineBounds;
this._invalidateContent();
};
d.prototype._setFillAndLineBoundsFromWidthAndHeight = function(a, d) {
f.prototype._setFillAndLineBoundsFromWidthAndHeight.call(this, a, d);
this._textContent.bounds = this._lineBounds;
this._invalidateContent();
};
d.prototype._canHaveTextContent = function() {
return!0;
};
d.prototype._getTextContent = function() {
return this._textContent;
};
d.prototype._getContentBounds = function(a) {
void 0 === a && (a = !0);
this._ensureLineMetrics();
return f.prototype._getContentBounds.call(this, a);
};
d.prototype._containsPointDirectly = function(a, d, e, c) {
u(this._getContentBounds().contains(a, d));
return!0;
};
d.prototype._invalidateContent = function() {
this._textContent.flags & c.TextContentFlags.Dirty && this._setFlags(8388608);
};
d.isFontCompatible = function(a, d) {
a = t(a);
d = t(d);
var e = v.Font.getByNameAndStyle(a, d);
return e ? e.fontStyle === d : !1;
};
Object.defineProperty(d.prototype, "alwaysShowSelection", {get:function() {
return this._alwaysShowSelection;
}, set:function(a) {
this._alwaysShowSelection = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "antiAliasType", {get:function() {
return this._antiAliasType;
}, set:function(a) {
a = t(a);
0 > v.AntiAliasType.toNumber(a) && m("ArgumentError", h.Errors.InvalidParamError, "antiAliasType");
this._antiAliasType = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "autoSize", {get:function() {
return this._autoSize;
}, set:function(a) {
a = t(a);
a !== this._autoSize && (0 > v.TextFieldAutoSize.toNumber(a) && m("ArgumentError", h.Errors.InvalidParamError, "autoSize"), this._autoSize = a, this._textContent.autoSize = v.TextFieldAutoSize.toNumber(a), this._invalidateContent(), this._ensureLineMetrics());
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "background", {get:function() {
return this._background;
}, set:function(a) {
a = !!a;
a !== this._background && (this._background = a, this._textContent.backgroundColor = a ? this._backgroundColor : 0, this._setDirtyFlags(8388608));
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "backgroundColor", {get:function() {
return this._backgroundColor >> 8;
}, set:function(a) {
a = (a << 8 | 255) >>> 0;
a !== this._backgroundColor && (this._backgroundColor = a, this._background && (this._textContent.backgroundColor = a, this._setDirtyFlags(8388608)));
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "border", {get:function() {
return this._border;
}, set:function(a) {
a = !!a;
a !== this._border && (this._border = a, this._textContent.borderColor = a ? this._borderColor : 0, this._setDirtyFlags(8388608));
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "borderColor", {get:function() {
return this._borderColor >> 8;
}, set:function(a) {
a = (a << 8 | 255) >>> 0;
a !== this._borderColor && (this._borderColor = a, this._border && (this._textContent.borderColor = a, this._setDirtyFlags(8388608)));
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "bottomScrollV", {get:function() {
return this._bottomScrollV;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "caretIndex", {get:function() {
p("public flash.text.TextField::get caretIndex");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "condenseWhite", {get:function() {
return this._condenseWhite;
}, set:function(a) {
this._condenseWhite = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "defaultTextFormat", {get:function() {
return this._textContent.defaultTextFormat.clone();
}, set:function(a) {
this._textContent.defaultTextFormat.merge(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "embedFonts", {get:function() {
return this._embedFonts;
}, set:function(a) {
this._embedFonts = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "gridFitType", {get:function() {
return this._gridFitType;
}, set:function(b) {
b = t(b);
u(0 <= a.text.GridFitType.toNumber(b));
this._gridFitType = b;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "htmlText", {get:function() {
return this._htmlText;
}, set:function(a) {
a = t(a);
this._symbol && (this._textContent.defaultTextFormat.bold = !1, this._textContent.defaultTextFormat.italic = !1);
this._textContent.parseHtml(a, this._styleSheet, this._multiline);
this._htmlText = a;
this._invalidateContent();
this._ensureLineMetrics();
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "length", {get:function() {
return this._length;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "textInteractionMode", {get:function() {
p("public flash.text.TextField::get textInteractionMode");
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "maxChars", {get:function() {
return this._maxChars;
}, set:function(a) {
this._maxChars = a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "maxScrollH", {get:function() {
this._ensureLineMetrics();
return this._maxScrollH;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "maxScrollV", {get:function() {
this._ensureLineMetrics();
return this._maxScrollV;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "mouseWheelEnabled", {get:function() {
return this._mouseWheelEnabled;
}, set:function(a) {
e("public flash.text.TextField::set mouseWheelEnabled");
this._mouseWheelEnabled = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "multiline", {get:function() {
return this._multiline;
}, set:function(a) {
this._multiline = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "numLines", {get:function() {
return this._numLines;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "displayAsPassword", {get:function() {
return this._displayAsPassword;
}, set:function(a) {
e("public flash.text.TextField::set displayAsPassword");
this._displayAsPassword = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "restrict", {get:function() {
return this._restrict;
}, set:function(a) {
e("public flash.text.TextField::set restrict");
this._restrict = t(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "scrollH", {get:function() {
return this._textContent.scrollH;
}, set:function(a) {
a |= 0;
this._ensureLineMetrics();
this._textContent.scrollH = q(Math.abs(a), 0, this._maxScrollH);
this._invalidateContent();
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "scrollV", {get:function() {
return this._textContent.scrollV;
}, set:function(a) {
a |= 0;
this._ensureLineMetrics();
this._textContent.scrollV = q(a, 1, this._maxScrollV);
this._invalidateContent();
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "selectable", {get:function() {
return this._selectable;
}, set:function(a) {
this._selectable = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "selectedText", {get:function() {
return this._textContent.plainText.substring(this._selectionBeginIndex, this._selectionEndIndex);
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "selectionBeginIndex", {get:function() {
return this._selectionBeginIndex;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "selectionEndIndex", {get:function() {
return this._selectionEndIndex;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "sharpness", {get:function() {
return this._sharpness;
}, set:function(a) {
this._sharpness = q(+a, -400, 400);
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "styleSheet", {get:function() {
return this._styleSheet;
}, set:function(a) {
this._styleSheet = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "text", {get:function() {
return this._textContent.plainText;
}, set:function(a) {
a = t(a);
a !== this._textContent.plainText && (this._textContent.plainText = a, this._invalidateContent(), this._ensureLineMetrics());
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "textColor", {get:function() {
return 0 > this._textColor ? +this._textContent.defaultTextFormat.color : this._textColor;
}, set:function(a) {
this._textColor = a >>> 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "textHeight", {get:function() {
this._ensureLineMetrics();
return this._textHeight / 20 | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "textWidth", {get:function() {
this._ensureLineMetrics();
return this._textWidth / 20 | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "thickness", {get:function() {
return this._thickness;
}, set:function(a) {
this._thickness = q(+a, -200, 200);
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "type", {get:function() {
return this._type;
}, set:function(a) {
this._type = t(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "wordWrap", {get:function() {
return this._textContent.wordWrap;
}, set:function(a) {
a = !!a;
a !== this._textContent.wordWrap && (this._textContent.wordWrap = !!a, this._invalidateContent());
}, enumerable:!0, configurable:!0});
Object.defineProperty(d.prototype, "useRichTextClipboard", {get:function() {
p("public flash.text.TextField::get useRichTextClipboard");
}, set:function(a) {
p("public flash.text.TextField::set useRichTextClipboard");
}, enumerable:!0, configurable:!0});
d.prototype.copyRichText = function() {
p("public flash.text.TextField::copyRichText");
};
d.prototype.pasteRichText = function(a) {
t(a);
p("public flash.text.TextField::pasteRichText");
};
d.prototype.getXMLText = function(a, d) {
p("public flash.text.TextField::getXMLText");
return "";
};
d.prototype.insertXMLText = function(a, d, e, c) {
t(e);
p("public flash.text.TextField::insertXMLText");
};
d.prototype._ensureLineMetrics = function() {
if (this._hasFlags(8388608)) {
var a = c.AVM2.Runtime.AVM2.instance.globals["Shumway.Player.Utils"].syncDisplayObject(this, !1), d = a.readInt(), e = a.readInt(), f = a.readInt(), k = this._lineBounds;
this._autoSize !== v.TextFieldAutoSize.NONE && (k.xMin = k.xMin = f, k.xMax = k.xMax = f + d + 80, k.yMax = k.yMax = k.yMin + e + 80);
this._textWidth = d;
this._textHeight = e;
this._numLines = a.readInt();
this._lineMetricsData = a;
if (this._textHeight > k.height) {
e = d = 1;
a.position = 16;
for (var l = f = 0;l < this._numLines;l++) {
a.position += 8;
var h = a.readInt(), m = a.readInt(), n = a.readInt(), h = h + m + n;
f > k.height / 20 ? d++ : e++;
f += h;
}
this._maxScrollV = d;
this._bottomScrollV = e;
}
this._maxScrollH = this._textWidth > k.width ? (this._textWidth + 80 - k.width) / 20 | 0 : 0;
}
};
d.prototype.appendText = function(a) {
this._textContent.appendText(t(a));
};
d.prototype.getCharBoundaries = function(b) {
b |= 0;
e("public flash.text.TextField::getCharBoundaries");
var d = this.textHeight, c = .75 * d;
return new a.geom.Rectangle(b * c, 0, c, d);
};
d.prototype.getCharIndexAtPoint = function(a, d) {
p("public flash.text.TextField::getCharIndexAtPoint");
};
d.prototype.getFirstCharInParagraph = function(a) {
p("public flash.text.TextField::getFirstCharInParagraph");
};
d.prototype.getLineIndexAtPoint = function(a, d) {
p("public flash.text.TextField::getLineIndexAtPoint");
};
d.prototype.getLineIndexOfChar = function(a) {
p("public flash.text.TextField::getLineIndexOfChar");
};
d.prototype.getLineLength = function(a) {
p("public flash.text.TextField::getLineLength");
};
d.prototype.getLineMetrics = function() {
var a;
a = 0;
(0 > a || a > this._numLines - 1) && m("RangeError", h.Errors.ParamRangeError);
this._ensureLineMetrics();
var d = this._lineMetricsData;
d.position = 16 + 20 * a;
a = d.readInt() + this._lineBounds.xMin + 2;
var e = d.readInt(), c = d.readInt(), f = d.readInt(), d = d.readInt();
return new v.TextLineMetrics(a, e, c + f + d, c, f, d);
};
d.prototype.getLineOffset = function(a) {
p("public flash.text.TextField::getLineOffset");
};
d.prototype.getLineText = function(a) {
p("public flash.text.TextField::getLineText");
};
d.prototype.getParagraphLength = function(a) {
p("public flash.text.TextField::getParagraphLength");
};
d.prototype.getTextFormat = function(a, d) {
void 0 === a && (a = -1);
void 0 === d && (d = -1);
a |= 0;
d |= 0;
var e = this._textContent.plainText.length;
0 > a ? (a = 0, 0 > d && (d = e)) : 0 > d && (d = a + 1);
(d <= a || d > e) && m("RangeError", h.Errors.ParamRangeError);
for (var c, e = this._textContent.textRuns, f = 0;f < e.length;f++) {
var k = e[f];
k.intersects(a, d) && (c ? c.intersect(k.textFormat) : c = k.textFormat.clone());
}
return c;
};
d.prototype.getTextRuns = function(a, d) {
void 0 === a && (a = 0);
void 0 === d && (d = 2147483647);
for (var e = this._textContent.textRuns, c = [], f = 0;f < e.length;f++) {
var k = e[f];
k.beginIndex >= a && k.endIndex <= d && c.push(k.clone());
}
return c;
};
d.prototype.getRawText = function() {
p("public flash.text.TextField::getRawText");
};
d.prototype.replaceSelectedText = function(a) {
this.replaceText(this._selectionBeginIndex, this._selectionEndIndex, "" + a);
};
d.prototype.replaceText = function(a, d, e) {
a |= 0;
d |= 0;
0 > a || 0 > d || (this._textContent.replaceText(a, d, "" + e), this._invalidateContent(), this._ensureLineMetrics());
};
d.prototype.setSelection = function(a, d) {
this._selectionBeginIndex = a | 0;
this._selectionEndIndex = d | 0;
};
d.prototype.setTextFormat = function(a, d, e) {
void 0 === d && (d = -1);
void 0 === e && (e = -1);
d |= 0;
e |= 0;
var c = this._textContent.plainText, f = c.length;
0 > d ? (d = 0, 0 > e && (e = f)) : 0 > e && (e = d + 1);
(d > f || e > f) && m("RangeError", h.Errors.ParamRangeError);
e <= d || (this._textContent.replaceText(d, e, c.substring(d, e), a), this._invalidateContent(), this._ensureLineMetrics());
};
d.prototype.getImageReference = function(a) {
p("public flash.text.TextField::getImageReference");
};
d.classSymbols = null;
d.instanceSymbols = null;
d.classInitializer = null;
d.initializer = function(b) {
this._alwaysShowSelection = !1;
this._antiAliasType = v.AntiAliasType.NORMAL;
this._autoSize = v.TextFieldAutoSize.NONE;
this._background = !1;
this._backgroundColor = 4294967295;
this._border = !1;
this._borderColor = 255;
this._bottomScrollV = 1;
this._caretIndex = 0;
this._embedFonts = this._condenseWhite = !1;
this._gridFitType = v.GridFitType.PIXEL;
this._htmlText = "";
this._length = 0;
this._textInteractionMode = v.TextInteractionMode.NORMAL;
this._maxScrollH = this._maxChars = 0;
this._maxScrollV = 1;
this._multiline = this._mouseWheelEnabled = !1;
this._numLines = 1;
this._displayAsPassword = !1;
this._restrict = null;
this._selectable = !0;
this._selectedText = "";
this._sharpness = this._selectionEndIndex = this._selectionBeginIndex = 0;
this._styleSheet = null;
this._textColor = -1;
this._thickness = this._textWidth = this._textHeight = 0;
this._type = v.TextFieldType.DYNAMIC;
this._useRichTextClipboard = !1;
var d = new a.text.TextFormat(v.Font.DEFAULT_FONT_SERIF, 12, 0, !1, !1, !1, "", "", v.TextFormatAlign.LEFT);
this._textContent = new c.TextContent(d);
this._lineMetricsData = null;
b ? (this._setFillAndLineBoundsFromSymbol(b), d.color = b.color, d.size = b.size / 20 | 0, d.font = b.face, d.bold = b.bold, d.italic = b.italic, d.align = b.align, d.leftMargin = b.leftMargin / 20 | 0, d.rightMargin = b.rightMargin / 20 | 0, d.indent = b.indent / 20 | 0, d.leading = b.leading / 20 | 0, this._multiline = b.multiline, this._embedFonts = b.embedFonts, this._selectable = b.selectable, this._displayAsPassword = b.displayAsPassword, this._type = b.type, this._maxChars =
b.maxChars, b.border && (this.border = this.background = !0), b.html ? this.htmlText = b.initialText : this.text = b.initialText, this.wordWrap = b.wordWrap, this.autoSize = b.autoSize) : this._setFillAndLineBoundsFromWidthAndHeight(2E3, 2E3);
};
return d;
}(a.display.InteractiveObject);
v.TextField = n;
n = function(e) {
function d(b) {
e.call(this, b, a.text.TextField, !0);
this.size = this.color = 0;
this.face = "";
this.italic = this.bold = !1;
this.align = a.text.TextFormatAlign.LEFT;
this.leading = this.indent = this.rightMargin = this.leftMargin = 0;
this.embedFonts = this.wordWrap = this.multiline = !1;
this.selectable = !0;
this.border = !1;
this.initialText = "";
this.displayAsPassword = this.html = !1;
this.type = a.text.TextFieldType.DYNAMIC;
this.maxChars = 0;
this.autoSize = a.text.TextFieldAutoSize.NONE;
this.textContent = this.variableName = null;
}
__extends(d, e);
d.FromTextData = function(b, e) {
var f = new d(b);
f._setBoundsFromData(b);
var k = b.tag;
if (b.static && (f.dynamic = !1, f.symbolClass = a.text.StaticText, k.initialText)) {
var h = new c.TextContent;
h.bounds = f.lineBounds;
h.parseHtml(k.initialText, null, !1);
new a.geom.Matrix;
h.matrix = new a.geom.Matrix;
h.matrix.copyFromUntyped(b.matrix);
h.coords = b.coords;
f.textContent = h;
}
k.hasColor && (f.color = k.color >>> 8);
k.hasFont && (f.size = k.fontHeight, (h = e.getSymbolById(k.fontId)) ? (f.face = k.useOutlines ? h.name : "swffont" + h.syncId, f.bold = h.bold, f.italic = h.italic) : l("Font " + k.fontId + " is not defined."));
k.hasLayout && (f.align = a.text.TextFormatAlign.fromNumber(k.align), f.leftMargin = k.leftMargin, f.rightMargin = k.rightMargin, f.indent = k.indent, f.leading = k.leading);
f.multiline = !!k.multiline;
f.wordWrap = !!k.wordWrap;
f.embedFonts = !!k.useOutlines;
f.selectable = !k.noSelect;
f.border = !!k.border;
k.hasText && (f.initialText = k.initialText);
f.html = !!k.html;
f.displayAsPassword = !!k.password;
f.type = k.readonly ? a.text.TextFieldType.DYNAMIC : a.text.TextFieldType.INPUT;
k.hasMaxLength && (f.maxChars = k.maxLength);
f.autoSize = k.autoSize ? a.text.TextFieldAutoSize.LEFT : a.text.TextFieldAutoSize.NONE;
f.variableName = k.variableName;
return f;
};
d.FromLabelData = function(a, e) {
for (var f = a.fillBounds, l = a.records, h = a.coords = [], m = "", n = 12, q = "Times Roman", p = !1, s = !1, t = 0, v = 0, L = 0, H, J = 0;J < l.length;J++) {
var C = l[J];
if (C.eot) {
break;
}
if (C.hasFont) {
var E = e.getSymbolById(C.fontId);
E ? (H = E.codes, n = C.fontHeight, E.originalSize || (n /= 20), q = E.metrics ? "swffont" + E.syncId : E.name, p = E.bold, s = E.italic) : c.Debug.warning("Label " + a.id + "refers to undefined font symbol " + C.fontId);
}
C.hasColor && (t = C.color >>> 8);
C.hasMoveX && (v = C.moveX, v < f.xMin && (f.xMin = v));
C.hasMoveY && (L = C.moveY, L < f.yMin && (f.yMin = L));
for (var E = "", C = C.entries, F = 0, I;I = C[F++];) {
var G = H[I.glyphIndex];
u(G, "undefined label glyph");
G = String.fromCharCode(G);
E += k[G] || G;
h.push(v, L);
v += I.advance;
}
s && (E = "<i>" + E + "</i>");
p && (E = "<b>" + E + "</b>");
m += '<font size="' + n + '" face="' + q + '" color="#' + ("000000" + t.toString(16)).slice(-6) + '">' + E + "</font>";
}
a.tag.initialText = m;
return d.FromTextData(a, e);
};
return d;
}(c.Timeline.DisplaySymbol);
v.TextSymbol = n;
var k = {"<":"&lt;", ">":"&gt;", "&":"&amp;"};
})(a.text || (a.text = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.fromNumber = function(a) {
switch(a) {
case 0:
return c.NONE;
case 1:
return c.CENTER;
case 2:
return c.LEFT;
case 3:
return c.RIGHT;
default:
return null;
}
};
c.toNumber = function(a) {
switch(a) {
case c.NONE:
return 0;
case c.CENTER:
return 1;
case c.LEFT:
return 2;
case c.RIGHT:
return 3;
default:
return-1;
}
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.NONE = "none";
c.LEFT = "left";
c.CENTER = "center";
c.RIGHT = "right";
return c;
}(a.ASNative);
c.TextFieldAutoSize = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.INPUT = "input";
c.DYNAMIC = "dynamic";
return c;
}(a.ASNative);
c.TextFieldType = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
(function(v) {
var p = c.AVM2.Runtime.asCoerceString, u = c.NumberUtilities.roundHalfEven, l = c.AVM2.Runtime.throwError, e = function(a) {
function e(a, c, k, f, d, b, g, l, h, m, p, s, u) {
void 0 === a && (a = null);
void 0 === c && (c = null);
void 0 === k && (k = null);
void 0 === f && (f = null);
void 0 === d && (d = null);
void 0 === b && (b = null);
void 0 === g && (g = null);
void 0 === l && (l = null);
void 0 === h && (h = null);
void 0 === m && (m = null);
void 0 === p && (p = null);
void 0 === s && (s = null);
void 0 === u && (u = null);
this.font = a;
this.size = c;
this.color = k;
this.bold = f;
this.italic = d;
this.underline = b;
this.url = g;
this.target = l;
this.align = h;
this.leftMargin = m;
this.rightMargin = p;
this.indent = s;
this.leading = u;
}
__extends(e, a);
Object.defineProperty(e.prototype, "align", {get:function() {
return this._align;
}, set:function(a) {
this._align = a = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "blockIndent", {get:function() {
return this._blockIndent;
}, set:function(a) {
this._blockIndent = e.coerceNumber(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "bold", {get:function() {
return this._bold;
}, set:function(a) {
this._bold = e.coerceBoolean(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "bullet", {get:function() {
return this._bullet;
}, set:function(a) {
this._bullet = e.coerceBoolean(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "color", {get:function() {
return this._color;
}, set:function(a) {
this._color = +a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "display", {get:function() {
return this._display;
}, set:function(a) {
this._display = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "font", {get:function() {
return this._font;
}, set:function(a) {
this._font = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "style", {get:function() {
return this._bold && this._italic ? v.FontStyle.BOLD_ITALIC : this._bold ? v.FontStyle.BOLD : this._italic ? v.FontStyle.ITALIC : v.FontStyle.REGULAR;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "indent", {get:function() {
return this._indent;
}, set:function(a) {
this._indent = e.coerceNumber(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "italic", {get:function() {
return this._italic;
}, set:function(a) {
this._italic = e.coerceBoolean(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "kerning", {get:function() {
return this._kerning;
}, set:function(a) {
this._kerning = e.coerceBoolean(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "leading", {get:function() {
return this._leading;
}, set:function(a) {
this._leading = e.coerceNumber(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "leftMargin", {get:function() {
return this._leftMargin;
}, set:function(a) {
this._leftMargin = e.coerceNumber(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "letterSpacing", {get:function() {
return this._letterSpacing;
}, set:function(a) {
this._letterSpacing = e.coerceBoolean(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "rightMargin", {get:function() {
return this._rightMargin;
}, set:function(a) {
this._rightMargin = e.coerceNumber(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "size", {get:function() {
return this._size;
}, set:function(a) {
this._size = e.coerceNumber(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "tabStops", {get:function() {
return this._tabStops;
}, set:function(a) {
a instanceof Array || l("ArgumentError", h.Errors.CheckTypeFailedError, a, "Array");
this._tabStops = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "target", {get:function() {
return this._target;
}, set:function(a) {
this._target = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "underline", {get:function() {
return this._underline;
}, set:function(a) {
this._underline = e.coerceBoolean(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "url", {get:function() {
return this._url;
}, set:function(a) {
this._url = p(a);
}, enumerable:!0, configurable:!0});
e.coerceNumber = function(a) {
return void 0 == a ? null : isNaN(a) || 268435455 < a ? -2147483648 : u(a);
};
e.coerceBoolean = function(a) {
return void 0 == a ? null : !!a;
};
e.prototype.clone = function() {
return new s.text.TextFormat(this.font, this.size, this.color, this.bold, this.italic, this.underline, this.url, this.target, this.align, this.leftMargin, this.rightMargin, this.indent, this.leading);
};
e.prototype.equals = function(a) {
return this._align === a._align && this._blockIndent === a._blockIndent && this._bold === a._bold && this._bullet === a._bullet && this._color === a._color && this._display === a._display && this._font === a._font && this._indent === a._indent && this._italic === a._italic && this._kerning === a._kerning && this._leading === a._leading && this._leftMargin === a._leftMargin && this._letterSpacing === a._letterSpacing && this._rightMargin === a._rightMargin && this._size === a._size &&
this._tabStops === a._tabStops && this._target === a._target && this._underline === a._underline && this._url === a._url;
};
e.prototype.merge = function(a) {
null !== a._align && (this._align = a._align);
null !== a._blockIndent && (this._blockIndent = a._blockIndent);
null !== a._bold && (this._bold = a._bold);
null !== a._bullet && (this._bullet = a._bullet);
null !== a._color && (this._color = a._color);
null !== a._display && (this._display = a._display);
a._font && (this._font = a._font);
null !== a._indent && (this._indent = a._indent);
null !== a._italic && (this._italic = a._italic);
null !== a._kerning && (this._kerning = a._kerning);
null !== a._leading && (this._leading = a._leading);
null !== a._leftMargin && (this._leftMargin = a._leftMargin);
null !== a._letterSpacing && (this._letterSpacing = a._letterSpacing);
null !== a._rightMargin && (this._rightMargin = a._rightMargin);
null !== a._size && (this._size = a._size);
null !== a._tabStops && (this._tabStops = a._tabStops);
a._target && (this._target = a._target);
null !== a._underline && (this._underline = a._underline);
a._url && (this._url = a._url);
};
e.prototype.intersect = function(a) {
a._align !== this._align && (this._align = null);
a._blockIndent !== this._blockIndent && (this._blockIndent = null);
a._bold !== this._bold && (this._bold = null);
a._bullet !== this._bullet && (this._bullet = null);
a._color !== this._color && (this._color = null);
a._display !== this._display && (this._display = null);
a._font !== this._font && (this._font = null);
a._indent !== this._indent && (this._indent = null);
a._italic !== this._italic && (this._italic = null);
a._kerning !== this._kerning && (this._kerning = null);
a._leading !== this._leading && (this._leading = null);
a._leftMargin !== this._leftMargin && (this._leftMargin = null);
a._letterSpacing !== this._letterSpacing && (this._letterSpacing = null);
a._rightMargin !== this._rightMargin && (this._rightMargin = null);
a._size !== this._size && (this._size = null);
a._tabStops !== this._tabStops && (this._tabStops = null);
a._target !== this._target && (this._target = null);
a._underline !== this._underline && (this._underline = null);
a._url !== this._url && (this._url = null);
};
e.prototype.transform = function(a) {
var e = a.textAlign;
e && (this.align = e);
e = a.fontWeight;
"bold" === e ? this.bold = !0 : "normal" === e && (this.bold = !1);
if (e = a.color) {
if (e = p(e).trim().toLowerCase(), "#" === e[0]) {
for (e = e.substr(1);"0" === e[0];) {
e = e.substr(1);
}
var c = parseInt(e, 16);
c.original_toString(16) === e && (this.color = c);
}
}
if (e = a.display) {
this.display = e;
}
if (e = a.fontFamily) {
this.font = e.replace("sans-serif", "_sans").replace("serif", "_serif");
}
if (e = a.textIndent) {
this.indent = parseInt(e);
}
e = a.fontStyle;
"italic" === e ? this.italic = !0 : "normal" === e && (this.italic = !1);
e = a.kerning;
this.kerning = "true" === e ? 1 : "false" === e ? 0 : parseInt(e);
if (e = a.leading) {
this.leading = parseInt(e);
}
if (e = a.marginLeft) {
this.leftMargin = parseInt(e);
}
if (e = a.letterSpacing) {
this.letterSpacing = parseFloat(e);
}
if (e = a.marginRight) {
this.rightMargin = parseInt(e);
}
if (e = a.fontSize) {
e = parseInt(e), 0 < e && (this.size = e);
}
e = a.textDecoration;
"none" === e ? this.underline = !1 : "underline" === e && (this.underline = !0);
return this;
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
v.TextFormat = e;
})(s.text || (s.text = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.fromNumber = function(a) {
switch(a) {
case 0:
return c.LEFT;
case 1:
return c.RIGHT;
case 2:
return c.CENTER;
case 3:
return c.JUSTIFY;
case 4:
return c.START;
case 5:
return c.END;
default:
return null;
}
};
c.toNumber = function(a) {
switch(a) {
case c.LEFT:
return 0;
case c.RIGHT:
return 1;
case c.CENTER:
return 2;
case c.JUSTIFY:
return 3;
case c.START:
return 4;
case c.END:
return 5;
default:
return-1;
}
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.LEFT = "left";
c.CENTER = "center";
c.RIGHT = "right";
c.JUSTIFY = "justify";
c.START = "start";
c.END = "end";
return c;
}(a.ASNative);
c.TextFormatAlign = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.INLINE = "inline";
c.BLOCK = "block";
return c;
}(a.ASNative);
c.TextFormatDisplay = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function c() {
a.call(this);
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.NORMAL = "normal";
c.SELECTION = "selection";
return c;
}(a.ASNative);
c.TextInteractionMode = h;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e(a, e, c, h, k, f) {
p("public flash.text.TextLineMetrics");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.TextLineMetrics = s;
})(h.text || (h.text = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(h) {
var p = function(a) {
function h(a, c, l) {
this._beginIndex = a | 0;
this._endIndex = c | 0;
this._textFormat = l;
}
__extends(h, a);
Object.defineProperty(h.prototype, "beginIndex", {get:function() {
return this._beginIndex;
}, set:function(a) {
this._beginIndex = a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "endIndex", {get:function() {
return this._endIndex;
}, set:function(a) {
this._endIndex = a | 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "textFormat", {get:function() {
return this._textFormat;
}, set:function(a) {
this._textFormat = a;
}, enumerable:!0, configurable:!0});
h.prototype.clone = function() {
return new c.text.TextRun(this.beginIndex, this.endIndex, this.textFormat.clone());
};
h.prototype.containsIndex = function(a) {
return a >= this._beginIndex && a < this._endIndex;
};
h.prototype.intersects = function(a, c) {
return Math.max(this._beginIndex, a) < Math.min(this._endIndex, c);
};
h.classInitializer = null;
h.initializer = null;
h.classSymbols = null;
h.instanceSymbols = null;
return h;
}(a.ASNative);
h.TextRun = p;
})(c.text || (c.text = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) {
function e() {
s("public flash.text.TextSnapshot");
}
__extends(e, a);
Object.defineProperty(e.prototype, "charCount", {get:function() {
p("public flash.text.TextSnapshot::get charCount");
}, enumerable:!0, configurable:!0});
e.prototype.findText = function(a, e, c) {
l(e);
p("public flash.text.TextSnapshot::findText");
};
e.prototype.getSelected = function(a, e) {
p("public flash.text.TextSnapshot::getSelected");
};
e.prototype.getSelectedText = function(a) {
p("public flash.text.TextSnapshot::getSelectedText");
};
e.prototype.getText = function(a, e, c) {
p("public flash.text.TextSnapshot::getText");
};
e.prototype.getTextRunInfo = function(a, e) {
p("public flash.text.TextSnapshot::getTextRunInfo");
};
e.prototype.hitTestTextNearPos = function(a, e, c) {
p("public flash.text.TextSnapshot::hitTestTextNearPos");
};
e.prototype.setSelectColor = function(a) {
p("public flash.text.TextSnapshot::setSelectColor");
};
e.prototype.setSelected = function(a, e, c) {
p("public flash.text.TextSnapshot::setSelected");
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.TextSnapshot = e;
})(h.text || (h.text = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = function(a) {
function c() {
s("public flash.trace.Trace");
}
__extends(c, a);
c.setLevel = function(a, e) {
p("public flash.trace.Trace::static setLevel");
};
c.getLevel = function(a) {
p("public flash.trace.Trace::static getLevel");
};
c.setListener = function(a) {
p("public flash.trace.Trace::static setListener");
};
c.getListener = function() {
p("public flash.trace.Trace::static getListener");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.OFF = void 0;
c.METHODS = 1;
c.METHODS_WITH_ARGS = 2;
c.METHODS_AND_LINES = 3;
c.METHODS_AND_LINES_WITH_ARGS = 4;
c.FILE = 1;
c.LISTENER = 2;
return c;
}(a.ASNative);
h.Trace = l;
})(h.trace || (h.trace = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.somewhatImplemented, u = function(c) {
function e() {
a.display.NativeMenu.instanceConstructorNoInitialize.call(this);
this.builtInItems = new h.ContextMenuBuiltInItems;
this.customItems = [];
}
__extends(e, c);
Object.defineProperty(e, "isSupported", {get:function() {
p("ContextMenu::isSupported");
return!1;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "builtInItems", {get:function() {
p("public flash.ui.ContextMenu::get builtInItems");
return this._builtInItems;
}, set:function(a) {
p("public flash.ui.ContextMenu::set builtInItems");
this._builtInItems = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "customItems", {get:function() {
p("public flash.ui.ContextMenu::get customItems");
return this._customItems;
}, set:function(a) {
p("public flash.ui.ContextMenu::set customItems");
this._customItems = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "link", {get:function() {
p("public flash.ui.ContextMenu::get link");
return this._link;
}, set:function(a) {
p("public flash.ui.ContextMenu::set link");
this._link = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "clipboardMenu", {get:function() {
p("public flash.ui.ContextMenu::get clipboardMenu");
return this._clipboardMenu;
}, set:function(a) {
a = !!a;
p("public flash.ui.ContextMenu::set clipboardMenu");
this._clipboardMenu = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "clipboardItems", {get:function() {
p("public flash.ui.ContextMenu::get clipboardItems");
return this._clipboardItems;
}, set:function(a) {
p("public flash.ui.ContextMenu::set clipboardItems");
this._clipboardItems = a;
}, enumerable:!0, configurable:!0});
e.prototype.hideBuiltInItems = function() {
var a = this.builtInItems;
a && (a.save = !1, a.zoom = !1, a.quality = !1, a.play = !1, a.loop = !1, a.rewind = !1, a.forwardAndBack = !1, a.print = !1);
};
e.prototype.clone = function() {
var a = new h.ContextMenu;
a.builtInItems = this.builtInItems.clone();
this.cloneLinkAndClipboardProperties(a);
for (var e = this.customItems, c = 0;c < e.length;c++) {
a.customItems.push(e[c].clone());
}
return a;
};
e.prototype.cloneLinkAndClipboardProperties = function(a) {
p("public flash.ui.ContextMenu::cloneLinkAndClipboardProperties");
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.display.NativeMenu);
h.ContextMenu = u;
})(a.ui || (a.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(c) {
(function(c) {
var h = function(a) {
function h() {
this._print = this._forwardAndBack = this._rewind = this._loop = this._play = this._quality = this._zoom = this._save = !0;
}
__extends(h, a);
Object.defineProperty(h.prototype, "save", {get:function() {
return this._save;
}, set:function(a) {
this._save = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "zoom", {get:function() {
return this._zoom;
}, set:function(a) {
this._zoom = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "quality", {get:function() {
return this._quality;
}, set:function(a) {
this._quality = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "play", {get:function() {
return this._play;
}, set:function(a) {
this._play = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "loop", {get:function() {
return this._loop;
}, set:function(a) {
this._loop = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "rewind", {get:function() {
return this._rewind;
}, set:function(a) {
this._rewind = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "forwardAndBack", {get:function() {
return this._forwardAndBack;
}, set:function(a) {
this._forwardAndBack = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "print", {get:function() {
return this._print;
}, set:function(a) {
this._print = !!a;
}, enumerable:!0, configurable:!0});
h.prototype.clone = function() {
var a = new c.ContextMenuBuiltInItems;
a._save = this._save;
a._zoom = this._zoom;
a._quality = this._quality;
a._play = this._play;
a._loop = this._loop;
a._rewind = this._rewind;
a._forwardAndBack = this._forwardAndBack;
a._print = this._print;
return a;
};
h.classInitializer = null;
h.initializer = null;
h.classSymbols = null;
h.instanceSymbols = null;
return h;
}(a.ASNative);
c.ContextMenuBuiltInItems = h;
})(c.ui || (c.ui = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.somewhatImplemented, s = function(a) {
function e() {
this._selectAll = this._clear = this._paste = this._copy = this._cut = !0;
}
__extends(e, a);
Object.defineProperty(e.prototype, "cut", {get:function() {
p("cut");
return this._cut;
}, set:function(a) {
p("cut");
this._cut = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "copy", {get:function() {
p("copy");
return this._copy;
}, set:function(a) {
p("copy");
this._copy = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "paste", {get:function() {
p("paste");
return this._paste;
}, set:function(a) {
p("paste");
this._paste = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "clear", {get:function() {
p("clear");
return this._clear;
}, set:function(a) {
p("clear");
this._clear = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "selectAll", {get:function() {
p("selectAll");
return this._selectAll;
}, set:function(a) {
p("selectAll");
this._selectAll = !!a;
}, enumerable:!0, configurable:!0});
e.prototype.clone = function() {
var a = new h.ContextMenuClipboardItems;
a._cut = this._cut;
a._copy = this._copy;
a._paste = this._paste;
a._clear = this._clear;
a._selectAll = this._selectAll;
return a;
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.ASNative);
h.ContextMenuClipboardItems = s;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.AVM2.Runtime.asCoerceString, u = function(a) {
function e(a, e, c, h) {
void 0 === e && (e = !1);
void 0 === c && (c = !0);
void 0 === h && (h = !0);
this._caption = (a = p(a)) ? a : "";
this._separatorBefore = !!e;
this._enabled = !!c;
this._visible = !!h;
}
__extends(e, a);
Object.defineProperty(e.prototype, "caption", {get:function() {
return this._caption;
}, set:function(a) {
this._caption = a = p(a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "separatorBefore", {get:function() {
return this._separatorBefore;
}, set:function(a) {
this._separatorBefore = !!a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "visible", {get:function() {
return this._visible;
}, set:function(a) {
this._visible = !!a;
}, enumerable:!0, configurable:!0});
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.display.NativeMenuItem);
h.ContextMenuItem = u;
})(a.ui || (a.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(v) {
var p = c.Debug.somewhatImplemented, u = c.Debug.dummyConstructor, l = c.AVM2.Runtime.throwError, e = function(a) {
function e() {
u("public flash.ui.GameInput");
}
__extends(e, a);
Object.defineProperty(e.prototype, "numDevices", {get:function() {
p("public flash.ui.GameInput::get numDevices");
return 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(e.prototype, "isSupported", {get:function() {
p("public flash.ui.GameInput::get isSupported");
return!1;
}, enumerable:!0, configurable:!0});
e.getDeviceAt = function(a) {
p("public flash.ui.GameInput::static getDeviceAt");
l("RangeError", h.Errors.ParamRangeError, "index");
return null;
};
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
return e;
}(a.events.EventDispatcher);
v.GameInput = e;
})(a.ui || (a.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.ui.GameInputControl");
}
__extends(c, a);
Object.defineProperty(c.prototype, "numValues", {get:function() {
p("public flash.ui.GameInputControl::get numValues");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "index", {get:function() {
p("public flash.ui.GameInputControl::get index");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "relative", {get:function() {
p("public flash.ui.GameInputControl::get relative");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "type", {get:function() {
p("public flash.ui.GameInputControl::get type");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "hand", {get:function() {
p("public flash.ui.GameInputControl::get hand");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "finger", {get:function() {
p("public flash.ui.GameInputControl::get finger");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "device", {get:function() {
p("public flash.ui.GameInputControl::get device");
}, enumerable:!0, configurable:!0});
c.prototype.getValueAt = function(a) {
p("public flash.ui.GameInputControl::getValueAt");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.events.EventDispatcher);
h.GameInputControl = l;
})(a.ui || (a.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.ui.GameInputControlType");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.MOVEMENT = "movement";
e.ROTATION = "rotation";
e.DIRECTION = "direction";
e.ACCELERATION = "acceleration";
e.BUTTON = "button";
e.TRIGGER = "trigger";
return e;
}(a.ASNative);
h.GameInputControlType = s;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function(a) {
function c() {
u("public flash.ui.GameInputDevice");
}
__extends(c, a);
Object.defineProperty(c.prototype, "numControls", {get:function() {
p("public flash.ui.GameInputDevice::get numControls");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "sampleInterval", {get:function() {
p("public flash.ui.GameInputDevice::get sampleInterval");
}, set:function(a) {
p("public flash.ui.GameInputDevice::set sampleInterval");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "enabled", {get:function() {
p("public flash.ui.GameInputDevice::get enabled");
}, set:function(a) {
p("public flash.ui.GameInputDevice::set enabled");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "id", {get:function() {
p("public flash.ui.GameInputDevice::get id");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "name", {get:function() {
p("public flash.ui.GameInputDevice::get name");
}, enumerable:!0, configurable:!0});
c.prototype.getControlAt = function(a) {
p("public flash.ui.GameInputDevice::getControlAt");
};
c.prototype.startCachingSamples = function(a, e) {
p("public flash.ui.GameInputDevice::startCachingSamples");
};
c.prototype.stopCachingSamples = function() {
p("public flash.ui.GameInputDevice::stopCachingSamples");
};
c.prototype.getCachedSamples = function(a, e) {
p("public flash.ui.GameInputDevice::getCachedSamples");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.MAX_BUFFER_SIZE = 4800;
return c;
}(a.events.EventDispatcher);
h.GameInputDevice = l;
})(a.ui || (a.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.ui.GameInputFinger");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.THUMB = "thumb";
e.INDEX = "index";
e.MIDDLE = "middle";
e.UNKNOWN = "unknown";
return e;
}(a.ASNative);
h.GameInputFinger = s;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function e() {
p("public flash.ui.GameInputHand");
}
__extends(e, a);
e.classInitializer = null;
e.initializer = null;
e.classSymbols = null;
e.instanceSymbols = null;
e.RIGHT = "right";
e.LEFT = "left";
e.UNKNOWN = "unknown";
return e;
}(a.ASNative);
h.GameInputHand = s;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.dummyConstructor, l = function() {
function a() {
this._lastKeyCode = 0;
this._captureKeyPress = !1;
this._charCodeMap = [];
}
a.prototype.dispatchKeyboardEvent = function(a) {
var e = a.keyCode;
if ("keydown" === a.type) {
this._lastKeyCode = e;
if (this._captureKeyPress = 8 === e || 9 === e || 13 === e || 32 === e || 48 <= e && 90 >= e || 145 < e) {
return;
}
this._charCodeMap[e] = 0;
} else {
if ("keypress" === a.type) {
if (this._captureKeyPress) {
e = this._lastKeyCode, this._charCodeMap[e] = a.charCode;
} else {
return;
}
}
}
if (this.target) {
var c = "keyup" === a.type;
this.target.dispatchEvent(new h.events.KeyboardEvent(c ? "keyUp" : "keyDown", !0, !1, c ? this._charCodeMap[e] : a.charCode, c ? a.keyCode : this._lastKeyCode, a.location, a.ctrlKey, a.altKey, a.shiftKey));
}
};
return a;
}();
v.KeyboardEventDispatcher = l;
l = function(a) {
function c() {
u("public flash.ui.Keyboard");
}
__extends(c, a);
Object.defineProperty(c, "capsLock", {get:function() {
p("public flash.ui.Keyboard::get capsLock");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "numLock", {get:function() {
p("public flash.ui.Keyboard::get numLock");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "hasVirtualKeyboard", {get:function() {
p("public flash.ui.Keyboard::get hasVirtualKeyboard");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "physicalKeyboardType", {get:function() {
p("public flash.ui.Keyboard::get physicalKeyboardType");
}, enumerable:!0, configurable:!0});
c.isAccessible = function() {
p("public flash.ui.Keyboard::static isAccessible");
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.KEYNAME_UPARROW = "Up";
c.KEYNAME_DOWNARROW = "Down";
c.KEYNAME_LEFTARROW = "Left";
c.KEYNAME_RIGHTARROW = "Right";
c.KEYNAME_F1 = "F1";
c.KEYNAME_F2 = "F2";
c.KEYNAME_F3 = "F3";
c.KEYNAME_F4 = "F4";
c.KEYNAME_F5 = "F5";
c.KEYNAME_F6 = "F6";
c.KEYNAME_F7 = "F7";
c.KEYNAME_F8 = "F8";
c.KEYNAME_F9 = "F9";
c.KEYNAME_F10 = "F10";
c.KEYNAME_F11 = "F11";
c.KEYNAME_F12 = "F12";
c.KEYNAME_F13 = "F13";
c.KEYNAME_F14 = "F14";
c.KEYNAME_F15 = "F15";
c.KEYNAME_F16 = "F16";
c.KEYNAME_F17 = "F17";
c.KEYNAME_F18 = "F18";
c.KEYNAME_F19 = "F19";
c.KEYNAME_F20 = "F20";
c.KEYNAME_F21 = "F21";
c.KEYNAME_F22 = "F22";
c.KEYNAME_F23 = "F23";
c.KEYNAME_F24 = "F24";
c.KEYNAME_F25 = "F25";
c.KEYNAME_F26 = "F26";
c.KEYNAME_F27 = "F27";
c.KEYNAME_F28 = "F28";
c.KEYNAME_F29 = "F29";
c.KEYNAME_F30 = "F30";
c.KEYNAME_F31 = "F31";
c.KEYNAME_F32 = "F32";
c.KEYNAME_F33 = "F33";
c.KEYNAME_F34 = "F34";
c.KEYNAME_F35 = "F35";
c.KEYNAME_INSERT = "Insert";
c.KEYNAME_DELETE = "Delete";
c.KEYNAME_HOME = "Home";
c.KEYNAME_BEGIN = "Begin";
c.KEYNAME_END = "End";
c.KEYNAME_PAGEUP = "PgUp";
c.KEYNAME_PAGEDOWN = "PgDn";
c.KEYNAME_PRINTSCREEN = "PrntScrn";
c.KEYNAME_SCROLLLOCK = "ScrlLck";
c.KEYNAME_PAUSE = "Pause";
c.KEYNAME_SYSREQ = "SysReq";
c.KEYNAME_BREAK = "Break";
c.KEYNAME_RESET = "Reset";
c.KEYNAME_STOP = "Stop";
c.KEYNAME_MENU = "Menu";
c.KEYNAME_USER = "User";
c.KEYNAME_SYSTEM = "Sys";
c.KEYNAME_PRINT = "Print";
c.KEYNAME_CLEARLINE = "ClrLn";
c.KEYNAME_CLEARDISPLAY = "ClrDsp";
c.KEYNAME_INSERTLINE = "InsLn";
c.KEYNAME_DELETELINE = "DelLn";
c.KEYNAME_INSERTCHAR = "InsChr";
c.KEYNAME_DELETECHAR = "DelChr";
c.KEYNAME_PREV = "Prev";
c.KEYNAME_NEXT = "Next";
c.KEYNAME_SELECT = "Select";
c.KEYNAME_EXECUTE = "Exec";
c.KEYNAME_UNDO = "Undo";
c.KEYNAME_REDO = "Redo";
c.KEYNAME_FIND = "Find";
c.KEYNAME_HELP = "Help";
c.KEYNAME_MODESWITCH = "ModeSw";
c.STRING_UPARROW = "\uf700";
c.STRING_DOWNARROW = "\uf701";
c.STRING_LEFTARROW = "\uf702";
c.STRING_RIGHTARROW = "\uf703";
c.STRING_F1 = "\uf704";
c.STRING_F2 = "\uf705";
c.STRING_F3 = "\uf706";
c.STRING_F4 = "\uf707";
c.STRING_F5 = "\uf708";
c.STRING_F6 = "\uf709";
c.STRING_F7 = "\uf70a";
c.STRING_F8 = "\uf70b";
c.STRING_F9 = "\uf70c";
c.STRING_F10 = "\uf70d";
c.STRING_F11 = "\uf70e";
c.STRING_F12 = "\uf70f";
c.STRING_F13 = "\uf710";
c.STRING_F14 = "\uf711";
c.STRING_F15 = "\uf712";
c.STRING_F16 = "\uf713";
c.STRING_F17 = "\uf714";
c.STRING_F18 = "\uf715";
c.STRING_F19 = "\uf716";
c.STRING_F20 = "\uf717";
c.STRING_F21 = "\uf718";
c.STRING_F22 = "\uf719";
c.STRING_F23 = "\uf71a";
c.STRING_F24 = "\uf71b";
c.STRING_F25 = "\uf71c";
c.STRING_F26 = "\uf71d";
c.STRING_F27 = "\uf71e";
c.STRING_F28 = "\uf71f";
c.STRING_F29 = "\uf720";
c.STRING_F30 = "\uf721";
c.STRING_F31 = "\uf722";
c.STRING_F32 = "\uf723";
c.STRING_F33 = "\uf724";
c.STRING_F34 = "\uf725";
c.STRING_F35 = "\uf726";
c.STRING_INSERT = "\uf727";
c.STRING_DELETE = "\uf728";
c.STRING_HOME = "\uf729";
c.STRING_BEGIN = "\uf72a";
c.STRING_END = "\uf72b";
c.STRING_PAGEUP = "\uf72c";
c.STRING_PAGEDOWN = "\uf72d";
c.STRING_PRINTSCREEN = "\uf72e";
c.STRING_SCROLLLOCK = "\uf72f";
c.STRING_PAUSE = "\uf730";
c.STRING_SYSREQ = "\uf731";
c.STRING_BREAK = "\uf732";
c.STRING_RESET = "\uf733";
c.STRING_STOP = "\uf734";
c.STRING_MENU = "\uf735";
c.STRING_USER = "\uf736";
c.STRING_SYSTEM = "\uf737";
c.STRING_PRINT = "\uf738";
c.STRING_CLEARLINE = "\uf739";
c.STRING_CLEARDISPLAY = "\uf73a";
c.STRING_INSERTLINE = "\uf73b";
c.STRING_DELETELINE = "\uf73c";
c.STRING_INSERTCHAR = "\uf73d";
c.STRING_DELETECHAR = "\uf73e";
c.STRING_PREV = "\uf73f";
c.STRING_NEXT = "\uf740";
c.STRING_SELECT = "\uf741";
c.STRING_EXECUTE = "\uf742";
c.STRING_UNDO = "\uf743";
c.STRING_REDO = "\uf744";
c.STRING_FIND = "\uf745";
c.STRING_HELP = "\uf746";
c.STRING_MODESWITCH = "\uf747";
c.CharCodeStrings = void 0;
c.NUMBER_0 = 48;
c.NUMBER_1 = 49;
c.NUMBER_2 = 50;
c.NUMBER_3 = 51;
c.NUMBER_4 = 52;
c.NUMBER_5 = 53;
c.NUMBER_6 = 54;
c.NUMBER_7 = 55;
c.NUMBER_8 = 56;
c.NUMBER_9 = 57;
c.A = 65;
c.B = 66;
c.C = 67;
c.D = 68;
c.E = 69;
c.F = 70;
c.G = 71;
c.H = 72;
c.I = 73;
c.J = 74;
c.K = 75;
c.L = 76;
c.M = 77;
c.N = 78;
c.O = 79;
c.P = 80;
c.Q = 81;
c.R = 82;
c.S = 83;
c.T = 84;
c.U = 85;
c.V = 86;
c.W = 87;
c.X = 88;
c.Y = 89;
c.Z = 90;
c.SEMICOLON = 186;
c.EQUAL = 187;
c.COMMA = 188;
c.MINUS = 189;
c.PERIOD = 190;
c.SLASH = 191;
c.BACKQUOTE = 192;
c.LEFTBRACKET = 219;
c.BACKSLASH = 220;
c.RIGHTBRACKET = 221;
c.QUOTE = 222;
c.ALTERNATE = 18;
c.BACKSPACE = 8;
c.CAPS_LOCK = 20;
c.COMMAND = 15;
c.CONTROL = 17;
c.DELETE = 46;
c.DOWN = 40;
c.END = 35;
c.ENTER = 13;
c.ESCAPE = 27;
c.F1 = 112;
c.F2 = 113;
c.F3 = 114;
c.F4 = 115;
c.F5 = 116;
c.F6 = 117;
c.F7 = 118;
c.F8 = 119;
c.F9 = 120;
c.F10 = 121;
c.F11 = 122;
c.F12 = 123;
c.F13 = 124;
c.F14 = 125;
c.F15 = 126;
c.HOME = 36;
c.INSERT = 45;
c.LEFT = 37;
c.NUMPAD = 21;
c.NUMPAD_0 = 96;
c.NUMPAD_1 = 97;
c.NUMPAD_2 = 98;
c.NUMPAD_3 = 99;
c.NUMPAD_4 = 100;
c.NUMPAD_5 = 101;
c.NUMPAD_6 = 102;
c.NUMPAD_7 = 103;
c.NUMPAD_8 = 104;
c.NUMPAD_9 = 105;
c.NUMPAD_ADD = 107;
c.NUMPAD_DECIMAL = 110;
c.NUMPAD_DIVIDE = 111;
c.NUMPAD_ENTER = 108;
c.NUMPAD_MULTIPLY = 106;
c.NUMPAD_SUBTRACT = 109;
c.PAGE_DOWN = 34;
c.PAGE_UP = 33;
c.RIGHT = 39;
c.SHIFT = 16;
c.SPACE = 32;
c.TAB = 9;
c.UP = 38;
c.RED = 16777216;
c.GREEN = 16777217;
c.YELLOW = 16777218;
c.BLUE = 16777219;
c.CHANNEL_UP = 16777220;
c.CHANNEL_DOWN = 16777221;
c.RECORD = 16777222;
c.PLAY = 16777223;
c.PAUSE = 16777224;
c.STOP = 16777225;
c.FAST_FORWARD = 16777226;
c.REWIND = 16777227;
c.SKIP_FORWARD = 16777228;
c.SKIP_BACKWARD = 16777229;
c.NEXT = 16777230;
c.PREVIOUS = 16777231;
c.LIVE = 16777232;
c.LAST = 16777233;
c.MENU = 16777234;
c.INFO = 16777235;
c.GUIDE = 16777236;
c.EXIT = 16777237;
c.BACK = 16777238;
c.AUDIO = 16777239;
c.SUBTITLE = 16777240;
c.DVR = 16777241;
c.VOD = 16777242;
c.INPUT = 16777243;
c.SETUP = 16777244;
c.HELP = 16777245;
c.MASTER_SHELL = 16777246;
c.SEARCH = 16777247;
return c;
}(a.ASNative);
v.Keyboard = l;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(s) {
(function(v) {
var p = c.Debug.notImplemented, u = c.Debug.somewhatImplemented, l = c.Debug.assert, e = c.AVM2.Runtime.asCoerceString, m = s.events, t = function() {
function a() {
this.currentTarget = this.stage = null;
}
a.prototype._findTarget = function(a, c) {
var e = [];
this.stage._containsGlobalPoint(20 * a.x | 0, 20 * a.y | 0, c, e);
l(2 > e.length);
return e.length ? e[0] : e.length ? e[0] : null;
};
a.prototype._dispatchMouseEvent = function(a, c, e, d) {
void 0 === d && (d = null);
var b = a.globalToLocal(e.point);
c = new m.MouseEvent(c, c !== m.MouseEvent.ROLL_OVER && c !== m.MouseEvent.ROLL_OUT && c !== m.MouseEvent.MOUSE_LEAVE, !1, b.x, b.y, d, e.ctrlKey, e.altKey, e.shiftKey, !!e.buttons);
a.dispatchEvent(c);
};
a.prototype.handleMouseEvent = function(a) {
var c = this.stage;
if (!c) {
return c;
}
var e = a.point;
s.ui.Mouse.updateCurrentPosition(e);
var d = this.currentTarget, b = null, g = s.events.MouseEvent.typeFromDOMType(a.type);
if (0 <= e.x && e.x < c.stageWidth && 0 <= e.y && e.y < c.stageHeight) {
b = this._findTarget(e, 3) || this.stage;
} else {
if (!d) {
return c;
}
this._dispatchMouseEvent(c, m.MouseEvent.MOUSE_LEAVE, a);
if (g !== m.MouseEvent.MOUSE_MOVE) {
return c;
}
}
s.ui.Mouse.draggableObject && (e = this._findTarget(e, 5), s.ui.Mouse.draggableObject._updateDragState(e));
switch(g) {
case m.MouseEvent.MOUSE_DOWN:
a.buttons & 1 ? a.buttons = 1 : a.buttons & 2 ? (g = m.MouseEvent.MIDDLE_MOUSE_DOWN, a.buttons = 2) : a.buttons & 4 && (g = m.MouseEvent.RIGHT_MOUSE_DOWN, a.buttons = 4);
b._mouseDown = !0;
break;
case m.MouseEvent.MOUSE_UP:
a.buttons & 1 ? a.buttons = 1 : a.buttons & 2 ? (g = m.MouseEvent.MIDDLE_MOUSE_UP, a.buttons = 2) : a.buttons & 4 && (g = m.MouseEvent.RIGHT_MOUSE_UP, a.buttons = 4);
b._mouseDown = !1;
break;
case m.MouseEvent.CLICK:
a.buttons & 1 || (a.buttons & 2 ? g = m.MouseEvent.MIDDLE_CLICK : a.buttons & 4 && (g = m.MouseEvent.RIGHT_CLICK));
a.buttons = 0;
break;
case m.MouseEvent.DOUBLE_CLICK:
if (!b.doubleClickEnabled) {
return;
}
a.buttons = 0;
break;
case m.MouseEvent.MOUSE_MOVE:
this.currentTarget = b;
a.buttons &= 1;
if (b === d) {
break;
}
e = b ? b.findNearestCommonAncestor(d) : c;
if (d && d !== c) {
d._mouseOver = !1;
d._mouseDown = !1;
this._dispatchMouseEvent(d, m.MouseEvent.MOUSE_OUT, a, b);
for (var h = d;h !== e;) {
this._dispatchMouseEvent(h, m.MouseEvent.ROLL_OUT, a, b), h = h.parent;
}
}
if (!b) {
return c;
}
if (b === c) {
break;
}
for (c = b;c !== e;) {
this._dispatchMouseEvent(c, m.MouseEvent.ROLL_OVER, a, d), c = c.parent;
}
b._mouseOver = !0;
this._dispatchMouseEvent(b, m.MouseEvent.MOUSE_OVER, a, d);
return b;
}
this._dispatchMouseEvent(b, g, a);
return b;
};
return a;
}();
v.MouseEventDispatcher = t;
(function(a) {
a[a.Left = 1] = "Left";
a[a.Middle = 2] = "Middle";
a[a.Right = 4] = "Right";
})(v.MouseButtonFlags || (v.MouseButtonFlags = {}));
t = function(a) {
function c() {
}
__extends(c, a);
Object.defineProperty(c, "supportsCursor", {get:function() {
return!0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "cursor", {get:function() {
return this._cursor;
}, set:function(a) {
a = e(a);
0 > v.MouseCursor.toNumber(a) && throwError("ArgumentError", h.Errors.InvalidParamError, "cursor");
this._cursor = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "supportsNativeCursor", {get:function() {
return!0;
}, enumerable:!0, configurable:!0});
c.hide = function() {
u("public flash.ui.Mouse::static hide");
};
c.show = function() {
u("public flash.ui.Mouse::static show");
};
c.registerCursor = function(a, c) {
e(a);
p("public flash.ui.Mouse::static registerCursor");
};
c.unregisterCursor = function(a) {
e(a);
p("public flash.ui.Mouse::static unregisterCursor");
};
c.updateCurrentPosition = function(a) {
this._currentPosition.copyFrom(a);
};
c.classInitializer = function() {
this._currentPosition = new s.geom.Point;
this._cursor = v.MouseCursor.AUTO;
this.draggableObject = null;
};
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
v.Mouse = t;
})(s.ui || (s.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function c() {
p("public flash.ui.MouseCursor");
}
__extends(c, a);
c.fromNumber = function(a) {
switch(a) {
case 0:
return c.AUTO;
case 1:
return c.ARROW;
case 2:
return c.BUTTON;
case 3:
return c.HAND;
case 4:
return c.IBEAM;
default:
return null;
}
};
c.toNumber = function(a) {
switch(a) {
case c.AUTO:
return 0;
case c.ARROW:
return 1;
case c.BUTTON:
return 2;
case c.HAND:
return 3;
case c.IBEAM:
return 4;
default:
return-1;
}
};
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.AUTO = "auto";
c.ARROW = "arrow";
c.BUTTON = "button";
c.HAND = "hand";
c.IBEAM = "ibeam";
return c;
}(a.ASNative);
h.MouseCursor = s;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = function(a) {
function c() {
s("public flash.ui.MouseCursorData");
}
__extends(c, a);
Object.defineProperty(c.prototype, "data", {get:function() {
p("public flash.ui.MouseCursorData::get data");
}, set:function(a) {
p("public flash.ui.MouseCursorData::set data");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "hotSpot", {get:function() {
p("public flash.ui.MouseCursorData::get hotSpot");
}, set:function(a) {
p("public flash.ui.MouseCursorData::set hotSpot");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "frameRate", {get:function() {
p("public flash.ui.MouseCursorData::get frameRate");
}, set:function(a) {
p("public flash.ui.MouseCursorData::set frameRate");
}, enumerable:!0, configurable:!0});
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.MouseCursorData = l;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.somewhatImplemented, s = c.Debug.notImplemented, l = c.Debug.dummyConstructor, e = c.AVM2.Runtime.asCoerceString, m = function(a) {
function c() {
l("public flash.ui.Multitouch");
}
__extends(c, a);
Object.defineProperty(c, "inputMode", {get:function() {
s("public flash.ui.Multitouch::get inputMode");
}, set:function(a) {
e(a);
s("public flash.ui.Multitouch::set inputMode");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "supportsTouchEvents", {get:function() {
p("public flash.ui.Multitouch::get supportsTouchEvents");
return!1;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "supportsGestureEvents", {get:function() {
p("public flash.ui.Multitouch::get supportsGestureEvents");
return!1;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "supportedGestures", {get:function() {
p("public flash.ui.Multitouch::get supportedGestures");
return null;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "maxTouchPoints", {get:function() {
p("public flash.ui.Multitouch::get maxTouchPoints");
return 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "mapTouchToMouse", {get:function() {
p("public flash.ui.Multitouch::get mapTouchToMouse");
return!0;
}, set:function(a) {
s("public flash.ui.Multitouch::set mapTouchToMouse");
}, enumerable:!0, configurable:!0});
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.ASNative);
h.Multitouch = m;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function c() {
p("public flash.ui.MultitouchInputMode");
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.NONE = "none";
c.GESTURE = "gesture";
c.TOUCH_POINT = "touchPoint";
return c;
}(a.ASNative);
h.MultitouchInputMode = s;
})(h.ui || (h.ui = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function c() {
p("public flash.utils.Endian");
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
c.BIG_ENDIAN = "bigEndian";
c.LITTLE_ENDIAN = "littleEndian";
return c;
}(a.ASNative);
h.Endian = s;
})(h.utils || (h.utils = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
(function(a) {
(function(v) {
var p = function(p) {
function l(c, h) {
a.events.EventDispatcher.instanceConstructorNoInitialize.call(this);
this._delay = +c;
this._repeatCount = h | 0;
this._iteration = 0;
}
__extends(l, p);
Object.defineProperty(l.prototype, "running", {get:function() {
return this._running;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "delay", {get:function() {
return this._delay;
}, set:function(a) {
a = +a;
(0 > a || !isFinite(a)) && throwError("RangeError", c.Errors.DelayRangeError);
this._delay = a;
this._running && (this.stop(), this.start());
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "repeatCount", {get:function() {
return this._repeatCount;
}, set:function(a) {
(this._repeatCount = a | 0) && this._running && this._iteration >= this._repeatCount && this.stop();
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "currentCount", {get:function() {
return this._iteration;
}, enumerable:!0, configurable:!0});
l.prototype.reset = function() {
this._running && this.stop();
this._iteration = 0;
};
l.prototype.stop = function() {
this._running = !1;
clearInterval(this._interval);
};
l.prototype.start = function() {
this._running || (this._running = !0, this._interval = setInterval(this._tick.bind(this), this._delay));
};
l.prototype._tick = function() {
this._iteration++;
this._running && (a.utils.Timer.dispatchingEnabled && this.dispatchEvent(new a.events.TimerEvent("timer", !0, !1)), 0 !== this._repeatCount && this._iteration >= this._repeatCount && (this.stop(), this.dispatchEvent(new a.events.TimerEvent(a.events.TimerEvent.TIMER_COMPLETE, !1, !1))));
};
l.classInitializer = null;
l.initializer = null;
l.classSymbols = null;
l.instanceSymbols = null;
l.dispatchingEnabled = !0;
return l;
}(a.events.EventDispatcher);
v.Timer = p;
})(a.utils || (a.utils = {}));
})(a.flash || (a.flash = {}));
})(c.AS || (c.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = function(a) {
function c(a, e, h, l) {
p("packageInternal flash.utils.SetIntervalTimer");
}
__extends(c, a);
c.classInitializer = null;
c.initializer = null;
c.classSymbols = null;
c.instanceSymbols = null;
return c;
}(a.utils.Timer);
h.SetIntervalTimer = u;
})(a.utils || (a.utils = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) {
function c(a, e) {
l(e);
s("public flash.xml.XMLNode");
}
__extends(c, a);
c.escapeXML = function(a) {
l(a);
p("public flash.xml.XMLNode::static escapeXML");
};
c.initializer = null;
return c;
}(a.ASNative);
h.XMLNode = e;
})(h.xml || (h.xml = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(a) {
(function(h) {
var p = c.Debug.dummyConstructor, u = c.AVM2.Runtime.asCoerceString, l = function(a) {
function c(a) {
void 0 === a && (a = null);
u(a);
p("public flash.xml.XMLDocument");
}
__extends(c, a);
c.initializer = null;
return c;
}(a.xml.XMLNode);
h.XMLDocument = l;
})(a.xml || (a.xml = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.dummyConstructor, s = function(a) {
function c() {
p("public flash.xml.XMLNodeType");
}
__extends(c, a);
c.initializer = null;
return c;
}(a.ASNative);
h.XMLNodeType = s;
})(h.xml || (h.xml = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) {
function c() {
s("packageInternal flash.xml.XMLParser");
}
__extends(c, a);
c.prototype.startParse = function(a, c) {
l(a);
p("packageInternal flash.xml.XMLParser::startParse");
};
c.prototype.getNext = function(a) {
p("packageInternal flash.xml.XMLParser::getNext");
};
c.initializer = null;
return c;
}(a.ASNative);
h.XMLParser = e;
})(h.xml || (h.xml = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
(function(h) {
(function(h) {
var p = c.Debug.notImplemented, s = c.Debug.dummyConstructor, l = c.AVM2.Runtime.asCoerceString, e = function(a) {
function c() {
s("packageInternal flash.xml.XMLTag");
}
__extends(c, a);
Object.defineProperty(c.prototype, "type", {get:function() {
p("packageInternal flash.xml.XMLTag::get type");
}, set:function(a) {
p("packageInternal flash.xml.XMLTag::set type");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "empty", {get:function() {
p("packageInternal flash.xml.XMLTag::get empty");
}, set:function(a) {
p("packageInternal flash.xml.XMLTag::set empty");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "value", {get:function() {
p("packageInternal flash.xml.XMLTag::get value");
}, set:function(a) {
l(a);
p("packageInternal flash.xml.XMLTag::set value");
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "attrs", {get:function() {
p("packageInternal flash.xml.XMLTag::get attrs");
}, set:function(a) {
p("packageInternal flash.xml.XMLTag::set attrs");
}, enumerable:!0, configurable:!0});
c.initializer = null;
return c;
}(a.ASNative);
h.XMLTag = e;
})(h.xml || (h.xml = {}));
})(a.flash || (a.flash = {}));
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(a, d, b) {
return{classSimpleName:a, nativeName:d, cls:b};
}
function v(a, d, b) {
Object.defineProperty(a, b, {get:function() {
k(c.AVM2.Runtime.AVM2.instance, "AVM2 needs to be initialized.");
var e = c.AVM2.Runtime.AVM2.instance.systemDomain.getClass(d);
k(e.instanceConstructor);
Object.defineProperty(a, b, {value:e.instanceConstructor, writable:!1});
return a[b];
}, configurable:!0});
}
function p() {
return Date.now() - q.display.Loader.runtimeStartTime;
}
function u(a, d) {
null !== a && void 0 !== a || t("TypeError", h.Errors.NullPointerError, "request");
c.AVM2.Runtime.AVM2.instance.systemDomain.getClass("flash.net.URLRequest").isInstanceOf(a) || t("TypeError", h.Errors.CheckTypeFailedError, a, "flash.net.URLRequest");
var b = a.url;
c.isNullOrUndefined(b) && t("TypeError", h.Errors.NullPointerError, "url");
/^fscommand:/i.test(b) ? c.AVM2.Runtime.AVM2.instance.applicationDomain.getProperty(n.fromSimpleName("flash.system.fscommand"), !0, !0).call(null, b.substring(10), d) : c.FileLoadingService.instance.navigateTo(b, d);
}
function l(a) {
null !== a && void 0 !== a || t("TypeError", h.Errors.NullPointerError, "request");
c.AVM2.Runtime.AVM2.instance.systemDomain.getClass("flash.net.URLRequest").isInstanceOf(a) || t("TypeError", h.Errors.CheckTypeFailedError, a, "flash.net.URLRequest");
var d = c.FileLoadingService.instance.createSession();
d.onprogress = function() {
};
d.open(a);
}
function e(a, d) {
a || t("TypeError", h.Errors.NullPointerError, "aliasName");
d || t("TypeError", h.Errors.NullPointerError, "classObject");
h.aliasesCache.classes.set(d, a);
h.aliasesCache.names[a] = d;
}
function m(a) {
a || t("TypeError", h.Errors.NullPointerError, "aliasName");
var d = h.aliasesCache.names[a];
d || t("ReferenceError", h.Errors.ClassNotFoundError, a);
return d;
}
var t = c.AVM2.Runtime.throwError, q = c.AVM2.AS.flash, n = c.AVM2.ABC.Multiname, k = c.Debug.assert;
jsGlobal.flash = c.AVM2.AS.flash;
a.linkNatives = function(f) {
[s("flash.display.DisplayObject", "DisplayObjectClass", q.display.DisplayObject), s("flash.display.InteractiveObject", "InteractiveObjectClass", q.display.InteractiveObject), s("flash.display.DisplayObjectContainer", "ContainerClass", q.display.DisplayObjectContainer), s("flash.display.Sprite", "SpriteClass", q.display.Sprite), s("flash.display.MovieClip", "MovieClipClass", q.display.MovieClip), s("flash.display.Shape", "ShapeClass", q.display.Shape), s("flash.display.Bitmap", "BitmapClass",
q.display.Bitmap), s("flash.display.BitmapData", "BitmapDataClass", q.display.BitmapData), s("flash.display.Stage", "StageClass", q.display.Stage), s("flash.display.Loader", "LoaderClass", q.display.Loader), s("flash.display.LoaderInfo", "LoaderInfoClass", q.display.LoaderInfo), s("flash.display.Graphics", "GraphicsClass", q.display.Graphics), s("flash.display.SimpleButton", "SimpleButtonClass", q.display.SimpleButton), s("flash.display.MorphShape", "MorphShapeClass", q.display.MorphShape),
s("flash.display.NativeMenu", "NativeMenuClass", q.display.NativeMenu), s("flash.display.NativeMenuItem", "NativeMenuItemClass", q.display.NativeMenuItem), s("flash.display.FrameLabel", "FrameLabelClass", q.display.FrameLabel), s("flash.display.Scene", "SceneClass", q.display.Scene), s("flash.display.AVM1Movie", "AVM1MovieClass", q.display.AVM1Movie), s("flash.filters.BevelFilter", "BevelFilterClass", q.filters.BevelFilter), s("flash.filters.BitmapFilter", "BitmapFilterClass", q.filters.BitmapFilter),
s("flash.filters.BlurFilter", "BlurFilterClass", q.filters.BlurFilter), s("flash.filters.ColorMatrixFilter", "ColorMatrixFilterClass", q.filters.ColorMatrixFilter), s("flash.filters.ConvolutionFilter", "ConvolutionFilterClass", q.filters.ConvolutionFilter), s("flash.filters.DisplacementMapFilter", "DisplacementMapFilterClass", q.filters.DisplacementMapFilter), s("flash.filters.DropShadowFilter", "DropShadowFilterClass", q.filters.DropShadowFilter), s("flash.filters.GlowFilter", "GlowFilterClass",
q.filters.GlowFilter), s("flash.filters.GradientBevelFilter", "GradientBevelFilterClass", q.filters.GradientBevelFilter), s("flash.filters.GradientGlowFilter", "GradientGlowFilterClass", q.filters.GradientGlowFilter), s("flash.geom.Point", "PointClass", q.geom.Point), s("flash.geom.Rectangle", "RectangleClass", q.geom.Rectangle), s("flash.geom.Matrix", "MatrixClass", q.geom.Matrix), s("flash.geom.Matrix3D", "Matrix3DClass", q.geom.Matrix3D), s("flash.geom.Vector3D", "Vector3DClass", q.geom.Vector3D),
s("flash.geom.Transform", "TransformClass", q.geom.Transform), s("flash.geom.ColorTransform", "ColorTransformClass", q.geom.ColorTransform), s("flash.events.EventDispatcher", "EventDispatcherClass", q.events.EventDispatcher), s("flash.events.Event", "EventClass", q.events.Event), s("flash.events.ErrorEvent", "ErrorEventClass", q.events.ErrorEvent), s("flash.events.IOErrorEvent", "IOErrorEventClass", q.events.IOErrorEvent), s("flash.events.KeyboardEvent", "KeyboardEventClass", q.events.KeyboardEvent),
s("flash.events.MouseEvent", "MouseEventClass", q.events.MouseEvent), s("flash.events.GestureEvent", "GestureEventClass", q.events.GestureEvent), s("flash.events.TextEvent", "TextEventClass", q.events.TextEvent), s("flash.events.TimerEvent", "TimerEventClass", q.events.TimerEvent), s("flash.events.ProgressEvent", "ProgressEventClass", q.events.ProgressEvent), s("flash.events.NetStatusEvent", "NetStatusEventClass", q.events.NetStatusEvent), s("flash.events.HTTPStatusEvent", "HTTPStatusEventClass",
q.events.HTTPStatusEvent), s("flash.external.ExternalInterface", "ExternalInterfaceClass", q.external.ExternalInterface), s("flash.ui.ContextMenu", "ContextMenuClass", q.ui.ContextMenu), s("flash.ui.ContextMenuItem", "ContextMenuItemClass", q.ui.ContextMenuItem), s("flash.ui.ContextMenuBuiltInItems", "ContextMenuBuiltInItemsClass", q.ui.ContextMenuBuiltInItems), s("flash.ui.ContextMenuClipboardItems", "ContextMenuClipboardItemsClass", q.ui.ContextMenuClipboardItems), s("flash.ui.Keyboard",
"KeyboardClass", q.ui.Keyboard), s("flash.ui.Mouse", "MouseClass", q.ui.Mouse), s("flash.ui.MouseCursorData", "MouseCursorDataClass", q.ui.MouseCursorData), s("flash.ui.GameInput", "GameInputClass", q.ui.GameInput), s("flash.events.GameInputEvent", "GameInputEventClass", q.events.GameInputEvent), s("flash.ui.GameInputControl", "GameInputControlClass", q.ui.GameInputControl), s("flash.ui.GameInputControlType", "GameInputControlTypeClass", q.ui.GameInputControlType), s("flash.ui.GameInputDevice",
"GameInputDeviceClass", q.ui.GameInputDevice), s("flash.ui.GameInputFinger", "GameInputFingerClass", q.ui.GameInputFinger), s("flash.ui.GameInputHand", "GameInputHandClass", q.ui.GameInputHand), s("flash.ui.Multitouch", "MultitouchClass", q.ui.Multitouch), s("flash.ui.MultitouchInputMode", "MultitouchInputModeClass", q.ui.MultitouchInputMode), s("flash.events.TouchEvent", "TouchEventClass", q.events.TouchEvent), s("flash.text.Font", "FontClass", q.text.Font), s("flash.text.TextField", "TextFieldClass",
q.text.TextField), s("flash.text.StaticText", "StaticTextClass", q.text.StaticText), s("flash.text.StyleSheet", "StyleSheetClass", q.text.StyleSheet), s("flash.text.TextFormat", "TextFormatClass", q.text.TextFormat), s("flash.text.TextRun", "TextRunClass", q.text.TextRun), s("flash.text.TextLineMetrics"), s("flash.media.Sound", "SoundClass", q.media.Sound), s("flash.media.SoundChannel", "SoundChannelClass", q.media.SoundChannel), s("flash.media.SoundMixer", "SoundMixerClass", q.media.SoundMixer),
s("flash.media.SoundTransform", "SoundTransformClass", q.media.SoundTransform), s("flash.media.Video", "VideoClass", q.media.Video), s("flash.media.StageVideo", "StageVideoClass", q.media.StageVideo), s("flash.media.ID3Info", "ID3InfoClass", q.media.ID3Info), s("flash.media.Microphone", "MicrophoneClass", q.media.Microphone), s("flash.net.FileFilter", "FileFilterClass", q.net.FileFilter), s("flash.net.NetConnection", "NetConnectionClass", q.net.NetConnection), s("flash.net.NetStream", "NetStreamClass",
q.net.NetStream), s("flash.net.Responder", "ResponderClass", q.net.Responder), s("flash.net.URLRequest", "URLRequestClass", q.net.URLRequest), s("flash.net.URLRequestHeader"), s("flash.net.URLStream", "URLStreamClass", q.net.URLStream), s("flash.net.URLLoader", "URLLoaderClass", q.net.URLLoader), s("flash.net.SharedObject", "SharedObjectClass", q.net.SharedObject), s("flash.net.ObjectEncoding", "ObjectEncodingClass", q.net.ObjectEncoding), s("flash.net.LocalConnection", "LocalConnectionClass",
q.net.LocalConnection), s("flash.net.Socket", "SocketClass", q.net.Socket), s("flash.net.URLVariables", "URLVariablesClass", q.net.URLVariables), s("packageInternal flash.system.FSCommand", "FSCommandClass", q.system.FSCommand), s("flash.system.Capabilities", "CapabilitiesClass", q.system.Capabilities), s("flash.system.Security", "SecurityClass", q.system.Security), s("flash.system.SecurityDomain", "SecurityDomainClass", q.system.SecurityDomain), s("flash.system.ApplicationDomain", "ApplicationDomainClass",
q.system.ApplicationDomain), s("flash.system.JPEGLoaderContext", "JPEGLoaderContextClass", q.system.JPEGLoaderContext), s("flash.system.LoaderContext", "LoaderContextClass", q.system.LoaderContext), s("flash.accessibility.Accessibility", "AccessibilityClass", q.accessibility.Accessibility), s("flash.utils.Timer", "TimerClass", q.utils.Timer), s("flash.utils.ByteArray", "ByteArrayClass", q.utils.ByteArray)].forEach(function(d) {
for (var b = n.fromSimpleName(d.classSimpleName).getOriginalName().split("."), e = c.AVM2.AS, f = 0, k = b.length - 1;f < k;f++) {
e[b[f]] || (e[b[f]] = {}), e = e[b[f]];
}
v(e, d.classSimpleName, b[b.length - 1]);
a.registerNativeClass(d.nativeName, d.cls);
});
a.registerNativeFunction("FlashUtilScript::getDefinitionByName", c.AVM2.AS.Natives.getDefinitionByName);
a.registerNativeFunction("FlashUtilScript::getTimer", p);
a.registerNativeFunction("FlashUtilScript::escapeMultiByte", escape);
a.registerNativeFunction("FlashUtilScript::unescapeMultiByte", unescape);
a.registerNativeFunction("FlashNetScript::navigateToURL", u);
a.registerNativeFunction("FlashNetScript::sendToURL", l);
a.registerNativeFunction("Toplevel::registerClassAlias", e);
a.registerNativeFunction("Toplevel::getClassByAlias", m);
};
a.FlashUtilScript_getTimer = p;
a.FlashNetScript_navigateToURL = u;
})(h.AS || (h.AS = {}));
})(c.AVM2 || (c.AVM2 = {}));
})(Shumway || (Shumway = {}));
console.timeEnd("Load Flash TS Dependencies");
console.time("Load AVM1 Dependencies");
(function(c) {
(function(c) {
var a = function() {
function a(c, h) {
this.array = c;
this.position = 0;
this.end = c.length;
this.readANSI = 6 > h;
var s = new ArrayBuffer(4);
(new Int32Array(s))[0] = 1;
if (!(new Uint8Array(s))[0]) {
throw Error("big-endian platform");
}
}
a.prototype.readUI8 = function() {
return this.array[this.position++];
};
a.prototype.readUI16 = function() {
var a = this.position, c = this.array, c = c[a + 1] << 8 | c[a];
this.position = a + 2;
return c;
};
a.prototype.readSI16 = function() {
var a = this.position, c = this.array, c = c[a + 1] << 8 | c[a];
this.position = a + 2;
return 32768 > c ? c : c - 65536;
};
a.prototype.readInteger = function() {
var a = this.position, c = this.array, c = c[a] | c[a + 1] << 8 | c[a + 2] << 16 | c[a + 3] << 24;
this.position = a + 4;
return c;
};
a.prototype.readFloat = function() {
var a = this.position, c = this.array, h = new ArrayBuffer(4), l = new Uint8Array(h);
l[0] = c[a];
l[1] = c[a + 1];
l[2] = c[a + 2];
l[3] = c[a + 3];
this.position = a + 4;
return(new Float32Array(h))[0];
};
a.prototype.readDouble = function() {
var a = this.position, c = this.array, h = new ArrayBuffer(8), l = new Uint8Array(h);
l[4] = c[a];
l[5] = c[a + 1];
l[6] = c[a + 2];
l[7] = c[a + 3];
l[0] = c[a + 4];
l[1] = c[a + 5];
l[2] = c[a + 6];
l[3] = c[a + 7];
this.position = a + 8;
return(new Float64Array(h))[0];
};
a.prototype.readBoolean = function() {
return!!this.readUI8();
};
a.prototype.readANSIString = function() {
for (var a = "", c;c = this.readUI8();) {
a += String.fromCharCode(c);
}
return a;
};
a.prototype.readUTF8String = function() {
for (var a = "", c;c = this.readUI8();) {
if (128 > c) {
a += String.fromCharCode(c);
} else {
if (128 === (c & 192)) {
a += String.fromCharCode(c);
} else {
var h = this.position - 1, l = 192, e = 5;
do {
var m = l >> 1 | 128;
if ((c & m) === l) {
break;
}
l = m;
--e;
} while (0 <= e);
l = c & (1 << e) - 1;
for (m = 5;m >= e;--m) {
if (c = this.readUI8(), 128 !== (c & 192)) {
for (c = this.position - 1, this.position = h;this.position < c;) {
a += String.fromCharCode(this.readUI8());
}
} else {
l = l << 6 | c & 63;
}
}
a = 65536 <= l ? a + String.fromCharCode(l - 65536 >> 10 & 1023 | 55296, l & 1023 | 56320) : a + String.fromCharCode(l);
}
}
}
return a;
};
a.prototype.readString = function() {
return this.readANSI ? this.readANSIString() : this.readUTF8String();
};
a.prototype.readBytes = function(a) {
var c = this.position, h = Math.max(this.end - c, 0);
h < a && (a = h);
h = this.array.subarray(c, c + a);
this.position = c + a;
return h;
};
return a;
}();
c.ActionsDataStream = a;
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
var a = c.AVM1.ActionsDataStream;
(function(a) {
a[a.None = 0] = "None";
a[a.ActionGotoFrame = 129] = "ActionGotoFrame";
a[a.ActionGetURL = 131] = "ActionGetURL";
a[a.ActionNextFrame = 4] = "ActionNextFrame";
a[a.ActionPreviousFrame = 5] = "ActionPreviousFrame";
a[a.ActionPlay = 6] = "ActionPlay";
a[a.ActionStop = 7] = "ActionStop";
a[a.ActionToggleQuality = 8] = "ActionToggleQuality";
a[a.ActionStopSounds = 9] = "ActionStopSounds";
a[a.ActionWaitForFrame = 138] = "ActionWaitForFrame";
a[a.ActionSetTarget = 139] = "ActionSetTarget";
a[a.ActionGoToLabel = 140] = "ActionGoToLabel";
a[a.ActionPush = 150] = "ActionPush";
a[a.ActionPop = 23] = "ActionPop";
a[a.ActionAdd = 10] = "ActionAdd";
a[a.ActionSubtract = 11] = "ActionSubtract";
a[a.ActionMultiply = 12] = "ActionMultiply";
a[a.ActionDivide = 13] = "ActionDivide";
a[a.ActionEquals = 14] = "ActionEquals";
a[a.ActionLess = 15] = "ActionLess";
a[a.ActionAnd = 16] = "ActionAnd";
a[a.ActionOr = 17] = "ActionOr";
a[a.ActionNot = 18] = "ActionNot";
a[a.ActionStringEquals = 19] = "ActionStringEquals";
a[a.ActionStringLength = 20] = "ActionStringLength";
a[a.ActionMBStringLength = 49] = "ActionMBStringLength";
a[a.ActionStringAdd = 33] = "ActionStringAdd";
a[a.ActionStringExtract = 21] = "ActionStringExtract";
a[a.ActionMBStringExtract = 53] = "ActionMBStringExtract";
a[a.ActionStringLess = 41] = "ActionStringLess";
a[a.ActionToInteger = 24] = "ActionToInteger";
a[a.ActionCharToAscii = 50] = "ActionCharToAscii";
a[a.ActionMBCharToAscii = 54] = "ActionMBCharToAscii";
a[a.ActionAsciiToChar = 51] = "ActionAsciiToChar";
a[a.ActionMBAsciiToChar = 55] = "ActionMBAsciiToChar";
a[a.ActionJump = 153] = "ActionJump";
a[a.ActionIf = 157] = "ActionIf";
a[a.ActionCall = 158] = "ActionCall";
a[a.ActionGetVariable = 28] = "ActionGetVariable";
a[a.ActionSetVariable = 29] = "ActionSetVariable";
a[a.ActionGetURL2 = 154] = "ActionGetURL2";
a[a.ActionGotoFrame2 = 159] = "ActionGotoFrame2";
a[a.ActionSetTarget2 = 32] = "ActionSetTarget2";
a[a.ActionGetProperty = 34] = "ActionGetProperty";
a[a.ActionSetProperty = 35] = "ActionSetProperty";
a[a.ActionCloneSprite = 36] = "ActionCloneSprite";
a[a.ActionRemoveSprite = 37] = "ActionRemoveSprite";
a[a.ActionStartDrag = 39] = "ActionStartDrag";
a[a.ActionEndDrag = 40] = "ActionEndDrag";
a[a.ActionWaitForFrame2 = 141] = "ActionWaitForFrame2";
a[a.ActionTrace = 38] = "ActionTrace";
a[a.ActionGetTime = 52] = "ActionGetTime";
a[a.ActionRandomNumber = 48] = "ActionRandomNumber";
a[a.ActionCallFunction = 61] = "ActionCallFunction";
a[a.ActionCallMethod = 82] = "ActionCallMethod";
a[a.ActionConstantPool = 136] = "ActionConstantPool";
a[a.ActionDefineFunction = 155] = "ActionDefineFunction";
a[a.ActionDefineLocal = 60] = "ActionDefineLocal";
a[a.ActionDefineLocal2 = 65] = "ActionDefineLocal2";
a[a.ActionDelete = 58] = "ActionDelete";
a[a.ActionDelete2 = 59] = "ActionDelete2";
a[a.ActionEnumerate = 70] = "ActionEnumerate";
a[a.ActionEquals2 = 73] = "ActionEquals2";
a[a.ActionGetMember = 78] = "ActionGetMember";
a[a.ActionInitArray = 66] = "ActionInitArray";
a[a.ActionInitObject = 67] = "ActionInitObject";
a[a.ActionNewMethod = 83] = "ActionNewMethod";
a[a.ActionNewObject = 64] = "ActionNewObject";
a[a.ActionSetMember = 79] = "ActionSetMember";
a[a.ActionTargetPath = 69] = "ActionTargetPath";
a[a.ActionWith = 148] = "ActionWith";
a[a.ActionToNumber = 74] = "ActionToNumber";
a[a.ActionToString = 75] = "ActionToString";
a[a.ActionTypeOf = 68] = "ActionTypeOf";
a[a.ActionAdd2 = 71] = "ActionAdd2";
a[a.ActionLess2 = 72] = "ActionLess2";
a[a.ActionModulo = 63] = "ActionModulo";
a[a.ActionBitAnd = 96] = "ActionBitAnd";
a[a.ActionBitLShift = 99] = "ActionBitLShift";
a[a.ActionBitOr = 97] = "ActionBitOr";
a[a.ActionBitRShift = 100] = "ActionBitRShift";
a[a.ActionBitURShift = 101] = "ActionBitURShift";
a[a.ActionBitXor = 98] = "ActionBitXor";
a[a.ActionDecrement = 81] = "ActionDecrement";
a[a.ActionIncrement = 80] = "ActionIncrement";
a[a.ActionPushDuplicate = 76] = "ActionPushDuplicate";
a[a.ActionReturn = 62] = "ActionReturn";
a[a.ActionStackSwap = 77] = "ActionStackSwap";
a[a.ActionStoreRegister = 135] = "ActionStoreRegister";
a[a.ActionInstanceOf = 84] = "ActionInstanceOf";
a[a.ActionEnumerate2 = 85] = "ActionEnumerate2";
a[a.ActionStrictEquals = 102] = "ActionStrictEquals";
a[a.ActionGreater = 103] = "ActionGreater";
a[a.ActionStringGreater = 104] = "ActionStringGreater";
a[a.ActionDefineFunction2 = 142] = "ActionDefineFunction2";
a[a.ActionExtends = 105] = "ActionExtends";
a[a.ActionCastOp = 43] = "ActionCastOp";
a[a.ActionImplementsOp = 44] = "ActionImplementsOp";
a[a.ActionTry = 143] = "ActionTry";
a[a.ActionThrow = 42] = "ActionThrow";
a[a.ActionFSCommand2 = 45] = "ActionFSCommand2";
a[a.ActionStrictMode = 137] = "ActionStrictMode";
})(h.ActionCode || (h.ActionCode = {}));
var s = function() {
return function(a) {
this.registerNumber = a;
};
}();
h.ParsedPushRegisterAction = s;
var v = function() {
return function(a) {
this.constantIndex = a;
};
}();
h.ParsedPushConstantAction = v;
(function(a) {
a[a.None = 0] = "None";
a[a.Argument = 1] = "Argument";
a[a.This = 2] = "This";
a[a.Arguments = 4] = "Arguments";
a[a.Super = 8] = "Super";
a[a.Global = 16] = "Global";
a[a.Parent = 32] = "Parent";
a[a.Root = 64] = "Root";
})(h.ArgumentAssignmentType || (h.ArgumentAssignmentType = {}));
var p = function() {
function c(e, h) {
this._actionsData = e;
this.dataId = e.id;
this._stream = new a(e.bytes, h);
}
Object.defineProperty(c.prototype, "position", {get:function() {
return this._stream.position;
}, set:function(a) {
this._stream.position = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "eof", {get:function() {
return this._stream.position >= this._stream.end;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "length", {get:function() {
return this._stream.end;
}, enumerable:!0, configurable:!0});
c.prototype.readNext = function() {
var a = this._stream, c = a.position, l = a.readUI8(), p = 128 <= l ? a.readUI16() : 0, p = a.position + p, n = null;
switch(l | 0) {
case 129:
var k = a.readUI16(), n = a.readUI8(), f = !1;
6 !== n && 7 !== n ? a.position-- : (p++, f = 6 === n);
n = [k, f];
break;
case 131:
k = a.readString();
n = a.readString();
n = [k, n];
break;
case 138:
var k = a.readUI16(), d = a.readUI8(), n = [k, d];
break;
case 139:
n = [a.readString()];
break;
case 140:
k = a.readString();
n = a.readUI8();
f = !1;
6 !== n && 7 !== n ? a.position-- : (p++, f = 6 === n);
n = [k, f];
break;
case 150:
for (n = [];a.position < p;) {
k = a.readUI8();
switch(k | 0) {
case 0:
k = a.readString();
break;
case 1:
k = a.readFloat();
break;
case 2:
k = null;
break;
case 3:
k = void 0;
break;
case 4:
k = new s(a.readUI8());
break;
case 5:
k = a.readBoolean();
break;
case 6:
k = a.readDouble();
break;
case 7:
k = a.readInteger();
break;
case 8:
k = new v(a.readUI8());
break;
case 9:
k = new v(a.readUI16());
break;
default:
console.error("Unknown value type: " + k);
a.position = p;
continue;
}
n.push(k);
}
break;
case 153:
k = a.readSI16();
n = [k];
break;
case 157:
k = a.readSI16();
n = [k];
break;
case 154:
k = a.readUI8();
n = [k];
break;
case 159:
k = a.readUI8();
n = [k];
k & 2 && n.push(a.readUI16());
break;
case 141:
d = a.readUI8();
n = [d];
break;
case 136:
for (var d = a.readUI16(), k = [], b = 0;b < d;b++) {
k.push(a.readString());
}
n = [k];
break;
case 155:
n = a.readString();
d = a.readUI16();
f = [];
for (b = 0;b < d;b++) {
f.push(a.readString());
}
k = a.readUI16();
p += k;
k = new h.AVM1ActionsData(a.readBytes(k), this.dataId + "_f" + a.position, this._actionsData);
n = [k, n, f];
break;
case 148:
k = a.readUI16();
p += k;
n = [new h.AVM1ActionsData(a.readBytes(k), this.dataId + "_w" + a.position, this._actionsData)];
break;
case 135:
var g = a.readUI8(), n = [g];
break;
case 142:
for (var n = a.readString(), d = a.readUI16(), r = a.readUI8(), k = a.readUI16(), w = [], f = [], b = 0;b < d;b++) {
var g = a.readUI8(), z = a.readString();
f.push(z);
g && (w[g] = {type:1, name:z, index:b});
}
d = 1;
k & 1 && (w[d++] = {type:2});
k & 4 && (w[d++] = {type:4});
k & 16 && (w[d++] = {type:8});
k & 64 && (w[d++] = {type:64});
k & 128 && (w[d++] = {type:32});
k & 256 && (w[d++] = {type:16});
d = 0;
k & 2 && (d |= 2);
k & 8 && (d |= 4);
k & 32 && (d |= 8);
k = a.readUI16();
p += k;
k = new h.AVM1ActionsData(a.readBytes(k), this.dataId + "_f" + a.position, this._actionsData);
n = [k, n, f, r, w, d];
break;
case 143:
k = a.readUI8();
n = !!(k & 4);
f = !!(k & 2);
k = !!(k & 1);
d = a.readUI16();
b = a.readUI16();
w = a.readUI16();
r = n ? a.readUI8() : a.readString();
p += d + b + w;
d = new h.AVM1ActionsData(a.readBytes(d), this.dataId + "_t" + a.position, this._actionsData);
b = new h.AVM1ActionsData(a.readBytes(b), this.dataId + "_c" + a.position, this._actionsData);
w = new h.AVM1ActionsData(a.readBytes(w), this.dataId + "_z" + a.position, this._actionsData);
n = [n, r, d, k, b, f, w];
break;
case 137:
n = [a.readUI8()];
}
a.position = p;
return{position:c, actionCode:l, actionName:u[l], args:n};
};
c.prototype.skip = function(a) {
for (var c = this._stream;0 < a && c.position < c.end;) {
var h = 128 <= c.readUI8() ? c.readUI16() : 0;
c.position += h;
a--;
}
};
return c;
}();
h.ActionsDataParser = p;
var u = {0:"EOA", 4:"ActionNextFrame", 5:"ActionPreviousFrame", 6:"ActionPlay", 7:"ActionStop", 8:"ActionToggleQuality", 9:"ActionStopSounds", 10:"ActionAdd", 11:"ActionSubtract", 12:"ActionMultiply", 13:"ActionDivide", 14:"ActionEquals", 15:"ActionLess", 16:"ActionAnd", 17:"ActionOr", 18:"ActionNot", 19:"ActionStringEquals", 20:"ActionStringLength", 21:"ActionStringExtract", 23:"ActionPop", 24:"ActionToInteger", 28:"ActionGetVariable", 29:"ActionSetVariable", 32:"ActionSetTarget2", 33:"ActionStringAdd",
34:"ActionGetProperty", 35:"ActionSetProperty", 36:"ActionCloneSprite", 37:"ActionRemoveSprite", 38:"ActionTrace", 39:"ActionStartDrag", 40:"ActionEndDrag", 41:"ActionStringLess", 42:"ActionThrow", 43:"ActionCastOp", 44:"ActionImplementsOp", 45:"ActionFSCommand2", 48:"ActionRandomNumber", 49:"ActionMBStringLength", 50:"ActionCharToAscii", 51:"ActionAsciiToChar", 52:"ActionGetTime", 53:"ActionMBStringExtract", 54:"ActionMBCharToAscii", 55:"ActionMBAsciiToChar", 58:"ActionDelete", 59:"ActionDelete2",
60:"ActionDefineLocal", 61:"ActionCallFunction", 62:"ActionReturn", 63:"ActionModulo", 64:"ActionNewObject", 65:"ActionDefineLocal2", 66:"ActionInitArray", 67:"ActionInitObject", 68:"ActionTypeOf", 69:"ActionTargetPath", 70:"ActionEnumerate", 71:"ActionAdd2", 72:"ActionLess2", 73:"ActionEquals2", 74:"ActionToNumber", 75:"ActionToString", 76:"ActionPushDuplicate", 77:"ActionStackSwap", 78:"ActionGetMember", 79:"ActionSetMember", 80:"ActionIncrement", 81:"ActionDecrement", 82:"ActionCallMethod",
83:"ActionNewMethod", 84:"ActionInstanceOf", 85:"ActionEnumerate2", 96:"ActionBitAnd", 97:"ActionBitOr", 98:"ActionBitXor", 99:"ActionBitLShift", 100:"ActionBitRShift", 101:"ActionBitURShift", 102:"ActionStrictEquals", 103:"ActionGreater", 104:"ActionStringGreater", 105:"ActionExtends", 129:"ActionGotoFrame", 131:"ActionGetURL", 135:"ActionStoreRegister", 136:"ActionConstantPool", 137:"ActionStrictMode", 138:"ActionWaitForFrame", 139:"ActionSetTarget", 140:"ActionGoToLabel", 141:"ActionWaitForFrame2",
142:"ActionDefineFunction2", 143:"ActionTry", 148:"ActionWith", 150:"ActionPush", 153:"ActionJump", 154:"ActionGetURL2", 155:"ActionDefineFunction", 157:"ActionIf", 158:"ActionCall", 159:"ActionGotoFrame2"};
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
var a = function() {
function a() {
this.parentResults = null;
this.registersLimit = 0;
}
a.prototype.analyze = function(a) {
for (var c = [], h = [0], l = [!0], e = !1, m = null, s = [0];0 < s.length;) {
var q = s.shift();
if (!c[q]) {
for (a.position = q;!a.eof && !c[q];) {
var n = a.readNext();
if (0 === n.actionCode) {
break;
}
var k = a.position, f = {action:n, next:k, conditionalJumpTo:-1}, d = 0, b = !1, g = !1;
switch(n.actionCode) {
case 138:
;
case 141:
b = !0;
a.skip(138 === n.actionCode ? n.args[1] : n.args[0]);
d = a.position;
a.position = k;
break;
case 153:
b = g = !0;
d = k + n.args[0];
break;
case 157:
b = !0;
d = k + n.args[0];
break;
case 42:
;
case 62:
;
case 0:
b = g = !0;
d = a.length;
break;
case 136:
if (e) {
m = null;
break;
}
e = !0;
0 === q && (m = n.args[0]);
}
if (b) {
if (0 > d || d > a.length) {
console.error("jump outside the action block;"), d = a.length;
}
g ? f.next = d : f.conditionalJumpTo = d;
l[d] || (h.push(d), s.push(d), l[d] = !0);
}
c[q] = f;
if (g) {
break;
}
q = k;
}
}
}
var r = [];
h.forEach(function(a) {
if (c[a]) {
var b = [], d = a;
do {
d = c[d], b.push(d), d = d.next;
} while (!l[d] && c[d]);
r.push({label:a, items:b, jump:d});
}
});
h = null;
e ? h = m : this.parentResults && (h = this.parentResults.singleConstantPool);
return{actions:c, blocks:r, dataId:a.dataId, singleConstantPool:h, registersLimit:this.registersLimit};
};
return a;
}();
c.ActionsDataAnalyzer = a;
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
var a = c.Debug.assert;
h.AVM1ActionsData = function() {
return function(c, h, s) {
void 0 === s && (s = null);
this.bytes = c;
this.id = h;
this.parent = s;
a(c instanceof Uint8Array);
};
}();
var s = function() {
function a() {
this.globals = this.root = null;
}
a.prototype.flushPendingScripts = function() {
};
a.prototype.addAsset = function(a, c, h) {
};
a.prototype.registerClass = function(a, c) {
};
a.prototype.getAsset = function(a) {
};
a.prototype.resolveTarget = function(a) {
};
a.prototype.resolveLevel = function(a) {
};
a.prototype.addToPendingScripts = function(a) {
};
a.prototype.registerEventPropertyObserver = function(a, c) {
};
a.prototype.unregisterEventPropertyObserver = function(a, c) {
};
a.prototype.enterContext = function(a, c) {
};
a.prototype.executeActions = function(a, c) {
};
a.instance = null;
return a;
}();
h.AVM1Context = s;
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
__extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(h) {
function a(a, b, d, c, e) {
if (h.avm1ErrorsEnabled.value) {
try {
throw Error(a);
} catch (g) {
}
}
console.warn.apply(console, arguments);
}
function s(a) {
if (null === a) {
return "null";
}
var b = typeof a;
return "function" === b ? "object" : "object" === b && "object" === typeof a && a && a instanceof h.Lib.AVM1MovieClip ? "movieclip" : b;
}
function v(a) {
return "object" !== s(a) ? a : a.valueOf();
}
function p() {
return h.AVM1Context.instance.loaderInfo.swfVersion;
}
function u(a) {
return "object" !== s(a) ? a : a instanceof Date && 6 <= p() ? a.toString() : a.valueOf();
}
function l(a) {
switch(s(a)) {
default:
;
case "undefined":
;
case "null":
return!1;
case "boolean":
return a;
case "number":
return 0 !== a && !isNaN(a);
case "string":
return 0 !== a.length;
case "movieclip":
;
case "object":
return!0;
}
}
function e(a) {
a = v(a);
switch(s(a)) {
case "undefined":
;
case "null":
return 7 <= p() ? NaN : 0;
case "boolean":
return a ? 1 : 0;
case "number":
return a;
case "string":
return "" === a && 5 > p() ? 0 : +a;
default:
return 5 <= p() ? NaN : 0;
}
}
function m(a) {
a = e(a);
return isNaN(a) || !isFinite(a) || 0 === a ? 0 : a | 0;
}
function t(a) {
switch(s(a)) {
case "undefined":
return 7 <= p() ? "undefined" : "";
case "null":
return "null";
case "boolean":
return a ? "true" : "false";
case "number":
return a.toString();
case "string":
return a;
case "movieclip":
return a.__targetPath;
case "object":
if ("function" === typeof a && a.asGetPublicProperty("toString") === c.AVM2.AS.ASFunction.traitsPrototype.asGetPublicProperty("toString")) {
return "[type Function]";
}
var b = a.asCallPublicProperty("toString", null);
return "string" === typeof b ? b : "function" === typeof a ? "[type Function]" : "[type Object]";
}
}
function q(a, b) {
var d = v(a), c = v(b);
if ("string" !== typeof d || "string" !== typeof c) {
return d = e(d), c = e(c), isNaN(d) || isNaN(c) ? void 0 : d < c;
}
}
function n(a, b) {
if (c.isNullOrUndefined(a) || c.isNullOrUndefined(b)) {
return!1;
}
if (b === c.AVM2.AS.ASString) {
return "string" === typeof a;
}
if (b === c.AVM2.AS.ASNumber) {
return "number" === typeof a;
}
if (b === c.AVM2.AS.ASBoolean) {
return "boolean" === typeof a;
}
if (b === c.AVM2.AS.ASArray) {
return Array.isArray(a);
}
if (b === c.AVM2.AS.ASFunction) {
return "function" === typeof a;
}
if (b === c.AVM2.AS.ASObject) {
return "object" === typeof a;
}
var d = b.asGetPublicProperty("prototype");
if (!d) {
return!1;
}
for (var e = a;e;) {
if (e === d) {
return!0;
}
e = e.asGetPublicProperty("__proto__");
}
return!1;
}
function k(a, b, d) {
var c = Object.create(null);
do {
Yb(a, function(e) {
c[e] || (b.call(d, a, e), c[e] = !0);
}), a = a.asGetPublicProperty("__proto__");
} while (a);
}
function f(a, b) {
do {
if (a.asHasProperty(void 0, b, 0)) {
return sa.link = a, sa.name = b, sa;
}
a = a.asGetPublicProperty("__proto__");
} while (a);
return null;
}
function d(b, d, e) {
if (c.isNullOrUndefined(b)) {
return a("AVM1 warning: cannot look up member '" + d + "' on undefined object"), null;
}
var g;
b = Object(b);
if (null !== (g = f(b, d))) {
return g;
}
if (Zb(d) || 6 < p()) {
return e ? (sa.link = b, sa.name = d, sa) : null;
}
var h = d.toLowerCase();
if (null !== (g = f(b, h))) {
return g;
}
null === Ka && (Ka = Object.create(null), $b.forEach(function(a) {
Ka[a.toLowerCase()] = a;
}));
var l = Ka[h] || null;
if (l && null !== (g = f(b, l))) {
return g;
}
var m = null, r = null;
k(b, function(a, b) {
null === m && b.toLowerCase() === h && (r = a, m = b);
}, null);
return m ? (sa.link = r, sa.name = m, sa) : e ? (sa.link = b, sa.name = l || d, sa) : null;
}
function b(a, b) {
var c = d(a, b, !1);
return c ? c.link.asGetPublicProperty(c.name) : void 0;
}
function g(a, b, c) {
if (b = d(a, b, !0)) {
var e = b.link.asGetPropertyDescriptor(void 0, b.name, 0);
!e || "value" in e ? a.asSetPublicProperty(b.name, c) : b.link.asSetPublicProperty(b.name, c);
r(b.name);
}
}
function r(a) {
"o" === a[0] && "n" === a[1] && h.AVM1Context.instance.broadcastEventPropertyChange(a);
}
function w(a) {
return "undefined" !== typeof InternalError && a instanceof InternalError && "too much recursion" === a.message ? new ua("long running script -- AVM1 recursion limit is reached") : a;
}
function z(a, b, d) {
a.asSetPublicProperty("__proto__", b);
a.asDefinePublicProperty("__constructor__", {value:d, writable:!0, enumerable:!1, configurable:!1});
}
function A(a, b) {
var d;
if (a instanceof c.AVM2.AS.ASClass) {
d = ac(a, b), z(d, a.asGetPublicProperty("prototype"), a);
} else {
if (Na(a)) {
for (var e = a.asGetPublicProperty("prototype");e && !e.initAVM1ObjectInstance;) {
e = e.asGetPublicProperty("__proto__");
}
d = e ? Object.create(e) : {};
z(d, a.asGetPublicProperty("prototype"), a);
e && e.initAVM1ObjectInstance.call(d, h.AVM1Context.instance);
a.apply(d, b);
} else {
return;
}
}
return d;
}
function B(a, b) {
k(a, function(a, d) {
return b.call(null, d);
});
}
function M(a, b) {
if (6 > p()) {
return null;
}
var c;
c = a.inSequence && a.previousFrame.calleeSuper;
if (!c) {
c = d(a.currentThis, b, !1);
if (!c) {
return null;
}
c = c.link;
}
c = c.asGetPublicProperty("__proto__");
return c ? (c = d(c, b, !1)) ? {target:c.link, name:c.name, obj:c.link.asGetPublicProperty(c.name)} : null : null;
}
function N(a, b, d) {
if (!b.executionProhibited) {
var c = Ya.get(), e = [];
e.length = 4;
var g = b.initialScope.create(d), f;
b.pushCallFrame(d, null, null);
c.message("ActionScript Execution Starts");
c.indent();
b.enterContext(function() {
try {
Aa(a, g, [], e);
} catch (b) {
f = w(b);
}
}, d);
f instanceof ua && (b.executionProhibited = !0, console.error("Disabling AVM1 execution"));
b.popCallFrame();
c.unindent();
c.message("ActionScript Execution Stops");
if (f) {
throw f;
}
}
}
function K(b, d, c) {
var e = b.split(/[\/.]/g);
"" === e[e.length - 1] && e.pop();
if ("" === e[0] || "_level0" === e[0] || "_root" === e[0]) {
d = c, e.shift();
}
for (;0 < e.length;) {
c = d;
d = d.__lookupChild(e[0]);
if (!d) {
return a(e[0] + " (expr " + b + ") is not found in " + c._target), {};
}
e.shift();
}
return d;
}
function y(a, b) {
if (a === Array) {
var d = b;
1 == b.length && "number" === typeof b[0] && (d = [], d.length = b[0]);
return d;
}
if (a === Boolean || a === Number || a === String || a === Function) {
return a.apply(null, b);
}
if (a === Date) {
switch(b.length) {
case 0:
return new Date;
case 1:
return new Date(b[0]);
default:
return new Date(b[0], b[1], 2 < b.length ? b[2] : 1, 3 < b.length ? b[3] : 0, 4 < b.length ? b[4] : 0, 5 < b.length ? b[5] : 0, 6 < b.length ? b[6] : 0);
}
}
if (a === Object) {
return new Za;
}
}
function D(b, d) {
if (isNaN(b) || 0 > b) {
return a("Invalid amount of arguments: " + b), 0;
}
b |= 0;
return b > d ? (a("Truncating amount of arguments: from " + b + " to " + d), d) : b;
}
function L(a) {
for (var b = +a.pop(), b = D(b, a.length), d = [], c = 0;c < b;c++) {
d.push(a.pop());
}
return d;
}
function H(a, b) {
var d = a.context;
if (b) {
try {
var c = K(b, d.currentTarget || d.defaultTarget, d.resolveLevel(0));
d.currentTarget = c;
} catch (e) {
throw d.currentTarget = null, e;
}
} else {
d.currentTarget = null;
}
}
function J(a) {
return a === this;
}
function C(a, b, d, c, e, g, f) {
function k() {
if (!l.executionProhibited) {
var a, d = new bc, e = J(this) ? n : this, t, v, A = l.pushCallFrame(e, k, arguments);
f & 4 || (t = $a(arguments, 0), d.asSetPublicProperty("arguments", t));
f & 2 || d.asSetPublicProperty("this", e);
f & 8 || (v = new Ba(A), d.asSetPublicProperty("super", v));
a = r.create(d);
var oa, B = h();
for (oa = 0;oa < u;oa++) {
var x = g[oa];
if (x) {
switch(x.type) {
case 1:
B[oa] = arguments[x.index];
break;
case 2:
B[oa] = e;
break;
case 4:
t = t || $a(arguments, 0);
B[oa] = t;
break;
case 8:
v = v || new Ba(A);
B[oa] = v;
break;
case 16:
B[oa] = m;
break;
case 32:
B[oa] = n.asGetPublicProperty("_parent");
break;
case 64:
B[oa] = l.resolveLevel(0);
}
}
}
for (oa = 0;oa < arguments.length || oa < c.length;oa++) {
s && s[oa] || d.asSetPublicProperty(c[oa], arguments[oa]);
}
var N, y;
w.indent();
if (256 <= ++l.stackDepth) {
throw new ua("long running script -- AVM1 recursion limit is reached");
}
l.enterContext(function() {
try {
N = Aa(b, a, q, B);
} catch (d) {
y = d;
}
}, p);
l.stackDepth--;
l.popCallFrame();
w.unindent();
10 < z.length || z.push(B);
if (y) {
throw y;
}
return N;
}
}
function h() {
if (0 < z.length) {
return z.pop();
}
var a = [];
a.length = v;
return a;
}
var l = a.context, m = a.global, r = a.scopeContainer, n = a.scope, w = a.actionTracer, p = l.defaultTarget, q = a.constantPool, s = null, u = g ? g.length : 0;
for (a = 0;a < u;a++) {
var t = g[a];
t && 1 === t.type && (s || (s = []), s[g[a].index] = !0);
}
var v = Math.min(e, 255), v = Math.max(v, u + 1), z = [];
e = k;
e.instanceConstructor = k;
e.debugName = "avm1 " + (d || "<function>");
d && (e.name = d);
return k;
}
function E(a) {
return a && (0 <= a.indexOf(".") || 0 <= a.indexOf(":"));
}
function F(b, e, g) {
var f = b.global;
b = b.context;
var k, h;
if (0 <= e.indexOf(":")) {
k = b.currentTarget || b.defaultTarget;
h = e.split(":");
k = K(h[0], k, b.resolveLevel(0));
if (!k) {
return a(h[0] + " is undefined"), null;
}
h = h[1];
} else {
if (0 <= e.indexOf(".")) {
for (e = e.split("."), h = e.pop(), k = f, f = 0;f < e.length;f++) {
if (k = (b = d(k, e[f], !1)) && b.link.asGetPublicProperty(b.name), !k) {
return a(e.slice(0, f + 1) + " is undefined"), null;
}
}
} else {
c.Debug.assert(!1, "AVM1 variable has no path");
}
}
return(b = d(k, h, g)) ? (ka.obj = k, ka.link = b.link, ka.name = b.name, ka) : null;
}
function I(a, b) {
if (E(b)) {
return F(a, b, !1);
}
var c = a.scopeContainer, e = a.context, e = e.currentTarget || e.defaultTarget, g = a.scope, f;
if (f = d(g, b, !1)) {
return ka.obj = g, ka.link = f.link, ka.name = f.name, ka;
}
for (;c;c = c.next) {
if (f = d(c.scope, b, !1)) {
return ka.obj = c.scope, ka.link = f.link, ka.name = f.name, ka;
}
}
return(f = d(e, b, !1)) ? (ka.obj = e, ka.link = f.link, ka.name = f.name, ka) : "this" === b ? (g.asDefinePublicProperty("this", {value:e, configurable:!0}), ka.obj = g, ka.link = g, ka.name = "this", ka) : null;
}
function G(a, b) {
if (E(b)) {
return F(a, b, !0);
}
var c = a.scopeContainer, e = a.context, g = e.currentTarget || e.defaultTarget, f = a.scope;
if (e.currentTarget) {
return ka.obj = g, ka.link = g, ka.name = b, ka;
}
if (e = d(f, b, !1)) {
return ka.obj = f, ka.link = e.link, ka.name = e.name, ka;
}
for (;c.next;c = c.next) {
if (e = d(c.scope, b, !1)) {
return ka.obj = c.scope, ka.link = e.link, ka.name = e.name, ka;
}
}
ka.obj = g;
ka.link = g;
ka.name = b;
return ka;
}
function Z(a, b) {
var d = a.global, c = b[0];
b[1] ? d.gotoAndPlay(c + 1) : d.gotoAndStop(c + 1);
}
function Q(a, b) {
a.global.getURL(b[0], b[1]);
}
function S(a) {
a.global.nextFrame();
}
function O(a) {
a.global.prevFrame();
}
function P(a) {
a.global.play();
}
function V(a) {
a.global.stop();
}
function $(a) {
a.global.toggleHighQuality();
}
function W(a) {
a.global.stopAllSounds();
}
function x(a, b) {
return!a.global.ifFrameLoaded(b[0]);
}
function ea(a, b) {
H(a, b[0]);
}
function Y(a, b) {
var d = a.global, c = b[0];
b[1] ? d.gotoAndPlay(c) : d.gotoAndStop(c);
}
function R(a, b) {
var d = a.registers, c = a.constantPool, e = a.stack;
b.forEach(function(a) {
a instanceof h.ParsedPushConstantAction ? e.push(c[a.constantIndex]) : a instanceof h.ParsedPushRegisterAction ? (a = a.registerNumber, 0 > a || a >= d.length ? e.push(void 0) : e.push(d[a])) : e.push(a);
});
}
function U(a) {
a.stack.pop();
}
function ba(a) {
a = a.stack;
var b = e(a.pop()), d = e(a.pop());
a.push(b + d);
}
function X(a) {
a = a.stack;
var b = e(a.pop()), d = e(a.pop());
a.push(d - b);
}
function ga(a) {
a = a.stack;
var b = e(a.pop()), d = e(a.pop());
a.push(b * d);
}
function ja(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = e(b.pop()), d = e(b.pop()) / d;
b.push(a ? d : isFinite(d) ? d : "#ERROR#");
}
function aa(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = e(b.pop()), c = e(b.pop()), d = d == c;
b.push(a ? d : d ? 1 : 0);
}
function ia(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = e(b.pop()), d = e(b.pop()) < d;
b.push(a ? d : d ? 1 : 0);
}
function T(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = l(b.pop()), c = l(b.pop()), d = d && c;
b.push(a ? d : d ? 1 : 0);
}
function da(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = l(b.pop()), c = l(b.pop()), d = d || c;
b.push(a ? d : d ? 1 : 0);
}
function fa(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = !l(b.pop());
b.push(a ? d : d ? 1 : 0);
}
function la(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = t(b.pop()), c = t(b.pop()), d = d == c;
b.push(a ? d : d ? 1 : 0);
}
function ca(a) {
var b = a.stack;
a = a.global;
var d = t(b.pop());
b.push(a.length_(d));
}
function na(a) {
var b = a.stack;
a = a.global;
var d = t(b.pop());
b.push(a.length_(d));
}
function ma(a) {
a = a.stack;
var b = t(a.pop()), d = t(a.pop());
a.push(d + b);
}
function ra(a) {
var b = a.stack;
a = a.global;
var d = b.pop(), c = b.pop(), e = t(b.pop());
b.push(a.substring(e, c, d));
}
function wa(a) {
var b = a.stack;
a = a.global;
var d = b.pop(), c = b.pop(), e = t(b.pop());
b.push(a.mbsubstring(e, c, d));
}
function qa(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = t(b.pop()), d = t(b.pop()) < d;
b.push(a ? d : d ? 1 : 0);
}
function ya(a) {
var b = a.stack;
b.push(a.global.int(b.pop()));
}
function pa(a) {
var b = a.stack;
a = a.global;
var d = b.pop();
b.push(a.ord(d));
}
function za(a) {
var b = a.stack;
a = a.global;
var d = b.pop();
b.push(a.mbord(d));
}
function ha(a) {
var b = a.stack;
a = a.global;
var d = +b.pop();
b.push(a.chr(d));
}
function Ha(a) {
var b = a.stack;
a = a.global;
var d = +b.pop();
b.push(a.mbchr(d));
}
function Ma(a, b) {
}
function va(a, b) {
return!!a.stack.pop();
}
function xa(a) {
var b = a.global;
a = a.stack.pop();
b.call(a);
}
function Ia(a) {
var b = a.stack, d = "" + b.pop(), c = b.length;
b.push(void 0);
a = I(a, d);
b[c] = a ? a.link.asGetPublicProperty(a.name) : void 0;
}
function Ja(a) {
var b = a.stack, d = b.pop(), b = "" + b.pop();
if (a = G(a, b)) {
a.link.asSetPublicProperty(a.name, d), r(a.name);
}
}
function Ca(a, b) {
var d = a.global, c = a.stack, e = b[0], g = c.pop(), c = c.pop(), f;
e & 1 ? f = "GET" : e & 2 && (f = "POST");
var k = e & 64;
e & 128 ? d.loadVariables(c, g, f) : k ? d.loadMovie(c, g, f) : d.getURL(c, g, f);
}
function ta(a, b) {
var d = a.global, c = b[0], e = [a.stack.pop()];
c & 2 && e.push(b[1]);
(c & 1 ? d.gotoAndPlay : d.gotoAndStop).apply(d, e);
}
function Da(a) {
var b = a.stack.pop();
H(a, b);
}
function Oa(a) {
var b = a.global;
a = a.stack;
var d = a.pop(), c = a.pop(), e = a.length;
a.push(void 0);
a[e] = b.getAVM1Property(c, d);
}
function Pa(a) {
var b = a.global, d = a.stack;
a = d.pop();
var c = d.pop(), d = d.pop();
b.setAVM1Property(d, c, a);
}
function Qa(a) {
var b = a.global, d = a.stack;
a = d.pop();
var c = d.pop(), d = d.pop();
b.duplicateMovieClip(d, c, a);
}
function Ra(a) {
var b = a.global;
a = a.stack.pop();
b.removeMovieClip(a);
}
function Sa(a) {
var b = a.global, d = a.stack;
a = d.pop();
var c = d.pop(), d = d.pop() ? {y2:d.pop(), x2:d.pop(), y1:d.pop(), x1:d.pop()} : null;
a = [a, c];
d && (a = a.concat(d.x1, d.y1, d.x2, d.y2));
b.startDrag.apply(b, a);
}
function Ta(a) {
a.global.stopDrag();
}
function Ua(a, b) {
var d = a.global, c = a.stack.pop();
return!d.ifFrameLoaded(c);
}
function Va(a) {
var b = a.global;
a = a.stack.pop();
b.trace(void 0 === a ? "undefined" : t(a));
}
function Wa(a) {
a.stack.push(a.global.getTimer());
}
function Xa(a) {
var b = a.stack;
b.push(a.global.random(b.pop()));
}
function ab(b) {
var d = b.stack, c = d.pop(), e = L(d), g = d.length;
d.push(void 0);
var f = (b = I(b, c)) ? b.link.asGetPublicProperty(b.name) : void 0;
f instanceof Function ? (Ea(d.length === g + 1), d[g] = f.apply(b.obj || null, e)) : a("AVM1 warning: function '" + c + (f ? "' is not callable" : "' is undefined"));
}
function bb(d) {
var e = d.stack, g = e.pop(), f = e.pop(), k = L(e), h, l = e.length;
e.push(void 0);
if (c.isNullOrUndefined(f)) {
a("AVM1 warning: method '" + g + "' can't be called on undefined object");
} else {
d = d.context.frame;
var m, r;
if (c.isNullOrUndefined(g) || "" === g) {
if (f instanceof Ba) {
var n = f.callFrame, w = M(n, "__constructor__");
w && (m = w.target, r = w.obj, h = n.currentThis);
} else {
h = r = f;
}
Na(r) ? (d.setCallee(h, m, r, k), e[l] = r.apply(h, k), d.resetCallee()) : a("AVM1 warning: obj '" + f + (f ? "' is not callable" : "' is undefined"));
Ea(e.length === l + 1);
} else {
if (f instanceof Ba) {
if (n = f.callFrame, w = M(n, g)) {
m = w.target, r = w.obj, h = n.currentThis;
}
} else {
r = b(f, g), h = f;
}
Na(r) ? (Ea(e.length === l + 1), d.setCallee(h, m, r, k), e[l] = r.apply(h, k), d.resetCallee()) : a("AVM1 warning: method '" + g + "' on object", f, c.isNullOrUndefined(r) ? "is undefined" : "is not callable");
}
}
}
function cb(a, b) {
a.constantPool = b[0];
}
function db(a, b) {
var d = a.stack, c = a.scope, e = b[1], g = C(a, b[0], e, b[2], 4, null, 0);
e ? c.asSetPublicProperty(e, g) : d.push(g);
}
function eb(a) {
var b = a.stack;
a = a.scope;
var d = b.pop(), b = b.pop();
a.asSetPublicProperty(b, d);
}
function fb(a) {
var b = a.scope;
a = a.stack.pop();
b.asSetPublicProperty(a, void 0);
}
function gb(a) {
a = a.stack;
var b = a.pop(), d = a.pop();
a.push(d.asDeleteProperty(void 0, b, 0));
r(b);
}
function hb(a) {
var b = a.stack, c = b.pop();
a: {
for (a = a.scopeContainer;a;a = a.next) {
var e = d(a.scope, c, !1);
if (e) {
e.link.asSetPublicProperty(e.name, void 0);
a = e.link.asDeleteProperty(void 0, e.name, 0);
break a;
}
}
a = !1;
}
b.push(a);
r(c);
}
function ib(a) {
var b = a.stack, d = b.pop();
b.push(null);
a = (a = I(a, d)) ? a.link.asGetPublicProperty(a.name) : void 0;
c.isNullOrUndefined(a) || B(a, function(a) {
b.push(a);
});
}
function jb(a) {
a = a.stack;
var b = a.pop(), d = a.pop();
a.push(b == d);
}
function kb(d) {
d = d.stack;
var e = d.pop(), g = d.pop();
d.push(void 0);
if (c.isNullOrUndefined(g)) {
a("AVM1 warning: cannot get member '" + e + "' on undefined object");
} else {
if (g instanceof Ba) {
if (e = M(g.callFrame, e)) {
d[d.length - 1] = e.obj;
}
} else {
d[d.length - 1] = b(g, e);
}
}
}
function lb(a) {
a = a.stack;
var b = L(a);
a.push(b);
}
function mb(a) {
a = a.stack;
var b = +a.pop(), b = D(b, a.length >> 1), d = {};
z(d, null, Za);
for (var c = 0;c < b;c++) {
var e = a.pop(), g = a.pop();
d.asSetPublicProperty(g, e);
}
a.push(d);
}
function nb(b) {
b = b.stack;
var e = b.pop(), g = b.pop(), f = L(b), k = b.length;
b.push(void 0);
if (c.isNullOrUndefined(g)) {
a("AVM1 warning: method '" + e + "' can't be constructed on undefined object");
} else {
var h;
c.isNullOrUndefined(e) || "" === e ? h = g : (h = d(g, e, !1), h = g.asGetPublicProperty(h ? h.name : null));
f = A(h, f);
void 0 === f && a("AVM1 warning: method '" + e + "' on object", g, "is not constructible");
b[k] = f;
Ea(b.length === k + 1);
}
}
function ob(b) {
var d = b.stack, c = d.pop(), e = L(d), g = d.length;
d.push(void 0);
b = (b = I(b, c)) ? b.link.asGetPublicProperty(b.name) : void 0;
var f = y(b, e);
void 0 === f && (f = A(b, e), void 0 === f && a("AVM1 warning: object '" + c + (b ? "' is not constructible" : "' is undefined")));
Ea(d.length === g + 1);
d[g] = f;
}
function pb(b) {
var d = b.stack;
b = d.pop();
var e = d.pop(), d = d.pop();
c.isNullOrUndefined(d) ? a("AVM1 warning: cannot set member '" + e + "' on undefined object") : d instanceof Ba ? a("AVM1 warning: cannot set member '" + e + "' on super") : g(d, e, b);
}
function qb(a) {
a = a.stack;
var b = a.pop();
a.push("movieclip" === s(b) ? b._target : void 0);
}
function rb(a, b) {
var d = b[0], c = a.stack.pop(), e = a.constantPool, g = a.registers, c = a.scopeContainer.create(Object(c));
Aa(d, c, e, g);
}
function sb(a) {
a = a.stack;
a.push(e(a.pop()));
}
function tb(a) {
a = a.stack;
a.push(t(a.pop()));
}
function ub(a) {
a = a.stack;
var b = a.pop();
a.push(s(b));
}
function vb(a) {
a = a.stack;
var b = u(a.pop()), d = u(a.pop());
"string" === typeof b || "string" === typeof d ? a.push(t(d) + t(b)) : a.push(e(d) + e(b));
}
function wb(a) {
a = a.stack;
var b = a.pop(), d = a.pop();
a.push(q(d, b));
}
function xb(a) {
a = a.stack;
var b = e(a.pop()), d = e(a.pop());
a.push(d % b);
}
function yb(a) {
a = a.stack;
var b = m(a.pop()), d = m(a.pop());
a.push(d & b);
}
function zb(a) {
a = a.stack;
var b = m(a.pop()), d = m(a.pop());
a.push(d << b);
}
function Ab(a) {
a = a.stack;
var b = m(a.pop()), d = m(a.pop());
a.push(d | b);
}
function Bb(a) {
a = a.stack;
var b = m(a.pop()), d = m(a.pop());
a.push(d >> b);
}
function Cb(a) {
a = a.stack;
var b = m(a.pop()), d = m(a.pop());
a.push(d >>> b);
}
function Db(a) {
a = a.stack;
var b = m(a.pop()), d = m(a.pop());
a.push(d ^ b);
}
function Eb(a) {
a = a.stack;
var b = e(a.pop());
b--;
a.push(b);
}
function Fb(a) {
a = a.stack;
var b = e(a.pop());
b++;
a.push(b);
}
function Gb(a) {
a = a.stack;
a.push(a[a.length - 1]);
}
function Hb(a) {
a.isEndOfActions = !0;
}
function Ib(a) {
a = a.stack;
a.push(a.pop(), a.pop());
}
function Jb(a, b) {
var d = a.stack, c = a.registers, e = b[0];
0 > e || e >= c.length || (c[e] = d[d.length - 1]);
}
function Kb(a) {
a = a.stack;
var b = a.pop(), d = a.pop();
a.push(n(d, b));
}
function Lb(b) {
var d = b.stack;
b = d.pop();
d.push(null);
c.isNullOrUndefined(b) ? a("AVM1 warning: cannot iterate over undefined object") : B(b, function(a) {
d.push(a);
});
}
function Mb(a) {
a = a.stack;
var b = a.pop(), d = a.pop();
a.push(d === b);
}
function Nb(a) {
a = a.stack;
var b = a.pop(), d = a.pop();
a.push(q(b, d));
}
function Ob(a) {
var b = a.stack;
a = a.isSwfVersion5;
var d = t(b.pop()), d = t(b.pop()) > d;
b.push(a ? d : d ? 1 : 0);
}
function Pb(a, b) {
var d = a.stack, c = a.scope, e = b[1], g = C(a, b[0], e, b[2], b[3], b[4], b[5]);
e ? c.asSetPublicProperty(e, g) : d.push(g);
}
function Qb(a) {
var b = a.stack;
a = b.pop();
var b = b.pop().asGetPublicProperty("prototype"), d = a.asGetPublicProperty("prototype");
b.asSetPublicProperty("__proto__", d);
b.asSetPublicProperty("__constructor__", a);
}
function Rb(a) {
a = a.stack;
var b = a.pop(), d = a.pop();
a.push(n(b, d) ? b : null);
}
function Sb(a) {
a = a.stack;
var b = a.pop(), d = +a.pop();
D(d, a.length);
for (var c = [], e = 0;e < d;e++) {
c.push(a.pop());
}
b._as2Interfaces = c;
}
function Tb(a, b) {
var d = b[5], c = b[3], e = b[1], g = b[2], f = b[4], k = b[6], h = a.context, l = a.scopeContainer, m = a.scope, r = a.constantPool, n = a.registers, w = h.isTryCatchListening, p;
try {
h.isTryCatchListening = !0, Aa(g, l, r, n);
} catch (q) {
h.isTryCatchListening = w, c && q instanceof La ? ("string" === typeof e ? m.asSetPublicProperty(e, q.error) : n[e] = q.error, Aa(f, l, r, n)) : p = q;
}
h.isTryCatchListening = w;
d && Aa(k, l, r, n);
if (p) {
throw p;
}
}
function Ub(a) {
a = a.stack.pop();
throw new La(a);
}
function Vb(a) {
var b = a.stack, d = a.global, c = L(b);
a = b.length;
b.push(void 0);
d = d.fscommand.apply(null, c);
b[a] = d;
}
function cc(a, b) {
}
function dc(a) {
return function(b, d) {
var e;
try {
a(b, d), b.recoveringFromError = !1;
} catch (g) {
e = b.context;
g = w(g);
if (g instanceof ua) {
throw g;
}
if (g instanceof La) {
throw g;
}
Wb.instance.reportTelemetry({topic:"error", error:1});
if (!b.recoveringFromError) {
if (1E3 <= e.errorsIgnored++) {
throw new ua("long running script -- AVM1 errors limit is reached");
}
console.log(typeof g);
console.log(Object.getPrototypeOf(g));
console.log(Object.getPrototypeOf(Object.getPrototypeOf(g)));
console.error("AVM1 error: " + g);
c.AVM2.Runtime.AVM2.instance.exceptions.push({source:"avm1", message:g.message, stack:g.stack});
b.recoveringFromError = !0;
}
}
};
}
function ec() {
var a;
a = h.avm1ErrorsEnabled.value ? function(a) {
return a;
} : dc;
return{ActionGotoFrame:a(Z), ActionGetURL:a(Q), ActionNextFrame:a(S), ActionPreviousFrame:a(O), ActionPlay:a(P), ActionStop:a(V), ActionToggleQuality:a($), ActionStopSounds:a(W), ActionWaitForFrame:a(x), ActionSetTarget:a(ea), ActionGoToLabel:a(Y), ActionPush:a(R), ActionPop:a(U), ActionAdd:a(ba), ActionSubtract:a(X), ActionMultiply:a(ga), ActionDivide:a(ja), ActionEquals:a(aa), ActionLess:a(ia), ActionAnd:a(T), ActionOr:a(da), ActionNot:a(fa), ActionStringEquals:a(la), ActionStringLength:a(ca),
ActionMBStringLength:a(na), ActionStringAdd:a(ma), ActionStringExtract:a(ra), ActionMBStringExtract:a(wa), ActionStringLess:a(qa), ActionToInteger:a(ya), ActionCharToAscii:a(pa), ActionMBCharToAscii:a(za), ActionAsciiToChar:a(ha), ActionMBAsciiToChar:a(Ha), ActionJump:a(Ma), ActionIf:a(va), ActionCall:a(xa), ActionGetVariable:a(Ia), ActionSetVariable:a(Ja), ActionGetURL2:a(Ca), ActionGotoFrame2:a(ta), ActionSetTarget2:a(Da), ActionGetProperty:a(Oa), ActionSetProperty:a(Pa), ActionCloneSprite:a(Qa),
ActionRemoveSprite:a(Ra), ActionStartDrag:a(Sa), ActionEndDrag:a(Ta), ActionWaitForFrame2:a(Ua), ActionTrace:a(Va), ActionGetTime:a(Wa), ActionRandomNumber:a(Xa), ActionCallFunction:a(ab), ActionCallMethod:a(bb), ActionConstantPool:a(cb), ActionDefineFunction:a(db), ActionDefineLocal:a(eb), ActionDefineLocal2:a(fb), ActionDelete:a(gb), ActionDelete2:a(hb), ActionEnumerate:a(ib), ActionEquals2:a(jb), ActionGetMember:a(kb), ActionInitArray:a(lb), ActionInitObject:a(mb), ActionNewMethod:a(nb),
ActionNewObject:a(ob), ActionSetMember:a(pb), ActionTargetPath:a(qb), ActionWith:a(rb), ActionToNumber:a(sb), ActionToString:a(tb), ActionTypeOf:a(ub), ActionAdd2:a(vb), ActionLess2:a(wb), ActionModulo:a(xb), ActionBitAnd:a(yb), ActionBitLShift:a(zb), ActionBitOr:a(Ab), ActionBitRShift:a(Bb), ActionBitURShift:a(Cb), ActionBitXor:a(Db), ActionDecrement:a(Eb), ActionIncrement:a(Fb), ActionPushDuplicate:a(Gb), ActionReturn:a(Hb), ActionStackSwap:a(Ib), ActionStoreRegister:a(Jb), ActionInstanceOf:a(Kb),
ActionEnumerate2:a(Lb), ActionStrictEquals:a(Mb), ActionGreater:a(Nb), ActionStringGreater:a(Ob), ActionDefineFunction2:a(Pb), ActionExtends:a(Qb), ActionCastOp:a(Rb), ActionImplementsOp:a(Sb), ActionTry:a(Tb), ActionThrow:a(Ub), ActionFSCommand2:a(Vb), ActionStrictMode:a(cc)};
}
function Aa(a, b, d, e) {
var g = h.AVM1Context.instance;
if (!a.ir) {
var f = new h.ActionsDataParser(a, g.loaderInfo.swfVersion), k = new h.ActionsDataAnalyzer;
k.registersLimit = e.length;
k.parentResults = a.parent && a.parent.ir;
a.ir = k.analyze(f);
if (h.avm1CompilerEnabled.value) {
try {
var l = new fc;
a.ir.compiled = l.generate(a.ir);
} catch (m) {
console.error("Unable to compile AVM1 function: " + m);
}
}
}
a = a.ir;
var k = a.compiled, f = [], r = 5 <= g.loaderInfo.swfVersion, n = Ya.get(), l = b.scope;
b = {context:g, global:g.globals, scopeContainer:b, scope:l, actionTracer:n, constantPool:d, registers:e, stack:f, frame:null, isSwfVersion5:r, recoveringFromError:!1, isEndOfActions:!1};
l._as3Object && l._as3Object._deferScriptExecution && (g.deferScriptExecution = !0);
if (k) {
return k(b);
}
d = 0;
g = g.abortExecutionAt;
if (h.avm1DebuggerEnabled.value && (h.Debugger.pause || h.Debugger.breakpoints[a.dataId])) {
debugger;
}
for (e = a.actions[0];e && !b.isEndOfActions;) {
if (0 === d++ % 1E3 && Date.now() >= g) {
throw new ua("long running script -- AVM1 instruction hang timeout");
}
k = b;
l = r = void 0;
try {
var r = k, p = e.action, q = p.actionCode, s = p.args;
r.actionTracer.print(p, r.stack);
n = !1;
switch(q | 0) {
case 129:
Z(r, s);
break;
case 131:
Q(r, s);
break;
case 4:
S(r);
break;
case 5:
O(r);
break;
case 6:
P(r);
break;
case 7:
V(r);
break;
case 8:
$(r);
break;
case 9:
W(r);
break;
case 138:
n = x(r, s);
break;
case 139:
ea(r, s);
break;
case 140:
Y(r, s);
break;
case 150:
R(r, s);
break;
case 23:
U(r);
break;
case 10:
ba(r);
break;
case 11:
X(r);
break;
case 12:
ga(r);
break;
case 13:
ja(r);
break;
case 14:
aa(r);
break;
case 15:
ia(r);
break;
case 16:
T(r);
break;
case 17:
da(r);
break;
case 18:
fa(r);
break;
case 19:
la(r);
break;
case 20:
ca(r);
break;
case 49:
na(r);
break;
case 33:
ma(r);
break;
case 21:
ra(r);
break;
case 53:
wa(r);
break;
case 41:
qa(r);
break;
case 24:
ya(r);
break;
case 50:
pa(r);
break;
case 54:
za(r);
break;
case 51:
ha(r);
break;
case 55:
Ha(r);
break;
case 153:
break;
case 157:
n = va(r, s);
break;
case 158:
xa(r);
break;
case 28:
Ia(r);
break;
case 29:
Ja(r);
break;
case 154:
Ca(r, s);
break;
case 159:
ta(r, s);
break;
case 32:
Da(r);
break;
case 34:
Oa(r);
break;
case 35:
Pa(r);
break;
case 36:
Qa(r);
break;
case 37:
Ra(r);
break;
case 39:
Sa(r);
break;
case 40:
Ta(r);
break;
case 141:
n = Ua(r, s);
break;
case 38:
Va(r);
break;
case 52:
Wa(r);
break;
case 48:
Xa(r);
break;
case 61:
ab(r);
break;
case 82:
bb(r);
break;
case 136:
cb(r, s);
break;
case 155:
db(r, s);
break;
case 60:
eb(r);
break;
case 65:
fb(r);
break;
case 58:
gb(r);
break;
case 59:
hb(r);
break;
case 70:
ib(r);
break;
case 73:
jb(r);
break;
case 78:
kb(r);
break;
case 66:
lb(r);
break;
case 67:
mb(r);
break;
case 83:
nb(r);
break;
case 64:
ob(r);
break;
case 79:
pb(r);
break;
case 69:
qb(r);
break;
case 148:
rb(r, s);
break;
case 74:
sb(r);
break;
case 75:
tb(r);
break;
case 68:
ub(r);
break;
case 71:
vb(r);
break;
case 72:
wb(r);
break;
case 63:
xb(r);
break;
case 96:
yb(r);
break;
case 99:
zb(r);
break;
case 97:
Ab(r);
break;
case 100:
Bb(r);
break;
case 101:
Cb(r);
break;
case 98:
Db(r);
break;
case 81:
Eb(r);
break;
case 80:
Fb(r);
break;
case 76:
Gb(r);
break;
case 62:
Hb(r);
break;
case 77:
Ib(r);
break;
case 135:
Jb(r, s);
break;
case 84:
Kb(r);
break;
case 85:
Lb(r);
break;
case 102:
Mb(r);
break;
case 103:
Nb(r);
break;
case 104:
Ob(r);
break;
case 142:
Pb(r, s);
break;
case 105:
Qb(r);
break;
case 43:
Rb(r);
break;
case 44:
Sb(r);
break;
case 143:
Tb(r, s);
break;
case 42:
Ub(r);
break;
case 45:
Vb(r);
break;
case 137:
break;
case 0:
r.isEndOfActions = !0;
break;
default:
throw Error("Unknown action code: " + q);;
}
l = n;
k.recoveringFromError = !1;
} catch (u) {
r = k.context;
u = w(u);
if (h.avm1ErrorsEnabled.value && !r.isTryCatchListening || u instanceof ua) {
throw u;
}
if (u instanceof La) {
throw u;
}
Wb.instance.reportTelemetry({topic:"error", error:1});
if (!k.recoveringFromError) {
if (1E3 <= r.errorsIgnored++) {
throw new ua("long running script -- AVM1 errors limit is reached");
}
console.error("AVM1 error: " + u);
c.AVM2.Runtime.AVM2.instance.exceptions.push({source:"avm1", message:u.message, stack:u.stack});
k.recoveringFromError = !0;
}
}
e = l ? e.conditionalJumpTo : e.next;
e = a.actions[e];
}
return f.pop();
}
var Yb = c.AVM2.Runtime.forEachPublicProperty, ac = c.AVM2.Runtime.construct, Zb = c.isNumeric, Na = c.isFunction, gc = c.Debug.notImplemented, Xb = c.AVM2.Runtime.asCoerceString, $a = c.AVM2.Runtime.sliceArguments, Fa = c.Options.Option, Wb = c.Telemetry, Ea = c.Debug.assert, Ga = c.Settings.shumwayOptions.register(new c.Options.OptionSet("AVM1"));
h.avm1TraceEnabled = Ga.register(new Fa("t1", "traceAvm1", "boolean", !1, "trace AVM1 execution"));
h.avm1ErrorsEnabled = Ga.register(new Fa("e1", "errorsAvm1", "boolean", !1, "fail on AVM1 warnings and errors"));
h.avm1TimeoutDisabled = Ga.register(new Fa("ha1", "nohangAvm1", "boolean", !1, "disable fail on AVM1 hang"));
h.avm1CompilerEnabled = Ga.register(new Fa("ca1", "compileAvm1", "boolean", !0, "compiles AVM1 code"));
h.avm1DebuggerEnabled = Ga.register(new Fa("da1", "debugAvm1", "boolean", !1, "allows AVM1 code debugging"));
h.Debugger = {pause:!1, breakpoints:{}};
var $b = "addCallback addListener addProperty addRequestHeader AsBroadcaster attachAudio attachMovie attachSound attachVideo beginFill beginGradientFill blendMode blockIndent broadcastMessage cacheAsBitmap CASEINSENSITIVE charAt charCodeAt checkPolicyFile clearInterval clearRequestHeaders concat createEmptyMovieClip curveTo DESCENDING displayState duplicateMovieClip E endFill exactSettings fromCharCode fullScreenSourceRect getBounds getBytesLoaded getBytesTotal getDate getDay getDepth getDepth getDuration getFullYear getHours getLocal getMilliseconds getMinutes getMonth getNewTextFormat getPan getPosition getRGB getSeconds getSize getTextFormat getTime getTimezoneOffset getTransform getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getUTCYear getVolume getYear globalToLocal gotoAndPlay gotoAndStop hasAccessibility hasAudio hasAudioEncoder hasEmbeddedVideo hasIME hasMP3 hasOwnProperty hasPrinting hasScreenBroadcast hasScreenPlayback hasStreamingAudio hasStreamingVideo hasVideoEncoder hitTest indexOf isActive isDebugger isFinite isNaN isPropertyEnumerable isPrototypeOf lastIndexOf leftMargin letterSpacing lineStyle lineTo LN10 LN10E LN2 LN2E loadSound localFileReadDisable localToGlobal MAX_VALUE MIN_VALUE moveTo NaN NEGATIVE_INFINITY nextFrame NUMERIC onChanged onData onDragOut onDragOver onEnterFrame onFullScreen onKeyDown onKeyUp onKillFocus onLoad onMouseDown onMouseMove onMouseUp onPress onRelease onReleaseOutside onResize onResize onRollOut onRollOver onScroller onSetFocus onStatus onSync onUnload parseFloat parseInt PI pixelAspectRatio playerType POSITIVE_INFINITY prevFrame registerClass removeListener removeMovieClip removeTextField replaceSel RETURNINDEXEDARRAY rightMargin scale9Grid scaleMode screenColor screenDPI screenResolutionX screenResolutionY serverString setClipboard setDate setDuration setFps setFullYear setHours setInterval setMask setMilliseconds setMinutes setMonth setNewTextFormat setPan setPosition setRGB setSeconds setTextFormat setTime setTimeout setTransform setTransform setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setVolume setYear showMenu showRedrawRegions sortOn SQRT1_2 SQRT2 startDrag stopDrag swapDepths tabEnabled tabIndex tabIndex tabStops toLowerCase toString toUpperCase trackAsMenu UNIQUESORT updateAfterEvent updateProperties useCodepage useHandCursor UTC valueOf".split(" "),
Ka = null, hc = function() {
function a(b, d) {
this.scope = b;
this.next = d;
}
a.prototype.create = function(b) {
return new a(b, this);
};
return a;
}(), bc = function(a) {
function b() {
a.call(this);
this.asSetPublicProperty("toString", this.toString);
}
__extends(b, a);
b.prototype.toString = function() {
return this;
};
return b;
}(c.AVM2.AS.ASObject), ic = function() {
function a(b, d, c, e) {
this.previousFrame = b;
this.currentThis = d;
this.fn = c;
this.args = e;
this.inSequence = b ? b.calleeThis === d && b.calleeFn === c : !1;
this.resetCallee();
}
a.prototype.setCallee = function(a, b, d, c) {
this.calleeThis = a;
this.calleeSuper = b;
this.calleeFn = d;
this.calleeArgs = c;
};
a.prototype.resetCallee = function() {
this.calleeFn = this.calleeSuper = this.calleeThis = null;
};
return a;
}(), jc = function(e) {
function f(a) {
e.call(this);
this.loaderInfo = a;
this.globals = new (h.Lib.AVM1Globals.createAVM1Class())(this);
this.initialScope = new hc(this.globals, null);
this.assets = {};
this.assetsSymbols = [];
this.assetsClasses = [];
this.executionProhibited = this.isActive = !1;
this.stackDepth = this.abortExecutionAt = 0;
this.frame = null;
this.isTryCatchListening = !1;
this.errorsIgnored = 0;
this.deferScriptExecution = !0;
this.pendingScripts = [];
this.eventObservers = Object.create(null);
var c = this;
this.utils = {hasProperty:function(a, b) {
var e;
c.enterContext(function() {
e = !!d(a, b, !1);
}, a);
return e;
}, getProperty:function(a, d) {
var e;
c.enterContext(function() {
e = b(a, d);
}, a);
return e;
}, setProperty:function(a, b, d) {
c.enterContext(function() {
g(a, b, d);
}, a);
}};
}
__extends(f, e);
f.prototype.addAsset = function(a, b, d) {
c.Debug.assert("string" === typeof a && !isNaN(b));
this.assets[a.toLowerCase()] = b;
this.assetsSymbols[b] = d;
};
f.prototype.registerClass = function(b, d) {
b = Xb(b);
if (null === b) {
return a("Cannot register class for symbol: className is missing"), null;
}
var c = this.assets[b.toLowerCase()];
void 0 === c ? a("Cannot register " + b + " class for symbol") : this.assetsClasses[c] = d;
};
f.prototype.getAsset = function(a) {
a = Xb(a);
if (null !== a && (a = this.assets[a.toLowerCase()], void 0 !== a)) {
var b = this.assetsSymbols[a];
if (!b) {
b = this.loaderInfo.getSymbolById(a);
if (!b) {
c.Debug.warning("Symbol " + a + " is not defined.");
return;
}
this.assetsSymbols[a] = b;
}
return{symbolId:a, symbolProps:b, theClass:this.assetsClasses[a]};
}
};
f.prototype.resolveTarget = function(a) {
var b = this.currentTarget || this.defaultTarget;
a ? "string" === typeof a && (a = K(a, b, this.resolveLevel(0))) : a = b;
if ("object" !== typeof a || null === a || !("_as3Object" in a)) {
throw Error("Invalid AVM1 target object: " + Object.prototype.toString.call(a));
}
return a;
};
f.prototype.resolveLevel = function(a) {
if (0 === a) {
return this.root;
}
};
f.prototype.addToPendingScripts = function(a) {
this.deferScriptExecution ? this.pendingScripts.push(a) : a();
};
f.prototype.flushPendingScripts = function() {
for (var a = this.pendingScripts;a.length;) {
a.shift()();
}
this.deferScriptExecution = !1;
};
f.prototype.pushCallFrame = function(a, b, d) {
return this.frame = a = new ic(this.frame, a, b, d);
};
f.prototype.popCallFrame = function() {
var a = this.frame.previousFrame;
return this.frame = a;
};
f.prototype.enterContext = function(a, b) {
if (this === h.AVM1Context.instance && this.isActive && this.defaultTarget === b && null === this.currentTarget) {
a(), this.currentTarget = null;
} else {
var d = h.AVM1Context.instance, c = this.isActive, e = this.defaultTarget, g = this.currentTarget, f;
try {
h.AVM1Context.instance = this, c || (this.abortExecutionAt = h.avm1TimeoutDisabled.value ? Number.MAX_VALUE : Date.now() + 1E3, this.errorsIgnored = 0, this.isActive = !0), this.defaultTarget = b, this.currentTarget = null, a();
} catch (k) {
f = k;
}
this.defaultTarget = e;
this.currentTarget = g;
this.isActive = c;
h.AVM1Context.instance = d;
if (f) {
throw f;
}
}
};
f.prototype.executeActions = function(a, b) {
N(a, this, b);
};
f.prototype.registerEventPropertyObserver = function(a, b) {
var d = this.eventObservers[a];
d || (d = [], this.eventObservers[a] = d);
d.push(b);
};
f.prototype.unregisterEventPropertyObserver = function(a, b) {
var d = this.eventObservers[a];
if (d) {
var c = d.indexOf(b);
0 > c || d.splice(c, 1);
}
};
f.prototype.broadcastEventPropertyChange = function(a) {
var b = this.eventObservers[a];
b && b.forEach(function(b) {
return b.onEventPropertyModified(a);
});
};
return f;
}(h.AVM1Context);
h.AVM1Context.create = function(a) {
return new jc(a);
};
var La = function() {
return function(a) {
this.error = a;
};
}(), ua = function(a) {
function b(d, c) {
a.call(this, d);
this.error = c;
}
__extends(b, a);
return b;
}(Error), sa = {link:void 0, name:null};
h.executeActions = N;
var Za = function(a) {
function b() {
a.apply(this, arguments);
}
__extends(b, a);
return b;
}(c.AVM2.AS.ASObject), Ba = function() {
return function(a) {
this.callFrame = a;
};
}(), ka = {obj:null, link:null, name:null}, fc = function() {
function a() {
a.cachedCalls || (a.cachedCalls = ec());
}
a.prototype.convertArgs = function(a, b, d, c) {
for (var e = [], g = 0;g < a.length;g++) {
var f = a[g];
if ("object" !== typeof f || null === f || Array.isArray(f)) {
void 0 === f ? e.push("undefined") : e.push(JSON.stringify(f));
} else {
if (f instanceof h.ParsedPushConstantAction) {
if (c.singleConstantPool) {
var k = c.singleConstantPool[f.constantIndex];
e.push(void 0 === k ? "undefined" : JSON.stringify(k));
} else {
var k = "", l = d.constantPool;
l && (k = l[f.constantIndex], k = void 0 === k ? "undefined" : JSON.stringify(k), k = 0 <= k.indexOf("*/") ? "" : " /* " + k + " */");
e.push("constantPool[" + f.constantIndex + "]" + k);
}
} else {
f instanceof h.ParsedPushRegisterAction ? (f = f.registerNumber, 0 > f || f >= c.registersLimit ? e.push("undefined") : e.push("registers[" + f + "]")) : f instanceof h.AVM1ActionsData ? (k = "code_" + b + "_" + g, d[k] = f, e.push("res." + k)) : gc("Unknown AVM1 action argument type");
}
}
}
return e.join(",");
};
a.prototype.convertAction = function(a, b, d, c, e) {
switch(a.action.actionCode) {
case 153:
;
case 62:
return "";
case 136:
return d.constantPool = a.action.args[0], " constantPool = [" + this.convertArgs(a.action.args[0], b, d, e) + "];\n ectx.constantPool = constantPool;\n";
case 150:
return " stack.push(" + this.convertArgs(a.action.args, b, d, e) + ");\n";
case 135:
return a = a.action.args[0], 0 > a || a >= e.registersLimit ? "" : " registers[" + a + "] = stack[stack.length - 1];\n";
case 138:
;
case 141:
return " if (calls." + a.action.actionName + "(ectx,[" + this.convertArgs(a.action.args, b, d, e) + "])) { position = " + a.conditionalJumpTo + "; checkTimeAfter -= " + (c + 1) + "; break; }\n";
case 157:
return " if (!!stack.pop()) { position = " + a.conditionalJumpTo + "; checkTimeAfter -= " + (c + 1) + "; break; }\n";
default:
return " calls." + a.action.actionName + "(ectx" + (a.action.args ? ",[" + this.convertArgs(a.action.args, b, d, e) + "]" : "") + ");\n";
}
};
a.prototype.checkAvm1Timeout = function(a) {
if (Date.now() >= a.context.abortExecutionAt) {
throw new ua("long running script -- AVM1 instruction hang timeout");
}
};
a.prototype.generate = function(b) {
var d = this, c = b.blocks, e = {}, g = 0, f = b.dataId, k = "return function avm1gen_" + f + "(ectx) {\nvar position = 0;\nvar checkTimeAfter = 0;\nvar constantPool = ectx.constantPool, registers = ectx.registers, stack = ectx.stack;\n";
h.avm1DebuggerEnabled.value && (k += "/* Running " + f + " */ if (Shumway.AVM1.Debugger.pause || Shumway.AVM1.Debugger.breakpoints." + f + ") { debugger; }\n");
k += "while (!ectx.isEndOfActions) {\nif (checkTimeAfter <= 0) { checkTimeAfter = 1000; checkTimeout(ectx); }\nswitch(position) {\n";
c.forEach(function(a) {
k += " case " + a.label + ":\n";
a.items.forEach(function(a, c) {
k += d.convertAction(a, g++, e, c, b);
});
k += " position = " + a.jump + ";\n checkTimeAfter -= " + a.items.length + ";\n break;\n";
});
k += " default: ectx.isEndOfActions = true; break;\n}\n}\nreturn stack.pop();};";
k += "//# sourceURL=avm1gen-" + f;
return(new Function("calls", "res", "checkTimeout", k))(a.cachedCalls, e, this.checkAvm1Timeout);
};
return a;
}(), Ya = function() {
function a() {
}
a.get = function() {
return h.avm1TraceEnabled.value ? a.tracer : a.nullTracer;
};
a.tracer = function() {
var a = 0;
return{print:function(b, d) {
for (var c = b.position, e = b.actionCode, g = b.actionName, f = [], k = 0;k < d.length;k++) {
var h = d[k];
h && "object" === typeof h ? (h = h.asGetPublicProperty("__constructor__"), f.push("[" + (h ? h.name : "Object") + "]")) : f.push(h);
}
console.log("AVM1 trace: " + Array(a + 1).join("..") + c + ": " + g + "(" + e.toString(16) + "), stack=" + f);
}, indent:function() {
a++;
}, unindent:function() {
a--;
}, message:function(a) {
console.log("AVM1 trace: ------- " + a);
}};
}();
a.nullTracer = {print:function(a, b) {
}, indent:function() {
}, unindent:function() {
}, message:function(a) {
}};
return a;
}();
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
function s(a, c, d) {
return a.utils.hasProperty(c, d) ? !0 : (c = a.utils.getProperty(c, "_listeners")) ? c.some(function(b) {
return a.utils.hasProperty(b, d);
}) : !1;
}
function v(a, e, d, b) {
void 0 === b && (b = null);
var g = a.utils.getProperty(e, d);
c.isFunction(g) && g.apply(e, b);
g = a.utils.getProperty(this, "_listeners");
Array.isArray(g) && g.forEach(function(g) {
g = a.utils.getProperty(g, d);
c.isFunction(g) && g.apply(e, b);
});
}
function p(a, e, d) {
for (var b = a.prototype;b && !b.initAVM1SymbolInstance;) {
b = b.asGetPublicProperty("__proto__");
}
c.Debug.assert(b);
b = Object.create(b);
b.asSetPublicProperty("__proto__", a.asGetPublicProperty("prototype"));
b.asDefinePublicProperty("__constructor__", {value:a, writable:!0, enumerable:!1, configurable:!1});
e._as2Object = b;
b.initAVM1SymbolInstance(d, e);
a.call(b);
return b;
}
function u(a, c) {
return a ? a._as2Object ? a._as2Object : m.display.MovieClip.isType(a) ? a._avm1SymbolClass ? p(a._avm1SymbolClass, a, c) : p(c.globals.MovieClip, a, c) : m.display.SimpleButton.isType(a) ? p(c.globals.Button, a, c) : m.text.TextField.isType(a) ? p(c.globals.TextField, a, c) : m.display.BitmapData.isType(a) ? new a : null : null;
}
function l(a, e) {
var d;
"function" === typeof a ? (d = function() {
return a.apply(this, arguments);
}, Object.getOwnPropertyNames(a).forEach(function(b) {
d.hasOwnProperty(b) || Object.defineProperty(d, b, Object.getOwnPropertyDescriptor(a, b));
})) : (c.Debug.assert("object" === typeof a && null !== a), d = Object.create(a));
if (!e) {
return d;
}
e.forEach(function(a) {
var c = a, e = a.indexOf("=>");
0 <= e && (c = a.substring(0, e), a = a.substring(e + 2));
d.asDefinePublicProperty(c, {get:function() {
return this[a];
}, set:function(d) {
this[a] = d;
}, enumerable:!1, configurable:!0});
});
return d;
}
function e(a, c) {
return c.context.executeActions(a, c);
}
var m = c.AVM2.AS.flash, t = function() {
function a(c, d, b) {
void 0 === b && (b = null);
this.propertyName = c;
this.eventName = d;
this.argsConverter = b;
}
a.prototype.onBind = function(a) {
};
a.prototype.onUnbind = function(a) {
};
return a;
}();
a.AVM1EventHandler = t;
t = function() {
function a() {
}
Object.defineProperty(a.prototype, "context", {get:function() {
return this._context;
}, enumerable:!0, configurable:!0});
a.prototype.initAVM1ObjectInstance = function(a) {
this._context = a;
};
return a;
}();
a.AVM1NativeObject = t;
t = function(a) {
function c() {
a.apply(this, arguments);
}
__extends(c, a);
Object.defineProperty(c.prototype, "isAVM1Instance", {get:function() {
return!!this._as3Object;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "as3Object", {get:function() {
return this._as3Object;
}, enumerable:!0, configurable:!0});
c.prototype.initAVM1SymbolInstance = function(a, b) {
this.initAVM1ObjectInstance(a);
this._as3Object = b;
};
c.prototype.bindEvents = function(a) {
var b;
void 0 === b && (b = !0);
this._events = a;
var c = Object.create(null);
this._eventsMap = c;
this._eventsListeners = Object.create(null);
var e = this, f = this.context;
a.forEach(function(a) {
c[a.propertyName] = a;
f.registerEventPropertyObserver(a.propertyName, e);
e._updateEvent(a);
});
b && e.as3Object.addEventListener("removedFromStage", function A() {
e.as3Object.removeEventListener("removedFromStage", A);
e.unbindEvents();
});
};
c.prototype.unbindEvents = function() {
var a = this, b = this.context;
this._events.forEach(function(c) {
b.unregisterEventPropertyObserver(c.propertyName, a);
a._removeEventListener(c);
});
this._eventsListeners = this._eventsMap = this._events = null;
};
c.prototype.updateAllEvents = function() {
this._events.forEach(function(a) {
this._updateEvent(a);
}, this);
};
c.prototype._updateEvent = function(a) {
s(this.context, this, a.propertyName) ? this._addEventListener(a) : this._removeEventListener(a);
};
c.prototype._addEventListener = function(a) {
var b = this._eventsListeners[a.propertyName];
b || (b = function() {
var b = a.argsConverter ? a.argsConverter.apply(null, arguments) : null;
v(this.context, this, a.propertyName, b);
}.bind(this), this.as3Object.addEventListener(a.eventName, b), a.onBind(this), this._eventsListeners[a.propertyName] = b);
};
c.prototype._removeEventListener = function(a) {
var b = this._eventsListeners[a.propertyName];
b && (this.as3Object.removeEventListener(a.eventName, b), this._eventsListeners[a.propertyName] = null);
};
c.prototype.onEventPropertyModified = function(a) {
this._updateEvent(this._eventsMap[a]);
};
return c;
}(t);
a.AVM1SymbolBase = t;
a.avm1HasEventProperty = s;
a.avm1BroadcastEvent = v;
t = function() {
function a() {
}
a.addProperty = function(a, d, b, c, e) {
void 0 === e && (e = !0);
a.asDefinePublicProperty(d, {get:b, set:c || void 0, enumerable:e, configurable:!0});
};
a.resolveTarget = function(a) {
void 0 === a && (a = void 0);
return h.AVM1Context.instance.resolveTarget(a);
};
a.resolveMovieClip = function(a) {
void 0 === a && (a = void 0);
return a ? h.AVM1Context.instance.resolveTarget(a) : void 0;
};
a.resolveLevel = function(a) {
return h.AVM1Context.instance.resolveLevel(+a);
};
Object.defineProperty(a, "currentStage", {get:function() {
return h.AVM1Context.instance.root.as3Object.stage;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a, "swfVersion", {get:function() {
return h.AVM1Context.instance.loaderInfo.swfVersion;
}, enumerable:!0, configurable:!0});
a.getTarget = function(a) {
a = a.as3Object;
if (a === a.root) {
return "/";
}
var d = "";
do {
d = "/" + a.name + d, a = a.parent;
} while (a !== a.root);
return d;
};
return a;
}();
a.AVM1Utils = t;
a.getAVM1Object = u;
a.wrapAVM1Object = l;
a.wrapAVM1Class = function(a, c, d) {
c = l(a, c);
a = l(a.prototype, d);
c.asSetPublicProperty("prototype", a);
return c;
};
var q = !1;
a.installObjectMethods = function() {
if (!q) {
q = !0;
var a = c.AVM2.AS.ASObject, e = a.asGetPublicProperty("prototype");
a.asSetPublicProperty("registerClass", function(a, b) {
h.AVM1Context.instance.registerClass(a, b);
});
e.asDefinePublicProperty("addProperty", {value:function(a, b, c) {
if ("string" !== typeof a || "" === a || "function" !== typeof b || "function" !== typeof c && null !== c) {
return!1;
}
this.asDefinePublicProperty(a, {get:b, set:c || void 0, configurable:!0, enumerable:!0});
return!0;
}, writable:!1, enumerable:!1, configurable:!1});
Object.defineProperty(e, "__proto__avm1", {value:null, writable:!0, enumerable:!1});
e.asDefinePublicProperty("__proto__", {get:function() {
return this.__proto__avm1;
}, set:function(a) {
if (a !== this.__proto__avm1) {
if (a) {
for (var b = a;b;) {
if (b === this) {
return;
}
b = b.__proto__avm1;
}
this.__proto__avm1 = a;
} else {
this.__proto__avm1 = null;
}
}
}, enumerable:!1, configurable:!1});
}
};
a.initializeAVM1Object = function(a, f, d) {
f = u(a, f);
c.Debug.assert(f);
d.variableName && f.asSetPublicProperty("variable", d.variableName);
var b = d.events;
if (b) {
for (var g = 0;g < b.length;g++) {
var l = b[g], m;
l.actionsData ? (m = new h.AVM1ActionsData(l.actionsData, "s" + d.symbolId + "e" + g), l.actionsData = null, l.compiled = m) : m = l.compiled;
c.Debug.assert(m);
m = e.bind(null, m, f);
var l = l.flags, p;
for (p in n) {
if (p |= 0, l & (p | 0)) {
var q = n[p];
switch(p) {
case 2048:
;
case 4096:
;
case 8192:
;
case 16384:
a.buttonMode = !0;
}
a.addEventListener(q, m);
}
}
}
}
};
var n = Object.create(null);
n[1] = "load";
n[2] = "frameConstructed";
n[4] = "unload";
n[8] = "mouseMove";
n[16] = "mouseDown";
n[32] = "mouseUp";
n[64] = "keyDown";
n[128] = "keyUp";
n[256] = {toString:function() {
c.Debug.warning("Data ClipEvent not implemented");
}};
n[512] = "initialize";
n[1024] = "mouseDown";
n[2048] = "click";
n[4096] = "releaseOutside";
n[8192] = "mouseOver";
n[16384] = "mouseOut";
n[32768] = {toString:function() {
c.Debug.warning("DragOver ClipEvent not implemented");
}};
n[65536] = {toString:function() {
c.Debug.warning("DragOut ClipEvent not implemented");
}};
n[131072] = {toString:function() {
c.Debug.warning("KeyPress ClipEvent not implemented");
}};
n[262144] = "construct";
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.notImplemented, v = c.Debug.somewhatImplemented, p = c.AVM2.Runtime.forEachPublicProperty, u = c.Debug.assert, l = c.AVM2.AS.flash, e = jsGlobal.escape, m = [], t = function() {
function n(e) {
this.fscommand = l.system.FSCommand._fscommand;
this.getTimer = c.AVM2.AS.FlashUtilScript_getTimer;
this.NaN = Number.NaN;
this.Infinity = Number.POSITIVE_INFINITY;
this.isFinite = isFinite;
this.isNaN = isNaN;
this.parseFloat = parseFloat;
this.parseInt = parseInt;
this.Object = c.AVM2.AS.ASObject;
this.Function = c.AVM2.AS.ASFunction;
this.Array = c.AVM2.AS.ASArray;
this.Number = c.AVM2.AS.ASNumber;
this.Math = c.AVM2.AS.ASMath;
this.Boolean = c.AVM2.AS.ASBoolean;
this.Date = c.AVM2.AS.ASDate;
this.RegExp = c.AVM2.AS.ASRegExp;
this.String = c.AVM2.AS.ASString;
this.undefined = void 0;
this.MovieClip = a.AVM1MovieClip.createAVM1Class();
this.AsBroadcaster = a.AVM1Broadcaster.createAVM1Class();
this.System = a.AVM1System.createAVM1Class();
this.Stage = a.AVM1Stage.createAVM1Class();
this.Button = a.AVM1Button.createAVM1Class();
this.TextField = a.AVM1TextField.createAVM1Class();
this.Color = a.AVM1Color.createAVM1Class();
this.Key = a.AVM1Key.createAVM1Class();
this.Mouse = a.AVM1Mouse.createAVM1Class();
this.MovieClipLoader = a.AVM1MovieClipLoader.createAVM1Class();
this.Sound = a.AVM1Sound.createAVM1Class();
this.SharedObject = l.net.SharedObject;
this.ContextMenu = l.ui.ContextMenu;
this.ContextMenuItem = l.ui.ContextMenuItem;
this.TextFormat = a.AVM1TextFormat.createAVM1Class();
n.instance = this;
this._global = this;
"Object Function Array Number Math Boolean Date RegExp String".split(" ").forEach(function(a) {
c.AVM2.Runtime.AVM2.instance.systemDomain.getClass(a);
});
8 <= e.loaderInfo.swfVersion && this._initializeFlashObject();
this.AsBroadcaster.initializeWithContext(this.Stage, e);
this.AsBroadcaster.initializeWithContext(this.Key, e);
this.AsBroadcaster.initializeWithContext(this.Mouse, e);
}
n.createAVM1Class = function() {
return a.wrapAVM1Class(n, [], "_global flash ASSetPropFlags call chr clearInterval clearTimeout duplicateMovieClip fscommand escape unescape getTimer getURL getVersion gotoAndPlay gotoAndStop ifFrameLoaded int length=>length_ loadMovie loadMovieNum loadVariables loadVariablesNum mbchr mblength mbord mbsubstring nextFrame nextScene ord play prevFrame prevScene print printAsBitmap printAsBitmapNum printNum random removeMovieClip setInterval setTimeout showRedrawRegions startDrag stop stopDrag substring targetPath toggleHighQuality trace unloadMovie unloadMovieNum updateAfterEvent NaN Infinity isFinite isNaN parseFloat parseInt undefined Object Function Array Number Math Boolean Date RegExp String MovieClip AsBroadcaster System Stage Button TextField Color Key Mouse MovieClipLoader Sound SharedObject ContextMenu ContextMenuItem TextFormat toString $asfunction=>asfunction".split(" "));
};
n.prototype.asfunction = function(a) {
s("AVM1Globals.$asfunction");
};
n.prototype.ASSetPropFlags = function(a, c, d, b) {
};
n.prototype.call = function(c) {
var e = a.AVM1Utils.resolveTarget().as3Object;
c = e._getAbsFrameNumber(c, null);
void 0 !== c && e.callFrame(c);
};
n.prototype.chr = function(a) {
return String.fromCharCode(a);
};
n.prototype.clearInterval = function(a) {
var c = m[a - 1];
c && (clearInterval(c), delete m[a - 1]);
};
n.prototype.clearTimeout = function(a) {
var c = m[a - 1];
c && (clearTimeout(c), delete m[a - 1]);
};
n.prototype.duplicateMovieClip = function(c, e, d) {
a.AVM1Utils.resolveTarget(c).duplicateMovieClip(e, d, null);
};
n.prototype.getAVM1Property = function(c, e) {
return a.AVM1Utils.resolveTarget(c)[q[e]];
};
n.prototype.getURL = function(a, e, d) {
var b = new l.net.URLRequest(String(a));
d && (b.method = d);
"string" === typeof e && 0 === e.indexOf("_level") ? this.loadMovieNum(a, +e.substr(6), d) : c.AVM2.AS.FlashNetScript_navigateToURL(b, e);
};
n.prototype.getVersion = function() {
return l.system.Capabilities.version;
};
n.prototype._addToPendingScripts = function(a, c, d) {
void 0 === d && (d = null);
u(c, "invalid function in _addToPendingScripts");
var b = h.AVM1Context.instance, e = b.resolveTarget(void 0);
b.addToPendingScripts(function() {
b.enterContext(function() {
try {
c.apply(a, d);
} catch (b) {
console.error("AVM1 pending script error: " + b.message);
}
}, e);
});
};
n.prototype.escape = function(a) {
return encodeURIComponent(a).replace(/!|'|\(|\)|\*|-|\.|_|~/g, function(a) {
switch(a) {
case "*":
return "%2A";
case "-":
return "%2D";
case ".":
return "%2E";
case "_":
return "%5F";
default:
return e(a);
}
});
};
n.prototype.unescape = function(a) {
return decodeURIComponent(a);
};
n.prototype.gotoAndPlay = function(c, e) {
var d = a.AVM1Utils.resolveTarget();
2 > arguments.length ? this._addToPendingScripts(d, d.gotoAndPlay, [arguments[0]]) : this._addToPendingScripts(d, d.gotoAndPlay, [arguments[1], arguments[0]]);
};
n.prototype.gotoAndStop = function(c, e) {
var d = a.AVM1Utils.resolveTarget();
2 > arguments.length ? this._addToPendingScripts(d, d.gotoAndStop, [arguments[0]]) : this._addToPendingScripts(d, d.gotoAndStop, [arguments[1], arguments[0]]);
};
n.prototype.ifFrameLoaded = function(c, e) {
var d = a.AVM1Utils.resolveTarget(), b = d._framesloaded;
return Math.min((2 > arguments.length ? arguments[0] : arguments[1]) + 1, d._totalframes) <= b;
};
n.prototype.int = function(a) {
return a | 0;
};
n.prototype.length_ = function(a) {
return("" + a).length;
};
n.prototype.loadMovie = function(c, e, d) {
if (c && 0 === c.toLowerCase().indexOf("fscommand:")) {
this.fscommand(c.substring(10), e);
} else {
var b = "string" === typeof e && 0 === e.indexOf("_level"), g;
b && (b = e.charAt(6), g = parseInt(b, 10), b = g.toString() === b);
g = new l.display.Loader;
b ? (c = new l.net.URLRequest(c), d && (c.method = d), g.load(c)) : a.AVM1Utils.resolveTarget(e).loadMovie(c, d);
}
};
n.prototype._setLevel = function(a, c) {
};
n.prototype.loadMovieNum = function(a, c, d) {
if (a && 0 === a.toLowerCase().indexOf("fscommand:")) {
return this.fscommand(a.substring(10));
}
c = new l.display.Loader;
a = new l.net.URLRequest(a);
d && (a.method = d);
c.load(a);
};
n.prototype.loadVariables = function(c, e, d) {
void 0 === d && (d = "");
e = a.AVM1Utils.resolveTarget(e);
this._loadVariables(e, c, d);
};
n.prototype.loadVariablesNum = function(c, e, d) {
void 0 === d && (d = "");
this._loadVariables(a.AVM1Utils.resolveLevel(e), c, d);
};
n.prototype._loadVariables = function(e, f, d) {
function b(d) {
m.removeEventListener(l.events.Event.COMPLETE, b);
c.Debug.assert("object" === typeof m.data);
p(m.data, function(a, b) {
g.utils.setProperty(e, a, b);
});
e instanceof a.AVM1MovieClip && a.avm1BroadcastEvent(g, e, "onData");
}
f = new l.net.URLRequest(f);
d && (f.method = d);
var g = h.AVM1Context.instance, m = new l.net.URLLoader(f);
m._ignoreDecodeErrors = !0;
m.dataFormat = "variables";
m.addEventListener(l.events.Event.COMPLETE, b);
};
n.prototype.mbchr = function(a) {
return String.fromCharCode(a);
};
n.prototype.mblength = function(a) {
return("" + a).length;
};
n.prototype.mbord = function(a) {
return("" + a).charCodeAt(0);
};
n.prototype.mbsubstring = function(a, c, d) {
return c !== (0 | c) || d !== (0 | d) ? "" : ("" + a).substr(c, d);
};
n.prototype.nextFrame = function() {
var c = a.AVM1Utils.resolveTarget();
this._addToPendingScripts(c, c.nextFrame);
};
n.prototype.nextScene = function() {
var c = a.AVM1Utils.resolveTarget();
this._addToPendingScripts(c, c.nextScene);
};
n.prototype.ord = function(a) {
return("" + a).charCodeAt(0);
};
n.prototype.play = function() {
a.AVM1Utils.resolveTarget().play();
};
n.prototype.prevFrame = function() {
var c = a.AVM1Utils.resolveTarget();
this._addToPendingScripts(c, c.prevFrame);
};
n.prototype.prevScene = function() {
var c = a.AVM1Utils.resolveTarget();
this._addToPendingScripts(c, c.prevScene);
};
n.prototype.print = function(a, c) {
s("AVM1Globals.print");
};
n.prototype.printAsBitmap = function(a, c) {
s("AVM1Globals.printAsBitmap");
};
n.prototype.printAsBitmapNum = function(a, c) {
s("AVM1Globals.printAsBitmapNum");
};
n.prototype.printNum = function(a, c) {
s("AVM1Globals.printNum");
};
n.prototype.random = function(a) {
return 0 | Math.random() * (0 | a);
};
n.prototype.removeMovieClip = function(c) {
a.AVM1Utils.resolveTarget(c).removeMovieClip();
};
n.prototype.setInterval = function() {
if (!(2 > arguments.length)) {
var a = [];
if ("function" === typeof arguments[0]) {
a = arguments;
} else {
if (3 > arguments.length) {
return;
}
var c = arguments[0], d = arguments[1];
if (!c || "object" !== typeof c || "string" !== typeof d) {
return;
}
a[0] = function() {
c.asCallPublicProperty(d, arguments);
};
for (var b = 2;b < arguments.length;b++) {
a.push(arguments[b]);
}
}
a[1] |= 0;
a = setInterval.apply(null, a);
return m.push(a);
}
};
n.prototype.setAVM1Property = function(c, e, d) {
a.AVM1Utils.resolveTarget(c)[q[e]] = d;
};
n.prototype.setTimeout = function() {
if (!(2 > arguments.length || "function" !== typeof arguments[0])) {
arguments[1] |= 0;
var a = setTimeout.apply(null, arguments);
return m.push(a);
}
};
n.prototype.showRedrawRegions = function(a, c) {
s("AVM1Globals.showRedrawRegions");
};
n.prototype.startDrag = function(c, e, d, b, g, h) {
a.AVM1Utils.resolveTarget(c).startDrag(e, 3 > arguments.length ? null : new l.geom.Rectangle(d, b, g - d, h - b));
};
n.prototype.stop = function() {
a.AVM1Utils.resolveTarget().stop();
};
n.prototype.stopAllSounds = function() {
l.media.SoundMixer.stopAll();
};
n.prototype.stopDrag = function(c) {
a.AVM1Utils.resolveTarget(c).stopDrag();
};
n.prototype.substring = function(a, c, d) {
return this.mbsubstring(a, c, d);
};
n.prototype.targetPath = function(c) {
return a.AVM1Utils.resolveTarget(c)._target;
};
n.prototype.toggleHighQuality = function() {
s("AVM1Globals.toggleHighQuality");
};
n.prototype.trace = function(a) {
c.AVM2.AS.Natives.print(a);
};
n.prototype.unloadMovie = function(c) {
a.AVM1Utils.resolveTarget(c).unloadMovie();
};
n.prototype.unloadMovieNum = function(c) {
a.AVM1Utils.resolveLevel(c).unloadMovie();
};
n.prototype.updateAfterEvent = function() {
v("AVM1Globals.updateAfterEvent");
};
n.prototype._initializeFlashObject = function() {
this.flash = {};
this.flash.asSetPublicProperty("_MovieClip", this.MovieClip);
var c = {};
c.asSetPublicProperty("BitmapData", a.AVM1BitmapData.createAVM1Class());
this.flash.asSetPublicProperty("display", c);
c = {};
c.asSetPublicProperty("ExternalInterface", a.AVM1ExternalInterface.createAVM1Class());
this.flash.asSetPublicProperty("external", c);
this.flash.asSetPublicProperty("filters", {});
c = {};
c.asSetPublicProperty("ColorTransform", l.geom.ColorTransform);
c.asSetPublicProperty("Matrix", l.geom.Matrix);
c.asSetPublicProperty("Point", l.geom.Point);
c.asSetPublicProperty("Rectangle", l.geom.Rectangle);
c.asSetPublicProperty("Transform", a.AVM1Transform.createAVM1Class());
this.flash.asSetPublicProperty("geom", c);
this.flash.asSetPublicProperty("text", {});
};
n.prototype.toString = function() {
return "[type Object]";
};
return n;
}();
a.AVM1Globals = t;
var q = "_x _y _xscale _yscale _currentframe _totalframes _alpha _visible _width _height _rotation _target _framesloaded _name _droptarget _url _highquality _focusrect _soundbuftime _quality _xmouse _ymouse".split(" ");
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
var s = function() {
function s() {
}
s.setAVM1Context = function(a) {
this._context = a;
};
s.createAVM1Class = function() {
return a.wrapAVM1Class(s, ["initialize"], []);
};
s.initialize = function(a) {
s.initializeWithContext(a, c.AVM1Context.instance);
};
s.initializeWithContext = function(c, h) {
c.asSetPublicProperty("_listeners", []);
c.asSetPublicProperty("broadcastMessage", function(c) {
for (var e = [], m = 1;m < arguments.length;m++) {
e[m - 1] = arguments[m];
}
a.avm1BroadcastEvent(h, this, c, e);
});
c.asSetPublicProperty("addListener", function(a) {
h.utils.getProperty(this, "_listeners").push(a);
this.isAVM1Instance && this.updateAllEvents();
});
c.asSetPublicProperty("removeListener", function(a) {
var c = h.utils.getProperty(this, "_listeners");
a = c.indexOf(a);
if (0 > a) {
return!1;
}
c.splice(a, 1);
this.isAVM1Instance && this.updateAllEvents();
return!0;
});
};
return s;
}();
a.AVM1Broadcaster = s;
})(c.Lib || (c.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
var c = function() {
function c() {
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, ["DOWN", "LEFT", "RIGHT", "UP", "isDown"], []);
};
c._bind = function(a, h) {
a.addEventListener("keyDown", function(a) {
a = a.asGetPublicProperty("keyCode");
c._lastKeyCode = a;
c._keyStates[a] = 1;
h.globals.Key.asCallPublicProperty("broadcastMessage", ["onKeyDown"]);
}, !1);
a.addEventListener("keyUp", function(a) {
a = a.asGetPublicProperty("keyCode");
c._lastKeyCode = a;
delete c._keyStates[a];
h.globals.Key.asCallPublicProperty("broadcastMessage", ["onKeyUp"]);
}, !1);
};
c.isDown = function(a) {
return!!c._keyStates[a];
};
c.DOWN = 40;
c.LEFT = 37;
c.RIGHT = 39;
c.UP = 38;
c._keyStates = [];
c._lastKeyCode = 0;
return c;
}();
a.AVM1Key = c;
})(c.Lib || (c.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
var c = function() {
function c() {
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, ["show", "hide"], []);
};
c._bind = function(a, c) {
a.addEventListener("mouseDown", function(a) {
c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseDown"]);
}, !1);
a.addEventListener("mouseMove", function(a) {
c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseMove"]);
}, !1);
a.addEventListener("mouseOut", function(a) {
c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseMove"]);
}, !1);
a.addEventListener("mouseUp", function(a) {
c.globals.Mouse.asCallPublicProperty("broadcastMessage", ["onMouseUp"]);
}, !1);
};
c.hide = function() {
};
c.show = function() {
};
return c;
}();
a.AVM1Mouse = c;
})(c.Lib || (c.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
var c = function() {
function c() {
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, "align displayState fullScreenSourceRect height scaleMode showMenu width".split(" "), []);
};
Object.defineProperty(c, "align", {get:function() {
return a.AVM1Utils.currentStage.align;
}, set:function(c) {
a.AVM1Utils.currentStage.align = c;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "displayState", {get:function() {
return a.AVM1Utils.currentStage.displayState;
}, set:function(c) {
a.AVM1Utils.currentStage.displayState = c;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "fullScreenSourceRect", {get:function() {
return a.AVM1Utils.currentStage.fullScreenSourceRect;
}, set:function(c) {
a.AVM1Utils.currentStage.fullScreenSourceRect = c;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "height", {get:function() {
return a.AVM1Utils.currentStage.stageHeight;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "scaleMode", {get:function() {
return a.AVM1Utils.currentStage.scaleMode;
}, set:function(c) {
a.AVM1Utils.currentStage.scaleMode = c;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "showMenu", {get:function() {
return a.AVM1Utils.currentStage.showDefaultContextMenu;
}, set:function(c) {
a.AVM1Utils.currentStage.showDefaultContextMenu = c;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "width", {get:function() {
return a.AVM1Utils.currentStage.stageWidth;
}, enumerable:!0, configurable:!0});
return c;
}();
a.AVM1Stage = c;
})(c.Lib || (c.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.AVM2.AS.flash, v = c.Debug.assert, p = c.AVM2.ABC.Multiname, u = c.AVM2.Runtime.resolveMultinameProperty, l = Object.prototype.asGetProperty, e = Object.prototype.asHasProperty, m = Object.prototype.asGetEnumerableKeys, t = function(a) {
function c(e, d, b) {
void 0 === b && (b = null);
a.call(this, e, d, b);
this.propertyName = e;
this.eventName = d;
this.argsConverter = b;
}
__extends(c, a);
c.prototype.onBind = function(a) {
a.as3Object.buttonMode = !0;
};
return c;
}(a.AVM1EventHandler), q = function(n) {
function k() {
n.call(this);
}
__extends(k, n);
k.createAVM1Class = function() {
return a.wrapAVM1Class(k, [], "_alpha attachAudio attachBitmap attachMovie beginFill beginBitmapFill beginGradientFill blendMode cacheAsBitmap _callFrame clear createEmptyMovieClip createTextField _currentframe curveTo _droptarget duplicateMovieClip enabled endFill filters _framesloaded focusEnabled _focusrect forceSmothing getBounds getBytesLoaded getBytesTotal getDepth getInstanceAtDepth getNextHighestDepth getRect getSWFVersion getTextSnapshot getURL globalToLocal gotoAndPlay gotoAndStop _height _highquality hitArea hitTest lineGradientStyle listStyle lineTo loadMovie loadVariables localToGlobal _lockroot menu moveTo _name nextFrame opaqueBackground _parent play prevFrame _quality removeMovieClip _rotation scale9Grid scrollRect setMask _soundbuftime startDrag stop stopDrag swapDepths tabChildren tabEnabled tabIndex _target _totalframes trackAsMenu transform toString unloadMovie _url useHandCursor _visible _width _x _xmouse _xscale _y _ymouse _yscale".split(" "));
};
Object.defineProperty(k.prototype, "graphics", {get:function() {
return this.as3Object.graphics;
}, enumerable:!0, configurable:!0});
k.prototype.initAVM1SymbolInstance = function(a, d) {
n.prototype.initAVM1SymbolInstance.call(this, a, d);
this._boundExecuteFrameScripts = this._frameScripts = null;
this._initEventsHandlers();
};
k.prototype.__lookupChild = function(c) {
return "." == c ? this : ".." == c ? a.getAVM1Object(this.as3Object.parent, this.context) : a.getAVM1Object(this._lookupChildByName(c), this.context);
};
k.prototype._lookupChildByName = function(a) {
a = asCoerceString(a);
return this.as3Object._lookupChildByName(a);
};
Object.defineProperty(k.prototype, "__targetPath", {get:function() {
var a = this._target;
return "/" != a ? "_level0" + a.replace(/\//g, ".") : "_level0";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_alpha", {get:function() {
return this.as3Object.alpha;
}, set:function(a) {
this.as3Object.alpha = a;
}, enumerable:!0, configurable:!0});
k.prototype.attachAudio = function(a) {
throw "Not implemented: attachAudio";
};
k.prototype._constructMovieClipSymbol = function(a, d) {
var b = h.AVM1Context.instance.getAsset(a);
if (b) {
var c = Object.create(b.symbolProps);
c.avm1Name = d;
c.avm1SymbolClass = b.theClass;
b = s.display.MovieClip.initializeFrom(c);
s.display.MovieClip.instanceConstructorNoInitialize.call(b);
return b;
}
};
k.prototype.attachMovie = function(a, d, b, c) {
if (a = this._constructMovieClipSymbol(a, d)) {
b = this._insertChildAtDepth(a, b);
for (var e in c) {
b[e] = c[e];
}
return b;
}
};
k.prototype.beginFill = function(a, d) {
this.graphics.beginFill(a, d);
};
k.prototype.beginBitmapFill = function(a, d, b, c) {
a instanceof s.display.BitmapData && this.graphics.beginBitmapFill(a, d, b, c);
};
k.prototype.beginGradientFill = function(a, d, b, c, e, k, h, l) {
this.graphics.beginGradientFill(a, d, b, c, e, k, h, l);
};
Object.defineProperty(k.prototype, "blendMode", {get:function() {
return this.as3Object.blendMode;
}, set:function(a) {
this.as3Object.blendMode = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "cacheAsBitmap", {get:function() {
return this.as3Object.cacheAsBitmap;
}, set:function(a) {
this.as3Object.cacheAsBitmap = a;
}, enumerable:!0, configurable:!0});
k.prototype._callFrame = function(a) {
};
k.prototype.clear = function() {
this.graphics.clear();
};
k.prototype._insertChildAtDepth = function(c, d) {
var b = this.as3Object;
b.addTimelineObjectAtDepth(c, Math.min(b.numChildren, d));
return s.display.Bitmap.isType(c) ? null : a.getAVM1Object(c, this.context);
};
k.prototype.createEmptyMovieClip = function(a, d) {
var b = new s.display.MovieClip;
b.name = a;
return this._insertChildAtDepth(b, d);
};
k.prototype.createTextField = function(a, d, b, c, e, k) {
var h = new s.text.TextField;
h.name = a;
h.x = b;
h.y = c;
h.width = e;
h.height = k;
return this._insertChildAtDepth(h, d);
};
Object.defineProperty(k.prototype, "_currentframe", {get:function() {
return this.as3Object.currentFrame;
}, enumerable:!0, configurable:!0});
k.prototype.curveTo = function(a, d, b, c) {
this.graphics.curveTo(a, d, b, c);
};
Object.defineProperty(k.prototype, "_droptarget", {get:function() {
return this.as3Object.dropTarget;
}, enumerable:!0, configurable:!0});
k.prototype._duplicate = function(a, d, b) {
};
k.prototype.duplicateMovieClip = function(c, d, b) {
return a.getAVM1Object(this._duplicate(c, +d, b), this.context);
};
Object.defineProperty(k.prototype, "enabled", {get:function() {
return this.as3Object.enabled;
}, set:function(a) {
this.as3Object.enabled = a;
}, enumerable:!0, configurable:!0});
k.prototype.endFill = function() {
this.graphics.endFill();
};
Object.defineProperty(k.prototype, "filters", {get:function() {
throw "Not implemented: get$filters";
}, set:function(a) {
throw "Not implemented: set$filters";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "focusEnabled", {get:function() {
throw "Not implemented: get$focusEnabled";
}, set:function(a) {
throw "Not implemented: set$focusEnabled";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_focusrect", {get:function() {
throw "Not implemented: get$_focusrect";
}, set:function(a) {
throw "Not implemented: set$_focusrect";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "forceSmoothing", {get:function() {
throw "Not implemented: get$forceSmoothing";
}, set:function(a) {
throw "Not implemented: set$forceSmoothing";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_framesloaded", {get:function() {
return this.as3Object.framesLoaded;
}, enumerable:!0, configurable:!0});
k.prototype.getBounds = function(a) {
a = a.as3Object;
if (!a) {
throw "Unsupported bounds type";
}
return this.as3Object.getBounds(a);
};
k.prototype.getBytesLoaded = function() {
return this.as3Object.loaderInfo.bytesLoaded;
};
k.prototype.getBytesTotal = function() {
return this.as3Object.loaderInfo.bytesTotal;
};
k.prototype.getDepth = function() {
return this.as3Object._depth;
};
k.prototype.getInstanceAtDepth = function(c) {
for (var d = this.as3Object, b = 0, e = d.numChildren;b < e;b++) {
var k = d._lookupChildByIndex(b);
if (k && k._depth === c) {
return s.display.Bitmap.isType(k) ? this : a.getAVM1Object(k, this.context);
}
}
return null;
};
k.prototype.getNextHighestDepth = function() {
for (var a = this.as3Object, d = 0, b = 0, c = a.numChildren;b < c;b++) {
var e = a._lookupChildByIndex(b);
e._depth > d && (d = e._depth);
}
return d + 1;
};
k.prototype.getRect = function(a) {
throw "Not implemented: getRect";
};
k.prototype.getSWFVersion = function() {
return this.as3Object.loaderInfo.swfVersion;
};
k.prototype.getTextSnapshot = function() {
throw "Not implemented: getTextSnapshot";
};
k.prototype.getURL = function(a, d, b) {
a = new s.net.URLRequest(a);
b && (a.method = b);
c.AVM2.AS.FlashNetScript_navigateToURL(a, d);
};
k.prototype.globalToLocal = function(a) {
var d = this.as3Object.globalToLocal(new s.geom.Point(a.asGetPublicProperty("x"), a.asGetPublicProperty("y")));
a.asSetPublicProperty("x", d.x);
a.asSetPublicProperty("y", d.y);
};
k.prototype.gotoAndPlay = function(a) {
return this.as3Object.gotoAndPlay(a);
};
k.prototype.gotoAndStop = function(a) {
return this.as3Object.gotoAndStop(a);
};
Object.defineProperty(k.prototype, "_height", {get:function() {
return this.as3Object.height;
}, set:function(a) {
isNaN(a) || (this.as3Object.height = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_highquality", {get:function() {
return 1;
}, set:function(a) {
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "hitArea", {get:function() {
throw "Not implemented: get$hitArea";
}, set:function(a) {
throw "Not implemented: set$hitArea";
}, enumerable:!0, configurable:!0});
k.prototype.hitTest = function(a, d, b) {
return a instanceof k ? this.as3Object.hitTestObject(a.as3Object) : this.as3Object.hitTestPoint(a, d, b);
};
k.prototype.lineGradientStyle = function(a, d, b, c, e, k, h, l) {
this.graphics.lineGradientStyle(a, d, b, c, e, k, h, l);
};
k.prototype.lineStyle = function(a, d, b, c, e, k, h, l) {
this.graphics.lineStyle(a, d, b, c, e, k, h, l);
};
k.prototype.lineTo = function(a, d) {
this.graphics.lineTo(a, d);
};
k.prototype.loadMovie = function(a, d) {
function b(a) {
c.removeEventListener(s.events.Event.COMPLETE, b);
a = this.as3Object.parent;
var d = a.getChildIndex(this.as3Object);
a.removeChild(this.as3Object);
a.addChildAt(c.content, d);
}
var c = new s.display.Loader, e = new s.net.URLRequest(a);
d && (e.method = d);
c.load(e);
c.addEventListener(s.events.Event.COMPLETE, b);
};
k.prototype.loadVariables = function(a, d) {
this.context.globals._loadVariables(this, a, d);
};
k.prototype.localToGlobal = function(a) {
var d = this.as3Object.localToGlobal(new s.geom.Point(a.asGetPublicProperty("x"), a.asGetPublicProperty("y")));
a.asSetPublicProperty("x", d.x);
a.asSetPublicProperty("y", d.y);
};
Object.defineProperty(k.prototype, "_lockroot", {get:function() {
throw "Not implemented: get$_lockroot";
}, set:function(a) {
throw "Not implemented: set$_lockroot";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "menu", {get:function() {
return this.as3Object.contextMenu;
}, set:function(a) {
this.as3Object.contextMenu = a;
}, enumerable:!0, configurable:!0});
k.prototype.moveTo = function(a, d) {
this.graphics.moveTo(a, d);
};
Object.defineProperty(k.prototype, "_name", {get:function() {
return this.as3Object.name;
}, set:function(a) {
this.as3Object.name = a;
}, enumerable:!0, configurable:!0});
k.prototype.nextFrame = function() {
this.as3Object.nextFrame();
};
k.prototype.nextScene = function() {
this.as3Object.nextScene();
};
Object.defineProperty(k.prototype, "opaqueBackground", {get:function() {
return this.as3Object.opaqueBackground;
}, set:function(a) {
this.as3Object.opaqueBackground = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_parent", {get:function() {
return a.getAVM1Object(this.as3Object.parent, this.context) || void 0;
}, set:function(a) {
throw "Not implemented: set$_parent";
}, enumerable:!0, configurable:!0});
k.prototype.play = function() {
this.as3Object.play();
};
k.prototype.prevFrame = function() {
this.as3Object.prevFrame();
};
k.prototype.prevScene = function() {
this.as3Object.prevScene();
};
Object.defineProperty(k.prototype, "_quality", {get:function() {
return "HIGH";
}, set:function(a) {
}, enumerable:!0, configurable:!0});
k.prototype.removeMovieClip = function() {
this._parent.as3Object.removeChild(this.as3Object);
};
Object.defineProperty(k.prototype, "_rotation", {get:function() {
return this.as3Object.rotation;
}, set:function(a) {
this.as3Object.rotation = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "scale9Grid", {get:function() {
throw "Not implemented: get$scale9Grid";
}, set:function(a) {
throw "Not implemented: set$scale9Grid";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "scrollRect", {get:function() {
throw "Not implemented: get$scrollRect";
}, set:function(a) {
throw "Not implemented: set$scrollRect";
}, enumerable:!0, configurable:!0});
k.prototype.setMask = function(c) {
var d = this.as3Object;
if (c = a.AVM1Utils.resolveMovieClip(c)) {
d.mask = c.as3Object;
}
};
Object.defineProperty(k.prototype, "_soundbuftime", {get:function() {
throw "Not implemented: get$_soundbuftime";
}, set:function(a) {
throw "Not implemented: set$_soundbuftime";
}, enumerable:!0, configurable:!0});
k.prototype.startDrag = function(a, d, b, c, e) {
this.as3Object.startDrag(a, 3 > arguments.length ? null : new s.geom.Rectangle(d, b, c - d, e - b));
};
k.prototype.stop = function() {
return this.as3Object.stop();
};
k.prototype.stopDrag = function() {
return this.as3Object.stopDrag();
};
k.prototype.swapDepths = function(c) {
var d = this.as3Object;
c = "number" === typeof c ? a.AVM1Utils.resolveLevel(Number(c)).as3Object : a.AVM1Utils.resolveTarget(c).as3Object;
d.parent === c.parent && d.parent.swapChildren(d, c);
};
Object.defineProperty(k.prototype, "tabChildren", {get:function() {
return this.as3Object.tabChildren;
}, set:function(a) {
this.as3Object.tabChildren = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "tabEnabled", {get:function() {
return this.as3Object.tabEnabled;
}, set:function(a) {
this.as3Object.tabEnabled = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "tabIndex", {get:function() {
return this.as3Object.tabIndex;
}, set:function(a) {
this.as3Object.tabIndex = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_target", {get:function() {
var a = this.as3Object;
if (a === a.root) {
return "/";
}
var c = "";
do {
c = "/" + a.name + c, a = a.parent;
} while (a !== a.root);
return c;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_totalframes", {get:function() {
return this.as3Object.totalFrames;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "trackAsMenu", {get:function() {
throw "Not implemented: get$trackAsMenu";
}, set:function(a) {
throw "Not implemented: set$trackAsMenu";
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "transform", {get:function() {
throw "Not implemented: get$transform";
}, set:function(a) {
throw "Not implemented: set$transform";
}, enumerable:!0, configurable:!0});
k.prototype.toString = function() {
return this.as3Object.toString();
};
k.prototype.unloadMovie = function() {
var a = this.as3Object, c = a.loaderInfo.loader;
c.parent && c.parent.removeChild(c);
a.stop();
};
Object.defineProperty(k.prototype, "_url", {get:function() {
return this.as3Object.loaderInfo.url;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "useHandCursor", {get:function() {
return this.as3Object.useHandCursor;
}, set:function(a) {
this.as3Object.useHandCursor = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_visible", {get:function() {
return this.as3Object.visible;
}, set:function(a) {
this.as3Object.visible = 0 !== +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_width", {get:function() {
return this.as3Object.width;
}, set:function(a) {
isNaN(a) || (this.as3Object.width = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_x", {get:function() {
return this.as3Object.x;
}, set:function(a) {
isNaN(a) || (this.as3Object.x = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_xmouse", {get:function() {
return this.as3Object.mouseX;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_xscale", {get:function() {
return 100 * this.as3Object.scaleX;
}, set:function(a) {
isNaN(a) || (this.as3Object.scaleX = a / 100);
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_y", {get:function() {
return this.as3Object.y;
}, set:function(a) {
isNaN(a) || (this.as3Object.y = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_ymouse", {get:function() {
return this.as3Object.mouseY;
}, enumerable:!0, configurable:!0});
Object.defineProperty(k.prototype, "_yscale", {get:function() {
return 100 * this.as3Object.scaleY;
}, set:function(a) {
isNaN(a) || (this.as3Object.scaleY = a / 100);
}, enumerable:!0, configurable:!0});
k.prototype._resolveLevelNProperty = function(a) {
if ("_root" === a || "_level0" === a) {
return h.AVM1Context.instance.resolveLevel(0);
}
if (0 === a.indexOf("_level")) {
a = a.substring(6);
var c = a | 0;
if (0 < c && a == c) {
return h.AVM1Context.instance.resolveLevel(c);
}
}
return null;
};
k.prototype.asGetProperty = function(a, c, b) {
if (e.call(this, a, c, b)) {
return l.call(this, a, c, b);
}
if ("string" === typeof c && "_" === c[0]) {
var g = this._resolveLevelNProperty(c);
if (g) {
return g;
}
}
a = u(a, c, b);
if (p.isPublicQualifiedName(a) && this.isAVM1Instance) {
return this.__lookupChild(p.getNameFromPublicQualifiedName(a));
}
};
k.prototype.asHasProperty = function(a, c, b) {
if (e.call(this, a, c, b) || "string" === typeof c && "_" === c[0] && this._resolveLevelNProperty(c)) {
return!0;
}
a = u(a, c, b);
return p.isPublicQualifiedName(a) && this.isAVM1Instance ? !!this.__lookupChild(p.getNameFromPublicQualifiedName(a)) : !1;
};
k.prototype.asGetEnumerableKeys = function() {
var a = m.call(this);
if (!this.isAVM1Instance) {
return a;
}
for (var c = this.as3Object, b = 0, g = c._children.length;b < g;b++) {
var k = c._children[b].name;
e.call(this, void 0, k, 0) || a.push(p.getPublicQualifiedName(k));
}
return a;
};
k.prototype.addFrameActionBlocks = function(a, c) {
var b = c.initActionBlocks, e = c.actionBlocks;
b && this._addInitActionBlocks(a, b);
if (e) {
for (b = 0;b < e.length;b++) {
this.addFrameScript(a, e[b]);
}
}
};
k.prototype.addFrameScript = function(a, c) {
var b = this._frameScripts;
b || (v(!this._boundExecuteFrameScripts), this._boundExecuteFrameScripts = this._executeFrameScripts.bind(this), b = this._frameScripts = []);
var e = b[a + 1];
e || (e = b[a + 1] = [], this.as3Object.addFrameScript(a, this._boundExecuteFrameScripts));
b = new h.AVM1ActionsData(c, "f" + a + "i" + e.length);
e.push(b);
};
k.prototype._addInitActionBlocks = function(a, c) {
function b(l) {
if (e.currentFrame === a + 1) {
e.removeEventListener("enterFrame", b);
l = k.context;
for (var m = 0;m < c.length;m++) {
var n = new h.AVM1ActionsData(c[m].actionsData, "f" + a + "i" + m);
l.executeActions(n, k);
}
}
}
var e = this.as3Object, k = this;
e.addEventListener("enterFrame", b);
};
k.prototype._executeFrameScripts = function() {
var a = this.context, c = this._frameScripts[this.as3Object.currentFrame];
v(c && c.length);
for (var b = 0;b < c.length;b++) {
a.executeActions(c[b], this);
}
};
k.prototype._initEventsHandlers = function() {
this.bindEvents([new a.AVM1EventHandler("onData", "data"), new a.AVM1EventHandler("onDragOut", "dragOut"), new a.AVM1EventHandler("onDragOver", "dragOver"), new a.AVM1EventHandler("onEnterFrame", "enterFrame"), new a.AVM1EventHandler("onKeyDown", "keyDown"), new a.AVM1EventHandler("onKeyUp", "keyUp"), new a.AVM1EventHandler("onKillFocus", "focusOut", function(a) {
return[a.relatedObject];
}), new a.AVM1EventHandler("onLoad", "load"), new a.AVM1EventHandler("onMouseDown", "mouseDown"), new a.AVM1EventHandler("onMouseUp", "mouseUp"), new t("onPress", "mouseDown"), new t("onRelease", "mouseUp"), new t("onReleaseOutside", "releaseOutside"), new t("onRollOut", "mouseOut"), new t("onRollOver", "mouseOver"), new a.AVM1EventHandler("onSetFocus", "focusIn", function(a) {
return[a.relatedObject];
}), new a.AVM1EventHandler("onUnload", "unload")]);
};
return k;
}(a.AVM1SymbolBase);
a.AVM1MovieClip = q;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.Debug.somewhatImplemented, v;
(function(a) {
a[a.IdleToOverUp = 1] = "IdleToOverUp";
a[a.OverUpToIdle = 2] = "OverUpToIdle";
a[a.OverUpToOverDown = 4] = "OverUpToOverDown";
a[a.OverDownToOverUp = 8] = "OverDownToOverUp";
a[a.OverDownToOutDown = 16] = "OverDownToOutDown";
a[a.OutDownToOverDown = 32] = "OutDownToOverDown";
a[a.OutDownToIdle = 64] = "OutDownToIdle";
a[a.IdleToOverDown = 128] = "IdleToOverDown";
a[a.OverDownToIdle = 256] = "OverDownToIdle";
})(v || (v = {}));
var p = [-1, 37, 39, 36, 35, 45, 46, -1, 8, -1, -1, -1, -1, 13, 38, 40, 33, 34, 9, 27];
v = function(c) {
function l() {
c.apply(this, arguments);
}
__extends(l, c);
l.createAVM1Class = function() {
return a.wrapAVM1Class(l, [], "_alpha blendMode cacheAsBitmap enabled filters _focusrect getDepth _height _highquality menu _name _parent _quality _rotation scale9Grid _soundbuftime tabEnabled tabIndex _target trackAsMenu _url useHandCursor _visible _width _x _xmouse _xscale _y _ymouse _yscale".split(" "));
};
l.prototype.initAVM1SymbolInstance = function(a, l) {
c.prototype.initAVM1SymbolInstance.call(this, a, l);
var p = this._as3Object;
if (p._symbol && p._symbol.data.buttonActions) {
p.buttonMode = !0;
p.addEventListener("addedToStage", this._addListeners.bind(this));
p.addEventListener("removedFromStage", this._removeListeners.bind(this));
for (var q = this._requiredListeners = Object.create(null), n = this._actions = p._symbol.data.buttonActions, k = 0;k < n.length;k++) {
var f = n[k];
f.actionsBlock || (f.actionsBlock = new h.AVM1ActionsData(f.actionsData, "s" + p._symbol.id + "e" + k));
if (f.keyCode) {
q.keyDown = this._keyDownHandler.bind(this);
} else {
var d;
switch(f.stateTransitionFlags) {
case 64:
d = "releaseOutside";
break;
case 1:
d = "rollOver";
break;
case 2:
d = "rollOut";
break;
case 4:
d = "mouseDown";
break;
case 8:
d = "mouseUp";
break;
case 16:
;
case 32:
s("AVM1 drag over/out button actions");
break;
case 128:
;
case 256:
s("AVM1 drag trackAsMenu over/out button actions");
break;
default:
console.warn("Unknown AVM1 button action type: " + f.stateTransitionFlags);
continue;
}
q[d] = this._mouseEventHandler.bind(this, f.stateTransitionFlags);
}
}
}
this._initEventsHandlers();
};
Object.defineProperty(l.prototype, "_alpha", {get:function() {
return this._as3Object.alpha;
}, set:function(a) {
this._as3Object.alpha = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "blendMode", {get:function() {
return this._as3Object.blendMode;
}, set:function(a) {
this._as3Object.blendMode = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "cacheAsBitmap", {get:function() {
return this._as3Object.cacheAsBitmap;
}, set:function(a) {
this._as3Object.cacheAsBitmap = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "enabled", {get:function() {
return this._as3Object.enabled;
}, set:function(a) {
this._as3Object.enabled = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "filters", {get:function() {
throw "Not implemented: get$filters";
}, set:function(a) {
throw "Not implemented: set$filters";
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_focusrect", {get:function() {
throw "Not implemented: get$_focusrect";
}, set:function(a) {
throw "Not implemented: set$_focusrect";
}, enumerable:!0, configurable:!0});
l.prototype.getDepth = function() {
return this._as3Object._clipDepth;
};
Object.defineProperty(l.prototype, "_height", {get:function() {
return this._as3Object.height;
}, set:function(a) {
isNaN(a) || (this._as3Object.height = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_highquality", {get:function() {
return 1;
}, set:function(a) {
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "menu", {get:function() {
return this._as3Object.contextMenu;
}, set:function(a) {
this._as3Object.contextMenu = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_name", {get:function() {
return this._as3Object.contextMenu;
}, set:function(a) {
this._as3Object.contextMenu = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_parent", {get:function() {
return a.getAVM1Object(this._as3Object.parent, this.context);
}, set:function(a) {
throw "Not implemented: set$_parent";
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_quality", {get:function() {
return "HIGH";
}, set:function(a) {
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_rotation", {get:function() {
return this._as3Object.rotation;
}, set:function(a) {
this._as3Object.rotation = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "scale9Grid", {get:function() {
throw "Not implemented: get$scale9Grid";
}, set:function(a) {
throw "Not implemented: set$scale9Grid";
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_soundbuftime", {get:function() {
throw "Not implemented: get$_soundbuftime";
}, set:function(a) {
throw "Not implemented: set$_soundbuftime";
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "tabEnabled", {get:function() {
return this._as3Object.tabEnabled;
}, set:function(a) {
this._as3Object.tabEnabled = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "tabIndex", {get:function() {
return this._as3Object.tabIndex;
}, set:function(a) {
this._as3Object.tabIndex = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_target", {get:function() {
return a.AVM1Utils.getTarget(this);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "trackAsMenu", {get:function() {
throw "Not implemented: get$trackAsMenu";
}, set:function(a) {
throw "Not implemented: set$trackAsMenu";
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_url", {get:function() {
return this._as3Object.loaderInfo.url;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "useHandCursor", {get:function() {
return this._as3Object.useHandCursor;
}, set:function(a) {
this._as3Object.useHandCursor = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_visible", {get:function() {
return this._as3Object.visible;
}, set:function(a) {
this._as3Object.visible = 0 !== +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_width", {get:function() {
return this._as3Object.width;
}, set:function(a) {
isNaN(a) || (this._as3Object.width = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_x", {get:function() {
return this._as3Object.x;
}, set:function(a) {
isNaN(a) || (this._as3Object.x = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_xmouse", {get:function() {
return this._as3Object.mouseX;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_xscale", {get:function() {
return this._as3Object.scaleX;
}, set:function(a) {
isNaN(a) || (this._as3Object.scaleX = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_y", {get:function() {
return this._as3Object.y;
}, set:function(a) {
isNaN(a) || (this._as3Object.y = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_ymouse", {get:function() {
return this._as3Object.mouseY;
}, enumerable:!0, configurable:!0});
Object.defineProperty(l.prototype, "_yscale", {get:function() {
return this._as3Object.scaleY;
}, set:function(a) {
isNaN(a) || (this._as3Object.scaleY = a);
}, enumerable:!0, configurable:!0});
l.prototype._addListeners = function() {
for (var a in this._requiredListeners) {
("keyDown" === a ? this._as3Object.stage : this._as3Object).addEventListener(a, this._requiredListeners[a]);
}
};
l.prototype._removeListeners = function() {
for (var a in this._requiredListeners) {
("keyDown" === a ? this._as3Object.stage : this._as3Object).removeEventListener(a, this._requiredListeners[a]);
}
};
l.prototype._keyDownHandler = function(a) {
for (var c = this._actions, h = 0;h < c.length;h++) {
var l = c[h];
l.keyCode && (32 > l.keyCode && p[l.keyCode] === a.asGetPublicProperty("keyCode") || l.keyCode === a.asGetPublicProperty("charCode")) && this._runAction(l);
}
};
l.prototype._mouseEventHandler = function(a) {
for (var c = this._actions, h = 0;h < c.length;h++) {
var l = c[h];
l.stateTransitionFlags === a && this._runAction(l);
}
};
l.prototype._runAction = function(c) {
this._as3Object.loaderInfo._avm1Context.executeActions(c.actionsBlock, a.getAVM1Object(this._as3Object._parent, this.context));
};
l.prototype._initEventsHandlers = function() {
this.bindEvents([new a.AVM1EventHandler("onDragOut", "dragOut"), new a.AVM1EventHandler("onDragOver", "dragOver"), new a.AVM1EventHandler("onKeyDown", "keyDown"), new a.AVM1EventHandler("onKeyUp", "keyUp"), new a.AVM1EventHandler("onKillFocus", "focusOut", function(a) {
return[a.relatedObject];
}), new a.AVM1EventHandler("onLoad", "load"), new a.AVM1EventHandler("onMouseDown", "mouseDown"), new a.AVM1EventHandler("onMouseUp", "mouseUp"), new a.AVM1EventHandler("onPress", "mouseDown"), new a.AVM1EventHandler("onRelease", "mouseUp"), new a.AVM1EventHandler("onReleaseOutside", "releaseOutside"), new a.AVM1EventHandler("onRollOut", "mouseOut"), new a.AVM1EventHandler("onRollOver", "mouseOver"), new a.AVM1EventHandler("onSetFocus", "focusIn", function(a) {
return[a.relatedObject];
})]);
};
return l;
}(a.AVM1SymbolBase);
a.AVM1Button = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
(function(a) {
var c = function(c) {
function h() {
c.apply(this, arguments);
}
__extends(h, c);
h.createAVM1Class = function() {
return a.wrapAVM1Class(h, [], "_alpha antiAliasType autoSize background backgroundColor border borderColor bottomScroll condenseWhite embedFonts getNewTextFormat getTextFormat _height _highquality hscroll html htmlText length maxChars maxhscroll maxscroll multiline _name _parent password _quality _rotation scroll selectable setNewTextFormat setTextFormat _soundbuftime tabEnabled tabIndex _target text textColor textHeight textWidth type _url _visible _width wordWrap _x _xmouse _xscale _y _ymouse _yscale".split(" "));
};
h.prototype.initAVM1SymbolInstance = function(a, h) {
c.prototype.initAVM1SymbolInstance.call(this, a, h);
this._variable = "";
this._exitFrameHandler = null;
h._symbol && (this.variable = h._symbol.variableName || "");
this._initEventsHandlers();
};
Object.defineProperty(h.prototype, "_alpha", {get:function() {
return this._as3Object.alpha;
}, set:function(a) {
this._as3Object.alpha = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "antiAliasType", {get:function() {
return this._as3Object.antiAliasType;
}, set:function(a) {
this._as3Object.antiAliasType = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "autoSize", {get:function() {
return this._as3Object.autoSize;
}, set:function(a) {
!0 === a ? a = "left" : !1 === a && (a = "none");
this._as3Object.autoSize = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "background", {get:function() {
return this._as3Object.background;
}, set:function(a) {
this._as3Object.background = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "backgroundColor", {get:function() {
return this._as3Object.backgroundColor;
}, set:function(a) {
this._as3Object.backgroundColor = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "border", {get:function() {
return this._as3Object.border;
}, set:function(a) {
this._as3Object.border = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "borderColor", {get:function() {
return this._as3Object.borderColor;
}, set:function(a) {
this._as3Object.borderColor = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "bottomScroll", {get:function() {
return this._as3Object.bottomScrollV;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "condenseWhite", {get:function() {
return this._as3Object.condenseWhite;
}, set:function(a) {
this._as3Object.condenseWhite = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "embedFonts", {get:function() {
return this._as3Object.embedFonts;
}, set:function(a) {
this._as3Object.embedFonts = a;
}, enumerable:!0, configurable:!0});
h.prototype.getNewTextFormat = function() {
return this._as3Object.defaultTextFormat;
};
h.prototype.getTextFormat = function() {
return this._as3Object.getTextFormat;
};
Object.defineProperty(h.prototype, "_height", {get:function() {
return this._as3Object.height;
}, set:function(a) {
isNaN(a) || (this._as3Object.height = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_highquality", {get:function() {
return 1;
}, set:function(a) {
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "hscroll", {get:function() {
return this._as3Object.scrollH;
}, set:function(a) {
this._as3Object.scrollH = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "html", {get:function() {
throw "Not implemented: get$_html";
}, set:function(a) {
throw "Not implemented: set$_html";
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "htmlText", {get:function() {
return this._as3Object.htmlText;
}, set:function(a) {
this._as3Object.htmlText = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "length", {get:function() {
return this._as3Object.length;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "maxChars", {get:function() {
return this._as3Object.maxChars;
}, set:function(a) {
this._as3Object.maxChars = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "maxhscroll", {get:function() {
return this._as3Object.maxScrollH;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "maxscroll", {get:function() {
return this._as3Object.maxScrollV;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "multiline", {get:function() {
return this._as3Object.multiline;
}, set:function(a) {
this._as3Object.multiline = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_name", {get:function() {
return this.as3Object._name;
}, set:function(a) {
this.as3Object._name = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_parent", {get:function() {
return this._as3Object.parent;
}, set:function(a) {
throw "Not implemented: set$_parent";
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "password", {get:function() {
return this._as3Object.displayAsPassword;
}, set:function(a) {
this._as3Object.displayAsPassword = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_quality", {get:function() {
return "HIGH";
}, set:function(a) {
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_rotation", {get:function() {
return this._as3Object.rotation;
}, set:function(a) {
this._as3Object.rotation = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "scroll", {get:function() {
return this._as3Object.scrollV;
}, set:function(a) {
this._as3Object.scrollV = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "selectable", {get:function() {
return this._as3Object.selectable;
}, set:function(a) {
this._as3Object.selectable = a;
}, enumerable:!0, configurable:!0});
h.prototype.setNewTextFormat = function(a) {
this._as3Object.defaultTextFormat = a;
};
h.prototype.setTextFormat = function() {
this._as3Object.setTextFormat.apply(this._as3Object, arguments);
};
Object.defineProperty(h.prototype, "_soundbuftime", {get:function() {
throw "Not implemented: get$_soundbuftime";
}, set:function(a) {
throw "Not implemented: set$_soundbuftime";
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "tabEnabled", {get:function() {
return this._as3Object.tabEnabled;
}, set:function(a) {
this._as3Object.tabEnabled = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "tabIndex", {get:function() {
return this._as3Object.tabIndex;
}, set:function(a) {
this._as3Object.tabIndex = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_target", {get:function() {
return a.AVM1Utils.getTarget(this);
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "text", {get:function() {
return this._as3Object.text;
}, set:function(a) {
this._as3Object.text = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "textColor", {get:function() {
return this._as3Object.textColor;
}, set:function(a) {
this._as3Object.textColor = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "textHeight", {get:function() {
return this._as3Object.textHeight;
}, set:function(a) {
throw "Not supported: set$textHeight";
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "textWidth", {get:function() {
return this._as3Object.textWidth;
}, set:function(a) {
throw "Not supported: set$textWidth";
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "type", {get:function() {
return this._as3Object.type;
}, set:function(a) {
this._as3Object.type = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_url", {get:function() {
return this._as3Object.loaderInfo.url;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "variable", {get:function() {
return this._variable;
}, set:function(a) {
if (a !== this._variable) {
var c = this.as3Object;
this._exitFrameHandler && !a && (c.removeEventListener("exitFrame", this._exitFrameHandler), this._exitFrameHandler = null);
this._variable = a;
!this._exitFrameHandler && a && (this._exitFrameHandler = this._onAS3ObjectExitFrame.bind(this), c.addEventListener("exitFrame", this._exitFrameHandler));
}
}, enumerable:!0, configurable:!0});
h.prototype._onAS3ObjectExitFrame = function() {
this._syncTextFieldValue(this.as3Object, this._variable);
};
h.prototype._syncTextFieldValue = function(c, h) {
var e;
e = 0 <= h.indexOf(".") || 0 <= h.indexOf(":");
var m = this.context.utils;
if (e) {
var p = h.split(/[.:\/]/g);
h = p.pop();
if ("_root" == p[0] || "" === p[0]) {
if (null === c.root) {
return;
}
e = a.getAVM1Object(c.root, this.context);
p.shift();
"" === p[0] && p.shift();
} else {
e = a.getAVM1Object(c._parent, this.context);
}
for (;0 < p.length;) {
var q = p.shift();
e = m.getProperty(e, q);
if (!e) {
return;
}
}
} else {
e = a.getAVM1Object(c._parent, this.context);
}
m.hasProperty(e, h) || m.setProperty(e, h, c.text);
c.text = "" + m.getProperty(e, h);
};
Object.defineProperty(h.prototype, "_visible", {get:function() {
return this._as3Object.visible;
}, set:function(a) {
this._as3Object.visible = 0 !== +a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_width", {get:function() {
return this._as3Object.width;
}, set:function(a) {
isNaN(a) || (this._as3Object.width = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "wordWrap", {get:function() {
return this._as3Object.wordWrap;
}, set:function(a) {
this._as3Object.wordWrap = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_x", {get:function() {
return this._as3Object.x;
}, set:function(a) {
isNaN(a) || (this._as3Object.x = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_xmouse", {get:function() {
return this._as3Object.mouseX;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_xscale", {get:function() {
return this._as3Object.scaleX;
}, set:function(a) {
isNaN(a) || (this._as3Object.scaleX = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_y", {get:function() {
return this._as3Object.y;
}, set:function(a) {
isNaN(a) || (this._as3Object.y = a);
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_ymouse", {get:function() {
return this._as3Object.mouseY;
}, enumerable:!0, configurable:!0});
Object.defineProperty(h.prototype, "_yscale", {get:function() {
return this._as3Object.scaleY;
}, set:function(a) {
isNaN(a) || (this._as3Object.scaleY = a);
}, enumerable:!0, configurable:!0});
h.prototype._initEventsHandlers = function() {
this.bindEvents([new a.AVM1EventHandler("onDragOut", "dragOut"), new a.AVM1EventHandler("onDragOver", "dragOver"), new a.AVM1EventHandler("onKeyDown", "keyDown"), new a.AVM1EventHandler("onKeyUp", "keyUp"), new a.AVM1EventHandler("onKillFocus", "focusOut", function(a) {
return[a.relatedObject];
}), new a.AVM1EventHandler("onLoad", "load"), new a.AVM1EventHandler("onMouseDown", "mouseDown"), new a.AVM1EventHandler("onMouseUp", "mouseUp"), new a.AVM1EventHandler("onPress", "mouseDown"), new a.AVM1EventHandler("onRelease", "mouseUp"), new a.AVM1EventHandler("onReleaseOutside", "releaseOutside"), new a.AVM1EventHandler("onRollOut", "mouseOut"), new a.AVM1EventHandler("onRollOver", "mouseOver"), new a.AVM1EventHandler("onSetFocus", "focusIn", function(a) {
return[a.relatedObject];
})]);
};
return h;
}(a.AVM1SymbolBase);
a.AVM1TextField = c;
})(c.Lib || (c.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = function() {
function c(h) {
this._target = a.AVM1Utils.resolveTarget(h);
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, [], ["getRGB", "getTransform", "setRGB", "setTransform"]);
};
c.prototype.getRGB = function() {
return this.getTransform().asGetPublicProperty("color");
};
c.prototype.getTransform = function() {
return this._target.as3Object.transform.colorTransform;
};
c.prototype.setRGB = function(a) {
var c = new h.geom.ColorTransform;
c.asSetPublicProperty("color", a);
this.setTransform(c);
};
c.prototype.setTransform = function(a) {
this._target.as3Object.transform.colorTransform = a;
};
return c;
}();
a.AVM1Color = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = function() {
function c(h) {
this._target = a.AVM1Utils.resolveTarget(h);
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, [], ["matrix", "concatenatedMatrix", "colorTransform", "pixelBounds"]);
};
Object.defineProperty(c.prototype, "matrix", {get:function() {
return this._target.as3Object.transform.matrix;
}, set:function(a) {
if (a instanceof h.geom.Matrix) {
this._target.as3Object.transform.matrix = a;
} else {
if (null != a) {
var c = this.matrix;
a.asHasProperty(void 0, "a", 0) && (c.a = a.asGetPublicProperty("a"));
a.asHasProperty(void 0, "b", 0) && (c.b = a.asGetPublicProperty("b"));
a.asHasProperty(void 0, "c", 0) && (c.c = a.asGetPublicProperty("c"));
a.asHasProperty(void 0, "d", 0) && (c.d = a.asGetPublicProperty("d"));
a.asHasProperty(void 0, "tx", 0) && (c.tx = a.asGetPublicProperty("tx"));
a.asHasProperty(void 0, "ty", 0) && (c.ty = a.asGetPublicProperty("ty"));
this._target.as3Object.transform.matrix = c;
}
}
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "concatenatedMatrix", {get:function() {
return this._target.as3Object.transform.concatenatedMatrix;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "colorTransform", {get:function() {
return this._target.as3Object.transform.colorTransform;
}, set:function(a) {
this._target.as3Object.transform.colorTransform = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "pixelBounds", {get:function() {
return this._target.as3Object.pixelBounds;
}, enumerable:!0, configurable:!0});
return c;
}();
a.AVM1Transform = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.Debug.notImplemented, v = Object.prototype.asGetProperty, p = Object.prototype.asSetProperty, u = Object.prototype.asCallProperty, l = Object.prototype.asHasProperty, e = Object.prototype.asHasOwnProperty, m = Object.prototype.asHasTraitProperty, t = Object.prototype.asDeleteProperty, q = function(c) {
function k() {
}
__extends(k, c);
k.prototype.setTarget = function(a) {
this._target = a;
};
k.prototype._isInternalProperty = function(a, c, b) {
return!this._target || a || "__proto__" === c || "__constructor__" === c ? !0 : !1;
};
k.prototype.asGetProperty = function(a, c, b) {
return this._isInternalProperty(a, c, b) ? v.call(this, a, c, b) : this._target.asGetPublicProperty(c);
};
k.prototype.asGetNumericProperty = function(a) {
return this._target.asGetNumericProperty(a);
};
k.prototype.asSetNumericProperty = function(a, c) {
return this._target.asSetNumericProperty(a, c);
};
k.prototype.asSetProperty = function(a, c, b, e) {
if (this._isInternalProperty(a, c, b)) {
p.call(this, a, c, b, e);
} else {
return this._target.asSetPublicProperty(c, e);
}
};
k.prototype.asCallProperty = function(a, c, b, e, k) {
return this._isInternalProperty(a, c, b) ? u.call(this, a, c, b, !1, k) : this._target.asCallPublicProperty(c, k);
};
k.prototype.asHasProperty = function(a, c, b) {
return this._isInternalProperty(a, c, b) ? l.call(this, a, c, b) : this._target.asHasProperty(void 0, c, 0);
};
k.prototype.asHasOwnProperty = function(a, c, b) {
return this._isInternalProperty(a, c, b) ? e.call(this, a, c, b) : this._target.asHasOwnProperty(void 0, c, 0);
};
k.prototype.asDeleteProperty = function(a, c, b) {
if (m.call(this, a, c, b)) {
return t.call(this, a, c, b);
}
h("AVM1Proxy asDeleteProperty");
return!1;
};
k.prototype.asNextName = function(a) {
h("AVM1Proxy asNextName");
};
k.prototype.asNextValue = function(a) {
h("AVM1Proxy asNextValue");
};
k.prototype.asNextNameIndex = function(a) {
h("AVM1Proxy asNextNameIndex");
};
k.prototype.proxyNativeMethod = function(a) {
this._target.asSetPublicProperty(a, this._target[a].bind(this._target));
};
k.wrap = function(c, d) {
function b() {
var b = Object.create(c.prototype);
a.AVM1TextFormat.apply(b, arguments);
this.setTarget(b);
d && d.methods && d.methods.forEach(this.proxyNativeMethod, this);
}
b.prototype = k.prototype;
return b;
};
return k;
}(c.AVM2.AS.ASObject);
a.AVM1Proxy = q;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = c.AVM2.Runtime.asCoerceString, p = function(c) {
function l(a, c, l, p, n, k, f, d, b, g, r, w, u) {
h.text.TextFormat.apply(this, arguments);
}
__extends(l, c);
l.createAVM1Class = function() {
return a.AVM1Proxy.wrap(l, {methods:["getTextExtent"]});
};
l.prototype.getTextExtent = function(a, c) {
a = v(a);
c = +c;
var p = l._measureTextField;
p || (p = new h.text.TextField, p.multiline = !0, l._measureTextField = p);
!isNaN(c) && 0 < c ? (p.width = c + 4, p.wordWrap = !0) : p.wordWrap = !1;
p.defaultTextFormat = this;
p.text = a;
var q = {}, n = p.textWidth, k = p.textHeight;
q.asSetPublicProperty("width", n);
q.asSetPublicProperty("height", k);
q.asSetPublicProperty("textFieldWidth", n + 4);
q.asSetPublicProperty("textFieldHeight", k + 4);
p = p.getLineMetrics();
q.asSetPublicProperty("ascent", p.asGetPublicProperty("ascent"));
q.asSetPublicProperty("descent", p.asGetPublicProperty("descent"));
return q;
};
return l;
}(h.text.TextFormat);
a.AVM1TextFormat = p;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var s = c.AVM2.AS.flash, v = function(c) {
function u() {
c.apply(this, arguments);
}
__extends(u, c);
u.createAVM1Class = function() {
var c = a.AVM1Proxy.wrap(u, null);
c.asSetPublicProperty("loadBitmap", u.loadBitmap);
return c;
};
u.loadBitmap = function(a) {
a = asCoerceString(a);
return(a = h.AVM1Context.instance.getAsset(a)) && a.symbolProps instanceof s.display.BitmapSymbol ? (a = u.initializeFrom(a), a.class.instanceConstructorNoInitialize.call(a), a) : null;
};
return u;
}(s.display.BitmapData);
a.AVM1BitmapData = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = function() {
function c() {
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, ["available", "addCallback", "call"], []);
};
Object.defineProperty(c, "available", {get:function() {
return h.external.ExternalInterface.asGetPublicProperty("available");
}, enumerable:!0, configurable:!0});
c.addCallback = function(a, c, e) {
try {
return h.external.ExternalInterface.asCallPublicProperty("addCallback", [a, function() {
return e.apply(c, arguments);
}]), !0;
} catch (m) {
}
return!1;
};
c.call = function(a) {
var c = Array.prototype.slice.call(arguments, 0);
return h.external.ExternalInterface.asCallPublicProperty("call", c);
};
return c;
}();
a.AVM1ExternalInterface = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = function(c) {
function u(h) {
c.call(this);
this._target = a.AVM1Utils.resolveTarget(h);
this._linkageID = this._channel = this._sound = null;
}
__extends(u, c);
u.createAVM1Class = function() {
return a.wrapAVM1Class(u, [], "attachSound duration getBytesLoaded getBytesTotal getPan setPan getTransform setTransform getVolume setVolume start stop".split(" "));
};
u.prototype.attachSound = function(a) {
var c = this.context.getAsset(a);
c && (c = Object.create(c.symbolProps), c = h.media.Sound.initializeFrom(c), h.media.Sound.instanceConstructorNoInitialize.call(c), this._linkageID = a, this._sound = c);
};
u.prototype.loadSound = function(a, c) {
};
u.prototype.getBytesLoaded = function() {
return 0;
};
u.prototype.getBytesTotal = function() {
return 0;
};
u.prototype.getPan = function() {
var a = this._channel && this._channel.soundTransform;
return a ? 100 * a.asGetPublicProperty("pan") : 0;
};
u.prototype.setPan = function(a) {
var c = this._channel && this._channel.soundTransform;
c && (c.asSetPublicProperty("pan", a / 100), this._channel.soundTransform = c);
};
u.prototype.getTransform = function() {
return null;
};
u.prototype.setTransform = function(a) {
};
u.prototype.getVolume = function() {
var a = this._channel && this._channel.soundTransform;
return a ? 100 * a.asGetPublicProperty("volume") : 0;
};
u.prototype.setVolume = function(a) {
var c = this._channel && this._channel.soundTransform;
c && (c.asSetPublicProperty("volume", a / 100), this._channel.soundTransform = c);
};
u.prototype.start = function(a, c) {
this._sound && (a = isNaN(a) || 0 > a ? 0 : +a, c = isNaN(c) || 1 > c ? 1 : Math.floor(c), this._stopSoundChannel(), this._channel = this._sound.play(a, c - 1));
};
u.prototype._stopSoundChannel = function() {
this._channel && (this._channel.stop(), this._channel = null);
};
u.prototype.stop = function(a) {
a && a !== this._linkageID || this._stopSoundChannel();
};
return u;
}(a.AVM1NativeObject);
a.AVM1Sound = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = function() {
function c() {
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, ["capabilities", "security"], []);
};
Object.defineProperty(c, "capabilities", {get:function() {
return h.system.Capabilities;
}, enumerable:!0, configurable:!0});
Object.defineProperty(c, "security", {get:function() {
return h.system.Security;
}, enumerable:!0, configurable:!0});
return c;
}();
a.AVM1System = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = function() {
function c() {
this._loader = new h.display.Loader;
}
c.createAVM1Class = function() {
return a.wrapAVM1Class(c, [], ["loadClip", "unloadClip", "getProgress"]);
};
c.prototype.initAVM1ObjectInstance = function(a) {
};
c.prototype.loadClip = function(c, l) {
this._target = "number" === typeof l ? a.AVM1Utils.resolveLevel(l) : a.AVM1Utils.resolveTarget(l);
this._target.as3Object.addChild(this._loader);
this._loader.contentLoaderInfo.addEventListener(h.events.Event.OPEN, this.openHandler.bind(this));
this._loader.contentLoaderInfo.addEventListener(h.events.ProgressEvent.PROGRESS, this.progressHandler.bind(this));
this._loader.contentLoaderInfo.addEventListener(h.events.IOErrorEvent.IO_ERROR, this.ioErrorHandler.bind(this));
this._loader.contentLoaderInfo.addEventListener(h.events.Event.COMPLETE, this.completeHandler.bind(this));
this._loader.contentLoaderInfo.addEventListener(h.events.Event.INIT, this.initHandler.bind(this));
this._loader.load(new h.net.URLRequest(c));
return!0;
};
c.prototype.unloadClip = function(c) {
("number" === typeof c ? a.AVM1Utils.resolveLevel(c) : a.AVM1Utils.resolveTarget(c)).as3Object.removeChild(this._loader);
return!0;
};
c.prototype.getProgress = function(a) {
return this._loader.contentLoaderInfo.bytesLoaded;
};
c.prototype._broadcastMessage = function(c, h) {
void 0 === h && (h = null);
a.avm1BroadcastEvent(this._target.context, this, c, h);
};
c.prototype.openHandler = function(a) {
this._broadcastMessage("onLoadStart", [this._target]);
};
c.prototype.progressHandler = function(a) {
this._broadcastMessage("onLoadProgress", [this._target, a.bytesLoaded, a.bytesTotal]);
};
c.prototype.ioErrorHandler = function(a) {
this._broadcastMessage("onLoadError", [this._target, a.errorID, 501]);
};
c.prototype.completeHandler = function(a) {
this._broadcastMessage("onLoadComplete", [this._target]);
};
c.prototype.initHandler = function(a) {
var c = function() {
this._target.as3Object.removeEventListener(h.events.Event.EXIT_FRAME, c);
this._broadcastMessage("onLoadInit", [this._target]);
}.bind(this);
this._target.as3Object.addEventListener(h.events.Event.EXIT_FRAME, c);
};
return c;
}();
a.AVM1MovieClipLoader = v;
})(h.Lib || (h.Lib = {}));
})(c.AVM1 || (c.AVM1 = {}));
})(Shumway || (Shumway = {}));
console.timeEnd("Load AVM1 Dependencies");
(function(c) {
(function(h) {
function a(a, b, d) {
return m && d ? "string" === typeof b ? (a = c.ColorUtilities.cssStyleToRGBA(b), c.ColorUtilities.rgbaToCSSStyle(d.transformRGBA(a))) : b instanceof CanvasGradient && b._template ? b._template.createCanvasGradient(a, d) : b : b;
}
var s = c.Debug.assert, v = c.NumberUtilities.clamp;
(function(a) {
a[a.None = 0] = "None";
a[a.Brief = 1] = "Brief";
a[a.Verbose = 2] = "Verbose";
})(h.TraceLevel || (h.TraceLevel = {}));
var p = c.Metrics.Counter.instance;
h.frameCounter = new c.Metrics.Counter(!0);
h.traceLevel = 2;
h.writer = null;
h.frameCount = function(a) {
p.count(a);
h.frameCounter.count(a);
};
h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("GFX");
h.enterTimeline = function(a, b) {
};
h.leaveTimeline = function(a, b) {
};
var u = null, l = null, e = null, m = !0;
m && "undefined" !== typeof CanvasRenderingContext2D && (u = CanvasGradient.prototype.addColorStop, l = CanvasRenderingContext2D.prototype.createLinearGradient, e = CanvasRenderingContext2D.prototype.createRadialGradient, CanvasRenderingContext2D.prototype.createLinearGradient = function(a, b, c, d) {
return(new q(a, b, c, d)).createCanvasGradient(this, null);
}, CanvasRenderingContext2D.prototype.createRadialGradient = function(a, b, c, d, e, g) {
return(new n(a, b, c, d, e, g)).createCanvasGradient(this, null);
}, CanvasGradient.prototype.addColorStop = function(a, b) {
u.call(this, a, b);
this._template.addColorStop(a, b);
});
var t = function() {
return function(a, b) {
this.offset = a;
this.color = b;
};
}(), q = function() {
function b(a, c, d, e) {
this.x0 = a;
this.y0 = c;
this.x1 = d;
this.y1 = e;
this.colorStops = [];
}
b.prototype.addColorStop = function(a, b) {
this.colorStops.push(new t(a, b));
};
b.prototype.createCanvasGradient = function(b, c) {
for (var d = l.call(b, this.x0, this.y0, this.x1, this.y1), e = this.colorStops, g = 0;g < e.length;g++) {
var f = e[g], k = f.offset, f = f.color, f = c ? a(b, f, c) : f;
u.call(d, k, f);
}
d._template = this;
d._transform = this._transform;
return d;
};
return b;
}(), n = function() {
function b(a, c, d, e, g, f) {
this.x0 = a;
this.y0 = c;
this.r0 = d;
this.x1 = e;
this.y1 = g;
this.r1 = f;
this.colorStops = [];
}
b.prototype.addColorStop = function(a, b) {
this.colorStops.push(new t(a, b));
};
b.prototype.createCanvasGradient = function(b, c) {
for (var d = e.call(b, this.x0, this.y0, this.r0, this.x1, this.y1, this.r1), g = this.colorStops, f = 0;f < g.length;f++) {
var k = g[f], h = k.offset, k = k.color, k = c ? a(b, k, c) : k;
u.call(d, h, k);
}
d._template = this;
d._transform = this._transform;
return d;
};
return b;
}(), k;
(function(a) {
a[a.ClosePath = 1] = "ClosePath";
a[a.MoveTo = 2] = "MoveTo";
a[a.LineTo = 3] = "LineTo";
a[a.QuadraticCurveTo = 4] = "QuadraticCurveTo";
a[a.BezierCurveTo = 5] = "BezierCurveTo";
a[a.ArcTo = 6] = "ArcTo";
a[a.Rect = 7] = "Rect";
a[a.Arc = 8] = "Arc";
a[a.Save = 9] = "Save";
a[a.Restore = 10] = "Restore";
a[a.Transform = 11] = "Transform";
})(k || (k = {}));
var f = function() {
function a(b) {
this._commands = new Uint8Array(a._arrayBufferPool.acquire(8), 0, 8);
this._commandPosition = 0;
this._data = new Float64Array(a._arrayBufferPool.acquire(8 * Float64Array.BYTES_PER_ELEMENT), 0, 8);
this._dataPosition = 0;
b instanceof a && this.addPath(b);
}
a._apply = function(a, b) {
var c = a._commands, d = a._data, e = 0, g = 0;
b.beginPath();
for (var f = a._commandPosition;e < f;) {
switch(c[e++]) {
case 1:
b.closePath();
break;
case 2:
b.moveTo(d[g++], d[g++]);
break;
case 3:
b.lineTo(d[g++], d[g++]);
break;
case 4:
b.quadraticCurveTo(d[g++], d[g++], d[g++], d[g++]);
break;
case 5:
b.bezierCurveTo(d[g++], d[g++], d[g++], d[g++], d[g++], d[g++]);
break;
case 6:
b.arcTo(d[g++], d[g++], d[g++], d[g++], d[g++]);
break;
case 7:
b.rect(d[g++], d[g++], d[g++], d[g++]);
break;
case 8:
b.arc(d[g++], d[g++], d[g++], d[g++], d[g++], !!d[g++]);
break;
case 9:
b.save();
break;
case 10:
b.restore();
break;
case 11:
b.transform(d[g++], d[g++], d[g++], d[g++], d[g++], d[g++]);
}
}
};
a.prototype._ensureCommandCapacity = function(b) {
this._commands = a._arrayBufferPool.ensureUint8ArrayLength(this._commands, b);
};
a.prototype._ensureDataCapacity = function(b) {
this._data = a._arrayBufferPool.ensureFloat64ArrayLength(this._data, b);
};
a.prototype._writeCommand = function(a) {
this._commandPosition >= this._commands.length && this._ensureCommandCapacity(this._commandPosition + 1);
this._commands[this._commandPosition++] = a;
};
a.prototype._writeData = function(a, b, c, d, e, g) {
var f = arguments.length;
s(6 >= f && (0 === f % 2 || 5 === f));
this._dataPosition + f >= this._data.length && this._ensureDataCapacity(this._dataPosition + f);
var k = this._data, h = this._dataPosition;
k[h] = a;
k[h + 1] = b;
2 < f && (k[h + 2] = c, k[h + 3] = d, 4 < f && (k[h + 4] = e, 6 === f && (k[h + 5] = g)));
this._dataPosition += f;
};
a.prototype.closePath = function() {
this._writeCommand(1);
};
a.prototype.moveTo = function(a, b) {
this._writeCommand(2);
this._writeData(a, b);
};
a.prototype.lineTo = function(a, b) {
this._writeCommand(3);
this._writeData(a, b);
};
a.prototype.quadraticCurveTo = function(a, b, c, d) {
this._writeCommand(4);
this._writeData(a, b, c, d);
};
a.prototype.bezierCurveTo = function(a, b, c, d, e, g) {
this._writeCommand(5);
this._writeData(a, b, c, d, e, g);
};
a.prototype.arcTo = function(a, b, c, d, e) {
this._writeCommand(6);
this._writeData(a, b, c, d, e);
};
a.prototype.rect = function(a, b, c, d) {
this._writeCommand(7);
this._writeData(a, b, c, d);
};
a.prototype.arc = function(a, b, c, d, e, g) {
this._writeCommand(8);
this._writeData(a, b, c, d, e, +g);
};
a.prototype.addPath = function(a, b) {
b && (this._writeCommand(9), this._writeCommand(11), this._writeData(b.a, b.b, b.c, b.d, b.e, b.f));
var c = this._commandPosition + a._commandPosition;
c >= this._commands.length && this._ensureCommandCapacity(c);
for (var d = this._commands, e = a._commands, g = this._commandPosition, f = 0;g < c;g++) {
d[g] = e[f++];
}
this._commandPosition = c;
c = this._dataPosition + a._dataPosition;
c >= this._data.length && this._ensureDataCapacity(c);
d = this._data;
e = a._data;
g = this._dataPosition;
for (f = 0;g < c;g++) {
d[g] = e[f++];
}
this._dataPosition = c;
b && this._writeCommand(10);
};
a._arrayBufferPool = new c.ArrayBufferPool;
return a;
}();
h.Path = f;
if ("undefined" !== typeof CanvasRenderingContext2D && ("undefined" === typeof Path2D || !Path2D.prototype.addPath)) {
var d = CanvasRenderingContext2D.prototype.fill;
CanvasRenderingContext2D.prototype.fill = function(a, b) {
arguments.length && (a instanceof f ? f._apply(a, this) : b = a);
b ? d.call(this, b) : d.call(this);
};
var b = CanvasRenderingContext2D.prototype.stroke;
CanvasRenderingContext2D.prototype.stroke = function(a, c) {
arguments.length && (a instanceof f ? f._apply(a, this) : c = a);
c ? b.call(this, c) : b.call(this);
};
var g = CanvasRenderingContext2D.prototype.clip;
CanvasRenderingContext2D.prototype.clip = function(a, b) {
arguments.length && (a instanceof f ? f._apply(a, this) : b = a);
b ? g.call(this, b) : g.call(this);
};
window.Path2D = f;
}
if ("undefined" !== typeof CanvasPattern && Path2D.prototype.addPath) {
k = function(a) {
this._transform = a;
this._template && (this._template._transform = a);
};
CanvasPattern.prototype.setTransform || (CanvasPattern.prototype.setTransform = k);
CanvasGradient.prototype.setTransform || (CanvasGradient.prototype.setTransform = k);
var r = CanvasRenderingContext2D.prototype.fill, w = CanvasRenderingContext2D.prototype.stroke;
CanvasRenderingContext2D.prototype.fill = function(a, b) {
var c = !!this.fillStyle._transform;
if ((this.fillStyle instanceof CanvasPattern || this.fillStyle instanceof CanvasGradient) && c && a instanceof Path2D) {
var c = this.fillStyle._transform, d;
try {
d = c.inverse();
} catch (e) {
d = c = h.Geometry.Matrix.createIdentitySVGMatrix();
}
this.transform(c.a, c.b, c.c, c.d, c.e, c.f);
c = new Path2D;
c.addPath(a, d);
r.call(this, c, b);
this.transform(d.a, d.b, d.c, d.d, d.e, d.f);
} else {
0 === arguments.length ? r.call(this) : 1 === arguments.length ? r.call(this, a) : 2 === arguments.length && r.call(this, a, b);
}
};
CanvasRenderingContext2D.prototype.stroke = function(a) {
var b = !!this.strokeStyle._transform;
if ((this.strokeStyle instanceof CanvasPattern || this.strokeStyle instanceof CanvasGradient) && b && a instanceof Path2D) {
var c = this.strokeStyle._transform, b = c.inverse();
this.transform(c.a, c.b, c.c, c.d, c.e, c.f);
c = new Path2D;
c.addPath(a, b);
var d = this.lineWidth;
this.lineWidth *= (b.a + b.d) / 2;
w.call(this, c);
this.transform(b.a, b.b, b.c, b.d, b.e, b.f);
this.lineWidth = d;
} else {
0 === arguments.length ? w.call(this) : 1 === arguments.length && w.call(this, a);
}
};
}
"undefined" !== typeof CanvasRenderingContext2D && function() {
function a() {
s(this.mozCurrentTransform);
return h.Geometry.Matrix.createSVGMatrixFromArray(this.mozCurrentTransform);
}
CanvasRenderingContext2D.prototype.flashStroke = function(a, b) {
var d = this.currentTransform;
if (d) {
var e = new Path2D;
e.addPath(a, d);
var g = this.lineWidth;
this.setTransform(1, 0, 0, 1, 0, 0);
switch(b) {
case 1:
this.lineWidth = v(g * (c.getScaleX(d) + c.getScaleY(d)) / 2, 1, 1024);
break;
case 2:
this.lineWidth = v(g * c.getScaleY(d), 1, 1024);
break;
case 3:
this.lineWidth = v(g * c.getScaleX(d), 1, 1024);
}
this.stroke(e);
this.setTransform(d.a, d.b, d.c, d.d, d.e, d.f);
this.lineWidth = g;
} else {
this.stroke(a);
}
};
!("currentTransform" in CanvasRenderingContext2D.prototype) && "mozCurrentTransform" in CanvasRenderingContext2D.prototype && Object.defineProperty(CanvasRenderingContext2D.prototype, "currentTransform", {get:a});
}();
if ("undefined" !== typeof CanvasRenderingContext2D && void 0 === CanvasRenderingContext2D.prototype.globalColorMatrix) {
var z = CanvasRenderingContext2D.prototype.fill, A = CanvasRenderingContext2D.prototype.stroke, B = CanvasRenderingContext2D.prototype.fillText, M = CanvasRenderingContext2D.prototype.strokeText;
Object.defineProperty(CanvasRenderingContext2D.prototype, "globalColorMatrix", {get:function() {
return this._globalColorMatrix ? this._globalColorMatrix.clone() : null;
}, set:function(a) {
a ? this._globalColorMatrix ? this._globalColorMatrix.set(a) : this._globalColorMatrix = a.clone() : this._globalColorMatrix = null;
}, enumerable:!0, configurable:!0});
CanvasRenderingContext2D.prototype.fill = function(b, c) {
var d = null;
this._globalColorMatrix && (d = this.fillStyle, this.fillStyle = a(this, this.fillStyle, this._globalColorMatrix));
0 === arguments.length ? z.call(this) : 1 === arguments.length ? z.call(this, b) : 2 === arguments.length && z.call(this, b, c);
d && (this.fillStyle = d);
};
CanvasRenderingContext2D.prototype.stroke = function(b, c) {
var d = null;
this._globalColorMatrix && (d = this.strokeStyle, this.strokeStyle = a(this, this.strokeStyle, this._globalColorMatrix));
0 === arguments.length ? A.call(this) : 1 === arguments.length && A.call(this, b);
d && (this.strokeStyle = d);
};
CanvasRenderingContext2D.prototype.fillText = function(b, d, e, g) {
var f = null;
this._globalColorMatrix && (f = this.fillStyle, this.fillStyle = a(this, this.fillStyle, this._globalColorMatrix));
3 === arguments.length ? B.call(this, b, d, e) : 4 === arguments.length ? B.call(this, b, d, e, g) : c.Debug.unexpected();
f && (this.fillStyle = f);
};
CanvasRenderingContext2D.prototype.strokeText = function(b, d, e, g) {
var f = null;
this._globalColorMatrix && (f = this.strokeStyle, this.strokeStyle = a(this, this.strokeStyle, this._globalColorMatrix));
3 === arguments.length ? M.call(this, b, d, e) : 4 === arguments.length ? M.call(this, b, d, e, g) : c.Debug.unexpected();
f && (this.strokeStyle = f);
};
}
})(c.GFX || (c.GFX = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(c) {
c.ScreenShot = function() {
return function(a, c, h) {
this.dataURL = a;
this.w = c;
this.h = h;
};
}();
})(c.GFX || (c.GFX = {}));
})(Shumway || (Shumway = {}));
(function(c) {
var h = c.Debug.assert, a = function() {
function a() {
this._count = 0;
this._head = this._tail = null;
}
Object.defineProperty(a.prototype, "count", {get:function() {
return this._count;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "head", {get:function() {
return this._head;
}, enumerable:!0, configurable:!0});
a.prototype._unshift = function(a) {
h(!a.next && !a.previous);
0 === this._count ? this._head = this._tail = a : (a.next = this._head, this._head = a.next.previous = a);
this._count++;
};
a.prototype._remove = function(a) {
h(0 < this._count);
a === this._head && a === this._tail ? this._head = this._tail = null : a === this._head ? (this._head = a.next, this._head.previous = null) : a == this._tail ? (this._tail = a.previous, this._tail.next = null) : (a.previous.next = a.next, a.next.previous = a.previous);
a.previous = a.next = null;
this._count--;
};
a.prototype.use = function(a) {
this._head !== a && ((a.next || a.previous || this._tail === a) && this._remove(a), this._unshift(a));
};
a.prototype.pop = function() {
if (!this._tail) {
return null;
}
var a = this._tail;
this._remove(a);
return a;
};
a.prototype.visit = function(a, c) {
void 0 === c && (c = !0);
for (var h = c ? this._head : this._tail;h && a(h);) {
h = c ? h.next : h.previous;
}
};
return a;
}();
c.LRUList = a;
c.getScaleX = function(a) {
return a.a;
};
c.getScaleY = function(a) {
return a.d;
};
})(Shumway || (Shumway = {}));
var Shumway$$inline_737 = Shumway || (Shumway = {}), GFX$$inline_738 = Shumway$$inline_737.GFX || (Shumway$$inline_737.GFX = {}), Option$$inline_739 = Shumway$$inline_737.Options.Option, OptionSet$$inline_740 = Shumway$$inline_737.Options.OptionSet, shumwayOptions$$inline_741 = Shumway$$inline_737.Settings.shumwayOptions, rendererOptions$$inline_742 = shumwayOptions$$inline_741.register(new OptionSet$$inline_740("Renderer Options"));
GFX$$inline_738.imageUpdateOption = rendererOptions$$inline_742.register(new Option$$inline_739("", "imageUpdate", "boolean", !0, "Enable image updating."));
GFX$$inline_738.imageConvertOption = rendererOptions$$inline_742.register(new Option$$inline_739("", "imageConvert", "boolean", !0, "Enable image conversion."));
GFX$$inline_738.stageOptions = shumwayOptions$$inline_741.register(new OptionSet$$inline_740("Stage Renderer Options"));
GFX$$inline_738.forcePaint = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "forcePaint", "boolean", !1, "Force repainting."));
GFX$$inline_738.ignoreViewport = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "ignoreViewport", "boolean", !1, "Cull elements outside of the viewport."));
GFX$$inline_738.viewportLoupeDiameter = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "viewportLoupeDiameter", "number", 256, "Size of the viewport loupe.", {range:{min:1, max:1024, step:1}}));
GFX$$inline_738.disableClipping = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "disableClipping", "boolean", !1, "Disable clipping."));
GFX$$inline_738.debugClipping = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "debugClipping", "boolean", !1, "Disable clipping."));
GFX$$inline_738.hud = GFX$$inline_738.stageOptions.register(new Option$$inline_739("", "hud", "boolean", !1, "Enable HUD."));
var webGLOptions$$inline_743 = GFX$$inline_738.stageOptions.register(new OptionSet$$inline_740("WebGL Options"));
GFX$$inline_738.perspectiveCamera = webGLOptions$$inline_743.register(new Option$$inline_739("", "pc", "boolean", !1, "Use perspective camera."));
GFX$$inline_738.perspectiveCameraFOV = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcFOV", "number", 60, "Perspective Camera FOV."));
GFX$$inline_738.perspectiveCameraDistance = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcDistance", "number", 2, "Perspective Camera Distance."));
GFX$$inline_738.perspectiveCameraAngle = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcAngle", "number", 0, "Perspective Camera Angle."));
GFX$$inline_738.perspectiveCameraAngleRotate = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcRotate", "boolean", !1, "Rotate Use perspective camera."));
GFX$$inline_738.perspectiveCameraSpacing = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcSpacing", "number", .01, "Element Spacing."));
GFX$$inline_738.perspectiveCameraSpacingInflate = webGLOptions$$inline_743.register(new Option$$inline_739("", "pcInflate", "boolean", !1, "Rotate Use perspective camera."));
GFX$$inline_738.drawTiles = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawTiles", "boolean", !1, "Draw WebGL Tiles"));
GFX$$inline_738.drawSurfaces = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawSurfaces", "boolean", !1, "Draw WebGL Surfaces."));
GFX$$inline_738.drawSurface = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawSurface", "number", -1, "Draw WebGL Surface #"));
GFX$$inline_738.drawElements = webGLOptions$$inline_743.register(new Option$$inline_739("", "drawElements", "boolean", !0, "Actually call gl.drawElements. This is useful to test if the GPU is the bottleneck."));
GFX$$inline_738.disableSurfaceUploads = webGLOptions$$inline_743.register(new Option$$inline_739("", "disableSurfaceUploads", "boolean", !1, "Disable surface uploads."));
GFX$$inline_738.premultipliedAlpha = webGLOptions$$inline_743.register(new Option$$inline_739("", "premultipliedAlpha", "boolean", !1, "Set the premultipliedAlpha flag on getContext()."));
GFX$$inline_738.unpackPremultiplyAlpha = webGLOptions$$inline_743.register(new Option$$inline_739("", "unpackPremultiplyAlpha", "boolean", !0, "Use UNPACK_PREMULTIPLY_ALPHA_WEBGL in pixelStorei."));
var factorChoices$$inline_744 = {ZERO:0, ONE:1, SRC_COLOR:768, ONE_MINUS_SRC_COLOR:769, DST_COLOR:774, ONE_MINUS_DST_COLOR:775, SRC_ALPHA:770, ONE_MINUS_SRC_ALPHA:771, DST_ALPHA:772, ONE_MINUS_DST_ALPHA:773, SRC_ALPHA_SATURATE:776, CONSTANT_COLOR:32769, ONE_MINUS_CONSTANT_COLOR:32770, CONSTANT_ALPHA:32771, ONE_MINUS_CONSTANT_ALPHA:32772};
GFX$$inline_738.sourceBlendFactor = webGLOptions$$inline_743.register(new Option$$inline_739("", "sourceBlendFactor", "number", factorChoices$$inline_744.ONE, "", {choices:factorChoices$$inline_744}));
GFX$$inline_738.destinationBlendFactor = webGLOptions$$inline_743.register(new Option$$inline_739("", "destinationBlendFactor", "number", factorChoices$$inline_744.ONE_MINUS_SRC_ALPHA, "", {choices:factorChoices$$inline_744}));
var canvas2DOptions$$inline_745 = GFX$$inline_738.stageOptions.register(new OptionSet$$inline_740("Canvas2D Options"));
GFX$$inline_738.clipDirtyRegions = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "clipDirtyRegions", "boolean", !1, "Clip dirty regions."));
GFX$$inline_738.clipCanvas = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "clipCanvas", "boolean", !1, "Clip Regions."));
GFX$$inline_738.cull = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cull", "boolean", !1, "Enable culling."));
GFX$$inline_738.snapToDevicePixels = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "snapToDevicePixels", "boolean", !1, ""));
GFX$$inline_738.imageSmoothing = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "imageSmoothing", "boolean", !1, ""));
GFX$$inline_738.masking = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "masking", "boolean", !0, "Composite Mask."));
GFX$$inline_738.blending = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "blending", "boolean", !0, ""));
GFX$$inline_738.debugLayers = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "debugLayers", "boolean", !1, ""));
GFX$$inline_738.filters = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "filters", "boolean", !1, ""));
GFX$$inline_738.cacheShapes = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cacheShapes", "boolean", !0, ""));
GFX$$inline_738.cacheShapesMaxSize = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cacheShapesMaxSize", "number", 256, "", {range:{min:1, max:1024, step:1}}));
GFX$$inline_738.cacheShapesThreshold = canvas2DOptions$$inline_745.register(new Option$$inline_739("", "cacheShapesThreshold", "number", 256, "", {range:{min:1, max:1024, step:1}}));
(function(c) {
(function(h) {
(function(a) {
function s(a, c, d, e) {
var f = 1 - e;
return a * f * f + 2 * c * f * e + d * e * e;
}
function v(a, c, d, e, f) {
var k = f * f, h = 1 - f, l = h * h;
return a * h * l + 3 * c * f * l + 3 * d * h * k + e * f * k;
}
var p = c.NumberUtilities.clamp, u = c.NumberUtilities.pow2, l = c.NumberUtilities.epsilonEquals, e = c.Debug.assert;
a.radianToDegrees = function(a) {
return 180 * a / Math.PI;
};
a.degreesToRadian = function(a) {
return a * Math.PI / 180;
};
a.quadraticBezier = s;
a.quadraticBezierExtreme = function(a, c, d) {
var e = (a - c) / (a - 2 * c + d);
return 0 > e ? a : 1 < e ? d : s(a, c, d, e);
};
a.cubicBezier = v;
a.cubicBezierExtremes = function(a, c, d, e) {
var f = c - a, k;
k = 2 * (d - c);
var h = e - d;
f + h === k && (h *= 1.0001);
var l = 2 * f - k, m = k - 2 * f, m = Math.sqrt(m * m - 4 * f * (f - k + h));
k = 2 * (f - k + h);
f = (l + m) / k;
l = (l - m) / k;
m = [];
0 <= f && 1 >= f && m.push(v(a, c, d, e, f));
0 <= l && 1 >= l && m.push(v(a, c, d, e, l));
return m;
};
var m = function() {
function a(b, c) {
this.x = b;
this.y = c;
}
a.prototype.setElements = function(a, b) {
this.x = a;
this.y = b;
return this;
};
a.prototype.set = function(a) {
this.x = a.x;
this.y = a.y;
return this;
};
a.prototype.dot = function(a) {
return this.x * a.x + this.y * a.y;
};
a.prototype.squaredLength = function() {
return this.dot(this);
};
a.prototype.distanceTo = function(a) {
return Math.sqrt(this.dot(a));
};
a.prototype.sub = function(a) {
this.x -= a.x;
this.y -= a.y;
return this;
};
a.prototype.mul = function(a) {
this.x *= a;
this.y *= a;
return this;
};
a.prototype.clone = function() {
return new a(this.x, this.y);
};
a.prototype.toString = function(a) {
void 0 === a && (a = 2);
return "{x: " + this.x.toFixed(a) + ", y: " + this.y.toFixed(a) + "}";
};
a.prototype.inTriangle = function(a, b, c) {
var d = a.y * c.x - a.x * c.y + (c.y - a.y) * this.x + (a.x - c.x) * this.y, e = a.x * b.y - a.y * b.x + (a.y - b.y) * this.x + (b.x - a.x) * this.y;
if (0 > d != 0 > e) {
return!1;
}
a = -b.y * c.x + a.y * (c.x - b.x) + a.x * (b.y - c.y) + b.x * c.y;
0 > a && (d = -d, e = -e, a = -a);
return 0 < d && 0 < e && d + e < a;
};
a.createEmpty = function() {
return new a(0, 0);
};
a.createEmptyPoints = function(c) {
for (var d = [], e = 0;e < c;e++) {
d.push(new a(0, 0));
}
return d;
};
return a;
}();
a.Point = m;
var t = function() {
function a(b, c, d) {
this.x = b;
this.y = c;
this.z = d;
}
a.prototype.setElements = function(a, b, c) {
this.x = a;
this.y = b;
this.z = c;
return this;
};
a.prototype.set = function(a) {
this.x = a.x;
this.y = a.y;
this.z = a.z;
return this;
};
a.prototype.dot = function(a) {
return this.x * a.x + this.y * a.y + this.z * a.z;
};
a.prototype.cross = function(a) {
var b = this.z * a.x - this.x * a.z, c = this.x * a.y - this.y * a.x;
this.x = this.y * a.z - this.z * a.y;
this.y = b;
this.z = c;
return this;
};
a.prototype.squaredLength = function() {
return this.dot(this);
};
a.prototype.sub = function(a) {
this.x -= a.x;
this.y -= a.y;
this.z -= a.z;
return this;
};
a.prototype.mul = function(a) {
this.x *= a;
this.y *= a;
this.z *= a;
return this;
};
a.prototype.normalize = function() {
var a = Math.sqrt(this.squaredLength());
1E-5 < a ? this.mul(1 / a) : this.setElements(0, 0, 0);
return this;
};
a.prototype.clone = function() {
return new a(this.x, this.y, this.z);
};
a.prototype.toString = function(a) {
void 0 === a && (a = 2);
return "{x: " + this.x.toFixed(a) + ", y: " + this.y.toFixed(a) + ", z: " + this.z.toFixed(a) + "}";
};
a.createEmpty = function() {
return new a(0, 0, 0);
};
a.createEmptyPoints = function(c) {
for (var d = [], e = 0;e < c;e++) {
d.push(new a(0, 0, 0));
}
return d;
};
return a;
}();
a.Point3D = t;
var q = function() {
function a(c, d, e, f) {
this.setElements(c, d, e, f);
a.allocationCount++;
}
a.prototype.setElements = function(a, b, c, d) {
this.x = a;
this.y = b;
this.w = c;
this.h = d;
};
a.prototype.set = function(a) {
this.x = a.x;
this.y = a.y;
this.w = a.w;
this.h = a.h;
};
a.prototype.contains = function(a) {
var b = a.x + a.w, c = a.y + a.h, d = this.x + this.w, e = this.y + this.h;
return a.x >= this.x && a.x < d && a.y >= this.y && a.y < e && b > this.x && b <= d && c > this.y && c <= e;
};
a.prototype.containsPoint = function(a) {
return a.x >= this.x && a.x < this.x + this.w && a.y >= this.y && a.y < this.y + this.h;
};
a.prototype.isContained = function(a) {
for (var b = 0;b < a.length;b++) {
if (a[b].contains(this)) {
return!0;
}
}
return!1;
};
a.prototype.isSmallerThan = function(a) {
return this.w < a.w && this.h < a.h;
};
a.prototype.isLargerThan = function(a) {
return this.w > a.w && this.h > a.h;
};
a.prototype.union = function(a) {
if (this.isEmpty()) {
this.set(a);
} else {
if (!a.isEmpty()) {
var b = this.x, c = this.y;
this.x > a.x && (b = a.x);
this.y > a.y && (c = a.y);
var d = this.x + this.w;
d < a.x + a.w && (d = a.x + a.w);
var e = this.y + this.h;
e < a.y + a.h && (e = a.y + a.h);
this.x = b;
this.y = c;
this.w = d - b;
this.h = e - c;
}
}
};
a.prototype.isEmpty = function() {
return 0 >= this.w || 0 >= this.h;
};
a.prototype.setEmpty = function() {
this.h = this.w = this.y = this.x = 0;
};
a.prototype.intersect = function(c) {
var d = a.createEmpty();
if (this.isEmpty() || c.isEmpty()) {
return d.setEmpty(), d;
}
d.x = Math.max(this.x, c.x);
d.y = Math.max(this.y, c.y);
d.w = Math.min(this.x + this.w, c.x + c.w) - d.x;
d.h = Math.min(this.y + this.h, c.y + c.h) - d.y;
d.isEmpty() && d.setEmpty();
this.set(d);
};
a.prototype.intersects = function(a) {
if (this.isEmpty() || a.isEmpty()) {
return!1;
}
var b = Math.max(this.x, a.x), c = Math.max(this.y, a.y), b = Math.min(this.x + this.w, a.x + a.w) - b;
a = Math.min(this.y + this.h, a.y + a.h) - c;
return!(0 >= b || 0 >= a);
};
a.prototype.intersectsTransformedAABB = function(c, d) {
var e = a._temporary;
e.set(c);
d.transformRectangleAABB(e);
return this.intersects(e);
};
a.prototype.intersectsTranslated = function(a, b, c) {
if (this.isEmpty() || a.isEmpty()) {
return!1;
}
var d = Math.max(this.x, a.x + b), e = Math.max(this.y, a.y + c);
b = Math.min(this.x + this.w, a.x + b + a.w) - d;
a = Math.min(this.y + this.h, a.y + c + a.h) - e;
return!(0 >= b || 0 >= a);
};
a.prototype.area = function() {
return this.w * this.h;
};
a.prototype.clone = function() {
var c = a.allocate();
c.set(this);
return c;
};
a.allocate = function() {
var c = a._dirtyStack;
return c.length ? c.pop() : new a(12345, 67890, 12345, 67890);
};
a.prototype.free = function() {
a._dirtyStack.push(this);
};
a.prototype.snap = function() {
var a = Math.ceil(this.x + this.w), b = Math.ceil(this.y + this.h);
this.x = Math.floor(this.x);
this.y = Math.floor(this.y);
this.w = a - this.x;
this.h = b - this.y;
return this;
};
a.prototype.scale = function(a, b) {
this.x *= a;
this.y *= b;
this.w *= a;
this.h *= b;
return this;
};
a.prototype.offset = function(a, b) {
this.x += a;
this.y += b;
return this;
};
a.prototype.resize = function(a, b) {
this.w += a;
this.h += b;
return this;
};
a.prototype.expand = function(a, b) {
this.offset(-a, -b).resize(2 * a, 2 * b);
return this;
};
a.prototype.getCenter = function() {
return new m(this.x + this.w / 2, this.y + this.h / 2);
};
a.prototype.getAbsoluteBounds = function() {
return new a(0, 0, this.w, this.h);
};
a.prototype.toString = function(a) {
void 0 === a && (a = 2);
return "{" + this.x.toFixed(a) + ", " + this.y.toFixed(a) + ", " + this.w.toFixed(a) + ", " + this.h.toFixed(a) + "}";
};
a.createEmpty = function() {
var c = a.allocate();
c.setEmpty();
return c;
};
a.createSquare = function() {
return new a(-512, -512, 1024, 1024);
};
a.createMaxI16 = function() {
return new a(-32768, -32768, 65535, 65535);
};
a.prototype.setMaxI16 = function() {
this.setElements(-32768, -32768, 65535, 65535);
};
a.prototype.getCorners = function(a) {
a[0].x = this.x;
a[0].y = this.y;
a[1].x = this.x + this.w;
a[1].y = this.y;
a[2].x = this.x + this.w;
a[2].y = this.y + this.h;
a[3].x = this.x;
a[3].y = this.y + this.h;
};
a.allocationCount = 0;
a._temporary = new a(0, 0, 0, 0);
a._dirtyStack = [];
return a;
}();
a.Rectangle = q;
var n = function() {
function a(b) {
this.corners = b.map(function(a) {
return a.clone();
});
this.axes = [b[1].clone().sub(b[0]), b[3].clone().sub(b[0])];
this.origins = [];
for (var c = 0;2 > c;c++) {
this.axes[c].mul(1 / this.axes[c].squaredLength()), this.origins.push(b[0].dot(this.axes[c]));
}
}
a.prototype.getBounds = function() {
return a.getBounds(this.corners);
};
a.getBounds = function(a) {
for (var b = new m(Number.MAX_VALUE, Number.MAX_VALUE), c = new m(Number.MIN_VALUE, Number.MIN_VALUE), d = 0;4 > d;d++) {
var e = a[d].x, f = a[d].y;
b.x = Math.min(b.x, e);
b.y = Math.min(b.y, f);
c.x = Math.max(c.x, e);
c.y = Math.max(c.y, f);
}
return new q(b.x, b.y, c.x - b.x, c.y - b.y);
};
a.prototype.intersects = function(a) {
return this.intersectsOneWay(a) && a.intersectsOneWay(this);
};
a.prototype.intersectsOneWay = function(a) {
for (var b = 0;2 > b;b++) {
for (var c = 0;4 > c;c++) {
var d = a.corners[c].dot(this.axes[b]), e, f;
0 === c ? f = e = d : d < e ? e = d : d > f && (f = d);
}
if (e > 1 + this.origins[b] || f < this.origins[b]) {
return!1;
}
}
return!0;
};
return a;
}();
a.OBB = n;
(function(a) {
a[a.Unknown = 0] = "Unknown";
a[a.Identity = 1] = "Identity";
a[a.Translation = 2] = "Translation";
})(a.MatrixType || (a.MatrixType = {}));
var k = function() {
function a(c, d, e, f, k, h) {
this._data = new Float64Array(6);
this._type = 0;
this.setElements(c, d, e, f, k, h);
a.allocationCount++;
}
Object.defineProperty(a.prototype, "a", {get:function() {
return this._data[0];
}, set:function(a) {
this._data[0] = a;
this._type = 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "b", {get:function() {
return this._data[1];
}, set:function(a) {
this._data[1] = a;
this._type = 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "c", {get:function() {
return this._data[2];
}, set:function(a) {
this._data[2] = a;
this._type = 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "d", {get:function() {
return this._data[3];
}, set:function(a) {
this._data[3] = a;
this._type = 0;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "tx", {get:function() {
return this._data[4];
}, set:function(a) {
this._data[4] = a;
1 === this._type && (this._type = 2);
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "ty", {get:function() {
return this._data[5];
}, set:function(a) {
this._data[5] = a;
1 === this._type && (this._type = 2);
}, enumerable:!0, configurable:!0});
a.prototype.setElements = function(a, b, c, d, e, f) {
var k = this._data;
k[0] = a;
k[1] = b;
k[2] = c;
k[3] = d;
k[4] = e;
k[5] = f;
this._type = 0;
};
a.prototype.set = function(a) {
var b = this._data, c = a._data;
b[0] = c[0];
b[1] = c[1];
b[2] = c[2];
b[3] = c[3];
b[4] = c[4];
b[5] = c[5];
this._type = a._type;
};
a.prototype.emptyArea = function(a) {
a = this._data;
return 0 === a[0] || 0 === a[3] ? !0 : !1;
};
a.prototype.infiniteArea = function(a) {
a = this._data;
return Infinity === Math.abs(a[0]) || Infinity === Math.abs(a[3]) ? !0 : !1;
};
a.prototype.isEqual = function(a) {
if (1 === this._type && 1 === a._type) {
return!0;
}
var b = this._data;
a = a._data;
return b[0] === a[0] && b[1] === a[1] && b[2] === a[2] && b[3] === a[3] && b[4] === a[4] && b[5] === a[5];
};
a.prototype.clone = function() {
var c = a.allocate();
c.set(this);
return c;
};
a.allocate = function() {
var c = a._dirtyStack;
return c.length ? c.pop() : new a(12345, 12345, 12345, 12345, 12345, 12345);
};
a.prototype.free = function() {
a._dirtyStack.push(this);
};
a.prototype.transform = function(a, b, c, d, e, f) {
var k = this._data, h = k[0], l = k[1], m = k[2], n = k[3], p = k[4], q = k[5];
k[0] = h * a + m * b;
k[1] = l * a + n * b;
k[2] = h * c + m * d;
k[3] = l * c + n * d;
k[4] = h * e + m * f + p;
k[5] = l * e + n * f + q;
this._type = 0;
return this;
};
a.prototype.transformRectangle = function(a, b) {
e(4 === b.length);
var c = this._data, d = c[0], f = c[1], k = c[2], h = c[3], l = c[4], c = c[5], m = a.x, n = a.y, p = a.w, q = a.h;
b[0].x = d * m + k * n + l;
b[0].y = f * m + h * n + c;
b[1].x = d * (m + p) + k * n + l;
b[1].y = f * (m + p) + h * n + c;
b[2].x = d * (m + p) + k * (n + q) + l;
b[2].y = f * (m + p) + h * (n + q) + c;
b[3].x = d * m + k * (n + q) + l;
b[3].y = f * m + h * (n + q) + c;
};
a.prototype.isTranslationOnly = function() {
if (2 === this._type) {
return!0;
}
var a = this._data;
return 1 === a[0] && 0 === a[1] && 0 === a[2] && 1 === a[3] || l(a[0], 1) && l(a[1], 0) && l(a[2], 0) && l(a[3], 1) ? (this._type = 2, !0) : !1;
};
a.prototype.transformRectangleAABB = function(a) {
var b = this._data;
if (1 !== this._type) {
if (2 === this._type) {
a.x += b[4], a.y += b[5];
} else {
var c = b[0], d = b[1], e = b[2], f = b[3], k = b[4], h = b[5], l = a.x, m = a.y, n = a.w, p = a.h, b = c * l + e * m + k, q = d * l + f * m + h, s = c * (l + n) + e * m + k, t = d * (l + n) + f * m + h, u = c * (l + n) + e * (m + p) + k, n = d * (l + n) + f * (m + p) + h, c = c * l + e * (m + p) + k, d = d * l + f * (m + p) + h, f = 0;
b > s && (f = b, b = s, s = f);
u > c && (f = u, u = c, c = f);
a.x = b < u ? b : u;
a.w = (s > c ? s : c) - a.x;
q > t && (f = q, q = t, t = f);
n > d && (f = n, n = d, d = f);
a.y = q < n ? q : n;
a.h = (t > d ? t : d) - a.y;
}
}
};
a.prototype.scale = function(a, b) {
var c = this._data;
c[0] *= a;
c[1] *= b;
c[2] *= a;
c[3] *= b;
c[4] *= a;
c[5] *= b;
this._type = 0;
return this;
};
a.prototype.scaleClone = function(a, b) {
return 1 === a && 1 === b ? this : this.clone().scale(a, b);
};
a.prototype.rotate = function(a) {
var b = this._data, c = b[0], d = b[1], e = b[2], f = b[3], k = b[4], h = b[5], l = Math.cos(a);
a = Math.sin(a);
b[0] = l * c - a * d;
b[1] = a * c + l * d;
b[2] = l * e - a * f;
b[3] = a * e + l * f;
b[4] = l * k - a * h;
b[5] = a * k + l * h;
this._type = 0;
return this;
};
a.prototype.concat = function(a) {
if (1 === a._type) {
return this;
}
var b = this._data;
a = a._data;
var c = b[0] * a[0], d = 0, e = 0, f = b[3] * a[3], k = b[4] * a[0] + a[4], h = b[5] * a[3] + a[5];
if (0 !== b[1] || 0 !== b[2] || 0 !== a[1] || 0 !== a[2]) {
c += b[1] * a[2], f += b[2] * a[1], d += b[0] * a[1] + b[1] * a[3], e += b[2] * a[0] + b[3] * a[2], k += b[5] * a[2], h += b[4] * a[1];
}
b[0] = c;
b[1] = d;
b[2] = e;
b[3] = f;
b[4] = k;
b[5] = h;
this._type = 0;
return this;
};
a.prototype.concatClone = function(a) {
return this.clone().concat(a);
};
a.prototype.preMultiply = function(a) {
var b = this._data, c = a._data;
if (2 === a._type && this._type & 3) {
b[4] += c[4], b[5] += c[5], this._type = 2;
} else {
if (1 !== a._type) {
a = c[0] * b[0];
var d = 0, e = 0, f = c[3] * b[3], k = c[4] * b[0] + b[4], h = c[5] * b[3] + b[5];
if (0 !== c[1] || 0 !== c[2] || 0 !== b[1] || 0 !== b[2]) {
a += c[1] * b[2], f += c[2] * b[1], d += c[0] * b[1] + c[1] * b[3], e += c[2] * b[0] + c[3] * b[2], k += c[5] * b[2], h += c[4] * b[1];
}
b[0] = a;
b[1] = d;
b[2] = e;
b[3] = f;
b[4] = k;
b[5] = h;
this._type = 0;
}
}
};
a.prototype.translate = function(a, b) {
var c = this._data;
c[4] += a;
c[5] += b;
1 === this._type && (this._type = 2);
return this;
};
a.prototype.setIdentity = function() {
var a = this._data;
a[0] = 1;
a[1] = 0;
a[2] = 0;
a[3] = 1;
a[4] = 0;
a[5] = 0;
this._type = 1;
};
a.prototype.isIdentity = function() {
if (1 === this._type) {
return!0;
}
var a = this._data;
return 1 === a[0] && 0 === a[1] && 0 === a[2] && 1 === a[3] && 0 === a[4] && 0 === a[5];
};
a.prototype.transformPoint = function(a) {
if (1 !== this._type) {
var b = this._data, c = a.x, d = a.y;
a.x = b[0] * c + b[2] * d + b[4];
a.y = b[1] * c + b[3] * d + b[5];
}
};
a.prototype.transformPoints = function(a) {
if (1 !== this._type) {
for (var b = 0;b < a.length;b++) {
this.transformPoint(a[b]);
}
}
};
a.prototype.deltaTransformPoint = function(a) {
if (1 !== this._type) {
var b = this._data, c = a.x, d = a.y;
a.x = b[0] * c + b[2] * d;
a.y = b[1] * c + b[3] * d;
}
};
a.prototype.inverse = function(a) {
var b = this._data, c = a._data;
if (1 === this._type) {
a.setIdentity();
} else {
if (2 === this._type) {
c[0] = 1, c[1] = 0, c[2] = 0, c[3] = 1, c[4] = -b[4], c[5] = -b[5], a._type = 2;
} else {
var d = b[1], e = b[2], f = b[4], k = b[5];
if (0 === d && 0 === e) {
var h = c[0] = 1 / b[0], b = c[3] = 1 / b[3];
c[1] = 0;
c[2] = 0;
c[4] = -h * f;
c[5] = -b * k;
} else {
var h = b[0], b = b[3], l = h * b - d * e;
if (0 === l) {
a.setIdentity();
return;
}
l = 1 / l;
c[0] = b * l;
d = c[1] = -d * l;
e = c[2] = -e * l;
b = c[3] = h * l;
c[4] = -(c[0] * f + e * k);
c[5] = -(d * f + b * k);
}
a._type = 0;
}
}
};
a.prototype.getTranslateX = function() {
return this._data[4];
};
a.prototype.getTranslateY = function() {
return this._data[4];
};
a.prototype.getScaleX = function() {
var a = this._data;
if (1 === a[0] && 0 === a[1]) {
return 1;
}
var b = Math.sqrt(a[0] * a[0] + a[1] * a[1]);
return 0 < a[0] ? b : -b;
};
a.prototype.getScaleY = function() {
var a = this._data;
if (0 === a[2] && 1 === a[3]) {
return 1;
}
var b = Math.sqrt(a[2] * a[2] + a[3] * a[3]);
return 0 < a[3] ? b : -b;
};
a.prototype.getScale = function() {
return(this.getScaleX() + this.getScaleY()) / 2;
};
a.prototype.getAbsoluteScaleX = function() {
return Math.abs(this.getScaleX());
};
a.prototype.getAbsoluteScaleY = function() {
return Math.abs(this.getScaleY());
};
a.prototype.getRotation = function() {
var a = this._data;
return 180 * Math.atan(a[1] / a[0]) / Math.PI;
};
a.prototype.isScaleOrRotation = function() {
var a = this._data;
return.01 > Math.abs(a[0] * a[2] + a[1] * a[3]);
};
a.prototype.toString = function(a) {
void 0 === a && (a = 2);
var b = this._data;
return "{" + b[0].toFixed(a) + ", " + b[1].toFixed(a) + ", " + b[2].toFixed(a) + ", " + b[3].toFixed(a) + ", " + b[4].toFixed(a) + ", " + b[5].toFixed(a) + "}";
};
a.prototype.toWebGLMatrix = function() {
var a = this._data;
return new Float32Array([a[0], a[1], 0, a[2], a[3], 0, a[4], a[5], 1]);
};
a.prototype.toCSSTransform = function() {
var a = this._data;
return "matrix(" + a[0] + ", " + a[1] + ", " + a[2] + ", " + a[3] + ", " + a[4] + ", " + a[5] + ")";
};
a.createIdentity = function() {
var c = a.allocate();
c.setIdentity();
return c;
};
a.prototype.toSVGMatrix = function() {
var c = this._data, d = a._svg.createSVGMatrix();
d.a = c[0];
d.b = c[1];
d.c = c[2];
d.d = c[3];
d.e = c[4];
d.f = c[5];
return d;
};
a.prototype.snap = function() {
var a = this._data;
return this.isTranslationOnly() ? (a[0] = 1, a[1] = 0, a[2] = 0, a[3] = 1, a[4] = Math.round(a[4]), a[5] = Math.round(a[5]), this._type = 2, !0) : !1;
};
a.createIdentitySVGMatrix = function() {
return a._svg.createSVGMatrix();
};
a.createSVGMatrixFromArray = function(c) {
var d = a._svg.createSVGMatrix();
d.a = c[0];
d.b = c[1];
d.c = c[2];
d.d = c[3];
d.e = c[4];
d.f = c[5];
return d;
};
a.allocationCount = 0;
a._dirtyStack = [];
a._svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
a.multiply = function(a, b) {
var c = b._data;
a.transform(c[0], c[1], c[2], c[3], c[4], c[5]);
};
return a;
}();
a.Matrix = k;
k = function() {
function a(b) {
this._m = new Float32Array(b);
}
a.prototype.asWebGLMatrix = function() {
return this._m;
};
a.createCameraLookAt = function(c, d, e) {
d = c.clone().sub(d).normalize();
e = e.clone().cross(d).normalize();
var f = d.clone().cross(e);
return new a([e.x, e.y, e.z, 0, f.x, f.y, f.z, 0, d.x, d.y, d.z, 0, c.x, c.y, c.z, 1]);
};
a.createLookAt = function(c, d, e) {
d = c.clone().sub(d).normalize();
e = e.clone().cross(d).normalize();
var f = d.clone().cross(e);
return new a([e.x, f.x, d.x, 0, f.x, f.y, d.y, 0, d.x, f.z, d.z, 0, -e.dot(c), -f.dot(c), -d.dot(c), 1]);
};
a.prototype.mul = function(a) {
a = [a.x, a.y, a.z, 0];
for (var b = this._m, c = [], d = 0;4 > d;d++) {
c[d] = 0;
for (var e = 4 * d, f = 0;4 > f;f++) {
c[d] += b[e + f] * a[f];
}
}
return new t(c[0], c[1], c[2]);
};
a.create2DProjection = function(c, d, e) {
return new a([2 / c, 0, 0, 0, 0, -2 / d, 0, 0, 0, 0, 2 / e, 0, -1, 1, 0, 1]);
};
a.createPerspective = function(c, d, e, f) {
c = Math.tan(.5 * Math.PI - .5 * c);
var k = 1 / (e - f);
return new a([c / d, 0, 0, 0, 0, c, 0, 0, 0, 0, (e + f) * k, -1, 0, 0, e * f * k * 2, 0]);
};
a.createIdentity = function() {
return a.createTranslation();
};
a.createTranslation = function() {
return new a([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
};
a.createXRotation = function(c) {
var d = Math.cos(c);
c = Math.sin(c);
return new a([1, 0, 0, 0, 0, d, c, 0, 0, -c, d, 0, 0, 0, 0, 1]);
};
a.createYRotation = function(c) {
var d = Math.cos(c);
c = Math.sin(c);
return new a([d, 0, -c, 0, 0, 1, 0, 0, c, 0, d, 0, 0, 0, 0, 1]);
};
a.createZRotation = function(c) {
var d = Math.cos(c);
c = Math.sin(c);
return new a([d, c, 0, 0, -c, d, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]);
};
a.createScale = function(c, d, e) {
return new a([c, 0, 0, 0, 0, d, 0, 0, 0, 0, e, 0, 0, 0, 0, 1]);
};
a.createMultiply = function(c, d) {
var e = c._m, f = d._m, k = e[0], h = e[1], l = e[2], m = e[3], n = e[4], p = e[5], q = e[6], s = e[7], t = e[8], u = e[9], v = e[10], E = e[11], F = e[12], I = e[13], G = e[14], e = e[15], Z = f[0], Q = f[1], S = f[2], O = f[3], P = f[4], V = f[5], $ = f[6], W = f[7], x = f[8], ea = f[9], Y = f[10], R = f[11], U = f[12], ba = f[13], X = f[14], f = f[15];
return new a([k * Z + h * P + l * x + m * U, k * Q + h * V + l * ea + m * ba, k * S + h * $ + l * Y + m * X, k * O + h * W + l * R + m * f, n * Z + p * P + q * x + s * U, n * Q + p * V + q * ea + s * ba, n * S + p * $ + q * Y + s * X, n * O + p * W + q * R + s * f, t * Z + u * P + v * x + E * U, t * Q + u * V + v * ea + E * ba, t * S + u * $ + v * Y + E * X, t * O + u * W + v * R + E * f, F * Z + I * P + G * x + e * U, F * Q + I * V + G * ea + e * ba, F * S + I * $ + G * Y + e * X, F *
O + I * W + G * R + e * f]);
};
a.createInverse = function(c) {
var d = c._m;
c = d[0];
var e = d[1], f = d[2], k = d[3], h = d[4], l = d[5], m = d[6], n = d[7], p = d[8], q = d[9], s = d[10], t = d[11], u = d[12], v = d[13], E = d[14], d = d[15], F = s * d, I = E * t, G = m * d, Z = E * n, Q = m * t, S = s * n, O = f * d, P = E * k, V = f * t, $ = s * k, W = f * n, x = m * k, ea = p * v, Y = u * q, R = h * v, U = u * l, ba = h * q, X = p * l, ga = c * v, ja = u * e, aa = c * q, ia = p * e, T = c * l, da = h * e, fa = F * l + Z * q + Q * v - (I * l + G * q + S * v), la = I *
e + O * q + $ * v - (F * e + P * q + V * v), v = G * e + P * l + W * v - (Z * e + O * l + x * v), e = S * e + V * l + x * q - (Q * e + $ * l + W * q), l = 1 / (c * fa + h * la + p * v + u * e);
return new a([l * fa, l * la, l * v, l * e, l * (I * h + G * p + S * u - (F * h + Z * p + Q * u)), l * (F * c + P * p + V * u - (I * c + O * p + $ * u)), l * (Z * c + O * h + x * u - (G * c + P * h + W * u)), l * (Q * c + $ * h + W * p - (S * c + V * h + x * p)), l * (ea * n + U * t + ba * d - (Y * n + R * t + X * d)), l * (Y * k + ga * t + ia * d - (ea * k + ja * t + aa * d)), l * (R * k + ja * n + T * d - (U * k + ga * n + da * d)), l * (X * k + aa * n + da * t - (ba * k + ia * n + T *
t)), l * (R * s + X * E + Y * m - (ba * E + ea * m + U * s)), l * (aa * E + ea * f + ja * s - (ga * s + ia * E + Y * f)), l * (ga * m + da * E + U * f - (T * E + R * f + ja * m)), l * (T * s + ba * f + ia * m - (aa * m + da * s + X * f))]);
};
return a;
}();
a.Matrix3D = k;
k = function() {
function a(c, d, e) {
void 0 === e && (e = 7);
var f = this.size = 1 << e;
this.sizeInBits = e;
this.w = c;
this.h = d;
this.c = Math.ceil(c / f);
this.r = Math.ceil(d / f);
this.grid = [];
for (c = 0;c < this.r;c++) {
for (this.grid.push([]), d = 0;d < this.c;d++) {
this.grid[c][d] = new a.Cell(new q(d * f, c * f, f, f));
}
}
}
a.prototype.clear = function() {
for (var a = 0;a < this.r;a++) {
for (var b = 0;b < this.c;b++) {
this.grid[a][b].clear();
}
}
};
a.prototype.getBounds = function() {
return new q(0, 0, this.w, this.h);
};
a.prototype.addDirtyRectangle = function(a) {
var b = a.x >> this.sizeInBits, c = a.y >> this.sizeInBits;
if (!(b >= this.c || c >= this.r)) {
0 > b && (b = 0);
0 > c && (c = 0);
var d = this.grid[c][b];
a = a.clone();
a.snap();
if (d.region.contains(a)) {
d.bounds.isEmpty() ? d.bounds.set(a) : d.bounds.contains(a) || d.bounds.union(a);
} else {
for (var e = Math.min(this.c, Math.ceil((a.x + a.w) / this.size)) - b, f = Math.min(this.r, Math.ceil((a.y + a.h) / this.size)) - c, k = 0;k < e;k++) {
for (var h = 0;h < f;h++) {
d = this.grid[c + h][b + k], d = d.region.clone(), d.intersect(a), d.isEmpty() || this.addDirtyRectangle(d);
}
}
}
}
};
a.prototype.gatherRegions = function(a) {
for (var b = 0;b < this.r;b++) {
for (var c = 0;c < this.c;c++) {
this.grid[b][c].bounds.isEmpty() || a.push(this.grid[b][c].bounds);
}
}
};
a.prototype.gatherOptimizedRegions = function(a) {
this.gatherRegions(a);
};
a.prototype.getDirtyRatio = function() {
var a = this.w * this.h;
if (0 === a) {
return 0;
}
for (var b = 0, c = 0;c < this.r;c++) {
for (var d = 0;d < this.c;d++) {
b += this.grid[c][d].region.area();
}
}
return b / a;
};
a.prototype.render = function(a, b) {
function c(b) {
a.rect(b.x, b.y, b.w, b.h);
}
if (b && b.drawGrid) {
a.strokeStyle = "white";
for (var d = 0;d < this.r;d++) {
for (var e = 0;e < this.c;e++) {
var f = this.grid[d][e];
a.beginPath();
c(f.region);
a.closePath();
a.stroke();
}
}
}
a.strokeStyle = "#E0F8D8";
for (d = 0;d < this.r;d++) {
for (e = 0;e < this.c;e++) {
f = this.grid[d][e], a.beginPath(), c(f.bounds), a.closePath(), a.stroke();
}
}
};
a.tmpRectangle = q.createEmpty();
return a;
}();
a.DirtyRegion = k;
(function(a) {
var c = function() {
function a(b) {
this.region = b;
this.bounds = q.createEmpty();
}
a.prototype.clear = function() {
this.bounds.setEmpty();
};
return a;
}();
a.Cell = c;
})(k = a.DirtyRegion || (a.DirtyRegion = {}));
var f = function() {
function a(b, c, d, e, f, k) {
this.index = b;
this.x = c;
this.y = d;
this.scale = k;
this.bounds = new q(c * e, d * f, e, f);
}
a.prototype.getOBB = function() {
if (this._obb) {
return this._obb;
}
this.bounds.getCorners(a.corners);
return this._obb = new n(a.corners);
};
a.corners = m.createEmptyPoints(4);
return a;
}();
a.Tile = f;
var d = function() {
function a(b, c, d, k, h) {
this.tileW = d;
this.tileH = k;
this.scale = h;
this.w = b;
this.h = c;
this.rows = Math.ceil(c / k);
this.columns = Math.ceil(b / d);
e(2048 > this.rows && 2048 > this.columns);
this.tiles = [];
for (c = b = 0;c < this.rows;c++) {
for (var l = 0;l < this.columns;l++) {
this.tiles.push(new f(b++, l, c, d, k, h));
}
}
}
a.prototype.getTiles = function(a, b) {
if (b.emptyArea(a)) {
return[];
}
if (b.infiniteArea(a)) {
return this.tiles;
}
var c = this.columns * this.rows;
return 40 > c && b.isScaleOrRotation() ? this.getFewTiles(a, b, 10 < c) : this.getManyTiles(a, b);
};
a.prototype.getFewTiles = function(c, d, e) {
void 0 === e && (e = !0);
if (d.isTranslationOnly() && 1 === this.tiles.length) {
return this.tiles[0].bounds.intersectsTranslated(c, d.tx, d.ty) ? [this.tiles[0]] : [];
}
d.transformRectangle(c, a._points);
var f;
c = new q(0, 0, this.w, this.h);
e && (f = new n(a._points));
c.intersect(n.getBounds(a._points));
if (c.isEmpty()) {
return[];
}
var k = c.x / this.tileW | 0;
d = c.y / this.tileH | 0;
var h = Math.ceil((c.x + c.w) / this.tileW) | 0, l = Math.ceil((c.y + c.h) / this.tileH) | 0, k = p(k, 0, this.columns), h = p(h, 0, this.columns);
d = p(d, 0, this.rows);
for (var l = p(l, 0, this.rows), m = [];k < h;k++) {
for (var s = d;s < l;s++) {
var t = this.tiles[s * this.columns + k];
t.bounds.intersects(c) && (e ? t.getOBB().intersects(f) : 1) && m.push(t);
}
}
return m;
};
a.prototype.getManyTiles = function(c, d) {
function e(a, b, c) {
return(a - b.x) * (c.y - b.y) / (c.x - b.x) + b.y;
}
function f(a, b, c, d, e) {
if (!(0 > c || c >= b.columns)) {
for (d = p(d, 0, b.rows), e = p(e + 1, 0, b.rows);d < e;d++) {
a.push(b.tiles[d * b.columns + c]);
}
}
}
var k = a._points;
d.transformRectangle(c, k);
for (var h = k[0].x < k[1].x ? 0 : 1, l = k[2].x < k[3].x ? 2 : 3, l = k[h].x < k[l].x ? h : l, h = [], m = 0;5 > m;m++, l++) {
h.push(k[l % 4]);
}
(h[1].x - h[0].x) * (h[3].y - h[0].y) < (h[1].y - h[0].y) * (h[3].x - h[0].x) && (k = h[1], h[1] = h[3], h[3] = k);
var k = [], n, q, l = Math.floor(h[0].x / this.tileW), m = (l + 1) * this.tileW;
if (h[2].x < m) {
n = Math.min(h[0].y, h[1].y, h[2].y, h[3].y);
q = Math.max(h[0].y, h[1].y, h[2].y, h[3].y);
var s = Math.floor(n / this.tileH), t = Math.floor(q / this.tileH);
f(k, this, l, s, t);
return k;
}
var u = 0, v = 4, C = !1;
if (h[0].x === h[1].x || h[0].x === h[3].x) {
h[0].x === h[1].x ? (C = !0, u++) : v--, n = e(m, h[u], h[u + 1]), q = e(m, h[v], h[v - 1]), s = Math.floor(h[u].y / this.tileH), t = Math.floor(h[v].y / this.tileH), f(k, this, l, s, t), l++;
}
do {
var E, F, I, G;
h[u + 1].x < m ? (E = h[u + 1].y, I = !0) : (E = e(m, h[u], h[u + 1]), I = !1);
h[v - 1].x < m ? (F = h[v - 1].y, G = !0) : (F = e(m, h[v], h[v - 1]), G = !1);
s = Math.floor((h[u].y < h[u + 1].y ? n : E) / this.tileH);
t = Math.floor((h[v].y > h[v - 1].y ? q : F) / this.tileH);
f(k, this, l, s, t);
if (I && C) {
break;
}
I ? (C = !0, u++, n = e(m, h[u], h[u + 1])) : n = E;
G ? (v--, q = e(m, h[v], h[v - 1])) : q = F;
l++;
m = (l + 1) * this.tileW;
} while (u < v);
return k;
};
a._points = m.createEmptyPoints(4);
return a;
}();
a.TileCache = d;
k = function() {
function a(b, c, d) {
this._cacheLevels = [];
this._source = b;
this._tileSize = c;
this._minUntiledSize = d;
}
a.prototype._getTilesAtScale = function(a, b, c) {
var f = Math.max(b.getAbsoluteScaleX(), b.getAbsoluteScaleY()), k = 0;
1 !== f && (k = p(Math.round(Math.log(1 / f) / Math.LN2), -5, 3));
f = u(k);
if (this._source.hasFlags(1048576)) {
for (;;) {
f = u(k);
if (c.contains(this._source.getBounds().getAbsoluteBounds().clone().scale(f, f))) {
break;
}
k--;
e(-5 <= k);
}
}
this._source.hasFlags(2097152) || (k = p(k, -5, 0));
f = u(k);
c = 5 + k;
k = this._cacheLevels[c];
if (!k) {
var k = this._source.getBounds().getAbsoluteBounds().clone().scale(f, f), h, l;
this._source.hasFlags(1048576) || !this._source.hasFlags(4194304) || Math.max(k.w, k.h) <= this._minUntiledSize ? (h = k.w, l = k.h) : h = l = this._tileSize;
k = this._cacheLevels[c] = new d(k.w, k.h, h, l, f);
}
return k.getTiles(a, b.scaleClone(f, f));
};
a.prototype.fetchTiles = function(a, b, c, d) {
var e = new q(0, 0, c.canvas.width, c.canvas.height);
a = this._getTilesAtScale(a, b, e);
var f;
b = this._source;
for (var k = 0;k < a.length;k++) {
var h = a[k];
h.cachedSurfaceRegion && h.cachedSurfaceRegion.surface && !b.hasFlags(1048592) || (f || (f = []), f.push(h));
}
f && this._cacheTiles(c, f, d, e);
b.removeFlags(16);
return a;
};
a.prototype._getTileBounds = function(a) {
for (var b = q.createEmpty(), c = 0;c < a.length;c++) {
b.union(a[c].bounds);
}
return b;
};
a.prototype._cacheTiles = function(a, b, c, d, f) {
void 0 === f && (f = 4);
e(0 < f, "Infinite recursion is likely.");
var k = this._getTileBounds(b);
a.save();
a.setTransform(1, 0, 0, 1, 0, 0);
a.clearRect(0, 0, d.w, d.h);
a.translate(-k.x, -k.y);
a.scale(b[0].scale, b[0].scale);
var l = this._source.getBounds();
a.translate(-l.x, -l.y);
2 <= h.traceLevel && h.writer && h.writer.writeLn("Rendering Tiles: " + k);
this._source.render(a, 0);
a.restore();
for (var l = null, m = 0;m < b.length;m++) {
var n = b[m], p = n.bounds.clone();
p.x -= k.x;
p.y -= k.y;
d.contains(p) || (l || (l = []), l.push(n));
n.cachedSurfaceRegion = c(n.cachedSurfaceRegion, a, p);
}
l && (2 <= l.length ? (b = l.slice(0, l.length / 2 | 0), k = l.slice(b.length), this._cacheTiles(a, b, c, d, f - 1), this._cacheTiles(a, k, c, d, f - 1)) : this._cacheTiles(a, l, c, d, f - 1));
};
return a;
}();
a.RenderableTileCache = k;
})(h.Geometry || (h.Geometry = {}));
})(c.GFX || (c.GFX = {}));
})(Shumway || (Shumway = {}));
__extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(h) {
var a = c.IntegerUtilities.roundToMultipleOfPowerOfTwo, s = c.Debug.assert, v = h.Geometry.Rectangle;
(function(c) {
var u = function(a) {
function c() {
a.apply(this, arguments);
}
__extends(c, a);
return c;
}(h.Geometry.Rectangle);
c.Region = u;
var l = function() {
function a(c, d) {
this._root = new e(0, 0, c | 0, d | 0, !1);
}
a.prototype.allocate = function(a, c) {
a = Math.ceil(a);
c = Math.ceil(c);
s(0 < a && 0 < c);
var b = this._root.insert(a, c);
b && (b.allocator = this, b.allocated = !0);
return b;
};
a.prototype.free = function(a) {
s(a.allocator === this);
a.clear();
a.allocated = !1;
};
a.RANDOM_ORIENTATION = !0;
a.MAX_DEPTH = 256;
return a;
}();
c.CompactAllocator = l;
var e = function(a) {
function c(d, b, e, f, h) {
a.call(this, d, b, e, f);
this._children = null;
this._horizontal = h;
this.allocated = !1;
}
__extends(c, a);
c.prototype.clear = function() {
this._children = null;
this.allocated = !1;
};
c.prototype.insert = function(a, b) {
return this._insert(a, b, 0);
};
c.prototype._insert = function(a, b, e) {
if (!(e > l.MAX_DEPTH || this.allocated || this.w < a || this.h < b)) {
if (this._children) {
var k;
if ((k = this._children[0]._insert(a, b, e + 1)) || (k = this._children[1]._insert(a, b, e + 1))) {
return k;
}
} else {
return k = !this._horizontal, l.RANDOM_ORIENTATION && (k = .5 <= Math.random()), this._children = this._horizontal ? [new c(this.x, this.y, this.w, b, !1), new c(this.x, this.y + b, this.w, this.h - b, k)] : [new c(this.x, this.y, a, this.h, !0), new c(this.x + a, this.y, this.w - a, this.h, k)], k = this._children[0], k.w === a && k.h === b ? (k.allocated = !0, k) : this._insert(a, b, e + 1);
}
}
};
return c;
}(c.Region), m = function() {
function a(c, d, b, e) {
this._columns = c / b | 0;
this._rows = d / e | 0;
this._sizeW = b;
this._sizeH = e;
this._freeList = [];
this._index = 0;
this._total = this._columns * this._rows;
}
a.prototype.allocate = function(a, c) {
a = Math.ceil(a);
c = Math.ceil(c);
s(0 < a && 0 < c);
var b = this._sizeW, e = this._sizeH;
if (a > b || c > e) {
return null;
}
var k = this._freeList, h = this._index;
return 0 < k.length ? (b = k.pop(), s(!1 === b.allocated), b.w = a, b.h = c, b.allocated = !0, b) : h < this._total ? (k = h / this._columns | 0, b = new t((h - k * this._columns) * b, k * e, a, c), b.index = h, b.allocator = this, b.allocated = !0, this._index++, b) : null;
};
a.prototype.free = function(a) {
s(a.allocator === this);
a.allocated = !1;
this._freeList.push(a);
};
return a;
}();
c.GridAllocator = m;
var t = function(a) {
function c(d, b, e, f) {
a.call(this, d, b, e, f);
this.index = -1;
}
__extends(c, a);
return c;
}(c.Region);
c.GridCell = t;
var q = function() {
return function(a, c, d) {
this.size = a;
this.region = c;
this.allocator = d;
};
}(), n = function(a) {
function c(d, b, e, f, h) {
a.call(this, d, b, e, f);
this.region = h;
}
__extends(c, a);
return c;
}(c.Region);
c.BucketCell = n;
u = function() {
function c(a, d) {
s(0 < a && 0 < d);
this._buckets = [];
this._w = a | 0;
this._h = d | 0;
this._filled = 0;
}
c.prototype.allocate = function(c, d) {
c = Math.ceil(c);
d = Math.ceil(d);
s(0 < c && 0 < d);
var b = Math.max(c, d);
if (c > this._w || d > this._h) {
return null;
}
var e = null, k, h = this._buckets;
do {
for (var l = 0;l < h.length && !(h[l].size >= b && (k = h[l], e = k.allocator.allocate(c, d)));l++) {
}
if (!e) {
var p = this._h - this._filled;
if (p < d) {
return null;
}
var l = a(b, 8), t = 2 * l;
t > p && (t = p);
if (t < l) {
return null;
}
p = new v(0, this._filled, this._w, t);
this._buckets.push(new q(l, p, new m(p.w, p.h, l, l)));
this._filled += t;
}
} while (!e);
return new n(k.region.x + e.x, k.region.y + e.y, e.w, e.h, e);
};
c.prototype.free = function(a) {
a.region.allocator.free(a.region);
};
return c;
}();
c.BucketAllocator = u;
})(h.RegionAllocator || (h.RegionAllocator = {}));
(function(a) {
var c = function() {
function a(c) {
this._createSurface = c;
this._surfaces = [];
}
Object.defineProperty(a.prototype, "surfaces", {get:function() {
return this._surfaces;
}, enumerable:!0, configurable:!0});
a.prototype._createNewSurface = function(a, c) {
var h = this._createSurface(a, c);
this._surfaces.push(h);
return h;
};
a.prototype.addSurface = function(a) {
this._surfaces.push(a);
};
a.prototype.allocate = function(a, c) {
for (var h = 0;h < this._surfaces.length;h++) {
var l = this._surfaces[h].allocate(a, c);
if (l) {
return l;
}
}
return this._createNewSurface(a, c).allocate(a, c);
};
a.prototype.free = function(a) {
};
return a;
}();
a.SimpleAllocator = c;
})(h.SurfaceRegionAllocator || (h.SurfaceRegionAllocator = {}));
})(c.GFX || (c.GFX = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
var a = h.Geometry.Rectangle, s = h.Geometry.Matrix, v = h.Geometry.DirtyRegion, p = c.Debug.assert;
(function(a) {
a[a.Normal = 1] = "Normal";
a[a.Layer = 2] = "Layer";
a[a.Multiply = 3] = "Multiply";
a[a.Screen = 4] = "Screen";
a[a.Lighten = 5] = "Lighten";
a[a.Darken = 6] = "Darken";
a[a.Difference = 7] = "Difference";
a[a.Add = 8] = "Add";
a[a.Subtract = 9] = "Subtract";
a[a.Invert = 10] = "Invert";
a[a.Alpha = 11] = "Alpha";
a[a.Erase = 12] = "Erase";
a[a.Overlay = 13] = "Overlay";
a[a.HardLight = 14] = "HardLight";
})(h.BlendMode || (h.BlendMode = {}));
var u = h.BlendMode;
(function(a) {
a[a.None = 0] = "None";
a[a.BoundsAutoCompute = 2] = "BoundsAutoCompute";
a[a.IsMask = 4] = "IsMask";
a[a.Dirty = 16] = "Dirty";
a[a.InvalidBounds = 256] = "InvalidBounds";
a[a.InvalidConcatenatedMatrix = 512] = "InvalidConcatenatedMatrix";
a[a.InvalidInvertedConcatenatedMatrix = 1024] = "InvalidInvertedConcatenatedMatrix";
a[a.InvalidConcatenatedColorMatrix = 2048] = "InvalidConcatenatedColorMatrix";
a[a.UpOnAddedOrRemoved = a.InvalidBounds | a.Dirty] = "UpOnAddedOrRemoved";
a[a.UpOnMoved = a.InvalidBounds | a.Dirty] = "UpOnMoved";
a[a.DownOnAddedOrRemoved = a.InvalidConcatenatedMatrix | a.InvalidInvertedConcatenatedMatrix | a.InvalidConcatenatedColorMatrix] = "DownOnAddedOrRemoved";
a[a.DownOnMoved = a.InvalidConcatenatedMatrix | a.InvalidInvertedConcatenatedMatrix | a.InvalidConcatenatedColorMatrix] = "DownOnMoved";
a[a.UpOnColorMatrixChanged = a.Dirty] = "UpOnColorMatrixChanged";
a[a.DownOnColorMatrixChanged = a.InvalidConcatenatedColorMatrix] = "DownOnColorMatrixChanged";
a[a.Visible = 65536] = "Visible";
a[a.UpOnInvalidate = a.InvalidBounds | a.Dirty] = "UpOnInvalidate";
a[a.Default = a.BoundsAutoCompute | a.InvalidBounds | a.InvalidConcatenatedMatrix | a.InvalidInvertedConcatenatedMatrix | a.Visible] = "Default";
a[a.CacheAsBitmap = 131072] = "CacheAsBitmap";
a[a.PixelSnapping = 262144] = "PixelSnapping";
a[a.ImageSmoothing = 524288] = "ImageSmoothing";
a[a.Dynamic = 1048576] = "Dynamic";
a[a.Scalable = 2097152] = "Scalable";
a[a.Tileable = 4194304] = "Tileable";
a[a.Transparent = 32768] = "Transparent";
})(h.NodeFlags || (h.NodeFlags = {}));
var l = h.NodeFlags;
(function(a) {
a[a.Node = 1] = "Node";
a[a.Shape = 3] = "Shape";
a[a.Group = 5] = "Group";
a[a.Stage = 13] = "Stage";
a[a.Renderable = 33] = "Renderable";
})(h.NodeType || (h.NodeType = {}));
var e = h.NodeType;
(function(a) {
a[a.None = 0] = "None";
a[a.OnStageBoundsChanged = 1] = "OnStageBoundsChanged";
})(h.NodeEventType || (h.NodeEventType = {}));
var m = function() {
function a() {
}
a.prototype.visitNode = function(a, b) {
};
a.prototype.visitShape = function(a, b) {
this.visitNode(a, b);
};
a.prototype.visitGroup = function(a, b) {
this.visitNode(a, b);
for (var c = a.getChildren(), d = 0;d < c.length;d++) {
c[d].visit(this, b);
}
};
a.prototype.visitStage = function(a, b) {
this.visitGroup(a, b);
};
a.prototype.visitRenderable = function(a, b) {
this.visitNode(a, b);
};
return a;
}();
h.NodeVisitor = m;
var t = function() {
return function() {
};
}();
h.State = t;
var q = function(a) {
function b() {
a.call(this);
this.matrix = s.createIdentity();
}
__extends(b, a);
b.prototype.transform = function(a) {
var b = this.clone();
b.matrix.preMultiply(a.getMatrix());
return b;
};
b.allocate = function() {
var a = b._dirtyStack, c = null;
a.length && (c = a.pop());
return c;
};
b.prototype.clone = function() {
var a = b.allocate();
a || (a = new b);
a.set(this);
return a;
};
b.prototype.set = function(a) {
this.matrix.set(a.matrix);
};
b.prototype.free = function() {
b._dirtyStack.push(this);
};
b._dirtyStack = [];
return b;
}(t);
h.MatrixState = q;
var n = function(a) {
function b() {
a.apply(this, arguments);
this.isDirty = !0;
}
__extends(b, a);
b.prototype.start = function(a, b) {
this._dirtyRegion = b;
var c = new q;
c.matrix.setIdentity();
a.visit(this, c);
c.free();
};
b.prototype.visitGroup = function(a, b) {
var c = a.getChildren();
this.visitNode(a, b);
for (var d = 0;d < c.length;d++) {
var e = c[d], f = b.transform(e.getTransform());
e.visit(this, f);
f.free();
}
};
b.prototype.visitNode = function(a, b) {
a.hasFlags(16) && (this.isDirty = !0);
a.toggleFlags();
};
return b;
}(m);
h.DirtyNodeVisitor = n;
t = function(a) {
function b(c) {
a.call(this);
this.writer = c;
}
__extends(b, a);
b.prototype.visitNode = function(a, b) {
};
b.prototype.visitShape = function(a, b) {
this.writer.writeLn(a.toString());
this.visitNode(a, b);
};
b.prototype.visitGroup = function(a, b) {
this.visitNode(a, b);
var c = a.getChildren();
this.writer.enter(a.toString() + " " + c.length);
for (var d = 0;d < c.length;d++) {
c[d].visit(this, b);
}
this.writer.outdent();
};
b.prototype.visitStage = function(a, b) {
this.visitGroup(a, b);
};
return b;
}(m);
h.TracingNodeVisitor = t;
var k = function() {
function f() {
this._clip = -1;
this._eventListeners = null;
this._id = f._nextId++;
this._type = 1;
this._index = -1;
this._parent = null;
this.reset();
}
Object.defineProperty(f.prototype, "id", {get:function() {
return this._id;
}, enumerable:!0, configurable:!0});
f.prototype._dispatchEvent = function() {
if (this._eventListeners) {
for (var a = this._eventListeners, b = 0;b < a.length;b++) {
var c = a[b];
1 === c.type && c.listener(this, 1);
}
}
};
f.prototype.addEventListener = function(a, b) {
this._eventListeners || (this._eventListeners = []);
this._eventListeners.push({type:a, listener:b});
};
Object.defineProperty(f.prototype, "properties", {get:function() {
return this._properties || (this._properties = {});
}, enumerable:!0, configurable:!0});
f.prototype.reset = function() {
this._flags = l.Default;
this._properties = this._transform = this._layer = this._bounds = null;
};
Object.defineProperty(f.prototype, "clip", {get:function() {
return this._clip;
}, set:function(a) {
this._clip = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(f.prototype, "parent", {get:function() {
return this._parent;
}, enumerable:!0, configurable:!0});
f.prototype.getTransformedBounds = function(a) {
var b = this.getBounds(!0);
if (a !== this && !b.isEmpty()) {
var c = this.getTransform().getConcatenatedMatrix();
a ? (a = a.getTransform().getInvertedConcatenatedMatrix(), a.preMultiply(c), a.transformRectangleAABB(b), a.free()) : c.transformRectangleAABB(b);
}
return b;
};
f.prototype._markCurrentBoundsAsDirtyRegion = function() {
};
f.prototype.getStage = function(a) {
void 0 === a && (a = !0);
for (var b = this._parent;b;) {
if (b.isType(13)) {
var c = b;
if (a) {
if (c.dirtyRegion) {
return c;
}
} else {
return c;
}
}
b = b._parent;
}
return null;
};
f.prototype.getChildren = function(a) {
throw c.Debug.abstractMethod("Node::getChildren");
};
f.prototype.getBounds = function(a) {
throw c.Debug.abstractMethod("Node::getBounds");
};
f.prototype.setBounds = function(b) {
p(!(this._flags & 2));
(this._bounds || (this._bounds = a.createEmpty())).set(b);
this.removeFlags(256);
};
f.prototype.clone = function() {
throw c.Debug.abstractMethod("Node::clone");
};
f.prototype.setFlags = function(a) {
this._flags |= a;
};
f.prototype.hasFlags = function(a) {
return(this._flags & a) === a;
};
f.prototype.hasAnyFlags = function(a) {
return!!(this._flags & a);
};
f.prototype.removeFlags = function(a) {
this._flags &= ~a;
};
f.prototype.toggleFlags = function() {
this._flags &= -17;
};
f.prototype._propagateFlagsUp = function(a) {
if (0 !== a && !this.hasFlags(a)) {
this.hasFlags(2) || (a &= -257);
this.setFlags(a);
var b = this._parent;
b && b._propagateFlagsUp(a);
}
};
f.prototype._propagateFlagsDown = function(a) {
throw c.Debug.abstractMethod("Node::_propagateFlagsDown");
};
f.prototype.isAncestor = function(a) {
for (;a;) {
if (a === this) {
return!0;
}
p(a !== a._parent);
a = a._parent;
}
return!1;
};
f._getAncestors = function(a, b) {
var c = f._path;
for (c.length = 0;a && a !== b;) {
p(a !== a._parent), c.push(a), a = a._parent;
}
p(a === b, "Last ancestor is not an ancestor.");
return c;
};
f.prototype._findClosestAncestor = function() {
for (var a = this;a;) {
if (!1 === a.hasFlags(512)) {
return a;
}
p(a !== a._parent);
a = a._parent;
}
return null;
};
f.prototype.isType = function(a) {
return this._type === a;
};
f.prototype.isTypeOf = function(a) {
return(this._type & a) === a;
};
f.prototype.isLeaf = function() {
return this.isType(33) || this.isType(3);
};
f.prototype.isLinear = function() {
if (this.isLeaf()) {
return!0;
}
if (this.isType(5)) {
var a = this._children;
if (1 === a.length && a[0].isLinear()) {
return!0;
}
}
return!1;
};
f.prototype.getTransformMatrix = function() {
var a;
void 0 === a && (a = !1);
return this.getTransform().getMatrix(a);
};
f.prototype.getTransform = function() {
null === this._transform && (this._transform = new d(this));
return this._transform;
};
f.prototype.getLayer = function() {
null === this._layer && (this._layer = new b(this));
return this._layer;
};
f.prototype.visit = function(a, b) {
switch(this._type) {
case 1:
a.visitNode(this, b);
break;
case 5:
a.visitGroup(this, b);
break;
case 13:
a.visitStage(this, b);
break;
case 3:
a.visitShape(this, b);
break;
case 33:
a.visitRenderable(this, b);
break;
default:
c.Debug.unexpectedCase();
}
};
f.prototype.invalidate = function() {
this._propagateFlagsUp(l.UpOnInvalidate);
};
f.prototype.toString = function(a) {
void 0 === a && (a = !1);
var b = e[this._type] + " " + this._id;
a && (b += " " + this._bounds.toString());
return b;
};
f._path = [];
f._nextId = 0;
return f;
}();
h.Node = k;
var f = function(b) {
function c() {
b.call(this);
this._type = 5;
this._children = [];
}
__extends(c, b);
c.prototype.getChildren = function(a) {
void 0 === a && (a = !1);
return a ? this._children.slice(0) : this._children;
};
c.prototype.childAt = function(a) {
p(0 <= a && a < this._children.length);
return this._children[a];
};
Object.defineProperty(c.prototype, "child", {get:function() {
p(1 === this._children.length);
return this._children[0];
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "groupChild", {get:function() {
p(1 === this._children.length);
p(this._children[0] instanceof c);
return this._children[0];
}, enumerable:!0, configurable:!0});
c.prototype.addChild = function(a) {
p(a);
p(!a.isAncestor(this));
a._parent && a._parent.removeChildAt(a._index);
a._parent = this;
a._index = this._children.length;
this._children.push(a);
this._propagateFlagsUp(l.UpOnAddedOrRemoved);
a._propagateFlagsDown(l.DownOnAddedOrRemoved);
};
c.prototype.removeChildAt = function(a) {
p(0 <= a && a < this._children.length);
var b = this._children[a];
p(a === b._index);
this._children.splice(a, 1);
b._index = -1;
b._parent = null;
this._propagateFlagsUp(l.UpOnAddedOrRemoved);
b._propagateFlagsDown(l.DownOnAddedOrRemoved);
};
c.prototype.clearChildren = function() {
for (var a = 0;a < this._children.length;a++) {
var b = this._children[a];
b && (b._index = -1, b._parent = null, b._propagateFlagsDown(l.DownOnAddedOrRemoved));
}
this._children.length = 0;
this._propagateFlagsUp(l.UpOnAddedOrRemoved);
};
c.prototype._propagateFlagsDown = function(a) {
if (!this.hasFlags(a)) {
this.setFlags(a);
for (var b = this._children, c = 0;c < b.length;c++) {
b[c]._propagateFlagsDown(a);
}
}
};
c.prototype.getBounds = function(b) {
void 0 === b && (b = !1);
var c = this._bounds || (this._bounds = a.createEmpty());
if (this.hasFlags(256)) {
c.setEmpty();
for (var d = this._children, e = a.allocate(), f = 0;f < d.length;f++) {
var g = d[f];
e.set(g.getBounds());
g.getTransformMatrix().transformRectangleAABB(e);
c.union(e);
}
e.free();
this.removeFlags(256);
}
return b ? c.clone() : c;
};
return c;
}(k);
h.Group = f;
var d = function() {
function a(b) {
this._node = b;
this._matrix = s.createIdentity();
this._colorMatrix = h.ColorMatrix.createIdentity();
this._concatenatedMatrix = s.createIdentity();
this._invertedConcatenatedMatrix = s.createIdentity();
this._concatenatedColorMatrix = h.ColorMatrix.createIdentity();
}
a.prototype.setMatrix = function(a) {
this._matrix.isEqual(a) || (this._matrix.set(a), this._node._propagateFlagsUp(l.UpOnMoved), this._node._propagateFlagsDown(l.DownOnMoved));
};
a.prototype.setColorMatrix = function(a) {
this._colorMatrix.set(a);
this._node._propagateFlagsUp(l.UpOnColorMatrixChanged);
this._node._propagateFlagsDown(l.DownOnColorMatrixChanged);
};
a.prototype.getMatrix = function(a) {
void 0 === a && (a = !1);
return a ? this._matrix.clone() : this._matrix;
};
a.prototype.hasColorMatrix = function() {
return null !== this._colorMatrix;
};
a.prototype.getColorMatrix = function(a) {
void 0 === a && (a = !1);
null === this._colorMatrix && (this._colorMatrix = h.ColorMatrix.createIdentity());
return a ? this._colorMatrix.clone() : this._colorMatrix;
};
a.prototype.getConcatenatedMatrix = function() {
var a;
void 0 === a && (a = !1);
if (this._node.hasFlags(512)) {
for (var b = this._node._findClosestAncestor(), c = k._getAncestors(this._node, b), d = b ? b.getTransform()._concatenatedMatrix.clone() : s.createIdentity(), e = c.length - 1;0 <= e;e--) {
var b = c[e], f = b.getTransform();
p(b.hasFlags(512));
d.preMultiply(f._matrix);
f._concatenatedMatrix.set(d);
b.removeFlags(512);
}
}
return a ? this._concatenatedMatrix.clone() : this._concatenatedMatrix;
};
a.prototype.getInvertedConcatenatedMatrix = function() {
var a = !0;
void 0 === a && (a = !1);
this._node.hasFlags(1024) && (this.getConcatenatedMatrix().inverse(this._invertedConcatenatedMatrix), this._node.removeFlags(1024));
return a ? this._invertedConcatenatedMatrix.clone() : this._invertedConcatenatedMatrix;
};
a.prototype.toString = function() {
return this._matrix.toString();
};
return a;
}();
h.Transform = d;
var b = function() {
function a(b) {
this._node = b;
this._mask = null;
this._blendMode = 1;
}
Object.defineProperty(a.prototype, "filters", {get:function() {
return this._filters;
}, set:function(a) {
this._filters = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "blendMode", {get:function() {
return this._blendMode;
}, set:function(a) {
this._blendMode = a;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "mask", {get:function() {
return this._mask;
}, set:function(a) {
this._mask && this._mask !== a && this._mask.removeFlags(4);
(this._mask = a) && this._mask.setFlags(4);
}, enumerable:!0, configurable:!0});
a.prototype.toString = function() {
return u[this._blendMode];
};
return a;
}();
h.Layer = b;
t = function(b) {
function c(a) {
b.call(this);
p(a);
this._source = a;
this._type = 3;
this.ratio = 0;
}
__extends(c, b);
c.prototype.getBounds = function(b) {
void 0 === b && (b = !1);
var c = this._bounds || (this._bounds = a.createEmpty());
this.hasFlags(256) && (c.set(this._source.getBounds()), this.removeFlags(256));
return b ? c.clone() : c;
};
Object.defineProperty(c.prototype, "source", {get:function() {
return this._source;
}, enumerable:!0, configurable:!0});
c.prototype._propagateFlagsDown = function(a) {
this.setFlags(a);
};
c.prototype.getChildren = function(a) {
return[this._source];
};
return c;
}(k);
h.Shape = t;
h.RendererOptions = function() {
return function() {
this.debug = !1;
this.paintRenderable = !0;
this.paintViewport = this.paintFlashing = this.paintDirtyRegion = this.paintBounds = !1;
this.clear = !0;
};
}();
(function(a) {
a[a.Canvas2D = 0] = "Canvas2D";
a[a.WebGL = 1] = "WebGL";
a[a.Both = 2] = "Both";
a[a.DOM = 3] = "DOM";
a[a.SVG = 4] = "SVG";
})(h.Backend || (h.Backend = {}));
m = function(b) {
function d(c, e, f) {
b.call(this);
this._container = c;
this._stage = e;
this._options = f;
this._viewport = a.createSquare();
this._devicePixelRatio = 1;
}
__extends(d, b);
Object.defineProperty(d.prototype, "viewport", {set:function(a) {
this._viewport.set(a);
}, enumerable:!0, configurable:!0});
d.prototype.render = function() {
throw c.Debug.abstractMethod("Renderer::render");
};
d.prototype.resize = function() {
throw c.Debug.abstractMethod("Renderer::resize");
};
d.prototype.screenShot = function(a, b) {
throw c.Debug.abstractMethod("Renderer::screenShot");
};
return d;
}(m);
h.Renderer = m;
m = function(b) {
function c(d, e, k) {
void 0 === k && (k = !1);
b.call(this);
this._dirtyVisitor = new n;
this._flags &= -3;
this._type = 13;
this._scaleMode = c.DEFAULT_SCALE;
this._align = c.DEFAULT_ALIGN;
this._content = new f;
this._content._flags &= -3;
this.addChild(this._content);
this.setFlags(16);
this.setBounds(new a(0, 0, d, e));
k ? (this._dirtyRegion = new v(d, e), this._dirtyRegion.addDirtyRectangle(new a(0, 0, d, e))) : this._dirtyRegion = null;
this._updateContentMatrix();
}
__extends(c, b);
Object.defineProperty(c.prototype, "dirtyRegion", {get:function() {
return this._dirtyRegion;
}, enumerable:!0, configurable:!0});
c.prototype.setBounds = function(a) {
b.prototype.setBounds.call(this, a);
this._updateContentMatrix();
this._dispatchEvent();
this._dirtyRegion && (this._dirtyRegion = new v(a.w, a.h), this._dirtyRegion.addDirtyRectangle(a));
};
Object.defineProperty(c.prototype, "content", {get:function() {
return this._content;
}, enumerable:!0, configurable:!0});
c.prototype.readyToRender = function() {
this._dirtyVisitor.isDirty = !1;
this._dirtyVisitor.start(this, this._dirtyRegion);
return this._dirtyVisitor.isDirty ? !0 : !1;
};
Object.defineProperty(c.prototype, "align", {get:function() {
return this._align;
}, set:function(a) {
this._align = a;
this._updateContentMatrix();
}, enumerable:!0, configurable:!0});
Object.defineProperty(c.prototype, "scaleMode", {get:function() {
return this._scaleMode;
}, set:function(a) {
this._scaleMode = a;
this._updateContentMatrix();
}, enumerable:!0, configurable:!0});
c.prototype._updateContentMatrix = function() {
if (this._scaleMode === c.DEFAULT_SCALE && this._align === c.DEFAULT_ALIGN) {
this._content.getTransform().setMatrix(new s(1, 0, 0, 1, 0, 0));
} else {
var a = this.getBounds(), b = this._content.getBounds(), d = a.w / b.w, e = a.h / b.h;
switch(this._scaleMode) {
case 2:
d = e = Math.max(d, e);
break;
case 4:
d = e = 1;
break;
case 1:
break;
default:
d = e = Math.min(d, e);
}
var f;
f = this._align & 4 ? 0 : this._align & 8 ? a.w - b.w * d : (a.w - b.w * d) / 2;
a = this._align & 1 ? 0 : this._align & 2 ? a.h - b.h * e : (a.h - b.h * e) / 2;
this._content.getTransform().setMatrix(new s(d, 0, 0, e, f, a));
}
};
c.DEFAULT_SCALE = 4;
c.DEFAULT_ALIGN = 5;
return c;
}(f);
h.Stage = m;
})(c.GFX || (c.GFX = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
function a(a, b, c) {
return a + (b - a) * c;
}
function s(b, c, d) {
return a(b >> 24 & 255, c >> 24 & 255, d) << 24 | a(b >> 16 & 255, c >> 16 & 255, d) << 16 | a(b >> 8 & 255, c >> 8 & 255, d) << 8 | a(b & 255, c & 255, d);
}
var v = h.Geometry.Point, p = h.Geometry.Rectangle, u = h.Geometry.Matrix, l = c.Debug.assertUnreachable, e = c.Debug.assert, m = c.ArrayUtilities.indexOf, t = function(a) {
function b() {
a.call(this);
this._parents = [];
this._renderableParents = [];
this._invalidateEventListeners = null;
this._flags &= -3;
this._type = 33;
}
__extends(b, a);
b.prototype.addParent = function(a) {
e(a);
var b = m(this._parents, a);
e(0 > b);
this._parents.push(a);
};
b.prototype.addRenderableParent = function(a) {
e(a);
var b = m(this._renderableParents, a);
e(0 > b);
this._renderableParents.push(a);
};
b.prototype.wrap = function() {
for (var a, b = this._parents, c = 0;c < b.length;c++) {
if (a = b[c], !a._parent) {
return a;
}
}
a = new h.Shape(this);
this.addParent(a);
return a;
};
b.prototype.invalidate = function() {
this.setFlags(16);
for (var a = this._parents, b = 0;b < a.length;b++) {
a[b].invalidate();
}
a = this._renderableParents;
for (b = 0;b < a.length;b++) {
a[b].invalidate();
}
if (a = this._invalidateEventListeners) {
for (b = 0;b < a.length;b++) {
a[b](this);
}
}
};
b.prototype.addInvalidateEventListener = function(a) {
this._invalidateEventListeners || (this._invalidateEventListeners = []);
var b = m(this._invalidateEventListeners, a);
e(0 > b);
this._invalidateEventListeners.push(a);
};
b.prototype.getBounds = function(a) {
void 0 === a && (a = !1);
return a ? this._bounds.clone() : this._bounds;
};
b.prototype.getChildren = function(a) {
return null;
};
b.prototype._propagateFlagsUp = function(a) {
if (0 !== a && !this.hasFlags(a)) {
for (var b = 0;b < this._parents.length;b++) {
this._parents[b]._propagateFlagsUp(a);
}
}
};
b.prototype.render = function(a, b, c, d, e) {
};
return b;
}(h.Node);
h.Renderable = t;
var q = function(a) {
function b(c, d) {
a.call(this);
this.setBounds(c);
this.render = d;
}
__extends(b, a);
return b;
}(t);
h.CustomRenderable = q;
(function(a) {
a[a.Idle = 1] = "Idle";
a[a.Playing = 2] = "Playing";
a[a.Paused = 3] = "Paused";
})(h.RenderableVideoState || (h.RenderableVideoState = {}));
q = function(a) {
function b(c, d) {
a.call(this);
this._flags = 1048592;
this._lastPausedTime = this._lastTimeInvalidated = 0;
this._seekHappens = !1;
this._isDOMElement = !0;
this.setBounds(new p(0, 0, 1, 1));
this._assetId = c;
this._eventSerializer = d;
var e = document.createElement("video"), f = this._handleVideoEvent.bind(this);
e.preload = "metadata";
e.addEventListener("play", f);
e.addEventListener("ended", f);
e.addEventListener("loadeddata", f);
e.addEventListener("progress", f);
e.addEventListener("waiting", f);
e.addEventListener("loadedmetadata", f);
e.addEventListener("error", f);
e.addEventListener("seeking", f);
this._video = e;
this._videoEventHandler = f;
b._renderableVideos.push(this);
"undefined" !== typeof registerInspectorAsset && registerInspectorAsset(-1, -1, this);
this._state = 1;
}
__extends(b, a);
Object.defineProperty(b.prototype, "video", {get:function() {
return this._video;
}, enumerable:!0, configurable:!0});
Object.defineProperty(b.prototype, "state", {get:function() {
return this._state;
}, enumerable:!0, configurable:!0});
b.prototype.play = function() {
this._video.play();
this._state = 2;
};
b.prototype.pause = function() {
this._video.pause();
this._state = 3;
};
b.prototype._handleVideoEvent = function(a) {
var b = null, c = this._video;
switch(a.type) {
case "play":
a = 1;
break;
case "ended":
a = 2;
break;
case "loadeddata":
a = 3;
break;
case "progress":
a = 4;
break;
case "waiting":
a = 5;
break;
case "loadedmetadata":
a = 7;
b = {videoWidth:c.videoWidth, videoHeight:c.videoHeight, duration:c.duration};
break;
case "error":
a = 6;
b = {code:c.error.code};
break;
case "seeking":
a = 8;
this._seekHappens = !0;
break;
default:
return;
}
this._notifyNetStream(a, b);
};
b.prototype._notifyNetStream = function(a, b) {
this._eventSerializer.sendVideoPlaybackEvent(this._assetId, a, b);
};
b.prototype.processControlRequest = function(a, b) {
var c = this._video;
switch(a) {
case 1:
c.src = b.url;
this._notifyNetStream(0, null);
break;
case 2:
c && (b.paused && !c.paused ? (this._lastPausedTime = isNaN(b.time) ? c.currentTime : c.currentTime = b.time, this.pause()) : !b.paused && c.paused && (this.play(), isNaN(b.time) || this._lastPausedTime === b.time || (c.currentTime = b.time), this._seekHappens && (this._seekHappens = !1, this._notifyNetStream(3, null))));
break;
case 3:
c && (c.currentTime = b.time);
break;
case 4:
return c ? c.currentTime : 0;
case 5:
return c ? c.duration : 0;
case 6:
c && (c.volume = b.volume);
break;
case 7:
if (!c) {
return 0;
}
var d = -1;
if (c.buffered) {
for (var e = 0;e < c.buffered.length;e++) {
d = Math.max(d, c.buffered.end(e));
}
} else {
d = c.duration;
}
return Math.round(500 * d);
case 8:
return c ? Math.round(500 * c.duration) : 0;
}
};
b.prototype.checkForUpdate = function() {
this._lastTimeInvalidated !== this._video.currentTime && (this._isDOMElement || this.invalidate());
this._lastTimeInvalidated = this._video.currentTime;
};
b.checkForVideoUpdates = function() {
for (var a = b._renderableVideos, c = 0;c < a.length;c++) {
a[c].checkForUpdate();
}
};
b.prototype.render = function(a, b, c) {
h.enterTimeline("RenderableVideo.render");
(b = this._video) && 0 < b.videoWidth && a.drawImage(b, 0, 0, b.videoWidth, b.videoHeight, 0, 0, this._bounds.w, this._bounds.h);
h.leaveTimeline("RenderableVideo.render");
};
b._renderableVideos = [];
return b;
}(t);
h.RenderableVideo = q;
q = function(a) {
function b(c, d) {
a.call(this);
this._flags = 1048592;
this.properties = {};
this.setBounds(d);
c instanceof HTMLCanvasElement ? this._initializeSourceCanvas(c) : this._sourceImage = c;
}
__extends(b, a);
b.FromDataBuffer = function(a, c, d) {
h.enterTimeline("RenderableBitmap.FromDataBuffer");
var e = document.createElement("canvas");
e.width = d.w;
e.height = d.h;
d = new b(e, d);
d.updateFromDataBuffer(a, c);
h.leaveTimeline("RenderableBitmap.FromDataBuffer");
return d;
};
b.FromNode = function(a, c, d, e, f) {
h.enterTimeline("RenderableBitmap.FromFrame");
var g = document.createElement("canvas"), k = a.getBounds();
g.width = k.w;
g.height = k.h;
g = new b(g, k);
g.drawNode(a, c, d, e, f);
h.leaveTimeline("RenderableBitmap.FromFrame");
return g;
};
b.FromImage = function(a, c, d) {
return new b(a, new p(0, 0, c, d));
};
b.prototype.updateFromDataBuffer = function(a, b) {
if (h.imageUpdateOption.value) {
var d = b.buffer;
h.enterTimeline("RenderableBitmap.updateFromDataBuffer", {length:b.length});
if (4 === a || 5 === a || 6 === a) {
c.Debug.assertUnreachable("Mustn't encounter un-decoded images here");
} else {
var e = this._bounds, f = this._imageData;
f && f.width === e.w && f.height === e.h || (f = this._imageData = this._context.createImageData(e.w, e.h));
h.imageConvertOption.value && (h.enterTimeline("ColorUtilities.convertImage"), d = new Int32Array(d), e = new Int32Array(f.data.buffer), c.ColorUtilities.convertImage(a, 3, d, e), h.leaveTimeline("ColorUtilities.convertImage"));
h.enterTimeline("putImageData");
this._ensureSourceCanvas();
this._context.putImageData(f, 0, 0);
h.leaveTimeline("putImageData");
}
this.invalidate();
h.leaveTimeline("RenderableBitmap.updateFromDataBuffer");
}
};
b.prototype.readImageData = function(a) {
a.writeRawBytes(this.imageData.data);
};
b.prototype.render = function(a, b, c) {
h.enterTimeline("RenderableBitmap.render");
this.renderSource ? a.drawImage(this.renderSource, 0, 0) : this._renderFallback(a);
h.leaveTimeline("RenderableBitmap.render");
};
b.prototype.drawNode = function(a, b, c, d, e) {
h.enterTimeline("RenderableBitmap.drawFrame");
c = h.Canvas2D;
d = this.getBounds();
(new c.Canvas2DRenderer(this._canvas, null)).renderNode(a, e || d, b);
h.leaveTimeline("RenderableBitmap.drawFrame");
};
b.prototype._initializeSourceCanvas = function(a) {
this._canvas = a;
this._context = this._canvas.getContext("2d");
};
b.prototype._ensureSourceCanvas = function() {
if (!this._canvas) {
var a = document.createElement("canvas"), b = this._bounds;
a.width = b.w;
a.height = b.h;
this._initializeSourceCanvas(a);
}
};
Object.defineProperty(b.prototype, "imageData", {get:function() {
this._canvas || (e(this._sourceImage), this._ensureSourceCanvas(), this._context.drawImage(this._sourceImage, 0, 0), this._sourceImage = null);
return this._context.getImageData(0, 0, this._bounds.w, this._bounds.h);
}, enumerable:!0, configurable:!0});
Object.defineProperty(b.prototype, "renderSource", {get:function() {
return this._canvas || this._sourceImage;
}, enumerable:!0, configurable:!0});
b.prototype._renderFallback = function(a) {
this.fillStyle || (this.fillStyle = c.ColorStyle.randomStyle());
var b = this._bounds;
a.save();
a.beginPath();
a.lineWidth = 2;
a.fillStyle = this.fillStyle;
a.fillRect(b.x, b.y, b.w, b.h);
a.restore();
};
return b;
}(t);
h.RenderableBitmap = q;
(function(a) {
a[a.Fill = 0] = "Fill";
a[a.Stroke = 1] = "Stroke";
a[a.StrokeFill = 2] = "StrokeFill";
})(h.PathType || (h.PathType = {}));
var n = function() {
return function(a, b, c, d) {
this.type = a;
this.style = b;
this.smoothImage = c;
this.strokeProperties = d;
this.path = new Path2D;
e(1 === a === !!d);
};
}();
h.StyledPath = n;
var k = function() {
return function(a, b, c, d, e) {
this.thickness = a;
this.scaleMode = b;
this.capsStyle = c;
this.jointsStyle = d;
this.miterLimit = e;
};
}();
h.StrokeProperties = k;
var f = function(a) {
function b(c, d, e, f) {
a.call(this);
this._flags = 6291472;
this.properties = {};
this.setBounds(f);
this._id = c;
this._pathData = d;
this._textures = e;
e.length && this.setFlags(1048576);
}
__extends(b, a);
b.prototype.update = function(a, b, c) {
this.setBounds(c);
this._pathData = a;
this._paths = null;
this._textures = b;
this.setFlags(1048576);
this.invalidate();
};
b.prototype.render = function(a, b, c, d, f) {
void 0 === d && (d = !1);
void 0 === f && (f = !1);
a.fillStyle = a.strokeStyle = "transparent";
b = this._deserializePaths(this._pathData, a, b);
e(b);
h.enterTimeline("RenderableShape.render", this);
for (c = 0;c < b.length;c++) {
var g = b[c];
a.mozImageSmoothingEnabled = a.msImageSmoothingEnabled = a.imageSmoothingEnabled = g.smoothImage;
if (0 === g.type) {
a.fillStyle = f ? "#FF4981" : g.style, d ? a.clip(g.path, "evenodd") : a.fill(g.path, "evenodd"), a.fillStyle = "transparent";
} else {
if (!d && !f) {
a.strokeStyle = g.style;
var k = 1;
g.strokeProperties && (k = g.strokeProperties.scaleMode, a.lineWidth = g.strokeProperties.thickness, a.lineCap = g.strokeProperties.capsStyle, a.lineJoin = g.strokeProperties.jointsStyle, a.miterLimit = g.strokeProperties.miterLimit);
var l = a.lineWidth;
(l = 1 === l || 3 === l) && a.translate(.5, .5);
a.flashStroke(g.path, k);
l && a.translate(-.5, -.5);
a.strokeStyle = "transparent";
}
}
}
h.leaveTimeline("RenderableShape.render");
};
b.prototype._deserializePaths = function(a, d, f) {
e(a ? !this._paths : this._paths);
h.enterTimeline("RenderableShape.deserializePaths");
if (this._paths) {
return this._paths;
}
f = this._paths = [];
for (var g = null, m = null, n = 0, p = 0, q, s, t = !1, u = 0, v = 0, C = a.commands, E = a.coordinates, F = a.styles, I = F.position = 0, G = a.commandsPosition, Z = 0;Z < G;Z++) {
switch(q = C[Z], q) {
case 9:
e(I <= a.coordinatesPosition - 2);
t && g && (g.lineTo(u, v), m && m.lineTo(u, v));
t = !0;
n = u = E[I++] / 20;
p = v = E[I++] / 20;
g && g.moveTo(n, p);
m && m.moveTo(n, p);
break;
case 10:
e(I <= a.coordinatesPosition - 2);
n = E[I++] / 20;
p = E[I++] / 20;
g && g.lineTo(n, p);
m && m.lineTo(n, p);
break;
case 11:
e(I <= a.coordinatesPosition - 4);
q = E[I++] / 20;
s = E[I++] / 20;
n = E[I++] / 20;
p = E[I++] / 20;
g && g.quadraticCurveTo(q, s, n, p);
m && m.quadraticCurveTo(q, s, n, p);
break;
case 12:
e(I <= a.coordinatesPosition - 6);
q = E[I++] / 20;
s = E[I++] / 20;
var Q = E[I++] / 20, S = E[I++] / 20, n = E[I++] / 20, p = E[I++] / 20;
g && g.bezierCurveTo(q, s, Q, S, n, p);
m && m.bezierCurveTo(q, s, Q, S, n, p);
break;
case 1:
e(4 <= F.bytesAvailable);
g = this._createPath(0, c.ColorUtilities.rgbaToCSSStyle(F.readUnsignedInt()), !1, null, n, p);
break;
case 3:
q = this._readBitmap(F, d);
g = this._createPath(0, q.style, q.smoothImage, null, n, p);
break;
case 2:
g = this._createPath(0, this._readGradient(F, d), !1, null, n, p);
break;
case 4:
g = null;
break;
case 5:
m = c.ColorUtilities.rgbaToCSSStyle(F.readUnsignedInt());
F.position += 1;
q = F.readByte();
s = b.LINE_CAPS_STYLES[F.readByte()];
Q = b.LINE_JOINTS_STYLES[F.readByte()];
q = new k(E[I++] / 20, q, s, Q, F.readByte());
m = this._createPath(1, m, !1, q, n, p);
break;
case 6:
m = this._createPath(2, this._readGradient(F, d), !1, null, n, p);
break;
case 7:
q = this._readBitmap(F, d);
m = this._createPath(2, q.style, q.smoothImage, null, n, p);
break;
case 8:
m = null;
break;
default:
l("Invalid command " + q + " encountered at index" + Z + " of " + G);
}
}
e(0 === F.bytesAvailable);
e(Z === G);
e(I === a.coordinatesPosition);
t && g && (g.lineTo(u, v), m && m.lineTo(u, v));
this._pathData = null;
h.leaveTimeline("RenderableShape.deserializePaths");
return f;
};
b.prototype._createPath = function(a, b, c, d, e, f) {
a = new n(a, b, c, d);
this._paths.push(a);
a.path.moveTo(e, f);
return a.path;
};
b.prototype._readMatrix = function(a) {
return new u(a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat(), a.readFloat());
};
b.prototype._readGradient = function(a, b) {
e(34 <= a.bytesAvailable);
var d = a.readUnsignedByte(), f = 2 * a.readShort() / 255;
e(-1 <= f && 1 >= f);
var g = this._readMatrix(a), d = 16 === d ? b.createLinearGradient(-1, 0, 1, 0) : b.createRadialGradient(f, 0, 0, 0, 0, 1);
d.setTransform && d.setTransform(g.toSVGMatrix());
g = a.readUnsignedByte();
for (f = 0;f < g;f++) {
var k = a.readUnsignedByte() / 255, h = c.ColorUtilities.rgbaToCSSStyle(a.readUnsignedInt());
d.addColorStop(k, h);
}
a.position += 2;
return d;
};
b.prototype._readBitmap = function(a, b) {
e(30 <= a.bytesAvailable);
var c = a.readUnsignedInt(), d = this._readMatrix(a), f = a.readBoolean() ? "repeat" : "no-repeat", g = a.readBoolean();
(c = this._textures[c]) ? (f = b.createPattern(c.renderSource, f), f.setTransform(d.toSVGMatrix())) : f = null;
return{style:f, smoothImage:g};
};
b.prototype._renderFallback = function(a) {
this.fillStyle || (this.fillStyle = c.ColorStyle.randomStyle());
var b = this._bounds;
a.save();
a.beginPath();
a.lineWidth = 2;
a.fillStyle = this.fillStyle;
a.fillRect(b.x, b.y, b.w, b.h);
a.restore();
};
b.LINE_CAPS_STYLES = ["round", "butt", "square"];
b.LINE_JOINTS_STYLES = ["round", "bevel", "miter"];
return b;
}(t);
h.RenderableShape = f;
q = function(b) {
function d() {
b.apply(this, arguments);
this._flags = 7340048;
this._morphPaths = Object.create(null);
}
__extends(d, b);
d.prototype._deserializePaths = function(b, d, g) {
h.enterTimeline("RenderableMorphShape.deserializePaths");
if (this._morphPaths[g]) {
return this._morphPaths[g];
}
var m = this._morphPaths[g] = [], n = null, r = null, p = 0, q = 0, t, u, v = !1, J = 0, C = 0, E = b.commands, F = b.coordinates, I = b.morphCoordinates, G = b.styles, Z = b.morphStyles;
G.position = 0;
for (var Q = Z.position = 0, S = b.commandsPosition, O = 0;O < S;O++) {
switch(t = E[O], t) {
case 9:
e(Q <= b.coordinatesPosition - 2);
v && n && (n.lineTo(J, C), r && r.lineTo(J, C));
v = !0;
p = J = a(F[Q], I[Q++], g) / 20;
q = C = a(F[Q], I[Q++], g) / 20;
n && n.moveTo(p, q);
r && r.moveTo(p, q);
break;
case 10:
e(Q <= b.coordinatesPosition - 2);
p = a(F[Q], I[Q++], g) / 20;
q = a(F[Q], I[Q++], g) / 20;
n && n.lineTo(p, q);
r && r.lineTo(p, q);
break;
case 11:
e(Q <= b.coordinatesPosition - 4);
t = a(F[Q], I[Q++], g) / 20;
u = a(F[Q], I[Q++], g) / 20;
p = a(F[Q], I[Q++], g) / 20;
q = a(F[Q], I[Q++], g) / 20;
n && n.quadraticCurveTo(t, u, p, q);
r && r.quadraticCurveTo(t, u, p, q);
break;
case 12:
e(Q <= b.coordinatesPosition - 6);
t = a(F[Q], I[Q++], g) / 20;
u = a(F[Q], I[Q++], g) / 20;
var P = a(F[Q], I[Q++], g) / 20, V = a(F[Q], I[Q++], g) / 20, p = a(F[Q], I[Q++], g) / 20, q = a(F[Q], I[Q++], g) / 20;
n && n.bezierCurveTo(t, u, P, V, p, q);
r && r.bezierCurveTo(t, u, P, V, p, q);
break;
case 1:
e(4 <= G.bytesAvailable);
n = this._createMorphPath(0, g, c.ColorUtilities.rgbaToCSSStyle(s(G.readUnsignedInt(), Z.readUnsignedInt(), g)), !1, null, p, q);
break;
case 3:
t = this._readMorphBitmap(G, Z, g, d);
n = this._createMorphPath(0, g, t.style, t.smoothImage, null, p, q);
break;
case 2:
t = this._readMorphGradient(G, Z, g, d);
n = this._createMorphPath(0, g, t, !1, null, p, q);
break;
case 4:
n = null;
break;
case 5:
t = a(F[Q], I[Q++], g) / 20;
r = c.ColorUtilities.rgbaToCSSStyle(s(G.readUnsignedInt(), Z.readUnsignedInt(), g));
G.position += 1;
u = G.readByte();
P = f.LINE_CAPS_STYLES[G.readByte()];
V = f.LINE_JOINTS_STYLES[G.readByte()];
t = new k(t, u, P, V, G.readByte());
r = this._createMorphPath(1, g, r, !1, t, p, q);
break;
case 6:
t = this._readMorphGradient(G, Z, g, d);
r = this._createMorphPath(2, g, t, !1, null, p, q);
break;
case 7:
t = this._readMorphBitmap(G, Z, g, d);
r = this._createMorphPath(2, g, t.style, t.smoothImage, null, p, q);
break;
case 8:
r = null;
break;
default:
l("Invalid command " + t + " encountered at index" + O + " of " + S);
}
}
e(0 === G.bytesAvailable);
e(O === S);
e(Q === b.coordinatesPosition);
v && n && (n.lineTo(J, C), r && r.lineTo(J, C));
h.leaveTimeline("RenderableMorphShape.deserializPaths");
return m;
};
d.prototype._createMorphPath = function(a, b, c, d, e, f, g) {
a = new n(a, c, d, e);
this._morphPaths[b].push(a);
a.path.moveTo(f, g);
return a.path;
};
d.prototype._readMorphMatrix = function(b, c, d) {
return new u(a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d), a(b.readFloat(), c.readFloat(), d));
};
d.prototype._readMorphGradient = function(b, d, f, g) {
e(34 <= b.bytesAvailable);
var k = b.readUnsignedByte(), h = 2 * b.readShort() / 255;
e(-1 <= h && 1 >= h);
var l = this._readMorphMatrix(b, d, f);
g = 16 === k ? g.createLinearGradient(-1, 0, 1, 0) : g.createRadialGradient(h, 0, 0, 0, 0, 1);
g.setTransform && g.setTransform(l.toSVGMatrix());
l = b.readUnsignedByte();
for (k = 0;k < l;k++) {
var h = a(b.readUnsignedByte() / 255, d.readUnsignedByte() / 255, f), m = s(b.readUnsignedInt(), d.readUnsignedInt(), f), m = c.ColorUtilities.rgbaToCSSStyle(m);
g.addColorStop(h, m);
}
b.position += 2;
return g;
};
d.prototype._readMorphBitmap = function(a, b, c, d) {
e(30 <= a.bytesAvailable);
var f = a.readUnsignedInt();
b = this._readMorphMatrix(a, b, c);
c = a.readBoolean() ? "repeat" : "no-repeat";
a = a.readBoolean();
f = this._textures[f];
e(f._canvas);
d = d.createPattern(f._canvas, c);
d.setTransform(b.toSVGMatrix());
return{style:d, smoothImage:a};
};
return d;
}(f);
h.RenderableMorphShape = q;
var d = function() {
function a() {
this.align = this.leading = this.descent = this.ascent = this.width = this.y = this.x = 0;
this.runs = [];
}
a.prototype.addRun = function(c, d, e, f) {
if (e) {
a._measureContext.font = c;
var k = a._measureContext.measureText(e).width | 0;
this.runs.push(new b(c, d, e, k, f));
this.width += k;
}
};
a.prototype.wrap = function(c) {
var d = [this], e = this.runs, f = this;
f.width = 0;
f.runs = [];
for (var k = a._measureContext, h = 0;h < e.length;h++) {
var l = e[h], m = l.text;
l.text = "";
l.width = 0;
k.font = l.font;
for (var n = c, p = m.split(/[\s.-]/), q = 0, s = 0;s < p.length;s++) {
var t = p[s], u = m.substr(q, t.length + 1), v = k.measureText(u).width | 0;
if (v > n) {
do {
if (l.text && (f.runs.push(l), f.width += l.width, l = new b(l.font, l.fillStyle, "", 0, l.underline), n = new a, n.y = f.y + f.descent + f.leading + f.ascent | 0, n.ascent = f.ascent, n.descent = f.descent, n.leading = f.leading, n.align = f.align, d.push(n), f = n), n = c - v, 0 > n) {
var v = u.length, F, I;
do {
v--;
if (1 > v) {
throw Error("Shall never happen: bad maxWidth?");
}
F = u.substr(0, v);
I = k.measureText(F).width | 0;
} while (I > c);
l.text = F;
l.width = I;
u = u.substr(v);
v = k.measureText(u).width | 0;
}
} while (0 > n);
} else {
n -= v;
}
l.text += u;
l.width += v;
q += t.length + 1;
}
f.runs.push(l);
f.width += l.width;
}
return d;
};
a._measureContext = document.createElement("canvas").getContext("2d");
return a;
}();
h.TextLine = d;
var b = function() {
return function(a, b, c, d, e) {
void 0 === a && (a = "");
void 0 === b && (b = "");
void 0 === c && (c = "");
void 0 === d && (d = 0);
void 0 === e && (e = !1);
this.font = a;
this.fillStyle = b;
this.text = c;
this.width = d;
this.underline = e;
};
}();
h.TextRun = b;
q = function(a) {
function b(c) {
a.call(this);
this._flags = 1048592;
this.properties = {};
this._textBounds = c.clone();
this._textRunData = null;
this._plainText = "";
this._borderColor = this._backgroundColor = 0;
this._matrix = u.createIdentity();
this._coords = null;
this._scrollV = 1;
this._scrollH = 0;
this.textRect = c.clone();
this.lines = [];
this.setBounds(c);
}
__extends(b, a);
b.prototype.setBounds = function(b) {
a.prototype.setBounds.call(this, b);
this._textBounds.set(b);
this.textRect.setElements(b.x + 2, b.y + 2, b.w - 2, b.h - 2);
};
b.prototype.setContent = function(a, b, c, d) {
this._textRunData = b;
this._plainText = a;
this._matrix.set(c);
this._coords = d;
this.lines = [];
};
b.prototype.setStyle = function(a, b, c, d) {
this._backgroundColor = a;
this._borderColor = b;
this._scrollV = c;
this._scrollH = d;
};
b.prototype.reflow = function(a, b) {
var e = this._textRunData;
if (e) {
var f = this._bounds, g = f.w - 4, k = this._plainText, l = this.lines, m = new d, n = 0, r = 0, p = 0, q = 0, s = 0, t = -1;
for (h.enterTimeline("RenderableText.reflow");e.position < e.length;) {
var u = e.readInt(), v = e.readInt(), G = e.readInt(), Z = e.readUTF(), Q = e.readInt(), S = e.readInt(), O = e.readInt();
Q > p && (p = Q);
S > q && (q = S);
O > s && (s = O);
Q = e.readBoolean();
S = "";
e.readBoolean() && (S += "italic ");
Q && (S += "bold ");
G = S + G + "px " + Z;
Z = e.readInt();
Z = c.ColorUtilities.rgbToHex(Z);
Q = e.readInt();
-1 === t && (t = Q);
e.readBoolean();
e.readInt();
e.readInt();
e.readInt();
e.readInt();
e.readInt();
for (var Q = e.readBoolean(), P = "", S = !1;!S;u++) {
S = u >= v - 1;
O = k[u];
if ("\r" !== O && "\n" !== O && (P += O, u < k.length - 1)) {
continue;
}
m.addRun(G, Z, P, Q);
if (m.runs.length) {
l.length && (n += s);
n += p;
m.y = n | 0;
n += q;
m.ascent = p;
m.descent = q;
m.leading = s;
m.align = t;
if (b && m.width > g) {
for (m = m.wrap(g), P = 0;P < m.length;P++) {
var V = m[P], n = V.y + V.descent + V.leading;
l.push(V);
V.width > r && (r = V.width);
}
} else {
l.push(m), m.width > r && (r = m.width);
}
m = new d;
} else {
n += p + q + s;
}
P = "";
if (S) {
s = q = p = 0;
t = -1;
break;
}
"\r" === O && "\n" === k[u + 1] && u++;
}
m.addRun(G, Z, P, Q);
}
e = k[k.length - 1];
"\r" !== e && "\n" !== e || l.push(m);
e = this.textRect;
e.w = r;
e.h = n;
if (a) {
if (!b) {
g = r;
r = f.w;
switch(a) {
case 1:
e.x = r - (g + 4) >> 1;
break;
case 3:
e.x = r - (g + 4);
}
this._textBounds.setElements(e.x - 2, e.y - 2, e.w + 4, e.h + 4);
}
f.h = n + 4;
} else {
this._textBounds = f;
}
for (u = 0;u < l.length;u++) {
if (f = l[u], f.width < g) {
switch(f.align) {
case 1:
f.x = g - f.width | 0;
break;
case 2:
f.x = (g - f.width) / 2 | 0;
}
}
}
this.invalidate();
h.leaveTimeline("RenderableText.reflow");
}
};
b.roundBoundPoints = function(a) {
e(a === b.absoluteBoundPoints);
for (var c = 0;c < a.length;c++) {
var d = a[c];
d.x = Math.floor(d.x + .1) + .5;
d.y = Math.floor(d.y + .1) + .5;
}
};
b.prototype.render = function(a) {
h.enterTimeline("RenderableText.render");
a.save();
var d = this._textBounds;
this._backgroundColor && (a.fillStyle = c.ColorUtilities.rgbaToCSSStyle(this._backgroundColor), a.fillRect(d.x, d.y, d.w, d.h));
if (this._borderColor) {
a.strokeStyle = c.ColorUtilities.rgbaToCSSStyle(this._borderColor);
a.lineCap = "square";
a.lineWidth = 1;
var e = b.absoluteBoundPoints, f = a.currentTransform;
f ? (d = d.clone(), (new u(f.a, f.b, f.c, f.d, f.e, f.f)).transformRectangle(d, e), a.setTransform(1, 0, 0, 1, 0, 0)) : (e[0].x = d.x, e[0].y = d.y, e[1].x = d.x + d.w, e[1].y = d.y, e[2].x = d.x + d.w, e[2].y = d.y + d.h, e[3].x = d.x, e[3].y = d.y + d.h);
b.roundBoundPoints(e);
d = new Path2D;
d.moveTo(e[0].x, e[0].y);
d.lineTo(e[1].x, e[1].y);
d.lineTo(e[2].x, e[2].y);
d.lineTo(e[3].x, e[3].y);
d.lineTo(e[0].x, e[0].y);
a.stroke(d);
f && a.setTransform(f.a, f.b, f.c, f.d, f.e, f.f);
}
this._coords ? this._renderChars(a) : this._renderLines(a);
a.restore();
h.leaveTimeline("RenderableText.render");
};
b.prototype._renderChars = function(a) {
if (this._matrix) {
var b = this._matrix;
a.transform(b.a, b.b, b.c, b.d, b.tx, b.ty);
}
for (var b = this.lines, c = this._coords, d = c.position = 0;d < b.length;d++) {
for (var e = b[d].runs, f = 0;f < e.length;f++) {
var g = e[f];
a.font = g.font;
a.fillStyle = g.fillStyle;
for (var g = g.text, k = 0;k < g.length;k++) {
var h = c.readInt() / 20, l = c.readInt() / 20;
a.fillText(g[k], h, l);
}
}
}
};
b.prototype._renderLines = function(a) {
var b = this._textBounds;
a.beginPath();
a.rect(b.x + 2, b.y + 2, b.w - 4, b.h - 4);
a.clip();
a.translate(b.x - this._scrollH + 2, b.y + 2);
for (var c = this.lines, d = this._scrollV, e = 0, f = 0;f < c.length;f++) {
var g = c[f], k = g.x, h = g.y;
if (f + 1 < d) {
e = h + g.descent + g.leading;
} else {
h -= e;
if (f + 1 - d && h > b.h) {
break;
}
for (var l = g.runs, m = 0;m < l.length;m++) {
var n = l[m];
a.font = n.font;
a.fillStyle = n.fillStyle;
n.underline && a.fillRect(k, h + g.descent / 2 | 0, n.width, 1);
a.textAlign = "left";
a.textBaseline = "alphabetic";
a.fillText(n.text, k, h);
k += n.width;
}
}
}
};
b.absoluteBoundPoints = [new v(0, 0), new v(0, 0), new v(0, 0), new v(0, 0)];
return b;
}(t);
h.RenderableText = q;
t = function(a) {
function b(c, d) {
a.call(this);
this._flags = 3145728;
this.properties = {};
this.setBounds(new p(0, 0, c, d));
}
__extends(b, a);
Object.defineProperty(b.prototype, "text", {get:function() {
return this._text;
}, set:function(a) {
this._text = a;
}, enumerable:!0, configurable:!0});
b.prototype.render = function(a, b, c) {
a.save();
a.textBaseline = "top";
a.fillStyle = "white";
a.fillText(this.text, 0, 0);
a.restore();
};
return b;
}(t);
h.Label = t;
})(c.GFX || (c.GFX = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
var a = c.ColorUtilities.clampByte, s = c.Debug.assert, v = function() {
return function() {
};
}();
h.Filter = v;
var p = function(a) {
function c(e, h, l) {
a.call(this);
this.blurX = e;
this.blurY = h;
this.quality = l;
}
__extends(c, a);
return c;
}(v);
h.BlurFilter = p;
p = function(a) {
function c(e, h, l, p, n, k, f, d, b, g, r) {
a.call(this);
this.alpha = e;
this.angle = h;
this.blurX = l;
this.blurY = p;
this.color = n;
this.distance = k;
this.hideObject = f;
this.inner = d;
this.knockout = b;
this.quality = g;
this.strength = r;
}
__extends(c, a);
return c;
}(v);
h.DropshadowFilter = p;
v = function(a) {
function c(e, h, l, p, n, k, f, d) {
a.call(this);
this.alpha = e;
this.blurX = h;
this.blurY = l;
this.color = p;
this.inner = n;
this.knockout = k;
this.quality = f;
this.strength = d;
}
__extends(c, a);
return c;
}(v);
h.GlowFilter = v;
(function(a) {
a[a.Unknown = 0] = "Unknown";
a[a.Identity = 1] = "Identity";
})(h.ColorMatrixType || (h.ColorMatrixType = {}));
v = function() {
function c(a) {
s(20 === a.length);
this._data = new Float32Array(a);
this._type = 0;
}
c.prototype.clone = function() {
var a = new c(this._data);
a._type = this._type;
return a;
};
c.prototype.set = function(a) {
this._data.set(a._data);
this._type = a._type;
};
c.prototype.toWebGLMatrix = function() {
return new Float32Array(this._data);
};
c.prototype.asWebGLMatrix = function() {
return this._data.subarray(0, 16);
};
c.prototype.asWebGLVector = function() {
return this._data.subarray(16, 20);
};
c.prototype.isIdentity = function() {
if (this._type & 1) {
return!0;
}
var a = this._data;
return 1 == a[0] && 0 == a[1] && 0 == a[2] && 0 == a[3] && 0 == a[4] && 1 == a[5] && 0 == a[6] && 0 == a[7] && 0 == a[8] && 0 == a[9] && 1 == a[10] && 0 == a[11] && 0 == a[12] && 0 == a[13] && 0 == a[14] && 1 == a[15] && 0 == a[16] && 0 == a[17] && 0 == a[18] && 0 == a[19];
};
c.createIdentity = function() {
var a = new c([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0]);
a._type = 1;
return a;
};
c.prototype.setMultipliersAndOffsets = function(a, c, h, p, q, n, k, f) {
for (var d = this._data, b = 0;b < d.length;b++) {
d[b] = 0;
}
d[0] = a;
d[5] = c;
d[10] = h;
d[15] = p;
d[16] = q / 255;
d[17] = n / 255;
d[18] = k / 255;
d[19] = f / 255;
this._type = 0;
};
c.prototype.transformRGBA = function(c) {
var e = c >> 24 & 255, h = c >> 16 & 255, p = c >> 8 & 255, q = c & 255, n = this._data;
c = a(e * n[0] + h * n[1] + p * n[2] + q * n[3] + 255 * n[16]);
var k = a(e * n[4] + h * n[5] + p * n[6] + q * n[7] + 255 * n[17]), f = a(e * n[8] + h * n[9] + p * n[10] + q * n[11] + 255 * n[18]), e = a(e * n[12] + h * n[13] + p * n[14] + q * n[15] + 255 * n[19]);
return c << 24 | k << 16 | f << 8 | e;
};
c.prototype.multiply = function(a) {
if (!(a._type & 1)) {
var c = this._data, h = a._data;
a = c[0];
var p = c[1], q = c[2], n = c[3], k = c[4], f = c[5], d = c[6], b = c[7], g = c[8], r = c[9], s = c[10], u = c[11], v = c[12], B = c[13], M = c[14], N = c[15], K = c[16], y = c[17], D = c[18], L = c[19], H = h[0], J = h[1], C = h[2], E = h[3], F = h[4], I = h[5], G = h[6], Z = h[7], Q = h[8], S = h[9], O = h[10], P = h[11], V = h[12], $ = h[13], W = h[14], x = h[15], ea = h[16], Y = h[17], R = h[18], h = h[19];
c[0] = a * H + k * J + g * C + v * E;
c[1] = p * H + f * J + r * C + B * E;
c[2] = q * H + d * J + s * C + M * E;
c[3] = n * H + b * J + u * C + N * E;
c[4] = a * F + k * I + g * G + v * Z;
c[5] = p * F + f * I + r * G + B * Z;
c[6] = q * F + d * I + s * G + M * Z;
c[7] = n * F + b * I + u * G + N * Z;
c[8] = a * Q + k * S + g * O + v * P;
c[9] = p * Q + f * S + r * O + B * P;
c[10] = q * Q + d * S + s * O + M * P;
c[11] = n * Q + b * S + u * O + N * P;
c[12] = a * V + k * $ + g * W + v * x;
c[13] = p * V + f * $ + r * W + B * x;
c[14] = q * V + d * $ + s * W + M * x;
c[15] = n * V + b * $ + u * W + N * x;
c[16] = a * ea + k * Y + g * R + v * h + K;
c[17] = p * ea + f * Y + r * R + B * h + y;
c[18] = q * ea + d * Y + s * R + M * h + D;
c[19] = n * ea + b * Y + u * R + N * h + L;
this._type = 0;
}
};
Object.defineProperty(c.prototype, "alphaMultiplier", {get:function() {
return this._data[15];
}, enumerable:!0, configurable:!0});
c.prototype.hasOnlyAlphaMultiplier = function() {
var a = this._data;
return 1 == a[0] && 0 == a[1] && 0 == a[2] && 0 == a[3] && 0 == a[4] && 1 == a[5] && 0 == a[6] && 0 == a[7] && 0 == a[8] && 0 == a[9] && 1 == a[10] && 0 == a[11] && 0 == a[12] && 0 == a[13] && 0 == a[14] && 0 == a[16] && 0 == a[17] && 0 == a[18] && 0 == a[19];
};
c.prototype.equals = function(a) {
if (!a) {
return!1;
}
if (this._type === a._type && 1 === this._type) {
return!0;
}
var c = this._data;
a = a._data;
for (var h = 0;20 > h;h++) {
if (.001 < Math.abs(c[h] - a[h])) {
return!1;
}
}
return!0;
};
c.prototype.toSVGFilterMatrix = function() {
var a = this._data;
return[a[0], a[4], a[8], a[12], a[16], a[1], a[5], a[9], a[13], a[17], a[2], a[6], a[10], a[14], a[18], a[3], a[7], a[11], a[15], a[19]].join(" ");
};
return c;
}();
h.ColorMatrix = v;
})(c.GFX || (c.GFX = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
h.timelineBuffer = new c.Tools.Profiler.TimelineBuffer("Player");
h.counter = new c.Metrics.Counter(!0);
h.writer = null;
h.enterTimeline = function(a, c) {
h.writer && h.writer.enter(a);
};
h.leaveTimeline = function(a, c) {
h.writer && h.writer.leave(a);
};
})(c.Player || (c.Player = {}));
})(Shumway || (Shumway = {}));
var Shumway$$inline_609 = Shumway || (Shumway = {});
Shumway$$inline_609.playerOptions = Shumway$$inline_609.Settings.shumwayOptions.register(new Shumway$$inline_609.Options.OptionSet("Player Options"));
Shumway$$inline_609.frameEnabledOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Enable Frame Execution", "boolean", !0, "Enable frame execution."));
Shumway$$inline_609.timerEnabledOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Enable Timers", "boolean", !0, "Enable timer events."));
Shumway$$inline_609.pumpEnabledOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Enable Pump", "boolean", !0, "Enable display tree serialization."));
Shumway$$inline_609.pumpRateOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Pump Rate", "number", 60, "Number of times / second that the display list is synchronized.", {range:{min:1, max:120, step:1}}));
Shumway$$inline_609.frameRateOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Frame Rate", "number", 60, "Override a movie's frame rate, set to -1 to use the movies default frame rate.", {range:{min:-1, max:120, step:1}}));
Shumway$$inline_609.tracePlayerOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("tp", "Trace Player", "number", 0, "Trace player every n frames.", {range:{min:0, max:512, step:1}}));
Shumway$$inline_609.traceMouseEventOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("tme", "Trace Mouse Events", "boolean", !1, "Trace mouse events."));
Shumway$$inline_609.frameRateMultiplierOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Frame Rate Multiplier", "number", 1, "Play frames at a faster rate.", {range:{min:1, max:16, step:1}}));
Shumway$$inline_609.dontSkipFramesOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Disables Frame Skipping", "boolean", !1, "Play all frames, e.g. no skipping frame during throttle."));
Shumway$$inline_609.playAllSymbolsOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbols", "boolean", !1, "Plays all SWF symbols automatically."));
Shumway$$inline_609.playSymbolOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbol Number", "number", 0, "Select symbol by Id.", {range:{min:0, max:2E4, step:1}}));
Shumway$$inline_609.playSymbolFrameDurationOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbol Duration", "number", 0, "How many frames to play, 0 for all frames of the movie clip.", {range:{min:0, max:128, step:1}}));
Shumway$$inline_609.playSymbolCountOption = Shumway$$inline_609.playerOptions.register(new Shumway$$inline_609.Options.Option("", "Play Symbol Count", "number", -1, "Select symbol count.", {range:{min:0, max:2E4, step:1}}));
(function(c) {
var h = function() {
function a() {
this._expectedNextFrameAt = performance.now();
this._drawStats = [];
this._drawsSkipped = this._drawStarted = this._drawStatsSum = 0;
this._expectedNextFrameAt = performance.now();
this._onTime = !0;
this._trackDelta = !1;
this._onTimeDelta = this._delta = 0;
}
Object.defineProperty(a.prototype, "shallSkipDraw", {get:function() {
if (this._drawsSkipped >= a.MAX_DRAWS_TO_SKIP) {
return!1;
}
var c = this._drawStats.length < a.STATS_TO_REMEMBER ? 0 : this._drawStatsSum / this._drawStats.length;
return performance.now() + c + a.INTERVAL_PADDING_MS > this._expectedNextFrameAt;
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "nextFrameIn", {get:function() {
return Math.max(0, this._expectedNextFrameAt - performance.now());
}, enumerable:!0, configurable:!0});
Object.defineProperty(a.prototype, "isOnTime", {get:function() {
return this._onTime;
}, enumerable:!0, configurable:!0});
a.prototype.startFrame = function(c) {
var h = c = 1E3 / c, p = this._onTimeDelta + this._delta;
0 !== p && (0 > p ? h *= a.SPEED_ADJUST_RATE : 0 < p && (h /= a.SPEED_ADJUST_RATE), this._onTimeDelta += c - h);
this._expectedNextFrameAt += h;
this._onTime = !0;
};
a.prototype.endFrame = function() {
var c = performance.now() + a.INTERVAL_PADDING_MS;
c > this._expectedNextFrameAt && (this._trackDelta && (this._onTimeDelta += this._expectedNextFrameAt - c, console.log(this._onTimeDelta)), this._expectedNextFrameAt = c, this._onTime = !1);
};
a.prototype.startDraw = function() {
this._drawsSkipped = 0;
this._drawStarted = performance.now();
};
a.prototype.endDraw = function() {
var c = performance.now() - this._drawStarted;
this._drawStats.push(c);
for (this._drawStatsSum += c;this._drawStats.length > a.STATS_TO_REMEMBER;) {
this._drawStatsSum -= this._drawStats.shift();
}
};
a.prototype.skipDraw = function() {
this._drawsSkipped++;
};
a.prototype.setDelta = function(a) {
this._trackDelta && (this._delta = a);
};
a.prototype.startTrackDelta = function() {
this._trackDelta = !0;
};
a.prototype.endTrackDelta = function() {
this._trackDelta && (this._trackDelta = !1, this._onTimeDelta = this._delta = 0);
};
a.STATS_TO_REMEMBER = 50;
a.MAX_DRAWS_TO_SKIP = 2;
a.INTERVAL_PADDING_MS = 4;
a.SPEED_ADJUST_RATE = .9;
return a;
}();
c.FrameScheduler = h;
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.AVM2.AS.flash, v = h.display, p = h.display.BitmapData, u = h.display.DisplayObjectFlags, l = h.display.BlendMode, e = h.display.PixelSnapping, m = h.geom.Point, t = c.Bounds, q = h.ui.MouseCursor, n = c.Debug.assert, k = c.Player.writer, f = function() {
function a() {
this.phase = 0;
this.roots = null;
}
a.prototype.begin = function(a) {
this.roots = [a];
};
a.prototype.remoteObjects = function() {
this.phase = 0;
for (var a = this.roots, d = 0;d < a.length;d++) {
c.Player.enterTimeline("remoting objects"), this.writeDirtyDisplayObjects(a[d]), c.Player.leaveTimeline("remoting objects");
}
};
a.prototype.remoteReferences = function() {
this.phase = 1;
for (var a = this.roots, d = 0;d < a.length;d++) {
c.Player.enterTimeline("remoting references"), this.writeDirtyDisplayObjects(a[d], !0), c.Player.leaveTimeline("remoting references");
}
};
a.prototype.writeDirtyDisplayObjects = function(a, d) {
void 0 === d && (d = !1);
var e = this, f = this.roots;
a.visit(function(a) {
a._hasAnyFlags(u.Dirty) && (e.writeUpdateFrame(a), f && a.mask && c.ArrayUtilities.pushUnique(f, a.mask._findFurthestAncestorOrSelf()));
e.writeDirtyAssets(a);
if (a._hasFlags(536870912)) {
return 0;
}
d && a._removeFlags(536870912);
return 2;
}, 0);
};
a.prototype.writeStage = function(a, c) {
k && k.writeLn("Sending Stage");
this.output.writeInt(104);
this.output.writeInt(a._id);
this.output.writeInt(a.color);
this._writeRectangle(new t(0, 0, 20 * a.stageWidth, 20 * a.stageHeight));
this.output.writeInt(h.display.StageAlign.toNumber(a.align));
this.output.writeInt(h.display.StageScaleMode.toNumber(a.scaleMode));
this.output.writeInt(h.display.StageDisplayState.toNumber(a.displayState));
var d = h.ui.Mouse.cursor;
if (c) {
if (this.output.writeInt(c._id), d === q.AUTO) {
var e = c;
do {
if (h.display.SimpleButton.isType(e) || h.display.Sprite.isType(e) && e.buttonMode && c.useHandCursor) {
d = q.BUTTON;
break;
}
e = e._parent;
} while (e && e !== a);
}
} else {
this.output.writeInt(-1);
}
this.output.writeInt(q.toNumber(d));
};
a.prototype.writeGraphics = function(a) {
if (a._isDirty) {
k && k.writeLn("Sending Graphics: " + a._id);
for (var c = a._textures, d = c.length, e = 0;e < d;e++) {
c[e] && this.writeBitmapData(c[e]);
}
this.output.writeInt(101);
this.output.writeInt(a._id);
this.output.writeInt(-1);
this._writeRectangle(a._getContentBounds());
this._writeAsset(a._graphicsData.toPlainObject());
this.output.writeInt(d);
for (e = 0;e < d;e++) {
this.output.writeInt(c[e] ? c[e]._id : -1);
}
a._isDirty = !1;
}
};
a.prototype.writeNetStream = function(a, c) {
a._isDirty && (k && k.writeLn("Sending NetStream: " + a._id), this.output.writeInt(105), this.output.writeInt(a._id), this._writeRectangle(c), a._isDirty = !1);
};
a.prototype.writeBitmapData = function(a) {
a._isDirty && (k && k.writeLn("Sending BitmapData: " + a._id), this.output.writeInt(102), this.output.writeInt(a._id), this.output.writeInt(a._symbol ? a._symbol.id : -1), this._writeRectangle(a._getContentBounds()), this.output.writeInt(a._type), this._writeAsset(a._dataBuffer.toPlainObject()), a._isDirty = !1);
};
a.prototype.writeTextContent = function(a) {
if (a.flags & c.TextContentFlags.Dirty) {
k && k.writeLn("Sending TextContent: " + a._id);
this.output.writeInt(103);
this.output.writeInt(a._id);
this.output.writeInt(-1);
this._writeRectangle(a.bounds);
this._writeMatrix(a.matrix || h.geom.Matrix.FROZEN_IDENTITY_MATRIX);
this.output.writeInt(a.backgroundColor);
this.output.writeInt(a.borderColor);
this.output.writeInt(a.autoSize);
this.output.writeBoolean(a.wordWrap);
this.output.writeInt(a.scrollV);
this.output.writeInt(a.scrollH);
this._writeAsset(a.plainText);
this._writeAsset(a.textRunData.toPlainObject());
var d = a.coords;
if (d) {
var e = d.length;
this.output.writeInt(e);
for (var f = 0;f < e;f++) {
this.output.writeInt(d[f]);
}
} else {
this.output.writeInt(0);
}
a.flags &= ~c.TextContentFlags.Dirty;
}
};
a.prototype.writeClippedObjectsCount = function(a) {
if (0 <= a._clipDepth && a._parent) {
var c = a._parent.getChildIndex(a);
a = a._parent.getClipDepthIndex(a._clipDepth);
if (0 > a - c) {
this.output.writeInt(-1);
} else {
for (var d = c + 1;d <= c;d++) {
}
this.output.writeInt(a - c);
}
} else {
this.output.writeInt(-1);
}
};
a.prototype.writeUpdateFrame = function(a) {
this.output.writeInt(100);
this.output.writeInt(a._id);
k && k.writeLn("Sending UpdateFrame: " + a.debugName(!0));
var c = !1, d = a._hasFlags(1048576), f = a._hasFlags(67108864), m = a._hasFlags(1073741824), n = null;
h.media.Video.isType(a) && (n = a);
var p = !1;
1 === this.phase && (p = a._hasAnyFlags(65011712), c = a._hasFlags(134217728));
var q = null;
v.Bitmap.isType(a) && (q = a);
var t = a._hasFlags(268435456), K;
K = 0 | (d ? 1 : 0) | (f ? 8 : 0);
K |= c ? 64 : 0;
K |= t ? 128 : 0;
K |= m ? 32 : 0;
K |= p ? 4 : 0;
this.output.writeInt(K);
d && this._writeMatrix(a._getMatrix());
f && this._writeColorTransform(a._colorTransform);
c && this.output.writeInt(a.mask ? a.mask._id : -1);
t && this.writeClippedObjectsCount(a);
m && (this.output.writeInt(a._ratio), this.output.writeInt(l.toNumber(a._blendMode)), this._writeFilters(a.filters), this.output.writeBoolean(a._hasFlags(1)), this.output.writeBoolean(a.cacheAsBitmap), q ? (this.output.writeInt(e.toNumber(q.pixelSnapping)), this.output.writeInt(q.smoothing ? 1 : 0)) : (this.output.writeInt(e.toNumber(e.AUTO)), this.output.writeInt(1)));
c = a._getGraphics();
d = a._getTextContent();
if (p) {
k && k.enter("Children: {");
if (q) {
q.bitmapData ? (this.output.writeInt(1), this.output.writeInt(134217728 | q.bitmapData._id)) : this.output.writeInt(0);
} else {
if (n) {
n._netStream ? (this.output.writeInt(1), this.output.writeInt(134217728 | n._netStream._id)) : this.output.writeInt(0);
} else {
if (p = c || d ? 1 : 0, (n = a._children) && (p += n.length), this.output.writeInt(p), c ? (k && k.writeLn("Reference Graphics: " + c._id), this.output.writeInt(134217728 | c._id)) : d && (k && k.writeLn("Reference TextContent: " + d._id), this.output.writeInt(134217728 | d._id)), n) {
for (p = 0;p < n.length;p++) {
k && k.writeLn("Reference DisplayObject: " + n[p].debugName()), this.output.writeInt(n[p]._id), 0 <= n[p]._clipDepth && n[p]._setFlags(268435456);
}
}
}
}
k && k.leave("}");
}
1 === this.phase && a._removeFlags(u.Dirty);
};
a.prototype.writeDirtyAssets = function(a) {
var c = a._getGraphics();
c ? this.writeGraphics(c) : (c = a._getTextContent()) ? this.writeTextContent(c) : (c = null, v.Bitmap.isType(a) ? (c = a, c.bitmapData && this.writeBitmapData(c.bitmapData)) : (c = null, h.media.Video.isType(a) && (c = a, c._netStream && this.writeNetStream(c._netStream, c._getContentBounds()))));
};
a.prototype.writeDrawToBitmap = function(a, c, d, e, f, h, k) {
void 0 === d && (d = null);
void 0 === e && (e = null);
void 0 === f && (f = null);
void 0 === h && (h = null);
void 0 === k && (k = !1);
this.output.writeInt(200);
this.output.writeInt(a._id);
p.isType(c) ? this.output.writeInt(134217728 | c._id) : this.output.writeInt(c._id);
a = 0 | (d ? 1 : 0) | (e ? 8 : 0);
a |= h ? 16 : 0;
this.output.writeInt(a);
d && this._writeMatrix(d);
e && this._writeColorTransform(e);
h && this._writeRectangle(t.FromRectangle(h));
this.output.writeInt(l.toNumber(f));
this.output.writeBoolean(k);
};
a.prototype._writeMatrix = function(a) {
this.output.write6Floats(a.a, a.b, a.c, a.d, a.tx, a.ty);
};
a.prototype._writeRectangle = function(a) {
this.output.write4Ints(a.xMin, a.yMin, a.width, a.height);
};
a.prototype._writeAsset = function(a) {
this.output.writeInt(this.outputAssets.length);
this.outputAssets.push(a);
};
a.prototype._writeFilters = function(a) {
for (var d = 0, e = 0;e < a.length;e++) {
h.filters.BlurFilter.isType(a[e]) || h.filters.DropShadowFilter.isType(a[e]) || h.filters.GlowFilter.isType(a[e]) ? d++ : c.Debug.somewhatImplemented(a[e].toString());
}
this.output.writeInt(d);
for (e = 0;e < a.length;e++) {
d = a[e], h.filters.BlurFilter.isType(d) ? (this.output.writeInt(0), this.output.writeFloat(d.blurX), this.output.writeFloat(d.blurY), this.output.writeInt(d.quality)) : h.filters.DropShadowFilter.isType(d) ? (this.output.writeInt(1), this.output.writeFloat(d.alpha), this.output.writeFloat(d.angle), this.output.writeFloat(d.blurX), this.output.writeFloat(d.blurY), this.output.writeInt(d.color), this.output.writeFloat(d.distance), this.output.writeBoolean(d.hideObject), this.output.writeBoolean(d.inner),
this.output.writeBoolean(d.knockout), this.output.writeInt(d.quality), this.output.writeFloat(d.strength)) : h.filters.GlowFilter.isType(d) && (this.output.writeInt(1), this.output.writeFloat(d.alpha), this.output.writeFloat(0), this.output.writeFloat(d.blurX), this.output.writeFloat(d.blurY), this.output.writeInt(d.color), this.output.writeFloat(0), this.output.writeBoolean(!1), this.output.writeBoolean(d.inner), this.output.writeBoolean(d.knockout), this.output.writeInt(d.quality),
this.output.writeFloat(d.strength));
}
};
a.prototype._writeColorTransform = function(a) {
var c = this.output, d = a.redMultiplier, e = a.greenMultiplier, f = a.blueMultiplier, h = a.alphaMultiplier, k = a.redOffset, l = a.greenOffset, m = a.blueOffset;
a = a.alphaOffset;
k === l && l === m && m === a && 0 === a && d === e && e === f && 1 === f ? 1 === h ? c.writeInt(0) : (c.writeInt(1), c.writeFloat(h)) : (c.writeInt(2), c.writeFloat(d), c.writeFloat(e), c.writeFloat(f), c.writeFloat(h), c.writeInt(k), c.writeInt(l), c.writeInt(m), c.writeInt(a));
};
a.prototype.writeRequestBitmapData = function(a) {
k && k.writeLn("Sending BitmapData Request");
this.output.writeInt(106);
this.output.writeInt(a._id);
};
return a;
}();
a.PlayerChannelSerializer = f;
f = function() {
function a() {
}
a.prototype.read = function() {
var a = this.input.readInt();
switch(a) {
case 300:
return this._readMouseEvent();
case 301:
return this._readKeyboardEvent();
case 302:
return this._readFocusEvent();
}
n(!1, "Unknown MessageReader tag: " + a);
};
a.prototype._readFocusEvent = function() {
return{tag:302, type:this.input.readInt()};
};
a.prototype._readMouseEvent = function() {
var a = this.input, d = a.readInt(), d = c.Remoting.MouseEventNames[d], e = a.readFloat(), f = a.readFloat(), h = a.readInt(), a = a.readInt();
return{tag:300, type:d, point:new m(e, f), ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4), buttons:h};
};
a.prototype._readKeyboardEvent = function() {
var a = this.input, d = a.readInt(), d = c.Remoting.KeyboardEventNames[d], e = a.readInt(), f = a.readInt(), h = a.readInt(), a = a.readInt();
return{tag:301, type:d, keyCode:e, charCode:f, location:h, ctrlKey:!!(a & 1), altKey:!!(a & 2), shiftKey:!!(a & 4)};
};
return a;
}();
a.PlayerChannelDeserializer = f;
})(h.Player || (h.Player = {}));
})(c.Remoting || (c.Remoting = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
var a = c.Debug.assert, s = c.Debug.somewhatImplemented, v = c.AVM2.AS.flash, p = c.ArrayUtilities.DataBuffer, u = c.AVM2.Runtime.AVM2, l = v.events.Event, e = v.display.DisplayObject, m = v.events.EventDispatcher, t = v.display.Loader, q = v.ui.MouseEventDispatcher, n = v.ui.KeyboardEventDispatcher, k = function() {
function f() {
this._framesPlayed = 0;
this._videoEventListeners = [];
this._pendingPromises = [];
this.externalCallback = null;
this._lastPumpTime = 0;
this._hasFocus = this._isPageVisible = !0;
this._keyboardEventDispatcher = new n;
this._mouseEventDispatcher = new q;
this._writer = new c.IndentingWriter;
u.instance.globals["Shumway.Player.Utils"] = this;
}
f.prototype._getNextAvailablePromiseId = function() {
for (var a = this._pendingPromises.length, b = 0;b < a;b++) {
if (!this._pendingPromises[b]) {
return b;
}
}
return a;
};
Object.defineProperty(f.prototype, "stage", {get:function() {
return this._stage;
}, enumerable:!0, configurable:!0});
f.prototype.onSendUpdates = function(a, b, c) {
throw Error("This method is abstract");
};
f.prototype._shouldThrottleDownRendering = function() {
return!this._isPageVisible;
};
f.prototype._shouldThrottleDownFrameExecution = function() {
return!this._isPageVisible;
};
f.prototype.load = function(d, b) {
a(!this._loader, "Can't load twice.");
this._stage = new v.display.Stage;
var e = this._loaderInfo = (this._loader = v.display.Loader.getRootLoader()).contentLoaderInfo;
c.playAllSymbolsOption.value ? (this._playAllSymbols(), e._allowCodeExecution = !1) : this._enterRootLoadingLoop();
e = this.createLoaderContext();
if (b) {
var f = c.Timeline.BinarySymbol.FromData({id:-1, data:b}), h = f.symbolClass.initializeFrom(f);
f.symbolClass.instanceConstructorNoInitialize.call(h);
this._loader.loadBytes(h, e);
} else {
this._loader.load(new v.net.URLRequest(d), e);
}
};
f.prototype.createLoaderContext = function() {
var a = new v.system.LoaderContext;
if (this.movieParams) {
var b = {}, c;
for (c in this.movieParams) {
b.asSetPublicProperty(c, this.movieParams[c]);
}
a.parameters = b;
}
return a;
};
f.prototype.processUpdates = function(a, b) {
var e = new c.Remoting.Player.PlayerChannelDeserializer;
e.input = a;
e.inputAssets = b;
e = e.read();
switch(e.tag) {
case 301:
var f = this._stage.focus ? this._stage.focus : this._stage;
this._keyboardEventDispatcher.target = f;
this._keyboardEventDispatcher.dispatchKeyboardEvent(e);
break;
case 300:
this._mouseEventDispatcher.stage = this._stage;
f = this._mouseEventDispatcher.handleMouseEvent(e);
c.traceMouseEventOption.value && (this._writer.writeLn("Mouse Event: type: " + e.type + ", point: " + e.point + ", target: " + f + (f ? ", name: " + f._name : "")), "click" === e.type && f && f.debugTrace());
break;
case 302:
switch(e.type) {
case 0:
this._isPageVisible = !1;
break;
case 1:
this._isPageVisible = !0;
break;
case 2:
this._hasFocus = !1;
break;
case 3:
m.broadcastEventDispatchQueue.dispatchEvent(l.getBroadcastInstance(l.ACTIVATE)), this._hasFocus = !0;
}
;
}
};
f.prototype._pumpDisplayListUpdates = function() {
this.syncDisplayObject(this._stage);
};
f.prototype.syncDisplayObject = function(a, b) {
void 0 === b && (b = !0);
var e = new p, f = [], k = new c.Remoting.Player.PlayerChannelSerializer;
k.output = e;
k.outputAssets = f;
v.display.Stage.isType(a) && k.writeStage(a, this._mouseEventDispatcher.currentTarget);
k.begin(a);
k.remoteObjects();
k.remoteReferences();
e.writeInt(0);
h.enterTimeline("remoting assets");
e = this.onSendUpdates(e, f, b);
h.leaveTimeline("remoting assets");
return e;
};
f.prototype.requestBitmapData = function(a) {
var b = new p, e = [], f = new c.Remoting.Player.PlayerChannelSerializer;
f.output = b;
f.outputAssets = e;
f.writeRequestBitmapData(a);
b.writeInt(0);
return this.onSendUpdates(b, e, !1);
};
f.prototype.drawToBitmap = function(a, b, e, f, k, l, m) {
void 0 === e && (e = null);
void 0 === f && (f = null);
void 0 === k && (k = null);
void 0 === l && (l = null);
void 0 === m && (m = !1);
var n = new p, q = [], s = new c.Remoting.Player.PlayerChannelSerializer;
s.output = n;
s.outputAssets = q;
s.writeBitmapData(a);
v.display.BitmapData.isType(b) ? s.writeBitmapData(b) : (s.begin(b), s.remoteObjects(), s.remoteReferences());
s.writeDrawToBitmap(a, b, e, f, k, l, m);
n.writeInt(0);
h.enterTimeline("sendUpdates");
this.onSendUpdates(n, q, !1);
h.leaveTimeline("sendUpdates");
};
f.prototype.registerEventListener = function(a, b) {
this._videoEventListeners[a] = b;
};
f.prototype.notifyVideoControl = function(a, b, c) {
return this.onVideoControl(a, b, c);
};
f.prototype.executeFSCommand = function(a, b) {
switch(a) {
case "quit":
this._leaveEventLoop();
break;
default:
s("FSCommand " + a);
}
this.onFSCommand(a, b);
};
f.prototype.requestRendering = function() {
this._pumpDisplayListUpdates();
};
f.prototype._pumpUpdates = function() {
if (c.dontSkipFramesOption.value || !(this._shouldThrottleDownRendering() || performance.now() - this._lastPumpTime < 1E3 / c.pumpRateOption.value)) {
h.enterTimeline("pump"), c.pumpEnabledOption.value && (this._pumpDisplayListUpdates(), this._lastPumpTime = performance.now()), h.leaveTimeline("pump");
}
};
f.prototype._leaveSyncLoop = function() {
a(-1 < this._frameTimeout);
clearInterval(this._frameTimeout);
};
f.prototype._getFrameInterval = function() {
var a = c.frameRateOption.value;
0 > a && (a = this._stage.frameRate);
return Math.floor(1E3 / a);
};
f.prototype._enterEventLoop = function() {
this._eventLoopIsRunning = !0;
this._eventLoopTick = this._eventLoopTick.bind(this);
this._eventLoopTick();
};
f.prototype._enterRootLoadingLoop = function() {
function a() {
var f = e.contentLoaderInfo;
if (f._file) {
var h = b._stage, k = void 0 !== b.defaultStageColor ? b.defaultStageColor : f._file.backgroundColor;
h._loaderInfo = f;
h.align = b.stageAlign || "";
h.scaleMode = b.stageScale || "showall";
h.frameRate = f.frameRate;
h.setStageWidth(f.width);
h.setStageHeight(f.height);
h.setStageColor(c.ColorUtilities.RGBAToARGB(k));
b.displayParameters && b.processDisplayParameters(b.displayParameters);
b._enterEventLoop();
} else {
setTimeout(a, b._getFrameInterval());
}
}
var b = this, e = t.getRootLoader();
e._setStage(this._stage);
a();
};
f.prototype._eventLoopTick = function() {
var a = !c.playAllSymbolsOption.value, b = c.dontSkipFramesOption.value;
this._frameTimeout = setTimeout(this._eventLoopTick, this._getFrameInterval());
if (b || !(!c.frameEnabledOption.value && a || this._shouldThrottleDownFrameExecution())) {
e._stage = this._stage;
if (!t.getRootLoader().content && (t.processEvents(), !t.getRootLoader().content)) {
return;
}
for (b = 0;b < c.frameRateMultiplierOption.value;b++) {
h.enterTimeline("eventLoop");
var f = performance.now();
e.performFrameNavigation(!0, a);
h.counter.count("performFrameNavigation", 1, performance.now() - f);
t.processEvents();
h.leaveTimeline("eventLoop");
}
this._framesPlayed++;
0 < c.tracePlayerOption.value && 0 === this._framesPlayed % c.tracePlayerOption.value && this._tracePlayer();
this._stage.render();
this._pumpUpdates();
this.onFrameProcessed();
}
};
f.prototype._tracePlayer = function() {
var a = this._writer;
a.enter("Frame: " + this._framesPlayed);
c.AVM2.counter.traceSorted(a);
c.AVM2.counter.clear();
c.Player.counter.traceSorted(a);
c.Player.counter.clear();
a.writeLn("advancableInstances: " + v.display.DisplayObject._advancableInstances.length);
a.outdent();
};
f.prototype._leaveEventLoop = function() {
a(this._eventLoopIsRunning);
clearTimeout(this._frameTimeout);
this._eventLoopIsRunning = !1;
};
f.prototype._playAllSymbols = function() {
var a = this._stage, b = this._loader, e = this._loaderInfo, f = this;
e.addEventListener(v.events.ProgressEvent.PROGRESS, function z() {
b.content && (e.removeEventListener(v.events.ProgressEvent.PROGRESS, z), f._enterEventLoop());
});
e.addEventListener(v.events.Event.COMPLETE, function() {
function b() {
var l;
0 < c.playSymbolOption.value ? (l = e.getSymbolById(c.playSymbolOption.value), l instanceof c.Timeline.DisplaySymbol || (l = null)) : (l = h[k++], k === h.length && (k = 0), 0 <= c.playSymbolCountOption.value && k > c.playSymbolCountOption.value && (k = 0));
var m = 1;
if (l && 0 < l.id) {
var n = l;
v.display.DisplayObject.reset();
v.display.MovieClip.reset();
var p = n.symbolClass.initializeFrom(n);
n.symbolClass.instanceConstructorNoInitialize.call(p);
for (n instanceof v.display.BitmapSymbol && (p = new v.display.Bitmap(p));0 < a.numChildren;) {
a.removeChildAt(0);
}
a.addChild(p);
l instanceof v.display.SpriteSymbol && (m = l.numFrames);
}
0 < c.playSymbolFrameDurationOption.value && (m = c.playSymbolFrameDurationOption.value);
setTimeout(b, f._getFrameInterval() * m);
}
a.setStageWidth(1024);
a.setStageHeight(1024);
var h = [];
e._dictionary.forEach(function(a, b) {
a instanceof c.Timeline.DisplaySymbol && h.push(a);
});
var k = 0;
setTimeout(b, f._getFrameInterval());
});
};
f.prototype.processExternalCallback = function(a) {
if (this.externalCallback) {
try {
a.result = this.externalCallback(a.functionName, a.args);
} catch (b) {
a.error = b.message;
}
}
};
f.prototype.processVideoEvent = function(a, b, e) {
a = this._videoEventListeners[a];
c.Debug.assert(a, "Video event listener is not found");
a(b, e);
};
f.prototype.processDisplayParameters = function(a) {
this._stage.setStageContainerSize(a.stageWidth, a.stageHeight, a.pixelRatio);
};
f.prototype.onExternalCommand = function(a) {
throw Error("This method is abstract");
};
f.prototype.onFSCommand = function(a, b) {
throw Error("This method is abstract");
};
f.prototype.onVideoControl = function(a, b, c) {
throw Error("This method is abstract");
};
f.prototype.onFrameProcessed = function() {
throw Error("This method is abstract");
};
f.prototype.registerFontOrImage = function(d, b) {
a(d.syncId);
d.resolveAssetPromise = new c.PromiseWrapper;
this.registerFontOrImageImpl(d, b);
"font" === b.type && inFirefox ? d.ready = !0 : d.resolveAssetPromise.then(d.resolveAssetCallback, null);
};
f.prototype.registerFontOrImageImpl = function(a, b) {
throw Error("This method is abstract");
};
f.prototype.createExternalInterfaceService = function() {
var a, b = this;
return{get enabled() {
if (void 0 === a) {
var c = {action:"isEnabled"};
b.onExternalCommand(c);
a = c.result;
}
return a;
}, initJS:function(a) {
b.externalCallback = a;
b.onExternalCommand({action:"initJS"});
}, registerCallback:function(a) {
b.onExternalCommand({action:"register", functionName:a, remove:!1});
}, unregisterCallback:function(a) {
b.onExternalCommand({action:"register", functionName:a, remove:!0});
}, eval:function(a) {
a = {action:"eval", expression:a};
b.onExternalCommand(a);
return a.result;
}, call:function(a) {
a = {action:"call", request:a};
b.onExternalCommand(a);
return a.result;
}, getId:function() {
var a = {action:"getId"};
b.onExternalCommand(a);
return a.result;
}};
};
return f;
}();
h.Player = k;
})(c.Player || (c.Player = {}));
})(Shumway || (Shumway = {}));
(function(c) {
var h = c.BinaryFileReader, a = c.AVM2.ABC.AbcFile, s = c.AVM2.Runtime.AVM2, v = c.Debug.assert;
c.createAVM2 = function(p, u, l, e, m) {
var t;
v(p);
(new h(p)).readAll(function(p) {
s.initialize(l, e);
t = s.instance;
c.AVM2.AS.linkNatives(t);
console.time("Execute builtin.abc");
t.builtinsLoaded = !1;
t.systemDomain.executeAbc(new a(new Uint8Array(p), "builtin.abc"));
t.builtinsLoaded = !0;
console.timeEnd("Execute builtin.abc");
"string" === typeof u ? (new h(u)).readAll(function(c) {
t.systemDomain.executeAbc(new a(new Uint8Array(c), u));
m(t);
}) : s.isPlayerglobalLoaded() || s.loadPlayerglobal(u.abcs, u.catalog).then(function() {
m(t);
});
});
};
})(Shumway || (Shumway = {}));
__extends = this.__extends || function(c, h) {
function a() {
this.constructor = c;
}
for (var s in h) {
h.hasOwnProperty(s) && (c[s] = h[s]);
}
a.prototype = h.prototype;
c.prototype = new a;
};
(function(c) {
(function(h) {
(function(a) {
var h = c.ArrayUtilities.DataBuffer, v = function(a) {
function u(c, e) {
a.call(this);
this._window = c;
this._parent = e || c.parent;
this._window.addEventListener("message", function(a) {
this.onWindowMessage(a.data, !0);
}.bind(this));
this._window.addEventListener("syncmessage", function(a) {
this.onWindowMessage(a.detail, !1);
}.bind(this));
}
__extends(u, a);
u.prototype.onSendUpdates = function(a, c, m) {
void 0 === m && (m = !0);
a = a.getBytes();
c = {type:"player", updates:a, assets:c, result:void 0};
a = [a.buffer];
if (!m) {
return m = this._parent.document.createEvent("CustomEvent"), m.initCustomEvent("syncmessage", !1, !1, c), this._parent.dispatchEvent(m), h.FromPlainObject(c.result);
}
this._parent.postMessage(c, "*", a);
return null;
};
u.prototype.onExternalCommand = function(a) {
var c = this._parent.document.createEvent("CustomEvent");
c.initCustomEvent("syncmessage", !1, !1, {type:"external", request:a});
this._parent.dispatchEvent(c);
};
u.prototype.onFSCommand = function(a, c) {
this._parent.postMessage({type:"fscommand", command:a, args:c}, "*");
};
u.prototype.onVideoControl = function(a, c, h) {
var p = this._parent.document.createEvent("CustomEvent");
p.initCustomEvent("syncmessage", !1, !1, {type:"videoControl", id:a, eventType:c, data:h, result:void 0});
this._parent.dispatchEvent(p);
return p.detail.result;
};
u.prototype.onFrameProcessed = function() {
this._parent.postMessage({type:"frame"}, "*");
};
u.prototype.registerFontOrImageImpl = function(a, c) {
var h = this._parent.document.createEvent("CustomEvent");
h.initCustomEvent("syncmessage", !1, !1, {type:"registerFontOrImage", syncId:a.syncId, symbolId:a.id, assetType:c.type, data:c, resolve:a.resolveAssetPromise.resolve});
this._parent.dispatchEvent(h);
};
u.prototype.onWindowMessage = function(a, e) {
if ("object" === typeof a && null !== a) {
switch(a.type) {
case "gfx":
var h = c.ArrayUtilities.DataBuffer.FromArrayBuffer(a.updates.buffer);
this.processUpdates(h, a.assets);
break;
case "externalCallback":
this.processExternalCallback(a.request);
break;
case "videoPlayback":
this.processVideoEvent(a.id, a.eventType, a.data);
break;
case "displayParameters":
this.processDisplayParameters(a.params);
break;
case "options":
c.Settings.setSettings(a.settings);
break;
case "timeline":
switch(a.request) {
case "AVM2":
if ("clear" === a.cmd) {
c.AVM2.timelineBuffer.reset();
break;
}
this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:c.AVM2.timelineBuffer}, "*");
break;
case "Player":
if ("clear" === a.cmd) {
c.Player.timelineBuffer.reset();
break;
}
this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:c.Player.timelineBuffer}, "*");
break;
case "SWF":
if ("clear" === a.cmd) {
c.SWF.timelineBuffer.reset();
break;
}
this._parent.postMessage({type:"timelineResponse", request:a.request, timeline:c.SWF.timelineBuffer}, "*");
}
;
}
}
};
return u;
}(c.Player.Player);
a.WindowPlayer = v;
})(h.Window || (h.Window = {}));
})(c.Player || (c.Player = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = c.ArrayUtilities.DataBuffer, v = function(a) {
function u() {
a.call(this);
this._worker = c.Player.Test.FakeSyncWorker.instance;
this._worker.addEventListener("message", this._onWorkerMessage.bind(this));
this._worker.addEventListener("syncmessage", this._onSyncWorkerMessage.bind(this));
}
__extends(u, a);
u.prototype.onSendUpdates = function(a, c, m) {
void 0 === m && (m = !0);
a = a.getBytes();
c = {type:"player", updates:a, assets:c};
a = [a.buffer];
if (!m) {
return m = this._worker.postSyncMessage(c, a), h.FromPlainObject(m);
}
this._worker.postMessage(c, a);
return null;
};
u.prototype.onExternalCommand = function(a) {
this._worker.postSyncMessage({type:"external", command:a});
};
u.prototype.onFSCommand = function(a, c) {
this._worker.postMessage({type:"fscommand", command:a, args:c});
};
u.prototype.onVideoControl = function(a, c, h) {
return this._worker.postSyncMessage({type:"videoControl", id:a, eventType:c, data:h});
};
u.prototype.onFrameProcessed = function() {
this._worker.postMessage({type:"frame"});
};
u.prototype.registerFontOrImageImpl = function(a, c) {
return this._worker.postSyncMessage({type:"registerFontOrImage", syncId:a.syncId, symbolId:a.id, assetType:c.type, data:c, resolve:a.resolveAssetPromise.resolve});
};
u.prototype._onWorkerMessage = function(a) {
var c = a.data;
if ("object" === typeof c && null !== c) {
switch(c.type) {
case "gfx":
c = h.FromArrayBuffer(a.data.updates.buffer);
this.processUpdates(c, a.data.assets);
break;
case "externalCallback":
this.processExternalCallback(c.request);
a.handled = !0;
break;
case "videoPlayback":
this.processVideoEvent(c.id, c.eventType, c.data);
break;
case "displayParameters":
this.processDisplayParameters(c.params);
}
}
};
u.prototype._onSyncWorkerMessage = function(a) {
return this._onWorkerMessage(a);
};
return u;
}(c.Player.Player);
a.TestPlayer = v;
})(h.Test || (h.Test = {}));
})(c.Player || (c.Player = {}));
})(Shumway || (Shumway = {}));
(function(c) {
(function(h) {
(function(a) {
var h = function() {
function a() {
this._onmessageListeners = [];
this._onsyncmessageListeners = [];
}
Object.defineProperty(a, "instance", {get:function() {
a._singelton || (a._singelton = new a);
return a._singelton;
}, enumerable:!0, configurable:!0});
a.prototype.addEventListener = function(a, h, l) {
c.Debug.assert("syncmessage" === a || "message" === a);
"syncmessage" !== a ? this._onmessageListeners.push(h) : this._onsyncmessageListeners.push(h);
};
a.prototype.removeEventListener = function(a, c, h) {
"syncmessage" === a ? (a = this._onsyncmessageListeners.indexOf(c), 0 <= a && this._onsyncmessageListeners.splice(a, 1)) : (a = this._onmessageListeners.indexOf(c), 0 <= a && this._onmessageListeners.splice(a, 1));
};
a.prototype.postMessage = function(a, h) {
var l;
this._onmessageListeners.some(function(e) {
var h = {data:a, result:void 0, handled:!1};
try {
if ("function" === typeof e ? e(h) : e.handleEvent(h), !h.handled) {
return!1;
}
} catch (s) {
c.Debug.warning("Failure at postMessage: " + s.message);
}
l = h.result;
return!0;
});
return l;
};
a.prototype.postSyncMessage = function(a, h) {
var l;
this._onsyncmessageListeners.some(function(e) {
var h = {data:a, result:void 0, handled:!1};
try {
if ("function" === typeof e ? e(h) : e.handleEvent(h), !h.handled) {
return!1;
}
} catch (s) {
c.Debug.warning("Failure at postSyncMessage: " + s.message);
}
l = h.result;
return!0;
});
return l;
};
a.WORKER_PATH = "../../src/player/fakechannel.js";
return a;
}();
a.FakeSyncWorker = h;
})(h.Test || (h.Test = {}));
})(c.Player || (c.Player = {}));
})(Shumway || (Shumway = {}));
console.timeEnd("Load Player Dependencies");