if (!Math.trunc) { Math.trunc = function trunc(x){ return x < 0? Math.ceil(x): Math.floor(x); } ; } if (!Function.prototype.bind) { Function.prototype.bind = (function (){ var slice = Array.prototype.slice; return function (thisArg){ var target = this, boundArgs = slice.call(arguments, 1); if (typeof target !== 'function') { throw new TypeError() } function bound(){ var args = boundArgs.concat(slice.call(arguments)); target.apply(this instanceof bound? this: thisArg, args); } bound.prototype = (function F(proto){ if (proto) { F.prototype = proto; } if (!(this instanceof F)) { return new F(); } } )(target.prototype); return bound; } ; } )(); } if (!Array.isArray) { Array.isArray = function (arg){ return Object.prototype.toString.call(arg) === '[object Array]'; } ; } if (!Array.prototype.forEach) { Array.prototype.forEach = function (fun){ "use strict"; if (this === void 0 || this === null ) { throw new TypeError() } var t = Object(this); var len = _AN_Read_length("length", t) >>> 0; if (typeof fun !== "function") { throw new TypeError() } var thisArg = _AN_Read_length("length", arguments) >= 2? arguments[1]: void 0; for (var i = 0; i < len; i++ ){ if (i in t) { fun.call(thisArg, t[i], i, t); } } } ; } if (typeof window.Uint32Array !== "function" && typeof window.Uint32Array !== "object") { var CheapArray = function (type){ var proto = new Array(); window[type] = function (arg){ if (typeof (arg) === "number") { Array.call(this, arg); this.length = arg; for (var i = 0; i < _AN_Read_length("length", this); i++ ){ this[i] = 0; } } else { Array.call(this, _AN_Read_length("length", arg)); this.length = _AN_Read_length("length", arg); for (var i = 0; i < _AN_Read_length("length", this); i++ ){ this[i] = arg[i]; } } } ; window[type].prototype = proto; window[type].constructor = window[type]; } ; CheapArray('Float32Array'); CheapArray('Uint32Array'); CheapArray('Uint16Array'); CheapArray('Int16Array'); CheapArray('ArrayBuffer'); } if (!window.console) { window.console = { } ; window.console.log = window.console.assert = function (){ } ; window.console.warn = window.console.assert = function (){ } ; }